asciinema / agg

asciinema gif generator
Apache License 2.0
1.12k stars 38 forks source link

Background/foreground rendering strangely for certain unicode characters #63

Open noprobelm opened 6 months ago

noprobelm commented 6 months ago

Describe the bug Hi, thanks for creating such an awesome tool.

I apologize in advance if this is a user error, but I can't seem to figure it out. When recording a ▄ character in the terminal, the background/foreground render unexpectedly and unpredictably (there seems to be some kind of overlap in the colors where there shouldn't be).

The corresponding .cast playback looks as I would expect it to. Here are some examples:

conway

example

To Reproduce Steps to reproduce the behavior:

  1. Record a ▄ character in the termianl (ensure the background and foreground are different colors). Convert it to a gif using agg

Expected behavior No background/foreground overlap should occur

Versions:

Output with verbose flag:

[INFO  agg] terminal size: 140x35
[INFO  agg] selected font families: ["JetBrains Mono", "Fira Code", "DejaVu Sans Mono", "Liberation Mono", "DejaVu Sans"]
[INFO  agg] selected theme: dracula
[INFO  agg] gif dimensions: 1193x706
ku1ik commented 5 months ago

Could you paste the cast file for the 2nd gif? It would help for me to know what characters and control sequences were recorded in the first place. Thanks.

noprobelm commented 5 months ago

I discarded the old cast file, here's a new one I just recorded. It uses the same character. It's worth noting this will happen with other block element characters as well.

lower_half_block.txt