Skip to content
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

Addressing issues #168 related to not supporting multi byte characters #297

Closed

Conversation

talltyler
Copy link

JavaScript strings handle two byte characters as two items which breaks some multi lingual and emoji support.

Motivation and Context

This addresses #168

How Has This Been Tested?

npm test passes. And this has been tested in IE 11 and Chrome.

Types of changes

Mostly this just uses a for...of loop if the browser enables it. Because this is a new feature checks are made to make sure this method is available, and the build tools have been updated to support these changes.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I did npm run test and all tests passed green (including code styling checks).
  • I have added tests to cover my changes.
  • My change requires a change to the documentation.
  • I have updated the README accordingly.
  • I have read the CONTRIBUTING document.

@schuylr
Copy link

schuylr commented Nov 6, 2017

I tried your branch with a non-BMR character (this one: 🙂 ) on a font I made with a flat vector path (no colour like #193 mentions), and I still get a blank square. I'm using getPath and toPathData on the response.

@talltyler
Copy link
Author

This branch doesn't solve any of the rendering issues these types of glyphs. It only allows multibyte characters to be passed through the system and handled as single units rather than two unrelated code points.

@schuylr
Copy link

schuylr commented Nov 9, 2017

I understand that, but I made a custom font with the same sort of glyphs that you would find in the ASCII/BMR range and it still didn't work. The result was still a blank square.

@talltyler
Copy link
Author

Can you post this font and the character that you are passing in?

@schuylr
Copy link

schuylr commented Nov 9, 2017

Cursive.ttf.zip

The character I tried is above. "slightly smiling face" or U+1F642

@fpirsch
Copy link
Collaborator

fpirsch commented Mar 19, 2018

Closed through #338

@fpirsch fpirsch closed this Mar 19, 2018
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants