我尝试在 Python Guizero 的按钮和文本中使用一些字体。但它总是显示相同的字体。所有字体都安装在我的 Linux 系统中,但 guizero 没有显示它们。
有人知道如何使用系统中的其他字体吗?我需要安装在我的环境中吗?我该怎么做?
from guizero import App,Text,PushButton
def troca():
message.font="arial"
if __name__ == '__main__':
app = App(title="Run Pre BRAMS",layout="grid",height=500,width=300)
message = Text(app, text="Just a test",font="Helvetica",color='blue',grid=[1,1])
button = PushButton(app, troca, text="exchange", grid=[2,2])
app.display()