Commit 0436a5d1 authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard

gdi32: Store the Windows path (if it's available) in the font registry entries.

parent 03695384
......@@ -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));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment