Fix glyph width calculation in Text_Paint_Limit

Text_Width's scale argument will be multiplied by glyphScale, so don't
pass useScale that is already multiplied by glyphScale as this makes
the scale too big.
This commit is contained in:
Zack Middleton 2015-09-14 04:31:45 -05:00
parent ec6916ded5
commit b85935d30c
2 changed files with 2 additions and 2 deletions

View file

@ -1223,7 +1223,7 @@ static void CG_Text_Paint_Limit(float *maxX, float x, float y, float scale, vec4
continue;
} else {
float yadj = useScale * glyph->top;
if (CG_Text_Width(s, useScale, 1) + x > max) {
if (CG_Text_Width(s, scale, 1) + x > max) {
*maxX = 0;
break;
}

View file

@ -537,7 +537,7 @@ static void Text_Paint_Limit(float *maxX, float x, float y, float scale, vec4_t
continue;
} else {
float yadj = useScale * glyph->top;
if (Text_Width(s, useScale, 1) + x > max) {
if (Text_Width(s, scale, 1) + x > max) {
*maxX = 0;
break;
}