def passedFilter(font):
    passed1 = ((not filterByFontFormat) or (filterByFontFormat and (font.format in filterByFontFormat)))
    passed2 = ((variableFont is None) or ((variableFont is not None) and (font.variableFont == variableFont)))
    return (passed1 and passed2)
def passedFilter(font):
    passed1 = ((not filterByFontFormat) or (filterByFontFormat and (font.format in filterByFontFormat)))
    passed2 = ((variableFont is None) or ((variableFont is not None) and (font.variableFont == variableFont)))
    return (passed1 and passed2)