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 #23405

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>
@ckerr ckerr added the backport This is a backport PR label May 4, 2020
@trop trop bot added the 9-x-y label May 4, 2020
Copy link
Member

@deepak1556 deepak1556 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ckerr !

@deepak1556 deepak1556 merged commit e549aec into 9-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.

@deepak1556 deepak1556 deleted the backport/9-x-y/23247-respect-system-language-prefs-on-windows-and-mac branch May 5, 2020 02:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
9-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