[Aptitude-devel] Bug#962926: Bug#962926: Images of aptitude screens are illegible due to being scaled to browser width

Axel Beckert abe at debian.org
Tue Jun 16 12:50:55 BST 2020


Control: tag -1 + unreproducible moreinfo patch

Hi Joshua,

thanks for the bug report.

Joshua C. Lackey wrote:
> All of the screenshots are illegible because a width="100%" property
> is set in each <img> tag, causing them to be stretched and introducing
> significant aliasing.

I can confirm that they are stretch to full width.

> Resizing the browser window to a smaller size
> does not help much. Due to the low resolution of the images (484x316)
> and small size of the text, even minimal scaling causes blurring and
> aliasing.

I though unfortunately (or luckily, depending on the point of view ;-)
can't reproduce this in Chromium from unstable. Even in fullscreen
mode on a 1900x1200 screen, they're crisp, sharp and very readable for
me, but of course also very pixely.

Sounds like a potential browser bug to me. Scaled images should never
be more blurry than unscaled images. They just should be more pixely.

In which browser did you have that effect? Maybe you can make a
screenshot of the issue, too.

> The text, though small, is completely clear and legible when
> the images are rendered at their native resolution.

Same for me in any scaling, i.e. I can't reproduce this. :-/

> I suggest removing the width='100%' property from each of the the
> <imagedata> tags in the DocBook XML source (/doc/en/aptitude.xml) or
> adding an img selector in the CSS stylesheet (/doc/aptitude.css) with
> a width:auto property, which will override the the HTML <img> tags.

While I do see that this at least would solve the issue described
above, I'm reluctant to actually do this as it would introduce
legibility issues on big screens with high resolutions for some people
due to the (as you noted) rather small resolutions of the pictures.

The only clean solution for this which comes to my mind, is to redo
all the screenshots in some terminal with scalable fonts and do
vectorised SVG screenshots, e.g. with gtk-vector-screenshot.

Just tried this, but defacto, there's a PNG inside the SVG, at least
when trying inside lxterminal or gnome-terminal. :-(

Another idea is to use aha (https://github.com/theZiz/aha), but this
is non-trivial with a TUI application and only usable in HTML, not in
PDF, etc. We though could let them render in a browser and take a
vector screenshot of that.

If I do a "hardcopy" in screen and pipe that file through aha, the
layout is fine, but it doesn't catch the ANSI colors.

Piping the saved transcript of "script -c aptitude" through aha messes
with the indentation, but keeps the colors.

Best result (but still unusable) so far was with:

$ printf '[qy\n' | aptitude | aha > aptitude.html

But actually the "[" had no effect.

asciinema might also be an option, too, but that's usually for videos
not for pictures. But we could freeze a frame and take a vector
screenshot then.

		Regards, Axel
-- 
 ,''`.  |  Axel Beckert <abe at debian.org>, https://people.debian.org/~abe/
: :' :  |  Debian Developer, ftp.ch.debian.org Admin
`. `'   |  4096R: 2517 B724 C5F6 CA99 5329  6E61 2FF9 CD59 6126 16B5
  `-    |  1024D: F067 EA27 26B9 C3FC 1486  202E C09E 1D89 9593 0EDE



More information about the Aptitude-devel mailing list