patrickhulce / fontmin-webpack

Minifies icon fonts to just the used glyphs.
MIT License
139 stars 19 forks source link

fix: handle 2-bytes to 6-bytes unicode characters #58

Closed ArTiSTiX closed 2 years ago

ArTiSTiX commented 2 years ago

Fixes https://github.com/patrickhulce/fontmin-webpack/issues/54

Allow 2 to 6 bytes unicode characters to be recognized as glyphs.

ArTiSTiX commented 2 years ago

@patrickhulce I tried to implement tests with font-awesome 6, but unfortunately, that's the only icon pack i know that uses 2-bytes glyphs, and since version 6, they no longer provide the SVG webfont used in test to check glyphset is correct.

I could add a custom pack generated by icomoon though...

ArTiSTiX commented 2 years ago

@patrickhulce Thanks for inciting me to add the test, as i had to fix something.

I added a custom-font generated from icomoon. Unfortunately, Icomoon does not put names on the TTF glyphs, so i had to convert the svg font back to ttf in FontForge (so it's not the original output from icomoon, even though it should work fine with the original ttf icomoon provides).

ArTiSTiX commented 2 years ago

@patrickhulce Thanks for all the merges.

Are you planning to publish as 4.0.0 ?

patrickhulce commented 2 years ago

yep it's published @ArTiSTiX thanks for all your help!

ArTiSTiX commented 2 years ago

Thanks a lot @patrickhulce !