Back to API Reference
Class
Shaper
sealed
Text shaper that converts codepoints to positioned glyphs through a runtime font face. SFNT-backed fonts use HarfBuzz for full OpenType shaping; platform-native faces supply equivalent glyph and positioning results through their backend.
public static Shaper Instance{ get }Gets the singleton shaper instance.
public static uint GetGlyphIndex(Core font, uint codepoint)Gets the glyph index for a codepoint in the specified font.
public static bool TryGetGlyphInfo(Core font, uint codepoint, float fontSize, uint glyphIndex, float advance)Gets glyph index and advance width for a codepoint.
Computes per-font shaping parameters in a single font lookup: the spacingOffsetUnits baseline (from SpacingOffset) and per-glyph fakeBoldAdvancePx bonus (from FakeBoldWeight) alongside the returned design-unit-to-pixel scale (incorporates FontScale). Callers cache all three per run-fontId change.
