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

Terminal emoji are not present in gifs #2

Closed
jdoss opened this issue Aug 15, 2022 · 7 comments
Closed

Terminal emoji are not present in gifs #2

jdoss opened this issue Aug 15, 2022 · 7 comments

Comments

@jdoss
Copy link

jdoss commented Aug 15, 2022

It looks like emoji that are used in the terminal are not getting processed correctly by agg. Here is the same .cast file on my asciinema.org account

image

vs the gif output from agg.

image

@ku1ik
Copy link
Contributor

ku1ik commented Aug 16, 2022

At the moment agg can render b&w emojis with Noto Emoji font. If you install this font system-wide then it should find it and use it automatically. Alternatively, you can download the NotoEmoji-Regular.ttf file, put it in some directory, and pass --font-dir <path/to/that/dir> option which will add this additional dir to agg's font lookup paths.

As for color emojis - agg uses fontdue library for text rendering and this lib doesn't yet support color fonts. See mooman219/fontdue#47 . Once fontdue adds support for it, e.g. for Noto Color Emoji as mentioned in that issue, we'll have it in agg.

@ku1ik
Copy link
Contributor

ku1ik commented Aug 16, 2022

I think it should also be possible to install a patched font like Nerd Fonts with embedded emojis, and use it by passing --font-family ... option. I haven't tried it though.

@ku1ik
Copy link
Contributor

ku1ik commented Aug 16, 2022

I tested with Nerd Fonts but it turns out Nerd Fonts embed all the fancy stuff like Powerline symbols etc but they don't include unicode emojis. So b&w Noto Emoji font is our friend at the moment.

@ku1ik
Copy link
Contributor

ku1ik commented Sep 5, 2022

Closing given this works fine when Noto Emoji font is installed.

@ku1ik ku1ik closed this as completed Sep 5, 2022
@gerhard
Copy link

gerhard commented Sep 5, 2022

What am I doing wrong?

ls $HOME/Downloads/Noto_Emoji/static
NotoEmoji-Bold.ttf  NotoEmoji-Light.ttf  NotoEmoji-Medium.ttf  NotoEmoji-Regular.ttf  NotoEmoji-SemiBold.ttf

agg --font-family=NotoEmoji-Regular --font-dir=$HOME/Downloads/Noto_Emoji/static # omitting the rest
Error: no faces matching font family NotoEmoji-Regular

agg --version
agg 1.2.0

uname -a
Linux x22 5.15.58 #1-NixOS SMP Fri Jul 29 15:25:34 UTC 2022 x86_64 GNU/Linux

@ku1ik
Copy link
Contributor

ku1ik commented Sep 5, 2022

@gerhard Just remove --font-family=NotoEmoji-Regular and use --font-dir=$HOME/Downloads/Noto_Emoji/static only.

@gerhard
Copy link

gerhard commented Sep 5, 2022

Works a treat, thank you!

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

3 participants