THPDFPage.GetWideCharAdvances Method

Measures a Unicode string in the current font: TotalWidth picks up its width and Advances the advance of each character, in the page units of THotPDF.Resolution (1/Resolution inch) - the same units as the drawing coordinates

Declaration

function GetWideCharAdvances(const Text: WideString; out TotalWidth: Single; out Advances: array of Single): boolean;

Unit

HPDFDoc

Parameters

NameDescription
TextThe Unicode text to measure
TotalWidth[out] Total width of the whole line, in user-space points
Advances[out] Array of natural per-glyph advances (kerning included, in user-space points, the same unit as GetWideTextWidth); call SetLength to Length(Text) beforehand

Return value

Gives True when the text could be measured

Usage notes

Related APIs