property FontData[FontIndex: Integer]: TBytes; // read only
embedded font program の raw byte を返します。font が embedded のときだけ値が入ります。property は character から得た font handle (FontHandle[CharIndex]) か、page の font resource を直接列挙したものを index にします
read-only です。基盤の value は PDFium が font dictionary または font program から遅延取得します。index が既知の font と一致しない場合、この function は EPdfError を送出します
CharacterFontSize / CharacterFontWeight と組み合わせると、font-substitution や text-style reconstruction pipeline に使えます
| FontIndex | Index of the font handle. Obtain via FontHandle[CharIndex] or by enumerating the page font resources. |
FontData と TrueType/OpenType parser を使って font program を直接参照してください
var
FontIdx: Integer;
begin
// inspect the font used by the first character
if Pdf1.CharacterCount > 0 then
begin
FontIdx := Pdf1.FontHandle[0];
Memo1.Lines.Add(Format('%s (embed=%s)',
[Pdf1.FontFamilyName[FontIdx], BoolToStr(Pdf1.FontIsEmbedded[FontIdx], True)]));
end;
end;