Linux command
grub-mkfont 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Convert font to GRUB format
grub-mkfont -o [output.pf2] [input.ttf]
Specify font size
grub-mkfont -s [16] -o [font16.pf2] [input.ttf]
Include specific characters
grub-mkfont --range=[0x0-0xff] -o [font.pf2] [input.ttf]
Verbose conversion
grub-mkfont -v -o [output.pf2] [input.ttf]
说明
grub-mkfont converts fonts to GRUB's PF2 bitmap format, enabling custom fonts in the GRUB boot menu. The tool accepts TrueType, OpenType, and other font formats. It can generate fonts at specific sizes and with specific character ranges, allowing fine control over which glyphs are included in the output.
参数
- -o, --output _FILE_
- Output PF2 file.
- -s, --size _N_
- Font size in pixels.
- -i, --index _N_
- Face index for TTC.
- --range _RANGE_
- Unicode range to include.
- -v, --verbose
- Verbose output.
- --help
- Display help information.
FAQ
What is the grub-mkfont command used for?
grub-mkfont converts fonts to GRUB's PF2 bitmap format, enabling custom fonts in the GRUB boot menu. The tool accepts TrueType, OpenType, and other font formats. It can generate fonts at specific sizes and with specific character ranges, allowing fine control over which glyphs are included in the output.
How do I run a basic grub-mkfont example?
Run `grub-mkfont -o [output.pf2] [input.ttf]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -o, --output _FILE_ do in grub-mkfont?
Output PF2 file.