阿尼樱奈奈
2023-06-25 01:12 Moderator
星火商店安装Win字体试试。
Reply Like 0 View the author
星火商店安装Win字体试试。
下载星火应用商店,安装windows字体集。
下载星火应用商店,安装windows字体集。
都安装了,还是一样。
有没有可能是你的字体设置的问题?
你修改一下代码里面设置的字体试试。
换pyqt吧
你设置为别的字体试试看,有可能你的是点阵字体,不是矢量字体,导致的这个现象.
例如,如果你想将一个标签的字体设置为“华文楷体”,你可以这样写:
import tkinter as tk
from tkinter import font
root = tk.Tk()
my_font = font.Font(family="华文楷体", size=20)
my_label = tk.Label(root, text="这是一个标签", font=my_font)
my_label.pack()
root.mainloop()
不排除是程序的dpi有问题,
Linux 系统下:
还在查找😢
这个是windows系统下的:
用 ctypes.windll.shcore.SetProcessDpiAwareness(2)
函数看看。例如:
import tkinter as tk
import ctypes
ctypes.windll.shcore.SetProcessDpiAwareness(2)
root = tk.Tk()
my_label = tk.Label(root, text="这是一个标签")
my_label.pack()
root.mainloop()
换pyqt吧
神末:PYQT从哪下载,从软件商店与星火商店都没找到
神末:PYQT从哪下载,从软件商店与星火商店都没找到
sudo apt-get install python3-pyqt5
sudo apt-get install python3-pyqt5
好的,谢谢,上午从神末的星火上装了pycham专业版,而且也成功激活了。
好的,谢谢,上午从神末的星火上装了pycham专业版,而且也成功激活了。
你激活的是正版码?
你激活的是正版码?
专业版
Popular Events
More
我使用Python Tkinter开发UI,为什么字体看不清楚?