In win32u/font.c's `create_child_font_list` function:
- We remove the `ansi_cp` `MaximumCharacterSize` check since this is the current locale's codepage, not the font's codepage. This was preventing certain child fonts from being loaded when they should have been. - We include Microsoft Sans Serif as a child font, whereas previously we were only including its linked fonts as child font. - As a backup, we also add Tahoma (which should ship with Wine) and its linked fonts as child fonts in case Microsoft Sans Serif is not available.
From: Danyil Blyschak dblyschak@codeweavers.com
--- dlls/win32u/font.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/win32u/font.c b/dlls/win32u/font.c index 8fb3128f5e0..54e5bb43869 100644 --- a/dlls/win32u/font.c +++ b/dlls/win32u/font.c @@ -2870,7 +2870,7 @@ static void create_child_font_list( struct gdi_font *font ) * if not SYMBOL or OEM then we also get all the fonts for Microsoft * Sans Serif. This is how asian windows get default fallbacks for fonts */ - if (ansi_cp.MaximumCharacterSize == 2 && font->charset != SYMBOL_CHARSET && font->charset != OEM_CHARSET && + if (font->charset != SYMBOL_CHARSET && font->charset != OEM_CHARSET && facename_compare( font_name, microsoft_sans_serifW, -1 ) != 0) { if ((font_link = find_gdi_font_link( microsoft_sans_serifW )))
From: Danyil Blyschak dblyschak@codeweavers.com
--- dlls/win32u/font.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/dlls/win32u/font.c b/dlls/win32u/font.c index 54e5bb43869..e62194a63a7 100644 --- a/dlls/win32u/font.c +++ b/dlls/win32u/font.c @@ -2873,6 +2873,7 @@ static void create_child_font_list( struct gdi_font *font ) if (font->charset != SYMBOL_CHARSET && font->charset != OEM_CHARSET && facename_compare( font_name, microsoft_sans_serifW, -1 ) != 0) { + add_child_font( font, microsoft_sans_serifW ); if ((font_link = find_gdi_font_link( microsoft_sans_serifW ))) { TRACE("found entry in default fallback list\n");
From: Danyil Blyschak dblyschak@codeweavers.com
--- dlls/win32u/font.c | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-)
diff --git a/dlls/win32u/font.c b/dlls/win32u/font.c index e62194a63a7..10dc0b3c1c1 100644 --- a/dlls/win32u/font.c +++ b/dlls/win32u/font.c @@ -2867,18 +2867,32 @@ static void create_child_font_list( struct gdi_font *font ) add_child_font( font, entry->family_name ); } /* - * if not SYMBOL or OEM then we also get all the fonts for Microsoft - * Sans Serif. This is how asian windows get default fallbacks for fonts + * if not SYMBOL or OEM then we also get Microsoft Sans Serif + * and all its fonts. This is how asian windows get default + * fallbacks for fonts. We also include Tahoma and its fonts + * as a backup. */ - if (font->charset != SYMBOL_CHARSET && font->charset != OEM_CHARSET && - facename_compare( font_name, microsoft_sans_serifW, -1 ) != 0) + if (font->charset != SYMBOL_CHARSET && font->charset != OEM_CHARSET) { - add_child_font( font, microsoft_sans_serifW ); - if ((font_link = find_gdi_font_link( microsoft_sans_serifW ))) + if (facename_compare( font_name, microsoft_sans_serifW, -1 ) != 0) { - TRACE("found entry in default fallback list\n"); - LIST_FOR_EACH_ENTRY( entry, &font_link->links, struct gdi_font_link_entry, entry ) - add_child_font( font, entry->family_name ); + add_child_font( font, microsoft_sans_serifW ); + if ((font_link = find_gdi_font_link( microsoft_sans_serifW ))) + { + TRACE("found entry in default fallback list\n"); + LIST_FOR_EACH_ENTRY( entry, &font_link->links, struct gdi_font_link_entry, entry ) + add_child_font( font, entry->family_name ); + } + } + if (facename_compare( font_name, tahomaW, -1 ) != 0) + { + add_child_font( font, tahomaW ); + if ((font_link = find_gdi_font_link( tahomaW ))) + { + TRACE("found entry in default fallback list\n"); + LIST_FOR_EACH_ENTRY( entry, &font_link->links, struct gdi_font_link_entry, entry ) + add_child_font( font, entry->family_name ); + } } } }
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=146982
Your paranoid android.
=== debian11 (build log) ===
WineRunWineTest.pl:error: The task timed out
This merge request was approved by Huw Davies.