def score_family(self, families, family2):
for i, family1 in enumerate(families):<EOL><INDENT>if family1.lower() in font_family_aliases:<EOL><INDENT>if family1 == '<STR_LIT>':<EOL><INDENT>family1 == '<STR_LIT>'<EOL><DEDENT>options = rcParams['<STR_LIT>' + family1]<EOL>if family2 in options:<EOL><INDENT>idx = options.index(family2)<EOL>return <NUM_LIT:0.1> * (float(idx) / len(options))<EOL><DEDENT><DEDENT>elif family1.lower() == family2.lower():<EOL><INDENT>return <NUM_LIT:0.0><EOL><DEDENT><DEDENT>return <NUM_LIT:1.0><EOL>
Returns a match score between the list of font families in
*families* and the font family name *family2*.

An exact match anywhere in the list returns 0.0.

A match by generic font name will return 0.1.

No match will return 1.0.