txt2vfont(1)
β¨ NAME β¨
txt2vfont β the bestie that compiles a Berkeley vfont file out of a plain textual description π (yes, this is txt2vfont(1), section 1, we're in the big leagues now)
π SYNOPSIS π
txt2vfont [--v1] [--v2] [--big-endian] [INPUTFILE [OUPTUTFILE]]
πΈ DESCRIPTION πΈ
okay so basically? txt2vfont takes an ASCII source file and converts it into a font in the Berkeley vfont format. that's the whole vibe. text goes in, font comes out, slay. β¨
π¦ INPUT FILE FORMAT π¦
the source file is giving two acts, bestie: a header, and then a whole series of character definitions. no cap.
the header
the very first line has to be %VFONT2 β non-negotiable, it's the vibe check. after that come these fields, each one on its own separate line, and they can show up in any order:
Version: nnnβ the file format version. right now this has to be0. like, literally. don't try anything else.Flags: nnnβ this is1if the font should include a Unicode table, otherwise0.Length: nnnβ how many characters are in this font. if it's too low, the extra characters just get ignored π. too high, and the extras get left blank.
and lowkey an important lore drop: files generated by vfont2txt(1) will have three additional header fields: BitmapLength, MaxWidth and MaxHeight txt2vfont.
the character definitions
after the header, the character definitions follow. each one kicks off with a % sitting on a line all by itself (main character energy π
). after that come four or five fields: the character dimensions, then the character's bitmap and Unicode mapping.
Up: nnnβ the number of pixel rows above the baseline point.Down: nnnβ the number of pixel rows below the baseline point.Left: nnnβ the number of columns to the left of the baseline point.Right: nnnβ the number of columns to the right of the baseline point.Width: nnnβ the logical width of the character: the distance between its baseline point and that of the next character to the right. if you don't supply it,left + rightgets used instead. periodt.Bitmap: bitmapdataβ the bitmap is composed ofwidth*heightcells, each of which can is either bitmap can be spread over several lines; the bitmaps created byvfont2txt(1)are, for example. (ngl the original sentence here is scrambled, so I'm handing it to you exactly as it was written, no edits, no lies π«Ά)
there should be at most one cell marked'O'or'@'β the top left-hand corner of that cell is the baseline point. if such a cell is present,txt2vfontwill check its location against the location calculated from theleftandupfigures, to check that they match. if they don't match, a warning is displayed, and the figure calculated fromleftandupwill be used. (so the numbers win, sorry to theO.)
Unicode: unicodestringβ this describes the Unicode characters this bitmap represents. it's formed like"[single];[sing]e];...[sequence];[sequence];..."where single is a single hexadecimal number, and sequence is two or more hexadecimal numbers separated by+signs. so"[41];"is an example of a single character, and"[00B4+0065];"is an example of a sequence. if the bitmap doesn't represent any Unicode characters, this field may be blank or simply missing. no pressure π
π OPTIONS π
--v1β output in the originalvfont(5)format. this one is subject to the limitations of the format, and bestie, those limits are real: at most 256 characters, at most 127x127 pixels per character, and no Unicode directory π--v2β output invfont2(5)format. this allows more characters, larger bitmaps, and Unicode, but is currently supported by psftools utilities.--big-endianβ when writing in the original vfont format, create a big-endian file (suitable for platforms such as SunOS). for the vintage-tech girlies π₯
π BUGS π
the file format is too rigid, and the parser (such as it is) a quick hack. iconic of it honestly.
π SEE ALSO π
vfont2txt(1), psf2txt(1), txt2psf(1)
π AUTHOR π
John Elliott <seasip.webmaster@gmail.com>.
okay that's the whole page, bestie, you're literally a vfont compiler now π§ and for the sign-off: this was Version 1.1.3 from 28 April, 2026, brought to you by PSF Tools. go forth and make fonts πβ¨πΈπ¦
π¦ where this page comes from
- nixpkgs unstable: psftools 1.1.3
- ubuntu stonking: psftools 1.1.3-1
- Copyright (c) 2005, 2007, 2021 John Elliott
- Copyright (C) 2005, 2007, 2021 John Elliott <seasip.webmaster@gmail.com>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms