Summary: | [Win] Stop using MLang font linking for system font fallback | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Fujii Hironori <Hironori.Fujii> | ||||||||
Component: | Platform | Assignee: | Nobody <webkit-unassigned> | ||||||||
Status: | NEW --- | ||||||||||
Severity: | Normal | CC: | ews-watchlist, glenn, jbedard, mmaxfield | ||||||||
Priority: | P2 | ||||||||||
Version: | WebKit Nightly Build | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Unspecified | ||||||||||
Attachments: |
|
Description
Fujii Hironori
2020-06-09 21:25:26 PDT
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
|