GlyphInfo Struct

A glyph of a text being shaped: its identifier, the characters it comes from, and what shaping knows about it.

public struct GlyphInfo

Properties

NameDescription
IsBaseGets a value indicating whether the glyph is a base glyph.
IsIgnorableGets a value indicating whether the glyph still stands for a default ignorable character.
IsLigatureGets a value indicating whether the glyph is a ligature.
IsMarkGets a value indicating whether the glyph is a mark.
IsUnsafeToBreakGets a value indicating whether the text cannot be broken before the glyph without shaping it again (GlyphInfo.UnsafeToBreak).

Gets a value indicating whether the glyph is a base glyph.

public readonly bool IsBase { get; }

Property value

bool

IsIgnorable

GlyphInfo.cs

Gets a value indicating whether the glyph still stands for a default ignorable character.

public readonly bool IsIgnorable { get; }

Property value

bool

IsLigature

GlyphInfo.cs

Gets a value indicating whether the glyph is a ligature.

public readonly bool IsLigature { get; }

Property value

bool

Gets a value indicating whether the glyph is a mark.

public readonly bool IsMark { get; }

Property value

bool

IsUnsafeToBreak

GlyphInfo.cs

Gets a value indicating whether the text cannot be broken before the glyph without shaping it again (GlyphInfo.UnsafeToBreak).

public readonly bool IsUnsafeToBreak { get; }

Property value

bool

Fields

NameDescription
CategoryThe general category of the character.
ClusterThe index, in the text of the run, of the first character of the cluster the glyph belongs to.
CodePointThe character the glyph comes from; for a glyph made of several characters, the first one.
CombiningClassThe canonical combining class of the character.
FlagsWhat the character is for shaping: ignorable, joiner.
GlyphThe identifier of the glyph; before the characters are mapped, their code point.
LigatureComponentFor a ligature, the number of its components; for a mark that belongs to a ligature, the component it follows, from 1; for a glyph of a multiplied sequence, its rank in the sequence, from 1.
LigatureIdThe ligature the glyph is or belongs to; 0 for none. A mark with the identifier of a ligature is attached to one of its components.
MarkAttachmentClassThe mark attachment class of the glyph, from the GDEF table.
MaskThe features that apply to the glyph: a lookup applies when its mask has a bit of this one.
PropsThe class of the glyph and how substitutions produced it.
ShaperDataA value of the shaper of the script: for a space the font does not have, the width it stands for.
SyllableThe syllable the glyph belongs to, for the scripts shaped syllable by syllable: a number that differs from the ones of the neighboring syllables, 0 outside of them.
SyllableCategoryWhat the character is in a syllable, for the scripts shaped syllable by syllable.
SyllablePositionThe place of the glyph in its syllable, for the scripts whose syllables are reordered.

Category

The general category of the character.

public UnicodeCategory Category

Cluster

The index, in the text of the run, of the first character of the cluster the glyph belongs to.

public int Cluster

CodePoint

The character the glyph comes from; for a glyph made of several characters, the first one.

public int CodePoint

CombiningClass

The canonical combining class of the character.

public byte CombiningClass

Flags

What the character is for shaping: ignorable, joiner.

public byte Flags

Glyph

The identifier of the glyph; before the characters are mapped, their code point.

public int Glyph

LigatureComponent

For a ligature, the number of its components; for a mark that belongs to a ligature, the component it follows, from 1; for a glyph of a multiplied sequence, its rank in the sequence, from 1.

public byte LigatureComponent

LigatureId

The ligature the glyph is or belongs to; 0 for none. A mark with the identifier of a ligature is attached to one of its components.

public byte LigatureId

MarkAttachmentClass

The mark attachment class of the glyph, from the GDEF table.

public byte MarkAttachmentClass

Mask

The features that apply to the glyph: a lookup applies when its mask has a bit of this one.

public uint Mask

Props

The class of the glyph and how substitutions produced it.

public byte Props

ShaperData

A value of the shaper of the script: for a space the font does not have, the width it stands for.

public byte ShaperData

Syllable

The syllable the glyph belongs to, for the scripts shaped syllable by syllable: a number that differs from the ones of the neighboring syllables, 0 outside of them.

public byte Syllable

SyllableCategory

What the character is in a syllable, for the scripts shaped syllable by syllable.

public byte SyllableCategory

SyllablePosition

The place of the glyph in its syllable, for the scripts whose syllables are reordered.

public byte SyllablePosition

Constants

NameDescription
BaseGlyphThe glyph is a base glyph.
ClassMaskThe bits of the class of the glyph.
DefaultIgnorableThe character is default ignorable: it has no visible form of its own.
HiddenThe character has no visible form and still separates the glyphs around it for the substitutions: a combining grapheme joiner that keeps two marks in the order of the text.
LigatedThe glyph was put in place of others by a substitution of several glyphs by one.
LigatureGlyphThe glyph is a ligature.
LigatureWithComponentsThe glyph is a ligature with components, whatever its class is: its component field is their number, where the one of a mark is the component the mark follows.
MarkGlyphThe glyph is a mark.
MultipliedThe glyph is one of several glyphs a substitution put in place of one.
SubstitutedThe glyph was produced by a substitution: it no longer stands for an ignorable character.
UnsafeToBreakThe text cannot be broken before the glyph without shaping the two parts again: what the font did here depends on characters on both sides (a contextual rule, a pair of glyphs, joined letters, a syllable). The glyph is never the first of its range: a break before it would change the glyphs or their positions.
ZeroWidthJoinerThe character is the zero width joiner.
ZeroWidthNonJoinerThe character is the zero width non-joiner.

BaseGlyph

The glyph is a base glyph.

public const int BaseGlyph = 2

ClassMask

The bits of the class of the glyph.

public const int ClassMask = 14

DefaultIgnorable

The character is default ignorable: it has no visible form of its own.

public const int DefaultIgnorable = 1

Hidden

The character has no visible form and still separates the glyphs around it for the substitutions: a combining grapheme joiner that keeps two marks in the order of the text.

public const int Hidden = 16

Ligated

The glyph was put in place of others by a substitution of several glyphs by one.

public const int Ligated = 16

LigatureGlyph

The glyph is a ligature.

public const int LigatureGlyph = 4

LigatureWithComponents

The glyph is a ligature with components, whatever its class is: its component field is their number, where the one of a mark is the component the mark follows.

public const int LigatureWithComponents = 64

MarkGlyph

The glyph is a mark.

public const int MarkGlyph = 8

Multiplied

The glyph is one of several glyphs a substitution put in place of one.

public const int Multiplied = 32

Substituted

The glyph was produced by a substitution: it no longer stands for an ignorable character.

public const int Substituted = 8

UnsafeToBreak

The text cannot be broken before the glyph without shaping the two parts again: what the font did here depends on characters on both sides (a contextual rule, a pair of glyphs, joined letters, a syllable). The glyph is never the first of its range: a break before it would change the glyphs or their positions.

public const int UnsafeToBreak = 32

ZeroWidthJoiner

The character is the zero width joiner.

public const int ZeroWidthJoiner = 4

ZeroWidthNonJoiner

The character is the zero width non-joiner.

public const int ZeroWidthNonJoiner = 2