matter icon indicating copy to clipboard operation
matter copied to clipboard

Text blurry with any font size and native resolution

Open agucova opened this issue 3 years ago • 13 comments

I've been testing matter for the last couple of hours, however, I noticed that text in GRUB is completely blurry. Interestingly, the icons are perfectly sharp.

I've tried changing and forcing GRUB's resolution, playing with different font sizes, using different fonts and even adding every option possible to grub-mkfont!

For reference (taken from QEMU, tho it also happens irl):

image

This is with GRUB version 2.04-1ubuntu26 running over Pop!_OS, freshly installed. I'm using matter from master, and installed all the requirements directly from Ubuntu's repositories.

agucova avatar Jul 18 '20 06:07 agucova

This is a known issue at the time, if you check the examples from the readme you can see the problem there as well. Grub seems to display the font bitmaps generated from grub-mkfont at a not-so-good pixel ratio, I'll look around a tad more for a solution and let you know if I find something.

mateosss avatar Jul 18 '20 14:07 mateosss

Just to give this a follow up, some days ago I posted this question to the grub help mailing list. Unfortunately it had no answers.

mateosss avatar Jul 27 '20 14:07 mateosss

Same problem on Ubuntu 20.04. Still no solutions or workarounds? Is anything progressing with this problem?

Fernthedev avatar Jul 28 '20 18:07 Fernthedev

@Fernthedev Sadly, there are no solutions or workarounds, and this issue seems to be blocked until it is fixed by grub upstream, so we're left waiting (and there doesn't seem to be much interest either from the grub developers).

agucova avatar Jul 28 '20 18:07 agucova

(Sorry for that, keyboard smash)

I think for now the best option is to file a bug with grub's bug tracker.

agucova avatar Jul 28 '20 18:07 agucova

@Fernthedev Sadly, there are no solutions or workarounds, and this issue seems to be blocked until it is fixed by grub upstream, so we're left waiting (and there doesn't seem to be much interest either from the grub developers).

If there is no interest in the grub developers, then why do they bother create or maintain the software that allows you do this? Why not deprecate it?

Fernthedev avatar Jul 28 '20 18:07 Fernthedev

When I said that there is no interest from grub developers, I was referring to the fact that there were no replies to the post in the grub mailing list.

In any case, I think the answer that you're looking for is that grub's primary goal was never to be pretty, it was to be a practical, fast bootloader. Quoting a developer from grub-devel (circa 2010):

Actually I don't understand why AA fonts are needed for a screen that most users will look at for about 3 seconds to select their OS and boot.

I suspect most distros will set up grub to skip the GRUB screen completely.

Most grub users don't care about the aesthetics of their bootloader, especially when you don't see it for more than a couple of seconds each boot. I disagree, but it's a reasonable issue, and it's understandable that the grub developers may have other priorities.

Edit: just noticed that you may be referring to matter itself, I think the answer to that is that pixelated fonts are not that bad, I definitely prefer matter to grub defaults. Plus, I still have hope this can be fixed.

agucova avatar Jul 28 '20 19:07 agucova

Edit: just noticed that you may be referring to matter itself, I think the answer to that is that pixelated fonts are not that bad, I definitely prefer matter to grub defaults. Plus, I still have hope this can be fixed.

By deprecate, I meant deprecate grub-mkfonts if they won't bother work on it. But yes, I see the argument being made of GRUB not being meant for beautiful or minimal UI. But they could at least acknowledge the issue and state what actions they are going to take with it e.g fix, work on later, ignore etc.

I'm fine if the GRUB developers are prioritizing bug fixes/performance over a simple styling problem, but I wonder if anyone in the community is able to contribute and fix it as well. I can't say myself because I am not familiar with OS level software and even less boot software or C/C++ whatever the case may be. If there is someone, good luck to you and thank you ;)

Fernthedev avatar Jul 28 '20 22:07 Fernthedev

I agree with you, but at the moment, I haven't seen this particular bug (or feature) being filed in their issue tracker, which would seem like the "standard" way to reach them. If I have the time this week, I'll do it.

With regards to a community fix, I'm a C developer, but given Grub's decision to implement their own font format (which is not that well documented), I doubt I can do much.

agucova avatar Jul 28 '20 22:07 agucova

There is potentially a workaround using this method. I did a simple test by manually extending the logo in /boot/grub/themes/Matter/icons as shown in the picture then setting icon_width parameter in the theme.txt file to accommodate for the larger icon. This means we'll need a dependency such as the Pillow package to create a png from text. Screenshot from 2021-04-02 13-10-12

heyzec avatar Apr 02 '21 05:04 heyzec

That's an interesting idea, I like it. Right now using the .pf2 files is a matter of convenience because we can use grub-mkfont directly, but I would definitely like to see this implemented as an alternative (at first at least, if stable enough it could evolve to be the default way of showing text.

mateosss avatar Apr 02 '21 12:04 mateosss

I am trying this right now and the problem is, that the original text is still showing. Also the text can't have an extra "selected" color because the icon keeps the png color.

SephGER avatar Oct 13 '21 06:10 SephGER

Thank you for trying it out! To be honest even with those or other downsides I would still like to have it as an alternative to avoid the weird pixelated look. Using any "light" font right now looks particularly bad because of this. Even this example from the readme is severely affected and the font is not that thin.

mateosss avatar Oct 13 '21 13:10 mateosss