Skip to content

I can't use Local Fonts with Gatsby & Vanilla Extract #499

Answered by tombrereton
tombrereton asked this question in Q&A
Discussion options

You must be logged in to vote

Solution:

In the end I created a Storage Account in Azure, create a Blob Container, and uploaded all my fonts to there.
You can then find a url to the font in the file "properties".

This means I can import my fonts like so:

import { fontFace } from '@vanilla-extract/css'

export const EverettRegular = fontFace({
  src: 'url(https://exampleaccountstorage.blob.core.windows.net/fonts/TWKEverett-Regular-web.woff2)',
})

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
1 reply
@tombrereton
Comment options

Comment options

You must be logged in to vote
3 replies
@danielschmid
Comment options

@tombrereton
Comment options

@danielschmid
Comment options

Answer selected by tombrereton
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants