FontStyles class

FontStyles class

Represents 4 possible styles of the font, used in the document: Regular, Bold, Italic, or Bold Italic.

Immutable struct with convenient API and combining operations.

The FontStyles type exposes the following members:

Constructors

Constructor Description
init Initializes a FontStyles instance from specified bold and italic flags.

Methods

Method Description
equals Indicates whether this FontStyles instance is equal to the specified instance.
equals Indicates whether this FontStyles instance is equal to the specified uncasted object.
equals_font_styles
equals_object
get_hash_code Returns a hash-code of this instance.
to_string Returns the name of this font style, same as FontStyles.name.
try_parse Tries to parse specified raw string as a font style name.

Properties

Property Description
is_bold The property indicates whether this FontStyles instance has a bold flag enabled (True) or disabled (False).
is_italic The italic flag state of this FontStyles instance; True if enabled, False if disabled.
name The name of this font style.

Fields

Field Description
REGULAR Regular font style, default value (no bold and italic)
BOLD Bold font style (bold only, without italic)
ITALIC Italic font style (italic only, without bold)
BOLD_ITALIC BoldItalic font style (bold and italic together)

See Also