• 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

    Class TextOptions

    Provides configuration options for rendering and shaping text.

    Inheritance
    object
    TextOptions
    RichTextOptions
    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

    | Edit this page 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.

    | Edit this page 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

    | Edit this page 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
    | Edit this page 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
    float
    | Edit this page 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>
    | Edit this page 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>
    | Edit this page View Source

    Font

    Gets or sets the font.

    Declaration
    public Font Font { get; set; }
    Property Value
    Type Description
    Font
    | Edit this page 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
    | Edit this page View Source

    HorizontalAlignment

    Gets or sets the horizontal alignment of the text box.

    Declaration
    public HorizontalAlignment HorizontalAlignment { get; set; }
    Property Value
    Type Description
    HorizontalAlignment
    | Edit this page 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
    | Edit this page View Source

    LayoutMode

    Gets or sets the layout mode for the text lines.

    Declaration
    public LayoutMode LayoutMode { get; set; }
    Property Value
    Type Description
    LayoutMode
    | Edit this page 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
    float
    | Edit this page View Source

    Origin

    Gets or sets the rendering origin.

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

    TabWidth

    Gets or sets the width of the tab. Measured as the distance in spaces (U+0020).

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

    If value is -1 then the font default tab width is used.

    | Edit this page 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
    | Edit this page View Source

    TextDirection

    Gets or sets the text direction.

    Declaration
    public TextDirection TextDirection { get; set; }
    Property Value
    Type Description
    TextDirection
    | Edit this page 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
    | Edit this page 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>
    | Edit this page View Source

    VerticalAlignment

    Gets or sets the vertical alignment of the text box.

    Declaration
    public VerticalAlignment VerticalAlignment { get; set; }
    Property Value
    Type Description
    VerticalAlignment
    | Edit this page 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
    | Edit this page View Source

    WrappingLength

    Gets or sets the length in pixel units (px) at which text will automatically wrap onto a new line. This property also affects the width or height (depending on the LayoutMode) of the text box for alignment of text.

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

    If value is -1 then wrapping is disabled.

    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX