Typography & PF2 Fonts
Choosing readable font families for GRUB 2's bitmap renderer, recommended pixel sizes by resolution, and converting fonts to .pf2.
On this page
How GRUB 2 renders text
GRUB 2 does not load .ttf or .otf files directly. Instead, every font must be pre-rasterized into GRUB's binary bitmap format (.pf2) at a fixed pixel size.
Because gfxmenu blits grayscale anti-aliased bitmaps without subpixel LCD hinting or dynamic DPI scaling, font choice and sizing make a dramatic difference in real-world legibility.
Which font styles look best in GRUB 2
- Geometric & neo-grotesque sans-serifs (Best for UI & menus): Families like Inter, IBM Plex Sans, JetBrains Sans, Noto Sans, or Ubuntu stay crisp at medium sizes thanks to open apertures and uniform stroke widths.
- Technical monospace fonts (Best for terminal, HUD & key hints): JetBrains Mono, Fira Code, or Hack excel for
terminal-font, shortcut hints, and countdown timers where aligned digits prevent visual jitter. - Avoid hairline / ultra-light weights (
100–300): Thin 1-pixel strokes wash out or disappear on dark wallpapers and unscaled HiDPI panels. Prefer Regular (400) for body/menu items and Medium/SemiBold (500–600) for selected entries and titles. - Avoid high-contrast serifs at small sizes: Fine serifs become noisy below
22 pxin.pf2bitmaps.
Recommended font sizes by target resolution
Always generate a separate .pf2 file for each distinct size and weight you use:
| Role | 1280×720 (720p) |
1920×1080 (1080p) |
2560×1440 / 3840×2160 |
|---|---|---|---|
| Theme title / Header | 22–26 px |
28–36 px |
40–56 px |
boot_menu items |
16–18 px |
18–22 px |
28–36 px |
Hints / Countdown label |
13–14 px |
14–16 px |
20–26 px |
terminal-font (gfxterm) |
14 px |
16–18 px |
24–30 px |
Contrast and readability tips
- Aim for at least 4.5:1 contrast between
item_color/selected_item_colorand the surface behind the text. - If your wallpaper has bright and dark regions, place a semi-transparent dark or light 9-Slice Box behind the
boot_menuand labels instead of relying on raw text over photography. - Give the selected item both a brighter text color and a clear highlight surface so keyboard focus is unmistakable from across the room.
Creating .pf2 fonts
Option 1: Built-in converter in Grub Designer (Linux, Windows, macOS)
Grub Designer ships with a cross-platform .pf2 converter built directly into the studio — pick any .ttf or .otf, choose the pixel size and character ranges, and generate the .pf2 file instantly without needing Linux CLI tools.
Option 2: grub-mkfont on Linux
# Standard menu font at 20px
grub-mkfont -s 20 -n "Inter Regular 20" -o inter_regular_20.pf2 Inter-Regular.ttf
# Bold title font at 32px
grub-mkfont -s 32 -b -n "Inter Bold 32" -o inter_bold_32.pf2 Inter-Bold.ttf
# Monospace terminal font at 16px
grub-mkfont -s 16 -n "JetBrains Mono 16" -o jbmono_16.pf2 JetBrainsMono-Regular.ttf