Method: PDF::Reader::Font#initialize

Defined in:
lib/pdf/reader/font.rb

#initialize(ohash = nil, obj = nil) ⇒ Font

Returns a new instance of Font.



39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# File 'lib/pdf/reader/font.rb', line 39

def initialize(ohash = nil, obj = nil)
  if ohash.nil? || obj.nil?
    $stderr.puts "DEPREACTION WARNING - PDF::Reader::Font.new should be called with 2 args"
    return
  end
  @ohash = ohash
  @tounicode = nil

  extract_base_info(obj)
  extract_descriptor(obj)
  extract_descendants(obj)
  @width_calc = build_width_calculator

  @encoding ||= PDF::Reader::Encoding.new(:StandardEncoding)
end