Difficult-Rocket/Difficult_Rocket/client/guis/label.py
2022-10-29 19:13:00 +08:00

26 lines
609 B
Python

# -------------------------------
# Difficult Rocket
# Copyright © 2021-2022 by shenjackyuanjie 3695888@qq.com
# All rights reserved
# -------------------------------
"""
writen by shenjackyuanjie
mail: 3695888@qq.com
github: @shenjackyuanjie
gitee: @shenjackyuanjie
"""
from pyglet.text import DocumentLabel
class FontsLabel(DocumentLabel):
"""
一个基于HTMLLabel的 可以同时在一行字里面显示多种字体的 Label
"""
def __init__(self, x, y, width, height):
super().__init__(x, y, width, height)
self._text = 'a'
self.formatted_text = 'a'