THPDFPage.GetWideTextWidth 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

Returns the width of a Unicode string rendered in the current font, in the page units of THotPDF.Resolution (1/Resolution inch), the same units as the drawing coordinates. Use it to align or wrap CJK, Cyrillic or surrogate-pair text

The width includes the current horizontal scaling, character spacing (SetCharacterSpacing, once per glyph) and word spacing (SetWordSpacing, once per space), so it matches the advance of the text as drawn

Declaration

function GetWideTextWidth(Text: WideString): Single;

Unit

HPDFDoc

Parameters

NamePurpose
TextInput used by GetWideTextWidth

Return value

Returns the width in page units

Usage notes

Related APIs