Skip to content

font

Model definition of a Font.

CLASS DESCRIPTION
Font

Font specifies the characteristics of a given font through a set of font properties.

Classes

Font dataclass

Font(
    *,
    name: Optional[str] = None,
    size: Optional[float] = None,
    is_bold: Optional[bool] = None,
    is_italic: Optional[bool] = None,
    is_underline: Optional[bool] = None,
    is_strike_through: Optional[bool] = None
)

Font specifies the characteristics of a given font through a set of font properties.

ATTRIBUTE DESCRIPTION
is_bold

Whether the font has a bold style.

TYPE: Optional[bool]

is_italic

Whether the font has an italic style.

TYPE: Optional[bool]

is_strike_through

Whether the font has a ~~strike-through~~ style.

TYPE: Optional[bool]

is_underline

Whether the font has an underline style.

TYPE: Optional[bool]

name

The name of the font (e.g., “Times New Roman,” “Arial,” and “Helvetica”).

TYPE: Optional[str]

size

A non-negative real number representing the size of the font (expressed in the used unit of length).

TYPE: Optional[float]

Attributes

is_bold class-attribute instance-attribute
is_bold: Optional[bool] = field(
    default=None, metadata={"name": "isBold", "type": "Attribute"}
)

Whether the font has a bold style.

is_italic class-attribute instance-attribute
is_italic: Optional[bool] = field(
    default=None, metadata={"name": "isItalic", "type": "Attribute"}
)

Whether the font has an italic style.

is_strike_through class-attribute instance-attribute
is_strike_through: Optional[bool] = field(
    default=None, metadata={"name": "isStrikeThrough", "type": "Attribute"}
)

Whether the font has a ~~strike-through~~ style.

is_underline class-attribute instance-attribute
is_underline: Optional[bool] = field(
    default=None, metadata={"name": "isUnderline", "type": "Attribute"}
)

Whether the font has an underline style.

name class-attribute instance-attribute
name: Optional[str] = field(default=None, metadata={'type': 'Attribute'})

The name of the font (e.g., “Times New Roman,” “Arial,” and “Helvetica”).

size class-attribute instance-attribute
size: Optional[float] = field(default=None, metadata={'type': 'Attribute'})

A non-negative real number representing the size of the font (expressed in the used unit of length).

Functions