@utils.memoize
def get_font_files():
    dirs = [os.path.join(os.path.dirname(__file__), 'fonts'),
            os.path.expanduser('~/.fonts')]

    sys_dirs = [
        # this is where ubuntu puts fonts
        '/usr/share/fonts/truetype',
        # this is where fedora puts fonts
        '/usr/share/fonts',
    ]

    for dirname in sys_dirs:
        try:
            dirs += [os.path.join(dirname, subdir)
                     for subdir in os.listdir(dirname)]
        except OSError:
            pass

    return [(p, os.listdir(p)) for p in dirs if os.path.isdir(p)]
Returns a list of all font files we could find
dataset/ETHPy150Open jart/fabulous/fabulous/text.py/get_font_files