@classmethod
    def have_font(cls, name):
        name = unicode(name)
        if name in cls._loaded_CGFont_table: return True
        # Try to create the font to see if it exists.
        # TODO: Find a better way to check.
        cfstring = CFSTR(name)
        cgfont = c_void_p(quartz.CGFontCreateWithFontName(cfstring))
        cf.CFRelease(cfstring)
        if cgfont:
            cf.CFRelease(cgfont)
            return True
        return False
dataset/ETHPy150Open ardekantur/pyglet/pyglet/font/quartz.py/QuartzFont.have_font/original