Comments (4)
Hi everyone. I used this workaround to make it work on my project:
-
Install and setup
@storybook/nextjs
as described here https://storybook.js.org/docs/8.0/get-started/nextjs -
Setup
staticDirs
in.storybook/main.ts
:
staticDirs: [
{
from: "../node_modules/geist/dist/fonts/geist-sans",
to: "/fonts/geist-sans",
},
{
from: "../node_modules/geist/dist/fonts/geist-mono",
to: "/fonts/geist-mono",
},
],
};
- Use
localFont
directly in.storybook/preview.tsx
:
import localFont from "next/font/local";
import type { Preview } from "@storybook/react";
import "../src/app/globals.css";
const GeistSans = localFont({
src: "../fonts/geist-sans/Geist-Variable.woff2",
variable: "--font-geist-sans",
});
const GeistMono = localFont({
src: "../fonts/geist-mono/GeistMono-Variable.woff2",
variable: "--font-geist-mono",
});
const preview: Preview = {
decorators: [
(Story) => (
<div className={`${GeistMono.variable} ${GeistSans.variable}`}>
<Story />
</div>
),
],
};
export default preview;
from geist-font.
same issue @BorisZubchenko have you found any solution ?
from geist-font.
Unfortunately, no. I've returned to Inter for now.
from geist-font.
ok thanks I'ill do that
from geist-font.
Related Issues (20)
- Download link doesn't work in the readme
- Lowercase letter `L` looks too similar to number `1` HOT 4
- GeistMono rendering weird ligature when using `!==`
- Spacing issues HOT 1
- Request Vietnamese support
- Some stylistic sets do not work for cyrillic equivalents of latin characters
- Geist typeface does not seem to work with latest Next.js canary, required for PPR HOT 1
- Dotted zeros instead of slashed zeros. HOT 2
- Geist font not working with TailwindCSS HOT 2
- Suggestions for improving the Cyrillic shapes HOT 2
- Yay package broken
- Can't download from release page HOT 1
- 400 and 300 font-weight issues with Variable file for Geist Sans HOT 3
- Font is unsupported for Vercel og-image generation
- [Next] Allow importing font files directly
- Need help installing font in react app and tailwind css HOT 1
- windows terminal warns geist mono is not monospaced
- [Website] Toggle font family in website is slow HOT 1
- `TypeError: next_font_local__WEBPACK_IMPORTED_MODULE_0___default(...) is not a function` when used "use client" HOT 1
- Onboarding Geist to Google Fonts HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from geist-font.