mirror of
https://github.com/DrBeef/ioq3quest.git
synced 2024-11-10 14:52:00 +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;
|
||||
} 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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue