Add the ability to print unicode characters in addition to "Latin1" ones

This commit is contained in:
Thomas Bernard
2018-02-11 21:43:44 +01:00
parent b564a4d4f4
commit 545308265b
11 changed files with 236 additions and 38 deletions

View File

@@ -745,12 +745,13 @@ int Init_program(int argc,char * argv[])
Copy_preset_sieve(0);
// Font
if (!(Menu_font=Load_font(Config.Font_file)))
if (!(Menu_font=Load_font(DEFAULT_FONT_FILENAME)))
if (!(Menu_font=Load_font(Config.Font_file, 1)))
if (!(Menu_font=Load_font(DEFAULT_FONT_FILENAME, 1)))
{
printf("Unable to open the default font file: %s\n", DEFAULT_FONT_FILENAME);
Error(ERROR_GUI_MISSING);
}
Load_Unicode_fonts();
memcpy(Main.palette, Gfx->Default_palette, sizeof(T_Palette));
@@ -993,6 +994,16 @@ void Program_shutdown(void)
free(Gfx);
Gfx=NULL;
free(Menu_font);
Menu_font = NULL;
while (Unicode_fonts != NULL)
{
T_Unicode_Font * ufont = Unicode_fonts->Next;
free(Unicode_fonts->FontData);
free(Unicode_fonts);
Unicode_fonts = ufont;
}
// On prend bien soin de passer dans le répertoire initial:
if (chdir(Initial_directory)!=-1)
{