Table of Contents

Struct ShapeRequest

Namespace
DocWright.Core.Text
Assembly
DocWright.Core.dll

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.

public readonly struct ShapeRequest
Inherited Members

Constructors

ShapeRequest(ReadOnlyMemory<char>, IFontFace, Twips, TextDirection, string?, string?)

Initializes a shape request.

ShapeRequest(ReadOnlyMemory<char>, IFontFace, Twips, TextDirection, string?, string?, bool, bool)

Initializes a shape request with explicit OpenType feature toggles. Pair kerning, when enabled, comes from the face's OpenType kern feature where it has one (OpenTypeKerning is true).

ShapeRequest(ReadOnlyMemory<char>, IFontFace, Twips, TextDirection, string?, string?, bool, bool, bool)

Initializes a shape request with explicit OpenType feature toggles and the source of its pair kerning.

Properties

Direction

Gets the resolved base direction of the run.

EmSize

Gets the em size (font size) in twips.

EnableKerning

Gets a value indicating whether kerning features should be applied.

EnableStandardLigatures

Gets a value indicating whether standard ligature features should be applied.

Font

Gets the font face to shape with.

LanguageTag

Gets the BCP-47 language tag, or null when unknown.

OpenTypeKerning

Gets a value indicating where the run's pair kerning comes from when EnableKerning is set. true: the face's OpenType GPOS kern feature, through the language system the run's script selects, with the legacy kern table used only for a face whose GPOS has no such feature — the rule Word applies to a document in compatibility mode 15 (Word 2013 and later). false: the legacy kern table alone, and a face that kerns only in GPOS is not kerned — Word's rule for every earlier mode and for a document that declares no mode (WORDQUIRKS.md WQ-0049). Layout sets it from the document's declared mode; the constructors without the parameter default to true.

ScriptTag

Gets the OpenType script tag, or null to infer from the text.

Text

Gets the text of the run.