Expand description
§OpenType Shaping
Wraps rustybuzz to perform OpenType shaping (GSUB/GPOS) on text. This produces real glyph IDs, kerning offsets, and ligature substitutions instead of the naive char-as-u16 glyph IDs used before.
Standard PDF fonts (Helvetica, Times, Courier) bypass shaping entirely — they use WinAnsi encoding and don’t have GSUB/GPOS tables.
Structs§
- Shaped
Glyph - A single glyph produced by OpenType shaping.
Functions§
- cluster_
widths - Compute per-cluster widths from shaped glyphs.
- shape_
text - Shape text using the given font data.
- shape_
text_ with_ direction - Shape text with explicit direction control.
- shape_
text_ with_ offset - Shape a segment of text for a specific font, returning shaped glyphs and a mapping from glyph index to character range.
- shaped_
width - Compute the total advance width of shaped glyphs in points.