1txt2psf(1) PSF Tools txt2psf(1)
2
3
4
6 txt2psf - compile a PC Screen Font file from a textual description
7
9 txt2psf [--psf1] [--psf2] [INPUTFILE [OUTPUTFILE]]
11 txt2psf converts an ASCII source file to a font in the .PSF format.
12
14 The source file is composed of a header, followed by a series of char‐
15 acter definitions. The first line of the header must be "%PSF2"; it is
16 followed by these fields, each on a separate line, in any order:
17
18 Version: nnn
19 File format version; currently this must be 0.
20
21 Flags: nnn
22 This is 1 if the font should include a Unicode table, else 0.
23
24 Length: nnn
25 The number of characters in this font. If it is too low, the
26 extra characters will be ignored. Too high, and the extras will
27 be left blank.
28
29 Width: nnn
30 The width of a character cell.
31
32 Height: nnn
33 The height of a character cell.
34
35 After the header, character definitions follow. Each character defini‐
36 tion starts as a "%" on a line by itself. It is then followed by two
37 fields, in any order.
38
39 Bitmap: bitmapdata
40 The bitmap is composed of width*height cells, each of which is
41 either a '-' (zero) or a '#' (black). Whitespace is ignored. The
42 bitmap can be spread over several lines; the bitmaps created by
43 psf2txt(1) are, for example.
44
45 Unicode: unicodestring
46 This describes the Unicode characters this bitmap represents. It
47 is formed "[single];[sing]e];...[sequence];[sequence];..." where
48 single is a single hexadecimal number, and sequence is two or
49 more hexadecimal numbers separated by + signs. So "[41];" is an
50 example of a single character, and "[00B4+0065];" is an example
51 of a sequence. If the bitmap doesn't represent any Unicode char‐
52 acters this field may be blank or simply missing.
53
55 --psf1 Force the resulting file to be in PSF1 format.
56
57 --psf2 Force the resulting file to be in PSF2 format.
58
60 The file format is too rigid, and the parser (such as it is) a quick
61 hack.
62
63 The "Length:" header should not be necessary; txt2psf should be able to
64 calculate the file size itself.
65
67 psf2txt(1)
68
70 John Elliott <jce@seasip.demon.co.uk>.
71
72Version 1.0.8 21 June, 2008 txt2psf(1)