View definition

def Axlsx::Styles#parse_font_options

Defined in github.com/randym/axlsx/lib/axlsx/stylesheet/styles.rb

Description

Note:

noop if none of the options described here are set on the options parameter.

parses add_style options for fonts. If the options hash contains :type => :dxf we return a new Font object. if not, we return the index of the newly created font object in the styles.fonts collection.

Parameters:

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

    a customizable set of options

Options Hash (options):

  • type (Symbol)

    The type of style object we are working with (dxf or xf)

  • fg_color (String)

    The text color

  • sz (Integer)

    The text size

  • b (Boolean)

    Indicates if the text should be bold

  • i (Boolean)

    Indicates if the text should be italicised

  • u (Boolean)

    Indicates if the text should be underlined

  • strike (Boolean)

    Indicates if the text should be rendered with a strikethrough

  • outline (Boolean)

    Indicates if the text should be rendered with a shadow

  • charset (Integer)

    The character set to use.

  • family (Integer)

    The font family to use.

  • font_name (String)

    The name of the font to use

parse_font_options is referenced in 0 repositories