libsdl-org/SDL_ttf

Text is shifted off-center when wrapped using TTF_WRAPPED_ALIGN_CENTER

Marmotus opened this issue · 4 comments

Hello! I've been enjoying my time using SDL a bunch and just noticed something that is causing me a slight issue. It seems like spaces are left over when text is wrapped, causing the text to be shifted a bit off-center. I've attached two images that hopefully demonstrate what I mean. The first one is when the text is too short to wrap, and the second one is when the text has been wrapped.

Example 1

Example 2

Would it be possible to change this behavior to trim trailing spaces like that?

Thank you all for the great library, by the way. 🙏😁

Yep!