def _fontValidator(font):
 if (u',' in font):
  (font1, families2) = font.split(u',', 1)
 else:
  (font1, families2) = (font, None)
 if (not _fontRegexReplacements['__FONT_WITH_1_FAMILY'](font1.strip())):
  return False
 if (families2 and (not _fontFamilyValidator(families2))):
  return False
 return True

def _fontValidator ( font ) : if ( u',' in font ) : ( font1 , families2 ) = font . split ( u',' , 1 ) else : ( font1 , families2 ) = ( font , None ) if ( not _fontRegexReplacements [ '__FONT_WITH_1_FAMILY' ] ( font1 . strip ( ) ) ) : return False if ( families2 and ( not _fontFamilyValidator ( families2 ) ) ) : return False return True
check if font value is valid .