Class: DocxGenerator::Word::Font

Inherits:
Element
  • Object
show all
Defined in:
lib/docx_generator/word/formatting.rb

Overview

Represent the ‘w:rFonts` element from Office Open XML specification. This class should not be used directly by the users of the library.

Instance Method Summary collapse

Methods inherited from Element

#add, #generate

Constructor Details

#initialize(name) ⇒ Font

Create a new ‘w:rFonts` element.

Parameters:

  • name (String)

    The name of the font.



157
158
159
# File 'lib/docx_generator/word/formatting.rb', line 157

def initialize(name)
  super("w:rFonts", { "w:ascii" => name })
end