[Win] Stop using MLang font linking for system font fallback 1. MLang is a legacy API 2. It has a problem for some Tibetan characters (Bug 212688) Here is the list of revisions relevant to MLang: r25543 r28810 r29140 : Bug 16548 – REGRESSION(r28810): Font style and sizes are weird for Japanese text r30179 : Bug 17041 – Eastern Asian fonts do not display without specific box in Control Panel
Created attachment 401511 [details] WIP patch
I realised an unexpected behavior change in the WIP patch. Windows has two types of code pages, ANSI code page and OEM code page. https://en.wikipedia.org/wiki/Windows_code_page The current implementation chooses a CJK font depending on ANSI code page by getting LOCALE_IDEFAULTANSICODEPAGE. https://trac.webkit.org/browser/webkit/trunk/Source/WebCore/platform/graphics/win/FontCacheWin.cpp?rev=261013#L170 On the other hand, the WIP patch depends on OEM code page. This font fallback behavior is same with normal Windows apps, for example notepad.exe. ANSI code page can be changed by Control Panel → Region → Format OEM code page can be changed by Control Panel → Region → Admistative → Change System Locale...
Created attachment 401610 [details] [screenshot] with the WIP patch The WIP patch doesn't work well for some CJK ideographs. https://en.wikibooks.org/wiki/Unicode/Character_reference/6000-6FFF
(In reply to Fujii Hironori from comment #3) > The WIP patch doesn't work well for some CJK ideographs. > https://en.wikibooks.org/wiki/Unicode/Character_reference/6000-6FFF Here is what is happening. 1. meta file method returned "Microsoft Sans Serif" font. 2. "Microsoft Sans Serif" doesn't contain the character 3. Get the FontLink registry of "Microsoft Sans Serif" MSGOTHIC.TTC,MS UI Gothic YUGOTHM.TTC,Yu Gothic UI MINGLIU.TTC,PMingLiU SIMSUN.TTC,SimSun GULIM.TTC,Gulim MSJH.TTC,Microsoft JhengHei UI MSYH.TTC,Microsoft YaHei UI MALGUN.TTF,Malgun Gothic SEGUISYM.TTF,Segoe UI Symbol 4. "MS UI Gothic" and "Yu Gothic IU" doesn't contain the character 5. No "PMingLiU" font found in my Windows 6. the function exits with nullptr
Created attachment 401627 [details] WIP patch