fix: improve Japanese typography (lang attribute and font fallback)#706
Merged
dgraf-gh merged 1 commit intodedicatedcode:mainfrom Jan 23, 2026
Merged
fix: improve Japanese typography (lang attribute and font fallback)#706dgraf-gh merged 1 commit intodedicatedcode:mainfrom
dgraf-gh merged 1 commit intodedicatedcode:mainfrom
Conversation
Contributor
|
Thank you very much for the PR. I will check it thoroughly tomorrow. If it passes, and I have no doubt about that, after a quick look over the changes, I will create a quick release for it. That is something I would never have seen, or even been aware of. For me, it looked totally fine. I did not know that we need to jump through so many hoops. |
Contributor
|
I tested it and it looks good from a technical point. One thing, you could have got away without changing the html files under fragments, but it does not hurt. They only got included partially into other html files. Thank you for the change. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
This PR makes a small typography-related improvement.
Thank you again for the recently added Japanese language support.
From a Japanese native reader’s perspective, when page language metadata and Japanese-appropriate font fallbacks are missing, text can appear readable but slightly “off” due to glyph variant mismatches. This PR aims to address that subtle issue.
Changes
th:lang):lang(ja)These changes help browsers select the correct glyph variants for Japanese text.
About alternatives
If bundle size is a concern, a lighter alternative would be to avoid embedding fonts and only specify common Japanese system fonts as fallbacks.
This PR prioritizes visual consistency and quality, but the approach can be adjusted depending on the project’s design and size constraints.
Additional notes
This improvement is specifically intended to polish the newly added Japanese localization.
Background on the glyph-variant issue (with examples):
https://heistak.github.io/your-code-displays-japanese-wrong/