-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Font rendering issue with ttc font #7871
Comments
It seems like you're uploading screenshots of the images, rather than the images themselves. Moving forward, I think it would be more helpful to have the images themselves. I'm guessing that you're installing Pillow from the wheels, using something like
If you could figure out exactly which version, that would be interesting. |
I uploaded screenshots because the rest of the image is much larger and irrelevant, I really only needed to show the affected area, but if I do more tests I guess I'll just try to make a smaller canvas with text only that can be uploaded here. And yeah I installed via pip. |
You could also just crop the original image? I think the screenshots are introducing an element of blurriness. |
I'm pretty confident they aren't, do you not see the difference between the two images? It looks pretty clear to me, even on my phone |
I do see a difference. I was just trying to improve the quality of what we were looking at here - I don't think it's worth discussing further. |
Based on the images, this is almost certainly caused by #4955 fixing #891. The previous behaviour was caused by a bug where Pillow was ignoring embedded bitmaps in a font. OpenType fonts can contain embedded bitmaps in the EBDT table. This is supposed to provide better quality when rendering at small font sizes. Unfortunately, it seems that the font you are using did not implement this very well. You may be able to remove the embedded bitmap table with a tool such as FontForge. |
Thanks very much nulano. Is this resolved then? |
Yeah I suppose so. I'll close it |
What did you do?
It seems that font rendering changed for the worse between 7.2.0 and 8.x, not sure which version exactly. (edit, it changed between 7.2 and 8.0). I had this issue a few years ago when I tried to upgrade to 8.x so I had to revert, but now I really have a need to upgrade.
Below is a comparison image, with the caption text rendered with draw.text() in Pillow 7.2.0 on the left and 10.2 on the right. On the right, you can see that the text appears to have lost it's softer anti-aliased look and kerning in some spots - some letters are touching each other.
I searched up and down and couldn't find any other reports of anything like this, I did try a few suggestions like setting draw.textmode = 'L' and enabling the kern feature, but nothing worked.
All I'm looking for is a solution or suggestions to get the old look back. The font used is msgothic.ttc, index 1.
What are your OS, Python and Pillow versions?
The text was updated successfully, but these errors were encountered: