• Articles
  • API Documentation
Search Results for

    Show / Hide Table of Contents
    • SixLabors.Fonts
      • ColorFontSupport
      • Font
      • FontCollection
      • FontCollectionExtensions
      • FontDescription
      • FontException
      • FontFamily
      • FontFamilyNotFoundException
      • FontMetrics
      • FontRectangle
      • FontStyle
      • Glyph
      • GlyphBounds
      • GlyphColor
      • GlyphLayoutMode
      • GlyphMetrics
      • GlyphMissingException
      • GlyphRendererParameters
      • GlyphType
      • HintingMode
      • HorizontalAlignment
      • HorizontalMetrics
      • IColorGlyphRenderer
      • IFontCollection
      • IGlyphRenderer
      • IGlyphRendererExtensions
      • IMetricsHeader
      • IReadOnlyFontCollection
      • IReadOnlySystemFontCollection
      • InvalidFontFileException
      • InvalidFontTableException
      • KerningMode
      • LayoutMode
      • LayoutModeExtensions
      • MissingFontTableException
      • SystemFonts
      • TextAlignment
      • TextAttributes
      • TextDecorations
      • TextDirection
      • TextJustification
      • TextMeasurer
      • TextOptions
      • TextRenderer
      • TextRun
      • VerticalAlignment
      • VerticalMetrics
      • WordBreaking
    • SixLabors.Fonts.Tables.AdvancedTypographic
      • FeatureTags
      • GlyphClassDef
      • Tag
    • SixLabors.Fonts.Tables.TrueType
      • TrueTypeGlyphMetrics
    • SixLabors.Fonts.Unicode
      • ArabicJoiningClass
      • ArabicJoiningGroup
      • ArabicJoiningType
      • BidiCharacterType
      • BidiClass
      • BidiPairedBracketType
      • CodePoint
      • GraphemeClusterClass
      • IndicPositionalCategory
      • IndicSyllabicCategory
      • LineBreakClass
      • MemoryExtensions
      • ScriptClass
      • SpanCodePointEnumerator
      • SpanGraphemeEnumerator
      • VerticalOrientationType
    • SixLabors.Fonts.WellKnownIds
      • KnownNameIds

    Interface IGlyphRenderer

    A surface that can have a glyph rendered to it as a series of actions.

    Namespace: SixLabors.Fonts
    Assembly: SixLabors.Fonts.dll
    Syntax
    public interface IGlyphRenderer

    Methods

    | Edit this page View Source

    BeginFigure()

    Begins the figure.

    Declaration
    void BeginFigure()
    | Edit this page View Source

    BeginGlyph(in FontRectangle, in GlyphRendererParameters)

    Begins the glyph.

    Declaration
    bool BeginGlyph(in FontRectangle bounds, in GlyphRendererParameters parameters)
    Parameters
    Type Name Description
    FontRectangle bounds

    The bounds the glyph will be rendered at and at what size.

    GlyphRendererParameters parameters

    The set of parameters that uniquely represents a version of a glyph in at particular font size, font family, font style and DPI.

    Returns
    Type Description
    bool

    Returns true if the glyph should be rendered otherwise it returns false.

    | Edit this page View Source

    BeginText(in FontRectangle)

    Called before any glyphs have been rendered.

    Declaration
    void BeginText(in FontRectangle bounds)
    Parameters
    Type Name Description
    FontRectangle bounds

    The rectangle within the text will be rendered.

    | Edit this page View Source

    CubicBezierTo(Vector2, Vector2, Vector2)

    Draw a cubic bezier curve connecting the previous point to point.

    Declaration
    void CubicBezierTo(Vector2 secondControlPoint, Vector2 thirdControlPoint, Vector2 point)
    Parameters
    Type Name Description
    Vector2 secondControlPoint

    The second control point.

    Vector2 thirdControlPoint

    The third control point.

    Vector2 point

    The point.

    | Edit this page View Source

    EnabledDecorations()

    Provides a callback to enable custom logic to request decoration details. A custom TextRun might use alternative triggers to determine what decorations it needs access to.

    Declaration
    TextDecorations EnabledDecorations()
    Returns
    Type Description
    TextDecorations

    The text decorations the render wants render info for.

    | Edit this page View Source

    EndFigure()

    Ends the figure.

    Declaration
    void EndFigure()
    | Edit this page View Source

    EndGlyph()

    Ends the glyph.

    Declaration
    void EndGlyph()
    | Edit this page View Source

    EndText()

    Called once all glyphs have completed rendering.

    Declaration
    void EndText()
    | Edit this page View Source

    LineTo(Vector2)

    Draw a straight line connecting the previous point to point.

    Declaration
    void LineTo(Vector2 point)
    Parameters
    Type Name Description
    Vector2 point

    The point.

    | Edit this page View Source

    MoveTo(Vector2)

    Sets a new start point to draw lines from.

    Declaration
    void MoveTo(Vector2 point)
    Parameters
    Type Name Description
    Vector2 point

    The point.

    | Edit this page View Source

    QuadraticBezierTo(Vector2, Vector2)

    Draw a quadratic bezier curve connecting the previous point to point.

    Declaration
    void QuadraticBezierTo(Vector2 secondControlPoint, Vector2 point)
    Parameters
    Type Name Description
    Vector2 secondControlPoint

    The second control point.

    Vector2 point

    The point.

    | Edit this page View Source

    SetDecoration(TextDecorations, Vector2, Vector2, float)

    Provides the positions required for drawing text decorations onto the IGlyphRenderer

    Declaration
    void SetDecoration(TextDecorations textDecorations, Vector2 start, Vector2 end, float thickness)
    Parameters
    Type Name Description
    TextDecorations textDecorations

    The type of decoration these details correspond to.

    Vector2 start

    The start position from where to draw the decorations from.

    Vector2 end

    The end position from where to draw the decorations to.

    float thickness

    The thickness to draw the decoration.

    Extension Methods

    IGlyphRendererExtensions.Render(IGlyphRenderer, ReadOnlySpan<char>, TextOptions)
    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX