Skip to content

Commit 8a5d56d

Browse files
committed
Rebuild as v2.041
Update postproc to update head.fontRevision
1 parent 69db164 commit 8a5d56d

11 files changed

+29
-3
lines changed

NotoColorEmoji.tmpl.ttx.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
<head>
7979
<!-- Most of this table will be recalculated by the compiler -->
8080
<tableVersion value="1.0"/>
81-
<fontRevision value="2.040"/>
81+
<fontRevision value="2.041"/>
8282
<checkSumAdjustment value="0x4d5a161a"/>
8383
<magicNumber value="0x5f0f3cf5"/>
8484
<flags value="00000000 00001011"/>
@@ -246,7 +246,7 @@
246246
Noto Color Emoji
247247
</namerecord>
248248
<namerecord nameID="5" platformID="3" platEncID="1" langID="0x409">
249-
Version 2.040;GOOG;noto-emoji:20231016:92a58ea6b2cfcad2560c2271855bc9c77eab6c51
249+
Version 2.041;GOOG;noto-emoji:20231120:69db1642752d1457ed8cfa6880781a9f36c9722e
250250
</namerecord>
251251
<namerecord nameID="6" platformID="3" platEncID="1" langID="0x409">
252252
NotoColorEmoji

colrv1_postproc.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
from nototools import font_data
1717
from nototools import unicode_data
1818
from pathlib import Path
19+
import re
1920

2021
from colrv1_add_soft_light_to_flags import add_soft_light_to_flags
2122

@@ -291,6 +292,16 @@ def _set_no_font_embedding_restrictions(colr_font):
291292
colr_font["OS/2"].fsType = 0
292293

293294

295+
def _set_head_version_to_name_version(colr_font):
296+
# head.fontRevision and the version on name 5 should match
297+
name_version = colr_font['name'].getName(5, 3, 1, 0x409)
298+
assert name_version is not None, "No version found in 'name'"
299+
name_version = name_version.toUnicode()
300+
match = re.match(r'^Version (\d+[.]\d+);GOOG;', name_version)
301+
assert match is not None, f"Unable to parse version from '{name_version}'"
302+
colr_font["head"].fontRevision = float(match.group(1))
303+
304+
294305
def _font(path, check_fn, check_fail_str):
295306
assert path.is_file(), path
296307
font = ttLib.TTFont(path)
@@ -324,6 +335,8 @@ def main(_):
324335

325336
_set_no_font_embedding_restrictions(colr_font)
326337

338+
_set_head_version_to_name_version(colr_font)
339+
327340
print("Writing", colr_file)
328341
colr_font.save(colr_file)
329342

fonts/Noto-COLRv1-emojicompat.ttf

96 Bytes
Binary file not shown.

fonts/Noto-COLRv1-noflags.ttf

92 Bytes
Binary file not shown.

fonts/Noto-COLRv1.ttf

96 Bytes
Binary file not shown.
532 Bytes
Binary file not shown.

fonts/NotoColorEmoji-noflags.ttf

528 Bytes
Binary file not shown.

fonts/NotoColorEmoji.ttf

532 Bytes
Binary file not shown.
532 Bytes
Binary file not shown.

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
fonttools>=4.7.0
22
notofonttools>=0.2.17
33
nanoemoji >= 0.14.3
4+
pytest>=7.4

0 commit comments

Comments
 (0)