Dealing with font faces #1019
Answered
by
tianenpang
Code-Victor
asked this question in
Help
-
How can I use google fonts in my const globalStyles = globalCss({
'@font-face':{
fontFamily:'Open Sans',
src:`url('./fonts/OpenSans-VariableFont.ttf') format('truetype')`,
},
}) declaration const Button = styled("button", {
backgroundColor: "$gray400",
borderRadius: "9999px",
fontSize: "16px",
fontFamily: "Open Sans",
}) how can I do this ? |
Beta Was this translation helpful? Give feedback.
Answered by
tianenpang
May 27, 2022
Replies: 1 comment 1 reply
-
I am using different fonts as theme token and then using them in
Here's an example with next.js: codesandbox.io/s/next-stitches-font-1ygp26 Preload the font in |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
Code-Victor
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am using different fonts as theme token and then using them in
styled
orcss
.globalCss
.createStitches
.Here's an example with next.js: codesandbox.io/s/next-stitches-font-1ygp26
Preload the font in
pages/_document.tsx