Table of Contents

Constructor ShapeRequest

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

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

Initializes a shape request.

public ShapeRequest(ReadOnlyMemory<char> text, IFontFace font, Twips emSize, TextDirection direction, string? languageTag = null, string? scriptTag = null)

Parameters

text ReadOnlyMemory<char>

The text of the run.

font IFontFace

The font face to shape with.

emSize Twips

The em size (font size) in twips.

direction TextDirection

The resolved base direction of the run.

languageTag string

The BCP-47 language tag, or null when unknown.

scriptTag string

The OpenType script tag (for example "latn"), or null to infer from the text.

Exceptions

ArgumentNullException

font is null.

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).

public ShapeRequest(ReadOnlyMemory<char> text, IFontFace font, Twips emSize, TextDirection direction, string? languageTag, string? scriptTag, bool enableKerning, bool enableStandardLigatures)

Parameters

text ReadOnlyMemory<char>

The text of the run.

font IFontFace

The font face to shape with.

emSize Twips

The em size (font size) in twips.

direction TextDirection

The resolved base direction of the run.

languageTag string

The BCP-47 language tag, or null when unknown.

scriptTag string

The OpenType script tag (for example "latn"), or null to infer from the text.

enableKerning bool

true to enable kerning features; otherwise false.

enableStandardLigatures bool

true to enable standard ligatures; otherwise false.

Exceptions

ArgumentNullException

font is null.

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.

public ShapeRequest(ReadOnlyMemory<char> text, IFontFace font, Twips emSize, TextDirection direction, string? languageTag, string? scriptTag, bool enableKerning, bool enableStandardLigatures, bool openTypeKerning)

Parameters

text ReadOnlyMemory<char>

The text of the run.

font IFontFace

The font face to shape with.

emSize Twips

The em size (font size) in twips.

direction TextDirection

The resolved base direction of the run.

languageTag string

The BCP-47 language tag, or null when unknown.

scriptTag string

The OpenType script tag (for example "latn"), or null to infer from the text.

enableKerning bool

true to enable kerning features; otherwise false.

enableStandardLigatures bool

true to enable standard ligatures; otherwise false.

openTypeKerning bool

true to kern pairs from the face's OpenType GPOS kern feature (the language system the run's script selects), falling back to the legacy kern table only for a face whose GPOS has no such feature; false to kern from the legacy kern table alone, so a face that kerns only in GPOS is not kerned. See OpenTypeKerning.

Exceptions

ArgumentNullException

font is null.