|
|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
×
- >>> from pygame import *
- pygame 2.3.0 (SDL 2.24.2, Python 3.9.9)
- Hello from the pygame community. (提示不能发表链接,本来这里是pygame的官方文档链接)
- >>> screen = display.set_mode((640, 480))
- >>> font = pygame.font.SysFont('arial', 10)
- Traceback (most recent call last):
- File "<pyshell#2>", line 1, in <module>
- font = pygame.font.SysFont('arial', 10)
- NameError: name 'pygame' is not defined
- >>> font = font.SysFont('arial', 10)
- Traceback (most recent call last):
- File "<pyshell#3>", line 1, in <module>
- font = font.SysFont('arial', 10)
- File "D:\Python\lib\site-packages\pygame\sysfont.py", line 459, in SysFont
- return constructor(fontname, size, set_bold, set_italic)
- File "D:\Python\lib\site-packages\pygame\sysfont.py", line 377, in font_constructor
- font = Font(fontpath, size)
- pygame.error: font not initialized
复制代码 |
|