From e1b024e3457322e9bfdc66f81b503d4c1a52a51d Mon Sep 17 00:00:00 2001 From: Marco Cawthorne Date: Tue, 18 Apr 2023 15:02:12 -0700 Subject: [PATCH] Client-Font: when loading fonts/fontcon.font, apply it to gl_font. --- src/client/font.qc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/client/font.qc b/src/client/font.qc index 97ff5f1c..e0b922dd 100644 --- a/src/client/font.qc +++ b/src/client/font.qc @@ -89,6 +89,14 @@ Font_Load(string strFile, font_s &fntNew) fntNew.iID = (int)loadfont("", strFontPath, strRenderSize, -1, 0, 0); } else fntNew.iID = (int)loadfont("", strFontPath, ftos((float)fntNew.iScaleY), -1, 0, 0); + + /* this is the console font, so make sure we use it */ + if (strFile == "fonts/fontcon.font") { + string r = ftos(fntNew.vecColor[0]); + string g = ftos(fntNew.vecColor[0]); + string b = ftos(fntNew.vecColor[0]); + cvar_set("gl_font", strcat(strFontPath, "?col=", r, ",", g, ",", b)); + } } void