Outline Font Processing Tools For The IRIS
![](/toolbox/www/images/sgilogosm.gif)
Paul Haeberli - 1995
The sequence to make a font using paintfont, charfill, adjustfont, and totype1,
goes like this:
- paintfont new.of
- charfill new.of
- adjustfont new.of adj.of
- totype1 adj.of FONTNAME 1.0
- cp FONTNAME /usr/lib/DPS/outline/base
- modify showcase fontmap in /usr/lib/showcase/font.map
New programs since v4.2 DT CD;
Significantly updated since then, and;
the program has not changed.
fonttools contains various programs combining operations
with/on font files and IRIS GL graphics. One can:
adjust the character
spacing and position of characters in a
font (adjustfont);
convert Adobe font metric
files into TEX font metrix files (afm2tfm);
make an .sgo object or some
extruded text (bevelstring);
make a font bold by
convolving with a line (boldfont);
draw antialiased text using
a polygonal outline font (charfill);
check a font for self
intersections (checkfont);
use widths from one typeface
in another font (clonewid);
draw an object
font (drawfont);
create a set of screen
slides of filled polygonal fonts (fntslide);
make an image of a string
of text (fontimg);
test object
fonts (fonttest);
convert a .pfa font into
the Hex format (frompfa);
convert a .psf font into
the Hex format (frompsf);
convert an Adobe type 1
font into .of or .sf format (fromtype1);
turn an outline font into
a triangle mesh (meshfont);
convert Type1 font from
resource part of mac file into an ascii Type1
font (mfrc);
run an interactive font
creator paint program to create your own
fonts (paintfont);
print out a text description
of a font (printfont);
decode an encrypted type1
font (rawtohex);
read font data out of the
resource fork of a macintosh file (restoraw);
simplify a font by removing
similar verticies (simpfont);
make lower case chars print
as small caps (smallcaps);
turn an outline font into a
texture map (texfont);
use texture mapping to draw
text made by texfont (textmap).
convert an outline font into
a PostScript font (totype1);
eliminate duplicate points
on a .of file (undup);
and/or warp outline font
geometry (warpfont);
____________________________________
NOTES ON PROGRAMS IN fonttools
____________________________________
______________________________________________________________
adjustfont.c usage: adjustfont file.of out.of
______________________________________________________________
afm2tfm.c usage: afm2tfm
Convert Adobe font metric files into TEX font metrix files.
This program converts AFM files to TeX TFM files, and optionally to
TeX VPL files that retain all kerning and ligature information.
Both files make the characters not normally encoded by TeX available
by character codes greater than 127.
The afm2tfm.1 raw man page is included in this directory as well as
a "baked" version stored in afm2tfm.txt.
______________________________________________________________
bevelstring.c usage: bevelstring font.{of,sf,type1} out.sgo string
______________________________________________________________
boldfont.c usage: boldfont file.of out.of dx dy
Make a font bold by convolving with a line.
______________________________________________________________
charfill.c usage: charfill font.{of,type1}
______________________________________________________________
checkfont.c usage: checkfont file.of
Check a font for self intersections!!
______________________________________________________________
clonewid.c usage: clonewid orig.of width.of out.of
Use widths from another font.
this copies widths from one typeface to another.
______________________________________________________________
drawfont.c usage: drawfont file.of
Draw an object font.
this displays a typeface in a window.
Try:
Use LEFTMOUSE and slide left to right to see a character big;
press MIDDLEMOUSE and drag around to see a maginified verison of character.
______________________________________________________________
fntslide.c usage: fntslide
Make text slides.
this is an example application that fills polygonal fonts
and is VERY USEFUL for whipping up slides to fill the entire
graphics console.
Try:
PAGEDOWN advance to slide n+1
PAGEUP go back to slide n-1
LEFTMOUSE move through the entire set of slides
ESCKEY exit
You need be sure the "slide.mf" file is in the same
directory with fntslide when you
invoke fntslide.
______________________________________________________________
fontimg.c usage: fontimg font.{of, type1} pixhigh out.bw xsize ysize
string xoffset linewidth
Make an image of a string of text.
______________________________________________________________
fonttest.c usage: Font-Name
Test object fonts.
this demonstrates drawing filled and outlined text.
______________________________________________________________
frompfa.c usage: frompfa in.pfa out.hex
Convert a .pfa font into the Hex format.
______________________________________________________________
frompsf.c usage: frompsf in.psf out.hex
Convert a .psf font into the Hex format.
this program converts a .psf font into the hex format.
______________________________________________________________
fromtype1.c usage: fromtype1 type1font font.of flatness [fullset]
______________________________________________________________
meshfont.c usage: meshfont font.of font.mf
Turn an outline font into a triangle mesh.
this converts a polygonal outline font into a triangle mesh font.
When this is drawn, it will be filled in solid.
Try:
Sometimes this process will fail if the input typeface has outlines
that self intersect. Some typefaces from Adobe have this problem.
______________________________________________________________
mfrc.c usage: mfrc font.res
this converts a Type1 font from the resource part of a mac file into
an ascii Type1 font.
______________________________________________________________
paintfont.c usage: paintfont fontname.of
An interactive font creator.
this is a paint program that lets you create you own fonts!!!
To make a new font do:
And follow the instructions that the program prints out to the window
you invoked paintfont in --
right side: left mouse draws; middle mouse clears; right mouse erases
left side: left mouse saves character data
left side: right mouse shows large character
brush diameter : up and down arrow keys
brush delay : left and right arrow keys
brush shape: F1 key cycles round->diag->square
press h to get this message
You can paint using the left mouse button. And then point to the
character you want to define. Do this for the whole font, and then
exit the program. Next run charfill on the font to see what it looks
like, and then also use adjust font to tune the character
spacing. Finally convert the font to Adobe type1 format using totype1.
If you move into the paintfont window, hold the shift key down, and
click down the left mouse on one corner of an area on the screen and
move to the opposite corner and release the mosse button and the
shift key this area will be copied (with a slight scale) into the
painting window.
______________________________________________________________
printfont.c usage: printfont file.of
Print an object font.
this prints a textual description of a font.
______________________________________________________________
rawtohex.c usage: rawtohex in.raw out.hex
Decode an encrypted type1 font.
______________________________________________________________
restoraw.c usage: restoraw %Font Font.raw
read font data out of the resource fork of a macintosh file.
______________________________________________________________
simpfont.c usage: simpfont file.of out.of mindel
simplify a font by removing similar verticies.
this can be used to eliminate fine detail in an outline font.
______________________________________________________________
smallcaps.c usage: smallcaps in.of out.of capscale
Make lower case chars print as small caps.
______________________________________________________________
texfont.c usage: texfont font.{of,type1} out.bw
______________________________________________________________
textmap.c usage: textmap font.bw
Use texture mapping to draw text.
demonstrates using a texture-mapped font to draw text.
you must have a machine that supports texture mapping like a
VGX or a REALITY ENGINE and then run,
______________________________________________________________
totype1.c usage: totype1 font.of type1font scale [font.afm]
Convert an outline font into a PostScript font.
______________________________________________________________
undup.c usage: undup file.of out.of
Eliminate duplicate points on a .of file.
this removes duplicate vertexes from a polygonal font.
______________________________________________________________
warpfont.c usage: warpfont in.of out.of slope jitter space scale
Warp outline font geometry.
this program can be used to add slope or jitter to a font.
OR, ...
Copyright © 1995, Silicon
Graphics, Inc.