Closed ahmetkca closed 1 year ago
I have tried resvg
renderer instead of fontdue
and it was able to render ββ Έβ and it didn't render anything for βπ€β at all.
I think the problem is with the renderer. I don't know maybe there is a better renderer?
Can you provide example .cast file so we can try to reproduce the problem? Also, what OS?
maybe can try add option --renderer "resvg"
I just hit this too on macOS 13.2.1 on a 2022 M2 MacBook Pro:
Expected:
Actual (no options):
Actual (--render "resvg"
):
I'm happy to share the cast file but GitHub doesn't allow the ".cast" file type as an attachment; how would you like to receive it? Alternately, if it's easier, my terminal app is trivial to reproduce, just clone and run make
and then ./build/demo
: https://github.com/charlesnicholson/improg. It has some whitespace bugs on Linux and Windows but at least the emoji do render :)
I just discovered the --font-family
flag, and they fix the display of the unicode characters in my prompt, but the 2-column emoji are all still broken. This happens with and without the --renderer resvg
flag.
./agg-aarch64-apple-darwin --renderer resvg --font-family "Hack Nerd Font" improg-bad.cast improg.gif
I've just released 1.4.0 with much improved font loading and rendering behaviour. Please give it a try. Also see new Fonts section in README.
Thanks for the quick update! Unfortunately I'm not seeing any improvements for the various emoji (U+1F6..). With agg built from the 1.4.0 tag:
../agg/target/release/agg improg.cast improg.gif --font-family "MesloLGS NF" --renderer resvg
../agg/target/release/agg improg.cast improg.gif --font-family "MesloLGS NF"
Here's a screen grab from my terminal as the demo is running:
Here's the cast file I'm using. improg.cast.zip
Perhaps it has something to do with my font? I'm using a nerd-patched Meno: https://github.com/ryanoasis/nerd-fonts/blob/master/patched-fonts/Meslo/M/Regular/complete/Meslo%20LG%20M%20Regular%20Nerd%20Font%20Complete.ttf
@charlesnicholson See Fonts section in README for info on emoji support. Without Noto Emoji font on your system you won't get any emoji rendered.
Ah, thanks, gotcha. Should I open another ticket for supporting colored emoji with the user's font?
As for color emojis - agg uses fontdue library in its default renderer backend and this lib doesn't yet support color fonts. See https://github.com/mooman219/fontdue/issues/47 . Once fontdue adds support for it, e.g. for Noto Color Emoji as mentioned in that issue, we'll have it in agg.
We also have this alternative SVG based renderer - resvg - but similarly, it can't deal with color emoji properly yet. See https://github.com/RazrFalcon/resvg/issues/485#issuecomment-982854419
In other words, you could open a ticket but I don't plan to look into that until either of the libs gets better support for it, or until we write another renderer using a different text rendering library. So it's not really going to happen soon.
I see, thanks for the response! I've been using https://github.com/icholy/ttygif and it works with whatever the user's font + setup are; I was hoping to move to asciinema but I guess it's not quite there yet :)
I just released agg 1.5.0 with improved support for emoji, including rendering color ones :tada:
https://github.com/asciinema/agg/releases/tag/v1.5.0 https://docs.asciinema.org/manual/agg/usage/#emoji
If you have a chance to give it a shot then let me know how it performs now. Thanks!
I have a cli application with spinner and I also use some unicode characters such as βπ€β (U+1F916) and ββ Έβ. They show up as outline rectangles instead. I have also tried to use Nerd Font by specify custom
--font-dir
and--font-family