DIR
Generated by scripts/gen-format-pages.py from docs/data/format-metadata/, FILE_FORMATS.csv and docs/formats-master.csv. Do not edit by hand: change the source, then run the script.
X11 Font Directory Index.
At a glance
| Purpose | An X11 font directory index (fonts.dir): a count line and one line per font naming its file and its X Logical Font Description. |
| Extensions | .dir |
| Poka parser | poka-dir |
| Viewer | poka-table-viewer |
| Depth tier | Parser with a shared viewer (see Depth tiers) |
| Breadth tier | B1 Complete (see Breadth tiers) |
How much Poka reads
B1 Complete. Everything the format defines that a reader would see is decoded, in every version Poka claims. Anything not decoded is immaterial and listed.
Confidence: high (the reviewer read the code and a test that proves the claim). Basis: Reviewed 2026-10-26: read parsers/poka-dir/src/lib.rs, parsers/poka-dir/src/main.rs (1114 lines) and plugin.json. 31 unit tests and tests/samples.rs, which runs every corpus fonts.dir, checks the declared count against the entries, compares the rows with an independent reader and checks the OpenOffice fonts.dir by hand. Covers .dir. Every entry is read the way libXfont reads it (names with spaces, a name on the next line, CRLF, ISO 8859-1 lines labelled as assumed), and each row shows the file, the whole name, whether it is XLFD and the fourteen XLFD fields; a count that disagrees with the entries is an integrity finding. Macromedia Director .dir files are refused with a message. Judgement: B1: everything the format holds is shown; what is left is outside the file or immaterial.
What Poka does not read
- The font files, fonts.scale and fonts.alias are not read (other files)
- XLFD field values are split but not interpreted (slant and spacing codes shown as written)
- Only the first 10,000 entries are listed (flagged as truncated)
Libraries
Libraries Poka uses or has assessed for this format, with the status, licence and language the registry records.
- libXfont (reference; licence unconfirmed; C; https://gitlab.freedesktop.org/xorg/lib/libxfont) — the X server's own reader, FontFileReadDirectory in src/fontfile/dirfile.c (read from the qtmlabs/libXfont GitHub mirror); its COPYING holds several MIT/X11-style permissive notices and no single SPDX id was confirmed. Not linked: poka-dir follows its rules in Rust. No Rust crate for fonts.dir or XLFD names was found on crates.io (searched 2026-10-21).
Sources
- parsers/poka-dir/src/lib.rs
- parsers/poka-dir/src/main.rs
- parsers/poka-dir/plugin.json