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 Windows & macOS #23407

Conversation

ckerr
Copy link
Member

@ckerr ckerr commented May 4, 2020

Description of Change

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

CC @deepak1556, @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>
@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label May 4, 2020
@trop trop bot added 8-x-y backport This is a backport PR labels May 4, 2020
@electron-cation electron-cation bot removed the new-pr 🌱 PR opened in the last 24 hours label May 4, 2020
@codebytere codebytere merged commit 60bcf42 into 8-x-y May 5, 2020
@release-clerk
Copy link

release-clerk bot commented May 5, 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.

@codebytere codebytere deleted the backport/8-x-y/23247-respect-system-language-prefs-on-windows-and-mac branch May 5, 2020 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8-x-y backport This is a backport PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants