Jactry Zeng : gdi32: Add multiple font replacement support.
Alexandre Julliard
julliard at wine.codeweavers.com
Fri Jul 17 08:03:41 CDT 2015
Module: wine
Branch: master
Commit: c015447d074c535349e42ac3faa2384f8b46a231
URL: http://source.winehq.org/git/wine.git/?a=commit;h=c015447d074c535349e42ac3faa2384f8b46a231
Author: Jactry Zeng <jzeng at codeweavers.com>
Date: Wed Jul 8 21:54:05 2015 +0800
gdi32: Add multiple font replacement support.
---
dlls/gdi32/freetype.c | 20 ++++++++++++++++----
1 file changed, 16 insertions(+), 4 deletions(-)
diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c
index e20e390..e57d1a9 100644
--- a/dlls/gdi32/freetype.c
+++ b/dlls/gdi32/freetype.c
@@ -2292,12 +2292,24 @@ static void LoadReplaceList(void)
dlen = datalen;
vlen = valuelen;
- while(RegEnumValueW(hkey, i++, value, &vlen, NULL, &type, data,
- &dlen) == ERROR_SUCCESS) {
- TRACE("Got %s=%s\n", debugstr_w(value), debugstr_w(data));
+ while(RegEnumValueW(hkey, i++, value, &vlen, NULL, &type, data, &dlen) == ERROR_SUCCESS)
+ {
/* "NewName"="Oldname" */
if(!find_family_from_any_name(value))
- map_font_family(value, data);
+ {
+ if (type == REG_MULTI_SZ)
+ {
+ WCHAR *replace = data;
+ while(*replace)
+ {
+ if (map_font_family(value, replace))
+ break;
+ replace += strlenW(replace) + 1;
+ }
+ }
+ else
+ map_font_family(value, data);
+ }
else
TRACE("%s is available. Skip this replacement.\n", debugstr_w(value));
More information about the wine-cvs
mailing list