rohanray / next-fonts

Import fonts in Next.js (supports woff, woff2, eot, ttf, otf & svg)
179 stars 12 forks source link

how do I use this package #12

Closed dohomi closed 5 years ago

dohomi commented 5 years ago

Hello, I would love to see how to use this package. I want to use it in my .scss file but no idea how to get it work.

I added the package but it does not work as soon the project is deployed via now.

I dropped my .otf|woff files inside of the /static/fonts/my-font-files. Which path do I use in my scss file?

Thanks

rohanray commented 5 years ago

@dohomi Please can you upload a minimal repro of your desired set-up. Thanks -RR

dohomi commented 5 years ago

@rohanray I am using Zeit now service. I had to add this "routes" section to make everything work. It has nothing to do with your package.

    {
      "src": "^/static/fonts/(.*)$",
      "dest": "/static/fonts/$1"
    }
rohanray commented 5 years ago

Thanks @dohomi for the update! Glad that you made it work. Regards -RR