• 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
      • GlyphMetrics
      • GlyphMissingException
      • GlyphRendererParameters
      • GlyphType
      • HintingMode
      • HorizontalAlignment
      • IColorGlyphRenderer
      • IFontCollection
      • IGlyphDecorationRenderer
      • IGlyphRenderer
      • IGlyphRendererExtensions
      • InvalidFontFileException
      • InvalidFontTableException
      • IReadOnlyFontCollection
      • IReadOnlySystemFontCollection
      • KerningMode
      • LayoutMode
      • MissingFontTableException
      • SystemFonts
      • TextAlignment
      • TextAttributes
      • TextDecorations
      • TextDirection
      • TextJustification
      • TextMeasurer
      • TextOptions
      • TextRenderer
      • TextRun
      • VerticalAlignment
      • WordBreaking
    • SixLabors.Fonts.Tables.AdvancedTypographic
      • FeatureTags
      • GlyphClassDef
      • Tag
    • SixLabors.Fonts.Tables.TrueType
      • TrueTypeGlyphMetrics
    • SixLabors.Fonts.Tables.TrueType.Glyphs
      • GlyphOutline
    • SixLabors.Fonts.Unicode
      • BidiCharacterType
      • BidiClass
      • BidiPairedBracketType
      • CodePoint
      • GraphemeClusterClass
      • JoiningClass
      • JoiningGroup
      • JoiningType
      • LineBreakClass
      • MemoryExtensions
      • ScriptClass
      • SpanCodePointEnumerator
      • SpanGraphemeEnumerator
    • SixLabors.Fonts.WellKnownIds
      • KnownNameIds

    Class TextOptions

    Provides configuration options for rendering and shaping text.

    Inheritance
    Object
    TextOptions
    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 TextOptions

    Constructors

    | Improve this Doc View Source

    TextOptions(Font)

    Initializes a new instance of the TextOptions class.

    Declaration
    public TextOptions(Font font)
    Parameters
    Type Name Description
    Font font

    The font.

    | Improve this Doc View Source

    TextOptions(TextOptions)

    Initializes a new instance of the TextOptions class from properties copied from the given instance.

    Declaration
    public TextOptions(TextOptions options)
    Parameters
    Type Name Description
    TextOptions options

    The options whose properties are copied into this instance.

    Properties

    | Improve this Doc View Source

    ColorFontSupport

    Gets or sets a value indicating whether to enable various color font formats.

    Declaration
    public ColorFontSupport ColorFontSupport { get; set; }
    Property Value
    Type Description
    ColorFontSupport
    | Improve this Doc View Source

    Dpi

    Gets or sets the DPI (Dots Per Inch) to render/measure the text at.

    Defaults to 72.

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

    FallbackFontFamilies

    Gets or sets the collection of fallback font families to use when a specific glyph is missing from Font.

    Declaration
    public IReadOnlyList<FontFamily> FallbackFontFamilies { get; set; }
    Property Value
    Type Description
    IReadOnlyList<FontFamily>
    | Improve this Doc View Source

    FeatureTags

    Gets or sets the collection of additional feature tags to apply during glyph shaping.

    Declaration
    public IReadOnlyList<Tag> FeatureTags { get; set; }
    Property Value
    Type Description
    IReadOnlyList<Tag>
    | Improve this Doc View Source

    Font

    Gets or sets the font.

    Declaration
    public Font Font { get; set; }
    Property Value
    Type Description
    Font
    | Improve this Doc View Source

    HintingMode

    Gets or sets a value indicating whether to apply hinting - The use of mathematical instructions to adjust the display of an outline font so that it lines up with a rasterized grid.

    Declaration
    public HintingMode HintingMode { get; set; }
    Property Value
    Type Description
    HintingMode
    | Improve this Doc View Source

    HorizontalAlignment

    Gets or sets the horizontal alignment of the text box.

    Declaration
    public HorizontalAlignment HorizontalAlignment { get; set; }
    Property Value
    Type Description
    HorizontalAlignment
    | Improve this Doc View Source

    KerningMode

    Gets or sets the kerning mode indicating whether to apply kerning (character spacing adjustments) to the glyph positions from information found within the font.

    Declaration
    public KerningMode KerningMode { get; set; }
    Property Value
    Type Description
    KerningMode
    | Improve this Doc View Source

    LayoutMode

    Gets or sets the layout mode for the text lines.

    Declaration
    public LayoutMode LayoutMode { get; set; }
    Property Value
    Type Description
    LayoutMode
    | Improve this Doc View Source

    LineSpacing

    Gets or sets the line spacing. Applied as a multiple of the line height.

    Defaults to 1.

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

    Origin

    Gets or sets the rendering origin.

    Declaration
    public Vector2 Origin { get; set; }
    Property Value
    Type Description
    Vector2
    | Improve this Doc View Source

    TabWidth

    Gets or sets the width of the tab. Measured as the distance in spaces.

    Defaults to 4.

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

    TextAlignment

    Gets or sets the text alignment of the text within the box.

    Declaration
    public TextAlignment TextAlignment { get; set; }
    Property Value
    Type Description
    TextAlignment
    | Improve this Doc View Source

    TextDirection

    Gets or sets the text direction.

    Declaration
    public TextDirection TextDirection { get; set; }
    Property Value
    Type Description
    TextDirection
    | Improve this Doc View Source

    TextJustification

    Gets or sets the justification of the text within the box.

    Declaration
    public TextJustification TextJustification { get; set; }
    Property Value
    Type Description
    TextJustification
    | Improve this Doc View Source

    TextRuns

    Gets or sets an optional collection of text runs to apply to the body of text.

    Declaration
    public IReadOnlyList<TextRun> TextRuns { get; set; }
    Property Value
    Type Description
    IReadOnlyList<TextRun>
    | Improve this Doc View Source

    VerticalAlignment

    Gets or sets the vertical alignment of the text box.

    Declaration
    public VerticalAlignment VerticalAlignment { get; set; }
    Property Value
    Type Description
    VerticalAlignment
    | Improve this Doc View Source

    WordBreaking

    Gets or sets the word breaking mode to use when wrapping text.

    Declaration
    public WordBreaking WordBreaking { get; set; }
    Property Value
    Type Description
    WordBreaking
    | Improve this Doc View Source

    WrappingLength

    Gets or sets the length relative to the current DPI at which text will automatically wrap onto a newline.

    Declaration
    public float WrappingLength { get; set; }
    Property Value
    Type Description
    Single
    Remarks

    If value is -1 then wrapping is disabled.

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