Skip to content

Commit

Permalink
Fix font metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
dmlls committed Jan 27, 2022
1 parent 6026423 commit f00e473
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 13 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
WhatsAppEmoji.ttf
WhatsAppEmoji.tmpl.ttf
WhatsAppEmoji.tmpl.ttx

# Byte-compiled / optimized / DLL files
__pycache__/
Expand Down
13 changes: 5 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,8 @@ ADD_GLYPHS_FLAGS = -a $(NOTO_EMOJI_SRC_DIR)/emoji_aliases.txt
PUA_ADDER = $(NOTO_EMOJI_SRC_DIR)/map_pua_emoji.py
VS_ADDER = add_vs_cmap.py # from nototools


EMOJI_NAMES = $(notdir $(wildcard $(EMOJI_SRC_DIR)/emoji_u*.png))
EMOJI_FILES= $(addprefix $(EMOJI_DIR)/,$(EMOJI_NAMES)))
EMOJI_FILES = $(addprefix $(EMOJI_DIR)/,$(EMOJI_NAMES))

ALL_NAMES = $(EMOJI_NAMES)

Expand Down Expand Up @@ -85,11 +84,9 @@ ifdef MISSING_ADDER
$(error "$(VS_ADDER) not in path, run setup.py in nototools")
endif


$(EMOJI_DIR) $(QUANTIZED_DIR) $(COMPRESSED_DIR):
mkdir -p "$@"


# imagemagick's -extent operator munges the grayscale images in such a fashion
# that while it can display them correctly using libpng12, chrome and gimp using
# both libpng12 and libpng16 display the wrong gray levels.
Expand Down Expand Up @@ -118,10 +115,10 @@ $(COMPRESSED_DIR)/%.png: $(QUANTIZED_DIR)/%.png | check_compress_tool $(COMPRESS
# ...
# Run make without -j if this happens.

%.ttx: $(RES_DIR)/%.ttx.tmpl $(ADD_GLYPHS) $(ALL_COMPRESSED_FILES)
@$(PYTHON) $(ADD_GLYPHS) -f "$<" -o "$@" -d "$(COMPRESSED_DIR)" $(ADD_GLYPHS_FLAGS)
$(RES_DIR)/$(EMOJI).tmpl.ttx: $(RES_DIR)/$(EMOJI).tmpl.ttx.tmpl $(ADD_GLYPHS) $(ALL_COMPRESSED_FILES)
$(PYTHON) $(ADD_GLYPHS) -f "$<" -o "$@" -d "$(COMPRESSED_DIR)" $(ADD_GLYPHS_FLAGS)

%.ttf: $(RES_DIR)/%.ttx
$(RES_DIR)/%.ttf: $(RES_DIR)/%.ttx
@rm -f "$@"
ttx "$<"

Expand All @@ -138,7 +135,7 @@ install:
cp -f $(EMOJI).ttf $(PREFIX)/share/fonts/

clean:
rm -f $(EMOJI).ttf
rm -f $(EMOJI).ttf $(RES_DIR)/$(EMOJI).tmpl.ttf $(RES_DIR)/$(EMOJI).tmpl.ttx
rm -rf $(BUILD_DIR)

.SECONDARY: $(EMOJI_FILES) $(ALL_QUANTIZED_FILES) $(ALL_COMPRESSED_FILES)
Expand Down
Binary file removed res/WhatsAppEmoji.tmpl.ttf
Binary file not shown.
7 changes: 2 additions & 5 deletions res/WhatsAppEmoji.tmpl.ttx.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
<head>
<!-- Most of this table will be recalculated by the compiler -->
<tableVersion value="1.0"/>
<fontRevision value="2.019"/>
<fontRevision value="1.0"/>
<checkSumAdjustment value="0x4d5a161a"/>
<magicNumber value="0x5f0f3cf5"/>
<flags value="00000000 00001011"/>
Expand Down Expand Up @@ -246,7 +246,7 @@
WhatsApp Emoji
</namerecord>
<namerecord nameID="5" platformID="3" platEncID="1" langID="0x409">
Version 2.21.23.23
Version 221.2323
</namerecord>
<namerecord nameID="6" platformID="3" platEncID="1" langID="0x409">
WhatsAppEmoji
Expand All @@ -266,9 +266,6 @@
<namerecord nameID="11" platformID="3" platEncID="1" langID="0x409">
https://github.com/dmlls/whatsapp-emoji-linux
</namerecord>
<namerecord nameID="12" platformID="3" platEncID="1" langID="0x409">
https://github.com/dmlls/whatsapp-emoji-linux
</namerecord>
<namerecord nameID="13" platformID="3" platEncID="1" langID="0x409">
Specific information about WhatsApp emoji licensing is not publicly available.
</namerecord>
Expand Down

0 comments on commit f00e473

Please sign in to comment.