# File lib/ttfunk/subset/windows_1252.rb, line 21 def covers?(character) Encoding::Windows1252.covers?(character) end
# File lib/ttfunk/subset/windows_1252.rb, line 30 def from_unicode(character) Encoding::Windows1252::FROM_UNICODE[character] end
# File lib/ttfunk/subset/windows_1252.rb, line 25 def includes?(character) code = Encoding::Windows1252::FROM_UNICODE[character] code && @subset[code] end
# File lib/ttfunk/subset/windows_1252.rb, line 36 def new_cmap_table(options) mapping = {} @subset.each_with_index do |unicode, cp1252| mapping[cp1252] = unicode_cmap[unicode] if cp1252 end # yes, I really mean "mac roman". TTF has no cp1252 encoding, and the # alternative would be to encode it using a format 4 unicode table, which # is overkill. for our purposes, mac-roman suffices. (If we were building # a _real_ font, instead of a PDF-embeddable subset, things would probably # be different.) TTFunk::Table::Cmap.encode(mapping, :mac_roman) end
Generated with the Darkfish Rdoc Generator 2.