def fontName(self, fontprop):
if is_string_like(fontprop):<EOL><INDENT>filename = fontprop<EOL><DEDENT>elif rcParams['<STR_LIT>']:<EOL><INDENT>filename = findfont(fontprop, fontext='<STR_LIT>')<EOL><DEDENT>else:<EOL><INDENT>filename = findfont(fontprop)<EOL><DEDENT>Fx = self.fontNames.get(filename)<EOL>if Fx is None:<EOL><INDENT>Fx = Name('<STR_LIT>' % self.nextFont)<EOL>self.fontNames[filename] = Fx<EOL>self.nextFont += <NUM_LIT:1><EOL><DEDENT>return Fx<EOL>
Select a font based on fontprop and return a name suitable for
Op.selectfont. If fontprop is a string, it will be interpreted
as the filename of the font.