Client-Font: when loading fonts/fontcon.font, apply it to gl_font.

This commit is contained in:
Marco Cawthorne 2023-04-18 15:02:12 -07:00
parent 97a5d9d2cd
commit e1b024e345
Signed by: eukara
GPG Key ID: CE2032F0A2882A22
1 changed files with 8 additions and 0 deletions

View File

@ -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