Class TextOptions
Options for influencing text parts of the drawing functions.
Namespace: SixLabors.ImageSharp.Drawing.Processing
Assembly: SixLabors.ImageSharp.Drawing.dll
Syntax
public class TextOptions : IDeepCloneable<TextOptions>
Constructors
| Improve this Doc View SourceTextOptions()
Initializes a new instance of the TextOptions class.
Declaration
public TextOptions()
Properties
| Improve this Doc View SourceApplyKerning
Gets or sets a value indicating whether the text should be drawing with kerning enabled. Defaults to true;
Declaration
public bool ApplyKerning { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
DpiX
Gets or sets a value indicating the DPI (Dots Per Inch) to render text along the X axis. Defaults to 72.
Declaration
public float DpiX { get; set; }
Property Value
Type | Description |
---|---|
Single |
DpiY
Gets or sets a value indicating the DPI (Dots Per Inch) to render text along the Y axis. Defaults to 72.
Declaration
public float DpiY { get; set; }
Property Value
Type | Description |
---|---|
Single |
FallbackFonts
Gets the list of fallback font families to apply to the text drawing operation.
Defaults to
Declaration
public List<FontFamily> FallbackFonts { get; }
Property Value
Type | Description |
---|---|
List<FontFamily> |
HorizontalAlignment
Gets or sets a value indicating how to align the text relative to the rendering space.
If WrapTextWidth is greater than zero it will align relative to the space
defined by the location and width, if WrapTextWidth equals zero, and thus
wrapping disabled, then the alignment is relative to the drawing location.
Defaults to
Declaration
public HorizontalAlignment HorizontalAlignment { get; set; }
Property Value
Type | Description |
---|---|
HorizontalAlignment |
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 |
RenderColorFonts
Gets or sets a value indicating whether we should render color(emoji) fonts. Defaults to true.
Declaration
public bool RenderColorFonts { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
TabWidth
Gets or sets a value indicating the number of space widths a tab should lock to. Defaults to 4.
Declaration
public float TabWidth { get; set; }
Property Value
Type | Description |
---|---|
Single |
VerticalAlignment
Gets or sets a value indicating how to align the text relative to the rendering space.
Defaults to
Declaration
public VerticalAlignment VerticalAlignment { get; set; }
Property Value
Type | Description |
---|---|
VerticalAlignment |
WrapTextWidth
Gets or sets a value, if greater than 0, indicating the width at which text should wrap. Defaults to 0.
Declaration
public float WrapTextWidth { get; set; }
Property Value
Type | Description |
---|---|
Single |
Methods
| Improve this Doc View SourceDeepClone()
Declaration
public TextOptions DeepClone()
Returns
Type | Description |
---|---|
TextOptions |