Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

10.0;edfont (edit_font), revision 1.0, 88/06/02
edfont (edit_font) - Edit a character font.
usage: edfont [pathname | -v]



DESCRIPTION
     edfont is an interactive program with both menu-driven and command-line
     interfaces. It allows you to create, edit, and view character font files.
     You can  specify the font file with the file parameter, or use the "Open
     Font" entry in the "File" menu. If the -v option is used, edfont will
     print its version number and exit.

     Generally, you must press the left mouse button <M1> to activate commands
     in the menu-driven interface. When you must enter a string (for example,
     when you designate which font you want to open) and there is a "Done"
     field on the menu, enter the string, point to "Done" and press <M1> to
     activate.  If "Done" does not appear when you must enter a string, simply
     type the string and press <RETURN> to activate the command.

     When using the menu-driven interface, you may notice that you cannot
     always select every menu choice. For example, you can't select "Open
     Font" if you already have one open, and likewise it's invalid to try to
     close a font when no font is open. When commands are invalid, as in these
     cases, their places on the menus are grayed out so that they can't be
     selected.

     edfont lets you select a character (glyph) in a variety of ways. The
     utility interprets input this way:

     ⊕  Any three-character string whose first character is a lowercase c has
        its final two characters interpreted as a compose sequence (e.g., ca^
        for lowercase a with a circumflex accent)

     ⊕  Any string that begins with 0x is interpreted as a hexadecimal code
        (e.g., 0x41 for uppercase A)

     ⊕  Any string that begins with 0 (zero) is interpreted as octal (e.g.,
        0101 for A)

     ⊕  Any string that begins with a digit other than zero is considered to
        be decimal (e.g., 65 for A)

     ⊕  Any other string is considered to be an ASCII character (e.g., A for
        A)

     For more information on compose sequences, see your system's User's
     Guide.  For a list of decimal, octal, and hexadecimal values for the
     characters in Apollo's default character set, as well as a list of the
     compose sequences, see the files in the /usr/pub directory.

     When you invoke edfont, it sets default values for several variables.
     You can change those defaults using either the appropriate command in the
     menu-driven interface or set in the command-driven interface. For more
     information on these interfaces see the section on command interfaces,
     below.  The following table lists variables, their types, default values
     (if any), and purpose.

     Variable/Type        Default                  Description

     fontpath/string      :/sys/dm/fonts           List of directories,
                                                   separated by colons, in
                                                   which edfont should search
                                                   for fonts
     fontservers/string   /usr/apollo/lib/edfont   The search path for the
                                                   font servers directory
     fill/string          outline                  The name of the current
                                                   fill pattern
     fontorigin/coord     none                     The coordinate value that
                                                   tells the number of pixels
                                                   below and to the left of
                                                   the font origin
     fontsize/coord       none                     The width and height of the
                                                   font bounding box
     fontspacing/coord    none                     The horizontal and vertical
                                                   font spacing (leading)
     glyphoffset/coord    none                     The offset of the current
                                                   glyph from the font origin
     glyphsize/coord      none                     The width and height of the
                                                   bitmap for the current
                                                   glyph
     glyphwidth/coord     none                     The number of pixels from
                                                   the right edge of the
                                                   current glyph to the left
                                                   edge of the next glyph
     mask/string          src ^ dst                The current mask
                                                   (raster operation)


     edfont handles fonts created using Apollo's current and pre-SR10 formats,
     as well as Adobe BDF fonts.

Menu Interface
     Note: You can get additional information about any item on the display by
     pressing  the  HELP  key at the cursor position where you need help. This
     pops a help box. To return to the original display, move the  cursor  out
     of the help box.

     Font      When you position  the  cursor  here  and  press  <M1>,  edfont
               displays a menu with the following choices:

                       Open Font
                       Close Font
                       Select Glyph
                       Font Params
                       Glyph Params
                       Quit

     Use these choices to open and close the font you want to edit, select  an
     individual  glyph  (character)  to edit, and examine or change the font's
     parameters or a single glyph's parameters.


     Tools If you press <M1>, you will see the following choices:

                  Grid
                  Metrics


     By default, both are turned on.  If you turn off Grid, you no longer will
     see  the  pixel-by-pixel bitmap grid in the edit window.  If you turn off
     Metrics, the glyph fills the edit window.

     Metrics shows these three attributes of your glyph and font:

     ⊕  Origin and baseline (fine dotted line)

     ⊕  Glyph-bounding box (long dashed line)

     ⊕  Font-bounding box (short dashed line)


     Commands If you press <M1>, you will see the following choices:

     Undo           Undo remembers your last 10 changes to the current  glyph.
                    Undo does not work on parameter changes, however.

     Run Commands   You can set up a file of commands  and  direct  edfont  to
                    execute  that  file.  For more information on the commands
                    you can use, see the description of the command interface,
                    below.

     Copy Glyph     Copies a glyph from elsewhere in your font or from another
                    font.

     Delete Glyph   This deletes a glyph.

     Rotate Glyph   This rotates a glyph by the number of degrees you specify.

     Draw      When you position the cursor here and press <M1>, you will  see
               the following choices:

               Pixel       Manipulate individual pixels

               Freehand    Draw freehand

               Line        Draw lines

               Box         Draw boxes

               Circle      Draw circles

               Cut         Select and delete a pixel or range of pixels

               Copy        Select and copy a pixel or range of pixels

               Paste       Paste in a pixel or range of pixels that  you  have
                           previously cut or copied

               Zoom        Zoom in on a selected portion of the glyph

               Note that after you Cut or Copy, edfont  automatically  changes
               the Draw mode to Paste. You can manually change it to something
               else if you prefer.

     Fill      When you position the cursor here and press <M1>, you will  see
               the following choices:

               Outline    this is the default
               25% gray
               50% gray
               75% gray
               black
               bricks
               chex
               /stripes    right-leaning stripes
               \stripes    left-leaning stripes
               |stripes    vertical stripes
               -stripes    horizontal stripes
               tri
               waves

               The way edfont fills an entity such as a circle or box  depends
               on  which fill you choose. If you choose 50% gray, for example,
               and then create a box, edfont  turns  on  half  of  the  pixels
               inside  the  box to create a 50% gray effect. If you choose 75%
               or 25% gray, edfont  turns  on  proportionally  more  or  fewer
               pixels to get the desired effect.

     Mask      When you position the cursor here and press <M1>, you will  see
               the  following  choices  (where "src" means source, "dst" means
               destination, and the other characters are logical operators):

     Menu Choices   Logical Operation

     clear          Assign zero to all new destination values

     src & dst      Assign source AND destination to new destination

     src & ~dst     Assign  source  AND  complement  of  destination  to   new
                    destination

     src            Assign source values to new destination

     ~src & dst     Assign  complement  of  source  AND  destination  to   new
                    destination

     dst            Assign all destination values to new destination

     src ^ dst      Assign source EXCLUSIVE OR destination to new  destination
                    (default)

     src | dst      Assign source OR destination to new destination

     ~(src | dst)   Assign complement of source AND complement of  destination
                    to new destination

     src == dst     Assign source EQUIVALENCE destination to new destination

     ~dst           Assign complement of destination to new destination

     src | ~dst     Assign  source  OR  complement  of  destination   to   new
                    destination

     ~src           Assign complement of source to new destination

     ~src | dst     Assign  complement  of  source  OR  destination   to   new
                    destination

     ~(src & dst)   Assign complement of source OR complement  of  destination
                    to new destination

     set            Assign 1 to all new destination values

     Setting the mask value turns pixels on. That is, if you select a pixel or
     range  of pixels with this mask, all the pixels turn black, regardless of
     whether they already were black. The mask clear turns a pixel or range of
     pixels off (white), regardless of the pixel's initial value.

     The default mask src ^ dst toggles pixels. That is, if they already  were
     black,  they become white, and vice versa. However, if you are drawing in
     Freehand mode, this mask toggles the first pixel you cross and then  sets
     the rest of the pixels you cross to that first pixel's value.

     When you have a font open, the menu-driven interface  also  includes  two
     boxes  on  the right side of the display labeled "<<<" and ">>>". The two
     are for displaying the previous and  next  glyph,  respectively,  in  the
     current  font.   Move  the  cursor  over  either  box  and  press <M1> to
     activate.

Command Interface
     In addition to edfont's menu-driven interface, you can use the  following
     commands  in  the  input pad at the bottom of the edfont window, or embed
     them in edfont scripts.

     Commands (Arguments)          Description

     !shell-command                Run a shell command in the edfont window.

     box x1 y1 x2 y2               Draw a box that is bounded by  (x1,y1)  and
                                   (x2,y2).

     circle x y r                  Draw a circle which has its center at (x,y)
                                   and a radius of r.

     close [-save|-nosave]         Close  the  font.  If  you  specify  -save,
                                   edfont  saves  your  changes,  while if you
                                   specify -nosave, edfont ignores them.

     copy glyphcode [fontfile]     Copy the specified  glyph  to  the  current
                                   glyph.  If  you  specify a fontfile, edfont
                                   copies the glyph from that font; otherwise,
                                   it copies the glyph from the current font.

     delete                        Delete the current glyph.

     grid on | off                 Turn the bitmap grid on or off.

     help [command]                Get a list of available  commands,  or  get
                                   help on the specified command.

     line x1 y1 x2 y2              Draw a line that begins at (x1,y1) and ends
                                   at (x2,y2).

     metrics on | off              Turn the font metrics display on or off.

     next                          Go to the next glyph in the current font.

     open fontfile                 Open the specified fontfile.

     pixel x y                     Draw a pixel at (x,y).

     previous                      Go to the previous  glyph  in  the  current
                                   font.

     quit [-save|-nosave]          Exit edfont, closing the current  font  (if
                                   one is open).  See close for information on
                                   -save and -nosave.

     Commands (Arguments)          Description

     rotate degrees                Rotate the current glyph by  the  specified
                                   number of degrees.

     select glyphcode              Go to the specified glyph. For  information
                                   on  entering  a  glyph or glyphcode see the
                                   Description section above.

     set var=value                 Set var to the specified value. var can  be
                                   one   of   the   edfont's   parameters,  as
                                   described in the Description section above.

     source filename               Execute the command-script filename.

     undo                          Undo the last bitmap operation.

     unzoom                        Zoom out one level.

     zoom x1 y1 x2 y2              Zoom in so that the view is filled with the
                                   box bounded by (x1, y1) and (x2,y2).


SEE ALSO
     More information is available. Type

     help fl        For information on loading a font

     help fonts     For information  on  fonts  supplied  with  the  Domain/OS
                    system

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026