-
Notifications
You must be signed in to change notification settings - Fork 32
🤖 feat: add Geist font for Windows/Linux #580
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
Conversation
…on macOS - Install geist package for font files - Bundle Geist Sans and Geist Mono variable fonts - Update font-family stack to prefer -apple-system (San Francisco) on macOS - Geist fonts will be used on Windows and Linux - Use font-display: swap for better loading performance _Generated with `mux`_
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.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
- Move geist package to devDependencies (only used at build time) - Add scripts/copy-fonts.sh to copy fonts from node_modules to public/ - Integrate font copying into Makefile build-static target - Font files are now copied during build, not checked into git This keeps the geist package as the source of truth for font files while avoiding duplication in the repository.
Font files are copied from node_modules during build and should not be committed to the repository.
Variable fonts already include all weights (100-900), so individual weight files are not needed.
Absolute paths (/fonts/...) resolve to file:///fonts/... in packaged Electron builds. Use relative paths (./fonts/...) so Vite resolves them correctly relative to the CSS file. Thanks to Codex for catching this!
Revert to absolute paths (/fonts/...) as relative paths don't work with Storybook and Vite's asset handling. The base: './' in vite config ensures these resolve correctly in packaged builds. Also fix shell script indentation to use tabs.
|
@codex The font path issue has been investigated. Absolute paths are required for Storybook and dev server to work correctly. The |
|
To use Codex here, create an environment for this repo. |
shfmt expects 2 spaces for line continuations, not tabs.
This PR updates the font configuration to use San Francisco on macOS and Geist on Windows/Linux.
Changes
geistpackage and bundled Geist Sans and Geist Mono variable fontsglobals.css--font-primaryto prefer-apple-system(San Francisco) first, then fall back toGeist--font-monospaceto prefer macOS system monospace fonts, thenGeist MonoImplementation
The font-family stack now works as follows:
-apple-system(San Francisco) for UI andMonaco/Menlofor monospaceGeistfor UI andGeist Monofor monospaceFont files are bundled in
public/fonts/and loaded withfont-display: swapfor better performance.Generated with
mux