Pass Noto Color Emoji bitmaps through pngquant.
24
Makefile
|
@ -18,6 +18,12 @@ font: $(EMOJI).ttf
|
|||
|
||||
CFLAGS = -std=c99 -Wall -Wextra `pkg-config --cflags --libs cairo`
|
||||
LDFLAGS = `pkg-config --libs cairo`
|
||||
PNGQUANTDIR := $(abspath `pwd`/../../third_party/pngquant)
|
||||
PNGQUANT := $(PNGQUANTDIR)/pngquant
|
||||
PNGQUANTFLAGS = --speed 1 --skip-if-larger --ext '.png' --force
|
||||
|
||||
$(PNGQUANT):
|
||||
cd $(PNGQUANTDIR) && make
|
||||
|
||||
waveflag: waveflag.c
|
||||
$(CC) $< -o $@ $(CFLAGS) $(LDFLAGS)
|
||||
|
@ -56,31 +62,24 @@ glyph_name = $(shell ./flag_glyph_name.py $(flag))
|
|||
|
||||
WAVED_FLAGS := $(foreach flag,$(FLAGS),$(FLAGS_DIR)/$(flag).png)
|
||||
PNG128_FLAGS := $(foreach flag,$(FLAGS),$(addprefix ./png/128/emoji_$(glyph_name),.png))
|
||||
PNG64_FLAGS := $(foreach flag,$(FLAGS),$(addprefix ./png/64/emoji_,$(glyph_name).png))
|
||||
|
||||
$(FLAGS_DIR)/%.png: $(FLAGS_SRC_DIR)/%.png ./waveflag
|
||||
$(FLAGS_DIR)/%.png: $(FLAGS_SRC_DIR)/%.png ./waveflag $(PNGQUANT)
|
||||
mkdir -p $(FLAGS_DIR)
|
||||
./waveflag "$<" "$@"
|
||||
optipng -quiet -o7 "$@"
|
||||
$(PNGQUANT) $(PNGQUANTFLAGS) "$@"
|
||||
|
||||
flag-symlinks: $(WAVED_FLAGS)
|
||||
$(foreach flag,$(FLAGS),ln -fs ../../flags/$(flag).png ./png/128/emoji_$(glyph_name).png;)
|
||||
|
||||
$(PNG64_FLAGS): $(PNG128_FLAGS)
|
||||
|
||||
$(PNG128_FLAGS): flag-symlinks
|
||||
|
||||
EMOJI_PNG128 = ./png/128/emoji_u
|
||||
EMOJI_PNG64 = ./png/64/emoji_u
|
||||
|
||||
EMOJI_BUILDER = ../third_party/color_emoji/emoji_builder.py
|
||||
ADD_GLYPHS = ../third_party/color_emoji/add_glyphs.py
|
||||
PUA_ADDER = ../nototools/map_pua_emoji.py
|
||||
|
||||
$(EMOJI_PNG64)%.png: $(EMOJI_PNG128)%.png
|
||||
convert -geometry 50% "$<" "$@"
|
||||
optipng -quiet -o7 "$@"
|
||||
|
||||
%.ttx: %.ttx.tmpl $(ADD_GLYPHS) $(UNI) flag-symlinks
|
||||
python $(ADD_GLYPHS) "$<" "$@" "$(EMOJI_PNG128)"
|
||||
|
||||
|
@ -88,16 +87,13 @@ $(EMOJI_PNG64)%.png: $(EMOJI_PNG128)%.png
|
|||
@rm -f "$@"
|
||||
ttx "$<"
|
||||
|
||||
PNG64_IMAGES := $(patsubst $(EMOJI_PNG128)%,$(EMOJI_PNG64)%,$(wildcard $(EMOJI_PNG128)*.png)) $(PNG64_FLAGS)
|
||||
|
||||
$(EMOJI).ttf: $(EMOJI).tmpl.ttf $(EMOJI_BUILDER) $(PUA_ADDER) $(PNG64_IMAGES) $(EMOJI_PNG128)*.png flag-symlinks
|
||||
python $(EMOJI_BUILDER) -V $< "$@" $(EMOJI_PNG128) $(EMOJI_PNG64)
|
||||
$(EMOJI).ttf: $(EMOJI).tmpl.ttf $(EMOJI_BUILDER) $(PUA_ADDER) $(EMOJI_PNG128)*.png flag-symlinks
|
||||
python $(EMOJI_BUILDER) -V $< "$@" $(EMOJI_PNG128)
|
||||
python $(PUA_ADDER) "$@" "$@-with-pua"
|
||||
mv "$@-with-pua" "$@"
|
||||
|
||||
clean:
|
||||
rm -f $(EMOJI).ttf $(EMOJI).tmpl.ttf $(EMOJI).tmpl.ttx
|
||||
rm -f $(EMOJI_PNG64)*.png
|
||||
rm -f waveflag
|
||||
rm -rf $(FLAGS_DIR)
|
||||
rm -f `find -type l -name "*.png"`
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<head>
|
||||
<!-- Most of this table will be recalculated by the compiler -->
|
||||
<tableVersion value="1.0"/>
|
||||
<fontRevision value="1.11"/>
|
||||
<fontRevision value="1.12"/>
|
||||
<checkSumAdjustment value="0x4d5a161a"/>
|
||||
<magicNumber value="0x5f0f3cf5"/>
|
||||
<flags value="00000000 00001011"/>
|
||||
|
@ -145,7 +145,7 @@
|
|||
Noto Color Emoji
|
||||
</namerecord>
|
||||
<namerecord nameID="5" platformID="3" platEncID="1" langID="0x409">
|
||||
Version 1.11
|
||||
Version 1.12
|
||||
</namerecord>
|
||||
<namerecord nameID="6" platformID="3" platEncID="1" langID="0x409">
|
||||
NotoColorEmoji
|
||||
|
|
Before Width: | Height: | Size: 966 B After Width: | Height: | Size: 533 B |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 763 B |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 702 B After Width: | Height: | Size: 353 B |
Before Width: | Height: | Size: 986 B After Width: | Height: | Size: 846 B |
Before Width: | Height: | Size: 992 B After Width: | Height: | Size: 588 B |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 742 B |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 822 B After Width: | Height: | Size: 489 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 973 B |
Before Width: | Height: | Size: 1019 B After Width: | Height: | Size: 627 B |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 740 B |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 926 B After Width: | Height: | Size: 427 B |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 804 B |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 833 B |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 937 B After Width: | Height: | Size: 796 B |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 900 B |
Before Width: | Height: | Size: 785 B After Width: | Height: | Size: 650 B |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1012 B |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 954 B |
Before Width: | Height: | Size: 927 B After Width: | Height: | Size: 790 B |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 940 B After Width: | Height: | Size: 813 B |
Before Width: | Height: | Size: 863 B After Width: | Height: | Size: 738 B |
Before Width: | Height: | Size: 1002 B After Width: | Height: | Size: 888 B |
Before Width: | Height: | Size: 817 B After Width: | Height: | Size: 691 B |
Before Width: | Height: | Size: 447 B After Width: | Height: | Size: 340 B |
Before Width: | Height: | Size: 413 B After Width: | Height: | Size: 308 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 975 B |
Before Width: | Height: | Size: 429 B After Width: | Height: | Size: 325 B |
Before Width: | Height: | Size: 355 B After Width: | Height: | Size: 255 B |
Before Width: | Height: | Size: 747 B After Width: | Height: | Size: 620 B |
Before Width: | Height: | Size: 864 B After Width: | Height: | Size: 738 B |
Before Width: | Height: | Size: 389 B After Width: | Height: | Size: 291 B |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 832 B After Width: | Height: | Size: 707 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 983 B |
Before Width: | Height: | Size: 697 B After Width: | Height: | Size: 570 B |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 877 B After Width: | Height: | Size: 752 B |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 965 B |
Before Width: | Height: | Size: 403 B After Width: | Height: | Size: 296 B |
Before Width: | Height: | Size: 795 B After Width: | Height: | Size: 669 B |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 935 B |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1004 B After Width: | Height: | Size: 880 B |
Before Width: | Height: | Size: 800 B After Width: | Height: | Size: 673 B |
Before Width: | Height: | Size: 777 B After Width: | Height: | Size: 650 B |
Before Width: | Height: | Size: 563 B After Width: | Height: | Size: 440 B |
Before Width: | Height: | Size: 850 B After Width: | Height: | Size: 716 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 960 B |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 903 B |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 909 B After Width: | Height: | Size: 774 B |
Before Width: | Height: | Size: 965 B After Width: | Height: | Size: 832 B |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 938 B |
Before Width: | Height: | Size: 900 B After Width: | Height: | Size: 766 B |
Before Width: | Height: | Size: 785 B After Width: | Height: | Size: 661 B |
Before Width: | Height: | Size: 626 B After Width: | Height: | Size: 490 B |
Before Width: | Height: | Size: 820 B After Width: | Height: | Size: 686 B |
Before Width: | Height: | Size: 801 B After Width: | Height: | Size: 664 B |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1008 B |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 926 B |
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.6 KiB |