ulauncher-emoji
ulauncher-emoji copied to clipboard
Flag icons are broken
Although flag emojies are copied correctly to the clipboard
The issue occurs with noto
and blobs
theme
👉 Workaround: Select a fallback theme different from noto
and blobs
@MyriaCore Any ideas where to look for a cause of this bug?
Sorry for late reply. I'll start digging around
No worries! And thanks for looking!
mine works, weird. I've done a ton of weird hacks to my stuff since tho, might have been something I changed. What emoji pack are u using?
It appears to only affect noto and blobs:
With noto:
With blobs:
With apple:
noto
After merging I did some minor refactoring, but I also tested tested with the version from your branch and I saw the same issue there.
It appears to only affect noto and blobs:
Indeed.
The icon entries for most of these flags are null in blobmoji / noto. Maybe a codepoint mismatch?
Aah.. I had noto
as a fallback theme too.
Changing it helped.
So I guess it's not a bug then. I'm going to close it
Or you think it is a bug and the flags should be there with noto?
Yeah, I think so. I don't think these flags are new, so it's probably not an emoji 13 thing, right? AFAIK noto and blob should support full emoji 11 (or maybe 12).
I think I agree. I also think that at this point you know much more about emojies than I do, so I'll trust your opinion. I haven't heard about noto or other emoji packs before your PR 😀
This is the unicode.org listing for the lithuania flag. The listed codepoint is U+1F1F1 U+1F1F9
.
Here's the function where we generate the URL to get the image:
https://github.com/Ulauncher/ulauncher-emoji/blob/d56b2c8106ab5fbc87b55f608a3bd75db23f2904/EmojiSpider.py#L68-L94
base
for this codepoint should be "1f1f1-1f1f9"
, so it probably attempts to retrieve the URL here, which 404's.
ah.. I see
$ python -c 'print("🇱🇹".encode("unicode-escape"))'
b'\\U0001f1f1\\U0001f1f9'
So the codepoint seems correct. Maybe there's some schema that noto and blob is using that I didn't properly enforce.
After looking at the makefile for the blobmoji project, I've determined that the schema for the flags is actually :
-
https://github.com/C1710/blobmoji/raw/master/third_party/region-flags/png/%s.png
... where %s
is the BCP 47 country/region/subregion code. See the readme for the region-flags dir.
Also in the readme for blobmoji:
Also note that the images in the font might differ from the original assets. In particular the flag images in the font are PNG images to which transforms have been applied to standardize the size and generate the wave and border shadow. We do not have SVG versions that reflect these transforms.
This explains why the flags are so detailed, and why they don't appear to have other non-country flags (like the trans flag or the pirate flag)
There's a similar passage in the readme for noto emoji. This is kinda worrying.
@gornostal the way I see it, we have 3 options:
- Close the issue and cry. It looks like it'd be pretty difficult to add support for these emojis from this data source.
- Try to see if their makefile can be modified to maintain these transformations in image form.
- Find a different datasource for the noto and blob emoji set, like emojipedia. Related: #15
- blobs: https://emojipedia.org/google/android-7.0/
- noto: https://emojipedia.org/google/android-11.0/
Wait NVM, I'm super wrong I think. I think that the flags are turned into emojis, since there's an unknown_flag_aliases
file.
It looks like the make the name for the flag emojis here. The names are reformatted in 04x hex.
Not sure why the normal URL of just:
https://github.com/C1710/blobmoji/raw/master/png/128/emoji_u1f1f1_1f1f9.png
doesn't work then.
I think it's fine because there's a fallback theme. If it's set correctly the issue is gone. Thanks a lot for looking into this!