straggler in Utils/Font Control.cpp

This commit is contained in:
Marco Antonio J. Costa
2024-12-31 16:28:44 -03:00
parent 4a7625cef0
commit cccec0ef11
+11 -6
View File
@@ -5,6 +5,7 @@
#include "vsurface.h" #include "vsurface.h"
#include "wcheck.h" #include "wcheck.h"
#include "Font Control.h" #include "Font Control.h"
#include <language.hpp>
INT32 giCurWinFont = 0; INT32 giCurWinFont = 0;
//BOOLEAN gfUseWinFonts = FALSE; //BOOLEAN gfUseWinFonts = FALSE;
@@ -77,8 +78,8 @@ HVOBJECT gvoBlockFontNarrow;
INT32 gp14PointHumanist; INT32 gp14PointHumanist;
HVOBJECT gvo14PointHumanist; HVOBJECT gvo14PointHumanist;
#if defined( JA2EDITOR ) && defined( ENGLISH ) #if defined( JA2EDITOR )
INT32 gpHugeFont; INT32 gpHugeFont;
HVOBJECT gvoHugeFont; HVOBJECT gvoHugeFont;
#endif #endif
@@ -94,8 +95,8 @@ UINT16 CreateFontPaletteTables(HVOBJECT pObj );
extern UINT16 gzFontName[32]; extern UINT16 gzFontName[32];
auto GetHugeFont() -> INT32 { auto GetHugeFont() -> INT32 {
#if defined(JA2EDITOR) && defined(ENGLISH) #if defined(JA2EDITOR)
return gpHugeFont; return g_lang == i18n::Lang::en ? gpHugeFont : gp16PointArial;
#else #else
return gp16PointArial; return gp16PointArial;
#endif #endif
@@ -216,10 +217,12 @@ BOOLEAN InitializeFonts( )
gvo14PointHumanist = GetFontObject( gp14PointHumanist ); gvo14PointHumanist = GetFontObject( gp14PointHumanist );
CHECKF( CreateFontPaletteTables( gvo14PointHumanist ) ); CHECKF( CreateFontPaletteTables( gvo14PointHumanist ) );
#if defined( JA2EDITOR ) && defined( ENGLISH ) #if defined( JA2EDITOR )
if(g_lang == i18n::Lang::en) {
gpHugeFont = LoadFontFile( "FONTS\\HUGEFONT.sti" ); gpHugeFont = LoadFontFile( "FONTS\\HUGEFONT.sti" );
gvoHugeFont = GetFontObject( gpHugeFont ); gvoHugeFont = GetFontObject( gpHugeFont );
CHECKF( CreateFontPaletteTables( gvoHugeFont ) ); CHECKF( CreateFontPaletteTables( gvoHugeFont ) );
}
#endif #endif
// Set default for font system // Set default for font system
@@ -254,8 +257,10 @@ void ShutdownFonts( )
UnloadFont( gp14PointArial); UnloadFont( gp14PointArial);
UnloadFont( gpBlockyFont); UnloadFont( gpBlockyFont);
UnloadFont( gp12PointArialFixedFont ); UnloadFont( gp12PointArialFixedFont );
#if defined( JA2EDITOR ) && defined( ENGLISH ) #if defined( JA2EDITOR )
if(g_lang == i18n::Lang::en) {
UnloadFont( gpHugeFont ); UnloadFont( gpHugeFont );
}
#endif #endif
// ATE: Shutdown any win fonts // ATE: Shutdown any win fonts