LinuxCommandLibrary

grub-mkfont

convert fonts to GRUB PF2 format

TLDR

Convert font to GRUB format

$ grub-mkfont -o [output.pf2] [input.ttf]
copy
Specify font size
$ grub-mkfont -s [16] -o [font16.pf2] [input.ttf]
copy
Include specific characters
$ grub-mkfont --range=[0x0-0xff] -o [font.pf2] [input.ttf]
copy
Verbose conversion
$ grub-mkfont -v -o [output.pf2] [input.ttf]
copy

SYNOPSIS

grub-mkfont [options] font-file

DESCRIPTION

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.

PARAMETERS

FONT-FILE

Input font (TTF, OTF, PF2).
-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.

CAVEATS

Part of GRUB package. Larger fonts increase boot time. Limited to bitmap conversion.

HISTORY

grub-mkfont was developed as part of GNU GRUB 2 to support graphical boot menus with custom fonts.

SEE ALSO

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community