LinuxCommandLibrary

bdfconv

Convert BDF fonts to various bitmap formats

SYNOPSIS

bdfconv [options...] input.bdf[:face-id] output.ext

PARAMETERS

-v
    Enable verbose output.


-f <name>
    Filter font faces by name pattern.


-n <name>
    Set the output font name.


-m <mapfile>
    Use custom Unicode mapping file.


-1
    Force PSF1 format (legacy).


-2
    Force PSF2 format (default for .psf).


-2n4, -2n8, etc.
    PSF2 variants: n=sequencing, 4/8=bytes per glyph.


-A
    Anti-aliased output (grayscale).


-a
    Input assumes anti-aliased glyphs.


-8
    Force 8x16 glyph size.


DESCRIPTION

bdfconv is a versatile command-line utility for converting BDF (Bitmap Distribution Format) fonts, commonly used in X11 and fontconfig, into various bitmap font formats suitable for Linux consoles, X servers, and embedded systems. It supports extracting specific font faces from multi-face BDF files using face-id (e.g., font.bdf:0 for the first face), applying Unicode character mappings, and customizing output properties like glyph width and sequencing.

Primarily used in the Linux kbd package for generating console fonts (.psf), it also produces PCF fonts for X11, FNT for DOS/embedded, and even filtered BDF outputs. Users specify the output format via the filename extension (e.g., output.psf2). It handles fixed-width fonts efficiently, supports anti-aliasing modes, and includes options for verbose logging and name filtering.

Ideal for system administrators customizing console fonts or developers porting bitmap fonts, bdfconv ensures compatibility with tools like setfont and showfont. It requires input BDF files often sourced from font packages or generated by tools like bdftopcf.

CAVEATS

Requires Unicode mapping files (e.g., unimap.8x16); may fail on variable-width or complex BDF inputs. Output format inferred from extension; specify explicitly with PSF flags.

SUPPORTED OUTPUT FORMATS

.psf (Linux console), .pcf (X11), .fnt (DOS/FreeDOS), .bdf (filtered), .psfu (Unicode seq.).

MAPPING FILES

Uses default unimap.* from kbd package; custom maps define glyph-to-Unicode assignments.

HISTORY

Developed by Andrey V. Panin around 2001 as part of the Linux kbd package (console tools). Evolved to support PSF2 Unicode fonts in kernel 2.6+, remains actively maintained for modern distributions like Debian and Fedora.

SEE ALSO

Copied to clipboard