WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
213008
[Win] Stop using MLang font linking for system font fallback
https://bugs.webkit.org/show_bug.cgi?id=213008
Summary
[Win] Stop using MLang font linking for system font fallback
Fujii Hironori
Reported
2020-06-09 21:25:26 PDT
[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
Attachments
WIP patch
(9.98 KB, patch)
2020-06-09 21:26 PDT
,
Fujii Hironori
no flags
Details
Formatted Diff
Diff
[screenshot] with the WIP patch
(100.31 KB, image/png)
2020-06-10 18:02 PDT
,
Fujii Hironori
no flags
Details
WIP patch
(10.00 KB, patch)
2020-06-11 01:30 PDT
,
Fujii Hironori
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Fujii Hironori
Comment 1
2020-06-09 21:26:22 PDT
Created
attachment 401511
[details]
WIP patch
Fujii Hironori
Comment 2
2020-06-10 01:06:30 PDT
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...
Fujii Hironori
Comment 3
2020-06-10 18:02:39 PDT
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
Fujii Hironori
Comment 4
2020-06-10 20:50:52 PDT
(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
Fujii Hironori
Comment 5
2020-06-11 01:30:22 PDT
Created
attachment 401627
[details]
WIP patch
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug