phosphor-icons / pack

https://pack.phosphoricons.com
2 stars 0 forks source link

Generated font files seem corrupt #2

Open jovilog opened 3 weeks ago

jovilog commented 3 weeks ago

Describe the bug

Generated font files from pack.phosphoricons.com do not work, console throws error.

Steps to Reproduce

  1. Use Phosphor Backpack to generate smaller font files.
  2. Implement files into project with CSS provided.
  3. Console has errors: Firefox: downloadable font: rejected by sanitizer; Chrome: failed to decode downloaded font
  4. Icons don't show, unicode placeholder is shown.

Expected behavior

Font file should load without error. Icons should be seen.

Context

Additional notes

Trying to use generated .ttf file with a different WOFF-Converter (Font Squirrel) results in The font 'Phosphor.ttf' is corrupt and cannot be converted., too.

Using the (full) font files from phosphor-icons/web works without issues.

Maybe this is a problem with line feeds/formatting while generating the files.

lewisking commented 4 days ago

Get exactly the same issue.

rektdeckard commented 3 days ago

Interesting. My test page uses the single-file CSS which uses the base64-encoded version of the font inline, and I have not seen this issue there. The font file should be the same underlying bytes. Will do some investigating!

I had experienced some errors in the past due to manipulating the Unicode codepoints incorrectly, but that doesn't seem to be the issue if the inlined font works.