I've been able to change the default font of Grub, by using
grub-mkfont -s 16 -o /boot/grub/grubfont.pf2 font.tty
and then adding the following line to /etc/default/grub:
GRUB_FONT=/boot/grub/grubfont.pf2
And of course
sudo update-grub
And the new font did show up and everything (remember to chose a monospaced font). But, the "box" characters (around the entries) are never displayed correctly. I guess most fonts simply don't have that character set. Is there any way that I can add these characters? Maybe even copy them from the default unicode.pf2 font? If this is not really possible, do you know of any fonts that have got these characters?
Update:
I have tried a lot of different things, such as converting from ttf to bdf and then to pf2, and I have tried converting only the ascii characters with the option --range=0x0-0x7f
, but none of them seemed to make it work perfectly. I have a feeling that it is because I'm generating a larger font than the default, and the default glyphs therefore cannot be used.
I will try to see if I can get it to work with a smaller font size, though this were one of the reasons I wanted to change the font.
In theory grub-mkfont
allows passing multiple fonts. In this case if you can pass a link to Unifont or another font with wider coverage at the same time. The produced Grub font will be a combination of the coverage of both input fonts.
Note: a recent performance improvement to the Grub boot-time font loader means that the glyphs in a Grub font file must be in a specific ascending order, but unfortunately the change was not made to the grub-mkfont
utility at the same time! This is now a bug:
BTW, if you're interested, this bug was discovered because of experiments with investigating use of the Ubuntu Font Family in-development Ubuntu Mono font in the Grub boot menus and hitting exactly the same problem that you've just hit!
この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。
侵害の場合は、連絡してください[email protected]
コメントを追加