class Odf::Component::Styles
Constants
- NAME
Public Instance Methods
content()
click to toggle source
# File lib/odf/component/styles.rb, line 7 def content Odf.styles end
Private Instance Methods
initialize_xml()
click to toggle source
Calls superclass method
Odf::Component::XmlComponent#initialize_xml
# File lib/odf/component/styles.rb, line 12 def initialize_xml super xml.root = xml.create_element('office:document-styles', 'xmlns:office' => 'urn:oasis:names:tc:opendocument:xmlns:office:1.0') font_decls = xml.create_element('office:font-face-decls') times_nr = xml.create_element('style:font-face', { 'style:name' => 'Times New Roman', 'svg:font-family' => ''Times New Roman'', 'style:font-family-generic' => 'roman', 'style:font-pitch' => 'variable' }) arial = xml.create_element('style:font-face', { 'style:name' => 'Arial', 'svg:font-family' => ''Arial'', 'style:font-family-generic' => 'swiss', 'style:font-pitch' => 'variable' }) arial_uc = xml.create_element('style:font-face', { 'style:name' => 'Arial Unicode MS', 'svg:font-family' => ''Arial Unicode MS'', 'style:font-family-generic' => 'system', 'style:font-pitch' => 'variable' }) font_decls.add_child(times_nr) font_decls.add_child(arial) font_decls.add_child(arial_uc) xml.root.add_child(font_decls) end