canonical / Ubuntu-Sans-fonts

Other
54 stars 4 forks source link

Neofetch ASCII logo looks stretched in Ubuntu Desktop #88

Open elioqoshi opened 1 year ago

elioqoshi commented 1 year ago

Original comment: https://discourse.ubuntu.com/t/ubuntu-font-update-available-for-testing/34676/23

grafik

The ASCII logo in Neofetch looks distorted with the new font on Ubuntu Desktop.

I assume this is about the Monospaced font. Is there some variation in line height here?

lyubomir-popov commented 1 year ago

hi @djrrb, is this due to some metrics changes to comkply with Google Fonts?

djrrb commented 1 year ago

Yes I believe so. This follows their current standards but we can double check that this is the way they want it.

lyubomir-popov commented 1 year ago

@seb128 @local-optimum How is this ascii art logo created? If the change is due to a new google fonts standard that we need to adhere to, then maybe we need to regenerate that logo by updating settings in the software that generates it?

elioqoshi commented 1 year ago

Not sure if I understand the right technical aspects, but I assume the required change would be to change the line height in the Ubuntu Terminal?

lyubomir-popov commented 1 year ago

I doubt we can touch that default. AFAIK ascii art samples an image and then choose the correct character and colour to render that original pixel as a character. What I'm proposing is re-running that generator to sample again, but feed it the updated version of the font, so that it takes the new metrics into account.

Here's an (oversimplified) example. On the left, low line-height text samples the colour underneath it, and changes colour to the respective colour in the image.

On the right, to simulate the new metrics, I have text with a higher line-height. If every colour samples from the correct (x,y) position from the logo underneath, no stretching would occur. Granted, the resolution of that ascii "rasterisation" might be lower, but that's a far lesser problem.

image

joezhouchenye commented 5 months ago

The cell width and height cannot be set to below 1.00 in gnome-terminal unfortunately. I can increase the width to make the shape correct but the text gap may be weird.

Change the Font to Monospace (Noto Mono and some other fonts work well too) and set the cell width to 1.10. The result is good.

The size is changed to 26 rows in my case to display all information without scrolling.

Before: image

After: image