txt2psf(1)
β¨ txt2psf(1) β¨
okay so bestie, welcome to txt2psf, a lil tool from PSF Tools that's about to turn your cute lil text file into an actual font. no cap π
πΈ NAME πΈ
txt2psf β compile a PC Screen Font file from a textual description
like, you write the font as text, and it compiles it into a real, actual .PSF font file. iconic behavior honestly π
π SYNOPSIS π
txt2psf [--psf1] [--psf2] [INPUTFILE [OUTPUTFILE]]
so you can pass an input file, an output file, both, or neither, and you can force a format if you're feeling opinionated π
π¦ DESCRIPTION π¦
txt2psf converts an ASCII source file to a font in the .PSF format. that's the whole vibe. text goes in, font comes out, slay β¨
π INPUT FILE FORMAT π
okay so the source file is composed of a header, followed by a series of character definitions. the first line of the header must be "%PSF2" β like, mandatory, non-negotiable, periodt. then it's followed by these fields, each on a separate line, in any order you want, no rules bestie:
Version: nnnβ file format version. currently this must be0. no exceptions, she's strict π€Flags: nnnβ this is1if the font should include a Unicode table, else0. so basically yes/no but make it a number πLength: nnnβ the number of characters in this font. if it's too low, the extra characters will be ignored π too high, and the extras will be left blank. so, get it right pls πWidth: nnnβ the width of a character cell πHeight: nnnβ the height of a character cell π
after the header, the character definitions follow. each character definition starts as a "%" on a line by itself. it is then followed by two fields, in any order:
Bitmap: bitmapdataβ the bitmap is composed ofwidth*heightcells, each of which is either a'-'(zero) or a'#'(black). whitespace is ignored, so go ahead and format it pretty π¨ the bitmap can be spread over several lines β the bitmaps created bypsf2txt(1)are, for example. so there's precedent, bestie, you're valid π«ΆUnicode: unicodestringβ this describes the Unicode characters this bitmap represents. it's formed"[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 β she's chill like that π
ngl this format is a little picky, so double-check your "%" lines and your hex, bestie
π OPTIONS π
--psf1β force the resulting file to be in PSF1 format. old school, retro, lowkey nostalgic πΈ--psf2β force the resulting file to be in PSF2 format. the modern girlie β¨
π BUGS π
- the file format is too rigid, and the parser (such as it is) is a quick hack. like, she admits it. not me being honest about my own crimes π
- the
"Length:"header should not be necessary;txt2psfshould be able to calculate the file size itself. so yeah, that field is basically doing unpaid labor π
π SEE ALSO π
(the reverse queen. she goes the other way π)
π§ AUTHOR π§
John Elliott <seasip.webmaster@gmail.com>.
and that's the whole page bestie!! this one's from PSF Tools, Version 1.1.3, dated 28 April, 2026. go forth and make fonts, you absolute main character πππ¦
π¦ where this page comes from
- nixpkgs unstable: psftools 1.1.3
- ubuntu stonking: psftools 1.1.3-1
- Copyright (c) 2005, 2007 John Elliott
- Copyright (C) 2005, 2007 John Elliott
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms