THotPDF.GetLoadedFontDict Method
Returns the complete font dictionary object of a specific font resource in the specified page of the loaded PDF, used for accessing low-level properties such as font descriptors, width tables, and encoding mappings
Declaration
function GetLoadedFontDict(PageIndex, FontIndex: Integer): THPDFDictionaryObject;
Unit
HPDFDoc
Parameters
| Name | Purpose |
|---|---|
PageIndex | Zero-based index of the target page |
FontIndex | The zero-based index of the target font in the page's font resource dictionary |
Return value
Returns the THPDFDictionaryObject that owns the font dictionary
Usage notes
- Call GetLoadedFontCount first to obtain the valid index range
- The returned dictionary may be an indirect reference to an already parsed object; the caller must not free this object, and the reference becomes invalid after the document is closed
- For CIDFont or Type0 composite fonts, the dictionary may contain a DescendantFonts array, which requires additional parsing to obtain complete glyph information