def get_basefile(self, tex, fontsize, dpi=None):
s = '<STR_LIT>'.join([tex, self.get_font_config(), '<STR_LIT>'%fontsize,<EOL>self.get_custom_preamble(), str(dpi or '<STR_LIT>')])<EOL>bytes = str(s).encode('<STR_LIT:utf-8>')<EOL>return os.path.join(self.texcache, md5(bytes).hexdigest())<EOL>
returns a filename based on a hash of the string, fontsize, and dpi