pyos.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:PythonOS 作者: furmada 项目源码 文件源码
def __init__(self, path="res/RobotoCondensed-Regular.ttf", minSize=10, maxSize=30):
            self.path = path
            curr_size = minSize
            self.sizes = {}
            self.ft_support = True
            self.ft_sizes = {}
            while curr_size <= maxSize:
                if self.ft_support:
                    try:
                        self.ft_sizes[curr_size] = pygame.freetype.Font(path, curr_size)
                    except:
                        self.ft_support = False
                self.sizes[curr_size] = pygame.font.Font(path, curr_size)
                curr_size += 1
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号