Open imrek opened 6 years ago
Sorry for taking so long to respond to this.
I suspect the issues you see might at least partially be caused by svg-term
(via. term-schemes) not parsing your --profile
correctly.
The expected behavior would be for svg-term-cli
to fail loudly (being unable to parse dconf
files as the xml expected for --term=terminal
), which is not what happens for you if I understand correctly? (Something with the terminal
format detection appears to be off...)
svg-term-cli
expects you to provide a --terminal
flag that indicates the profile format to parse:
I have multiple issues, but all center around preserving the aspect ratio when I convert an
asciicast
file to an .svg.I have been experimenting with the flags but I'm not sure what solves this problem.
I use
gnome-terminal
on Ubuntu 16.04. I would like to get output where the width : height ratio is 16 : 9. I've found that the closest cols/rows setting to this is 94 cols and 28 rows given the default font and font-size ingnome-terminal
, so accordingly I add--width=94
and--height=28
to the command.The full command I'm using is:
svg-term --in=htop --out=htop.svg --term=terminal --profile=profile4svgterm.dconf --no-optimize --width=94 --height=28
Unfortunately, the
.svg
output is rendered with a different aspect ratio.Here's
gnome-terminal
runningasciinema play htop
:And then the
.svg
output as displayed bychromium-browser
:It's probably hard to perceive at first glance, but the
.svg
output slightly taller and therefore has a different aspect ratio. Also, the characters on the right hand side are slightly cut off, but that probably also happens because of the different ratio.As I understand, the terminal profile I specify is ignored by
svg-term
, or I am not specifying it correctly. As of Ubuntu 16.04 the terminal profile is part ofdconf
, ie. it's not a stand-alone file somewhere in the home directory of the user, but part of a database and can be exported. Here's the file (profile4svgterm.dconf
) I get after exporting fromdconf
.I am not sure
svg-term
understands this file and would like to know what format works the best.Another, unrelated issue I have noticed that sometimes the
.svg
output is a file with 0 bytes and therefore the command has to be repeated to get a non-empty output.Here's a gist with the input and output files.
UPDATE: After doing some troubleshooting, I've found that If I specify a non existing file for
--profile
,svg-term
does not complain about the invalid path/file.