AddTrueTypeSubsettedFont

文本, 字体

描述

向文档添加一个子集化 TrueType 字体

对于 Options 0 和 1,字体子集固定且无法更改

对于选项 2 和 3,可以更改字体子集 与 0 类似,但可以使用以下方式更新子集

UpdateTrueTypeSubsettedFont

语法

Delphi

Function TPDFlib.AddTrueTypeSubsettedFont(Const FontName, SubsetChars: WideString; Options: Integer): Integer;

ActiveX

Function PDFlib::AddTrueTypeSubsettedFont(FontName As String, SubsetChars As String, Options As Long) As Long

DLL

int DLAddTrueTypeSubsettedFont(int InstanceID, const wchar_t* FontName, const wchar_t* SubsetChars, int Options);
int DLAddTrueTypeSubsettedFontA(int InstanceID, const char* FontName, const char* SubsetChars, int Options);

参数

FontName必须进行子集化的 TrueType 字体名称
SubsetChars包含应纳入字体子集的字符的字符串
Options0=MS PlatformID、Unicode 字符集 1=Unicode PlatformID、"don't care" 字符集 2=类似于 0,但可使用 UpdateTrueTypeSubsettedFont 更新子集 3=类似于 1,但可使用 UpdateTrueTypeSubsettedFont 更新子集 4=类似于 2,但子集会自动更新 5=类似于 3,但子集会自动更新

返回值

0无法添加子集化字体,或 CharSet 参数超出范围
Non-zero成功添加的字体 ID。此 ID 可与 SelectFont 函数一起使用以选择字体