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

emoji in label #409

Open
miduch opened this issue Jan 20, 2023 · 4 comments
Open

emoji in label #409

miduch opened this issue Jan 20, 2023 · 4 comments
Labels
help wanted Extra attention is needed

Comments

@miduch
Copy link

miduch commented Jan 20, 2023

Is it possible to use emoji in label ?

I tried it like this :

filters = chromeLike("Abc ⚡")
filters = chromeLike("Abc \uD83D\uDD25")

but no success, end result is like this :
Screenshot 2023-01-20 at 16 00 09

@mateuszkwiecinski
Copy link
Member

mateuszkwiecinski commented Jan 20, 2023

It should be possible, but you would have to use a font that supports that emoji 👀 by default the plugin uses Roboto, which doesn't seem to support it: https://fonts.google.com/specimen/Roboto?preview.text=%F0%9F%99%88%F0%9F%91%8F%E2%9D%A4%EF%B8%8F%E2%9C%85%E2%9A%A1&preview.text_type=custom

image

(I might not understand how emojis work 😛 this is my best guess)

@mateuszkwiecinski
Copy link
Member

Aaaand I see already I was wrong 😛 It doesn't seem like the font is responsible for "drawing" emojis. I'll have to dig a bit further 👀

@mateuszkwiecinski
Copy link
Member

Ooor maybe I wasn't that way off? I played with different fonts and I somewhat made it work:

filters chromeLike(label: "❤️🙈👏✅⚡️", font: "Apple Color Emoji"),

but for some reason, they don't behave in an expected way, and I don't really understand why.
The Apple Color Emoji, which I believe is the default font my system used for displaying emojis produces following output:

image

so then I tried to switch to Noto Color Emoji, but it doesn't show any characters for me :/

I also accidentally used an invalid font name, which produced even stranger output, with heart not being rendered in color and system falling back to font called Dialog
image

To summarize, I don't understand how emojis work, and the more I read the dumber I get 😛 As a temporary workaround I can suggest playing with different fonts, and some of them should work in your case 🤷 For example this:
chromeLike(label: "Abc ⚡", font: "foo font, doesn't exist") produces following output for me locally
image

@mateuszkwiecinski mateuszkwiecinski added the help wanted Extra attention is needed label Jan 21, 2023
@miduch
Copy link
Author

miduch commented Mar 3, 2023

Let's wait for some kind heart emoji expert 😜

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Development

No branches or pull requests

2 participants