Commit a1a54e7b authored by Vitaly Lipatov's avatar Vitaly Lipatov Committed by Alexandre Julliard

gdi32: Look for ttf fonts in the Wine font dir.

parent 89edaa7b
......@@ -1499,6 +1499,7 @@ BOOL WineEngInit(void)
WCHAR windowsdir[MAX_PATH];
char *unixname;
HANDLE font_mutex;
const char *data_dir;
TRACE("\n");
......@@ -1578,7 +1579,7 @@ BOOL WineEngInit(void)
}
WaitForSingleObject(font_mutex, INFINITE);
/* load the system fonts */
/* load the system bitmap fonts */
load_system_fonts();
/* load in the fonts from %WINDOWSDIR%\\Fonts first of all */
......@@ -1590,6 +1591,15 @@ BOOL WineEngInit(void)
HeapFree(GetProcessHeap(), 0, unixname);
}
/* load the system truetype fonts */
data_dir = wine_get_data_dir();
if (data_dir && (unixname = HeapAlloc(GetProcessHeap(), 0, strlen(data_dir) + sizeof("/fonts/")))) {
strcpy(unixname, data_dir);
strcat(unixname, "/fonts/");
ReadFontDir(unixname, FALSE);
HeapFree(GetProcessHeap(), 0, unixname);
}
/* now look under HKLM\Software\Microsoft\Windows[ NT]\CurrentVersion\Fonts
for any fonts not installed in %WINDOWSDIR%\Fonts. They will have their
full path as the entry. Also look for any .fon fonts, since ReadFontDir
......
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