Constructor ShapeRequest
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
textReadOnlyMemory<char>The text of the run.
fontIFontFaceThe font face to shape with.
emSizeTwipsThe em size (font size) in twips.
directionTextDirectionThe resolved base direction of the run.
languageTagstringThe BCP-47 language tag, or null when unknown.
scriptTagstringThe OpenType script tag (for example "latn"), or null to infer from the text.
Exceptions
- ArgumentNullException
fontis 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
textReadOnlyMemory<char>The text of the run.
fontIFontFaceThe font face to shape with.
emSizeTwipsThe em size (font size) in twips.
directionTextDirectionThe resolved base direction of the run.
languageTagstringThe BCP-47 language tag, or null when unknown.
scriptTagstringThe OpenType script tag (for example "latn"), or null to infer from the text.
enableKerningboolenableStandardLigaturesbool
Exceptions
- ArgumentNullException
fontis 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
textReadOnlyMemory<char>The text of the run.
fontIFontFaceThe font face to shape with.
emSizeTwipsThe em size (font size) in twips.
directionTextDirectionThe resolved base direction of the run.
languageTagstringThe BCP-47 language tag, or null when unknown.
scriptTagstringThe OpenType script tag (for example "latn"), or null to infer from the text.
enableKerningboolenableStandardLigaturesboolopenTypeKerningbooltrue to kern pairs from the face's OpenType GPOS
kernfeature (the language system the run's script selects), falling back to the legacykerntable only for a face whose GPOS has no such feature; false to kern from the legacykerntable alone, so a face that kerns only in GPOS is not kerned. See OpenTypeKerning.
Exceptions
- ArgumentNullException
fontis null.