THPDFPage.GetWideCharAdvances Method
Version 2.1102.0 adds ordinary native CFF2 text and portable CFF1 font embedding. Registered names select the frozen font bytes directly; cmap and hmtx supply glyphs and metrics, with per-font BMP/SMP mappings and a CIDFontType0C stream retaining all original glyph slots
Measures a Unicode string in the current font: TotalWidth receives 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
| Name | Purpose |
|---|---|
Text | Input used by GetWideCharAdvances |
TotalWidth | Input used by GetWideCharAdvances |
Advances | Input used by GetWideCharAdvances |
Return value
Returns True when the text could be measured
Usage notes
- Use this API in the page drawing workflow before the affected page, resource, field, or catalog object is finalized
- Keep object names, field names, resource names, and returned handles stable until the document is finalized
- Page-level changes affect subsequent operators on the same page; save and restore graphics state when a temporary setting should not leak