Class ScriptItemizer
Splits UTF-16 text into script/direction runs using generated Unicode-script tables.
public static class ScriptItemizer
- Inheritance
-
ScriptItemizer
- Inherited Members
Methods
- ClassifyScript(int)
Classifies one Unicode scalar value to a script bucket.
- IsComplexScript(UnicodeScript)
Gets whether the script is complex-shaped by default.
- IsEastAsianScript(UnicodeScript)
Gets whether the script is East Asian for font fallback/rules.
- Itemize(ReadOnlySpan<char>, TextDirection)
Itemizes a text span into contiguous script/direction runs.
- Itemize(ReadOnlySpan<char>, TextDirection, TextDirection)
Itemizes a text span into contiguous script/direction runs, resolving every character that has no strong direction of its own (punctuation, symbols, digits, spaces) to
neutralDirectioninstead of to the direction of the last strong character. This is the run-level rule of ECMA-376 §17.3.2.30: the neutrals of a run that carriesw:rtlare right-to-left and those of a run without it are left-to-right, whatever precedes them -- so the period that closes an Arabic sentence after a Latin word is still right-to-left, and the brackets of a Latin caption inside a right-to-left paragraph are still left-to-right. Strong characters keep their own direction, and a run is still split wherever the script or the direction changes.
- ToOpenTypeScriptTag(UnicodeScript)
Returns the canonical OpenType script tag for a Unicode script when known.