Ubuntu – No box characters after changing the default Grub font


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:


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?


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.

Best Answer

Basically what you want to do is use the range operator to limit the characters that your new grub font contains. If you don't use the range operator then you're going to get all the glyphs including the erroneous or incorrect box elements from your target font.

For example:

grub-mkfont -s 16 --range=0x0-0x7f -o /boot/grub/grubfont.pf2 font.tty

Will generate a font with only ASCII characters, anything your font doesn't have should decay gracefully to the default font so boxes and arrows should come from the default. Please see this website for further information: