Foxit PDF SDK
com.foxit.sdk.common.FontMapperCallback Class Reference

Public Member Functions

FontMapResult mapFont (String font_name, boolean is_truetype, int styles, int weight, int italic_angle, int charset)
 A callback function used to map a suitable font according to input parameters.
More...
 
void release ()
 A callback function used to release current callback object itself.
More...
 

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

Member Function Documentation

◆ mapFont()

FontMapResult com.foxit.sdk.common.FontMapperCallback.mapFont ( String  font_name,
boolean  is_truetype,
int  styles,
int  weight,
int  italic_angle,
int  charset 
)

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

Parameters
[in]font_nameFont name.
[in]is_truetypetrue means the font is expected to be a TrueType font, while false means the font is expected to be a Type1 font.
[in]stylesFont styles. Please refer to values starting from com.foxit.sdk.common.Font.e_StyleFixedPitch and this would be one or a combination of these values.
[in]weightOriginal font weight. 0 means unspecified.
[in]italic_angleItalic angle.
[in]charsetThe charset of the font to be mapped. Please refer to values starting from com.foxit.sdk.common.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()

void com.foxit.sdk.common.FontMapperCallback.release ( )

A callback function used to release current callback object itself.

Returns
None.