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

theme settings seems to be ignored #249

Closed
mkrueger opened this issue Oct 4, 2023 · 4 comments · Fixed by #256
Closed

theme settings seems to be ignored #249

mkrueger opened this issue Oct 4, 2023 · 4 comments · Fixed by #256

Comments

@mkrueger
Copy link

mkrueger commented Oct 4, 2023

I'm currently making an ansi editor and for the animation part I added an asiciinema export function (as well as video formats).

According to the docs "theme" should work in the header description

Animation:
https://asciinema.org/a/46SkhiCE9yAhCjYGByiKxzAF7

But the theme setting gets ignored:

{"version": 2, "width": 80, "height": 23, "timestamp": 0, "title": "millenium", "env": {"TERM": "xterm-256color", "SHELL": "/bin/bash"}, "theme": { "fg": "#aaaaaa", "bg": "#000000", "palette": "#000000:#0000aa:#00aa00:#00aaaa:#aa0000:#aa00aa:#aa5500:#aaaaaa:#555555:#5555ff:#55ff55:#55ffff:#ff5555:#ff55ff:#ffff55:#ffffff" }  }

Or do I misunderstood something from https://github.com/asciinema/asciinema/blob/main/doc/asciicast-v2.md?

I should get more dos like colors as output.

One feature request: it would be awesome if line height could be part of the format as well - I need a 1.1em setting for the CP437 stuff my tool can animate. I'll add unicode at some point as well but block chars are quite common in the CP437 scene.

Thanks - awesome project btw.

@ku1ik
Copy link
Contributor

ku1ik commented Oct 16, 2023

Ah, turns out the player doesn't yet implement extraction of a theme from the file.. I completely forgot about that!

There's related idea of adding ability to specify custom format via player's options using the same format as in the cast file (#212 (comment)).

I hope to get this in place for v3.7.

@ku1ik
Copy link
Contributor

ku1ik commented Feb 14, 2024

The fix (#256) is ready and will be released soon in v3.7.

Regarding the line height:

Adjusting line height is currently the only way of fixing the rendering of block characters, but it's not a 100% solution, as it highly depends on the font and how the OS/browser renders text. I believe the proper/ultimate solution to this problem is to render the block (and other "ascii drawing") characters not with text (as it's done currently) but with canvas or svg, making them use full row height regardless of the line height. This is something I plan to tackle soon 🤞

@ku1ik
Copy link
Contributor

ku1ik commented Feb 14, 2024

@mkrueger Does the theme look correct here?

image

@ku1ik
Copy link
Contributor

ku1ik commented Feb 14, 2024

Btw, this is lovely ANSI art!

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

Successfully merging a pull request may close this issue.

2 participants