usefulness / easylauncher-gradle-plugin

Add a different ribbon to each of your Android app variants using this gradle plugin. Of course, configure it as you will
https://medium.com/@cycki/ribbonize-your-android-application-laucher-icon-again-c52e08d58172?source=friends_link&sk=4747a61844ce085a648d2116780ec4d3
MIT License
388 stars 18 forks source link

emoji in label #409

Open miduch opened 1 year ago

miduch commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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
miduch commented 1 year ago

Let's wait for some kind heart emoji expert 😜