How text is shaped into glyphs before it is shown: the OpenType script and language system whose features apply, the run's
direction, and which features are on. Immutable; each With* method returns a changed copy. Two instances with the same
settings are equal.
public sealed class TextShaping : IEquatable<TextShaping>
OpenType specification, "GSUB — Glyph Substitution Table", "GPOS — Glyph Positioning Table", "kern" and "OpenType Layout Common Table Formats" (ScriptList, LangSys,
FeatureList), and the Feature Tags registry. Shaping applies the font's GSUB lookups for the default features
ccmp, locl, rlig, rclt, calt, liga and clig, and, for Arabic, the joining
forms isol, fina, medi and init chosen by the Unicode cursive joining rules; kern (also on
by default) adds the font's pair kerning (its GPOS pair adjustments, else its kern table), and the GPOS
features mark, mkmk, curs, dist, abvm and blwm (on by default) place marks on their
bases and join cursive glyphs. WithFeature(String, Boolean) turns any of these off or another feature (such as
smcp, dlig or salt, taking its first alternate) on.
The text of a run is one script in one direction: a right-to-left run (Arabic, Hebrew) is shaped in logical order and its glyphs are shown in visual order, right to left. Splitting mixed text into runs is bidirectional layout's job (issue #173). Indic, Southeast Asian and the other complex scripts are not shaped beyond the default features (issue #230).
kind:method, kind:property, kind:ctor. Press Esc to clear.DefaultGets the default shaping: the script found from the text, the default language system, the default features.FeaturesGets the features turned on or off explicitly, by tag; the others keep their default.LanguageGets the OpenType language system tag (such as TRK or URD), or null for the script's default language system.RightToLeftGets whether the run is right to left (glyphs in reverse order, mirrored characters shown mirrored, UAX #9 rules L2 and L4), or null for the script's direction (Arabic and Hebrew are right to left).ScriptGets the OpenType script tag whose features apply (such as latn, arab or hebr), or null to find it from the first letter of the text (Latin, Greek, Cyrillic, Arabic and Hebrew are recognised; other text uses the font's default script).IsEnabled(String)Gets a value indicating whether a feature applies: its explicit setting, else whether it is on by default.WithFeature(String, Boolean)Returns a copy with a feature turned on or off.WithLanguage(String?)Returns a copy that applies the features of a language system of the script.WithRightToLeft(Nullable<Boolean>)Returns a copy with an explicit direction.WithScript(String?)Returns a copy that applies the features of another script.