Method: HexaPDF::Font::Encoding::Base#unicode
- Defined in:
- lib/hexapdf/font/encoding/base.rb
#unicode(code) ⇒ Object
Returns the Unicode value in UTF-8 for the given code, or nil if the code cannot be mapped.
Note that this method caches the result of the Unicode mapping and therefore should only be called after all codes have been defined.
72 73 74 |
# File 'lib/hexapdf/font/encoding/base.rb', line 72 def unicode(code) @unicode_cache[code] ||= GlyphList.name_to_unicode(name(code)) end |