THPDFTrueTypeData.TryGetGlyphBounds

Unit: HPDFFontData

function TryGetGlyphBounds(GID: Integer;
  out Bounds: THPDFTrueTypeGlyphBounds): Boolean;

Reads the selected actual TrueType glyph header through validated head, loca and glyf table ranges, caching table discovery for repeated queries

A valid empty glyph returns true with Bounds.Empty set; negative or out-of-range GIDs, unsupported sfnt outline signatures, invalid units or location formats, short location tables, invalid selected offsets, truncated headers and reversed header bounds return false

Both short and long loca formats are supported; coordinates remain in font units and require scaling by the actual point size divided by UnitsPerEm

This query validates the selected header and its ranges, rather than decoding the full outline program or validating all other glyphs

Callers must keep the referenced font bytes unchanged for the lifetime of THPDFTrueTypeData

THPDFTrueTypeGlyphBounds describes the result