Open eposjk opened 2 years ago
Hello, I have the same issue.
I am currently trying to create a font for Hentaigana (U+1B000 - U+1B0FF). It would be very convenient if I could combine svgs to create the font file, but is currently prevented from doing so due to this.
While analyzing this issue, I found a similar problem in the svgicons2svgfont
package, which fantasticon depends on.
https://github.com/nfroidure/svgicons2svgfont/issues/96
Hence it might take a little more than fixing the line that @eposjk has pointed out.
I would be more than happy to help regarding this issue. 🙂
When I tried to generate a font overriding the "👥" symbol (codepoint: 128101), fantasticon seems to change the codepoint to 61697. The problem seems to be https://github.com/tancredi/fantasticon/blob/fd548373efc11ab3aa3efcc9d5b05b6d994aae64/src/generators/asset-types/svg.ts#L33
According to https://developer.mozilla.org/de/docs/Web/JavaScript/Reference/Global_Objects/String/fromCharCode String.fromCharCode() only supports 16-bit codepoints. ES2015 offers a similar function String.fromCodePoint() which does not have that restriction.
When I replace it locally, it seems to work.