Class GlyphInstance
A glyph from a particular font face.
Inherited Members
Namespace: SixLabors.Fonts
Assembly: SixLabors.Fonts.dll
Syntax
public class GlyphInstance
Properties
| Improve this Doc View SourceAdvanceWidth
Gets the width of the advance.
Declaration
public ushort AdvanceWidth { get; }
Property Value
| Type | Description |
|---|---|
| UInt16 | The width of the advance. |
ControlPoints
Gets the points defining the shape of this glyph
Declaration
public Vector2[] ControlPoints { get; }
Property Value
| Type | Description |
|---|---|
| Vector2[] |
EndPoints
Gets the end points
Declaration
public ushort[] EndPoints { get; }
Property Value
| Type | Description |
|---|---|
| UInt16[] |
GlyphColor
Gets the color of this glyph
Declaration
public GlyphColor? GlyphColor { get; }
Property Value
| Type | Description |
|---|---|
| Nullable<GlyphColor> |
GlyphType
Gets a value indicating the type of glyph instance this is.
Declaration
public GlyphType GlyphType { get; }
Property Value
| Type | Description |
|---|---|
| GlyphType | The type of this glyph |
Height
Gets the height.
Declaration
public float Height { get; }
Property Value
| Type | Description |
|---|---|
| Single | The height. |
LeftSideBearing
Gets the distance from the bounding box start
Declaration
public short LeftSideBearing { get; }
Property Value
| Type | Description |
|---|---|
| Int16 |
OnCurves
Gets wether or not the corresponding control point is on a curve
Declaration
public bool[] OnCurves { get; }
Property Value
| Type | Description |
|---|---|
| Boolean[] |
ScaleFactor
Gets the scale factor that is applied to the glyph
Declaration
public float ScaleFactor { get; }
Property Value
| Type | Description |
|---|---|
| Single |
SizeOfEm
Gets the size of the EM
Declaration
public ushort SizeOfEm { get; }
Property Value
| Type | Description |
|---|---|
| UInt16 |
Methods
| Improve this Doc View SourceRenderTo(IGlyphRenderer, Single, Vector2, Vector2, Single)
Renders the glyph to the render surface in font units relative to a bottom left origin at (0,0)
Declaration
public void RenderTo(IGlyphRenderer surface, float pointSize, Vector2 location, Vector2 dpi, float lineHeight)
Parameters
| Type | Name | Description |
|---|---|---|
| IGlyphRenderer | surface | The surface. |
| Single | pointSize | Size of the point. |
| Vector2 | location | The location. |
| Vector2 | dpi | The dpi. |
| Single | lineHeight | The lineHeight the current glyph was draw agains to offset topLeft while calling out to IGlyphRenderer. |
Exceptions
| Type | Condition |
|---|---|
| NotSupportedException | Too many control points |