Skip to main content

Enumerations

Namespace: PinataLabs.Typography, unless stated otherwise. The first value in each table is the default of the matching TextOptions property, unless stated otherwise.

Layout​

LayoutMode​

ValueDescription
HorizontalTopBottomHorizontal lines, from top to bottom.
HorizontalBottomTopHorizontal lines, from bottom to top.
VerticalLeftRightVertical columns, from left to right. All glyphs upright.
VerticalRightLeftVertical columns, from right to left. All glyphs upright.
VerticalMixedLeftRightVertical columns, from left to right. Horizontal glyphs turned 90° clockwise.
VerticalMixedRightLeftVertical columns, from right to left. Horizontal glyphs turned 90° clockwise.

LayoutModeExtensions adds IsHorizontal(), IsVertical() and IsVerticalMixed().

TextDirection​

Default: Auto.

ValueDescription
AutoFind the base direction from the first strong character, as HTML dir="auto" does.
LeftToRightUse a left-to-right base direction, as CSS direction: ltr does.
RightToLeftUse a right-to-left base direction, as CSS direction: rtl does.

All three apply the Unicode Bidirectional Algorithm, so each run of text keeps its own direction.

TextAlignment​

ValueDescription
StartAt the start of the line: left for left-to-right text, right for right-to-left text.
EndAt the end of the line.
CenterIn the centre of the line.

TextJustification​

ValueDescription
NoneDo not justify.
InterWordAdd space between words.
InterCharacterAdd space between characters.

HorizontalAlignment​

ValueDescription
LeftThe left edge of the text box is at the origin.
RightThe right edge of the text box is at the origin.
CenterThe centre of the text box is at the origin.

VerticalAlignment​

ValueDescription
TopThe top edge of the text box is at the origin.
CenterThe centre of the text box is at the origin.
BottomThe bottom edge of the text box is at the origin.

WordBreaking​

ValueDescription
StandardBreak only where the line-breaking rules allow.
BreakAllBreak between any two characters, except in Chinese, Japanese and Korean text.
KeepAllDo not break inside Chinese, Japanese and Korean words.
BreakWordUse Standard, then break words that still do not fit.

Glyphs and fonts​

KerningMode​

ValueDescription
StandardApply kerning.
NoneDo not apply kerning.
AutoApply kerning when the layout engine chooses. At present the same as Standard.

HintingMode​

ValueDescription
NoneDo not hint.
StandardApply TrueType hinting.

ColorFontSupport​

Default: MicrosoftColrFormat.

ValueDescription
NoneDo not use color glyphs.
MicrosoftColrFormatUse COLR and CPAL color glyphs.

TextAttributes​

Default for a TextRun: None.

ValueDescription
NoneNormal text.
SubscriptSmaller, below the baseline.
SuperscriptSmaller, above the baseline.

TextDecorations​

A flags enumeration. Default for a TextRun: None.

ValueDescription
NoneNo lines.
UnderlineA line under the text.
StrikeoutA line through the text.
OverlineA line over the text.

GlyphType​

ValueDescription
FallbackNo font had a glyph for the code point. This is the missing-glyph box.
StandardAn ordinary glyph.
ColrLayerOne layer of a color glyph.

GlyphLayoutMode​

ValueDescription
HorizontalThe glyph is in horizontal text.
VerticalThe glyph is upright in vertical text.
VerticalRotatedThe glyph is turned 90° clockwise in vertical text.

OpenType tags​

Namespace: PinataLabs.Typography.Tables.AdvancedTypographic.

Tag​

public readonly struct Tag : IEquatable<Tag>

A four-letter OpenType tag.

MemberDescription
Tag(uint value)A tag from its 32-bit value.
static Parse(string value)A tag from its four letters, for example Tag.Parse("ss01").
ValueThe 32-bit value.
ToString()The four letters.
implicit conversion from FeatureTagsUse a FeatureTags value where a Tag is needed.
implicit conversion from uintUse a 32-bit value where a Tag is needed.

FeatureTags​

public enum FeatureTags : uint

The registered OpenType layout features, by name, for example SmallCapitals (smcp), OldstyleFigures (onum), TabularFigures (tnum), Fractions (frac), DiscretionaryLigatures (dlig) and Kerning (kern). Each value is the 32-bit value of its tag. See OpenType features for the common ones, and the OpenType feature registry for what each feature does.

GlyphClassDef​

The glyph classes of the GDEF table: BaseGlyph, LigatureGlyph, MarkGlyph and ComponentGlyph.