ApiFont

class ApiFont

Description

Class that contains the font attributes (font name, font size, color, and so on).

Instance Methods

GetParent(): ApiCharacters

Returns the parent ApiCharacters object of the specified font.

GetBold(): boolean | "null"

Returns the bold property of the specified font.

SetBold(isBold)

S.

GetItalic(): boolean | "null"

Returns the italic property of the specified font.

SetItalic(isItalic)

S.

GetSize(): number | "null"

Returns the font size property of the specified font.

SetSize(Size)

S.

GetStrikethrough(): boolean | "null"

Returns the strikethrough property of the specified font.

SetStrikethrough(isStrikethrough)

S.

GetUnderline(): XlUnderlineStyle | "null"

Returns the type of underline applied to the specified font.

SetUnderline(Underline)

S.

GetSubscript(): boolean | "null"

Returns the subscript property of the specified font.

SetSubscript(isSubscript)

S.

GetSuperscript(): boolean | "null"

Returns the superscript property of the specified font.

SetSuperscript(isSuperscript)

S.

GetName(): string | "null"

Returns the font name property of the specified font.

SetName(FontName)

S.

GetColor(): ApiColor | "null"

Returns the font color property of the specified font.

SetColor(Color)

S.

Instance Properties

ParentApiCharacters

The parent object of the specified font object.

Boldboolean | "null"

The font bold property.

Italicboolean | "null"

The font italic property.

Sizenumber | "null"

The font size property.

Strikethroughboolean | "null"

The font strikethrough property.

Underlinestring | "null"

The font type of underline.

Subscriptboolean | "null"

The font subscript property.

Superscriptboolean | "null"

The font superscript property.

Namestring | "null"

The font name.

ColorApiColor | "null"

The font color property.

Get Help

  • If you have any questions about ONLYOFFICE Docs, try the FAQ section first.
  • You can request a feature or report a bug by posting an issue on GitHub.
  • You can also ask our developers on ONLYOFFICE forum (registration required).