Class RichTextOptions
Rich-text layout options for Graphics.DrawRichText and
Graphics.MeasureRichText. Carries a list of
RichTextRun segments and default font properties.
Inherited Members
Namespace: DRIT.Drawing.Text
Assembly: DRIT.Drawing.dll
Syntax
public sealed class RichTextOptions
Constructors
RichTextOptions(FontFamily, float, FontStyle)
Initializes a new RichTextOptions with the specified default font family, size, and style.
Declaration
public RichTextOptions(FontFamily family, float emSize, FontStyle style = FontStyle.Regular)
Parameters
| Type | Name | Description |
|---|---|---|
| FontFamily | family | |
| float | emSize | |
| FontStyle | style |
Properties
EmSize
Default em size for runs without a EmSize override.
Declaration
public float EmSize { get; }
Property Value
| Type | Description |
|---|---|
| float |
Fallback
Fallback font chain override for this rich-text operation, or null to use FontFallback (or the system default).
Declaration
public FontFallbackChain? Fallback { get; set; }
Property Value
| Type | Description |
|---|---|
| FontFallbackChain |
FontFamily
Default font family for runs without a FontFamily override.
Declaration
public FontFamily FontFamily { get; }
Property Value
| Type | Description |
|---|---|
| FontFamily |
FontStyle
Default font style for runs without a FontStyle override.
Declaration
public FontStyle FontStyle { get; }
Property Value
| Type | Description |
|---|---|
| FontStyle |
Runs
Rich text runs. Characters not covered by any run use the default
font/size/style. Runs may overlap; later runs win for overlapping
ranges (matches ImageSharp RichTextOptions.Runs semantics).
Declaration
public IList<RichTextRun> Runs { get; }
Property Value
| Type | Description |
|---|---|
| IList<RichTextRun> |
Unit
Declaration
public GraphicsUnit Unit { get; set; }
Property Value
| Type | Description |
|---|---|
| GraphicsUnit |