Override check statuses in the Adobe profile. Fixes
@@ -4,7 +4,7 @@ Checks for Adobe Fonts (formerly known as Typekit).
import unicodedata
from fontbakery.callable import check
-from fontbakery.checkrunner import Section, PASS, FAIL
+from fontbakery.checkrunner import Section, PASS, FAIL, WARN
from fontbakery.fonts_profile import profile_factory
from fontbakery.profiles.universal import UNIVERSAL_PROFILE_CHECKS
@@ -14,9 +14,20 @@ profile = profile_factory(default_section=Section("Adobe Fonts"))
ADOBEFONTS_PROFILE_CHECKS = \
UNIVERSAL_PROFILE_CHECKS + [
'com.adobe.fonts/check/family/consistent_upm',
- 'com.adobe.fonts/check/find_empty_letters'
+ 'com.adobe.fonts/check/find_empty_letters',
+ 'com.adobe.fonts/check/dsig',
+ 'com.adobe.fonts/check/whitespace_glyphs',
+ 'com.adobe.fonts/check/valid_glyphnames',
]
+OVERRIDDEN_CHECKS = [
+ 'com.google.fonts/check/dsig',
+ 'com.google.fonts/check/whitespace_glyphs',
+ 'com.google.fonts/check/valid_glyphnames',
+ ]
+ADOBEFONTS_PROFILE_CHECKS[:] = [cid for cid in ADOBEFONTS_PROFILE_CHECKS
+ if cid not in OVERRIDDEN_CHECKS]
+
@check(
id='com.adobe.fonts/check/family/consistent_upm',
@@ -106,4 +117,30 @@ def com_adobe_fonts_check_find_empty_letters(ttFont):
# ToDo: add many more checks...
profile.auto_register(globals())
+
+com_adobe_fonts_check_dsig = profile.check_log_override(
+ 'com.google.fonts/check/dsig'
+ , 'com.adobe.fonts/check/dsig'
+ , reason='For Adobe this issue is not as severe '\
+ + 'as assessed in the original check.'
+ , overrides = (
+ ( FAIL # override_target -> Status or a specific Message.code (string)
+ , WARN # new_status -> None: keep old status
+ , None # new_message_string -> None: keep old message
+ )
+ ,)
+)
+
+com_adobe_fonts_check_whitespace_glyphs = profile.check_log_override(
+ 'com.google.fonts/check/whitespace_glyphs'
+ , 'com.adobe.fonts/check/whitespace_glyphs'
+ , overrides = ((FAIL, WARN, None),)
+)
+
+com_adobe_fonts_check_valid_glyphnames = profile.check_log_override(
+ 'com.google.fonts/check/valid_glyphnames'
+ , 'com.adobe.fonts/check/valid_glyphnames'
+ , overrides = ((FAIL, WARN, None),)
+)
+
profile.test_expected_checks(ADOBEFONTS_PROFILE_CHECKS, exclusive=True)
