Huw Davies : gdi32: Store the Windows path (if it's available) in the font registry entries.
Alexandre Julliard
julliard at winehq.org
Mon Mar 10 17:05:04 CDT 2008
Module: wine
Branch: master
Commit: 0436a5d14abf22af6ec10640496f9e0298a65f69
URL: http://source.winehq.org/git/wine.git/?a=commit;h=0436a5d14abf22af6ec10640496f9e0298a65f69
Author: Huw Davies <huw at codeweavers.com>
Date: Mon Mar 10 12:31:43 2008 +0000
gdi32: Store the Windows path (if it's available) in the font registry entries.
---
dlls/gdi32/freetype.c | 19 +++++++++++++------
1 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c
index ab7760d..46a53c8 100644
--- a/dlls/gdi32/freetype.c
+++ b/dlls/gdi32/freetype.c
@@ -1807,14 +1807,21 @@ static void update_reg_entries(void)
strcatW(valueW, face->StyleName);
}
strcatW(valueW, TrueType);
- if((path = strrchr(face->file, '/')) == NULL)
- path = face->file;
+
+ file = wine_get_dos_file_name(face->file);
+ if(file)
+ len = strlenW(file) + 1;
else
- path++;
- len = MultiByteToWideChar(CP_ACP, 0, path, -1, NULL, 0);
+ {
+ if((path = strrchr(face->file, '/')) == NULL)
+ path = face->file;
+ else
+ path++;
+ len = MultiByteToWideChar(CP_ACP, 0, path, -1, NULL, 0);
- file = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
- MultiByteToWideChar(CP_ACP, 0, path, -1, file, len);
+ file = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
+ MultiByteToWideChar(CP_ACP, 0, path, -1, file, len);
+ }
RegSetValueExW(winnt_key, valueW, 0, REG_SZ, (BYTE*)file, len * sizeof(WCHAR));
RegSetValueExW(win9x_key, valueW, 0, REG_SZ, (BYTE*)file, len * sizeof(WCHAR));
RegSetValueExW(external_key, valueW, 0, REG_SZ, (BYTE*)file, len * sizeof(WCHAR));
More information about the wine-cvs
mailing list