
PfaEdit
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
(and eternally) 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. (known to work with versions released Dec 2001 and April 2002)
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:
24-Oct-2002
Or you can download the entire source tree
in one .tgz file: Version
13-Nov-2002
Or you can go to the
cvs
tree and get the most recent version.
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 10-Sept-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)
Building it
$ gunzip pfaedit_full-*.tgz
$ tar xf pfaedit-full*.tar
$ cd pfaedit
$ configure
$ make
$ su
# make install
PfaEdit now compiles dynamic libaries by default. If you would rather not
deal with dynamic libraries (or if the compiler generates internal compiler
errors when asked to generate PIC code, as Mac OS/X does for me) then use
$ configure.static
instead and things should be configured for static libraries.
Installing it
The executable tarball contains a shell script doinstall
$ gunzip pfaedit-*.tgz
$ tar xf pfaedit-*.tar
$ cd pfaedit
$ su
# doinstall
See above on how to install using the makefile.
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). $ pfaedit -script script.pe
fonts...
This will invoke pfaedit in a non-interactive mode, and have it run the named
script. Any further arguments on the command line will be passed as arguments
to the script and processed (or not) by it.
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.
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 limited. Other advanced
opentype tables aren't supported at all.
-
PfaEdit's support for Apple's Advanced Typography tables (AAT) is non-existent.
There are currently three mailing lists established for PfaEdit. You may
subscribe to any of them on sourceforge:
http://sourceforge.net/mail/?group_id=25752
This list includes the gross bugs that I'm aware of but don't know how to
fix. Minor bugs get reported to me and are generally fixed within a week
and rarely appear on this list.
-
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 23/Nov/01, any old fonts (in sfd files) 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. (I may have fixed this, but
I'm not sure)
-
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.
-
Under gnome mnemonics in menus don't work. Personally I consider this a bug
in gnome.
-
Under gnome, docked palettes don't work the first time. Personally I consider
this a bug in gnome.
-
Under kde, iconifying a PfaEdit window crashes the button bar at the bottom
of the screen. Personally I consider this a bug in kde.
-
On the mac I have no idea how to invoke Internet Explorer. On cygwin I have
no idea how to find the (Windows) default browser.
-
???
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.
pfaedit-devel@lists.sourceforge.net
-
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
-
Japanese is provided by KANOU Hiroki.
-
A French translation is underway.
-
I've also created a very minimal German translations that lapse into English,
anyone who wants to take this on is encouraged to do so.
-
Anything other language additions would be great (the entire UI does not
need to be translated, any subset is a help)
-
Different font formats
PfaEdit supports Type1, truetype and opentype fonts (to greater and lesser
extents), also bdf and NFNT for bitmaps
PfaEdit will sort-of accept metafont files (essentially it runs metafont
and autotraces the result). It won't produce .mf files
PfaEdit will read acorn font files with a helper app.
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
-
Autokern (might be fixed now)
-
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 (yet) 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.
-
Tests
-
I've just started working on a very
simplistic
testsuite-- more to weed out crashes in the underlying engine, than to
make sure it produces the right results. If anyone has a better idea for
an automated suite, or would like to contribute tests to the current stuff,
please let me know.
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.
-
Postscript
Type1
-
CID
keyed fonts
-
AFM
-
BDF
-
True Type Standard
(Sadly different sources have slightly different definitions of less important
parts of the standard, be warned)
-
OpenType
(postscript embedded in a truetype wrapper)
-
Postscript
Type42 (the opposite of opentype, it's truetype embedded in postscript)
-
Macintosh font formats
-
X11 pcf format
-
TeX font formats
-
OpenDoc.
Sadly Proprietary so I shan't support it.
-
Acorn
RISC OS font format (these fonts are often zipped up with a non-standard
zip).
-
Ikarus IK format is documented in Peter Karow's book Digital Formats for
Typefaces, Appendices G&I. (copies may still be available from
URW++)
Interestingly the exact format of a curve is up to the interpretation program.
Other font links
Other Encodings
-
BDF editors
-
xmbdfed -- bdf editor.
-
gfe -- GNU font editor.
Eventually supposed to support other formats
-
fstobdf -- Part of the X distribution, reads a font from the server and generates
a bdf file from it.
-
Postscript/ttf font editors
-
MetaFont the original computer vector font editor & other TeX utilities
-
(available with the TeX package)
-
MetaPost, Uses
the metafont language to produce PostScript pictures.
-
TeXTrace, generates pfb fonts from
TeX fonts by rasterizing at high res and then autotracing them
-
mftops,
similar
-
mftrace, traces
pk fonts (bitmap images) and creates pfb/pfa files. (formerly called pktrace)
-
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
-
Rasterizers
-
Other related links...
If you know of a tool you think should be on this list, please
let me know. I did
my research a couple of years ago and expect it is out of date.