def inspect_font(filename):
    try:
        info = ttf.TruetypeInfo(filename)
        print '%s:' % filename,
        print info.get_name('family'), 
        print 'bold=%r' % info.is_bold(),
        print 'italic=%r' % info.is_italic(),
    except:
        print '''%s could not be identified.  It is probably not a TrueType or
OpenType font.  However, pyglet may still be able to load it
on some platforms.''' % filename
dataset/ETHPy150Open ardekantur/pyglet/tools/inspect_font.py/inspect_font/original