coreboot/util/font
Subrata Banik 8790998fa5 util/font: Add bitmapped font generation utility
This adds generate_font.py, a Python utility designed to convert
standard TTF/OTF files into a compact bitmapped format suitable for
firmware framebuffers.

Key features:
- Generates a left-aligned (normalized) bitmapped table to eliminate
  dead space in font glyphs.
- Outputs a character width table to support proportional spacing.
- Exports FONT_HEIGHT and FONT_WIDTH macros for C synchronization.
- Limits output to printable ASCII (32-126) to minimize binary bloat.

The tool uses the Pillow (PIL) library to rasterize glyphs and is
intended to be used during the build process to generate C source
files for splash screen text rendering.

Usage:
  python util/font/generate_font.py <font.ttf> > font_table.c

Change-Id: Iec8907f1a5f24d61822230f6a22295c8382d2229
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/91122
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
2026-02-10 21:14:56 +00:00
..
generate_font.py util/font: Add bitmapped font generation utility 2026-02-10 21:14:56 +00:00