Go to the first, previous, next, last section, table of contents.

BPLtoBZR

BPLtoBZR translates a human-readable (and -editable) text file in BPL format (see below) to the binary BZR (Bezier) font format.

Of the two, only BZR files can be changed into font formats which typesetting programs can use. So after editing a BPL file, you need to run this program. BZRedit likewise invokes it when necessary (see section BZRedit).

BPL files

Bezier property list (BPL) files are free-format text files which describe an outline font. They are a transliteration of the binary BZR font format (see section BZR files).

A BPL file is a sequence of entries of the form

(property-name value1 value2 ...)

The property-name is one of a small set of keywords understood by BPLtoBZR. The values vary depending on the property being defined. BPL files have four types of values: unsigned integers, reals, strings (enclosed in typewriter double-quote `"' marks), and real strings (realstr for short)---a real number in quotes. See section Editing BPL files, for an explanation of why realstrs are necessary.

A property-name of comment introduces a comment, which continues through the next right parenthesis. This implies nested comments are not allowed: `(comment (wrong!))' will get an error at the second `)'.

BPL files have three parts: a preamble, character definitions, and a postamble. They must appear in that order. In many cases, the order in which you give the properties within a part is also significant.

BPL preamble

The preamble of a BPL file consists of the following three properties:

  1. (fontfile string). This merely documents the filename of the BZR font from which BZRto made this BPL file. It is ignored.
  2. (fontcomment string). This is an arbitrary string written as the "comment" in the BZR file. BZR-reading programs ignore this comment. It typically identifies the source and time of creation. If string is longer than 255 characters, it is truncated (due to limitations of the BZR format).
  3. (designsize real). The design size of the font, in printer's points.

BPL characters

A BPL file must have one or more character definitions. These have the following form:

(char unsigned
  width
  bounding-box
  outline1
  outline2
  ...
)

The unsigned number directly after the char command specifies the character code. If it is larger than 255 (the maximum character code in BZR files, and all other font formats the font utilities deal with) then BPLtoBZR issues a warning and uses its value modulo 256.

The other pieces are specified as properties:

Each outline specifies a geometrical outline, i.e., a closed curve. For example, an `o' would have two outlines. If the character is entirely blank, the BPL file has no outlines at all.

The outline property is somewhat more complex than the rest, so we describe it below.

BPL outlines

You specify an outline in a BPL file as a sequence of straight lines and cubic splines, in any order:

(outline start-x start-y
  piece1 piece2 ...
)

start-x and start-y are realstrs which specify the initial position for drawing this outline. Each successive piece of the outline is relative to a current point, and also updates the current point.

At least one piece must be present. Each piece can be one of the following two properties:

  1. line @math{x @math{y}}. Draw a straight line from the current point to @math{(x,y)}. Then set the current point to @math{(x,y)}. @math{x} and @math{y} are realstrs.
  2. spline c1x c1y c2x c2y ex ey. Draw the Bezier cubic using the current point as the starting point, @math{(c1x,c1y)} and @math{(c2x,c2y)} as the control points, and @math{(ex,ey)} as the endpoint. Then set the current point to the endpoint. All coordinates are realstrs.

If the last point the last piece of the outline is not the same as the starting point, the result is undefined.

BPL postamble

The final piece of a BPL file is the postamble. It has two components:

  1. (fontbb llx lly urx ury). Defines the bounding box for the entire font in the same way as the bb property defines the bounding box for a character. See section BPL characters.
  2. (nchars unsigned). The number of characters in the BPL file. This is purely for informational purposes; BPLtoBZR ignores it.

Invoking BPLtoBZR

This section describes the options that BPLtoBZR accepts. See section Command-line options, for general option syntax.

`-help'
Print a usage message. See section Common options.
`-output-file filename'
Output to filename (if it has a suffix) or to `filename.bzr' (if it doesn't).
`-range char1-char2'
Only output characters with codes between char1 and char2, inclusive. (See section Common options, and section Specifying character codes.)
`-verbose'
Output progress reports.
`-version'
Print the version number of this program.

Go to the first, previous, next, last section, table of contents.