PDFium Delphi Component Docs

TextObjectGlyphWidth method

Component: TPdf  ·  Unit: PDFium
Returns the native glyph advance of one text-object glyph at a requested font size

Syntax

function TextObjectGlyphWidth(Index, GlyphIndex: Integer; FontSize: Single): Single;

Description

TextObjectGlyphWidth queries the native text object at Index for the advance width of glyph GlyphIndex, scaled to FontSize in PDF user units

Raises EPdfError when the index is not a text object, the glyph index is out of range, or FontSize is not positive

Remarks

Example

W := Pdf1.TextObjectGlyphWidth(ObjIdx, GlyphIdx, 12);

See Also

TextObjectGlyphOutline, TextObjectFontSize, FontSize