From 0436a5d14abf22af6ec10640496f9e0298a65f69 Mon Sep 17 00:00:00 2001 From: Huw Davies Date: Mon, 10 Mar 2008 12:31:43 +0000 Subject: [PATCH] gdi32: Store the Windows path (if it's available) in the font registry entries. --- dlls/gdi32/freetype.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c index ab7760dfbc7..46a53c8a399 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)); -- 2.11.4.GIT