font fixes:

- replace font to UI_Canvas_Fonts.Font_Main (which supports chinese);
- scaling configured (not final).
This commit is contained in:
GenZmeY 2020-12-12 13:44:34 +03:00
parent 90afcb8b40
commit 570ed51111

View File

@ -17,7 +17,7 @@ function InitStyle()
if (LoadedTex[i]==None)
LoadedTex[i] = Texture2D'EngineMaterials.DefaultWhiteGrid';
// TODO: SmallFont/TinyFont not support unicode
DrawFonts[0] = Font(DynamicLoadObject("UI_Canvas_Fonts.Font_General",class'Font'));
DrawFonts[0] = Font(DynamicLoadObject("UI_Canvas_Fonts.Font_Main",class'Font'));
DrawFonts[1] = Font(DynamicLoadObject("EngineFonts.SmallFont",class'Font'));
DrawFonts[2] = Font(DynamicLoadObject("EngineFonts.TinyFont",class'Font'));
for (i=0; i<ArrayCount(DrawFonts); ++i)
@ -508,22 +508,22 @@ function Font PickFont(byte i, out float Scaler)
switch (i)
{
case 0:
Scaler = 0.3;
return DrawFonts[0]; // use unicode font only
case 1:
Scaler = 0.35;
return DrawFonts[0]; // use unicode font only
case 2:
Scaler = 0.4;
return DrawFonts[0];
case 3:
Scaler = 0.55;
return DrawFonts[0];
case 1:
Scaler = 0.65;
return DrawFonts[0];
case 2:
Scaler = 0.70;
return DrawFonts[0];
case 3:
Scaler = 0.75;
return DrawFonts[0];
case 4:
Scaler = 0.6;
Scaler = 0.80;
return DrawFonts[0];
case 5:
Scaler = 0.75;
Scaler = 0.90;
return DrawFonts[0];
default:
Scaler = 1.0;