You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Switched project development from openSUSE global Python environment to a virtual environment.
What did you expect to happen?
No changes in font rendering.
What actually happened?
Wrong font spacing appears. This results in uneven letter spacing and uneven alignment. Seems quite similar to #3977
I checked with different TrueType fonts, the problem persists.
There is confirmation that others in the virtual environment have the same render. And the problem has persisted for more than a year.
No bug on 9.1.1 and earlier ones.
On 9.2, the bug behaves a little different: rounding seems to be changed to the other side, and the effect sometimes disappears.
This looks like a duplicate of #4483, partially related to #7747 and #6871 as well.
I expect adding layout_engine=ImageFont.Layout.BASIC will produce the results you expect:
To explain a bit: Pillow can use different methods to compute the positions of glyphs used when rendering text. BASIC layout simply converts character values directly to corresponding glyphs and sums their offsets. RAQM layout uses the libraqm library (which supports more advanced text layout and is recommended for all non-English text) to compute glyph mappings and positions. While BASIC layout rounds the current offset to an exact pixel after each glyph, RAQM layout doesn't seem to do this and IIRC libraqm did not support this at all when I tried it in the past. However, I would not call this a bug, just a different approach to the same problem -- making sure glyphs are rendered at exact pixel coordinates to avoid artifacts.
What did you do?
Switched project development from openSUSE global Python environment to a virtual environment.
What did you expect to happen?
No changes in font rendering.
What actually happened?
Wrong font spacing appears. This results in uneven letter spacing and uneven alignment. Seems quite similar to #3977
I checked with different TrueType fonts, the problem persists.
There is confirmation that others in the virtual environment have the same render. And the problem has persisted for more than a year.
No bug on 9.1.1 and earlier ones.
On 9.2, the bug behaves a little different: rounding seems to be changed to the other side, and the effect sometimes disappears.
What are your OS, Python and Pillow versions?
Comparison of the bagged and not-bagged test results:
The impact of this bug on the project looks like this:
The text was updated successfully, but these errors were encountered: