Make it possible to change the encoding of fonts from the command
line, even if autodetected.
diff --git a/tools/fnt2bdf.c b/tools/fnt2bdf.c
index 13811d8..e4280ab 100644
--- a/tools/fnt2bdf.c
+++ b/tools/fnt2bdf.c
@@ -352,6 +352,8 @@
/* charset */
+ if( g_lpstrCharSet ) fprintf(fs, "%s\n", g_lpstrCharSet);
+ else
switch( cpe_font_struct->hdr.dfCharSet[0] )
{
/* Microsoft just had to invent its own charsets! */
@@ -370,12 +372,8 @@
default:
case OEM_CHARSET:
- if( !g_lpstrCharSet )
- {
fputs("Undefined charset, use -c option.\n", stderr);
return ERROR_DATA;
- }
- fprintf(fs, "%s\n", g_lpstrCharSet);
}
}
else return ERROR_DATA;