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 - TTF_RenderUTF8_Blended_Wrapped behaives badly when it can't wrap.
Summary: TTF_RenderUTF8_Blended_Wrapped behaives badly when it can't wrap.
Status: RESOLVED FIXED
Alias: None
Product: SDL_ttf
Classification: Unclassified
Component: misc (show other bugs)
Version: 2.0.12
Hardware: x86_64 Linux
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-11 18:43 UTC by jason
Modified: 2018-10-31 03:15 UTC (History)
1 user (show)

See Also:


Attachments
patch (1.07 KB, patch)
2018-10-30 17:45 UTC, Sylvain
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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