Font Bakery callable is the wrapper for your custom check code.

Separation of Concerns Disclaimer: While created specifically for running checks on fonts and font-families this module has no domain knowledge about fonts. It can be used for any kind of (document) checking. Please keep it so. It will be valuable for other domains as well. Domain specific knowledge should be encoded only in the Profile (Checks, Conditions) and MAYBE in customized reporters e.g. subclasses.

class fontbakery.callable.Disabled(func)[source][source]
class fontbakery.callable.FontBakeryCheck(checkfunc, id, advancedMessageSetup=None, description=None, documentation=None, name=None, conditions=None, rationale=None, misc_metadata=None)[source][source]
class fontbakery.callable.FontBakeryCondition(func, name=None, description=None, documentation=None, force=False)[source][source]
class fontbakery.callable.FontBakeryExpectedValue(name, description=None, documentation=None, default=<object object>, validator=None, force=False)[source][source]
property default[source]
property has_default[source]

returns (bool valid, string|None message) If valid is True, message is None or can be ignored. If valid is False, message should be a string describing what is wrong with value.

class fontbakery.callable.FontbakeryCallable(func)[source][source]
property args[source]
property mandatoryArgs[source]
property optionalArgs[source]

Decorate a property by executing it at instatiation time and cache the result on the instance object.

fontbakery.callable.check(*args, **kwds)[source][source]

Check wrapper, a factory for FontBakeryCheck

Requires all arguments of FontBakeryCheck but not checkfunc which is passed via the decorator syntax.

fontbakery.callable.condition(*args, **kwds)[source][source]

Check wrapper, a factory for FontBakeryCondition

Requires all arguments of FontBakeryCondition but not func which is passed via the decorator syntax.

fontbakery.callable.get_doc_desc(func, description, documentation)[source][source]