Show / Hide Table of Contents

Class MTextFormattingOptions

Options for the MText entity text formatting.

Inheritance
System.Object
MTextFormattingOptions
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
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 Source

MTextFormattingOptions()

Initializes a new instance of the MTextFormattingOptions class.

Declaration
public MTextFormattingOptions()

Properties

| Improve this Doc View Source

Bold

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

Overline

Gets or sets the over line.

Declaration
public bool Overline { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

StrikeThrough

Gets or sets strike-through.

Declaration
public bool StrikeThrough { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

Underline

Gets or sets underline.

Declaration
public bool Underline { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

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.

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