Add System font for the Chinese codepages cp936 and cp950. Of course
they don't contain any ideographs (and nor should they).
diff --git a/fonts/.cvsignore b/fonts/.cvsignore
index 8b58a76..7cace02 100644
--- a/fonts/.cvsignore
+++ b/fonts/.cvsignore
@@ -6,6 +6,7 @@
wine_courier-1251-96-13.fnt
wine_courier-1252-96-13.fnt
wine_courier.ttf
+wine_cvgasys.fon
wine_marlett.ttf
wine_sans_serif-1250-96-13.fnt
wine_sans_serif-1250-96-16.fnt
@@ -19,9 +20,12 @@
wine_sserife.fon
wine_sserifee.fon
wine_sserifer.fon
+wine_svgasys.fon
wine_system-1250-96-16.fnt
wine_system-1251-96-16.fnt
wine_system-1252-96-16.fnt
+wine_system-936-96-16.fnt
+wine_system-950-96-16.fnt
wine_system.ttf
wine_vgasys.fon
wine_vgasyse.fon
diff --git a/fonts/Makefile.in b/fonts/Makefile.in
index 60b7bd6..a1f622b 100644
--- a/fonts/Makefile.in
+++ b/fonts/Makefile.in
@@ -14,7 +14,9 @@
wine_sserifer.fon \
wine_vgasys.fon \
wine_vgasyse.fon \
- wine_vgasysr.fon
+ wine_vgasysr.fon \
+ wine_svgasys.fon \
+ wine_cvgasys.fon
TRUETYPE_FONTS = \
wine_marlett.ttf
@@ -78,6 +80,21 @@
wine_system-1251-96-16.fnt: wine_system.ttf $(SFNT2FNT)
$(LDPATH) $(SFNT2FNT) $< 16 1251 96 128 7
+wine_system-936-96-16.fnt: wine_system.ttf $(SFNT2FNT)
+ $(LDPATH) $(SFNT2FNT) $< 16 936 96 128 7
+
+wine_system-950-96-16.fnt: wine_system.ttf $(SFNT2FNT)
+ $(LDPATH) $(SFNT2FNT) $< 16 950 96 128 7
+
+wine_coure.fon: wine_courier-1252-96-13.fnt $(FNT2FON)
+ $(FNT2FON) wine_courier-1252-96-13.fnt $@
+
+wine_couree.fon: wine_courier-1250-96-13.fnt $(FNT2FON)
+ $(FNT2FON) wine_courier-1250-96-13.fnt $@
+
+wine_courer.fon: wine_courier-1251-96-13.fnt $(FNT2FON)
+ $(FNT2FON) wine_courier-1251-96-13.fnt $@
+
wine_sserife.fon: wine_sans_serif-1252-96-13.fnt wine_sans_serif-1252-96-16.fnt wine_sans_serif-1252-96-20.fnt $(FNT2FON)
$(FNT2FON) wine_sans_serif-1252-96-13.fnt wine_sans_serif-1252-96-16.fnt wine_sans_serif-1252-96-20.fnt $@
@@ -96,14 +113,11 @@
wine_vgasysr.fon: wine_system-1251-96-16.fnt $(FNT2FON)
$(FNT2FON) wine_system-1251-96-16.fnt $@
-wine_coure.fon: wine_courier-1252-96-13.fnt $(FNT2FON)
- $(FNT2FON) wine_courier-1252-96-13.fnt $@
+wine_svgasys.fon: wine_system-936-96-16.fnt wine_system-1252-96-16.fnt $(FNT2FON)
+ $(FNT2FON) wine_system-936-96-16.fnt wine_system-1252-96-16.fnt $@
-wine_couree.fon: wine_courier-1250-96-13.fnt $(FNT2FON)
- $(FNT2FON) wine_courier-1250-96-13.fnt $@
-
-wine_courer.fon: wine_courier-1251-96-13.fnt $(FNT2FON)
- $(FNT2FON) wine_courier-1251-96-13.fnt $@
+wine_cvgasys.fon: wine_system-950-96-16.fnt wine_system-1252-96-16.fnt $(FNT2FON)
+ $(FNT2FON) wine_system-950-96-16.fnt wine_system-1252-96-16.fnt $@
install:: $(FONTS)
$(MKINSTALLDIRS) $(fontdir)
diff --git a/tools/sfnt2fnt.c b/tools/sfnt2fnt.c
index 1a1953d..abc2d2d 100644
--- a/tools/sfnt2fnt.c
+++ b/tools/sfnt2fnt.c
@@ -134,9 +134,14 @@
fprintf(stderr, "Can't find codepage %d\n", enc);
exit(1);
}
+
if(cptable->info.char_size != 1) {
- fprintf(stderr, "Can't cope with double byte codepages\n");
- exit(1);
+ /* for double byte charsets we actually want to use cp1252 */
+ cptable = wine_cp_get_table(1252);
+ if(!cptable) {
+ fprintf(stderr, "Can't find codepage 1252\n");
+ exit(1);
+ }
}
ppem = face->size->metrics.y_ppem;
@@ -154,8 +159,8 @@
}
il = ascent - (face->glyph->metrics.height >> 6);
- /* Hack: Courier has no internal leading, so we do likewise */
- if(!strcmp(face->family_name, "Wine Courier"))
+ /* Hack: Courier has no internal leading, nor do any Chinese fonts */
+ if(!strcmp(face->family_name, "Wine Courier") || enc == 936 || enc == 950)
il = 0;
first_char = FT_Get_First_Char(face, &gi);