Bug 212688 - [Win] Some Tibetan characters aren't shown
Summary: [Win] Some Tibetan characters aren't shown
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-06-03 01:13 PDT by Fujii Hironori
Modified: 2020-06-09 21:27 PDT (History)
0 users

See Also:


Attachments
[Screenshot] WinCairo port (39.15 KB, image/png)
2020-06-03 01:15 PDT, Fujii Hironori
no flags Details
DOTTED CIRCLE + TIBETAN ASTROLOGICAL SIGN SDONG TSHUGS (17 bytes, text/html)
2020-06-03 01:17 PDT, Fujii Hironori
no flags Details
[Screenshot] WinCairo (after r262804) (43.92 KB, image/png)
2020-06-09 19:01 PDT, Fujii Hironori
no flags Details
[Screenshot] Tibetan Wikipedia in WinCairo (after r262804) (98.10 KB, image/png)
2020-06-09 19:03 PDT, Fujii Hironori
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Fujii Hironori 2020-06-03 01:13:14 PDT
[Win] Some Tibetan characters aren't shown

Both AppleWin and WinCairo have the issue.

https://unicode.org/charts/nameslist/c_0F00.html
https://ja.wikipedia.org/wiki/%E3%83%81%E3%83%99%E3%83%83%E3%83%88%E8%AA%9E
Comment 1 Fujii Hironori 2020-06-03 01:15:38 PDT
Created attachment 400906 [details]
[Screenshot] WinCairo port
Comment 2 Fujii Hironori 2020-06-03 01:17:58 PDT
Created attachment 400907 [details]
DOTTED CIRCLE + TIBETAN ASTROLOGICAL SIGN SDONG TSHUGS
Comment 3 Fujii Hironori 2020-06-08 13:12:23 PDT
FontCache::systemFallbackForCharacters of FontCacheWin.cpp is
using three steps to choose a fallback font.

1. Try IMLangFontLink::MapFont method
2. If no font found, try meta file method
3. If no font found, try FontLink registry method

For the missing Tibetan characters, IMLangFontLink::MapFont
method returns "Arial Unicode MS" font, but Uniscribe returns
USP_E_SCRIPT_NOT_IN_FONT for the font.

For other Tibetan characters, IMLangFontLink::MapFont method
returns "Microsoft Himalaya" font
Comment 4 Fujii Hironori 2020-06-08 16:36:54 PDT
Following StackOverflow suggests reffering Chromium's render_text_win.cc.

How to automatically choose most suitable font for different language? - Stack Overflow
https://stackoverflow.com/q/16828868

Check if Unicode character is displayed or tofu - Stack Overflow
https://stackoverflow.com/q/47840800

Chromium UI was using Uniscribe, but it was replaced by HarfBuzz.

https://codereview.chromium.org/891013003

https://chromium.googlesource.com/chromium/src.git/+/2e9885788692f69203a98fb42347428ef553d640/ui/gfx/render_text_win.cc
https://chromium.googlesource.com/chromium/src.git/+/2e9885788692f69203a98fb42347428ef553d640/ui/gfx/font_fallback_win.cc
Comment 5 Fujii Hironori 2020-06-09 19:01:11 PDT
Created attachment 401504 [details]
[Screenshot] WinCairo (after r262804)

r262804 (Bug 212947) changed the situation. After the change,
some Tibetan characters start to show while combining marks still
doesn't render correctly.
Comment 6 Fujii Hironori 2020-06-09 19:03:07 PDT
Created attachment 401505 [details]
[Screenshot] Tibetan Wikipedia in WinCairo (after r262804)

Tibetan pages look broken.
https://bo.wikipedia.org/
Comment 7 Fujii Hironori 2020-06-09 21:27:20 PDT
I'm going to try stop using MLang font linking in the following ticket.
Bug 213008 – [Win] Stop using MLang font linking for system font fallback