Method: PDF::Reader::WidthCalculator::Composite#glyph_width

Defined in:
lib/pdf/reader/width_calculator/composite.rb

#glyph_width(code_point) ⇒ Object



19
20
21
22
23
24
25
# File 'lib/pdf/reader/width_calculator/composite.rb', line 19

def glyph_width(code_point)
  return 0 if code_point.nil? || code_point < 0

  w = @widths[code_point]
  # 0 is a valid width
  return w.to_f unless w.nil?
end