FontSubstitute values by Locale
Aric Stewart
aric at codeweavers.com
Sun Mar 4 21:43:00 CST 2007
the values for MS Shell Dlg and Tms Rmn vary based on locale as
determined by comparing the values on a default japanese windows2000 and
us-english win2000 install. set these values like we do other font
values based on codepage. And as such remove the values from the .inf file.
---
dlls/gdi32/freetype.c | 38 ++++++++++++++++++++++++++++++++++++++
tools/wine.inf | 2 --
2 files changed, 38 insertions(+), 2 deletions(-)
-------------- next part --------------
diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c
index 0e3ecb5..83d8e32 100644
--- a/dlls/gdi32/freetype.c
+++ b/dlls/gdi32/freetype.c
@@ -1732,67 +1732,84 @@ static const struct nls_update_font_list
UINT ansi_cp, oem_cp;
const char *oem, *fixed, *system;
const char *courier, *serif, *small, *sserif;
+ /* these are for font substitute */
+ const char *shelldlg, *tmsrmn;
} nls_update_font_list[] =
{
/* Latin 1 (United States) */
{ 1252, 437, "vgaoem.fon", "vgafix.fon", "vgasys.fon",
"coure.fon", "serife.fon", "smalle.fon", "sserife.fon",
+ "Tahoma","Times New Roman",
},
/* Latin 1 (Multilingual) */
{ 1252, 850, "vga850.fon", "vgafix.fon", "vgasys.fon",
"coure.fon", "serife.fon", "smalle.fon", "sserife.fon",
+ "Tahoma","Times New Roman", /* FIXME unverified */
},
/* Eastern Europe */
{ 1250, 852, "vga852.fon", "vgafixe.fon", "vgasyse.fon",
"couree.fon", "serifee.fon", "smallee.fon", "sserifee.fon",
+ "Tahoma","Times New Roman", /* FIXME unverified */
},
/* Cyrillic */
{ 1251, 866, "vga866.fon", "vgafixr.fon", "vgasysr.fon",
"courer.fon", "serifer.fon", "smaller.fon", "sserifer.fon",
+ "Tahoma","Times New Roman", /* FIXME unverified */
},
/* Greek */
{ 1253, 737, "vga869.fon", "vgafixg.fon", "vgasysg.fon",
"coureg.fon", "serifeg.fon", "smalleg.fon", "sserifeg.fon",
+ "Tahoma","Times New Roman", /* FIXME unverified */
},
/* Turkish */
{ 1254, 857, "vga857.fon", "vgafixt.fon", "vgasyst.fon",
"couret.fon", "serifet.fon", "smallet.fon", "sserifet.fon",
+ "Tahoma","Times New Roman", /* FIXME unverified */
},
/* Hebrew */
{ 1255, 862, "vgaoem.fon", "vgaf1255.fon", "vgas1255.fon",
"coue1255.fon", "sere1255.fon", "smae1255.fon", "ssee1255.fon",
+ "Tahoma","Times New Roman", /* FIXME unverified */
},
/* Arabic */
{ 1256, 720, "vgaoem.fon", "vgaf1256.fon", "vgas1256.fon",
"coue1256.fon", "sere1256.fon", "smae1256.fon", "ssee1256.fon",
+ "Tahoma","Times New Roman", /* FIXME unverified */
},
/* Baltic */
{ 1257, 775, "vga775.fon", "vgaf1257.fon", "vgas1257.fon",
"coue1257.fon", "sere1257.fon", "smae1257.fon", "ssee1257.fon",
+ "Tahoma","Times New Roman", /* FIXME unverified */
},
/* Vietnamese */
{ 1258, 1258, "vga850.fon", "vgafix.fon", "vgasys.fon",
"coure.fon", "serife.fon", "smalle.fon", "sserife.fon",
+ "Tahoma","Times New Roman", /* FIXME unverified */
},
/* Thai */
{ 874, 874, "vga850.fon", "vgaf874.fon", "vgas874.fon",
"coure.fon", "serife.fon", "smalle.fon", "ssee874.fon",
+ "Tahoma","Times New Roman", /* FIXME unverified */
},
/* Japanese */
{ 932, 932, "vga932.fon", "jvgafix.fon", "jvgasys.fon",
"coure.fon", "serife.fon", "jsmalle.fon", "sserife.fon",
+ "MS UI Gothic","MS Serif",
},
/* Chinese Simplified */
{ 936, 936, "vga936.fon", "svgafix.fon", "svgasys.fon",
"coure.fon", "serife.fon", "smalle.fon", "sserife.fon",
+ "Tahoma", "Times New Roman", /* FIXME unverified */
},
/* Korean */
{ 949, 949, "vga949.fon", "hvgafix.fon", "hvgasys.fon",
"coure.fon", "serife.fon", "smalle.fon", "sserife.fon",
+ "Tahoma", "Times New Roman", /* FIXME unverified */
},
/* Chinese Traditional */
{ 950, 950, "vga950.fon", "cvgafix.fon", "cvgasys.fon",
"coure.fon", "serife.fon", "smalle.fon", "sserife.fon",
+ "Tahoma", "Times New Roman", /* FIXME unverified */
}
};
@@ -1814,6 +1831,17 @@ inline static HKEY create_fonts_9x_regis
return hkey;
}
+inline static HKEY create_substitute_registry_key(void)
+{
+ HKEY hkey = 0;
+
+ RegCreateKeyExA(HKEY_LOCAL_MACHINE,
+ "Software\\Microsoft\\Windows NT\\CurrentVersion\\FontSubstitutes",
+ 0, NULL, 0, KEY_ALL_ACCESS, NULL,
+ &hkey, NULL);
+ return hkey;
+}
+
inline static HKEY create_config_fonts_registry_key(void)
{
HKEY hkey = 0;
@@ -1831,6 +1859,12 @@ static void add_font_list(HKEY hkey, con
RegSetValueExA(hkey, "Small Fonts", 0, REG_SZ, (const BYTE *)fl->small, strlen(fl->small)+1);
}
+static void add_substitute_list(HKEY hkey, const struct nls_update_font_list *fl)
+{
+ RegSetValueExA(hkey, "MS Shell Dlg", 0, REG_SZ, (const BYTE *)fl->shelldlg, strlen(fl->shelldlg)+1);
+ RegSetValueExA(hkey, "Tms Rmn", 0, REG_SZ, (const BYTE *)fl->tmsrmn, strlen(fl->tmsrmn)+1);
+}
+
static void update_font_info(void)
{
char buf[40], cpbuf[40];
@@ -1883,6 +1917,10 @@ static void update_font_info(void)
add_font_list(hkey, &nls_update_font_list[i]);
RegCloseKey(hkey);
+ hkey = create_substitute_registry_key();
+ add_substitute_list(hkey, &nls_update_font_list[i]);
+ RegCloseKey(hkey);
+
return;
}
}
diff --git a/tools/wine.inf b/tools/wine.inf
index 7127629..6a878f6 100644
--- a/tools/wine.inf
+++ b/tools/wine.inf
@@ -251,14 +251,12 @@ HKLM,%FontSubStr%,"Courier New Greek,161
HKLM,%FontSubStr%,"Courier New TUR,162",,"Courier New,162"
HKLM,%FontSubStr%,"Helv",,"MS Sans Serif"
HKLM,%FontSubStr%,"Helvetica",,"Arial"
-HKLM,%FontSubStr%,"MS Shell Dlg",,"Tahoma"
HKLM,%FontSubStr%,"MS Shell Dlg 2",,"Tahoma"
HKLM,%FontSubStr%,"Times",,"Times New Roman"
HKLM,%FontSubStr%,"Times New Roman CE,238",,"Times New Roman,238"
HKLM,%FontSubStr%,"Times New Roman CYR,204",,"Times New Roman,204"
HKLM,%FontSubStr%,"Times New Roman Greek,161",,"Times New Roman,161"
HKLM,%FontSubStr%,"Times New Roman TUR,162",,"Times New Roman,162"
-HKLM,%FontSubStr%,"Tms Rmn",,"Times New Roman"
HKLM,System\CurrentControlSet\Hardware Profiles\Current\Software\Fonts,"LogPixels",0x10003,0x00000060
[MCI]
More information about the wine-patches
mailing list