tancredi / fantasticon

Icon font generation tool
MIT License
923 stars 102 forks source link

Bad loading of generated font #248

Open mykola-shkut opened 3 years ago

mykola-shkut commented 3 years ago

sorry I need help to understand the behavior Font is not loaded and as result, we have Arial as rendered font image

I thought that the issue might be in disk cache Screenshot_13 As you can see when we load the font from the memory cache - all good but in other case, we load font correctly even from disk cache image 2021-07-13_14h48_38

Maybe you know how to solve that issue?

ezisezis commented 2 years ago

Same issue happens for me as well, but very very inconsistently - I don't (yet) have an easy way to reproduce it

mykola-shkut commented 2 years ago

The root of the issue is that font generated with characters starting from 0 or something like that but for the browser, we need to have basic Latin. So it loads the default font instead. I've managed to fix it by using .fantasticonrc.js file with the list of icons, but starting with 48 ("0" in Unicode)

  codepoints: {
    "icon-first": 48,