engine: client: fix HUD font loading

This commit is contained in:
Alibek Omarov 2023-01-27 19:07:26 +03:00
parent 279e391949
commit 39fd30a472
1 changed files with 6 additions and 7 deletions

View File

@ -603,13 +603,11 @@ void SCR_LoadCreditsFont( void )
} }
} }
if( !success && !Con_LoadVariableWidthFont( "gfx/creditsfont.fnt", font, 1.0f, TF_FONT )) if( !success )
{ success = Con_LoadVariableWidthFont( "gfx/creditsfont.fnt", font, 1.0f, TF_FONT );
if( !Con_LoadFixedWidthFont( "gfx/conchars", font, 1.0f, TF_FONT ))
{ if( !success )
Con_DPrintf( S_ERROR "failed to load HUD font\n" ); success = Con_LoadFixedWidthFont( "gfx/conchars", font, 1.0f, TF_FONT );
}
}
// copy font size for client.dll // copy font size for client.dll
if( success ) if( success )
@ -621,6 +619,7 @@ void SCR_LoadCreditsFont( void )
for( i = 0; i < ARRAYSIZE( cls.creditsFont.charWidths ); i++ ) for( i = 0; i < ARRAYSIZE( cls.creditsFont.charWidths ); i++ )
clgame.scrInfo.charWidths[i] = cls.creditsFont.charWidths[i]; clgame.scrInfo.charWidths[i] = cls.creditsFont.charWidths[i];
} }
else Con_DPrintf( S_ERROR "failed to load HUD font\n" );
} }
/* /*