# File lib/pdf/writer/object/font.rb, line 15
15:   def initialize(parent, name, encoding = 'WinAnsiEncoding', subtype = 'Type1')
16:     super(parent)
17: 
18:     @name     = name
19:     @subtype  = subtype
20:     @font_id  = @parent.__send__(:generate_font_id)
21: 
22:     if encoding.kind_of?(PDF::Writer::Object::FontEncoding)
23:       @encoding           = encoding
24:     elsif encoding == 'none' or encoding.nil?
25:       @encoding           = nil
26:     else
27:       @encoding           = encoding
28:     end
29: 
30:     @parent.pages << self
31: 
32:     @firstchar      = nil
33:     @lastchar       = nil
34:     @widths         = nil
35:     @fontdescriptor = nil
36:   end