Class GlyphMetrics
Represents a glyph metric from a particular font face.
Inherited Members
Namespace: SixLabors.Fonts
Assembly: SixLabors.Fonts.dll
Syntax
public abstract class GlyphMetrics
Properties
| Edit this page View SourceAdvanceHeight
Gets the advance height for vertical layout, expressed in font units.
Declaration
public ushort AdvanceHeight { get; }
Property Value
Type | Description |
---|---|
ushort |
AdvanceWidth
Gets the advance width for horizontal layout, expressed in font units.
Declaration
public ushort AdvanceWidth { get; }
Property Value
Type | Description |
---|---|
ushort |
BottomSideBearing
Gets the bottom side bearing for vertical layout, expressed in font units.
Declaration
public short BottomSideBearing { get; }
Property Value
Type | Description |
---|---|
short |
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 |
---|---|
GlyphColor? |
GlyphId
Gets the id of the glyph within the font tables.
Declaration
public ushort GlyphId { get; }
Property Value
Type | Description |
---|---|
ushort |
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 |
---|---|
float |
LeftSideBearing
Gets the left side bearing for horizontal layout, expressed in font units.
Declaration
public short LeftSideBearing { get; }
Property Value
Type | Description |
---|---|
short |
RightSideBearing
Gets the right side bearing for horizontal layout, expressed in font units.
Declaration
public short RightSideBearing { get; }
Property Value
Type | Description |
---|---|
short |
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 |
---|---|
short |
UnitsPerEm
Gets the number of font units per EM square for this face.
Declaration
public ushort UnitsPerEm { get; }
Property Value
Type | Description |
---|---|
ushort |
Width
Gets the width, expressed in font units.
Declaration
public float Width { get; }
Property Value
Type | Description |
---|---|
float |
Methods
| Edit this page 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 |
---|---|
bool | The bool. |