-
Notifications
You must be signed in to change notification settings - Fork 493
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Unicode values outside Basic Multilingual Plane cannot be processed correctly. #168
Comments
It seems this is the limitation of 16-bit mapping in cmap format 4. |
Would it help if we parsed a different cmap format? |
In that case, cmap format 12 is probably a good choice then, it’s widely adopted and also the superset of format 4. |
@lixiangliu cmap 12 read support was just added with PR #207 😉 |
Closing this issue because of the cmap 12 support. @lixiangliu let me know if there's something else that blocks you from working with these fonts. |
The same issue still exists with values outside the BMP. Looks like it may be because of the limitations of |
@amart1n You're right codePointAt() is the new method to use but because of the compatibility we would need to add Mathias's polyfill: https://github.com/mathiasbynens/String.prototype.codePointAt and use it instead of |
Closed through #338 |
For example:
font.stringToGlyphs('\u{2f894}')
will return an array with two “.nodef” in it.If

font.glyphs.glyphs[...]
is being used to access a certain glyph directly, then it will return an object with an undefined unicode value.The text was updated successfully, but these errors were encountered: