Skip to content

Conversation

@radarhere
Copy link
Member

Resolves #4366

The issue reported that the stroke was incorrectly positioned when writing the text 'Sample Overlay Text'. Testing for that issue, I found that it was only happening for FreeType < 2.9 - all three of the values being used in calculating the ascender (bitmap.rows, glyph_slot->bitmap_top and PIXEL(glyph_info[i].y_offset)) were zero. I find that always passing in FT_LOAD_RENDER when loading the glyphs for those calculations fixes that.

However, FreeType < 2.9 is a scenario in our test environments, so why wasn't this picked up? It's because 'Sample Overlay Text' has descenders - 'p' and 'y' go below the baseline of the text. The current stroke text tests involve 'A', 'A\nB' and 'ABC\nAaaa' - no descenders.

@python-pillow python-pillow deleted a comment from codecov bot Feb 2, 2020
@python-pillow python-pillow deleted a comment from codecov bot Feb 16, 2020
@python-pillow python-pillow deleted a comment from codecov bot Feb 16, 2020
@python-pillow python-pillow deleted a comment from codecov bot Feb 19, 2020
@hugovk hugovk merged commit da4667c into python-pillow:master Mar 5, 2020
@hugovk
Copy link
Member

hugovk commented Mar 5, 2020

Thank you!

This was referenced Mar 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

2 participants