Back to API Reference
Class

Shaper

sealed

Text shaper that converts codepoints to positioned glyphs via HarfBuzz. Performs full OpenType shaping (GSUB/GPOS) including kerning, ligatures and mark positioning.

public static Shaper Instance{ get }

Gets the singleton shaper instance.

public static uint GetGlyphIndex(UniTextFont font, uint codepoint)

Gets the glyph index for a codepoint in the specified font.

public static bool TryGetGlyphInfo(UniTextFont font, uint codepoint, float fontSize, uint glyphIndex, float advance)

Gets glyph index and advance width for a codepoint.

public static int GetUnitsPerEm(UniTextFont font)

Gets the units per em value for the font.

public static int GetUpemFromFontData()

Gets upem directly from font data without caching.

public static void ClearCache(int fontAssetInstanceId)

Clears the shaping cache for a specific font asset.

public static void ClearAllCaches()

Clears all shaping caches for all fonts.

public float ComputeScale()

Computes the glyph scale factor for a font.