I want to adjust a grub theme to have a truly large font (about double from what is normal). I usually work with the install.sh
that comes with it and with grub-customizer
.
The easy part, consensus everywhere:
Take a (vector, i.e. ttf) font, and convert it to the (pixel, .pf2
) font, placed in /boot/grub/fonts/
:
sudo grub-mkfont --output=/boot/grub/fonts/DejaVuSansMono36.pf2 \
--size=36 /usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf
The tough or strange part: Specifying this font in the central theme's settings file is not working. Somehow a space separated formed is required?!?
title-font: "Sans Regular 12"
or
title-font: "Gnu Unifont Mono Regular 16"
or
terminal-font: "Lato 12"
Questions:
- How do I get from above literal filename
DejaVuSansMono36.pf2
to the "pretty name"? (guessing the right spots for spaces?) - And how does the referencing work?
- And, should I put the .pf2 in the final place, or place it in theme folder? (looking at github, the latter seems right...)
The grub theme spec does not says anything about this <longname><space><size>
format. Given that .pf2
are hardcoded pixel-fonts (like in the 90's :-) I wonder what value a size indication is anyway...
small addition
The pretty, “spacy” name can be found out by virtue of hex editor:
Still a bit of a wonder, how it gets referenced. Does grub (or grub customizer) parse all existing *.pf2
files for the prettier name contained ?!? (or is there a lookup-table somewhere I… overlooked?)
0 Answers