Class: Prune::Elements::FontDescriptor

Inherits:
Base
  • Object
show all
Defined in:
lib/prune/elements/font_descriptor.rb

Instance Attribute Summary

Attributes inherited from Base

#document

Instance Method Summary collapse

Methods inherited from Base

#reference, #register, #to_s

Methods included from Functions

#mm_to_pt, #pt_to_mm

Methods included from PObjects

pa, pd, ph, pl, pn, ps

Constructor Details

#initialize(document, options) ⇒ FontDescriptor

Initialize.



7
8
9
10
11
12
13
14
# File 'lib/prune/elements/font_descriptor.rb', line 7

def initialize(document, options)
  super(document)
  # Set dictionary.
  @content = pd(pn(:Type) => pn(:FontDescriptor))
  @content.update(options)
  # Register element to document.
  register
end

Instance Method Details

#flags=(flags) ⇒ Object

Set flags.



27
28
29
# File 'lib/prune/elements/font_descriptor.rb', line 27

def flags=(flags)
  @content[pn(:Flags)] = flags
end

#font_name=(name) ⇒ Object

Set font name.



17
18
19
# File 'lib/prune/elements/font_descriptor.rb', line 17

def font_name=(name)
  @content[pn(:FontName)] = name
end

#italic_angle=(angle) ⇒ Object

Set italic angle.



22
23
24
# File 'lib/prune/elements/font_descriptor.rb', line 22

def italic_angle=(angle)
  @content[pn(:ItalicAngle)] = angle
end

#stem_v=(stem_v) ⇒ Object

Set stem v.



32
33
34
# File 'lib/prune/elements/font_descriptor.rb', line 32

def stem_v=(stem_v)
  @content[pn(:StemV)] = stem_v
end