See this testbot result:
https://testbot.winehq.org/JobDetails.pl?Key=124827&f101=exe32.report&am...
Source code of the test program in the tests above is attached. [font_link_reg.c](/uploads/0f18bd2ab664e5d78ee2e16ef9037e60/font_link_reg.c)
The tests show the reg key value of font link on different Windows machine,
-- v3: win32u: Add more linked fonts for Tahoma. win32u: Add font link for MS UI Gothic. win32u: Add mechanism for font specific system links.
From: Ziqing Hui zhui@codeweavers.com
--- dlls/win32u/font.c | 148 ++++++++++++++++++++++++++++++--------------- 1 file changed, 99 insertions(+), 49 deletions(-)
diff --git a/dlls/win32u/font.c b/dlls/win32u/font.c index 7fc4a01eb64..d3e69cb5f8e 100644 --- a/dlls/win32u/font.c +++ b/dlls/win32u/font.c @@ -1551,6 +1551,78 @@ static const struct font_links_defaults_list } };
+static const char system_link_tahoma_sc[] = + "SIMSUN.TTC,SimSun\0" + "MINGLIU.TTC,PMingLiu\0" + "MSGOTHIC.TTC,MS UI Gothic\0" + "BATANG.TTC,Batang\0"; + +static const char system_link_tahoma_tc[] = + "MINGLIU.TTC,PMingLiu\0" + "SIMSUN.TTC,SimSun\0" + "MSGOTHIC.TTC,MS UI Gothic\0" + "BATANG.TTC,Batang\0"; + +static const char system_link_tahoma_jp[] = + "MSGOTHIC.TTC,MS UI Gothic\0" + "MINGLIU.TTC,PMingLiU\0" + "SIMSUN.TTC,SimSun\0" + "GULIM.TTC,Gulim\0"; + +static const char system_link_tahoma_kr[] = + "GULIM.TTC,Gulim\0" + "MSGOTHIC.TTC,MS UI Gothic\0" + "MINGLIU.TTC,PMingLiU\0" + "SIMSUN.TTC,SimSun\0"; + +static const char system_link_tahoma_non_cjk[] = + "MSGOTHIC.TTC,MS UI Gothic\0" + "MINGLIU.TTC,PMingLiU\0" + "SIMSUN.TTC,SimSun\0" + "GULIM.TTC,Gulim\0"; + +static const struct system_link_reg +{ + const WCHAR *font_name; + const char *link_sc; + DWORD link_sc_len; + const char *link_tc; + DWORD link_tc_len; + const char *link_jp; + DWORD link_jp_len; + const char *link_kr; + DWORD link_kr_len; + const char *link_non_cjk; + DWORD link_non_cjk_len; +} +default_system_link[] = +{ + { + tahomaW, + system_link_tahoma_sc, sizeof(system_link_tahoma_sc), + system_link_tahoma_tc, sizeof(system_link_tahoma_tc), + system_link_tahoma_jp, sizeof(system_link_tahoma_jp), + system_link_tahoma_kr, sizeof(system_link_tahoma_kr), + system_link_tahoma_non_cjk, sizeof(system_link_tahoma_non_cjk), + }, + { + microsoft_sans_serifW, + system_link_tahoma_sc, sizeof(system_link_tahoma_sc), + system_link_tahoma_tc, sizeof(system_link_tahoma_tc), + system_link_tahoma_jp, sizeof(system_link_tahoma_jp), + system_link_tahoma_kr, sizeof(system_link_tahoma_kr), + system_link_tahoma_non_cjk, sizeof(system_link_tahoma_non_cjk), + }, + { + lucida_sans_unicodeW, + system_link_tahoma_sc, sizeof(system_link_tahoma_sc), + system_link_tahoma_tc, sizeof(system_link_tahoma_tc), + system_link_tahoma_jp, sizeof(system_link_tahoma_jp), + system_link_tahoma_kr, sizeof(system_link_tahoma_kr), + system_link_tahoma_non_cjk, sizeof(system_link_tahoma_non_cjk), + }, +}; + static void populate_system_links( const WCHAR *name, const WCHAR * const *values ) { struct gdi_font_family *family; @@ -2646,63 +2718,41 @@ static void set_multi_value_key( HKEY hkey, const WCHAR *name, const char *value
static void update_font_system_link_info(void) { - static const char system_link_simplified_chinese[] = - "SIMSUN.TTC,SimSun\0" - "MINGLIU.TTC,PMingLiu\0" - "MSGOTHIC.TTC,MS UI Gothic\0" - "BATANG.TTC,Batang\0"; - static const char system_link_traditional_chinese[] = - "MINGLIU.TTC,PMingLiu\0" - "SIMSUN.TTC,SimSun\0" - "MSGOTHIC.TTC,MS UI Gothic\0" - "BATANG.TTC,Batang\0"; - static const char system_link_japanese[] = - "MSGOTHIC.TTC,MS UI Gothic\0" - "MINGLIU.TTC,PMingLiU\0" - "SIMSUN.TTC,SimSun\0" - "GULIM.TTC,Gulim\0"; - static const char system_link_korean[] = - "GULIM.TTC,Gulim\0" - "MSGOTHIC.TTC,MS UI Gothic\0" - "MINGLIU.TTC,PMingLiU\0" - "SIMSUN.TTC,SimSun\0"; - static const char system_link_non_cjk[] = - "MSGOTHIC.TTC,MS UI Gothic\0" - "MINGLIU.TTC,PMingLiU\0" - "SIMSUN.TTC,SimSun\0" - "GULIM.TTC,Gulim\0"; HKEY hkey;
if ((hkey = reg_create_key( NULL, system_link_keyW, sizeof(system_link_keyW), 0, NULL ))) { const char *link; - DWORD len; + DWORD len, i;
- switch (ansi_cp.CodePage) + for (i = 0; i < ARRAY_SIZE(default_system_link); ++i) { - case 932: - link = system_link_japanese; - len = sizeof(system_link_japanese); - break; - case 936: - link = system_link_simplified_chinese; - len = sizeof(system_link_simplified_chinese); - break; - case 949: - link = system_link_korean; - len = sizeof(system_link_korean); - break; - case 950: - link = system_link_traditional_chinese; - len = sizeof(system_link_traditional_chinese); - break; - default: - link = system_link_non_cjk; - len = sizeof(system_link_non_cjk); + const struct system_link_reg *link_reg = &default_system_link[i]; + + switch (ansi_cp.CodePage) + { + case 932: + link = link_reg->link_jp; + len = link_reg->link_jp_len; + break; + case 936: + link = link_reg->link_sc; + len = link_reg->link_sc_len; + break; + case 949: + link = link_reg->link_kr; + len = link_reg->link_kr_len; + break; + case 950: + link = link_reg->link_tc; + len = link_reg->link_tc_len; + break; + default: + link = link_reg->link_non_cjk; + len = link_reg->link_non_cjk_len; + } + set_multi_value_key(hkey, link_reg->font_name, link, len); } - set_multi_value_key(hkey, lucida_sans_unicodeW, link, len); - set_multi_value_key(hkey, microsoft_sans_serifW, link, len); - set_multi_value_key(hkey, tahomaW, link, len); NtClose( hkey ); } }
From: Ziqing Hui zhui@codeweavers.com
Win10 has font link for most of the system default fonts, including MS UI Gothic. This fixes Korean text display issue for Romance of the There Kindoms XIII. --- dlls/win32u/font.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)
diff --git a/dlls/win32u/font.c b/dlls/win32u/font.c index d3e69cb5f8e..6086fa79609 100644 --- a/dlls/win32u/font.c +++ b/dlls/win32u/font.c @@ -1581,6 +1581,16 @@ static const char system_link_tahoma_non_cjk[] = "SIMSUN.TTC,SimSun\0" "GULIM.TTC,Gulim\0";
+static const char system_link_ms_ui_gothic[] = + "MICROSS.TTF,Microsoft Sans Serif\0" + "MINGLIU.TTC,PMingLiU\0""SIMSUN.TTC,SimSun\0" + "GULIM.TTC,Gulim\0" + "YUGOTHM.TTC,Yu Gothic UI\0" + "MSJH.TTC,Microsoft JhengHei UI\0" + "MSYH.TTC,Microsoft YaHei UI\0" + "MALGUN.TTF,Malgun Gothic\0" + "SEGUISYM.TTF,Segoe UI Symbol\0"; + static const struct system_link_reg { const WCHAR *font_name; @@ -1621,6 +1631,14 @@ default_system_link[] = system_link_tahoma_kr, sizeof(system_link_tahoma_kr), system_link_tahoma_non_cjk, sizeof(system_link_tahoma_non_cjk), }, + { + ms_ui_gothicW, + system_link_ms_ui_gothic, sizeof(system_link_ms_ui_gothic), + system_link_ms_ui_gothic, sizeof(system_link_ms_ui_gothic), + system_link_ms_ui_gothic, sizeof(system_link_ms_ui_gothic), + system_link_ms_ui_gothic, sizeof(system_link_ms_ui_gothic), + system_link_ms_ui_gothic, sizeof(system_link_ms_ui_gothic), + }, };
static void populate_system_links( const WCHAR *name, const WCHAR * const *values )
From: Ziqing Hui zhui@codeweavers.com
--- dlls/win32u/font.c | 35 ++++++++++++++++++++++++++++++----- 1 file changed, 30 insertions(+), 5 deletions(-)
diff --git a/dlls/win32u/font.c b/dlls/win32u/font.c index 6086fa79609..5762d55eab5 100644 --- a/dlls/win32u/font.c +++ b/dlls/win32u/font.c @@ -1555,31 +1555,56 @@ static const char system_link_tahoma_sc[] = "SIMSUN.TTC,SimSun\0" "MINGLIU.TTC,PMingLiu\0" "MSGOTHIC.TTC,MS UI Gothic\0" - "BATANG.TTC,Batang\0"; + "BATANG.TTC,Batang\0" + "MSYH.TTC,Microsoft YaHei UI\0" + "MSJH.TTC,Microsoft JhengHei UI\0" + "YUGOTHM.TTC,Yu Gothic UI\0" + "MALGUN.TTF,Malgun Gothic\0" + "SEGUISYM.TTF,Segoe UI Symbol\0";
static const char system_link_tahoma_tc[] = "MINGLIU.TTC,PMingLiu\0" "SIMSUN.TTC,SimSun\0" "MSGOTHIC.TTC,MS UI Gothic\0" - "BATANG.TTC,Batang\0"; + "BATANG.TTC,Batang\0" + "MSJH.TTC,Microsoft JhengHei UI\0" + "MSYH.TTC,Microsoft YaHei UI\0" + "YUGOTHM.TTC,Yu Gothic UI\0" + "MALGUN.TTF,Malgun Gothic\0" + "SEGUISYM.TTF,Segoe UI Symbol\0";
static const char system_link_tahoma_jp[] = "MSGOTHIC.TTC,MS UI Gothic\0" "MINGLIU.TTC,PMingLiU\0" "SIMSUN.TTC,SimSun\0" - "GULIM.TTC,Gulim\0"; + "GULIM.TTC,Gulim\0" + "YUGOTHM.TTC,Yu Gothic UI\0" + "MSJH.TTC,Microsoft JhengHei UI\0" + "MSYH.TTC,Microsoft YaHei UI\0" + "MALGUN.TTF,Malgun Gothic\0" + "SEGUISYM.TTF,Segoe UI Symbol\0";
static const char system_link_tahoma_kr[] = "GULIM.TTC,Gulim\0" "MSGOTHIC.TTC,MS UI Gothic\0" "MINGLIU.TTC,PMingLiU\0" - "SIMSUN.TTC,SimSun\0"; + "SIMSUN.TTC,SimSun\0" + "MALGUN.TTF,Malgun Gothic\0" + "YUGOTHM.TTC,Yu Gothic UI\0" + "MSJH.TTC,Microsoft JhengHei UI\0" + "MSYH.TTC,Microsoft YaHei UI\0" + "SEGUISYM.TTF,Segoe UI Symbol\0";
static const char system_link_tahoma_non_cjk[] = "MSGOTHIC.TTC,MS UI Gothic\0" "MINGLIU.TTC,PMingLiU\0" "SIMSUN.TTC,SimSun\0" - "GULIM.TTC,Gulim\0"; + "GULIM.TTC,Gulim\0" + "YUGOTHM.TTC,Yu Gothic UI\0" + "MSJH.TTC,Microsoft JhengHei UI\0" + "MSYH.TTC,Microsoft YaHei UI\0" + "MALGUN.TTF,Malgun Gothic\0" + "SEGUISYM.TTF,Segoe UI Symbol\0";
static const char system_link_ms_ui_gothic[] = "MICROSS.TTF,Microsoft Sans Serif\0"
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=125009
Your paranoid android.
=== debian11 (32 bit report) ===
d3d8: device.c:4720: Test failed: Failed to create a D3D object.
ddraw: ddraw7.c:15663: Test failed: Expected unsynchronised map for flags 0x1000. ddraw7.c:15663: Test failed: Expected unsynchronised map for flags 0x3000.
=== debian11 (build log) ===
05d0:err:winediag:d3d_device_create The application wants to create a Direct3D device, but the current DirectDrawRenderer does not support this. 05d0:err:winediag:d3d_device_create The application wants to create a Direct3D device, but the current DirectDrawRenderer does not support this. 05d0:err:winediag:d3d_device_create The application wants to create a Direct3D device, but the current DirectDrawRenderer does not support this.
=== debian11 (build log) ===
Use of uninitialized value $Flaky in addition (+) at /home/testbot/lib/WineTestBot/LogUtils.pm line 720, <$LogFile> line 24912. Use of uninitialized value $Flaky in addition (+) at /home/testbot/lib/WineTestBot/LogUtils.pm line 720, <$LogFile> line 24912. Use of uninitialized value $Flaky in addition (+) at /home/testbot/lib/WineTestBot/LogUtils.pm line 720, <$LogFile> line 24912.
This merge request was approved by Huw Davies.