THPDFLoadedFontInfo Record
Read-only metadata for one font in a loaded page's resource dictionary: base font name, subtype, encoding, embedding state, object number, and resource key
Declaration
THPDFLoadedFontInfo= record
FontName: AnsiString;
Subtype: AnsiString;
Encoding: AnsiString;
IsEmbedded: boolean;
ObjectNumber: Integer;
ResourceName: AnsiString;
end;
Unit
HPDFDoc
Fields
| Field | Purpose |
|---|---|
FontName | Font dictionary's /BaseFont name |
Subtype | Font dictionary's /Subtype, such as Type1, TrueType, or Type0 |
Encoding | Font dictionary's /Encoding value, empty when the entry is absent |
IsEmbedded | true when the font descriptor carries a /FontFile, /FontFile2, or /FontFile3 stream |
ObjectNumber | Indirect object number of the font dictionary |
ResourceName | Key of the font in the page's /Resources/Font dictionary, such as F1 or Helv |
Usage notes
- Enumerate page fonts with
THotPDF.GetLoadedFontCountand fetch each one withTHotPDF.GetLoadedFontInfo; afalseresult leaves the record zeroed - Check
IsEmbeddedfirst when auditing documents for print or archival readiness: unembedded fonts depend on viewer substitution - Use
ResourceNameto correlate the font with operators in the page's content stream, andObjectNumberto fetch the full dictionary when needed