| Summary: | bug rendering a string starting with glyph with negative minx, in TTF_RenderUTF8_Shaded | ||
|---|---|---|---|
| Product: | SDL_ttf | Reporter: | Sylvain <sylvain.becker> |
| Component: | misc | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | ||
| Version: | unspecified | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Attachments: |
test case
ttf font ttf font with no problem |
||
|
Description
Sylvain
2014-03-29 13:42:33 UTC
Created attachment 1622 [details]
test case
test case
Created attachment 1623 [details]
ttf font
And also the font for the testcase. All fonts do not make the bug appear. This one does.
I was thinking of this patch :
diff -r 1854597a90fd SDL_ttf.c
--- a/SDL_ttf.c Sun Feb 02 02:32:02 2014 -0800
+++ b/SDL_ttf.c Thu Apr 17 08:55:46 2014 +0200
@@ -1583,7 +1583,7 @@
/* Load and render each character */
textlen = SDL_strlen(text);
- first = SDL_FALSE;
+ first = SDL_TRUE;
xstart = 0;
while ( textlen > 0 ) {
Uint16 c = UTF8_getch(&text, &textlen);
But this is not perfect. The "." does not appear, but the "J" is not fully rendered.
Created attachment 1624 [details]
ttf font with no problem
This TTF font has no problem !
Sorry, the two fonts are different. So the "J" is rendered as exepected when the patch is applied. Please double-check the patch and apply it. Thanks Fixed, thanks! https://hg.libsdl.org/SDL_ttf/rev/86d0c63699f4 |