Object
Maps MacRoman codes to their corresponding index in the Postscript glyph table (see TTFunk::Table::Post::Format10). If any entry in this array is a string, it is a postscript glyph that is not in the standard list, and which should be emitted specially in the TTF postscript table (‘post’, see format 2).
XXX: Ruby 1.9.2 on OS X Lion segfaults on range1.zip(range2)
# File lib/ttfunk/encoding/mac_roman.rb, line 61 def self.covers?(character) !FROM_UNICODE[character].nil? end
# File lib/ttfunk/encoding/mac_roman.rb, line 77 def self.from_unicode(string) from_unicode_codepoints(string.unpack("n*")).pack("C*") end
# File lib/ttfunk/encoding/mac_roman.rb, line 85 def self.from_unicode_codepoints(array) array.map { |code| FROM_UNICODE[code] || 0 } end
# File lib/ttfunk/encoding/mac_roman.rb, line 73 def self.from_utf8(string) from_unicode_codepoints(string.unpack("U*")).pack("C*") end
# File lib/ttfunk/encoding/mac_roman.rb, line 69 def self.to_unicode(string) to_unicode_codepoints(string.unpack("C*")).pack("n*") end
Generated with the Darkfish Rdoc Generator 2.