This is part of the old website. New website begins at

Are you a web developer? Help us migrate this page on Github

High level description of what each source file contains...
This page is grievously out of date

Header Files

This contains the data structures used by the rasterizer routines (splinefill.c), but it turns out that the same basic mechanism is used for a number of other things, autohint.c, splineoverlap.c, perhaps others.
This is a general header which just includes other headers. Every source file in this directory should include it.
Another general header file which includes others and defines a few global variables. All UI source files should include this.
These data structures are used by parsepfa.c as a temporary resting place for a postscript font before it gets converted into a SplineFont (splinefont.h) by calling SplineFontFromPSFont in splineutil.c
This one contains all the basic data structures of the program.
This contains the basic UI data structures.

Source Files

Contains the routines which guess at postscript hints.
Contains a few basic routines that handle autosaving, but most of the real work is done in sfd.c
Guesses at good widths for characters and good kerning for them. Creates a dialog to get guidance from the user and the goes off and tries to guess reasonable values.
Handles the two dialogs for creating and recreating bitmaps. (The creating one creates an entire new bitmap font, the recreating one modifies an already existing font by regenerating the selected characters).
Does much of the basic work of the bitmap editor. Handles menus, events, etc.
Some extra routines for editing bitmaps (bv => bitmapview). Handles floating selections, paste, translations, etc.
Does the basic work for the spline glyph editor. Handles menus, events, dispatches mouse events to the appropriate tools, etc.
These are the icon resources for the images that appear in the info area of the spline editor above.
Defines the various cursors used.
Handles mouse events when the current tool is a point generator. charview.c will dispatch events to us. (cv => charview)
The dialog to export data into a different format. Also (some of) the conversion routines for that format. (Also used to export xbm files from the bitmapview)
Contains the Get Info dispatcher and dialogs for the charview. There are several different types of info depending on the current selection and there's a dialog for each
  • A point is selected
  • A reference to another character is selected (in the foreground)
  • An image is selected (in the background)
  • Or if more than one thing is (or no things are) selected, then general information on the character itself
    This last is also used by the fontview.
A series of trivial little dialogs and commands that allow the user to set postscript hints manually.
Contains code to import stuff into a CharView, BitmapView or FontView. Initially it was only images into the CharView, but it has grown beyond its name. CharViews can import Images (gif, png, tiff, jpeg, xbm, xpm, sun raster, windows bmp, ...) into the background of a CharView. I'd like to be able to do this from the clipboard, but I don't know whether there's a standard way of moving images around there. Also can import eps files (very restricted) and xfig (not too well). BitmapViews can only import images into their foreground. I think only bitmaps but I forget. FontViews can import bdf fonts into their list of bitmaps.
The dispatch file for mouse events when the knife tool is selected.
Handles the two palettes associated with a CharvView, and the two palettes for a BitmapView, and the Char and BitmapView popup menus.
The dispatch file for mouse events when the pointer tool is selected.
The dispatch file for mouse events when the ruler tool is selected.
The dispatch file for mouse events when one of the shape tools (rectangle, ellipse, polygon, star) is selected.
The dialog for the expand stroke command. Also some of the routines which do the work. See also splinestroke.c
The dispatch file for mouse events when one of the transform tools (scale, rotate, flip, skew) is selected.
Contains the routines that handle Undoes, Redoes and Copy/Paste for CharViews, BitmapViews and FontViews.
Writes a bdf file.
Writes a postscript file. pfa, pfb, type3, type0. See also splinesave.c.
Contains the fontinfo dialog and the routines to reencode a font.
The main file for the fontview. Menu dispatcher, event handler. Basic Font level routines.
The file that figures out how to build a composite character for you (ie. for Agrave will put a reference to A in your character, and a reference to grave and then will position the accent on top of A nicely). Operates on both the splines and the bitmaps.
Contains the dialogs and the functions for the Merge Fonts and Interpolate Fonts commands
The routine which reads in a bdf font. (note the font selection dialog is in cvimages.c)
The dialog and routines for autowidth and autokern.
icon resources for the images used in the palettes. There's no good reason why this isn't merged in with charviewicons.c
The main file for the metricsview. Menu dispatcher, event hander. Most of the functionality.
Handles the print and pagesetup dialogs.
Parses a postscript font. Doesn't get the encoding of a type0 font. Type3s are too free form for me to be able to interpret all (or even most?) of them. But we can at least read in the type3s we write out (unless they contain images). Some of the work also done in psread.c and splineutil.c
Parses a TTF (or OTF) font file, and converts from quadratic Bézier to cubic Bézier (easy).
Preference dialog.
This is our postscript interpreter for various flavors of postscript-- eps files, type3s, type1s, type2s, etc. It can't handle much.
A list of all the adobe standard names for unicode characters in postscript. Any NULL entry in this array gets an algorithmically generated name uni%04X
All the routines to handle scripts
Dialog and dispatcher for the Generate Fonts command.
Routines to write and read our spline font database format (sfd). Also routines to handle autosave files which are basically just the bits of the font which have changed written out in sfd format with a few extra headers to say what these changes should be applied to.
The resource containing the splash image.
The routines that do rasterizing (and anti-aliasing). Also provides skeleton routines for autohinting, remove overlap, etc. which use a similar structure.
The routines which implement the remove overlap command.
Various helper routines when saving a postscript (and to a lesser extent TTF) font. Converts to type1 or type2 commands. Figures out optimal referencing.
Generates an afm file.
More routines to handle expand stroke.
A bunch of utility routines. Converts postscript type1 strings into SplineChars. Figures bounding boxes. Handles updating references and dependencies. Figures linear approximations to splines for drawing. Figures clockwise, counter-clockwise. Guesses at good pointtypes when loading in postscript/ttf fonts. Copies SplinePointLists. Transforms SplinePointLists. Solves (approximates a solution) cubic equations. Finds points of inflection. Figures out if a point is "near" a spline.
More utility functions. Determines if a spline is linear (even if its control points aren't degenerate, we can still get spines which trace out a line, for instance if both control points are on the line between the to base points). Finds (approximates) the intersection of two splines. Aproximate a spline from a set of points (used by MergePoint, inserting a point onto a spline, and many other things). The Merge command itself. The Simplify command. Commands to remove tiny spline segments (these can confuse the Overlap routine, so we take them out before it does anything). Routine to create a new SplineFont. Routines to make sure the control points of tangent points continue to point in the right direction even when the point is moved. Routines to figure good default values for control points on new points (and on points where the user has not set the control points him/herself when that point is moved). Determines if any point on a path is selected. Reverses the direction of a closed path.
Time stamp of when I last built.
Program which generates time stamp. (stamp.c)
main routine. Initializes things and reads comand line arguments. Handles the splash screen. Top dispatcher for autosave.
Saves a true type or open type font. see also splinesave.c for reference character optimization and for OpenType Type2 conversion routines.
Transform dialog and dispatch routines.
Utilities for the user interface.
Hmm. this is blank.
Builds and dispatches the window menu.

-- Prev -- TOC -- Next --