From d851dea561ef354db0930be35f11dbbc064b6e7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felipe=20Corr=C3=AAa=20da=20Silva=20Sanches?= Date: Fri, 16 Feb 2024 12:12:36 -0300 Subject: [PATCH] update code-tests to be able to use newer axisregistry version 0.4.8 (issue #4516) --- tests/profiles/googlefonts_test.py | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/tests/profiles/googlefonts_test.py b/tests/profiles/googlefonts_test.py index 1e0cd6ed02..944b6e36de 100644 --- a/tests/profiles/googlefonts_test.py +++ b/tests/profiles/googlefonts_test.py @@ -2922,23 +2922,31 @@ def test_check_metadata_category(): # Open Sans' origin is Light so this should pass ( TEST_FILE("varfont/OpenSans[wdth,wght].ttf"), - {2: "Regular", 17: "Light"}, + { + NameID.FONT_SUBFAMILY_NAME: "Regular", + NameID.TYPOGRAPHIC_SUBFAMILY_NAME: "Light", + }, PASS, ), ( TEST_FILE("varfont/OpenSans[wdth,wght].ttf"), - {2: "Regular", 17: "Condensed Light"}, + { + NameID.FONT_SUBFAMILY_NAME: "Regular", + NameID.TYPOGRAPHIC_SUBFAMILY_NAME: "Condensed Light", + }, FAIL, ), - (TEST_FILE("varfont/RobotoSerif[GRAD,opsz,wdth,wght].ttf"), {}, PASS), + (TEST_FILE("varfont/RobotoSerif[GRAD,opsz,wdth,wght].ttf"), {}, FAIL), # Roboto Serif has an opsz axes so this should pass ( TEST_FILE("varfont/RobotoSerif[GRAD,opsz,wdth,wght].ttf"), { - NameID.FONT_FAMILY_NAME: "Roboto Serif 20pt", + NameID.FONT_FAMILY_NAME: "Roboto Serif", NameID.FONT_SUBFAMILY_NAME: "Regular", - NameID.TYPOGRAPHIC_FAMILY_NAME: "Roboto Serif", - NameID.TYPOGRAPHIC_SUBFAMILY_NAME: "20pt Regular", + NameID.FULL_FONT_NAME: "Roboto Serif Regular", + NameID.POSTSCRIPT_NAME: "RobotoSerif-Regular", + NameID.TYPOGRAPHIC_FAMILY_NAME: None, + NameID.TYPOGRAPHIC_SUBFAMILY_NAME: None, }, PASS, ),