Table of Contents

Class TrueTypeGlyphMetrics

Namespace
SixLabors.Fonts.Tables.TrueType
Assembly
SixLabors.Fonts.dll

Represents a glyph metric from a particular TrueType font face.

public class TrueTypeGlyphMetrics : FontGlyphMetrics
Inheritance
TrueTypeGlyphMetrics
Inherited Members

Methods

TryGetHintedAdvanceWidth(float, float, HintingMode, out float)

Attempts to compute the whole pixel advance width for the glyph under full hinting. The value comes from the 'hdmx' device record when the font carries one, exactly as classic rasterizers resolve device advances, or from the design advance rounded to whole pixels otherwise: fonts without device records do not adjust advances in their instructions. Neither path executes hinting or touches the outline cache, so this is safe on the layout hot path.

public override bool TryGetHintedAdvanceWidth(float pointSize, float dpi, HintingMode hintingMode, out float advancePx)

Parameters

pointSize float

The font size in pt units.

dpi float

The DPI (Dots Per Inch) to render/measure the glyph at

hintingMode HintingMode

The requested hinting mode.

advancePx float

The advance width in whole device pixels.

Returns

bool

true if a hinted advance applies; otherwise, false.