Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: respect system language preferences on Win/macOS #23420

Conversation

ckerr
Copy link
Member

@ckerr ckerr commented May 5, 2020

Description of Change

Backport of #23247. See that PR for more information.

CC @electron/wg-releases, @sorah

Checklist

Release Notes

Notes: Fixed an issue with navigator.languages and Accept-Language did not fully respect users' language preferences on Windows and macOS. This also improved fallback font selection for CJK texts on Windows.

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>
@ckerr ckerr added backport This is a backport PR 7-2-x labels May 5, 2020
@codebytere codebytere changed the title fix: respect system language preferences on Win/macOS (#23247) fix: respect system language preferences on Win/macOS May 5, 2020
@codebytere codebytere merged commit 6f6ca44 into 7-2-x May 7, 2020
@codebytere codebytere deleted the backport/7-2-x/23247-respect-system-language-prefs-on-windows-and-mac branch May 7, 2020 05:50
@release-clerk
Copy link

release-clerk bot commented May 7, 2020

Release Notes Persisted

Fixed an issue with navigator.languages and Accept-Language did not fully respect users' language preferences on Windows and macOS. This also improved fallback font selection for CJK texts on Windows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
7-2-x backport This is a backport PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants