Skip to content

Commit 5c41104

Browse files
committed
remove DSIG from list of optional tables
on universal profile, check/required_tables (issue fonttools#3398)
1 parent 3563fb1 commit 5c41104

File tree

3 files changed

+12
-11
lines changed

3 files changed

+12
-11
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ A more detailed list of changes is available in the corresponding milestones for
55
### Bug fixes
66
- Fix crash on is_OFL condition when a font project lacks a license. (issue #3393)
77

8+
### Changes to existing checks
9+
#### Universal Profile
10+
- **[com.google.fonts/check/required_tables]:** remove 'DSIG' from list of optional tables (issue #3398)
11+
812

913
## 0.8.0 (2021-Jul-21)
1014
### New Reporter

Lib/fontbakery/profiles/universal.py

+5-7
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,7 @@ def com_google_fonts_check_whitespace_ink(ttFont):
575575
id='com.google.fonts/check/required_tables',
576576
conditions = ['is_ttf'],
577577
rationale = """
578-
Depending on the typeface and coverage of a font, certain tables are recommended for optimum quality. For example, the performance of a non-linear font is improved if the VDMX, LTSH, and hdmx tables are present. Non-monospaced Latin fonts should have a kern table. A gasp table is necessary if a designer wants to influence the sizes at which grayscaling is used under Windows. A DSIG table containing a digital signature helps ensure the integrity of the font file. Etc.
578+
Depending on the typeface and coverage of a font, certain tables are recommended for optimum quality. For example, the performance of a non-linear font is improved if the VDMX, LTSH, and hdmx tables are present. Non-monospaced Latin fonts should have a kern table. A gasp table is necessary if a designer wants to influence the sizes at which grayscaling is used under Windows. Etc.
579579
""",
580580
# FIXME:
581581
# The rationale description above comes from FontValidator, check W0022.
@@ -593,9 +593,8 @@ def com_google_fonts_check_required_tables(ttFont):
593593
OPTIONAL_TABLES = ["cvt ", "fpgm", "loca", "prep",
594594
"VORG", "EBDT", "EBLC", "EBSC",
595595
"BASE", "GPOS", "GSUB", "JSTF",
596-
"DSIG", "gasp", "hdmx", "LTSH",
597-
"PCLT", "VDMX", "vhea", "vmtx",
598-
"kern"]
596+
"gasp", "hdmx", "LTSH", "PCLT",
597+
"VDMX", "vhea", "vmtx", "kern"]
599598
# See https://github.com/googlefonts/fontbakery/issues/617
600599
#
601600
# We should collect the rationale behind the need for each of the
@@ -609,10 +608,9 @@ def com_google_fonts_check_required_tables(ttFont):
609608
optional_tables = [opt for opt in OPTIONAL_TABLES if opt in ttFont.keys()]
610609
if optional_tables:
611610
yield INFO, \
612-
Message("required-tables",
611+
Message("optional-tables",
613612
f"This font contains the following optional tables:\n"
614-
f"{bullet_list(optional_tables)}"
615-
)
613+
f"{bullet_list(optional_tables)}")
616614

617615
if is_variable_font(ttFont):
618616
# According to https://github.com/googlefonts/fontbakery/issues/1671

tests/profiles/universal_test.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -518,9 +518,8 @@ def test_check_required_tables():
518518
optional_tables = ["cvt ", "fpgm", "loca", "prep",
519519
"VORG", "EBDT", "EBLC", "EBSC",
520520
"BASE", "GPOS", "GSUB", "JSTF",
521-
"DSIG", "gasp", "hdmx", "kern",
522-
"LTSH", "PCLT", "VDMX", "vhea",
523-
"vmtx"]
521+
"gasp", "hdmx", "kern", "LTSH",
522+
"PCLT", "VDMX", "vhea", "vmtx"]
524523
# Our reference Mada Regular font is good here
525524
ttFont = TTFont(TEST_FILE("mada/Mada-Regular.ttf"))
526525

@@ -568,7 +567,7 @@ def test_check_required_tables():
568567
# and ensure that the second to last logged message is an
569568
# INFO status informing the user about it:
570569
assert_results_contain(check(ttFont),
571-
INFO, "required-tables",
570+
INFO, "optional-tables",
572571
f'with optional table {required} ...')
573572
# remove the one we've just inserted before trying the next one:
574573
del ttFont.reader.tables[optional]

0 commit comments

Comments
 (0)