Font utilities

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

14.1.3 Editing BPL files

To edit a BPL file in bpl-mode, the usual Emacs editing commands work: cursor motion, deletion, and insertion all work just as with normal text files.

Here is an example of a piece of a BPL file. See section 12.1 BPL files, for a full description of BPL files.

 
(char 0 (comment hex 0x0)
  (width "6.263")
  (bb "0.241" "5.782"  "-0.241" "6.745")
  (outline "0.482" "6.745"
    (line "1.445" "6.504")
    (line "1.445" "0.241")
    (line "0.482" "0.241")
    (line "3.613" "0.000")
    (spline "1.682" "1.264"  "2.409" "4.436"  "2.409" "6.504")
    ...
  )
)

The most usual editing session is changing the numbers in the line and spline commands, which are the coordinates that determine the character outline. But you can do anything you want: change a line to spline (and add the requisite other coordinates) or vice versa, change the set width, etc.

You must retain the quotation marks around the floating-point numbers, however. (They are necessary because Emacs 18 does not recognize floating-point constants.) If you inadvertently delete one, then when you go to display the edited character (see below), you will get an error from Emacs.

When bpl-mode is first invoked, it starts up Ghostscript in a subprocess. The section below describes the details of this. It is Ghostscript which does the actual displaying.

bpl-mode provides three additional commands (we show the default bindings in parentheses):

  1. bpl-quit (C-c q and C-c C-q), which kills the Ghostscript subprocess and then removes the BPL buffer from the screen. bpl-quit does not convert the BPL file (back) to BZR form; that's left for you to do by hand.

  2. bpl-erasepage (C-c e and C-c C-e), which sends an erasepage command to Ghostscript, thus erasing whatever is currently displayed.

  3. bpl-show-char (C-c c and C-c C-c), which sends to Ghostscript a PostScript translation of the character that point is in.

bpl-mode calls bpl-mode-hook as its last action. You can define this to take additional actions if you like.

14.1.3.1 BZRedit and Ghostscript  Customizing the use of Ghostscript.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]