ivodolenc/nuxt-font-loader

Not loading font icons

Zakarya-Netlinks opened this issue ยท 1 comments

I am using iconsax font icon and font is not being loaded into the browser.

This is my folder directory
image

And this is my nuxt config:
image

And fonts are loaded like this:
image

they are broken ๐Ÿ˜”

Hi,

I just tested the module and the nuxt-font-loader works fine.

The font you mentioned isn't valid so it needs to be converted and then will work fine. (follow #16 and #19).

Font displays errors in console:

Failed to decode downloaded font: http://localhost:5500/fonts/iconsax.woff
OTS parsing error: cmap: Failed to parse table

Here's an example that works great if you have valid font (after conversion):

project structure
.
โ”œโ”€โ”€ static/
โ”‚   โ””โ”€โ”€ fonts/
โ”‚       โ”œโ”€โ”€ style.css
โ”‚       โ””โ”€โ”€ all font files (woff2, ttf...)
โ””โ”€โ”€ nuxt.config.js
// nuxt.config.js

export default {
  buildModules: ['nuxt-font-loader'],

  fontLoader: {
    url: {
      local: '/fonts/style.css',
      google: 'https://fonts.googleapis.com/css2?family=Manrope&display=swap'
    }
  }
}
<!-- index.vue -->

<template>
  <div>
    <span class="isax isax-dcube"></span>
  </div>
</template>