Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pillow 字体绘制存在问题 #25

Closed
TakWolf opened this issue Aug 2, 2022 · 0 comments
Closed

Pillow 字体绘制存在问题 #25

TakWolf opened this issue Aug 2, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@TakWolf
Copy link
Owner

TakWolf commented Aug 2, 2022

问题跟踪:

python-pillow/Pillow#1646

python-pillow/Pillow#6469

这和字体构建本身无关,但是可能会影响相关图片物料的生成,有可能导致 build.py 执行失败

暂时使用如下 hack

ascent, descent = font.getmetrics()
line_gap = 0  # need to be set manually
line_height = ascent + descent + line_gap  # the correct way
spacing = line_height - font.getsize('A')[1]

需要等待上游彻底修复该问题

@TakWolf TakWolf added the enhancement New feature or request label Aug 2, 2022
@TakWolf TakWolf closed this as completed Sep 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant