Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

support for unicode codepoints greater than 0xffff #361

Open
eposjk opened this issue Feb 28, 2022 · 1 comment 路 May be fixed by #507
Open

support for unicode codepoints greater than 0xffff #361

eposjk opened this issue Feb 28, 2022 · 1 comment 路 May be fixed by #507

Comments

@eposjk
Copy link

eposjk commented Feb 28, 2022

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

const unicode = String.fromCharCode(codepoints[id]);

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.

@skytomo221
Copy link

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.
nfroidure/svgicons2svgfont#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. 馃檪

MLoughry added a commit to MLoughry/fantasticon that referenced this issue Feb 8, 2023
@MLoughry MLoughry linked a pull request Feb 8, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants