

def _ismonofont(font):
    "Returns True if all the characters in the font are of the same width, indicating that this is a monospace font.\n\n    TODO - Not sure what I was planning to use this function for. I'll leave it in here for now.\n    "
    minwidth = 0
    minheight = 0
    for i in range(32, 127):
        surf = font.render(chr(i), True, (0, 0, 0))
        if (surf.get_width() < minwidth):
            minwidth = surf.get_width()
        if (surf.get_height() < minheight):
            minheight = surf.get_height()
    (maxwidth, maxheight) = calcfontsize(font)
    return (((maxwidth - minheight) <= 3) and ((maxheight - minheight) <= 3))

dataset/ETHPy150Open asweigart/pygcurse/pygcurse/__init__.py _ismonofont/VarMisuse@116/231 `minwidth`->`minheight`