We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 11b4f69 commit 859778cCopy full SHA for 859778c
lib/emoji/extractor.rb
@@ -23,6 +23,12 @@ def extract!
23
hexes = ttf_name.split('_').map { |n| n.gsub(/^u/, '').downcase }
24
25
if emoji_char_codes.include?(hexes.first.to_i(16))
26
+ # When an emoji supports skin-tone modifiers, all variants--including
27
+ # the unmodified "base" emoji--are suffixed with a "." + a number:
28
+ # 0 for the base, then 1-5 which maps to Fitzpatrick types 2-6
29
+ # (https://en.wikipedia.org/wiki/Fitzpatrick_scale). We remove the
30
+ # base's suffix to fix its lookups.
31
+ hexes.last.gsub!(/\.0$/, '')
32
filename = "#{hexes.join('-')}.#{bitmap.type}"
33
File.write(images_path.join(filename), bitmap.data.read)
34
end
0 commit comments