Replies: 1 comment
-
This problem generally extends to applications benefiting from font scaling. 1 2
Since the font size should dynamically adapt to the screen resolution at runtime, I doubt a good pure Nix solution is possible. One workaround would be to add a daemon re-generating fonts at runtime, although this is likely not generally possible for all applications.
The console chooses the font size as follows:
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
There's a problem with fonts in the GRUB implementation.
A pre-rendered font is generated based on the stylix
monospace
font andapplications
size. In my case, with a 1920x1080 resolution and some font and a size of 12 it ends up looking unpleasant. And that's no surprise. If I render a modern general purpose font without anti-aliasing, with limited dithering (if at all) and with disregard to the target resolution, it will likely end up far from what its author had intended.For the linux console which also uses pre-rendered fonts I suppose what distros usually do if I understood correctly is provide pre-rendered fonts in multiple sizes and (a hopefully optimal) one is selected at runtime according to the resolution. Those fonts are also probably crafted pixel by pixel. GRUB should be able to auto-select a font as well with some scripting.
With increase in resolution, this problem can decrease because the pre-rendered font can be larger and consist of more pixels, so an arbitrary font might work but that would require pre-rendering it larger. But for an arbitrary font at 1920x1080 to have reasonable appearance it would have to be as large as to possibly make GRUB less comfortable.
Perhaps what is needed here is a fifth font category: pre-rendered. It would apply to environments that use pre-rendered fonts. I believe these include boot loaders and the linux console. That would allow the user to make a reasonable choice that we often cannot get quite right otherwise. The user would be able to provide a package with pre-rendered fonts or use a function that we provide them with to convert vector fonts to pre-rendered and provide that instead.
Beta Was this translation helpful? Give feedback.
All reactions