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
Improve Font Rendering for Japanese Language #825
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR and sorry for the late reply!
assets/scss/variables.scss
Outdated
} | ||
|
||
body:lang(zh) { | ||
--base-font-family: var(--zh-font-family), var(--sys-font-family), var(--cjk-font-family), sans-serif; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not really sure about this value.
I would write:
--base-font-family: "Lato", var(--sys-font-family), var(--zh-font-family), var(--cjk-font-family), sans-serif;
So:
- Lato is used for the Latin alphabet
- In case Lato is not available, use
--sys-font-family
(which is optimized for the Latin alphabet) - For CJK text, it won't match any of the previous cases, so it will try to use
--zh-font-family
and succeed.
The same rule applies to ja
. It's important to have "Lato" in the first place, otherwise the Latin alphabet would use the CJK font and look really bad.
Does that make sense to you?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your review, and I apologize for the delayed response.
Your comments were correct, so I have made the necessary revisions.
You might notice several push --force operations, which occurred due to my unfamiliarity with GitHub.
Please note that these do not affect the content of the commits.
94b657d
to
d8e8159
Compare
d8e8159
to
21da06e
Compare
6ff3b65
to
3ceb679
Compare
3ceb679
to
3167461
Compare
This pull request aims to improve the display of Japanese text on the website.
Changes made:
The new font family list prioritizes commonly available and high-quality fonts for Japanese text, such as "Hiragino Kaku Gothic ProN", "Meiryo", and "Noto Sans CJK JP". These changes will help to ensure that our Japanese text is displayed accurately and beautifully across various operating systems and browsers.
Please review the changes and let me know if any adjustments are needed.