HPDFGetStandardFontWidth

Returns the Adobe AFM horizontal advance for a supported decoded Unicode character in a canonical core text font

Declaration

function HPDFGetStandardFontWidth(const BaseFont: AnsiString;
  CodePoint: Cardinal; out Width: Double): Boolean;

Behavior

The function belongs to HPDFStandardFontMetrics and returns Width in 1/1000 em without a system font lookup, shaping, or kerning

BaseFont must exactly match one of the 12 canonical names listed in Standard font advances; matching is case-sensitive and does not strip subset prefixes, decode PDF name escapes, or accept aliases

CodePoint is a decoded Unicode scalar rather than a raw PDF byte or glyph index; the caller must resolve the PDF encoding first

A supported pair returns True and its advance; every unsupported font or character returns False and sets Width to zero

The function is a bounded read of immutable tables and is safe for concurrent calls

Related topics

HPDFMeasureBaseFontWidths, Standard font advances