import fontawesome as fa
print(fa.icons["star"])
如果我要使用其他样式(例如:regular)怎么办?
预先感谢
克里斯·帕帕斯
编辑:
object_methods = [method_name for method_name in dir(fa)
if callable(getattr(fa, method_name))]
print(object_methods)
output --> []
我找到了一个答案:QtAwesome具有这些功能。 但是它有很多依赖项要安装。 毕竟,我认为tkinter不支持它。
因此,另一个问题是:我如何在tkinter中使用QtAwesome(将qta.icon('fa5.star')
转换为文本或在ImageTk.PhotoImage(Image.open(filename))
中使用