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

NameTypeAccessDescription
NamestringRead/WriteGets or sets the name of the font.
NameAsciistringRead/WriteReturns or sets the font used for Latin text (characters with character codes from 0 (zero) through 127).
NameBistringRead/WriteReturns or sets the name of the font in a right-to-left language document.
NameFarEaststringRead/WriteReturns or sets an East Asian font name.
NameOtherstringRead/WriteReturns or sets the font used for characters with character codes from 128 through 255.
ThemeFontThemeFontRead/WriteGets or sets the theme font in the applied font scheme that is associated with this Font object.
ThemeFontAsciiThemeFontRead/WriteGets 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.
ThemeFontFarEastThemeFontRead/WriteGets or sets the East Asian theme font in the applied font scheme that is associated with this Font object.
ThemeFontOtherThemeFontRead/WriteGets 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.
ThemeFontBiThemeFontRead/WriteGets or sets the theme font in the applied font scheme that is associated with this Font object in a right-to-left language document.
SizedoubleRead/WriteGets or sets the font size in points.
SizeBidoubleRead/WriteGets or sets the font size in points used in a right-to-left document.
BoldboolRead/WriteTrue if the font is formatted as bold.
BoldBiboolRead/WriteTrue if the right-to-left text is formatted as bold.
ItalicboolRead/WriteTrue if the font is formatted as italic.
ItalicBiboolRead/WriteTrue if the right-to-left text is formatted as italic.
ColorSystem.Drawing.ColorRead/WriteGets or sets the color of the font.
ThemeColorThemeColorRead/WriteGets or sets the theme color in the applied color scheme that is associated with this Font object.
TintAndShadedoubleRead/WriteGets or sets a double value that lightens or darkens a color.
AutoColorColorReadReturns the present calculated color of the text (black or white) to be used for ‘auto color’.
StrikeThroughboolRead/WriteTrue if the font is formatted as strikethrough text.
DoubleStrikeThroughboolRead/WriteTrue if the font is formatted as double strikethrough text.
ShadowboolRead/WriteTrue if the font is formatted as shadowed.
OutlineboolRead/WriteTrue if the font is formatted as outline.
EmbossboolRead/WriteTrue if the font is formatted as embossed.
EngraveboolRead/WriteTrue if the font is formatted as engraved.
SuperscriptboolRead/WriteTrue if the font is formatted as superscript.
SubscriptboolRead/WriteTrue if the font is formatted as subscript.
SmallCapsboolRead/WriteTrue if the font is formatted as small capital letters.
AllCapsboolRead/WriteTrue if the font is formatted as all capital letters.
HiddenboolRead/WriteTrue if the font is formatted as hidden text.
UnderlineUnderlineRead/WriteGets or sets the type of underline applied to the font.
UnderlineColorSystem.Drawing.ColorRead/WriteGets or sets the color of the underline applied to the font.
NumberSpacingNumSpacingRead/WriteGets or sets the spacing type of the numeral being displayed.
ScalingintRead/WriteGets or sets character width scaling in percent.
SpacingdoubleRead/WriteReturns or sets the spacing (in points) between characters .
LineSpacingdoubleReadReturns line spacing of this font (in points).
PositiondoubleRead/WriteGets or sets the position of text (in points) relative to the base line.
KerningdoubleRead/WriteGets or sets the font size at which kerning starts.
HighlightColorSystem.Drawing.ColorRead/WriteGets or sets the highlight (marker) color.
TextEffectTextEffectRead/WriteGets or sets the font animation effect.
FillFillReadGets fill formatting for the Font.
BidiboolRead/WriteSpecifies whether the contents of this run shall have right-to-left characteristics.
ComplexScriptboolRead/WriteSpecifies 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.
NoProofingboolRead/WriteTrue when the formatted characters are not to be spell checked.
LocaleIdintRead/WriteGets or sets the locale identifier (language) of the formatted characters.
LocaleIdBiintRead/WriteGets or sets the locale identifier (language) of the formatted right-to-left characters.
LocaleIdFarEastintRead/WriteGets or sets the locale identifier (language) of the formatted Asian characters.
BorderBorderReadReturns a Border object that specifies border for the font.
ShadingShadingReadReturns a Shading object that refers to the shading formatting for the font.
StyleStyleRead/WriteGets or sets the character style applied to this formatting.
StyleNamestringRead/WriteGets or sets the name of the character style applied to this formatting.
StyleIdentifierStyleIdentifierRead/WriteGets or sets the locale independent style identifier of the character style applied to this formatting.
SnapToGridboolRead/WriteSpecifies whether the current font should use the document grid characters per line settings when laying out.
EmphasisMarkEmphasisMarkRead/WriteGets or sets the emphasis mark applied to this formatting.

Methods

SignatureDescription
ClearFormatting()Resets to default font formatting.
HasDmlEffect(dmlEffectType: TextDmlEffect)Checks if particular DrawingML text effect is applied.

See Also