Skip to content
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

Text blurry with any font size and native resolution #38

Open
agucova opened this issue Jul 18, 2020 · 13 comments
Open

Text blurry with any font size and native resolution #38

agucova opened this issue Jul 18, 2020 · 13 comments

Comments

@agucova
Copy link

agucova commented Jul 18, 2020

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.

@mateosss
Copy link
Owner

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
Copy link
Owner

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.

@Fernthedev
Copy link

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

@agucova
Copy link
Author

agucova commented Jul 28, 2020

@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 agucova closed this as completed Jul 28, 2020
@agucova agucova reopened this Jul 28, 2020
@agucova
Copy link
Author

agucova commented Jul 28, 2020

(Sorry for that, keyboard smash)

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

@Fernthedev
Copy link

@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?

@agucova
Copy link
Author

agucova commented Jul 28, 2020

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.

@Fernthedev
Copy link

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 ;)

@agucova
Copy link
Author

agucova commented Jul 28, 2020

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.

@heyzec
Copy link
Collaborator

heyzec commented Apr 2, 2021

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

@mateosss
Copy link
Owner

mateosss commented Apr 2, 2021

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.

@SephGER
Copy link
Contributor

SephGER commented Oct 13, 2021

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.

@mateosss
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants