Fix return value of FreeTypeFont.textsize() does not include font offsets#784
Fix return value of FreeTypeFont.textsize() does not include font offsets#784aclark4life merged 1 commit intopython-pillow:masterfrom
Conversation
|
This is going to change the rendering for anyone who's got code that uses textsize. We should be very reluctant to break peoples code like that, especially since it's a silent break that changes the behavior. |
|
True, I would deprecate in the next release & fix in the next next release. So this PR should add a deprecation warning… and nothing else. Maybe. |
|
Perhaps We should also be thinking about incorporating some of the metrics in a decent api, so that people can place the text accurately. That had come up in an issue or two before. (a: size is lost once youmake the font, and b: metrics are very ill defined from the various methods). |
|
In PIL-1.1.7 and Pillow-2.1.0, ImageDraw#textsize() and ImageFont.textsize() return size of bounding box for text. This change came from #185 and #333. So I think this is a bug fix, not a breaking change. of course, decent APIs are welcome. |
Fix return value of FreeTypeFont.textsize() does not include font offsets
|
Thanks |
Fixes #644