nuxt-modules / google-fonts

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

feat: Add `crossOrigin` option #160

Open ecarrara opened 8 months ago

ecarrara commented 8 months ago

Adds crossOrigin option.

The crossorigin attribute indicates whether the resource should be fetched with a CORS request as the font may come from a different domain. Without this attribute, the preloaded font is ignored by the browser.

https://web.dev/articles/codelab-preload-web-fonts#preloading_web_fonts

And without crossorigin=anonymous libraries like html-to-image are unable to use the correct font.

netlify[bot] commented 8 months ago

Deploy request for pedantic-sinoussi-65c819 pending review.

Visit the deploys page to approve it

Name Link
Latest commit 189db001360d90f096d0b12716da11f9598cde11