HPDFMeasureBaseFontWidths

Measures decoded Unicode advances for the loaded simple-font fallback path

Declaration

function HPDFMeasureBaseFontWidths(const BaseFont: AnsiString;
  const CodePoints: array of Cardinal; var Widths: array of Double): Boolean;

Behavior

This HPDFBaseFontMetrics function writes at most the smaller of the input and output array lengths, in 1/1000 em

When every writable character has a canonical standard advance, measurement succeeds without loading or consulting a substitute font

Otherwise, measurement first calls the existing platform backend and retains its success or failure result; after a successful backend call, supported canonical characters receive their standard advances while other characters retain the backend result

Windows uses the existing GDI metrics backend and Linux uses the existing fontconfig and TrueType metrics backend for those fallback characters and noncanonical font names

A False result does not guarantee untouched output values; callers should discard measurements when the backend fails

HPDFBuildFontDecoder invokes this fallback only when the font dictionary has no parsed /Widths array; explicit widths and the embedded-font decoding paths remain authoritative

Related topics

HPDFGetStandardFontWidth, Standard font advances