lib/ttfunk/table/cmap/format10.rb in ttfunk-1.6.2.1 vs lib/ttfunk/table/cmap/format10.rb in ttfunk-1.7.0
- old
+ new
@@ -15,14 +15,15 @@
low_char = sorted_chars.first
high_char = sorted_chars.last
entry_count = 1 + high_char - low_char
glyph_indexes = Array.new(entry_count, 0)
- new_map = charmap.keys.sort.each_with_object({}) do |code, map|
- glyph_map[charmap[code]] ||= next_id += 1
- map[code] = { old: charmap[code], new: glyph_map[charmap[code]] }
- glyph_indexes[code - low_char] = glyph_map[charmap[code]]
- end
+ new_map =
+ charmap.keys.sort.each_with_object({}) do |code, map|
+ glyph_map[charmap[code]] ||= next_id += 1
+ map[code] = { old: charmap[code], new: glyph_map[charmap[code]] }
+ glyph_indexes[code - low_char] = glyph_map[charmap[code]]
+ end
subtable = [
10, 0, 20 + entry_count * 4, 0, low_char, entry_count,
*glyph_indexes
].pack('nnN*')