Font
Overview
Font is a class in Aspose.Words FOSS for .NET.
Inherits from: IBorderAttrSource, IShadingAttrSource, IFillable.
Contains font attributes (font name, font size, color, and so on) for an object.
This class provides 2 methods for working with Font objects in .NET programs.
Available methods include: ClearFormatting, HasDmlEffect.
All public members are accessible to any .NET application after installing the Aspose.Words FOSS for .NET package.
Properties: AllCaps, AutoColor, Bidi, Bold, BoldBi, Border, and 49 more.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
Name | string | Read/Write | Gets or sets the name of the font. |
NameAscii | string | Read/Write | Returns or sets the font used for Latin text (characters with character codes from 0 (zero) through 127). |
NameBi | string | Read/Write | Returns or sets the name of the font in a right-to-left language document. |
NameFarEast | string | Read/Write | Returns or sets an East Asian font name. |
NameOther | string | Read/Write | Returns or sets the font used for characters with character codes from 128 through 255. |
ThemeFont | ThemeFont | Read/Write | Gets or sets the theme font in the applied font scheme that is associated with this Font object. |
ThemeFontAscii | ThemeFont | Read/Write | Gets or sets the theme font used for Latin text (characters with character codes from 0 (zero) through 127) in the applied font scheme that is associated with this Font object. |
ThemeFontFarEast | ThemeFont | Read/Write | Gets or sets the East Asian theme font in the applied font scheme that is associated with this Font object. |
ThemeFontOther | ThemeFont | Read/Write | Gets or sets the theme font used for characters with character codes from 128 through 255 in the applied font scheme that is associated with this Font object. |
ThemeFontBi | ThemeFont | Read/Write | Gets or sets the theme font in the applied font scheme that is associated with this Font object in a right-to-left language document. |
Size | double | Read/Write | Gets or sets the font size in points. |
SizeBi | double | Read/Write | Gets or sets the font size in points used in a right-to-left document. |
Bold | bool | Read/Write | True if the font is formatted as bold. |
BoldBi | bool | Read/Write | True if the right-to-left text is formatted as bold. |
Italic | bool | Read/Write | True if the font is formatted as italic. |
ItalicBi | bool | Read/Write | True if the right-to-left text is formatted as italic. |
Color | System.Drawing.Color | Read/Write | Gets or sets the color of the font. |
ThemeColor | ThemeColor | Read/Write | Gets or sets the theme color in the applied color scheme that is associated with this Font object. |
TintAndShade | double | Read/Write | Gets or sets a double value that lightens or darkens a color. |
AutoColor | Color | Read | Returns the present calculated color of the text (black or white) to be used for ‘auto color’. |
StrikeThrough | bool | Read/Write | True if the font is formatted as strikethrough text. |
DoubleStrikeThrough | bool | Read/Write | True if the font is formatted as double strikethrough text. |
Shadow | bool | Read/Write | True if the font is formatted as shadowed. |
Outline | bool | Read/Write | True if the font is formatted as outline. |
Emboss | bool | Read/Write | True if the font is formatted as embossed. |
Engrave | bool | Read/Write | True if the font is formatted as engraved. |
Superscript | bool | Read/Write | True if the font is formatted as superscript. |
Subscript | bool | Read/Write | True if the font is formatted as subscript. |
SmallCaps | bool | Read/Write | True if the font is formatted as small capital letters. |
AllCaps | bool | Read/Write | True if the font is formatted as all capital letters. |
Hidden | bool | Read/Write | True if the font is formatted as hidden text. |
Underline | Underline | Read/Write | Gets or sets the type of underline applied to the font. |
UnderlineColor | System.Drawing.Color | Read/Write | Gets or sets the color of the underline applied to the font. |
NumberSpacing | NumSpacing | Read/Write | Gets or sets the spacing type of the numeral being displayed. |
Scaling | int | Read/Write | Gets or sets character width scaling in percent. |
Spacing | double | Read/Write | Returns or sets the spacing (in points) between characters . |
LineSpacing | double | Read | Returns line spacing of this font (in points). |
Position | double | Read/Write | Gets or sets the position of text (in points) relative to the base line. |
Kerning | double | Read/Write | Gets or sets the font size at which kerning starts. |
HighlightColor | System.Drawing.Color | Read/Write | Gets or sets the highlight (marker) color. |
TextEffect | TextEffect | Read/Write | Gets or sets the font animation effect. |
Fill | Fill | Read | Gets fill formatting for the Font. |
Bidi | bool | Read/Write | Specifies whether the contents of this run shall have right-to-left characteristics. |
ComplexScript | bool | Read/Write | Specifies whether the contents of this run shall be treated as complex script text regardless of their Unicode character values when determining the formatting for this run. |
NoProofing | bool | Read/Write | True when the formatted characters are not to be spell checked. |
LocaleId | int | Read/Write | Gets or sets the locale identifier (language) of the formatted characters. |
LocaleIdBi | int | Read/Write | Gets or sets the locale identifier (language) of the formatted right-to-left characters. |
LocaleIdFarEast | int | Read/Write | Gets or sets the locale identifier (language) of the formatted Asian characters. |
Border | Border | Read | Returns a Border object that specifies border for the font. |
Shading | Shading | Read | Returns a Shading object that refers to the shading formatting for the font. |
Style | Style | Read/Write | Gets or sets the character style applied to this formatting. |
StyleName | string | Read/Write | Gets or sets the name of the character style applied to this formatting. |
StyleIdentifier | StyleIdentifier | Read/Write | Gets or sets the locale independent style identifier of the character style applied to this formatting. |
SnapToGrid | bool | Read/Write | Specifies whether the current font should use the document grid characters per line settings when laying out. |
EmphasisMark | EmphasisMark | Read/Write | Gets or sets the emphasis mark applied to this formatting. |
Methods
| Signature | Description |
|---|---|
ClearFormatting() | Resets to default font formatting. |
HasDmlEffect(dmlEffectType: TextDmlEffect) | Checks if particular DrawingML text effect is applied. |