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

This commit is contained in:
Vitaly Lipatov 2006-03-17 18:36:11 +03:00 committed by Alexandre Julliard
parent 89edaa7bbe
commit a1a54e7bf7
1 changed files with 11 additions and 1 deletions

View File

@ -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