import_font_style

Defined in header: <orcus/spreadsheet/import_interface_styles.hpp>

class import_font_style

Interface for importing font style items. The following font style properties store different values for western, asian and complex scripts:

  • font name

  • font size

  • font weight (normal or bold)

  • font style (normal or italic)

Public Functions

virtual ~import_font_style()
virtual void set_bold(bool b) = 0

Set the font weight to either normal or bold, for western script.

Parameters:

b – whether the font has normal (false) or bold weight (true).

virtual void set_bold_asian(bool b) = 0

Set the font weight to either normal or bold, for asian script.

Parameters:

b – whether the font has normal (false) or bold weight (true).

virtual void set_bold_complex(bool b) = 0

Set the font weight to either normal or bold, for complex script.

Parameters:

b – whether the font has normal (false) or bold weight (true).

virtual void set_italic(bool b) = 0

Set the font style to either normal or italic, for western script.

Parameters:

b – whether the font has normal (false) or italic style (true).

virtual void set_italic_asian(bool b) = 0

Set the font style to either normal or italic, for asian script.

Parameters:

b – whether the font has normal (false) or italic style (true).

virtual void set_italic_complex(bool b) = 0

Set the font style to either normal or italic, for complex script.

Parameters:

b – whether the font has normal (false) or italic style (true).

virtual void set_name(std::string_view s) = 0

Set the name of a font, for western script.

Parameters:

s – font name.

virtual void set_name_asian(std::string_view s) = 0

Set the name of a font, for asian script.

Parameters:

s – font name.

virtual void set_name_complex(std::string_view s) = 0

Set the name of a font, for complex script.

Parameters:

s – font name.

virtual void set_size(double point) = 0

Set the size of a font in points, for western script.

Parameters:

point – font size in points.

virtual void set_size_asian(double point) = 0

Set the size of a font in points, for asian script.

Parameters:

point – font size in points.

virtual void set_size_complex(double point) = 0

Set the size of a font in points, for complex script.

Parameters:

point – font size in points.

virtual void set_color(color_elem_t alpha, color_elem_t red, color_elem_t green, color_elem_t blue) = 0

Specify the color of font in ARGB format.

Parameters:
  • alpha – alpha component of the color.

  • red – red component of the color.

  • green – green component of the color.

  • blue – blue component of the color.

virtual import_underline *start_underline()

Get an interface for importing the underline attributes and applying them to the font style.

Returns:

Pointer to an interface for applying the underline-related attributes to the font style. The implementer may return nullptr if the implementation does not support it.

virtual import_strikethrough *start_strikethrough()

Get an interface for importing the strikethrough attributes and applying them to the font style.

Returns:

Pointer to an interface for applying the strikethrough-related attributes to the font style. The implementer may return nullptr if the implementation does not support it.

virtual std::size_t commit() = 0

Commit the font style in the current buffer.

Returns:

index of the committed font style, to be passed on to the import_xf::set_font() method as its argument.