mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-30 08:44:31 +00:00
Restore con_fontscale functionality
This commit is contained in:
parent
a015d6b915
commit
fd1f0e685a
@ -613,7 +613,7 @@ static qboolean Con_LoadVariableWidthFont( const char *fontname, cl_font_t *font
|
|||||||
if( buffer && length >= sizeof( qfont_t ))
|
if( buffer && length >= sizeof( qfont_t ))
|
||||||
{
|
{
|
||||||
src = (qfont_t *)buffer;
|
src = (qfont_t *)buffer;
|
||||||
font->charHeight = src->rowheight;
|
font->charHeight = src->rowheight * con_fontscale->value;;
|
||||||
font->type = FONT_VARIABLE;
|
font->type = FONT_VARIABLE;
|
||||||
|
|
||||||
// build rectangles
|
// 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].right = font->fontRc[i].left + src->fontinfo[i].charwidth;
|
||||||
font->fontRc[i].top = (word)src->fontinfo[i].startoffset / fontWidth;
|
font->fontRc[i].top = (word)src->fontinfo[i].startoffset / fontWidth;
|
||||||
font->fontRc[i].bottom = font->fontRc[i].top + src->rowheight;
|
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;
|
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;
|
t1 = (float)rc->top / height;
|
||||||
s2 = (float)rc->right / width;
|
s2 = (float)rc->right / width;
|
||||||
t2 = (float)rc->bottom / height;
|
t2 = (float)rc->bottom / height;
|
||||||
width = rc->right - rc->left;
|
width = ( rc->right - rc->left ) * con_fontscale->value;
|
||||||
height = rc->bottom - rc->top;
|
height = ( rc->bottom - rc->top ) * con_fontscale->value;
|
||||||
|
|
||||||
if( clgame.ds.adjust_size )
|
if( clgame.ds.adjust_size )
|
||||||
Con_TextAdjustSize( &x, &y, &width, &height );
|
Con_TextAdjustSize( &x, &y, &width, &height );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user