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字符程式的 PDF 繪圖運算子,不含 d0 或 d1;程式庫會先寫入必要的度量

傳回值

1字形串流與衍生的字型表已更新
0字型、代碼、邊界框、保留名稱或重複字形名稱無效

備註

程式庫先寫出必要的 d1 度量,並把提供的程式放進成對的 q/Q 運算子中隔離。取代既有字元碼時字型控制代碼保持穩定。只有 AddType3Font 傳回的字型可修改;從已載入文件中發現的 Type 3 字型會被拒絕