how to import all size from one font (noto-sans-sc) at once #227
-
I have trouble to import
I just check out the doc website that you are able to do the font import like the follow, which seems like not available for fontsource/website/src/pages/_app.tsx Line 2 in 8d99837 Is there anything I miss from the doc? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
This comment was marked as off-topic.
This comment was marked as off-topic.
-
Hey @aboveyunhai,
We split it by weight to ensure you're only loading CSS that you need and nothing unnecessary. It only needs to be imported once in |
Beta Was this translation helpful? Give feedback.
Hey @aboveyunhai,
import "@fontsource/raleway/variable.css";
is part of the variable font specification which is only supported by a limited number of fonts. This does not includenoto-sans-sc
.We split it by weight to ensure you're only loading CSS that you need and nothing unnecessary. It only needs to be imported once in
_document.tsx
after all and Webpack will handle the rest. :)