Font

Font class

Encapsulates the font object used in a spreadsheet.

Properties

NameTypeDescription
CharsetNumberRepresent the character set.
IsItalicbooleanGets or sets a value indicating whether the font is italic.
IsBoldbooleanGets or sets a value indicating whether the font is bold.
CapsTypeNumberGets and sets the text caps type. The value of the property is TextCapsType integer constant.
StrikeTypeNumberGets the strike type of the text. The value of the property is TextStrikeType integer constant.
IsStrikeoutbooleanGets or sets a value indicating whether the font is single strikeout.
ScriptOffsetNumberGets and sets the script offset,in unit of percentage
IsSuperscriptbooleanGets or sets a value indicating whether the font is super script.
IsSubscriptbooleanGets or sets a value indicating whether the font is subscript.
UnderlineNumberGets or sets the font underline type. The value of the property is FontUnderlineType integer constant.
NameStringGets or sets the name of the Font .
DoubleSizeNumberGets and sets the double size of the font.
SizeNumberGets or sets the size of the font.
ThemeColorThemeColorGets and sets the theme color. If the font color is not a theme color, NULL will be returned.
ColorColorGets or sets the com.aspose.cells.Color of the font.
ArgbColorNumberGets and sets the color with a 32-bit ARGB value.
IsNormalizeHeightsbooleanIndicates whether the normalization of height that is to be applied to the text run.
SchemeTypeNumberGets and sets the scheme type of the font. The value of the property is FontSchemeType integer constant.

Methods

NameDescription
setName
equalsChecks if two fonts are equals.
toStringReturns a string represents the current Cell object.

Font.Charset property

Represent the character set.

Type: Number

Font.IsItalic property

Gets or sets a value indicating whether the font is italic.

Type: boolean

Font.IsBold property

Gets or sets a value indicating whether the font is bold.

Type: boolean

Font.CapsType property

Gets and sets the text caps type. The value of the property is TextCapsType integer constant.

Type: Number

Font.StrikeType property

Gets the strike type of the text. The value of the property is TextStrikeType integer constant.

Type: Number

Font.IsStrikeout property

Gets or sets a value indicating whether the font is single strikeout.

Type: boolean

Font.ScriptOffset property

Gets and sets the script offset,in unit of percentage

Type: Number

Font.IsSuperscript property

Gets or sets a value indicating whether the font is super script.

Type: boolean

Font.IsSubscript property

Gets or sets a value indicating whether the font is subscript.

Type: boolean

Font.Underline property

Gets or sets the font underline type. The value of the property is FontUnderlineType integer constant.

Type: Number

Font.Name property

Gets or sets the name of the Font .

Type: String

Font.DoubleSize property

Gets and sets the double size of the font.

Type: Number

Font.Size property

Gets or sets the size of the font.

Type: Number

Font.ThemeColor property

Gets and sets the theme color. If the font color is not a theme color, NULL will be returned.

Type: ThemeColor

Font.Color property

Gets or sets the com.aspose.cells.Color of the font.

Type: Color

Font.ArgbColor property

Gets and sets the color with a 32-bit ARGB value.

Type: Number

Font.IsNormalizeHeights property

Indicates whether the normalization of height that is to be applied to the text run.

Type: boolean

Font.SchemeType property

Gets and sets the scheme type of the font. The value of the property is FontSchemeType integer constant.

Type: Number

setName(name, type)

equals(font)

Checks if two fonts are equals.

ParameterTypeDescription
fontFontCompared font object.

Returns: True if equal to the compared font object.

toString()

Returns a string represents the current Cell object.