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

[Feature] Xft emoji support #898

Open
Microcrap opened this issue Oct 28, 2019 · 10 comments
Open

[Feature] Xft emoji support #898

Microcrap opened this issue Oct 28, 2019 · 10 comments
Labels
display: x11 Issue related to X11 backend feature New feature PR or issue help wanted Issue with which contributors need help priority: low A low priority issue or PR rendering Issue or PR related to rendering

Comments

@Microcrap
Copy link

Please, consider to add more emoji support in conky.

If you want make a simple thing : displaying the country image before the user WAN ip adress, actually you can't.
In some case, emoji can replace text for a better grasp.

Thanks.

@lasers lasers added the enhancement Issue that suggests an enhancement label Oct 28, 2019
@flipflop133
Copy link

Does someone know a workaround to for example have wttr weather emojis like sun, clouds or the only way is to wait for proper support?

@lasers
Copy link
Contributor

lasers commented Jan 12, 2020

You could try serving the image from curl wttr.in/???.png.

@flipflop133
Copy link

I got it working with these lines:
${texeci 5 curl wttr.in/arlon_lang=en.png | convert - -transparent black $HOME/.config/conky/out.png}
${image $HOME/.config/conky/out.png -p 0,0}
But the issue now, is that the image doesn't reload itself until I restart the session or conky, I checked the conky variables but there's no option to reload an image, is there a workaround to this?

@lasers
Copy link
Contributor

lasers commented Jan 12, 2020

Maybe set up a hourly cron or something like that to reload conky as a workaround.

An easy way to force Conky to reload your ~/.config/conky/conky.conf: "killall -SIGUSR1 conky". Saves you the trouble of having to kill and then restart. You can now also do the same with SIGHUP.

@flipflop133
Copy link

I created this bash script that kill conky(as stated in conky man) then runs all my conky configs, but it's doing it only one time. Then conky keeps running.
(the first script is triggered by a .desktop file as described in arch wiki for conky.)

#FIRST SCRIPT
#!/bin/bash
while true;
do {
killall -SIGUSR1 conky
source $HOME/scripts/conky_configs.sh
}
sleep 10;
done

#SECOND SCRIPT
#!/bin/bash
conky -c ~/.config/conky/conky1.conf &
conky -c ~/.config/conky/conky2.conf &
conky -c ~/.config/conky/conky3.conf &
conky -c ~/.config/conky/conky4.conf &
conky -c ~/.config/conky/conky5.conf & exit

@github-actions
Copy link

github-actions bot commented May 4, 2023

This issue is stale because it has been open 365 days with no activity. Remove stale label or comment, or this issue will be closed in 30 days.

@github-actions github-actions bot added the Stale Issue/PR that requires attention because it hasn't been updated in over a year label May 4, 2023
@bi4k8
Copy link
Collaborator

bi4k8 commented May 5, 2023

Under Wayland, where we use Pango instead of Xft for text rendering, emoji are fully supported.

@github-actions github-actions bot removed the Stale Issue/PR that requires attention because it hasn't been updated in over a year label May 6, 2023
@Caellian Caellian added priority: low A low priority issue or PR feature New feature PR or issue rendering Issue or PR related to rendering display: x11 Issue related to X11 backend and removed enhancement Issue that suggests an enhancement labels Apr 17, 2024
@Caellian Caellian changed the title [Feature Request] - More emojis support [Feature] Xft emoji support Apr 17, 2024
@Caellian
Copy link
Collaborator

Caellian commented Apr 17, 2024

Lemonbar didn't have emoji support with xft, then someone made a fork and this commit introduced support for emojis. (EDIT: while the referenced commit did add (partial?) support for emoji, it only actually shows how to handle variable length utf8 sequences, see my later comment for more info)

The commit in question basically upgrades character storage from u16 to u32 and uses FcUtf8ToUcs4 to compute ucs2 codes from utf8 text.

Lemonbar is a good example because it's got a small codebase that basically covers this issue.

@Caellian Caellian added the good first issue Great issues for first-time contributors label Apr 17, 2024
@shawnmuzick
Copy link

Under Wayland, where we use Pango instead of Xft for text rendering, emoji are fully supported.

Not sure if I'm understanding this right; are you saying emoji should work as expected running under wayland?
I'm having the same issue in wayland that I described in #2024 on X11.

@Caellian
Copy link
Collaborator

Caellian commented Oct 13, 2024

Not sure if I'm understanding this right; are you saying emoji should work as expected running under wayland?
I'm having the same issue in wayland that I described in #2024 on X11.

Then you're running under XWayland or using a wrong/bad/unsupported font. Pango supports emoji fonts in Google format (at least). FreeType (used by Pango) doesn't support Apple's color emoji standard. So if you're having issues with this on Wayland you're likely doing something wrong.

Xft does require additional support to draw emoji properly (source: arch wiki), and it's a non-trivial fix which is why a lot of X11 apps (that use X11 directly) don't support them. Conky likely should, but implementing it takes time. Come to think of it... this isn't a "good first issue".

@Caellian Caellian added help wanted Issue with which contributors need help and removed good first issue Great issues for first-time contributors labels Oct 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
display: x11 Issue related to X11 backend feature New feature PR or issue help wanted Issue with which contributors need help priority: low A low priority issue or PR rendering Issue or PR related to rendering
Projects
None yet
Development

No branches or pull requests

6 participants