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)

Sets the bold property to the specified font.

GetItalic(): boolean | "null"

Returns the italic property of the specified font.

SetItalic(isItalic)

Sets the italic property to the specified font.

GetSize(): number | "null"

Returns the font size property of the specified font.

SetSize(Size)

Sets the font size property to the specified font.

GetStrikethrough(): boolean | "null"

Returns the strikethrough property of the specified font.

SetStrikethrough(isStrikethrough)

Sets the strikethrough property to the specified font.

GetUnderline(): XlUnderlineStyle | "null"

Returns the type of underline applied to the specified font.

SetUnderline(Underline)

Sets an underline of the type specified in the request to the current font.

GetSubscript(): boolean | "null"

Returns the subscript property of the specified font.

SetSubscript(isSubscript)

Sets the subscript property to the specified font.

GetSuperscript(): boolean | "null"

Returns the superscript property of the specified font.

SetSuperscript(isSuperscript)

Sets the superscript property to the specified font.

GetName(): string | "null"

Returns the font name property of the specified font.

SetName(FontName)

Sets the font name property to the specified font.

GetColor(): ApiColor | "null"

Returns the font color property of the specified font.

SetColor(Color)

Sets the font color property to the specified font.

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).