Skip to content

Fix Lato webfont never loading; reorder Latin fallbacks before CJK#393

Merged
jaywonchung merged 1 commit into
SymbioticLab:developfrom
mosharaf:develop
May 18, 2026
Merged

Fix Lato webfont never loading; reorder Latin fallbacks before CJK#393
jaywonchung merged 1 commit into
SymbioticLab:developfrom
mosharaf:develop

Conversation

@mosharaf
Copy link
Copy Markdown
Member

The NexT font.enable flag was false, so Lato was in the CSS font stack but never fetched — visitors without it locally fell through to PingFang SC for all Latin text.

  • Add custom/head.njk to inject Google Fonts preconnects and a Lato stylesheet (weights 400, 700, 400-italic; skips unused 300/light and 700-italic that the theme's built-in loader would pull)
  • Wire it up via custom_file_path.head in _config.yml
  • Override $font-family-base and its derived variables in custom/variables.styl so Latin system fonts appear before CJK fonts in the fallback chain

Also update package-lock.json to reflect the dependency state after a clean rebuild triggered during development of the above.

The NexT font.enable flag was false, so Lato was in the CSS font stack
but never fetched — visitors without it locally fell through to PingFang
SC for all Latin text.

- Add custom/head.njk to inject Google Fonts preconnects and a Lato
  stylesheet (weights 400, 700, 400-italic; skips unused 300/light and
  700-italic that the theme's built-in loader would pull)
- Wire it up via custom_file_path.head in _config.yml
- Override $font-family-base and its derived variables in
  custom/variables.styl so Latin system fonts appear before CJK fonts
  in the fallback chain

Also update package-lock.json to reflect the dependency state after a
clean rebuild triggered during development of the above.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@mosharaf mosharaf requested a review from jaywonchung May 18, 2026 03:21
Copy link
Copy Markdown
Member

@jaywonchung jaywonchung left a 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 one (it's beyond my knowledge) but it locally renders fine so let's merge and find out

@jaywonchung jaywonchung merged commit c8aec2b into SymbioticLab:develop May 18, 2026
1 check passed
@mosharaf
Copy link
Copy Markdown
Member Author

Website was rendering weirdly in my new laptop. Turns out it uses a font assuming I locally have it, which the new one didn't. Now I made Claude to pull it from Google fonts. Let's say it broke anything in the process or not

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