agg icon indicating copy to clipboard operation
agg copied to clipboard

agg failed on using default font or stuck when using custom font

Open 0komo opened this issue 2 years ago • 4 comments

Describe the bug agg failed on using default font or stuck when using custom font.

To Reproduce Steps to reproduce the behavior:

  1. agg demo.cast demo.gif or agg demo.cast demo.gif --font-family "Cascadia Mono"
  2. Return Error: no faces matching font families JetBrains Mono,Fira Code,SF Mono,Menlo,Consolas,DejaVu Sans Mono,Liberation Mono or stuck if font provided into --font-family is exist.

Expected behavior Convert asciicast file into a gif file.

Versions:

  • OS: Prooted ARM Arch Linux in Termux
  • agg: 1.4.2

Additional context -

0komo avatar Sep 08 '23 12:09 0komo

By stuck you mean it hangs, never finishes?

Can you show the output of the agg command with -vv option added for extra verbosity?

ku1ik avatar Oct 02 '23 14:10 ku1ik

I was having similar issues in Termux. The fix for me was putting --font-dir=~/.termux Pointing to this font dir path found & used the fonts. Example: agg --font-dir=~/.termux demo.cast demo.gif

gnit24 avatar May 20 '24 18:05 gnit24

@mbekkomo you can try recently released agg 1.5.0 (https://github.com/asciinema/agg/releases/tag/v1.5.0) which handles font loading and rendering much better.

ku1ik avatar Oct 27 '24 10:10 ku1ik

@ku1ik I can't test it since I can't reproduce the issue. I'm using VanillaOS right now. @gnit24 can probably try it out.

0komo avatar Oct 27 '24 17:10 0komo

May you can add a prompt for the specified font directory to the error message, which can be patched separately in the termux-package.

zixijian avatar Jan 21 '25 07:01 zixijian

I've just released 1.7 (https://github.com/asciinema/agg/releases/tag/v1.7.0), which upgrades several font related dependencies. Font loading should work much better.

If you still experience these problems with 1.7 we can re-open and dig deeper into the problems.

ku1ik avatar Oct 22 '25 16:10 ku1ik