mirror of
https://github.com/UberGames/lilium-voyager.git
synced 2024-11-10 06:31:47 +00:00
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:
parent
ec6916ded5
commit
b85935d30c
2 changed files with 2 additions and 2 deletions
|
@ -1223,7 +1223,7 @@ static void CG_Text_Paint_Limit(float *maxX, float x, float y, float scale, vec4
|
||||||
continue;
|
continue;
|
||||||
} else {
|
} else {
|
||||||
float yadj = useScale * glyph->top;
|
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;
|
*maxX = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -537,7 +537,7 @@ static void Text_Paint_Limit(float *maxX, float x, float y, float scale, vec4_t
|
||||||
continue;
|
continue;
|
||||||
} else {
|
} else {
|
||||||
float yadj = useScale * glyph->top;
|
float yadj = useScale * glyph->top;
|
||||||
if (Text_Width(s, useScale, 1) + x > max) {
|
if (Text_Width(s, scale, 1) + x > max) {
|
||||||
*maxX = 0;
|
*maxX = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue