Description

class Axlsx::Font
Note:

The recommended way to manage fonts, and other styles is Styles#add_style

The Font class details a font instance for use in styling cells.

Creates a new Font

Parameters:

  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • name (String)
  • charset (Integer)
  • family (Integer)
  • family (Integer)
  • b (Boolean)
  • i (Boolean)
  • u (Boolean)
  • strike (Boolean)
  • outline (Boolean)
  • shadow (Boolean)
  • condense (Boolean)
  • extend (Boolean)
  • color (Color)
  • sz (Integer)

Indicates if the font should be rendered in bold

Note:

The following values are defined in the OOXML specification and are OS dependant values

0   ANSI_CHARSET
1   DEFAULT_CHARSET
2   SYMBOL_CHARSET
77  MAC_CHARSET
128 SHIFTJIS_CHARSET
129 HANGUL_CHARSET
130 JOHAB_CHARSET
134 GB2312_CHARSET
136 CHINESEBIG5_CHARSET
161 GREEK_CHARSET
162 TURKISH_CHARSET
163 VIETNAMESE_CHARSET
177 HEBREW_CHARSET
178 ARABIC_CHARSET
186 BALTIC_CHARSET
204 RUSSIAN_CHARSET
222 THAI_CHARSET
238 EASTEUROPE_CHARSET
255 OEM_CHARSET

The charset of the font

The color of the font

Indicates if the font should be condensed

The font's extend property

Note:

The following are defined OOXML specification

0 Not applicable.
1 Roman
2 Swiss
3 Modern
4 Script
5 Decorative
6..14 Reserved for future use

The font's family

Indicates if the font should be rendered italicized

The name of the font

Indicates if the font should be rendered with an outline

Indicates if the font should be rendered with a shadow

Indicates if the font should be rendered with a strikthrough

The size of the font.

Serializes the object

Parameters:

  • str (String) (defaults to: '')

Indicates if the font should be rendered underlined

Font is referenced in 0 repositories