• Articles
  • API Documentation
Search Results for

    Show / Hide Table of Contents
    • SixLabors.Fonts
      • ColorFontSupport
      • Font
      • FontCollection
      • FontDescription
      • FontFamily
      • FontFamilyCollectionExtensions
      • FontInstance
      • FontRectangle
      • FontStyle
      • Glyph
      • GlyphColor
      • GlyphInstance
      • GlyphMetric
      • GlyphRendererParameters
      • GlyphType
      • HorizontalAlignment
      • IColorGlyphRenderer
      • IFontCollection
      • IFontInstance
      • IGlyphRenderer
      • IGlyphRendererExtensions
      • IReadOnlyFontCollection
      • IReadonlyFontCollectionExtensions
      • RendererOptions
      • SystemFonts
      • TextMeasurer
      • TextRenderer
      • VerticalAlignment
    • SixLabors.Fonts.Exceptions
      • FontException
      • FontFamilyNotFoundException
      • GlyphMissingException
      • InvalidFontFileException
      • InvalidFontTableException
      • MissingFontTableException

    Class GlyphInstance

    A glyph from a particular font face.

    Inheritance
    Object
    GlyphInstance
    Inherited Members
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Object.ReferenceEquals(Object, Object)
    Object.ToString()
    Namespace: SixLabors.Fonts
    Assembly: SixLabors.Fonts.dll
    Syntax
    public class GlyphInstance

    Properties

    | Improve this Doc View Source

    AdvanceWidth

    Gets the width of the advance.

    Declaration
    public ushort AdvanceWidth { get; }
    Property Value
    Type Description
    UInt16

    The width of the advance.

    | Improve this Doc View Source

    ControlPoints

    Gets the points defining the shape of this glyph

    Declaration
    public Vector2[] ControlPoints { get; }
    Property Value
    Type Description
    Vector2[]
    | Improve this Doc View Source

    EndPoints

    Gets the end points

    Declaration
    public ushort[] EndPoints { get; }
    Property Value
    Type Description
    UInt16[]
    | Improve this Doc View Source

    GlyphColor

    Gets the color of this glyph

    Declaration
    public GlyphColor? GlyphColor { get; }
    Property Value
    Type Description
    Nullable<GlyphColor>

    The color of the glyph when the GlyphType is ColrLayer

    | Improve this Doc View Source

    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

    | Improve this Doc View Source

    Height

    Gets the height.

    Declaration
    public float Height { get; }
    Property Value
    Type Description
    Single

    The height.

    | Improve this Doc View Source

    LeftSideBearing

    Gets the distance from the bounding box start

    Declaration
    public short LeftSideBearing { get; }
    Property Value
    Type Description
    Int16
    | Improve this Doc View Source

    OnCurves

    Gets wether or not the corresponding control point is on a curve

    Declaration
    public bool[] OnCurves { get; }
    Property Value
    Type Description
    Boolean[]
    | Improve this Doc View Source

    ScaleFactor

    Gets the scale factor that is applied to the glyph

    Declaration
    public float ScaleFactor { get; }
    Property Value
    Type Description
    Single
    | Improve this Doc View Source

    SizeOfEm

    Gets the size of the EM

    Declaration
    public ushort SizeOfEm { get; }
    Property Value
    Type Description
    UInt16

    Methods

    | Improve this Doc View Source

    RenderTo(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

    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX