diff --git a/CHANGELOG.md b/CHANGELOG.md index 71cd98d5c8..bd27a44407 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,9 @@ Below are the noteworthy changes from each release. A more detailed list of changes is available in the corresponding milestones for each release in the Github issue tracker (https://github.com/googlefonts/fontbakery/milestones?state=closed). ## Upcoming release: 0.13.0 (a4?) (2024-Nov-??) - - ... +### Deprecated checks +#### Removed from the OpenType profile + - **DEPRECATED - [opentype/dsig]:** Merged into **[unwanted_tables]** on the `Universal` profile. (issue #4865) ## 0.13.0a3 (2024-Oct-25) diff --git a/Lib/fontbakery/checks/opentype/dsig.py b/Lib/fontbakery/checks/opentype/dsig.py deleted file mode 100644 index 152df0fed7..0000000000 --- a/Lib/fontbakery/checks/opentype/dsig.py +++ /dev/null @@ -1,38 +0,0 @@ -from fontbakery.callable import check -from fontbakery.status import WARN -from fontbakery.message import Message - - -@check( - id="opentype/dsig", - rationale=""" - 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 was 4/11/2023. - - This issue does not impact Microsoft Office 2016 and above products. It is now considered better to completely remove the table. - - 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 placeholder DSIG table - by running one of the helper scripts provided at - https://github.com/googlefonts/gftools - - Reference: https://github.com/fonttools/fontbakery/issues/1845 - """, - proposal=[ - "https://github.com/fonttools/fontbakery/issues/3398", - "https://github.com/fonttools/fontbakery/issues/4829", # legacy check - ], -) -def check_dsig(ttFont): - """The font should not need a DSIG table anymore.""" - if "DSIG" in ttFont: - yield WARN, Message( - "found-DSIG", - "This font has a digital signature (DSIG table) which" - " is only required - even if only a placeholder" - " - on old programs like MS Office 2013 in order to" - " work properly.\n" - "The current recommendation is to completely" - " remove the DSIG table.", - ) diff --git a/Lib/fontbakery/checks/tables.py b/Lib/fontbakery/checks/tables.py index 735a2f65da..43fd4e33ac 100644 --- a/Lib/fontbakery/checks/tables.py +++ b/Lib/fontbakery/checks/tables.py @@ -128,6 +128,12 @@ def check_required_tables(ttFont, config, is_variable_font): def check_unwanted_tables(ttFont): """Are there unwanted tables?""" UNWANTED_TABLES = { + "DSIG": ( + "This font has a digital signature (DSIG table) which is only required" + " - even if only a placeholder - on old programs like MS Office 2013" + " in order to work properly.\n" + "The current recommendation is to completely remove the DSIG table." + ), "FFTM": "Table contains redundant FontForge timestamp info", "TTFA": "Redundant TTFAutohint table", "TSI0": "Table contains data only used in VTT", diff --git a/Lib/fontbakery/profiles/adobefonts.py b/Lib/fontbakery/profiles/adobefonts.py index 0854c8270e..5aec32edbe 100644 --- a/Lib/fontbakery/profiles/adobefonts.py +++ b/Lib/fontbakery/profiles/adobefonts.py @@ -28,7 +28,6 @@ "notofonts/unicode_range_bits", # so maybe there's still some change they may be considered useful here? # "opentype/caret_slope", - "opentype/dsig", "opentype/fsselection", "opentype/gdef_mark_chars", "opentype/gdef_non_mark_chars", diff --git a/Lib/fontbakery/profiles/opentype.py b/Lib/fontbakery/profiles/opentype.py index 5562bcc0c9..2c5db790bd 100644 --- a/Lib/fontbakery/profiles/opentype.py +++ b/Lib/fontbakery/profiles/opentype.py @@ -8,7 +8,6 @@ "opentype/cff_call_depth", "opentype/cff_deprecated_operators", "opentype/code_pages", - "opentype/dsig", "opentype/family/bold_italic_unique_for_nameid1", "opentype/family/consistent_family_name", "opentype/family/equal_font_versions", diff --git a/docs/source/fontbakery/checks/opentype.rst b/docs/source/fontbakery/checks/opentype.rst index c26f1e7b84..aa48b60898 100644 --- a/docs/source/fontbakery/checks/opentype.rst +++ b/docs/source/fontbakery/checks/opentype.rst @@ -14,12 +14,6 @@ CFF table checks .. automodule:: fontbakery.checks.opentype.cff :members: -DSIG table checks -***************** - -.. automodule:: fontbakery.checks.opentype.dsig - :members: - fvar table checks ***************** diff --git a/tests/test_checks_opentype_dsig.py b/tests/test_checks_opentype_dsig.py deleted file mode 100644 index 387415d2ba..0000000000 --- a/tests/test_checks_opentype_dsig.py +++ /dev/null @@ -1,24 +0,0 @@ -from fontTools.ttLib import TTFont - -from fontbakery.codetesting import ( - assert_PASS, - assert_results_contain, - CheckTester, - TEST_FILE, -) -from fontbakery.status import WARN - - -def test_check_dsig(): - """Does the font have a DSIG table ?""" - check = CheckTester("opentype/dsig") - - # Our reference Cabin Regular font is bad (theres a DSIG table declared): - ttFont = TTFont(TEST_FILE("cabin/Cabin-Regular.ttf")) - assert_results_contain( - check(ttFont), WARN, "found-DSIG", "with a font containing a DSIG table..." - ) - - # Then we remove the DSIG table and it should now PASS the check: - del ttFont["DSIG"] - assert_PASS(check(ttFont), "with a good font...") diff --git a/tests/test_checks_universal.py b/tests/test_checks_universal.py index 86074661d0..e042a303d7 100644 --- a/tests/test_checks_universal.py +++ b/tests/test_checks_universal.py @@ -684,6 +684,7 @@ def test_check_unwanted_tables(): check = CheckTester("unwanted_tables") unwanted_tables = [ + "DSIG", "FFTM", # FontForge "TTFA", # TTFAutohint "TSI0", # TSI* = VTT