|
THotPDF.RegisterAcroFormFont THotPDF AcroForm
|
AddXFAPacket AcroForm 支持 SetFormUnicodeFontDict |
|
注册一个额外的 Unicode(Type 0 / CID-keyed)字体,纳入 AcroForm Default Resources(
Delphi 语法: procedure RegisterAcroFormFont(const FontResourceName: AnsiString; FontIndirectRef: THPDFObject);
说明 AcroForm 控件经 AcroForm 字典上的 Default Resources(
自 v2.119.42 起,调用方可以在任意资源名称下注册额外的 Unicode 字体。每个注册的字体都会成为一条
参数
典型工作流 (multilingual form)
PDF.RegisterUnicodeTTF('NotoSansArab', 'NotoSansArabic-Regular.ttf'); PDF.RegisterUnicodeTTF('NotoSansJP' , 'NotoSansJP-Regular.otf'); ArabRef := PDF.CreateIndirectFontDict('NotoSansArab'); JPRef := PDF.CreateIndirectFontDict('NotoSansJP'); PDF.RegisterAcroFormFont('NotoSansArab', ArabRef); PDF.RegisterAcroFormFont('NotoSansJP' , JPRef);
这样阿拉伯内容控件可用
Coexistence with SetFormUnicodeFontDict 原有的单字体辅助方法(SetFormUnicodeFontDict)继续可用,适合 AcroForm
另请参阅: THotPDF.SetFormUnicodeFontDict, THotPDF.CreateIndirectFontDict, AcroForm 支持, THPDFPage.AddTextField |