Skip to content

建议增加默认字体在组件目录下,防止出现不同系统字体找不到 #5

@clhui

Description

@clhui
    @staticmethod
    def get_font(font_size, font_path=None):
        if font_path is None:
            font_path = str(Path(os.path.join(RESOURCES_DIR, 'DejaVuSans-Bold.ttf')))
        return ImageFont.truetype(font_path, font_size)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions