Skip to content

support for unicode codepoints greater than 0xffff #361

@eposjk

Description

@eposjk

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions