Skip to content

Commit 49f5dfa

Browse files
committed
Recommend completely removing the 'DSIG' table.
We may make this a FAIL by November 2023 when the EOL date for MS Office 2013 is reached. OpenType profile: com.google.fonts/check/dsig (issues #3398, #1845 and googlefonts/fontmake#431)
1 parent 5c41104 commit 49f5dfa

File tree

3 files changed

+24
-22
lines changed

3 files changed

+24
-22
lines changed

CHANGELOG.md

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

88
### Changes to existing checks
9+
#### OpenType Profile
10+
- **[com.google.fonts/check/dsig]:** We now recommend (with a WARN) completely removing the 'DSIG' table. We may make this a FAIL by November 2023 when the EOL date for MS Office 2013 is reached. (issue #3398)
911
#### Universal Profile
10-
- **[com.google.fonts/check/required_tables]:** remove 'DSIG' from list of optional tables (issue #3398)
12+
- **[com.google.fonts/check/required_tables]:** remove 'DSIG' from list of optional tables and improve wording on the check rationale. (issue #3398)
1113

1214

1315
## 0.8.0 (2021-Jul-21)

Lib/fontbakery/profiles/dsig.py

+14-12
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,25 @@
99
rationale = """
1010
Microsoft Office 2013 and below products expect fonts to have a digital signature declared in a DSIG table in order to implement OpenType features. The EOL date for Microsoft Office 2013 products is 4/11/2023. This issue does not impact Microsoft Office 2016 and above products.
1111
12-
This checks verifies that this signature is available in the font.
12+
As we approach the EOL date, it is now considered better to completely remove the table.
1313
14-
A fake signature is enough to address this issue. If needed, a dummy table can be added to the font with the `gftools fix-dsig` script available at https://github.com/googlefonts/gftools
14+
But if you still want your font to support OpenType features on Office 2013, then you may find it handy to add a fake signature on a dummy DSIG table by running one of the helper scripts provided at https://github.com/googlefonts/gftools
1515
1616
Reference: https://github.com/googlefonts/fontbakery/issues/1845
1717
""",
18-
proposal = 'legacy:check/045'
18+
proposal = ['legacy:check/045',
19+
'https://github.com/googlefonts/fontbakery/issues/3398']
1920
)
2021
def com_google_fonts_check_dsig(ttFont):
2122
"""Does the font have a DSIG table?"""
22-
if "DSIG" in ttFont:
23-
yield PASS, "Digital Signature (DSIG) exists."
23+
if "DSIG" not in ttFont:
24+
yield PASS, "ok"
2425
else:
25-
yield FAIL,\
26-
Message("lacks-signature",
27-
"This font lacks a digital signature (DSIG table)."
28-
" Some applications may require one (even if only a"
29-
" dummy placeholder) in order to work properly. You"
30-
" can add a DSIG table by running the"
31-
" `gftools fix-dsig` script.")
26+
yield WARN,\
27+
Message("found-DSIG",
28+
"This font has a digital signature (DSIG table) which"
29+
" is only required - even if only a dummy placeholder"
30+
" - on old programs like MS Office 2013 in order to"
31+
" work properly.\n"
32+
"The current recommendation is to completely"
33+
" remove the DSIG table.")

tests/profiles/dsig_test.py

+7-9
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
assert_results_contain,
33
CheckTester,
44
TEST_FILE)
5-
from fontbakery.checkrunner import FAIL
5+
from fontbakery.checkrunner import WARN
66
from fontbakery.profiles import opentype as opentype_profile
77

88
from fontTools.ttLib import TTFont
@@ -13,15 +13,13 @@ def test_check_dsig():
1313
check = CheckTester(opentype_profile,
1414
"com.google.fonts/check/dsig")
1515

16-
# Our reference Cabin Regular font is good (theres a DSIG table declared):
16+
# Our reference Cabin Regular font is bad (theres a DSIG table declared):
1717
ttFont = TTFont(TEST_FILE("cabin/Cabin-Regular.ttf"))
18+
assert_results_contain(check(ttFont),
19+
WARN, 'contains-DSIG',
20+
'with a font containing a DSIG table...')
1821

19-
# So it must PASS the check:
22+
# Then we remove the DSIG table and it should now PASS the check:
23+
del ttFont['DSIG']
2024
assert_PASS(check(ttFont),
2125
'with a good font...')
22-
23-
# Then we remove the DSIG table so that we get a FAIL:
24-
del ttFont['DSIG']
25-
assert_results_contain(check(ttFont),
26-
FAIL, 'lacks-signature',
27-
'with a font lacking a DSIG table...')

0 commit comments

Comments
 (0)