Skip to content

Commit

Permalink
fix: respect system language preferences on Win/macOS (#23247)
Browse files Browse the repository at this point in the history
This commit fixes #18829

Previously the full preferences set to OS was not given to Chromium.

Also, this commit improves fallback font selection for CJK text.
Chromium uses browser languages to determine fallback fonts on Windows,
especially kanji/han characters in CJK.

For instance, when user sets 'en-US, ja-JP' to Accept-Language,
while Chromium chooses Japanese font for kanji text, but Electron
chooses Chinese font.  This is because only the first language was given
to Accept-Language on Electron.

This patch is based on #15532

Co-authored-by: Nitish Sakhawalkar <nitsakh@icloud.com>
Co-authored-by: Kasumi Hanazuki <kasumi@rollingapple.net>

Co-authored-by: Nitish Sakhawalkar <nitsakh@icloud.com>
Co-authored-by: Kasumi Hanazuki <kasumi@rollingapple.net>
  • Loading branch information
3 people authored and ckerr committed May 4, 2020
1 parent d2fb214 commit 343453b
Show file tree
Hide file tree
Showing 7 changed files with 349 additions and 176 deletions.
4 changes: 4 additions & 0 deletions filenames.gni
Expand Up @@ -518,6 +518,10 @@ filenames = {
"shell/common/key_weak_map.h",
"shell/common/keyboard_util.cc",
"shell/common/keyboard_util.h",
"shell/common/language_util.h",
"shell/common/language_util_linux.cc",
"shell/common/language_util_mac.mm",
"shell/common/language_util_win.cc",
"shell/common/mac/main_application_bundle.h",
"shell/common/mac/main_application_bundle.mm",
"shell/common/mouse_util.cc",
Expand Down

0 comments on commit 343453b

Please sign in to comment.