diff --git a/NotoColorEmoji.tmpl.ttx.tmpl b/NotoColorEmoji.tmpl.ttx.tmpl
index 2896d12a31..59b3a7328f 100644
--- a/NotoColorEmoji.tmpl.ttx.tmpl
+++ b/NotoColorEmoji.tmpl.ttx.tmpl
@@ -78,7 +78,7 @@
-
+
@@ -246,7 +246,7 @@
Noto Color Emoji
- Version 2.040;GOOG;noto-emoji:20231016:92a58ea6b2cfcad2560c2271855bc9c77eab6c51
+ Version 2.041;GOOG;noto-emoji:20231120:69db1642752d1457ed8cfa6880781a9f36c9722e
NotoColorEmoji
diff --git a/colrv1_postproc.py b/colrv1_postproc.py
index f40aedcbdd..12ea612e08 100644
--- a/colrv1_postproc.py
+++ b/colrv1_postproc.py
@@ -16,6 +16,7 @@
from nototools import font_data
from nototools import unicode_data
from pathlib import Path
+import re
from colrv1_add_soft_light_to_flags import add_soft_light_to_flags
@@ -291,6 +292,16 @@ def _set_no_font_embedding_restrictions(colr_font):
colr_font["OS/2"].fsType = 0
+def _set_head_version_to_name_version(colr_font):
+ # head.fontRevision and the version on name 5 should match
+ name_version = colr_font['name'].getName(5, 3, 1, 0x409)
+ assert name_version is not None, "No version found in 'name'"
+ name_version = name_version.toUnicode()
+ match = re.match(r'^Version (\d+[.]\d+);GOOG;', name_version)
+ assert match is not None, f"Unable to parse version from '{name_version}'"
+ colr_font["head"].fontRevision = float(match.group(1))
+
+
def _font(path, check_fn, check_fail_str):
assert path.is_file(), path
font = ttLib.TTFont(path)
@@ -324,6 +335,8 @@ def main(_):
_set_no_font_embedding_restrictions(colr_font)
+ _set_head_version_to_name_version(colr_font)
+
print("Writing", colr_file)
colr_font.save(colr_file)
diff --git a/fonts/Noto-COLRv1-emojicompat.ttf b/fonts/Noto-COLRv1-emojicompat.ttf
index 347d0c3ef6..dd3e05a3b0 100644
Binary files a/fonts/Noto-COLRv1-emojicompat.ttf and b/fonts/Noto-COLRv1-emojicompat.ttf differ
diff --git a/fonts/Noto-COLRv1-noflags.ttf b/fonts/Noto-COLRv1-noflags.ttf
index df23256592..dee490a7ac 100644
Binary files a/fonts/Noto-COLRv1-noflags.ttf and b/fonts/Noto-COLRv1-noflags.ttf differ
diff --git a/fonts/Noto-COLRv1.ttf b/fonts/Noto-COLRv1.ttf
index 13d1f2b022..0e1bf1c29d 100644
Binary files a/fonts/Noto-COLRv1.ttf and b/fonts/Noto-COLRv1.ttf differ
diff --git a/fonts/NotoColorEmoji-emojicompat.ttf b/fonts/NotoColorEmoji-emojicompat.ttf
index cf41d593d0..cec6d277cb 100644
Binary files a/fonts/NotoColorEmoji-emojicompat.ttf and b/fonts/NotoColorEmoji-emojicompat.ttf differ
diff --git a/fonts/NotoColorEmoji-noflags.ttf b/fonts/NotoColorEmoji-noflags.ttf
index afe82368cc..58586d1ee2 100644
Binary files a/fonts/NotoColorEmoji-noflags.ttf and b/fonts/NotoColorEmoji-noflags.ttf differ
diff --git a/fonts/NotoColorEmoji.ttf b/fonts/NotoColorEmoji.ttf
index e0fad9051f..191a13df9a 100644
Binary files a/fonts/NotoColorEmoji.ttf and b/fonts/NotoColorEmoji.ttf differ
diff --git a/fonts/NotoColorEmoji_WindowsCompatible.ttf b/fonts/NotoColorEmoji_WindowsCompatible.ttf
index f0968084c2..f492cf2bb3 100644
Binary files a/fonts/NotoColorEmoji_WindowsCompatible.ttf and b/fonts/NotoColorEmoji_WindowsCompatible.ttf differ
diff --git a/requirements.txt b/requirements.txt
index 87822079d1..c1d674192c 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,3 +1,4 @@
fonttools>=4.7.0
notofonttools>=0.2.17
nanoemoji >= 0.14.3
+pytest>=7.4
diff --git a/tests/basic_test.py b/tests/basic_test.py
index d93afc9dd6..06d823c493 100644
--- a/tests/basic_test.py
+++ b/tests/basic_test.py
@@ -43,4 +43,16 @@ def test_consistent_fstype():
fstypes.add(fstype)
debug_fstypes.append(f"{font_file.name} fsType {fstype}")
debug_fstypes = "\n".join(debug_fstypes)
- assert fstypes == {0}, f"All fsType's should be 0, found\n{debug_fstypes}"
\ No newline at end of file
+ assert fstypes == {0}, f"All fsType's should be 0, found\n{debug_fstypes}"
+
+def test_has_emojicompat():
+ fonts_dir = Path("fonts")
+ assert fonts_dir.is_dir()
+
+ ec_fonts = set(fonts_dir.rglob("*-emojicompat.ttf"))
+ assert {f.name for f in ec_fonts} == {"Noto-COLRv1-emojicompat.ttf", "NotoColorEmoji-emojicompat.ttf"}
+
+ for font_file in ec_fonts:
+ font = ttLib.TTFont(font_file)
+ assert "meta" in font, f"{font_file.name} should have a meta table"
+ assert "Emji" in font["meta"].data, f"{font_file.name} should have emojicompat data"