Method: PDF::Reader::Font#glyph_width
- Defined in:
- lib/pdf/reader/font.rb
#glyph_width(code_point) ⇒ Object
looks up the specified codepoint and returns a value that is in (pdf) glyph space, which is 1000 glyph units = 1 text space unit
89 90 91 92 93 94 95 96 |
# File 'lib/pdf/reader/font.rb', line 89 def glyph_width(code_point) if code_point.is_a?(String) code_point = code_point.unpack(encoding.unpack).first end @cached_widths ||= {} @cached_widths[code_point] ||= @width_calc.glyph_width(code_point) end |