forked from thunderbird/thunderbird-android
-
Notifications
You must be signed in to change notification settings - Fork 0
/
make_emoji
30 lines (22 loc) · 1.11 KB
/
make_emoji
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
use warnings;
use strict;
my $emoji = do 'Emoticon.pl';
use YAML;
my %codepoints;
for my $carrier qw(docomo softbank kddi) {
print " // These emoji codepoints are generated by tools/make_emoji in the K-9 source tree\n";
print "\n";
for my $codepoint (keys %{$emoji->{$carrier}}) {
if (defined $codepoints{$codepoint}) {
print " // Skipping $carrier codepoint $codepoint ".$emoji->{$carrier}->{$codepoint}."\n";
print " // It conflicts with an earlier definition from another carrier:\n";
print " // ".$codepoints{$codepoint}."\n\n";
next;
} else {
$codepoints{$codepoint} = "$carrier ".$emoji->{$carrier}->{$codepoint};
}
print " case 0x$codepoint: //$carrier ".$emoji->{$carrier}->{$codepoint}."\n";
print " ".'buff.append("<img src=\"file:///android_asset/emoticons/'.$emoji->{$carrier}->{$codepoint}.'.gif\" alt=\"'.$emoji->{$carrier}->{$codepoint}.'\" />'."\");\n";
print " break;\n";
}
}