Table of Contents

Namespace DocWright.Core.Text

Classes

BidiResolver

Simplified managed bidi resolver used by line-time run reordering.

FieldInstructionTokenizer

Splits a field instruction (ECMA-376 Part 1 §17.16.5) into whitespace-separated, quote-aware tokens.

HyphenationDictionary

Liang pattern hyphenation: the algorithm behind TeX's and Word's soft-hyphen placement.

ScriptItemizer

Splits UTF-16 text into script/direction runs using generated Unicode-script tables.

ShapedGlyphBuffer

A reusable, growable buffer of ShapedGlyph values. Shapers append into it; layout reads it as a span. Reusing one buffer per measurement context keeps the per-run shaping path allocation-free after warmup.

Structs

FieldInstructionToken

One token of a field instruction, with the quoting state it was written in.

ScriptRun

One contiguous script/direction run in UTF-16 code units.

ShapeRequest

A request to shape one run of text in one font, size and direction. Additional shaping inputs (features, variations) are added as new constructor overloads with defaults — the seam evolves additively.

ShapedGlyph

One positioned glyph produced by shaping: a glyph id, the UTF-16 cluster index it maps back to, and its advance and offsets in twips (already scaled to the request's em size, rounded half away from zero per funit conversion rules).

Interfaces

IFontFace

Marker interface for a loaded font face as seen by the shaping seam. The concrete implementation lives in DocWright.Fonts; shapers downcast to the implementation they were built for.

ITextShaper

Converts a run of text into positioned glyphs. The built-in simple shaper handles horizontal non-complex scripts; a HarfBuzz-backed shaper (DocWright.ComplexText) plugs in through this same seam for complex scripts.

Enums

BidiResolver.BidiClass

High-level bidi classes used by the managed resolver.

TextDirection

The resolved base direction of a text run (UAX #9 bidirectional algorithm output).

UnicodeScript

The Unicode script a code point belongs to. This is a compact subset used by the layout/itemization path.