Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
)
# ----------------------------------------------------------------------------
# This variable serves as an exportable anchor point, see e.g. the
# Lib/fontbakery/commands/check_ufo_sources.py script.
profile = UFOProfile(
default_section=Section('Default'),
iterargs={'font': 'fonts'},
derived_iterables={'ufo_fonts': ('ufo_font', True)},
expected_values={fonts_expected_value.name: fonts_expected_value})
register_check = profile.register_check
register_condition = profile.register_condition
# ----------------------------------------------------------------------------
basic_checks = Section("Basic UFO checks")
@register_condition
@condition
def ufo_font(font):
import defcon
return defcon.Font(font)
@register_check(section=basic_checks)
@check(
id = 'com.daltonmaag/check/ufolint',
misc_metadata = {
'priority': PriorityLevel.CRITICAL
}
)
fonts_expected_value = ExpectedValue(
'fonts'
, default=[]
, description='A list of the ufo file paths to check.'
, validator=lambda fonts: (True, None) if len(fonts) \
else (False, 'Value is empty.')
)
# ----------------------------------------------------------------------------
# This variable serves as an exportable anchor point, see e.g. the
# Lib/fontbakery/commands/check_ufo_sources.py script.
profile = UFOProfile(
default_section=Section('Default'),
iterargs={'font': 'fonts'},
derived_iterables={'ufo_fonts': ('ufo_font', True)},
expected_values={fonts_expected_value.name: fonts_expected_value})
register_check = profile.register_check
register_condition = profile.register_condition
# ----------------------------------------------------------------------------
basic_checks = Section("Basic UFO checks")
@register_condition
@condition
def ufo_font(font):
import defcon
return defcon.Font(font)