From b85935d30c4169188753cccb071934225f5fbea0 Mon Sep 17 00:00:00 2001 From: Zack Middleton Date: Mon, 14 Sep 2015 04:31:45 -0500 Subject: [PATCH] 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. --- code/cgame/cg_newdraw.c | 2 +- code/ui/ui_main.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/code/cgame/cg_newdraw.c b/code/cgame/cg_newdraw.c index dc3ed42a..85c8040b 100644 --- a/code/cgame/cg_newdraw.c +++ b/code/cgame/cg_newdraw.c @@ -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; } diff --git a/code/ui/ui_main.c b/code/ui/ui_main.c index a33371d6..8de581a7 100644 --- a/code/ui/ui_main.c +++ b/code/ui/ui_main.c @@ -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; }