PfaEdit
I will not be responding to bug reports/feature
requests/etc. between 28 June and 9 July.
PfaEdit -- A postscript font editor
that lets you create your own postscript, truetype, opentype, cid-keyed and
bitmap (bdf) fonts, or edit existing ones. Also lets you convert one format
to another.
Contents
I have no one to do QA for me except users on the net, so this is essentially
beta software. Expect to find bugs. Please let me know when
you do.
Binary distributions:
If you want to do autotracing around character images you should also download
Martin Weber's autotrace
program. (there's a new version as of Dec 2001)
If you want to edit CID keyed fonts you probably need these
character set descriptions. (These were last updated
6-Mar-2002)
Source distribution
You can download a source RPM: Version:
26-June-2002
Or you can download the entire source tree
in one .tgz file: Version
27-June-2002
If you want to do autotracing around character images you should also download
Martin Weber's autotrace
program.(there's a new version as of Dec 2001)
If you want to edit CID keyed fonts you need these character
set descriptions. (These were last updated 6-Mar-2002)
With the appropriate libraries, PfaEdit can import
png, tiff, and gif images to act as character backgrounds for tracing purposes
(PfaEdit can import bmp and xbm formats without external libraries). With
the freetype library PfaEdit will do a better job making bitmap characters
for you. None is required for the proper compilation/execution of PfaEdit,
if the libraries are not present they will not be used. If your machine doesn't
have them and you want them they are available from:
Normally PfaEdit depends on the X11 windowing system, but if you are just
interested in the scripting engine (with no user interface), it may be built
on systems without X (the configure script should figure this out).
PfaEdit has been ported to the following systems (at some point in its life)
-
Linux (obviously, (redhat, debian, suse),
386,spark,arm,alpha,ia64,m68k,mips,mipsel,powerpc,s390)
-
Solaris
-
Irix
-
FreeBsd
-
NetBsd
-
Mac OS/X
-
OpenVMS7.3 for Alpha
-
cygwin with X running on top of MS windows.
If you are editing CID keyed fonts you should pull
down the following file
-
cidmaps.tgz (These were last updated 5-Apr-2002)
and then
$ gunzip cidmaps.tgz
$ tar xf cidmaps.tar
$ mkdir -p /usr/share/pfaedit
$ mv *.cidmap /usr/share/pfaedit
You might also want to pull down some unicode
bitmap fonts that pfaedit uses
All the documentation files in this directory bundled up into one
tgz file 26-June-2002.
If you do the following then PfaEdit will find the docs for you when you
press F1 (ie. PfaEdit it will look in /usr/share/doc/pfaedit before it looks
on the web):
$ mkdir -p /usr/share/doc/pfaedit
$ cd /usr/share/doc/pfaedit
$ gunzip pfaedit_htdocs-*.tgz
$ tar xf pfaedit_htdocs-*.tar
$ rm pfaedit_htdocs-*.tar
Or you can download an rpm which
should install them properly for you 8-Feb-2002.
Or you can just browse the docs online. (Always
current)
License
Copyright © 2000,2001,2002 by George Williams
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
The name of the author may not be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
OF SUCH DAMAGE.
Changes (Enhancements & Bug Fixes)
-
27-June-2002
-
A couple more vms patches
-
26-June-2002
-
Merged in Jouk Jansen changes for OpenVMS
-
23-June-2002
-
Valek wanted to be able to add comments to characters and to flag characters
with some visible mark. The Char Info dlg
has been extended to do this. The scripting language has been extended to
allow scripts to set and test these too.
-
Added a "foreach selected character in the font" loop.
-
Added $selection variable to return the current selection as an array
-
Extended the Select() and SelectMore() commands to accept an array as an
argument (and set the selection to the array).
-
22-June-2002
-
Yesterday's unicode sprintf change introduced another bug. Fixed
-
Valek points out that if you have a bitmap only font and you attempt
simultaneously to scale it and delete all the bitmaps, then PfaEdit would
crash. (Same thing would happen if you just removed all the bitmaps).
-
Valek provided some additional russian translations.
-
21-June-2002
-
Ttf fonts seem to be unhappy if they contain a glyph with a single contour
and a single point on that contour. I don't know why. Output all such as
spaces.
-
Added ability to set the resolution of a bdf font.
-
Rearranged preferences.
-
Added scripting access to Force-Encoding
-
PfaEdit memory allocation optimizations didn't work if sizeof(int *)==8
-
Bug in unicode sprintf routine when sizeof(long)==8
-
In some cases when reading a ttf font with a (unicode) cmap which assigned
one glyph to two encodings, and if that glyph happened to be in the
AdobeStandardEncoding, then when converting to Type1 PfaEdit would create
a dictionary which recursively seac-ed (invoked) itself. This caused an infinite
loop in GhostView, and crashed some printers.
-
11-June-2002
-
CID fix on 3 June was wrong, it broke all non-CID keyed postscript fonts
(it did work for CID fonts). Both should work now.
-
Added better support for bdf foundries and for bdf copyrights.
-
Added a preference item to specify the ttf VendorID (foundry). Used to truncate
the bdf foundry to 4 characters.
-
Small bug fix in print
-
Cleaned up bug in scripting ($bitmaps)
-
7-June-2002
-
Fixed some more CID font problems
-
Tweaked behavior of FamilyName/FullName in GetFontInfo dlg.
-
6-June-2002
-
PfaEdit now supports greymap strikes in truetype files
-
The bitmap editor has been extended to handle greymap (anti-aliased) fonts
-
There is no longer a seperate mechanism for generating greymap files from
the Generate Font dlg, instead they may be added to the font database file
with the bitmap dlg.
-
Added support for vertical metrics in bdf files.
-
Fixed some problems in moving the vwidth line in outline character views
-
Added some default window positioning code.
-
4-June-2002
-
Oops, more bug fixes for the new greymap format.
-
One more attempt to solve the X Server bug where destroying/unmapping a window
before its map notify event gets processed causes the X server to crash.
-
3-June-2002
-
Stopped using my extension to bdf to make it support greymaps and started
using that supported by freetype (removed the BITSPERPIXEL keyword and added
an extra argument to the SIZE keyword).
-
More fixes for cid fonts
-
18-May-2002
-
Font Info will prompt user about changing the UniqueID/XUID if the font name
is changed without changing them.
-
Fixed some Mac configuration problems.
-
16-May-2002
-
PfaEdit would not compile when trying to used libjpeg as a static library
(as on Mac OS/X)
-
Use psili rather than koronis where appropriate
-
It was not possible to select the elipse/star tool from the tools palette.
-
14-May-2002
-
Made pfaedit work without X (ie. the scripting engine can be linked without
requiring that X be present. Possibly useful for Mac OS/X, Cygwin)
-
When showing what a greek accented character will be built from, the character
info dlg will now show the non-unicode alternate whether or not the characters
needed exist in the font.
-
The Reference Info dlg will now include the unicode value of the referenced
character
-
The positioning of ypogegrammeni with respect to eta was broken (again)
-
Some more greek fixes.
-
13-May-2002
-
Various fixes for greek accented characters
-
7-May-2002
-
PfaEdit would crash when attempting to Flatten a CID keyed font (introduced
16-Apr with the multiple fontview support)
-
PfaEdit did not process panose information correctly (broken 21-Jan, comment
change)
-
PfaEdit did not create new ttf names properly when they were for a language
which had not been used before in the font.
-
6-May-2002
-
Oops. Adobe describes two naming conventions for ligatures and I only supported
one of them. I should support the other one now.
-
Fixed a number of bugs caused by custom encodings.
-
If the selection in the font view contained either "dotlessi" or "dotlessj"
and the Element menu was pulled down then the dotless characters would be
created from their dotted varients (you didn't even have to select anything
from the menu) (broken 24-Feb-2002)
-
PfaEdit had trouble reading non-empty ttf glyphs with 0 contours.
-
PfaEdit failed to read images from an sfd file without a transparent colour
-
Allow parens in familyname in the fontinfo dlg.
-
When the width was selected, depressing a mouse button would snap the logical
pointer location to a random x coordinate (often 0).
-
When generating a ttf file from a subfont of a CID keyed font pfaedit would
crash. This has been fixed.
-
When exiting with multiple font views looking at one (changed) font, there
would be no prompt to save the font.
-
Added a Find/Replace feature
-
16-Apr-2002
-
BDF fonts did not mark the missing (.notdef, undefined, etc.) character properly.
-
otf fonts had the default and normative widths reversed on output
-
Added marginally better support for non-latin ligatures in GPOS/GSUB tables.
-
Added support for arabic forms in the GSUB table (ie. we now produce 'init',
'medi', 'fina', and 'isol' features)
-
Build composit should now note whether arabic ligatures are
<initial>, <final>, <medial> or <isolated>
-
It is now possible to have multiple font views looking at one font. I expect
this will be a rich source of bugs, especially for CID keyed fonts.
-
9-Apr-2002
-
Under KDE we could get two textfields flashing cursors (thinking they had
focus) should be fixed.
-
Added Undo/Redo to metricsview
-
Added Undo/Redo to fontview
-
Added Element menu to metricsview
-
Added [Fix] button to (some of) Find Problems
-
5-Apr-2002
-
Applied various patches from KANOU Hiroki
-
Changes to metricsview
-
Fixed some minor bugs
-
Double clicking on a character will open that character
-
Enabled Copy/(CopyRef/CopyWidth/)Paste but not Cut
-
PfaEdit had problems when there were exactly two X resources.
-
Made the Point Info dlg wider.
-
Improved printing text samples at large point sizes.
-
I was generating flex hints incorrectly.
-
Extended postscript interpretter slightly to recognize the eps files (called
"art") produced by fontographer
-
Additions to the scripting language
-
CenterInWidth
-
AutoWidth (from Andreas Påhlsson)
-
AutoKern
-
The Expand Stroke fix for 4-Mar-2001 was too extreme.
-
Added a field to Char Info that shows the components out of which this character
(accented, ligature, hangul sylable, etc.) may be built.
-
3-Apr-2002
-
Various scrollbar enhancements
-
thumb now has a bigger minimum size
-
fontview/charview both respond to page up and page down requests
-
right mouse button may be used to position thumb
-
Installed James A. Crippen makefile patch so that distclean reports success
even if there are no files to clean.
-
PfaEdit had problems guessing default ligatures for characters outside of
BMP.
-
In the outline character view, double clicking with one of the point tools
(curve, corner, tangent, pen) will add a point and then bring up a
Point Info dialog
-
If you edit in a textfield (so that the mouse pointer vanishes) and then
tabbed into another text field the mouse pointer would never reappear.
-
Merge Fonts left memory in a bad state and would often cause a crash.
-
Merge Fonts used a string for a title which was ascii when unicode was expected.
This could cause strange characters to be displayed.
-
More fixes for build accented characters (for inverted breve and Oslash).
-
14-Mar-2002
-
Nifty. The modifier keys auto-repeat under cygwin (if Control is down one
gets a series of Press/Release, Press/Release... while normal X just gives
one Press.) This meant we'd keep refreshing the tools palette, which meant
an annoying flicker and slowed things down.
-
Raise the palettes after a resize
-
PfaEdit didn't handle 8bit colormaps well. I've improved the behavior, and
added an x resource to give the user some control over behavior.
-
10-Mar-2002
-
Oops. I broke CID-keyed postscript input (ie. none-otf) when I added the
6-Mar fix for type1utils
-
Applied another patch from KANOU Hiroki, on otf cid support
-
9-Mar-2002
-
8-Mar-2002
-
Added a new program, sfddiff, to compare fonts
and show their differences.
-
6-Mar-2002
-
Small change to the format of cidmap files (to bring names into conformance
with adobe's spec on modifed unicode names), and corresponding changes to
a few routines.
-
Add support for the type1 format produced by GNU type1utils. Which is vaguely
like that used by ghostview.
-
4-Mar-2002
-
Fixed more problems with reading eps files (these were mostly within Expand
Stroke, so presumably also problems with Element->Expand Stroke)
-
And one more problem with the file chooser.
-
Scripting additions:
-
Ability to generate a pfm file from script
-
Ability to Merge Kerning Info from a script
-
Ability to Remove All Kerning info from a script
-
Will now display something useful for rotated and italic cids
-
3-Mar-2002
-
Fixed a number of problems involved in reading in eps files.
-
28-Feb Mac work introduced a bug in the file picker dlg (in wildcarding).
-
2-Mar-2002
-
Rounding errors could accumulate when generating Type1 fonts.
-
Fix for some overlap problems due to KANOU Hiroki
-
If PfaEdit crashed (or was interrupted) after making some (unsaved) changes
to a font, and that font was subsequently deleted, the PfaEdit's autorecovery
would complain about a missing file each time it was started. Now it will
notice the problem and ask whether it should delete the recovery file (whereupon
it will stop complaining).
-
Enabled a fix from Greg Ford so that PfaEdit set the mac style bits
appropriately.
-
Earlier Changes
PfaEdit is by no means complete. And probably doesn't work very well. Be
prepared to save frequently and always work on a copy of the original.
-
No attempt has been made to be efficient.
-
No attempt has been made to read truetype instructions (hints)
-
No attempt has been made to retain the change-over points for hint substitution.
PfaEdit will refigure this when it saves the font.
-
Many type 3 fonts will not be read in correctly (those generated by pfaedit
should always be acceptable)
-
Importing a type0 font loses the encoding. PfaEdit only imports simple type0
fonts (such as those made by itself), will get confused if there's more than
one font with a chars dictionary.
-
PfaEdit's support for the GPOS/GSUB/VORG table output is limitted. Other
advanced opentype tables aren't supported at all.
-
PfaEdit's support for Apple's Advanced Typography tables (AAT) is non-existant.
-
When reading in TrueType PfaEdit will not get the correct offset for composit
glyphs where offsets are specified by point matching rather than as x,y values.
(some mac fonts)
-
My truetype hinting is still bad. Especially for diagonals.
-
I'm told that the truetype fonts generated by PfaEdit don't work on NT 4.0
(possibly other versions of NT). I don't know how NT's rasterizer differs
from Windows'.
-
Some truetype fonts (kaiu and mingliu) do not store the correct outline.
Instead they rely on using the instructions to move points around to generate
the outline. The outline does not appear to be grid-fit at all, just positioned.
PfaEdit will not read the instructions. In most fonts this would be the wrong
thing to do, and I don't know how I could tell when it needs to be done...
-
After adding the Johab encoding, any old fonts which had a unicode encoding
will suddenly claim to have a Johab encoding. I don't see a way around this
at the moment. Just reencode them as unicode and all should be well.
-
I'm told AutoKern doesn't work too well.
-
PfaEdit is confused by small splines, on the order of one em unit. If you
need something that small, scale the font up by a factor of 2 or more (including
the ascent and descent).
-
The MetaFont command doesn't work well.
-
On linux boxes the dashed lines representing hints or the outlines of references
get screwed up. I think this is a bug in the XServer on linux (it doesn't
happen on other systems) but I have not examined it closely.
-
PfaEdit will not copy and paste large (>XServer transfer (4Meg on my machine))
clipboards of text.
-
???
Installing it
The executable tarball contains the pfaedit executable and a man page. Put
it wherever you'd like.
The build script will do an install to /usr/local/bin if you want it to.
Running it
$ pfaedit font.pfa font2.pfb font3.sfd font4.ttf font5.otf font6.gsf
font7.bdf
will start pfaedit looking at the fonts you specify on the command line.
It can read either pfb or pfa fonts, and some ps fonts (type 0 fonts based
on a type 1 dictionary) as well as truetype fonts, non-CID open type fonts
and bitmap fonts.
$ pfaedit -new
will cause pfaedit to create a new font (in iso-8859-1 encoding)
$ pfaedit
will open up a file picker dialog and allow you to browse till you've found
a font file (or have created a new one).
Reporting bugs...
I'm sure you'll find some. If you can isolate it and come up with a reproduceable
minimal case, that would be great. The executable has symbols in it so if
you run it in gdb you should be able to get a stack trace... Do what you
can.
gww@silcom.com
-
My writing leaves much to be desired. Anyone who can make my
documentation more readable is encouraged to do so. (or who wishes to translate
it into other languages)
-
The UI can be translated into different languages. Unfortunately
it does not use gnu gettext.
-
English I take care of
-
Russian Valek handles
-
I've also created very minimal French & German translations that lapse
into English, anyone who wants to take these on is encouraged to do so.
-
Anything other language additions would be great (the entire UI does not
need to be translated)
-
Different font formats
PfaEdit supports Type1, truetype and opentype fonts (to greater and lesser
extents), also bdf and NFNT for bitmaps
But there are other formats out there that I can't find descriptions of:
-
Microsoft FON files (bitmap font resource files for windows)
-
There are certain commands which don't work very well and if someone
else wanted to they might code them better than I...
-
Remove overlap
-
Autohint
-
Metafont
-
generating instructions to do hinting in truetype (especially hints for diagonal
stems)
-
TrueType AAT (Apple Advanced Typography Tables)
-
Is not designed to allow font editors to understand the tables. I have spent
some time trying to figure out how to decompile apple's 'mort' table and
it appears that the only way to figure it out is to run the state machine
with all possible inputs. And see what happens. I'm not willing to go to
that effort, but if someone has code that parses the ligature sub-tables
and returns a list of ligature glyphs and their respective components I'd
love to make use of it.
The sample text in File->Print comes from many
sources.
The following people have helped debug pfaedit. Many thanks!
PfaEdit was inspired by AltSys's
Fontographer
now placed in graceful retirement by MacroMedia.
Other font links
Other Encodings
-
BDF editors
-
xmbdfed -- bdf editor.
-
gfe -- GNU font editor.
Eventually supposed to support other formats
-
Postscript/ttf font editors
-
MetaFont the original computer vector font editor & other TeX utilities
-
Postscript utilities
-
gfontview -- displays a
postscript/ttf font
-
gglyph
-- another font displayer
-
t1utils -- Type 1 utility programs
& multiple master utilities
-
Type1inst
-- helps to install type 1 fonts under X and ghostscript
-
ttf2pt1 -- Converts truetype
to type1 postscript fonts and generates hints
-
type1fix -- (part of the TeXtrace package).
Used to make some Type1 fonts work with ATM.
-
my stuff
-- Type 1 decoders and converters. True Type & open type decoder.
-
TrueType utilities
-
Microsoft provides a bunch of stuff (for windows only of course)
-
And Apple does too
(mac only)
-
Rasterizers
-
Other related links...