Vitaly Lipatov : gdi32: Look for ttf fonts in the Wine font dir.
Alexandre Julliard
julliard at wine.codeweavers.com
Sat Mar 18 12:51:08 CST 2006
Module: wine
Branch: refs/heads/master
Commit: a1a54e7bf737e5275ac5ba63bafc51272f12f368
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=a1a54e7bf737e5275ac5ba63bafc51272f12f368
Author: Vitaly Lipatov <lav at etersoft.ru>
Date: Fri Mar 17 18:36:11 2006 +0300
gdi32: Look for ttf fonts in the Wine font dir.
---
dlls/gdi/freetype.c | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/dlls/gdi/freetype.c b/dlls/gdi/freetype.c
index f38ef1b..1914f1f 100644
--- a/dlls/gdi/freetype.c
+++ b/dlls/gdi/freetype.c
@@ -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
More information about the wine-cvs
mailing list