Streamline profile imports
@@ -2,7 +2,7 @@ import os
from fontbakery.status import PASS, FAIL, WARN, INFO, SKIP
from fontbakery.section import Section
-from fontbakery.callable import condition, check, disable
+from fontbakery.callable import check, disable
from fontbakery.message import Message
from fontbakery.fonts_profile import profile_factory
from fontbakery.profiles.opentype import OPENTYPE_PROFILE_CHECKS
@@ -10,12 +10,10 @@ from fontbakery.profiles.outline import OUTLINE_PROFILE_CHECKS
from fontbakery.profiles.shaping import SHAPING_PROFILE_CHECKS
from fontbakery.profiles.ufo_sources import UFO_PROFILE_CHECKS
-profile_imports = ('fontbakery.profiles.opentype',
- 'fontbakery.profiles.outline',
- 'fontbakery.profiles.shaping',
- 'fontbakery.profiles.ufo_sources')
+profile_imports = (
+ (".", ("shared_conditions", "opentype", "outline", "shaping", "ufo_sources")),
+)
profile = profile_factory(default_section=Section("Universal"))
-from .shared_conditions import * # pylint: disable=wildcard-import,unused-wildcard-import
THIRDPARTY_CHECKS = [
'com.google.fonts/check/ots',
@@ -1522,7 +1520,7 @@ def com_google_fonts_check_cjk_chws_feature(ttFont):
""",
proposal = 'https://github.com/googlefonts/fontbakery/issues/2011',
)
-def com_google_fonts_check_transformed_components(ttFont):
+def com_google_fonts_check_transformed_components(ttFont, is_hinted):
"""Ensure component transforms do not perform scaling or rotation."""
failures = ""
for glyph_name in ttFont.getGlyphOrder():
@@ -1533,7 +1531,7 @@ def com_google_fonts_check_transformed_components(ttFont):
comp_name, transform = component.getComponentInfo()
# Font is hinted, complain about *any* transformations
- if is_hinted(ttFont):
+ if is_hinted:
if transform[0:4] != (1, 0, 0, 1):
failures += f"* {glyph_name} (component {comp_name})\n"
# Font is unhinted, complain only about transformations where
