推荐学习书目
› Learn Python the Hard Way
Python Sites
› PyPI - Python Package Index
› http://diveintopython.org/toc/index.html
› Pocoo
值得关注的项目
› PyPy
› Celery
› Jinja2
› Read the Docs
› gevent
› pyenv
› virtualenv
› Stackless Python
› Beautiful Soup
› 结巴中文分词
› Green Unicorn
› Sentry
› Shovel
› Pyflakes
› pytest
Python 编程
› pep8 Checker
Styles
› PEP 8
› Google Python Style Guide
› Code Style from The Hitchhiker's Guide
woshichuanqilz
V2EX  ›  Python

pygame Linux 如何设置中文?

  •  
  •   woshichuanqilz · May 20, 2022 · 2553 views
    This topic created in 1609 days ago, the information mentioned may be changed or developed.

    我运行命令: pygame.font.get_fonts(), 拿到了一个字体列表, 找到一个字体: wenquanyimicorhei 应该是支持中文的, 但是然后运行命令,

    说找不到这个文件. FileNotFoundError: [Errno 2] No such file or directory: 'wenquanyimicrohei'

    然后我随便下载了一个中文字体文件, xxx.ttf 文件

    运行命令: pygame.font.Font('xxx.ttf', 72), 运行成功了但是中英文都不显示了. 问下如何解决

    kokutou
        1
    kokutou  
       May 20, 2022 via Android
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   5419 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 46ms · UTC 01:29 · PVG 09:29 · LAX 18:29 · JFK 21:29
    ♥ Do have faith in what you're doing.