Aric Stewart : gdi32: Load fonts from default Mac external font paths.
Alexandre Julliard
julliard at winehq.org
Thu Feb 9 15:21:49 CST 2012
Module: wine
Branch: master
Commit: 85a71387dac1ca3ad47970800c8c01743681b528
URL: http://source.winehq.org/git/wine.git/?a=commit;h=85a71387dac1ca3ad47970800c8c01743681b528
Author: Aric Stewart <aric at codeweavers.com>
Date: Thu Feb 9 09:57:03 2012 -0600
gdi32: Load fonts from default Mac external font paths.
---
dlls/gdi32/freetype.c | 17 ++++++++++++++++-
1 files changed, 16 insertions(+), 1 deletions(-)
diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c
index 5e6a952..8bf397b 100644
--- a/dlls/gdi32/freetype.c
+++ b/dlls/gdi32/freetype.c
@@ -3120,6 +3120,7 @@ static void init_font_list(void)
DWORD valuelen, datalen, i = 0, type, dlen, vlen;
WCHAR windowsdir[MAX_PATH];
char *unixname;
+ const char *home;
const char *data_dir;
delete_external_font_keys();
@@ -3225,7 +3226,6 @@ static void init_font_list(void)
ptr = valueA;
while (ptr)
{
- const char* home;
LPSTR next = strchr( ptr, ':' );
if (next) *next++ = 0;
if (ptr[0] == '~' && ptr[1] == '/' && (home = getenv( "HOME" )) &&
@@ -3246,6 +3246,21 @@ static void init_font_list(void)
}
RegCloseKey(hkey);
}
+
+#ifdef __APPLE__
+ /* Mac default font locations. */
+ ReadFontDir( "/Library/Fonts", TRUE );
+ ReadFontDir( "/Network/Library/Fonts", TRUE );
+ ReadFontDir( "/System/Library/Fonts", TRUE );
+ if ((home = getenv( "HOME" )))
+ {
+ unixname = HeapAlloc( GetProcessHeap(), 0, strlen(home)+15 );
+ strcpy( unixname, home );
+ strcat( unixname, "/Library/Fonts" );
+ ReadFontDir( unixname, TRUE);
+ HeapFree( GetProcessHeap(), 0, unixname );
+ }
+#endif
}
static BOOL move_to_front(const WCHAR *name)
More information about the wine-cvs
mailing list