This fixes an issue when, if an external font path was modified in the Windows key, it was then not considered as external anymore, but still present in the external key, and then dropped from both on update.
This now forcefully updates the font path in both keys if needed.
Signed-off-by: Rémi Bernon rbernon@codeweavers.com ---
This series doesn't improve performance much, maybe ~10ms over ~800ms for prefix startup, but it's not completely obvious.
The goal here is to reduce the registry pressure on process and prefix startup, by loading fonts from the system rather than enumerating the registry, when possible, and using the registry font cache only for the volatile application fonts.
This also makes all processes rely on FreeType font loading to list the system fonts, which will bring more leverage to incoming optimizations of that part of the code.
dlls/gdi32/font.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/gdi32/font.c b/dlls/gdi32/font.c index db87a283b13..28179aec54a 100644 --- a/dlls/gdi32/font.c +++ b/dlls/gdi32/font.c @@ -7958,8 +7958,8 @@ void font_init(void) HKEY key = load_external_font_keys(); load_system_bitmap_fonts(); load_file_system_fonts(); - load_registry_fonts(); font_funcs->load_fonts(); + load_registry_fonts(); update_external_font_keys( key ); RegCloseKey( key ); }
Signed-off-by: Rémi Bernon rbernon@codeweavers.com --- dlls/gdi32/font.c | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-)
diff --git a/dlls/gdi32/font.c b/dlls/gdi32/font.c index 28179aec54a..7338d5fbb03 100644 --- a/dlls/gdi32/font.c +++ b/dlls/gdi32/font.c @@ -83,6 +83,7 @@ struct gdi_font_face struct bitmap_font_size size; /* set if face is a bitmap */ struct gdi_font_family *family; struct gdi_font_enum_data *cached_enum_data; + struct wine_rb_entry full_name_entry; };
static const struct font_backend_funcs *font_funcs; @@ -583,8 +584,20 @@ static int family_second_name_compare( const void *key, const struct wine_rb_ent return family_namecmp( (const WCHAR *)key, family->second_name ); }
+static int face_full_name_compare( const void *key, const struct wine_rb_entry *entry ) +{ + const struct gdi_font_face *face = WINE_RB_ENTRY_VALUE( entry, const struct gdi_font_face, full_name_entry ); + return facename_compare( (const WCHAR *)key, face->full_name, LF_FULLFACESIZE - 1 ); +} + static struct wine_rb_tree family_name_tree = { family_name_compare }; static struct wine_rb_tree family_second_name_tree = { family_second_name_compare }; +static struct wine_rb_tree face_full_name_tree = { face_full_name_compare }; + +static int face_is_in_full_name_tree( const struct gdi_font_face *face ) +{ + return face->full_name_entry.parent || face_full_name_tree.root == &face->full_name_entry; +}
static struct gdi_font_family *create_family( const WCHAR *name, const WCHAR *second_name ) { @@ -631,6 +644,13 @@ static struct gdi_font_family *find_family_from_any_name( const WCHAR *name ) return WINE_RB_ENTRY_VALUE( entry, struct gdi_font_family, second_name_entry ); }
+static struct gdi_font_face *find_face_from_full_name( const WCHAR *full_name ) +{ + struct wine_rb_entry *entry; + if (!(entry = wine_rb_get( &face_full_name_tree, full_name ))) return NULL; + return WINE_RB_ENTRY_VALUE( entry, struct gdi_font_face, full_name_entry ); +} + static const struct list *get_family_face_list( const struct gdi_font_family *family ) { return family->replacement ? &family->replacement->faces : &family->faces; @@ -819,6 +839,7 @@ static void release_face( struct gdi_font_face *face ) list_remove( &face->entry ); release_family( face->family ); } + if (face_is_in_full_name_tree( face )) wine_rb_remove( &face_full_name_tree, &face->full_name_entry ); HeapFree( GetProcessHeap(), 0, face->file ); HeapFree( GetProcessHeap(), 0, face->style_name ); HeapFree( GetProcessHeap(), 0, face->full_name ); @@ -913,6 +934,11 @@ static BOOL insert_face_in_family_list( struct gdi_font_face *face, struct gdi_f face->family = family; family->refcount++; face->refcount++; + if (face_is_in_full_name_tree( cursor )) + { + wine_rb_replace( &face_full_name_tree, &cursor->full_name_entry, &face->full_name_entry ); + memset( &cursor->full_name_entry, 0, sizeof(cursor->full_name_entry) ); + } release_face( cursor ); return TRUE; } @@ -923,6 +949,7 @@ static BOOL insert_face_in_family_list( struct gdi_font_face *face, struct gdi_f TRACE( "Adding face %s in family %s from %s\n", debugstr_w(face->full_name), debugstr_w(family->family_name), debugstr_w(face->file) ); list_add_before( &cursor->entry, &face->entry ); + if (face->scalable) wine_rb_put( &face_full_name_tree, face->full_name, &face->full_name_entry ); face->family = family; family->refcount++; face->refcount++; @@ -7889,7 +7916,7 @@ static void update_external_font_keys( HKEY hkey )
static void load_registry_fonts(void) { - WCHAR value[LF_FULLFACESIZE + 12], data[MAX_PATH]; + WCHAR value[LF_FULLFACESIZE + 12], data[MAX_PATH], *tmp; DWORD i = 0, type, dlen, vlen; struct wine_rb_entry *entry; HKEY hkey; @@ -7918,6 +7945,11 @@ static void load_registry_fonts(void) goto next; } } + + if ((tmp = wcsrchr( value, ' ' )) && !facename_compare( tmp, L" (TrueType)", -1 )) *tmp = 0; + if (find_face_from_full_name( value )) goto next; + if (tmp && !*tmp) *tmp = ' '; + if (data[0] && data[1] == ':') add_font_resource( data, ADDFONT_ALLOW_BITMAP | ADDFONT_ADD_TO_CACHE ); else if (dlen >= 6 && !wcsicmp( data + dlen - 5, L".fon" ))
Signed-off-by: Huw Davies huw@codeweavers.com
Signed-off-by: Rémi Bernon rbernon@codeweavers.com ---
The new ADDFONT_EXTERNAL_FOUND flag is here to indicate that a font was found in the external key, and that its path doesn't need an update.
dlls/gdi32/font.c | 98 +++++++++++++--------------------------- dlls/gdi32/gdi_private.h | 1 + 2 files changed, 33 insertions(+), 66 deletions(-)
diff --git a/dlls/gdi32/font.c b/dlls/gdi32/font.c index 7338d5fbb03..d3202d83a15 100644 --- a/dlls/gdi32/font.c +++ b/dlls/gdi32/font.c @@ -7812,70 +7812,57 @@ static void load_file_system_fonts(void)
struct external_key { - struct wine_rb_entry entry; - BOOL found; - WCHAR value[LF_FULLFACESIZE + 12]; - WCHAR path[1]; + struct list entry; + WCHAR value[LF_FULLFACESIZE + 12]; };
-static int compare_external_key( const void *key, const struct wine_rb_entry *entry ) +static void update_external_font_keys(void) { - return facename_compare( key, WINE_RB_ENTRY_VALUE( entry, struct external_key, entry )->value, -1 ); -} + struct list external_keys = LIST_INIT(external_keys); + HKEY winnt_key = 0, win9x_key = 0; + struct gdi_font_family *family; + struct external_key *key, *next; + struct gdi_font_face *face; + DWORD len, i = 0, type, dlen, vlen; + WCHAR value[LF_FULLFACESIZE + 12], path[MAX_PATH], *tmp; + WCHAR *file; + HKEY hkey;
-static struct wine_rb_tree external_keys = { compare_external_key }; + RegCreateKeyExW( HKEY_LOCAL_MACHINE, L"Software\Microsoft\Windows NT\CurrentVersion\Fonts", + 0, NULL, 0, KEY_ALL_ACCESS, NULL, &winnt_key, NULL ); + RegCreateKeyExW( HKEY_LOCAL_MACHINE, L"Software\Microsoft\Windows\CurrentVersion\Fonts", + 0, NULL, 0, KEY_ALL_ACCESS, NULL, &win9x_key, NULL );
-static HKEY load_external_font_keys(void) -{ - WCHAR value[LF_FULLFACESIZE + 12], path[MAX_PATH]; - DWORD i = 0, type, dlen, vlen; - struct external_key *key; - HKEY hkey; + /* enumerate the fonts and add external ones to the two keys */
- if (RegCreateKeyW( wine_fonts_key, L"External Fonts", &hkey )) return 0; + if (RegCreateKeyW( wine_fonts_key, L"External Fonts", &hkey )) return;
vlen = ARRAY_SIZE(value); dlen = sizeof(path); while (!RegEnumValueW( hkey, i++, value, &vlen, NULL, &type, (BYTE *)path, &dlen )) { if (type != REG_SZ) goto next; - dlen /= sizeof(WCHAR); - if (!(key = HeapAlloc( GetProcessHeap(), 0, offsetof(struct external_key, path[dlen]) ))) break; - key->found = FALSE; + if ((tmp = wcsrchr( value, ' ' )) && !facename_compare( tmp, L" (TrueType)", -1 )) *tmp = 0; + if ((face = find_face_from_full_name( value ))) + { + if (!wcsicmp( face->file, path )) face->flags |= ADDFONT_EXTERNAL_FOUND; + goto next; + } + if (tmp && !*tmp) *tmp = ' '; + if (!(key = HeapAlloc( GetProcessHeap(), 0, sizeof(*key) ))) break; lstrcpyW( key->value, value ); - lstrcpyW( key->path, path ); - wine_rb_put( &external_keys, value, &key->entry ); + list_add_tail( &external_keys, &key->entry ); next: vlen = ARRAY_SIZE(value); dlen = sizeof(path); } - return hkey; -} - -static void update_external_font_keys( HKEY hkey ) -{ - HKEY winnt_key = 0, win9x_key = 0; - struct gdi_font_family *family; - struct gdi_font_face *face; - struct wine_rb_entry *entry; - struct external_key *key, *next; - DWORD len; - BOOL skip; - WCHAR value[LF_FULLFACESIZE + 12], path[MAX_PATH]; - WCHAR *file; - - RegCreateKeyExW( HKEY_LOCAL_MACHINE, L"Software\Microsoft\Windows NT\CurrentVersion\Fonts", - 0, NULL, 0, KEY_ALL_ACCESS, NULL, &winnt_key, NULL ); - RegCreateKeyExW( HKEY_LOCAL_MACHINE, L"Software\Microsoft\Windows\CurrentVersion\Fonts", - 0, NULL, 0, KEY_ALL_ACCESS, NULL, &win9x_key, NULL ); - - /* enumerate the fonts and add external ones to the two keys */
WINE_RB_FOR_EACH_ENTRY( family, &family_name_tree, struct gdi_font_family, name_entry ) { LIST_FOR_EACH_ENTRY( face, &family->faces, struct gdi_font_face, entry ) { if (!(face->flags & ADDFONT_EXTERNAL_FONT)) continue; + if ((face->flags & ADDFONT_EXTERNAL_FOUND)) continue;
lstrcpyW( value, face->full_name ); if (face->scalable) lstrcatW( value, L" (TrueType)" ); @@ -7887,38 +7874,29 @@ static void update_external_font_keys( HKEY hkey ) else file = face->file;
- skip = FALSE; - if ((entry = wine_rb_get( &external_keys, value ))) - { - struct external_key *key = WINE_RB_ENTRY_VALUE( entry, struct external_key, entry ); - skip = key->found && !wcsicmp( key->path, file ); - wine_rb_remove_key( &external_keys, value ); - HeapFree( GetProcessHeap(), 0, key ); - } - if (skip) continue; len = (lstrlenW(file) + 1) * sizeof(WCHAR); RegSetValueExW( winnt_key, value, 0, REG_SZ, (BYTE *)file, len ); RegSetValueExW( win9x_key, value, 0, REG_SZ, (BYTE *)file, len ); RegSetValueExW( hkey, value, 0, REG_SZ, (BYTE *)file, len ); } } - WINE_RB_FOR_EACH_ENTRY_DESTRUCTOR( key, next, &external_keys, struct external_key, entry ) + LIST_FOR_EACH_ENTRY_SAFE( key, next, &external_keys, struct external_key, entry ) { RegDeleteValueW( win9x_key, key->value ); RegDeleteValueW( winnt_key, key->value ); RegDeleteValueW( hkey, key->value ); - wine_rb_remove_key( &external_keys, key->value ); + list_remove( &key->entry ); HeapFree( GetProcessHeap(), 0, key ); } RegCloseKey( win9x_key ); RegCloseKey( winnt_key ); + RegCloseKey( hkey ); }
static void load_registry_fonts(void) { WCHAR value[LF_FULLFACESIZE + 12], data[MAX_PATH], *tmp; DWORD i = 0, type, dlen, vlen; - struct wine_rb_entry *entry; HKEY hkey;
/* Look under HKLM\Software\Microsoft\Windows[ NT]\CurrentVersion\Fonts @@ -7936,16 +7914,6 @@ static void load_registry_fonts(void) { if (type != REG_SZ) goto next; dlen /= sizeof(WCHAR); - if ((entry = wine_rb_get( &external_keys, value ))) - { - struct external_key *key = WINE_RB_ENTRY_VALUE( entry, struct external_key, entry ); - if (!wcsicmp( key->path, data )) - { - key->found = TRUE; - goto next; - } - } - if ((tmp = wcsrchr( value, ' ' )) && !facename_compare( tmp, L" (TrueType)", -1 )) *tmp = 0; if (find_face_from_full_name( value )) goto next; if (tmp && !*tmp) *tmp = ' '; @@ -7987,13 +7955,11 @@ void font_init(void)
if (disposition == REG_CREATED_NEW_KEY) { - HKEY key = load_external_font_keys(); load_system_bitmap_fonts(); load_file_system_fonts(); font_funcs->load_fonts(); load_registry_fonts(); - update_external_font_keys( key ); - RegCloseKey( key ); + update_external_font_keys(); } else load_font_list_from_cache();
diff --git a/dlls/gdi32/gdi_private.h b/dlls/gdi32/gdi_private.h index 163152fe839..b9a06415538 100644 --- a/dlls/gdi32/gdi_private.h +++ b/dlls/gdi32/gdi_private.h @@ -376,6 +376,7 @@ struct gdi_font #define ADDFONT_ADD_TO_CACHE 0x04 #define ADDFONT_ADD_RESOURCE 0x08 /* added through AddFontResource */ #define ADDFONT_VERTICAL_FONT 0x10 +#define ADDFONT_EXTERNAL_FOUND 0x20 #define ADDFONT_AA_FLAGS(flags) ((flags) << 16)
struct font_backend_funcs
Signed-off-by: Huw Davies huw@codeweavers.com
Signed-off-by: Rémi Bernon rbernon@codeweavers.com --- dlls/gdi32/font.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/dlls/gdi32/font.c b/dlls/gdi32/font.c index d3202d83a15..4cc072bd785 100644 --- a/dlls/gdi32/font.c +++ b/dlls/gdi32/font.c @@ -7910,7 +7910,7 @@ static void load_registry_fonts(void)
vlen = ARRAY_SIZE(value); dlen = sizeof(data); - while (!RegEnumValueW( hkey, i++, value, &vlen, NULL, &type, (LPBYTE)data, &dlen )) + while (!RegEnumValueW( hkey, i++, value, &vlen, NULL, &type, NULL, NULL )) { if (type != REG_SZ) goto next; dlen /= sizeof(WCHAR); @@ -7918,6 +7918,13 @@ static void load_registry_fonts(void) if (find_face_from_full_name( value )) goto next; if (tmp && !*tmp) *tmp = ' ';
+ if (RegQueryValueExW( hkey, value, NULL, NULL, (LPBYTE)data, &dlen )) + { + WARN( "Unable to get face path %s\n", debugstr_w(value) ); + goto next; + } + + dlen /= sizeof(WCHAR); if (data[0] && data[1] == ':') add_font_resource( data, ADDFONT_ALLOW_BITMAP | ADDFONT_ADD_TO_CACHE ); else if (dlen >= 6 && !wcsicmp( data + dlen - 5, L".fon" ))
On Fri, Nov 27, 2020 at 03:38:04PM +0100, Rémi Bernon wrote:
Signed-off-by: Rémi Bernon rbernon@codeweavers.com
dlls/gdi32/font.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/dlls/gdi32/font.c b/dlls/gdi32/font.c index d3202d83a15..4cc072bd785 100644 --- a/dlls/gdi32/font.c +++ b/dlls/gdi32/font.c @@ -7910,7 +7910,7 @@ static void load_registry_fonts(void)
vlen = ARRAY_SIZE(value); dlen = sizeof(data);
- while (!RegEnumValueW( hkey, i++, value, &vlen, NULL, &type, (LPBYTE)data, &dlen ))
- while (!RegEnumValueW( hkey, i++, value, &vlen, NULL, &type, NULL, NULL )) { if (type != REG_SZ) goto next; dlen /= sizeof(WCHAR);
@@ -7918,6 +7918,13 @@ static void load_registry_fonts(void) if (find_face_from_full_name( value )) goto next; if (tmp && !*tmp) *tmp = ' ';
if (RegQueryValueExW( hkey, value, NULL, NULL, (LPBYTE)data, &dlen ))
{
WARN( "Unable to get face path %s\n", debugstr_w(value) );
goto next;
}
dlen /= sizeof(WCHAR); if (data[0] && data[1] == ':') add_font_resource( data, ADDFONT_ALLOW_BITMAP | ADDFONT_ADD_TO_CACHE ); else if (dlen >= 6 && !wcsicmp( data + dlen - 5, L".fon" ))
Just so I understand, this is essentially saving the memcpy() in RegEnumValueW() for the (many) external fonts at the expense of a second server round-trip for the (few) "internal" fonts?
Huw.
On 12/1/20 10:33 AM, Huw Davies wrote:
On Fri, Nov 27, 2020 at 03:38:04PM +0100, Rémi Bernon wrote:
Signed-off-by: Rémi Bernon rbernon@codeweavers.com
dlls/gdi32/font.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/dlls/gdi32/font.c b/dlls/gdi32/font.c index d3202d83a15..4cc072bd785 100644 --- a/dlls/gdi32/font.c +++ b/dlls/gdi32/font.c @@ -7910,7 +7910,7 @@ static void load_registry_fonts(void)
vlen = ARRAY_SIZE(value); dlen = sizeof(data);
- while (!RegEnumValueW( hkey, i++, value, &vlen, NULL, &type, (LPBYTE)data, &dlen ))
- while (!RegEnumValueW( hkey, i++, value, &vlen, NULL, &type, NULL, NULL )) { if (type != REG_SZ) goto next; dlen /= sizeof(WCHAR);
@@ -7918,6 +7918,13 @@ static void load_registry_fonts(void) if (find_face_from_full_name( value )) goto next; if (tmp && !*tmp) *tmp = ' ';
if (RegQueryValueExW( hkey, value, NULL, NULL, (LPBYTE)data, &dlen ))
{
WARN( "Unable to get face path %s\n", debugstr_w(value) );
goto next;
}
dlen /= sizeof(WCHAR); if (data[0] && data[1] == ':') add_font_resource( data, ADDFONT_ALLOW_BITMAP | ADDFONT_ADD_TO_CACHE ); else if (dlen >= 6 && !wcsicmp( data + dlen - 5, L".fon" ))
Just so I understand, this is essentially saving the memcpy() in RegEnumValueW() for the (many) external fonts at the expense of a second server round-trip for the (few) "internal" fonts?
Huw.
The memcpy and the write/read from/to wineserver, yes.
Signed-off-by: Huw Davies huw@codeweavers.com
And load system fonts outside of the global font mutex. We now only use the mutex to protect the registry fonts initialization.
Signed-off-by: Rémi Bernon rbernon@codeweavers.com --- dlls/gdi32/font.c | 26 ++++++++++++++++---------- dlls/gdi32/freetype.c | 6 +++--- 2 files changed, 19 insertions(+), 13 deletions(-)
diff --git a/dlls/gdi32/font.c b/dlls/gdi32/font.c index 4cc072bd785..9fa0f45ec4b 100644 --- a/dlls/gdi32/font.c +++ b/dlls/gdi32/font.c @@ -7758,7 +7758,7 @@ static void load_system_bitmap_fonts(void) { dlen = sizeof(data); if (!RegQueryValueExW( hkey, fonts[i], 0, &type, (BYTE *)data, &dlen ) && type == REG_SZ) - add_system_font_resource( data, ADDFONT_ALLOW_BITMAP | ADDFONT_ADD_TO_CACHE ); + add_system_font_resource( data, ADDFONT_ALLOW_BITMAP ); } RegCloseKey( hkey ); } @@ -7789,11 +7789,11 @@ static void load_file_system_fonts(void)
/* Windows directory */ get_fonts_win_dir_path( L"*", path ); - load_directory_fonts( path, ADDFONT_ADD_TO_CACHE ); + load_directory_fonts( path, 0 );
/* Wine data directory */ get_fonts_data_dir_path( L"*", path ); - load_directory_fonts( path, ADDFONT_ADD_TO_CACHE | ADDFONT_EXTERNAL_FONT ); + load_directory_fonts( path, ADDFONT_EXTERNAL_FONT );
/* custom paths */ /* @@ Wine registry key: HKCU\Software\Wine\Fonts */ @@ -7805,7 +7805,7 @@ static void load_file_system_fonts(void) if (next && next - ptr < 2) continue; lstrcpynW( path, ptr, MAX_PATH - 2 ); lstrcatW( path, L"\*" ); - load_directory_fonts( path, ADDFONT_ADD_TO_CACHE | ADDFONT_EXTERNAL_FONT ); + load_directory_fonts( path, ADDFONT_EXTERNAL_FONT ); } } } @@ -7926,9 +7926,9 @@ static void load_registry_fonts(void)
dlen /= sizeof(WCHAR); if (data[0] && data[1] == ':') - add_font_resource( data, ADDFONT_ALLOW_BITMAP | ADDFONT_ADD_TO_CACHE ); + add_font_resource( data, ADDFONT_ALLOW_BITMAP ); else if (dlen >= 6 && !wcsicmp( data + dlen - 5, L".fon" )) - add_system_font_resource( data, ADDFONT_ALLOW_BITMAP | ADDFONT_ADD_TO_CACHE ); + add_system_font_resource( data, ADDFONT_ALLOW_BITMAP ); next: vlen = ARRAY_SIZE(value); dlen = sizeof(data); @@ -7954,6 +7954,10 @@ void font_init(void) update_codepage(); if (__wine_init_unix_lib( gdi32_module, DLL_PROCESS_ATTACH, &callback_funcs, &font_funcs )) return;
+ load_system_bitmap_fonts(); + load_file_system_fonts(); + font_funcs->load_fonts(); + if (!(mutex = CreateMutexW( NULL, FALSE, L"__WINE_FONT_MUTEX__" ))) return; WaitForSingleObject( mutex, INFINITE );
@@ -7962,16 +7966,18 @@ void font_init(void)
if (disposition == REG_CREATED_NEW_KEY) { - load_system_bitmap_fonts(); - load_file_system_fonts(); - font_funcs->load_fonts(); load_registry_fonts(); update_external_font_keys(); } - else load_font_list_from_cache();
ReleaseMutex( mutex );
+ if (disposition != REG_CREATED_NEW_KEY) + { + load_registry_fonts(); + load_font_list_from_cache(); + } + reorder_font_list(); load_gdi_font_subst(); load_gdi_font_replacements(); diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c index e7684728c9c..1ee02795bed 100644 --- a/dlls/gdi32/freetype.c +++ b/dlls/gdi32/freetype.c @@ -1303,7 +1303,7 @@ static BOOL ReadFontDir(const char *dirname, BOOL external_fonts) ReadFontDir(path, external_fonts); else { - DWORD addfont_flags = ADDFONT_ADD_TO_CACHE; + DWORD addfont_flags = 0; if(external_fonts) addfont_flags |= ADDFONT_EXTERNAL_FONT; AddFontToList(NULL, path, NULL, 0, addfont_flags); } @@ -1523,7 +1523,7 @@ static void load_fontconfig_fonts( void ) if (!(done_set = pFcStrSetCreate())) goto done; if (!(dir_list = pFcConfigGetFontDirs( config ))) goto done;
- fontconfig_add_fonts_from_dir_list( config, dir_list, done_set, ADDFONT_EXTERNAL_FONT | ADDFONT_ADD_TO_CACHE ); + fontconfig_add_fonts_from_dir_list( config, dir_list, done_set, ADDFONT_EXTERNAL_FONT );
done: if (dir_list) pFcStrListDone( dir_list ); @@ -1543,7 +1543,7 @@ static void load_mac_font_callback(const void *value, void *context) if (path && CFStringGetFileSystemRepresentation(pathStr, path, len)) { TRACE("font file %s\n", path); - AddFontToList(NULL, path, NULL, 0, ADDFONT_EXTERNAL_FONT | ADDFONT_ADD_TO_CACHE); + AddFontToList(NULL, path, NULL, 0, ADDFONT_EXTERNAL_FONT); } RtlFreeHeap(GetProcessHeap(), 0, path); }
Signed-off-by: Huw Davies huw@codeweavers.com