File tree 2 files changed +25
-1
lines changed
Lib/fontbakery/specifications
2 files changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -2310,7 +2310,7 @@ def check_no_glyph_is_incorrectly_named(ttFont):
2310
2310
def check_EPAR_table_is_present (ttFont ):
2311
2311
"""EPAR table present in font?"""
2312
2312
if "EPAR" not in ttFont :
2313
- yield PASS , ("EPAR table not present in font."
2313
+ yield INFO , ("EPAR table not present in font."
2314
2314
" To learn more see"
2315
2315
" https://github.com/googlefonts/"
2316
2316
"fontbakery/issues/818" )
Original file line number Diff line number Diff line change @@ -1043,6 +1043,30 @@ def test_id_057():
1043
1043
status , message = list (check_name_table_entries_do_not_contain_linebreaks (ttFont ))[- 1 ]
1044
1044
assert status == FAIL
1045
1045
1046
+ # TODO: test_id_058
1047
+ # TODO: test_id_059
1048
+ # TODO: test_id_060
1049
+
1050
+ def test_id_061 ():
1051
+ """ EPAR table present in font ? """
1052
+ from fontbakery .specifications .googlefonts import \
1053
+ check_EPAR_table_is_present
1054
+
1055
+ # Our reference Mada Regular lacks an EPAR table:
1056
+ ttFont = TTFont ("data/test/mada/Mada-Regular.ttf" )
1057
+
1058
+ # So it must emit an INFO message inviting the designers
1059
+ # to learn more about it:
1060
+ print ("Test INFO with a font lacking an EPAR table..." )
1061
+ status , message = list (check_EPAR_table_is_present (ttFont ))[- 1 ]
1062
+ assert status == INFO
1063
+
1064
+ print ("Test PASS with a good font..." )
1065
+ # add a fake EPAR table to validate the PASS code-path:
1066
+ ttFont ["EPAR" ] = "foo"
1067
+ status , message = list (check_EPAR_table_is_present (ttFont ))[- 1 ]
1068
+ assert status == PASS
1069
+
1046
1070
1047
1071
def test_id_153 (montserrat_ttFonts ):
1048
1072
"""Check glyphs contain the recommended contour count"""
You can’t perform that action at this time.
0 commit comments