gdi32: Load fonts from default Mac external font paths.
This commit is contained in:
parent
39f748f083
commit
85a71387da
|
@ -3120,6 +3120,7 @@ static void init_font_list(void)
|
||||||
DWORD valuelen, datalen, i = 0, type, dlen, vlen;
|
DWORD valuelen, datalen, i = 0, type, dlen, vlen;
|
||||||
WCHAR windowsdir[MAX_PATH];
|
WCHAR windowsdir[MAX_PATH];
|
||||||
char *unixname;
|
char *unixname;
|
||||||
|
const char *home;
|
||||||
const char *data_dir;
|
const char *data_dir;
|
||||||
|
|
||||||
delete_external_font_keys();
|
delete_external_font_keys();
|
||||||
|
@ -3225,7 +3226,6 @@ static void init_font_list(void)
|
||||||
ptr = valueA;
|
ptr = valueA;
|
||||||
while (ptr)
|
while (ptr)
|
||||||
{
|
{
|
||||||
const char* home;
|
|
||||||
LPSTR next = strchr( ptr, ':' );
|
LPSTR next = strchr( ptr, ':' );
|
||||||
if (next) *next++ = 0;
|
if (next) *next++ = 0;
|
||||||
if (ptr[0] == '~' && ptr[1] == '/' && (home = getenv( "HOME" )) &&
|
if (ptr[0] == '~' && ptr[1] == '/' && (home = getenv( "HOME" )) &&
|
||||||
|
@ -3246,6 +3246,21 @@ static void init_font_list(void)
|
||||||
}
|
}
|
||||||
RegCloseKey(hkey);
|
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)
|
static BOOL move_to_front(const WCHAR *name)
|
||||||
|
|
Loading…
Reference in New Issue