AddType3Glyph

字体、Type 3 字体

描述

添加或替换一个按字节编码的字形,并重建字体编码、宽度和 Unicode 提取映射

语法

Delphi

Function TPDFlib.AddType3Glyph(FontID, CharCode: Integer; Const GlyphName, UnicodeText: WideString; WidthX, WidthY, LLX, LLY, URX, URY: Double; Const Content: AnsiString): Integer;

ActiveX

Function PDFlib::AddType3Glyph(FontID As Long, CharCode As Long, GlyphName As String, UnicodeText As String, WidthX As Double, WidthY As Double, LLX As Double, LLY As Double, URX As Double, URY As Double, Content As String) As Long

DLL

int DLAddType3Glyph(int InstanceID, int FontID, int CharCode, const wchar_t* GlyphName, const wchar_t* UnicodeText, double WidthX, double WidthY, double LLX, double LLY, double URX, double URY, const char* Content);
int DLAddType3GlyphA(int InstanceID, int FontID, int CharCode, const char* GlyphName, const char* UnicodeText, double WidthX, double WidthY, double LLX, double LLY, double URX, double URY, const char* Content);

参数

FontID由 AddType3Font 或 BeginFont 创建的 Type 3 字体句柄
CharCode该字形绑定的 0 到 255 字节码
GlyphName字体中唯一的字形名;前导斜杠会被忽略,名称不得为空,码 0 要求 .notdef,其他码不得使用它
UnicodeText文本提取映射;空值会根据 uniXXXX 名称、单个可打印字符名、space 或可打印字符码推断
WidthX字形空间中的水平字形位移;直立字形为 0
WidthY字形空间中的垂直字形位移;直立字形为 0
LLX字形空间中字形边界框的左边缘
LLY字形空间中字形边界框的下边缘
URX字形边界框的右边缘;必须大于或等于 LLX
URY字形边界框的上边缘;必须大于或等于 LLY
Content不含 d0 或 d1 的字形程序 PDF 图形操作符;库会先写入所需的度量

返回值

1已更新字形流和派生字体表
0字体、代码、框、保留名称或重复字形名称无效

备注

库会先写入所需的 d1 度量,并将提供的程序隔离在成对的 q 和 Q 运算符中。替换现有字符代码会保持字体句柄稳定。只有 AddType3Font 返回的字体可变;在已加载文档中发现的 Type 3 字体会被拒绝