Method: EideticPDF::PdfObjects::PdfFont#initialize

Defined in:
lib/epdfo.rb

#initialize(seq, gen, sub_type, base_font, first_char, last_char, widths, font_descriptor) ⇒ PdfFont

Returns a new instance of PdfFont.



456
457
458
459
460
461
462
463
464
465
# File 'lib/epdfo.rb', line 456

def initialize(seq, gen, sub_type, base_font, first_char, last_char, widths, font_descriptor)
  super(seq, gen)
  dictionary['Type'] = PdfName.new('Font')
  dictionary['Subtype'] = PdfName.new(sub_type)
  dictionary['BaseFont'] = PdfName.new(base_font)
  dictionary['FirstChar'] = PdfInteger.new(first_char)
  dictionary['LastChar'] = PdfInteger.new(last_char)
  dictionary['Widths'] = widths.reference_object unless widths.nil?
  dictionary['FontDescriptor'] = font_descriptor.reference_object unless font_descriptor.nil?
end