generate emoji image from mastodon's svg data
|
@ -103,13 +103,24 @@ sub getEmojiResId($$){
|
|||
|
||||
if( not -f $dst_path ){
|
||||
|
||||
# override?
|
||||
my $override = "override/$dst_name";
|
||||
if( -f $override){
|
||||
copy( $override,$dst_path ) or die "$dst_path $!";
|
||||
# using svg from mastodon folder?
|
||||
my $mastodonSvg = "mastodon/public/emoji/".lc($image);
|
||||
$mastodonSvg =~ s/\.png$/\.svg/i;
|
||||
if( -f $mastodonSvg ){
|
||||
warn "convert from mastodon SVG file: $mastodonSvg\n";
|
||||
system qq(magick.exe -density 128 -background none $mastodonSvg png32:$dst_path);
|
||||
|
||||
}else{
|
||||
copy( $image_path,$dst_path ) or die "$dst_path $!";
|
||||
# override?
|
||||
my $override = "override/$dst_name";
|
||||
if( -f $override){
|
||||
copy( $override,$dst_path ) or die "$dst_path $!";
|
||||
}else{
|
||||
copy( $image_path,$dst_path ) or die "$dst_path $!";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
# override?
|
||||
|
|
|
@ -13,11 +13,12 @@ git clone git@github.com:Gargron/emoji-mart.git
|
|||
# (上のemoji-martのpackages.jsonで指定されたバージョンに合わせる
|
||||
git clone -b v4.0.4 git@github.com:iamcal/emoji-data.git
|
||||
|
||||
オーバライド用
|
||||
# マストドン公式
|
||||
git clone git@github.com:tootsuite/mastodon.git
|
||||
|
||||
#オーバライド用
|
||||
override フォルダにPNG画像を用意する
|
||||
|
||||
マストドンのタンスにある絵文字を以下のようにPNGに変換します
|
||||
|
||||
magick.exe -density 128 -background none 1f923.svg png32:emj_1f923.png
|
||||
|
||||
|
||||
|
@ -55,6 +56,13 @@ https://github.com/Gargron/emoji-mart/blob/master/data/all.json
|
|||
絵文字データはコレ
|
||||
https://github.com/iamcal/emoji-data/blob/v4.0.4/emoji.json
|
||||
|
||||
が、上記は絵文字ピッカーの話であり投稿後のデータの絵文字表示には使われていない。
|
||||
|
||||
たとえば rolling_on_the_floor_laughing は絵文字ピッカー内部では泣いていないが、投稿後は泣いている。
|
||||
|
||||
投稿後のデータのUnicode絵文字に使われているのはMastodon公式リポジトリにあるsvgファイルだ。
|
||||
https://github.com/tootsuite/mastodon/tree/master/public/emoji
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
Before Width: | Height: | Size: 634 B |
After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 636 B |
Before Width: | Height: | Size: 636 B After Width: | Height: | Size: 744 B |
Before Width: | Height: | Size: 645 B |
After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 694 B |
Before Width: | Height: | Size: 694 B After Width: | Height: | Size: 832 B |
Before Width: | Height: | Size: 573 B |
After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 608 B |
Before Width: | Height: | Size: 608 B After Width: | Height: | Size: 704 B |
Before Width: | Height: | Size: 505 B |
After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 448 B |
Before Width: | Height: | Size: 448 B After Width: | Height: | Size: 528 B |
Before Width: | Height: | Size: 604 B |
After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 618 B |
Before Width: | Height: | Size: 618 B After Width: | Height: | Size: 730 B |
Before Width: | Height: | Size: 644 B |
After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 606 B |
Before Width: | Height: | Size: 606 B After Width: | Height: | Size: 708 B |
Before Width: | Height: | Size: 542 B |
After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 544 B |
Before Width: | Height: | Size: 544 B After Width: | Height: | Size: 652 B |
Before Width: | Height: | Size: 615 B |
After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 616 B |
Before Width: | Height: | Size: 616 B After Width: | Height: | Size: 710 B |
Before Width: | Height: | Size: 649 B |
After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 616 B |
Before Width: | Height: | Size: 616 B After Width: | Height: | Size: 730 B |
Before Width: | Height: | Size: 559 B |
After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 546 B |
Before Width: | Height: | Size: 546 B After Width: | Height: | Size: 620 B |
Before Width: | Height: | Size: 646 B |
After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 634 B |
Before Width: | Height: | Size: 634 B After Width: | Height: | Size: 774 B |
Before Width: | Height: | Size: 654 B |
After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 586 B |
Before Width: | Height: | Size: 586 B After Width: | Height: | Size: 698 B |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 712 B After Width: | Height: | Size: 944 B |
Before Width: | Height: | Size: 948 B After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 706 B |
Before Width: | Height: | Size: 706 B After Width: | Height: | Size: 834 B |
Before Width: | Height: | Size: 640 B |
Before Width: | Height: | Size: 640 B After Width: | Height: | Size: 738 B |
Before Width: | Height: | Size: 752 B |
Before Width: | Height: | Size: 752 B After Width: | Height: | Size: 876 B |
Before Width: | Height: | Size: 548 B |
Before Width: | Height: | Size: 548 B After Width: | Height: | Size: 636 B |
Before Width: | Height: | Size: 954 B After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 786 B After Width: | Height: | Size: 988 B |
Before Width: | Height: | Size: 708 B After Width: | Height: | Size: 984 B |
Before Width: | Height: | Size: 768 B After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 596 B After Width: | Height: | Size: 732 B |
Before Width: | Height: | Size: 802 B After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 758 B After Width: | Height: | Size: 1012 B |
Before Width: | Height: | Size: 762 B After Width: | Height: | Size: 1010 B |
Before Width: | Height: | Size: 878 B After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 712 B After Width: | Height: | Size: 956 B |
Before Width: | Height: | Size: 976 B After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 614 B |
After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 564 B After Width: | Height: | Size: 762 B |
Before Width: | Height: | Size: 428 B After Width: | Height: | Size: 442 B |
Before Width: | Height: | Size: 622 B After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 538 B After Width: | Height: | Size: 814 B |
Before Width: | Height: | Size: 464 B After Width: | Height: | Size: 498 B |
Before Width: | Height: | Size: 604 B After Width: | Height: | Size: 792 B |
Before Width: | Height: | Size: 676 B After Width: | Height: | Size: 788 B |
Before Width: | Height: | Size: 540 B After Width: | Height: | Size: 682 B |
Before Width: | Height: | Size: 970 B After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 426 B After Width: | Height: | Size: 460 B |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 694 B After Width: | Height: | Size: 750 B |
Before Width: | Height: | Size: 704 B |
After Width: | Height: | Size: 874 B |
Before Width: | Height: | Size: 612 B After Width: | Height: | Size: 720 B |
Before Width: | Height: | Size: 572 B |
After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 774 B After Width: | Height: | Size: 960 B |
Before Width: | Height: | Size: 620 B After Width: | Height: | Size: 740 B |