Skip to content

Fix Google Fonts loading in Tauri webview#16

Merged
lmist merged 1 commit into
mainfrom
lmist/helsinki
Apr 3, 2026
Merged

Fix Google Fonts loading in Tauri webview#16
lmist merged 1 commit into
mainfrom
lmist/helsinki

Conversation

@lmist
Copy link
Copy Markdown
Owner

@lmist lmist commented Apr 3, 2026

Summary

  • Replace fetch() + Cache API font loading with <link> stylesheet injection
  • The Cache API (caches.open()) is unavailable in Tauri's WKWebView, causing font selection to silently fail
  • Simplifies setFont/initFonts from async to sync since <link> injection is synchronous

Test plan

  • Change font in the picker and verify it applies immediately
  • Restart the app and verify the saved font persists
  • Select "System Default" and verify it reverts to the default monospace stack

🤖 Generated with Claude Code

Replace fetch + Cache API approach with <link> stylesheet injection.
The Cache API is unavailable in Tauri's WKWebView, causing font
selection to silently fail.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@lmist lmist merged commit c904289 into main Apr 3, 2026
2 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.

1 participant