.\" -*- nroff -*- .\" .\" txt2vfont.1: txt2vfont man page .\" Copyright (c) 2005, 2007, 2021 John Elliott .\" .\" .\" .\" psftools: Manipulate console fonts in the .PSF format .\" Copyright (C) 2005, 2007, 2021 John Elliott .\" .\" This program is free software; you can redistribute it and/or modify .\" it under the terms of the GNU General Public License as published by .\" the Free Software Foundation; either version 2 of the License, or .\" (at your option) any later version. .\" .\" This program is distributed in the hope that it will be useful, .\" but WITHOUT ANY WARRANTY; without even the implied warranty of .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the .\" GNU General Public License for more details. .\" .\" You should have received a copy of the GNU General Public License .\" along with this program; if not, write to the Free Software .\" Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. .\" .TH txt2vfont 1 "22 January, 2020" "Version 1.1.1" "PSF Tools" .\" .\"------------------------------------------------------------------ .\" .SH NAME txt2vfont - compile a Berkeley vfont file from a textual description .\" .\"------------------------------------------------------------------ .\" .SH SYNOPSIS .PD 0 .B txt2vfont .RI [ --v1 ] .RI [ --v2 ] .RI [ --big-endian ] .RI [ INPUTFILE .RI [ OUTPUTFILE ]] .P .PD 1 .\" .\"------------------------------------------------------------------ .\" .SH DESCRIPTION .LP txt2vfont converts an ASCII source file to a font in the Berkeley vfont format. .\" .\"------------------------------------------------------------------ .\" .SH INPUT FILE FORMAT .LP The source file is composed of a header, followed by a series of character definitions. The first line of the header must be "%VFONT2"; it is followed by these fields, each on a separate line, in any order: .TP .B "Version: nnn" File format version; currently this must be 0. .TP .B "Flags: nnn" This is 1 if the font should include a Unicode table, else 0. .TP .B "Length: nnn" The number of characters in this font. If it is too low, the extra characters will be ignored. Too high, and the extras will be left blank. .LP Files generated by vfont2txt(1) will have three additional header fields: .I BitmapLength , .I MaxWidth and .I MaxHeight \. These are purely notational and (if present) will be ignored by txt2vfont. .LP After the header, character definitions follow. Each character definition starts as a "%" on a line by itself. It is then followed by four or five fields, giving the character dimensions, then the character's bitmap and Unicode mapping. .TP .B "Up: nnn" This is the number of pixel rows above the baseline point. .TP .B "Down: nnn" This is the number of pixel rows below the baseline point. .TP .B "Left: nnn" This is the number of columns to the left of the baseline point. .TP .B "Right: nnn" This is the number of columns to the right of the baseline point. .TP .B "Width: nnn" This is the logical width of the character: the distance between its baseline point and that of the next character to the right. If it is not supplied, .I left + .I right will be used. .TP .B "Bitmap: bitmapdata" The bitmap is composed of width*height cells, each of which can is either '-', '=', '|', 'O' (white) or '#', '@' (black). Whitespace is ignored. The bitmap can be spread over several lines; the bitmaps created by vfont2txt(1) are, for example. .PP There should be at most one cell marked 'O' or '@' -- the top left-hand corner of this cell is the baseline point. If such a cell is present, txt2vfont will check its location against the location calculated from the .I left and .I up figures to check that they match. If they do not a warning is displayed, and the figure calculated from .I left and .I up will be used. .TP .B "Unicode: unicodestring" This describes the Unicode characters this bitmap represents. It is formed "[single];[sing]e];...[sequence];[sequence];..." where .I single is a single hexadecimal number, and .I 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. .\" .\"------------------------------------------------------------------ .\" .SH OPTIONS .TP .B --v1 Output in the original vfont(5) format. This is subject to the limitations of the format: At most 256 characters, at most 127x127 pixels per character, and no Unicode directory. .TP .B --v2 Output in vfont2(5) format. This allows more characters, larger bitmaps, and Unicode, but is currently supported by psftools utilities. .TP .B --big-endian When writing in the original vfont format, create a big-endian file (suitable for platforms such as SunOS). .\" .\"------------------------------------------------------------------ .\" .SH BUGS .LP The file format is too rigid, and the parser (such as it is) a quick hack. .\" .\"------------------------------------------------------------------ .\" .SH SEE ALSO vfont2txt(1), psf2txt(1), txt2psf(1) .\" .\"------------------------------------------------------------------ .\" .SH AUTHOR John Elliott . .PP