Namespace Egami.Fonts.Shaping
Classes
- FontFallback
Where characters the font does not map go: the caller's font families first, matched to the font's style, then a resolver. Without fallback (None, the default) shaping depends only on the fonts passed, never on the machine. A fallback face is drawn with the font's settings (hinting, metrics, embedded bitmaps, edging, emboldening and the rest) but its own default palette, as GDI+ font linking draws a linked face, bitmaps included.
- GlyphBuffer
A reusable buffer of shaped glyphs: glyph ids, the UTF-16 index of the text each came from, glyph flags and positions, in visual order. ShapeRun(ReadOnlySpan<char>, int, int, Font, RunProperties, GlyphBuffer) fills it; reuse one buffer for many runs to avoid allocations.
- OpenTypeLayout
What a face's OpenType layout tables (GSUB and GPOS) offer: the scripts, language systems and features they list, and the glyphs GSUB can produce from a set of glyphs. A table whose structure is damaged is left out whole, as the shaper leaves it out.
- ShapedLine
One line of ShapedText: its range and its runs in visual order.
- ShapedRun
A run of a ShapedLine: one font, one bidi level, one script, one language, and its glyphs.
- ShapedText
Text shaped by Shape(string, Font, ShapingOptions?): one ShapedLine per line between hard breaks, each with its runs in visual order. Nothing wraps.
- ShapingOptions
How Shape(string, Font, ShapingOptions?) shapes text: the paragraph direction, the language, script and features of the whole text, the fonts that take characters the font lacks, the cluster level, and styled spans.
- SystemFontFallback
The installed-font resolver of System: fixed families for each script on Windows, macOS and Linux (Segoe UI Emoji, Apple Color Emoji or Noto Color Emoji for emoji; the language picks Japanese, Chinese or Korean faces for Han), then any installed face that maps the cluster, found once and remembered for the process.
- TextShaper
OpenType text shaping in managed code: a run of text in one font becomes positioned glyphs with GSUB substitutions, GPOS positioning and the script rules HarfBuzz applies.
Structs
- FontFeature
An OpenType feature setting: a feature tag, a value and the range of UTF-16 units it applies to, in HarfBuzz's model. A value of 0 turns a feature off (such as default ligatures), 1 turns it on, and higher values pick an alternate.
- GlyphPosition
How a shaped glyph moves the pen and sits relative to it, in the units of the Font it was shaped with.
- RunProperties
What one run of text is shaped as: its script, language, direction, features and cluster level.
Interfaces
- IFontFallbackResolver
Finds a face for a grapheme cluster no listed font maps, such as SystemFontFallback.
Enums
- ClusterLevel
Which characters a glyph's cluster covers, as HarfBuzz's cluster levels.
- GlyphFlags
What a shaped glyph says about breaking the text next to it, as HarfBuzz's glyph flags.