GlyphInfo Struct
A glyph of a text being shaped: its identifier, the characters it comes from, and what shaping knows about it.
public struct GlyphInfoProperties
| Name | Description |
|---|---|
| IsBase | Gets a value indicating whether the glyph is a base glyph. |
| IsIgnorable | Gets a value indicating whether the glyph still stands for a default ignorable character. |
| IsLigature | Gets a value indicating whether the glyph is a ligature. |
| IsMark | Gets a value indicating whether the glyph is a mark. |
| IsUnsafeToBreak | Gets a value indicating whether the text cannot be broken before the glyph without shaping it again (GlyphInfo.UnsafeToBreak). |
IsBase
GlyphInfo.csIsIgnorable
GlyphInfo.csIsLigature
GlyphInfo.csIsMark
GlyphInfo.csIsUnsafeToBreak
GlyphInfo.csGets 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
Fields
| Name | Description |
|---|---|
| Category | The general category of the character. |
| Cluster | The index, in the text of the run, of the first character of the cluster the glyph belongs to. |
| CodePoint | The character the glyph comes from; for a glyph made of several characters, the first one. |
| CombiningClass | The canonical combining class of the character. |
| Flags | What the character is for shaping: ignorable, joiner. |
| Glyph | The identifier of the glyph; before the characters are mapped, their code point. |
| 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. |
| 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. |
| MarkAttachmentClass | The mark attachment class of the glyph, from the GDEF table. |
| Mask | The features that apply to the glyph: a lookup applies when its mask has a bit of this one. |
| Props | The class of the glyph and how substitutions produced it. |
| ShaperData | A value of the shaper of the script: for a space the font does not have, the width it stands for. |
| 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. |
| SyllableCategory | What the character is in a syllable, for the scripts shaped syllable by syllable. |
| SyllablePosition | The place of the glyph in its syllable, for the scripts whose syllables are reordered. |
Category
The general category of the character.
public UnicodeCategory CategoryCluster
The index, in the text of the run, of the first character of the cluster the glyph belongs to.
public int ClusterCodePoint
The character the glyph comes from; for a glyph made of several characters, the first one.
public int CodePointCombiningClass
The canonical combining class of the character.
public byte CombiningClassFlags
What the character is for shaping: ignorable, joiner.
public byte FlagsGlyph
The identifier of the glyph; before the characters are mapped, their code point.
public int GlyphLigatureComponent
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 LigatureComponentLigatureId
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 LigatureIdMarkAttachmentClass
The mark attachment class of the glyph, from the GDEF table.
public byte MarkAttachmentClassMask
The features that apply to the glyph: a lookup applies when its mask has a bit of this one.
public uint MaskProps
The class of the glyph and how substitutions produced it.
public byte PropsShaperData
A value of the shaper of the script: for a space the font does not have, the width it stands for.
public byte ShaperDataSyllable
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 SyllableSyllableCategory
What the character is in a syllable, for the scripts shaped syllable by syllable.
public byte SyllableCategorySyllablePosition
The place of the glyph in its syllable, for the scripts whose syllables are reordered.
public byte SyllablePositionConstants
| Name | Description |
|---|---|
| BaseGlyph | The glyph is a base glyph. |
| ClassMask | The bits of the class of the glyph. |
| DefaultIgnorable | The character is default ignorable: it has no visible form of its own. |
| 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. |
| Ligated | The glyph was put in place of others by a substitution of several glyphs by one. |
| LigatureGlyph | The glyph is a ligature. |
| 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. |
| MarkGlyph | The glyph is a mark. |
| Multiplied | The glyph is one of several glyphs a substitution put in place of one. |
| Substituted | The glyph was produced by a substitution: it no longer stands for an ignorable character. |
| 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. |
| ZeroWidthJoiner | The character is the zero width joiner. |
| ZeroWidthNonJoiner | The character is the zero width non-joiner. |
BaseGlyph
The glyph is a base glyph.
public const int BaseGlyph = 2ClassMask
The bits of the class of the glyph.
public const int ClassMask = 14DefaultIgnorable
The character is default ignorable: it has no visible form of its own.
public const int DefaultIgnorable = 1Hidden
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 = 16Ligated
The glyph was put in place of others by a substitution of several glyphs by one.
public const int Ligated = 16LigatureGlyph
The glyph is a ligature.
public const int LigatureGlyph = 4LigatureWithComponents
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 = 64MarkGlyph
The glyph is a mark.
public const int MarkGlyph = 8Multiplied
The glyph is one of several glyphs a substitution put in place of one.
public const int Multiplied = 32Substituted
The glyph was produced by a substitution: it no longer stands for an ignorable character.
public const int Substituted = 8UnsafeToBreak
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 = 32ZeroWidthJoiner
The character is the zero width joiner.
public const int ZeroWidthJoiner = 4ZeroWidthNonJoiner
The character is the zero width non-joiner.
public const int ZeroWidthNonJoiner = 2