Class GlyphMetrics
Represents a glyph metric from a particular font face.
Namespace: SixLabors.Fonts
Assembly: SixLabors.Fonts.dll
Syntax
public abstract class GlyphMetrics : object
Properties
| Improve this Doc View SourceAdvanceHeight
Gets the advance height for vertical layout, expressed in font units.
Declaration
public ushort AdvanceHeight { get; }
Property Value
Type | Description |
---|---|
UInt16 |
AdvanceWidth
Gets the advance width for horizontal layout, expressed in font units.
Declaration
public ushort AdvanceWidth { get; }
Property Value
Type | Description |
---|---|
UInt16 |
BottomSideBearing
Gets the bottom side bearing for vertical layout, expressed in font units.
Declaration
public short BottomSideBearing { get; }
Property Value
Type | Description |
---|---|
Int16 |
CodePoint
Gets the Unicode codepoint of the glyph.
Declaration
public CodePoint CodePoint { get; }
Property Value
Type | Description |
---|---|
CodePoint |
GlyphColor
Declaration
public GlyphColor? GlyphColor { get; }
Property Value
Type | Description |
---|---|
Nullable<GlyphColor> |
GlyphId
Gets the id of the glyph within the font tables.
Declaration
public ushort GlyphId { get; }
Property Value
Type | Description |
---|---|
UInt16 |
GlyphType
Gets the glyph type.
Declaration
public GlyphType GlyphType { get; }
Property Value
Type | Description |
---|---|
GlyphType |
Height
Gets the height, expressed in font units.
Declaration
public float Height { get; }
Property Value
Type | Description |
---|---|
Single |
LeftSideBearing
Gets the left side bearing for horizontal layout, expressed in font units.
Declaration
public short LeftSideBearing { get; }
Property Value
Type | Description |
---|---|
Int16 |
RightSideBearing
Gets the right side bearing for horizontal layout, expressed in font units.
Declaration
public short RightSideBearing { get; }
Property Value
Type | Description |
---|---|
Int16 |
ScaleFactor
Gets the scale factor that is applied to all glyphs in this face. Normally calculated as 72 * UnitsPerEm so that 1pt = 1px unless the glyph has TextAttributes that apply scaling adjustment.
Declaration
public Vector2 ScaleFactor { get; }
Property Value
Type | Description |
---|---|
Vector2 |
TextAttributes
Gets the text attributes applied to the glyph.
Declaration
public TextAttributes TextAttributes { get; }
Property Value
Type | Description |
---|---|
TextAttributes |
TextDecorations
Gets the text decorations applied to the glyph.
Declaration
public TextDecorations TextDecorations { get; }
Property Value
Type | Description |
---|---|
TextDecorations |
TopSideBearing
Gets the top side bearing for vertical layout, expressed in font units.
Declaration
public short TopSideBearing { get; }
Property Value
Type | Description |
---|---|
Int16 |
UnitsPerEm
Gets the number of font units per EM square for this face.
Declaration
public ushort UnitsPerEm { get; }
Property Value
Type | Description |
---|---|
UInt16 |
Width
Gets the width, expressed in font units.
Declaration
public float Width { get; }
Property Value
Type | Description |
---|---|
Single |
Methods
| Improve this Doc View SourceShouldSkipGlyphRendering(CodePoint)
Gets a value indicating whether the specified code point should be skipped when rendering.
Declaration
protected static bool ShouldSkipGlyphRendering(CodePoint codePoint)
Parameters
Type | Name | Description |
---|---|---|
CodePoint | codePoint | The code point. |
Returns
Type | Description |
---|---|
Boolean | The |