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

The plans for Color Emojis #163

Closed
actionless opened this issue Nov 1, 2024 · 10 comments
Closed

The plans for Color Emojis #163

actionless opened this issue Nov 1, 2024 · 10 comments

Comments

@actionless
Copy link
Collaborator

@neeasade previously mentioned that in the potential todo list (#82)

what's your current thoughts on merging in https://github.com/odknt/st ?

i just did a quick smoke-testing and it seems to work:

2024-11-01--1730427703_277x42_scrot

i think together with font2 which we are already supporting (which would fix fontsize for emojis) - it should be looking alright, without problem with the width

@actionless
Copy link
Collaborator Author

also, @odknt, i've noticed that in general by the feature-set your fork of st is quite similar to ours - so mb you'll be interested to develop together one common application?

@odknt
Copy link
Contributor

odknt commented Nov 6, 2024

I have used xst in the past and am interested in improving it, so I may create a PR, though I can't promise.

I have rewritten the source code in my fork to use cairo instead of libxft to support color emoji, but it seems to be supported by libxft since 2.3.5.

Therefore, I believe that xst can display color emoji with a simple modification.

@odknt
Copy link
Contributor

odknt commented Nov 6, 2024

After a little checking of the source code, we found that xst already supports color emoji.
I was able to display color emoji by adding color=true to the font attribute specified in st.font_fallback in .Xresources.

Also, the font2 specification in config.h was broken and could not be used.
If st.font_fallback in .Xresources is not specified, fonts_count is never set, so the font specified in font2 is never loaded.

@actionless
Copy link
Collaborator Author

did you managed to make it work on practice? 🤔
if so, could you please share the screenshot and the st.font string?

to my knowledge it's not intended to work with colors emojis

@actionless
Copy link
Collaborator Author

oh, my bad, i found the issue in my test setup - i was using Emoji One font which wasn't working, but another font, Noto Color Emoji worked allright - so i think it may be due to svg-format font or smth like that

@actionless
Copy link
Collaborator Author

so after setting it like this it actually worked:

st.font: Monospace:pixelsize=26:antialias=true:autohint=true;
st.font_fallback: Noto Color Emoji:pixelsize=20:color=true,Meslo LG S for Lcarsline:pixelsize=22,DejaVu Sans Mono:pixelsize=25

2024-11-06--1730926914_135x42_scrot

and as i was forseeing, indeed alt_font thing fixed the width problem

@actionless
Copy link
Collaborator Author

also, is there specific reason you chosen to use cairo there, @odknt ?

and btw you're still welcome to join the development as for example another feature you're maintaining in your fork is also in our list: #47

@actionless
Copy link
Collaborator Author

Also, the font2 specification in config.h was broken and could not be used.

it was broken when building xst with -flto=auto, but i finally found a moment to fix that: #164

@odknt
Copy link
Contributor

odknt commented Nov 7, 2024

also, is there specific reason you chosen to use cairo there, @odknt ?

When I forked st, libxft did not support color emoji. So I had to rewrite it by using cairo.

and btw you're still welcome to join the development as for example another feature you're maintaining in your fork is also in our list: #47

I honestly don't know much about SIXEL support, as I just merged patches created by others.

@actionless
Copy link
Collaborator Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants