FONTDATABASE(5)
π FONTDATABASE π
okay bestie, gather round, we're reading the FONTDATABASE(5) page β yeah it's a File Formats Manual situation, section 5 energy, and it's literally the whole lore of how t1lib finds its fonts. no cap.
β¨ NAME β¨
FontDataBase β the database of fonts that t1lib can actually see π
πΈ DESCRIPTION πΈ
okay so first thing, real talk: this manual page was written for the Debian GNU/Linux distribution, and it got adapted from the docs that ship with the upstream t1lib distribution. so like, credit where credit is due π
/etc/t1lib/FontDataBase is a text file that contains β minimally β the basenames of Type 1 font files that should be made accessible to the t1lib font rasterizer library. and the format? intentionally similar to the fonts.dir and fonts.scale files that X11 uses. iykyk π¦
Line 1 of this file is a positive integer that says how many fonts are declared in that file. same vibe as the fonts.dir files in the X11 system, fr fr.
All the remaining lines each declare one font. and here's the tea: the only thing anybody takes from such a line is the last string in it β the one delimited by white space. that string is assumed to be a filename shaped like basename.someextension.
The basename part is assumed to be the basename(1) of a fontfile. once that string has been parsed, the extension gets cut off and replaced, in turn, with .pfa and .pfb. then the initialization routine tries to open a font file in its search path using one of those resulting filenames. slay π
And the rest of the line β like, everything from the beginning of the line up to where the filename string starts β is completely ignored, so it can totally hold info for other programs. main character line? no. supporting cast? yes. π«Ά
π EXAMPLES π
okay here's a minimal font database file for 4 fonts, cute and tiny:
4
isvl.afm
isvli.afm
isvd.afm
isvdi.afm
this file is minimal because it contains just the info that's needed and literally nothing the library doesn't need. no clutter, we love a clean girl aesthetic β¨
and here's a more realistic example π β this one lets an application match a fully qualified X11 fontname to a FontID in t1lib. and yes, it's also a valid font database file:
4
Souvenir Souvenir-Light --- -itc-souvenir-light-r-normal--#-0-0-0-p-0-iso8859-1 isvl.afm
Souvenir Souvenir-LightItalic -*- -itc-souvenir-light-i-normal--#-0-0-0-p-0-iso8859-1 isvli.afm
Souvenir-Demi *-- -itc-souvenir-demi-r-normal--#-0-0-0-p-0-iso8859-1 isvd.afm
Souvenir-DemiItalic **- -itc-souvenir-demi-i-normal--#-0-0-0-p-0-iso8859-1 isvdi.afm
look at all that ignored-by-t1lib info just sitting there being useful for other programs. iconic behavior honestly π
π FILES π
/etc/t1lib/FontDataBase
π¦ SEE ALSO π¦
mkfontdir(1x)
and that's the whole page bestie, FONTDATABASE(5), straight out of the t1lib File Formats Manual π go forth and declare your fonts, periodt. πΈπ«Άπ
π¦ where this page comes from
- epel 10: t1lib 5.1.2-43.el10_3 Β· LicenseRef-Callaway-LGPLv2+
- epel 9: t1lib 5.1.2-31.el9 Β· LGPLv2+
- fedora 43: t1lib 5.1.2-42.fc43 Β· LicenseRef-Callaway-LGPLv2+
- fedora 43: t1lib 5.1.2-42.fc43 Β· LicenseRef-Callaway-LGPLv2+
- fedora 44: t1lib 5.1.2-43.fc44 Β· LicenseRef-Callaway-LGPLv2+
- fedora 44: t1lib 5.1.2-43.fc44 Β· LicenseRef-Callaway-LGPLv2+
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms