Class: Prune::Elements::Font
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#base_font=(base_font) ⇒ Object
Set base font.
-
#encoding ⇒ Object
Get encoding of the font.
-
#initialize(document, options) ⇒ Font
constructor
Initialize.
-
#name ⇒ Object
Get name of the font.
-
#name=(name) ⇒ Object
Set name of the font.
Methods inherited from Base
Methods included from Functions
Methods included from PObjects
Constructor Details
#initialize(document, options) ⇒ Font
Initialize.
7 8 9 10 11 12 13 14 |
# File 'lib/prune/elements/font.rb', line 7 def initialize(document, ) super(document) # Set dictionary. @content = pd(pn(:Type) => pn(:Font)) @content.update() # Register element to document. register end |
Instance Method Details
#base_font=(base_font) ⇒ Object
Set base font.
27 28 29 |
# File 'lib/prune/elements/font.rb', line 27 def base_font=(base_font) @content[pn(:BaseFont)] = base_font end |
#encoding ⇒ Object
Get encoding of the font.
32 33 34 |
# File 'lib/prune/elements/font.rb', line 32 def encoding @content[pn(:Encoding)] end |
#name ⇒ Object
Get name of the font.
17 18 19 |
# File 'lib/prune/elements/font.rb', line 17 def name @content[pn(:Name)] end |
#name=(name) ⇒ Object
Set name of the font.
22 23 24 |
# File 'lib/prune/elements/font.rb', line 22 def name=(name) @content[pn(:Name)] = name end |