Merge pull request #871 from Guldoman/fix_bad_clip_draw_text
Always check if the beginning of the text needs to be clipped
This commit is contained in:
commit
8a31a2b169
|
@ -289,7 +289,7 @@ float ren_draw_text(RenFont **fonts, const char *text, float x, int y, RenColor
|
||||||
break;
|
break;
|
||||||
if (start_x + (glyph_end - glyph_start) >= clip_end_x)
|
if (start_x + (glyph_end - glyph_start) >= clip_end_x)
|
||||||
glyph_end = glyph_start + (clip_end_x - start_x);
|
glyph_end = glyph_start + (clip_end_x - start_x);
|
||||||
else if (start_x < clip.x) {
|
if (start_x < clip.x) {
|
||||||
int offset = clip.x - start_x;
|
int offset = clip.x - start_x;
|
||||||
start_x += offset;
|
start_x += offset;
|
||||||
glyph_start += offset;
|
glyph_start += offset;
|
||||||
|
|
Loading…
Reference in New Issue