Class MTextFormattingOptions
Options for the MText entity text formatting.
Inheritance
Inherited Members
Namespace: netDxf.Entities
Assembly: CADability.dll
Syntax
public class MTextFormattingOptions
Remarks
Old DXF versions might not support all available formatting codes.
Constructors
| Improve this Doc View SourceMTextFormattingOptions()
Initializes a new instance of the MTextFormattingOptions class.
Declaration
public MTextFormattingOptions()
Properties
| Improve this Doc View SourceBold
Gets or sets if the text is bold.
Declaration
public bool Bold { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Remarks
The font style must support bold characters.
CharacterSpaceFactor
Gets or sets the space between characters as a multiple of the original spacing between characters.
Declaration
public double CharacterSpaceFactor { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Double |
Remarks
Valid values range from a minimum of .75 to 4 times the original spacing between characters. Set as 1.0 to apply the default character space factor.
Color
Gets or sets the text color.
Declaration
public AciColor Color { get; set; }
Property Value
| Type | Description |
|---|---|
| AciColor |
Remarks
Set as null to apply the default color defined by the MText entity.
FontName
Gets or sets the font that will override the default defined in the TextStyle.
Declaration
public string FontName { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
Remarks
Set as null or empty to apply the default font.
When using SHX fonts use the font file with the SHX extension,
when using TTF fonts use the font family name.
HeightFactor
Gets or sets the text height as a multiple of the current text height.
Declaration
public double HeightFactor { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Double |
Remarks
Set as 1.0 to apply the default height factor.
Italic
Gets or sets if the text is italic.
Declaration
public bool Italic { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Remarks
The font style must support italic characters.
ObliqueAngle
Gets or sets the obliquing angle in degrees.
Declaration
public double ObliqueAngle { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Double |
Remarks
Set as 0.0 to apply the default obliquing angle.
Overline
Gets or sets the over line.
Declaration
public bool Overline { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
StrikeThrough
Gets or sets strike-through.
Declaration
public bool StrikeThrough { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Subscript
Get or set if the text is subscript.
Declaration
public bool Subscript { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Remarks
The Superscript and Subscript properties are mutually exclusive, if it is set to true the Superscript property will be set to false automatically.
Internally, superscripts and subscripts are written as stacking text (like fractions);
therefore the characters '/' and '#' are reserved if you need to write them you must write '/' and '#' respectively.
Superscript
Get or set if the text is superscript.
Declaration
public bool Superscript { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Remarks
The Superscript and subscript properties are mutually exclusive, if it is set to true the Subscript property will be set to false automatically.
Internally, superscripts and subscripts are written as stacking text (like fractions);
therefore the characters '/' and '#' are reserved if you need to write them you must write '/' and '#' respectively.
SuperSubScriptHeightFactor
Gets or sets the superscript and subscript text height as a multiple of the current text height.
Declaration
public double SuperSubScriptHeightFactor { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Double |
Remarks
By default it is set as 0.7 the current text height.
Underline
Gets or sets underline.
Declaration
public bool Underline { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
WidthFactor
Gets or sets the width factor to produce wide text.
Declaration
public double WidthFactor { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Double |
Remarks
Set as 1.0 to apply the default width factor.