[PATCH 1/5] gdi32: Load registry fonts after system fonts.

Rémi Bernon rbernon at codeweavers.com
Fri Nov 27 08:38:01 CST 2020


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 at 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 );
     }
-- 
2.29.2




More information about the wine-devel mailing list