mirror of
https://github.com/googlefonts/noto-emoji.git
synced 2025-06-07 15:27:59 +00:00
Rebuild as v2.041
Update postproc to update head.fontRevision
This commit is contained in:
parent
69db164275
commit
8a5d56d7b8
11 changed files with 29 additions and 3 deletions
|
@ -78,7 +78,7 @@
|
||||||
<head>
|
<head>
|
||||||
<!-- Most of this table will be recalculated by the compiler -->
|
<!-- Most of this table will be recalculated by the compiler -->
|
||||||
<tableVersion value="1.0"/>
|
<tableVersion value="1.0"/>
|
||||||
<fontRevision value="2.040"/>
|
<fontRevision value="2.041"/>
|
||||||
<checkSumAdjustment value="0x4d5a161a"/>
|
<checkSumAdjustment value="0x4d5a161a"/>
|
||||||
<magicNumber value="0x5f0f3cf5"/>
|
<magicNumber value="0x5f0f3cf5"/>
|
||||||
<flags value="00000000 00001011"/>
|
<flags value="00000000 00001011"/>
|
||||||
|
@ -246,7 +246,7 @@
|
||||||
Noto Color Emoji
|
Noto Color Emoji
|
||||||
</namerecord>
|
</namerecord>
|
||||||
<namerecord nameID="5" platformID="3" platEncID="1" langID="0x409">
|
<namerecord nameID="5" platformID="3" platEncID="1" langID="0x409">
|
||||||
Version 2.040;GOOG;noto-emoji:20231016:92a58ea6b2cfcad2560c2271855bc9c77eab6c51
|
Version 2.041;GOOG;noto-emoji:20231120:69db1642752d1457ed8cfa6880781a9f36c9722e
|
||||||
</namerecord>
|
</namerecord>
|
||||||
<namerecord nameID="6" platformID="3" platEncID="1" langID="0x409">
|
<namerecord nameID="6" platformID="3" platEncID="1" langID="0x409">
|
||||||
NotoColorEmoji
|
NotoColorEmoji
|
||||||
|
|
|
@ -16,6 +16,7 @@ from nototools import add_vs_cmap
|
||||||
from nototools import font_data
|
from nototools import font_data
|
||||||
from nototools import unicode_data
|
from nototools import unicode_data
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
import re
|
||||||
|
|
||||||
from colrv1_add_soft_light_to_flags import add_soft_light_to_flags
|
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
|
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):
|
def _font(path, check_fn, check_fail_str):
|
||||||
assert path.is_file(), path
|
assert path.is_file(), path
|
||||||
font = ttLib.TTFont(path)
|
font = ttLib.TTFont(path)
|
||||||
|
@ -324,6 +335,8 @@ def main(_):
|
||||||
|
|
||||||
_set_no_font_embedding_restrictions(colr_font)
|
_set_no_font_embedding_restrictions(colr_font)
|
||||||
|
|
||||||
|
_set_head_version_to_name_version(colr_font)
|
||||||
|
|
||||||
print("Writing", colr_file)
|
print("Writing", colr_file)
|
||||||
colr_font.save(colr_file)
|
colr_font.save(colr_file)
|
||||||
|
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1,3 +1,4 @@
|
||||||
fonttools>=4.7.0
|
fonttools>=4.7.0
|
||||||
notofonttools>=0.2.17
|
notofonttools>=0.2.17
|
||||||
nanoemoji >= 0.14.3
|
nanoemoji >= 0.14.3
|
||||||
|
pytest>=7.4
|
||||||
|
|
|
@ -43,4 +43,16 @@ def test_consistent_fstype():
|
||||||
fstypes.add(fstype)
|
fstypes.add(fstype)
|
||||||
debug_fstypes.append(f"{font_file.name} fsType {fstype}")
|
debug_fstypes.append(f"{font_file.name} fsType {fstype}")
|
||||||
debug_fstypes = "\n".join(debug_fstypes)
|
debug_fstypes = "\n".join(debug_fstypes)
|
||||||
assert fstypes == {0}, f"All fsType's should be 0, found\n{debug_fstypes}"
|
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"
|
||||||
|
|
Loading…
Add table
Reference in a new issue