Skip to content

Conversation

@GunseiKPaseri
Copy link
Contributor

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

  • Explicitly set the page language from the locale (th:lang)
  • Adjust font stacks to include Japanese-friendly fonts (Noto family / system fallbacks)
  • Switch font stacks based on :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/

@dgraf-gh
Copy link
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.

@dgraf-gh
Copy link
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.

@dgraf-gh dgraf-gh merged commit fe92b78 into dedicatedcode:main Jan 23, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants