chkfont
Check font file properties
TLDR
Check a font file for formatting errors
Check all .flf font files in a directory
SYNOPSIS
chkfont [ options ] fontfile ...
PARAMETERS
-v
Enable verbose output, showing details about checks being performed.
-q
Enable quiet output, suppressing all output except error messages.
-d
Process all files in the specified directory as font files.
-f
When used with -d, check all files in the directory, not just those that appear to be font files.
-e
Specify the encoding assumed for the font file if not explicitly defined within it.
-u
Suppress checks related to unicoding properties.
-C
Specify the character set assumed for the font file if not explicitly defined.
fontfile ...
One or more font files to check.
DESCRIPTION
chkfont is a utility used to examine font files for various consistency and correctness issues.
It helps identify problems like invalid headers, incorrect metrics, or other structural errors that might prevent a font from being used properly.
Historically, it was an important tool in maintaining font directories for the X Window System.
It reads the font file format (like BDF or PCF) and performs checks against the expected structure and data.
While modern font systems like Fontconfig handle many aspects of font validation automatically, chkfont can still be useful for debugging specific font file problems or working with older font formats and systems.
CAVEATS
Primarily designed for older X font formats like BDF and PCF.
May not fully support modern font formats (TrueType, OpenType) or require specific font libraries.
Less critical in modern Linux distributions using Fontconfig, which performs different validation.
EXIT STATUS
Returns 0 if all files are consistent and correct.
Returns non-zero if any inconsistencies or errors are found in any file.
HISTORY
Developed as part of the X Window System distribution.
Integral to managing the X font server and client-side font rendering by verifying files in the X font path directories.
Its role has decreased with the adoption of the Fontconfig library as the primary font management system on many Linux desktops.