Foxit PDF RDK

Public Member Functions | List of all members
FontMapperCallback Class Reference
Inheritance diagram for FontMapperCallback:

## Public Member Functions
| MapFont (font_name, is_truetype, styles, weight, italic_angle, charset)
| A callback function used to map a suitable font according to input parameters. More...
| Release ()
| A callback function used to release current callback object itself. More...
Public Member Functions inherited from NativeObjectWrapper
| constructor (r)
| GetPointerAsNumber ()

## Detailed Description

This class represents a callback object to map font in customized way. All the pure virtual functions in this class are used as callback functions and should be implemented by user. An implemented FontMapperCallback object can be set to Foxit PDF SDK by function Library.SetFontMapperCallback.

See also
  Library

Examples
  /Users/ec2-user/gitlab-runner/builds/E-xKdhDo/0/foxit/sdk/mobile/gsdk-doc-auto-build/harmony_nodejs/input/Index.js.

## Member Function Documentation

## ◆ MapFont()

FontMapperCallback.MapFont | ( | font_name | ,
|  | is_truetype | ,
|  | styles | ,
|  | weight | ,
|  | italic_angle | ,
|  | charset |
| ) |  |

A callback function used to map a suitable font according to input parameters.

Parameters

  [in] | font_name | Font name.
  [in] | is_truetype | true means the font is expected to be a TrueType font, while false means the font is expected to be a Type1 font.
  [in] | styles | Font styles. Please refer to values starting from Font.e_StyleFixedPitch and this would be one or a combination of these values.
  [in] | weight | Original font weight. 0 means unspecified.
  [in] | italic_angle | Italic angle.
  [in] | charset | The charset of the font to be mapped. Please refer to values starting from Font.e_CharsetANSI and this would be one of these values.

Returns
  Font map result object. If any member in the returned FontMapResult is invalid, that means no mapped font is found. Then Foxit PDF SDK will do font mapping.

## ◆ Release()

FontMapperCallback.Release | ( |  | ) |

A callback function used to release current callback object itself.

Returns
  None.