Foxit PDF SDK
com.foxit.sdk.common.FontMapperCallback类 参考

Public 成员函数

FontMapResult mapFont (String font_name, boolean is_truetype, int styles, int weight, int italic_angle, int charset)
 (此函数将在未来被弃用。建议使用返回 的 FontMapperCallback.mapFont 。)
用于根据输入参数映射合适字体的回调函数。 更多...
 
java.util.ArrayList< byte[]> mapFont (String font_family_name, int charset, int styles, int weight, int italic_angle)
 用于根据输入参数映射合适字体的回调函数。 更多...
 
void release ()
 用于释放当前回调对象自身的回调函数。 更多...
 

详细描述

此类表示以自定义方式映射字体的回调对象。 此类中所有纯虚函数都用作回调函数,应由用户实现。 实现的 FontMapperCallback 对象可以通过函数 Library.setFontMapperCallback 设置到Foxit PDF SDK。

参见
Library

成员函数说明

◆ mapFont() [1/2]

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

(此函数将在未来被弃用。建议使用返回 的 FontMapperCallback.mapFont 。)
用于根据输入参数映射合适字体的回调函数。

参数
[in]font_name字体名称。
[in]is_truetypetrue 表示期望字体为TrueType字体,false 表示期望字体为Type1字体。
[in]styles字体样式。请参考从 com.foxit.sdk.common.Font.e_StyleFixedPitch 开始的值, 这将是这些值中的一个或组合。
[in]weight原始字体粗细。0表示未指定。
[in]italic_angle斜体角度。
[in]charset要映射的字体的字符集。请参考从 com.foxit.sdk.common.Font.e_CharsetANSI 开始的值,这将是这些值中的一个。
返回
字体映射结果对象。如果返回的 FontMapResult 中的任何成员无效, 意味着没有找到映射字体。然后Foxit PDF SDK将进行字体映射。

◆ mapFont() [2/2]

java.util.ArrayList< DX_BYTE_ARRAY > com.foxit.sdk.common.FontMapperCallback.mapFont ( String  font_family_name,
int  charset,
int  styles,
int  weight,
int  italic_angle 
)

用于根据输入参数映射合适字体的回调函数。

参数
[in]font_family_name字体族名称。
[in]charset要映射的字体的字符集。请参考从 com.foxit.sdk.common.Font.e_CharsetANSI 开始的值,这将是这些值中的一个。
[in]styles字体样式。请参考从 com.foxit.sdk.common.Font.e_StyleFixedPitch 开始的值, 这将是这些值中的一个或组合。
[in]weight原始字体粗细。0表示未指定。
[in]italic_angle斜体角度。
返回
字体族名称数组。如果返回的数组为空,意味着没有找到映射字体。

◆ release()

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

用于释放当前回调对象自身的回调函数。

返回
无。