Restore con_fontscale functionality

This commit is contained in:
Alibek Omarov 2018-04-21 00:03:59 +03:00
parent a015d6b915
commit fd1f0e685a
1 changed files with 4 additions and 4 deletions

View File

@ -613,7 +613,7 @@ static qboolean Con_LoadVariableWidthFont( const char *fontname, cl_font_t *font
if( buffer && length >= sizeof( qfont_t ))
{
src = (qfont_t *)buffer;
font->charHeight = src->rowheight;
font->charHeight = src->rowheight * con_fontscale->value;;
font->type = FONT_VARIABLE;
// build rectangles
@ -623,7 +623,7 @@ static qboolean Con_LoadVariableWidthFont( const char *fontname, cl_font_t *font
font->fontRc[i].right = font->fontRc[i].left + src->fontinfo[i].charwidth;
font->fontRc[i].top = (word)src->fontinfo[i].startoffset / fontWidth;
font->fontRc[i].bottom = font->fontRc[i].top + src->rowheight;
font->charWidths[i] = src->fontinfo[i].charwidth;
font->charWidths[i] = src->fontinfo[i].charwidth * con_fontscale->value;;
}
font->valid = true;
}
@ -917,8 +917,8 @@ static int Con_DrawGenericChar( int x, int y, int number, rgba_t color )
t1 = (float)rc->top / height;
s2 = (float)rc->right / width;
t2 = (float)rc->bottom / height;
width = rc->right - rc->left;
height = rc->bottom - rc->top;
width = ( rc->right - rc->left ) * con_fontscale->value;
height = ( rc->bottom - rc->top ) * con_fontscale->value;
if( clgame.ds.adjust_size )
Con_TextAdjustSize( &x, &y, &width, &height );