txt2vfont(1)

πŸ“¦ version 1.1.3, in nixpkgs unstable, ubuntu stonking

✨ 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 be 0. like, literally. don't try anything else.
  • Flags: nnn β€” this is 1 if the font should include a Unicode table, otherwise 0.
  • 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 + right gets used instead. periodt.
  • Bitmap: bitmapdata β€” the bitmap is composed of width*height cells, each of which can is either bitmap can be spread over several lines; the bitmaps created by vfont2txt(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, txt2vfont will check its location against the location calculated from the left and up figures, to check that they match. if they don't match, a warning is displayed, and the figure calculated from left and up will be used. (so the numbers win, sorry to the O.)
  • 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 original vfont(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 in vfont2(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