AddTrueTypeSubsettedFontA
文本, 字体
描述
末尾的 A 表示 ANSI(char)DLL 入口点 ActiveX/COM 接口仅提供 Unicode 形式 行为与 AddTrueTypeSubsettedFont 相同,字符串参数使用当前 SetAnsiMode 代码页解释
向文档添加一个子集化 TrueType 字体
对于 Options 0 和 1,字体子集固定且无法更改
对于选项 2 和 3,可以更改字体子集 与 0 类似,但可以使用以下方式更新子集
UpdateTrueTypeSubsettedFont
语法
Delphi
Function DLAddTrueTypeSubsettedFontA(InstanceID: Integer; FontName, SubsetChars: PAnsiChar; Options: Integer): Integer;
DLL
int DLAddTrueTypeSubsettedFontA(int InstanceID, const char * FontName, const char * SubsetChars, int Options);
参数
| FontName | 必须进行子集化的 TrueType 字体名称 |
|---|---|
| SubsetChars | 包含应纳入字体子集的字符的字符串,0=MS PlatformID、Unicode 字符集 1=Unicode PlatformID、"don't care" 字符集 2=类似于 0,但可使用 UpdateTrueTypeSubsettedFont 更新子集 3=类似于 1,但可使用 UpdateTrueTypeSubsettedFont 更新子集 4=类似于 2,但子集会自动更新 5=类似于 3,但子集会自动更新 |
| Options |
返回值
| 0 | 无法添加子集化字体,或 CharSet 参数超出范围 |
|---|---|
| Non-zero | 成功添加的字体 ID。此 ID 可与 SelectFont 函数一起使用以选择字体 |