No box characters after changing the default Grub font
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:
http://grub.enbug.org/gfxterm
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:
- Bug #729470 "grub-mkfont outputs fonts that grub cannot use (font characters not in ascending order: 0 <= 0)"
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!
IIRC I ran into what you describe when using all glyphs:
(source: xrmb2.net)
Maybe it's an issue with grub-mkfont
, maybe it has to do with the font, I don't know. :(
What worked for me:
- Using
gbdfed
to generate the 'bdf' file from a console font (eg. '/usr/share/consolefonts/Lat15-VGA16.psf'): File > Import > Console Font, then File > Save As... - Converting only the ASCII characters with
grub-mkfont
:grub-mkfont --output=out.pf2 --range=0x0-0x7f out.bdf