-
Notifications
You must be signed in to change notification settings - Fork 343
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
Should we use SVG for screenshots in the README? #1467
Comments
If I recall correctly, we moved away from Asciinema because we were rendering animation for examples that didn’t require animation to explain, not because SVG etc. was a bad idea. |
Here are two examples with Looking at their source is also interesting -- they are text and should be compressible by git. (Note that this is affected by my config; I'd need to add I'll see if I can remove the header. |
One issue is that opening the image in a new tab doesn't show the image in Chrome. The dev console shows this error:
Another issue is that, it seems, the header has to be removed manually. It's easy, though. |
Actually, looking at it more carefully, this tool is having trouble with Unicode widths. |
Finally (for today), here is Update: Asciinema has the same problem with Unicode as well. See asciinema/asciinema-player#34. |
It seems that these SVGs rely on the fonts installed on the system. So, the lines look broken in Chrome on a Chromebook but fine in Firefox on Linux (with whatever fonts I happen to have installed). See screenshots in slowli/term-transcript#51. I haven't found a good way around this. It should be possible to embed the fonts (or even just the relevant parts of them) in the SVGs, but it doesn't seem easy. Also, these SVGs do not open in Inkscape correctly. SVGs produced by https://github.com/marionebl/svg-term-cli do show correctly, but share the issue with fonts and not opening full-screen when opened via Github. Here's an example: (pay no attention to I don't know if this is a deal breaker. The upside is that the SVG files are very small and readable in a text editor. (Update: Thought not the svg-term-cli's one; perhaps it ahs some option to not minify) |
I guess I should mention that if we use SVG, the screenshot in the previous message shows a downside of #1466, since the newer bullets have worse alignment at least when viewing the SVG on my Chrome. Here's how pieces of the SVG from previous comment look on my machine (PNG screenshots below): |
I like the idea of using SVG, but probably only if we can get it to render nicely on most systems. If it's easy to embed a font and it doesn't use too much space, then that seems like a good solution to me. |
Agreed. I couldn't find an easy way to do it yet, only instructions on how to do it manually which don't look very fun. There's also the notion of optimizing the font (embedding only the characters we need), which sounds great in theory but would be another, likely not very fun, step. |
I put some more observations about fonts & SVG at #2231 (comment). In particular, a lot of the font problems also apply to code block sections of the documentation website at e.g. https://martinvonz.github.io/jj/v0.9.0/tutorial.html#the-operation-log. |
It seems viable to switch from our PNG screenshots to auto-generated SVG screenshots using tools like https://github.com/slowli/term-transcript, or aciinema + https://github.com/nbedos/termtosvg.
Some of these tools can generate animated screenshots, but I'd prefer to stick with static one for less distraction and more compatibility.
The advantages (hopefully) are a simpler workflow for updating the screenshot and less of an increase to repo size whenever we change the screenshots.
Are there any problems with that? Are there browsers that can't show SVG? I know this repo used Asciinema before and moved away from it, but I don't know why.
This is inspired by the difficulty of updating screenshots for something like #1466 or 5c703ae.
The text was updated successfully, but these errors were encountered: