txt2vfont(1)

NAME
txt2vfont - compile a Berkeley vfont file from a textual description

SYNOPSIS
txt2vfont [--v1] [--v2] [--big-endian] [INPUTFILE [OUTPUTFILE]]

DESCRIPTION

txt2vfont converts an ASCII source file to a font in the Berkeley vfont format.

INPUT FILE FORMAT

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:

Version: nnn
    File format version; currently this must be 0.

Flags: nnn
    This is 1 if the font should include a Unicode table, else 0.

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.

Files generated by vfont2txt(1) will have three additional header fields: BitmapLength , MaxWidth and MaxHeight . These are purely notational and (if present) will be ignored by txt2vfont.

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.

Up: nnn
    This is the number of pixel rows above the baseline point.

Down: nnn
    This is the number of pixel rows below the baseline point.

Left: nnn
    This is the number of columns to the left of the baseline point.

Right: nnn
    This is the number of columns to the right of the baseline point.

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, left + right will be used.

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.

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 left and up figures to check that they match. If they do not a warning is displayed, and the figure calculated from left and up will be used.

Unicode: unicodestring
    This describes the Unicode characters this bitmap represents. It is 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.

OPTIONS

--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.

--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).

BUGS

The file format is too rigid, and the parser (such as it is) a quick hack.

SEE ALSO
vfont2txt(1), psf2txt(1), txt2psf(1)

AUTHOR
John Elliott <seasip.webmaster@gmail.com>.