Difficult-Rocket/Difficult_Rocket/client/guis/label.py

26 lines
609 B
Python
Raw Permalink Normal View History

2021-12-26 23:06:03 +08:00
# -------------------------------
# Difficult Rocket
2023-01-20 14:08:12 +08:00
# Copyright © 2020-2023 by shenjackyuanjie 3695888@qq.com
2021-12-26 23:06:03 +08:00
# All rights reserved
# -------------------------------
"""
writen by shenjackyuanjie
mail: 3695888@qq.com
github: @shenjackyuanjie
gitee: @shenjackyuanjie
"""
2022-10-29 19:13:00 +08:00
from pyglet.text import DocumentLabel
2021-12-26 23:06:03 +08:00
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'