def _get_info (self, fontname, font_class, sym, fontsize, dpi):
key = fontname, sym, fontsize, dpi<EOL>tup = self.glyphd.get(key)<EOL>if tup is not None:<EOL><INDENT>return tup<EOL><DEDENT>if (fontname == '<STR_LIT>' and<EOL>(len(sym) > <NUM_LIT:1> or<EOL>not unicodedata.category(str(sym)).startswith("<STR_LIT:L>"))):<EOL><INDENT>fontname = '<STR_LIT>'<EOL><DEDENT>found_symbol = False<EOL>if sym in latex_to_standard:<EOL><INDENT>fontname, num = latex_to_standard[sym]<EOL>glyph = chr(num)<EOL>found_symbol = True<EOL><DEDENT>elif len(sym) == <NUM_LIT:1>:<EOL><INDENT>glyph = sym<EOL>num = ord(glyph)<EOL>found_symbol = True<EOL><DEDENT>else:<EOL><INDENT>warn("<STR_LIT>" % sym,<EOL>MathTextWarning)<EOL><DEDENT>slanted = (fontname == '<STR_LIT>')<EOL>font = self._get_font(fontname)<EOL>if found_symbol:<EOL><INDENT>try:<EOL><INDENT>symbol_name = font.get_name_char(glyph)<EOL><DEDENT>except KeyError:<EOL><INDENT>warn("<STR_LIT>" %<EOL>(font.postscript_name, sym),<EOL>MathTextWarning)<EOL>found_symbol = False<EOL><DEDENT><DEDENT>if not found_symbol:<EOL><INDENT>glyph = sym = '<STR_LIT:?>'<EOL>num = ord(glyph)<EOL>symbol_name = font.get_name_char(glyph)<EOL><DEDENT>offset = <NUM_LIT:0><EOL>scale = <NUM_LIT> * fontsize<EOL>xmin, ymin, xmax, ymax = [val * scale<EOL>for val in font.get_bbox_char(glyph)]<EOL>metrics = Bunch(<EOL>advance  = font.get_width_char(glyph) * scale,<EOL>width    = font.get_width_char(glyph) * scale,<EOL>height   = font.get_height_char(glyph) * scale,<EOL>xmin = xmin,<EOL>xmax = xmax,<EOL>ymin = ymin+offset,<EOL>ymax = ymax+offset,<EOL>iceberg = ymax + offset,<EOL>slanted = slanted<EOL>)<EOL>self.glyphd[key] = Bunch(<EOL>font            = font,<EOL>fontsize        = fontsize,<EOL>postscript_name = font.get_fontname(),<EOL>metrics         = metrics,<EOL>symbol_name     = symbol_name,<EOL>num             = num,<EOL>glyph           = glyph,<EOL>offset          = offset<EOL>)<EOL>return self.glyphd[key]<EOL>
load the cmfont, metrics and glyph with caching