GrabarzUndPartner / nuxt-font-loader-strategy

Helps to load fonts and activate them by preloading.
https://grabarzundpartner.github.io/nuxt-font-loader-strategy/
MIT License
64 stars 1 forks source link

Unsupported type warning in chrome for truetype font #183

Closed jenbuzz closed 3 years ago

jenbuzz commented 3 years ago

In Chrome there is warning when using ttf extensions with preload.

<link rel=preload has an unsupported type value

The type="font/truetype" seems invalid.

Can this somehow be overwritten with a valid type or what can be done about this warning?

ThornWalli commented 3 years ago

Hi,

can you try the branch? https://github.com/GrabarzUndPartner/nuxt-font-loader-strategy/tree/feature/fix-ttf-mimetype

The TTF the FontFace type was defined, now the MIME type should fit in the preload.

jenbuzz commented 3 years ago

Hey,

Yes, that seems to have solved the problem. I tested it in a setup where both ttf and woff fonts are included and both were correctly loaded; no warnings in Chrome.

Thanks!

ThornWalli commented 3 years ago

Package is now up to date