Fix font priority for languages using Han characters #5930
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #5670
Changes proposed in this pull request:
The presence of the simplified Chinese fonts 'PingFang SC' and 'Microsoft YaHei' in several theme's font-family lists means that if they are installed on a users system they will be favoured over other fonts for displaying text in other languages that use 'Han characters' such as Japanese and traditional Chinese leading to broken text in those languages.
By removing 'PingFang SC' and 'Microsoft YaHei' from the font-family list of these themes we allow the browser to use the HTML lang attribute to display text in a font that is correct for the language if one is present on the users system.
We now simply leverage browser behaviour to provide a much fuller and more robust check for default language fonts.
How to test the feature manually:
Enter Display page of Configuration.
From language menu select '日本語' then click submit button to display Japanese.
From language menu select '简体中文' then click submit button to display simplified Chinese.
From language menu select '正體中文' then click submit button to display traditional Chinese.
Pull request checklist: