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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why do some emojis come up and others dont ? #815

Closed
gk-patel opened this issue Oct 12, 2023 · 2 comments
Closed

Why do some emojis come up and others dont ? #815

gk-patel opened this issue Oct 12, 2023 · 2 comments
Assignees
Labels
b-bug Something isn't working

Comments

@gk-patel
Copy link

gk-patel commented Oct 12, 2023

Describe the bug
If I give a string with emoji in the vs-code,
image
(as text: # This is an emoji ❤️ 😊 😀)

They are not rendered properly
image

Additional context
I checked your code, you are using fillText as specified here
https://stackoverflow.com/questions/56312457/how-to-load-and-draw-emojis-on-canvas-efficiently
Thought it would work, not sure why it does not.

@gk-patel gk-patel added the b-bug Something isn't working label Oct 12, 2023
@aarthificial
Copy link
Contributor

Right now, CodeBlock uses a naive approach to splitting strings into individual characters which doesn't take into consideration UTF-8 characters bigger than 8 bits (emojis, CJK characters, etc.)
You can see in the image you provided that the two last emojis are split into four invalid characters.

Sadly, we'll most likely not fix this for the old CodeBlock node.
We have a new Code node proposal (#688) which will not have these issues but it's still in the works.

@gk-patel
Copy link
Author

Thank you, I am looking forward to the new module.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
b-bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants