Method: PDF::Reader::Encoding#int_to_name
- Defined in:
- lib/pdf/reader/encoding.rb
#int_to_name(glyph_code) ⇒ Object
convert an integer glyph code into an Adobe glyph name.
int_to_name(65)
=> :A
Standard character encodings are defined at the bottom of this file
122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 |
# File 'lib/pdf/reader/encoding.rb', line 122 def int_to_name(glyph_code) if @enc_name == :"Identity-H" || @enc_name == :"Identity-V" nil elsif @enc_name == :MacRomanEncoding MAC_ROMAN_ENCODING_TO_NAME[glyph_code] elsif @enc_name == :WinAnsiEncoding WIN_ANSI_ENCODING_TO_NAME[glyph_code] elsif @differences @differences[glyph_code] elsif @enc_name == :StandardEncoding STANDARD_ENCODING_TO_NAME[glyph_code] else raise "#{@enc_name} does not have an int_to_name mapping" end end |