nuxt-modules / google-fonts

Google Fonts module for NuxtJS
https://google-fonts.nuxtjs.org
MIT License
497 stars 41 forks source link

Not downloading locally, not working at all when deployed #202

Closed sanjacob closed 1 month ago

sanjacob commented 1 month ago

I have followed these steps:

  1. Run module add google-fonts
  2. Add it to config modules (already done by prior step)
  3. Set my font families in the configuration

You are welcome to look at my repo here: https://github.com/sanjacob/KRYPTOS/tree/2d7c6c762d708e4f5c1557911c1d36640046478b

However, when I deploy my website using: nuxt build --preset github_pages

no custom fonts are displayed whatsoever.

There seems to be a concept floating around about using @font-face, but this is ultimately unclear due to not being in the documentation, and furthermore it makes no sense since the local version works okay without it, and would be fine if it wasn't for the fact that even that doesn't actually download the fonts beforehand and instead serves them by url, which kind of defeats the point of this package.

sanjacob commented 1 month ago

I couldn't get nuxt/fonts to work either so I'll close this, but it's either the method of deployment (github_pages) or maybe my route config is preventing from accessing fonts. Regardless, I just opted for a manual font configuration for the meantime, as I have two fonts only.