# File lib/ttfunk/subset/unicode_8bit.rb, line 30 def covers?(character) @unicodes.key?(character) || @next < 256 end
# File lib/ttfunk/subset/unicode_8bit.rb, line 38 def from_unicode(character) @unicodes[character] end
# File lib/ttfunk/subset/unicode_8bit.rb, line 34 def includes?(character) @unicodes.key?(character) end
# File lib/ttfunk/subset/unicode_8bit.rb, line 18 def to_unicode_map @subset.dup end
# File lib/ttfunk/subset/unicode_8bit.rb, line 44 def new_cmap_table(options) mapping = @subset.inject({}) do |map, (code,unicode)| map[code] = unicode_cmap[unicode] map end # since we're mapping a subset of the unicode glyphs into an # arbitrary 256-character space, the actual encoding we're # using is irrelevant. We choose MacRoman because it's a 256-character # encoding that happens to be well-supported in both TTF and # PDF formats. TTFunk::Table::Cmap.encode(mapping, :mac_roman) end
Generated with the Darkfish Rdoc Generator 2.