def style(font):
  """Determine font style from canonical filename."""
  from fontbakery.constants import STATIC_STYLE_NAMES
  filename = os.path.basename(font)
  if '-' in filename:
    stylename = os.path.splitext(filename)[0].split('-')[1]
    if stylename in [name.replace(' ', '') for name in STATIC_STYLE_NAMES]:
      return stylename
  return None
def style ( font ) : from fontbakery . constants import STATIC_STYLE_NAMES filename = os . path . basename ( font ) if '-' in filename : stylename = os . path . splitext ( filename ) [ 0 ] . split ( '-' ) [ 1 ] if stylename in [ name . replace ( ' ' , '' ) for name in STATIC_STYLE_NAMES ] : return stylename return None
Determine font style from canonical filename.