We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 3171

Summary: TTF_RenderUTF8_Blended_Wrapped behaives badly when it can't wrap.
Product: SDL_ttf Reporter: jason
Component: miscAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 CC: sylvain.becker
Version: 2.0.12   
Hardware: x86_64   
OS: Linux   
Attachments: patch

Description jason 2015-11-11 18:43:10 UTC
If a string cannot be wrapped within the wrap limits due to having no space, then the text starts overwriting itself.

It should at least arbitrarily split a long line, even if this isn't language correct, as overwriting the same line is no help at all.
Comment 1 Sylvain 2018-10-30 17:45:08 UTC
Created attachment 3416 [details]
patch

small workaround: an unbreakable line doesn't render overlapped 

and also clear kerning at beginning of line.
Comment 2 Sylvain 2018-10-30 21:40:52 UTC
"and also clear kerning at beginning of line."

This one is actually an issue. it can remain a prev_index and do a kerning with "space" and "A" for instance, and you get a negative xstart. which a cause of overlap.
Comment 3 Sam Lantinga 2018-10-31 03:15:33 UTC
Patch added, thanks!
https://hg.libsdl.org/SDL_ttf/rev/a17fa7057563