summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkarl <karl>2004-04-21 21:20:20 +0000
committerkarl <karl>2004-04-21 21:20:20 +0000
commit4977c8d7c8dfdd285a7ebde805da5c793c1ce04c (patch)
tree3901313b942eb78f48bb50952d1903ff50d5d61c
parentd2ffca200655a89c5d140b66d69001e92173e3da (diff)
downloadfontutils-4977c8d7c8dfdd285a7ebde805da5c793c1ce04c.tar.gz
basic compilation
-rw-r--r--.cvsignore5
-rw-r--r--.gdbinit38
-rw-r--r--charspace/.gdbinit62
-rw-r--r--charspace/M.depend149
-rw-r--r--charspace/cmi.h79
-rw-r--r--charspace/main.c56
-rw-r--r--configure.in2
-rw-r--r--data/ChangeLog529
-rw-r--r--data/adobestd.enc258
-rw-r--r--data/ascii.enc128
-rw-r--r--data/common.cmi249
-rw-r--r--data/defs.make144
-rw-r--r--data/defslib.make36
-rw-r--r--data/defsprog.make47
-rw-r--r--data/dingbat-gs-run2
-rw-r--r--data/dvips.enc311
-rw-r--r--data/encoding.map16
-rw-r--r--data/ggmr.1200cmi17
-rw-r--r--data/ggmr.ifi102
-rw-r--r--data/gnulatin.enc324
-rw-r--r--data/gnulcomp.enc294
-rw-r--r--data/itcdingbat.enc286
-rw-r--r--data/mflogo.enc87
-rw-r--r--data/myprfont.ps154
-rw-r--r--data/mytestfont.tex227
-rw-r--r--data/psymbol.enc267
-rw-r--r--data/texlatin.enc259
-rw-r--r--data/texmext.enc161
-rw-r--r--data/texmital.enc161
-rw-r--r--data/texmsym.enc161
-rw-r--r--data/textext.enc140
-rw-r--r--data/windows.enc273
-rw-r--r--data/zdingbat.enc260
-rw-r--r--doc/.cvsignore1
-rw-r--r--fontconvert/.cvsignore1
-rw-r--r--fontconvert/.gdbinit165
-rw-r--r--fontconvert/main.c130
-rw-r--r--gf/.cvsignore1
-rw-r--r--gf/gf_input.c4
-rw-r--r--imageto/.cvsignore1
-rw-r--r--imageto/.gdbinit129
-rw-r--r--imageto/main.c68
-rw-r--r--include/Bitmap.h121
-rw-r--r--include/Item.h72
-rw-r--r--include/bb-list.h53
-rw-r--r--include/bb-outline.h37
-rw-r--r--include/bitmap.h115
-rw-r--r--include/bounding-box.h63
-rw-r--r--include/bzr.h134
-rw-r--r--include/c-auto.h71
-rw-r--r--include/c-errno.h27
-rw-r--r--include/c-fopen.h53
-rw-r--r--include/c-limits.h34
-rw-r--r--include/c-memstr.h62
-rw-r--r--include/c-minmax.h84
-rw-r--r--include/c-namemx.h41
-rw-r--r--include/c-pathch.h71
-rw-r--r--include/c-pathmx.h37
-rw-r--r--include/c-proto.h61
-rw-r--r--include/c-std.h73
-rw-r--r--include/c-unistd.h50
-rw-r--r--include/charspec.h34
-rw-r--r--include/cmdline.h135
-rw-r--r--include/config.h46
-rw-r--r--include/dirio.h55
-rw-r--r--include/edge.h59
-rw-r--r--include/encoding.h85
-rw-r--r--include/file-input.h51
-rw-r--r--include/file-output.h43
-rw-r--r--include/filename.h42
-rw-r--r--include/fix-num.h36
-rw-r--r--include/font.h243
-rw-r--r--include/fontmap.h36
-rw-r--r--include/gf.h156
-rw-r--r--include/global.h151
-rw-r--r--include/hexify.h33
-rw-r--r--include/identity.h26
-rw-r--r--include/libfile.h59
-rw-r--r--include/list.h56
-rw-r--r--include/logreport.h52
-rw-r--r--include/moretypes.h78
-rw-r--r--include/paths.h25
-rw-r--r--include/pathsrch.h53
-rw-r--r--include/pbm.h46
-rw-r--r--include/pbmplus.h196
-rw-r--r--include/pk.h95
-rw-r--r--include/rand.h35
-rw-r--r--include/report.h57
-rw-r--r--include/scaled-num.h39
-rw-r--r--include/spline.h128
-rw-r--r--include/statistics.h45
-rw-r--r--include/str-lcase.h31
-rw-r--r--include/tfm.h300
-rw-r--r--include/varstring.h64
-rw-r--r--include/vector.h103
-rw-r--r--include/xmessage.h35
-rw-r--r--include/xt-common.h140
-rw-r--r--lib/.cvsignore1
-rw-r--r--lib/GNUmakefile4
-rw-r--r--lib/report.c4
-rw-r--r--pbm/.cvsignore1
-rw-r--r--pbm/.gdbinit6
-rw-r--r--pbm/libpbm1.c7
-rw-r--r--pk/.cvsignore1
-rw-r--r--tfm/.cvsignore1
-rw-r--r--tfm/tfm_input.c10
106 files changed, 9687 insertions, 259 deletions
diff --git a/.cvsignore b/.cvsignore
new file mode 100644
index 0000000..0b482b5
--- /dev/null
+++ b/.cvsignore
@@ -0,0 +1,5 @@
+GNUmakefile
+autom4te.cache
+config.log
+config.status
+configure
diff --git a/.gdbinit b/.gdbinit
new file mode 100644
index 0000000..4cbd133
--- /dev/null
+++ b/.gdbinit
@@ -0,0 +1,38 @@
+define redo
+symbol-file spectrum
+exec-file spectrum
+end
+
+directory ../lib
+directory ../gf
+directory ../pk
+directory ../tfm
+
+# Signature stuff.
+#set args -no-second -no-variance -dump 3 pnr10 -verbose -window blackman \
+-dump-text $dtrg/TeX/ram.txt -dumpdir karltest \
+-f-bandpass 00 04 -f-bandpass 04 08 -f-bandpass 08 12 \
+ -f-bandpass 12 16 -f-bandpass 16 20 -f-bandpass 20 24 \
+ -f-bandpass 24 28 -f-bandpass 28 32 -f-bandpass 32 36 \
+ -f-highpass 36 -f-wilson 1 -f-wilson 2 -f-wilson 3 \
+ -f-wilson 4 -f-wilson 5 -f-wilson 6 -f-wilson 7 -f-wilson 8 \
+ -f-wilson 9 -f-wilson 10 -f-wilson 11 -f-wilson 12
+#set args -no-second -dump 61 cmr10 -verbose -dumpdir karltest -W 64
+#set args -dump 100 Bembo-BoldItalic -no-postscript -W 128 -verbose
+
+# Kathy's artwork.
+#set args -W 64 -H 64 -no-second -font cmss10 fuck shit hate love \
+ -title "Four four-letter words" -verbose > art.ps
+
+# Karl's talk to IP class, Sept 93.
+#set args -W 64 -H 64 -text=m cmr10 cmss10 -verbose -dc-in-mid -title \
+"spectra of letters (#1)"> m.ps
+
+# Perfect back transforms
+#set args -W 64 -H 64 -font=cmss10 Karl -verbose -back -noise=0 -epsf >foo.ps
+
+# All white.
+#set args -W 16 -H 16 -font=cmtex10 " " -verbose -back -noise=0 -epsf >foo.ps
+
+# Some noise, PGM output only.
+set args -W 64 -H 64 -font=cmss10 Karl -verbose -back -noise=1 -pgm >/dev/null
diff --git a/charspace/.gdbinit b/charspace/.gdbinit
new file mode 100644
index 0000000..37af403
--- /dev/null
+++ b/charspace/.gdbinit
@@ -0,0 +1,62 @@
+directory ../gf
+directory ../pk
+directory ../tfm
+directory ../lib
+
+define redo
+symbol-file charspace
+exec-file charspace
+end
+
+#set args -fontdimens 2:10 -verbose -dpi 1200 \
+# -input-file ggmr30 -encoding-file gnulatin ggmr30o
+#set args -verbose -dpi 1200 -sbi-files ggmc30a,ggmr30 \
+# -encoding-file gnulcomp ../ourfonts/ggmc30a.1200gf
+#set args -fontdimens 2:10 -verbose -dpi 1200 \
+# -sbi-files ggmr30p -encoding-file gnulatin ../ourfonts/ggmr30p
+#set args -verbose -dpi 1200 -sbi-files ggmc30a,ggmr30p \
+# -encoding-file gnulcomp ../ourfonts/ggmc30a.1200gf
+#set args -verbose -dpi 1200 -sbi-files ggmr30p -encoding-file gnulatin \
+# ../ourfonts/ggmr30p
+#set args -verbose -dpi 1200 -sbi-files ggmr30q -encoding-file gnulatin \
+# -output-file ../ourfonts/ggmr30q ../ourfonts/ggmr30p
+#set args -verbose -dpi 1200 -sbi-files ggmr30r -encoding-file gnulatin \
+# -output-file ../ourfonts/ggmr30r ../ourfonts/ggmr30q
+
+# testing output files.
+#set args -verbose -dpi 1200 -sbi-files ggmc30a -encoding-file gnulatin \
+# -output-file foo ../ourfonts/ggmc30a
+#set args -verbose -dpi 1200 -sbi-files ggmc30a -encoding-file gnulatin \
+# -output-file foo.bar ../ourfonts/ggmc30a
+
+#set args -verbose -dpi 1200 -sbi-files ggmr30s -encoding-file gnulatin \
+# -output-file ../ourfonts/ggmr30t ../ourfonts/ggmr30s
+#set args -verbose -dpi 1200 -sbi-files ggmr30t -encoding-file gnulatin \
+# -output-file ../ourfonts/ggmr30u ../ourfonts/ggmr30t
+
+# change en size
+#set args -verbose -dpi 1200 -sbi-files ggmr26a -encoding-file gnulatin \
+# -output-file ../ourfonts/ggmr26b ../ourfonts/ggmr26a
+
+# change number displacement to be en, adjust some letters.
+#set args -verbose -dpi 1200 -sbi-files ggmr26c -encoding-file gnulatin \
+# -output-file ../ourfonts/ggmr26d ../ourfonts/ggmr26c
+
+#set args -verbose \
+# -cmi=../ourfonts/garamond/example/ggmr.1200cmi \
+# -output=../ourfonts/garamond/example/ggmr30c \
+# ../ourfonts/garamond/example/ggmr30b.1200
+
+# Actually, the encoding is ``AEFMNOT only'', but it doesn't matter.
+#set args -verbose -encoding=ascii -cmi-files=logo10 logo10 -o=xlogo10
+
+#set args -verbose cmr10 -o=xcmr10
+
+#set args -verbose \
+ -cmi-file ../ourfonts/garamond/r/atlas/ggmr.1200cmi \
+ -encoding gnulatin \
+ -output-file foo \
+ ../ourfonts/garamond/r/atlas/orig/ggmr26d.1200
+
+#set args -verbose $ourfonts/helvetica/hvaz12.1200gf \
+ -cmi=$ourfonts/helvetica/hvaz.cmi -output=hvaz12a
diff --git a/charspace/M.depend b/charspace/M.depend
index 59bbc57..bfd9f30 100644
--- a/charspace/M.depend
+++ b/charspace/M.depend
@@ -1,105 +1,46 @@
-cmi.o: .././include/config.h .././include/c-std.h \
- .././include/c-unistd.h .././include/c-memstr.h \
- .././include/c-errno.h .././include/c-minmax.h \
- .././include/c-limits.h .././include/c-proto.h .././include/global.h \
- .././include/moretypes.h .././include/libfile.h \
- .././include/varstring.h input-cmi.h main.h .././include/encoding.h \
- .././include/font.h .././include/bitmap.h .././include/bounding-box.h \
- .././include/tfm.h .././include/fix-num.h .././include/list.h \
- symtab.h char.h realstrval.h
-char.o: char.c .././include/config.h $(kpathsea_srcdir)/config.h \
- .././include/c-auto.h $(kpathsea_srcdir)/c-std.h \
- $(kpathsea_srcdir)/c-unistd.h $(kpathsea_srcdir)/systypes.h \
- $(kpathsea_srcdir)/c-memstr.h \
- $(kpathsea_srcdir)/c-errno.h \
- $(kpathsea_srcdir)/c-minmax.h \
- $(kpathsea_srcdir)/c-limits.h \
- $(kpathsea_srcdir)/c-proto.h $(kpathsea_srcdir)/debug.h \
- $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h $(kpathsea_srcdir)/progname.h \
- .././include/c-std.h .././include/c-unistd.h .././include/c-memstr.h \
- .././include/c-errno.h .././include/c-minmax.h \
- .././include/c-limits.h .././include/c-proto.h .././include/global.h \
- .././include/moretypes.h .././include/list.h .././include/report.h \
- char.h .././include/font.h .././include/bitmap.h \
- .././include/bounding-box.h .././include/tfm.h .././include/fix-num.h \
- realstrval.h kern.h symtab.h main.h .././include/encoding.h
-input-cmi.o: input-cmi.c .././include/config.h $(kpathsea_srcdir)/config.h \
- .././include/c-auto.h $(kpathsea_srcdir)/c-std.h \
- $(kpathsea_srcdir)/c-unistd.h $(kpathsea_srcdir)/systypes.h \
- $(kpathsea_srcdir)/c-memstr.h \
- $(kpathsea_srcdir)/c-errno.h \
- $(kpathsea_srcdir)/c-minmax.h \
- $(kpathsea_srcdir)/c-limits.h \
- $(kpathsea_srcdir)/c-proto.h $(kpathsea_srcdir)/debug.h \
- $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h $(kpathsea_srcdir)/progname.h \
- .././include/c-std.h .././include/c-unistd.h .././include/c-memstr.h \
- .././include/c-errno.h .././include/c-minmax.h \
- .././include/c-limits.h .././include/c-proto.h .././include/global.h \
- .././include/moretypes.h .././include/libfile.h input-cmi.h
-kern.o: kern.c .././include/config.h $(kpathsea_srcdir)/config.h \
- .././include/c-auto.h $(kpathsea_srcdir)/c-std.h \
- $(kpathsea_srcdir)/c-unistd.h $(kpathsea_srcdir)/systypes.h \
- $(kpathsea_srcdir)/c-memstr.h \
- $(kpathsea_srcdir)/c-errno.h \
- $(kpathsea_srcdir)/c-minmax.h \
- $(kpathsea_srcdir)/c-limits.h \
- $(kpathsea_srcdir)/c-proto.h $(kpathsea_srcdir)/debug.h \
- $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h $(kpathsea_srcdir)/progname.h \
- .././include/c-std.h .././include/c-unistd.h .././include/c-memstr.h \
- .././include/c-errno.h .././include/c-minmax.h \
- .././include/c-limits.h .././include/c-proto.h .././include/global.h \
- .././include/moretypes.h kern.h symtab.h char.h .././include/font.h \
- .././include/bitmap.h .././include/bounding-box.h .././include/tfm.h \
- .././include/fix-num.h .././include/list.h realstrval.h
-main.o: main.c .././include/config.h $(kpathsea_srcdir)/config.h \
- .././include/c-auto.h $(kpathsea_srcdir)/c-std.h \
- $(kpathsea_srcdir)/c-unistd.h $(kpathsea_srcdir)/systypes.h \
- $(kpathsea_srcdir)/c-memstr.h \
- $(kpathsea_srcdir)/c-errno.h \
- $(kpathsea_srcdir)/c-minmax.h \
- $(kpathsea_srcdir)/c-limits.h \
- $(kpathsea_srcdir)/c-proto.h $(kpathsea_srcdir)/debug.h \
- $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h $(kpathsea_srcdir)/progname.h \
- .././include/c-std.h .././include/c-unistd.h .././include/c-memstr.h \
- .././include/c-errno.h .././include/c-minmax.h \
- .././include/c-limits.h .././include/c-proto.h .././include/global.h \
- .././include/moretypes.h .././include/cmdline.h \
- .././include/filename.h .././include/getopt.h .././include/encoding.h \
- .././include/font.h .././include/bitmap.h .././include/bounding-box.h \
- .././include/tfm.h .././include/fix-num.h .././include/list.h \
- .././include/report.h char.h realstrval.h input-cmi.h main.h output.h \
- symtab.h cmi.h
-output.o: output.c .././include/config.h $(kpathsea_srcdir)/config.h \
- .././include/c-auto.h $(kpathsea_srcdir)/c-std.h \
- $(kpathsea_srcdir)/c-unistd.h $(kpathsea_srcdir)/systypes.h \
- $(kpathsea_srcdir)/c-memstr.h \
- $(kpathsea_srcdir)/c-errno.h \
- $(kpathsea_srcdir)/c-minmax.h \
- $(kpathsea_srcdir)/c-limits.h \
- $(kpathsea_srcdir)/c-proto.h $(kpathsea_srcdir)/debug.h \
- $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h $(kpathsea_srcdir)/progname.h \
- .././include/c-std.h .././include/c-unistd.h .././include/c-memstr.h \
- .././include/c-errno.h .././include/c-minmax.h \
- .././include/c-limits.h .././include/c-proto.h .././include/global.h \
- .././include/moretypes.h .././include/encoding.h .././include/font.h \
- .././include/bitmap.h .././include/bounding-box.h .././include/tfm.h \
- .././include/fix-num.h .././include/list.h .././include/filename.h \
- .././include/gf.h .././include/libfile.h .././include/report.h char.h \
- realstrval.h main.h output.h symtab.h
-symtab.o: symtab.c .././include/config.h $(kpathsea_srcdir)/config.h \
- .././include/c-auto.h $(kpathsea_srcdir)/c-std.h \
- $(kpathsea_srcdir)/c-unistd.h $(kpathsea_srcdir)/systypes.h \
- $(kpathsea_srcdir)/c-memstr.h \
- $(kpathsea_srcdir)/c-errno.h \
- $(kpathsea_srcdir)/c-minmax.h \
- $(kpathsea_srcdir)/c-limits.h \
- $(kpathsea_srcdir)/c-proto.h $(kpathsea_srcdir)/debug.h \
- $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h $(kpathsea_srcdir)/progname.h \
- .././include/c-std.h .././include/c-unistd.h .././include/c-memstr.h \
- .././include/c-errno.h .././include/c-minmax.h \
- .././include/c-limits.h .././include/c-proto.h .././include/global.h \
- .././include/moretypes.h kern.h symtab.h char.h .././include/font.h \
- .././include/bitmap.h .././include/bounding-box.h .././include/tfm.h \
- .././include/fix-num.h .././include/list.h realstrval.h main.h \
- .././include/encoding.h
+cmi.o: cmi.y ../include/config.h ../include/c-auto.h ../include/c-std.h \
+ ../include/c-unistd.h ../include/c-memstr.h ../include/c-errno.h \
+ ../include/c-minmax.h ../include/c-limits.h ../include/c-proto.h \
+ ../include/global.h ../include/moretypes.h ../include/libfile.h \
+ ../include/varstring.h input-cmi.h main.h ../include/encoding.h \
+ ../include/font.h ../include/bitmap.h ../include/bounding-box.h \
+ ../include/tfm.h ../include/fix-num.h ../include/list.h symtab.h char.h \
+ realstrval.h
+char.o: char.c ../include/config.h \
+ ../include/c-auto.h ../include/c-std.h ../include/c-unistd.h \
+ ../include/c-memstr.h ../include/c-errno.h ../include/c-minmax.h \
+ ../include/c-limits.h ../include/c-proto.h ../include/global.h \
+ ../include/moretypes.h ../include/list.h ../include/report.h char.h \
+ ../include/font.h ../include/bitmap.h ../include/bounding-box.h \
+ ../include/tfm.h ../include/fix-num.h realstrval.h kern.h symtab.h \
+ main.h ../include/encoding.h
+input-cmi.o: input-cmi.c ../include/config.h \
+ ../include/c-auto.h ../include/c-std.h ../include/c-unistd.h \
+ ../include/c-memstr.h ../include/c-errno.h ../include/c-minmax.h \
+ ../include/c-limits.h ../include/c-proto.h ../include/global.h \
+ ../include/moretypes.h ../include/libfile.h input-cmi.h
+kern.o: kern.c ../include/config.h \
+ ../include/c-auto.h ../include/c-std.h ../include/c-unistd.h \
+ ../include/c-memstr.h ../include/c-errno.h ../include/c-minmax.h \
+ ../include/c-limits.h ../include/c-proto.h ../include/global.h \
+ ../include/moretypes.h kern.h symtab.h char.h ../include/font.h \
+ ../include/bitmap.h ../include/bounding-box.h ../include/tfm.h \
+ ../include/fix-num.h ../include/list.h realstrval.h
+output.o: output.c ../include/config.h \
+ ../include/c-auto.h ../include/c-std.h ../include/c-unistd.h \
+ ../include/c-memstr.h ../include/c-errno.h ../include/c-minmax.h \
+ ../include/c-limits.h ../include/c-proto.h ../include/global.h \
+ ../include/moretypes.h ../include/encoding.h ../include/font.h \
+ ../include/bitmap.h ../include/bounding-box.h ../include/tfm.h \
+ ../include/fix-num.h ../include/list.h ../include/filename.h \
+ ../include/gf.h ../include/libfile.h ../include/report.h char.h \
+ realstrval.h main.h output.h symtab.h
+symtab.o: symtab.c ../include/config.h \
+ ../include/c-auto.h ../include/c-std.h ../include/c-unistd.h \
+ ../include/c-memstr.h ../include/c-errno.h ../include/c-minmax.h \
+ ../include/c-limits.h ../include/c-proto.h ../include/global.h \
+ ../include/moretypes.h kern.h symtab.h char.h ../include/font.h \
+ ../include/bitmap.h ../include/bounding-box.h ../include/tfm.h \
+ ../include/fix-num.h ../include/list.h realstrval.h main.h \
+ ../include/encoding.h
version.o: version.c
diff --git a/charspace/cmi.h b/charspace/cmi.h
index c51cad3..fa8378c 100644
--- a/charspace/cmi.h
+++ b/charspace/cmi.h
@@ -1,18 +1,73 @@
-typedef union
-{
+/* A Bison parser, made by GNU Bison 1.875. */
+
+/* Skeleton parser for Yacc-like parsing with Bison,
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* As a special exception, when this file is copied by Bison into a
+ Bison output file, you may use that output file without restriction.
+ This special exception was added by the Free Software Foundation
+ in version 1.24 of Bison. */
+
+/* Tokens. */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+ /* Put the tokens into the symbol table, so that GDB and other debuggers
+ know about them. */
+ enum yytokentype {
+ TR_CHAR = 258,
+ TR_CHAR_WIDTH = 259,
+ TR_CODINGSCHEME = 260,
+ TR_DEFINE = 261,
+ TR_FONTDIMEN = 262,
+ TR_KERN = 263,
+ T_IDENTIFIER = 264,
+ T_STRING = 265,
+ T_REAL = 266
+ };
+#endif
+#define TR_CHAR 258
+#define TR_CHAR_WIDTH 259
+#define TR_CODINGSCHEME 260
+#define TR_DEFINE 261
+#define TR_FONTDIMEN 262
+#define TR_KERN 263
+#define T_IDENTIFIER 264
+#define T_STRING 265
+#define T_REAL 266
+
+
+
+
+#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
+#line 37 "cmi.y"
+typedef union YYSTYPE {
real realval;
symval_type symval;
string strval;
} YYSTYPE;
-#define TR_CHAR 258
-#define TR_CHAR_WIDTH 259
-#define TR_CODINGSCHEME 260
-#define TR_DEFINE 261
-#define TR_FONTDIMEN 262
-#define TR_KERN 263
-#define T_IDENTIFIER 264
-#define T_STRING 265
-#define T_REAL 266
-
+/* Line 1248 of yacc.c. */
+#line 64 "cmi.h"
+# define yystype YYSTYPE /* obsolescent; will be withdrawn */
+# define YYSTYPE_IS_DECLARED 1
+# define YYSTYPE_IS_TRIVIAL 1
+#endif
extern YYSTYPE yylval;
+
+
+
diff --git a/charspace/main.c b/charspace/main.c
index 500c9a6..089b329 100644
--- a/charspace/main.c
+++ b/charspace/main.c
@@ -1,6 +1,6 @@
/* charspace -- find intercharacter spacing based on user information.
-Copyright (C) 1992 Free Software Foundation, Inc.
+Copyright (C) 1992, 2004 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -205,35 +205,35 @@ read_encoding_info (string user_name)
/* This is defined in version.c. */
extern string version_string;
-#define USAGE "Options:
-<font_name> should be a filename, possibly with a resolution, e.g.,
+#define USAGE "Options:\n\
+<font_name> should be a filename, possibly with a resolution, e.g.,\n\
`cmr10' or `cmr10.300'.\n" \
GETOPT_USAGE \
-"cmi-files <file1>,<file2>,...: read the CMI files
- `<file1>.<dpi>cmi', `<file2>.<dpi>cmi', etc., after reading
- `common.cmi'; default is `<font-name>.<dpi>cmi'. The <dpi>cmi is not
- appended to any of the <file>s which already have a suffix.
-dpi <unsigned>: use this resolution; default is 300.
-encoding <filename>: read ligature and other encoding information
- from <filename>.enc; there is no default. (A TFM file <font-name>.tfm
- is also read, if it exists.)
-fontdimens <fontdimen>:<real>,<fontdimen>:<real>,...: assign <value>
- to each <fontdimen> given, when outputting a TFM file. A <fontdimen>
- can be either one of the standard names (in either upper or
- lowercase), or a number between 1 and 30. Each <real> is taken to be
- in points (except in the case of the <fontdimen> `SLANT' (parameter
- 1), which is a dimensionless number).
-no-gf: don't output a GF file.
-output-file <filename>: write the TFM file to `<filename>.tfm' and the
- GF file to `<filename>.<dpi>gf'; <filename> shouldn't have a suffix;
- default is <font-name>.tfm and <font-name>.<dpi>gf, or, if those would
- overwrite the input, those preceded by `x'.
-range <char1>-<char2>: only process characters between <char1> and
- <char2>, inclusive.
-verbose: print brief progress reports on stdout.
-version: print the version number of this program.
-xheight-char <charcode>: use the height of this character as the
- default x-height (for the TFM output); default is 120 (ASCII `x').
+"cmi-files <file1>,<file2>,...: read the CMI files\n\
+ `<file1>.<dpi>cmi', `<file2>.<dpi>cmi', etc., after reading\n\
+ `common.cmi'; default is `<font-name>.<dpi>cmi'. The <dpi>cmi is not\n\
+ appended to any of the <file>s which already have a suffix.\n\
+dpi <unsigned>: use this resolution; default is 300.\n\
+encoding <filename>: read ligature and other encoding information\n\
+ from <filename>.enc; there is no default. (A TFM file <font-name>.tfm\n\
+ is also read, if it exists.)\n\
+fontdimens <fontdimen>:<real>,<fontdimen>:<real>,...: assign <value>\n\
+ to each <fontdimen> given, when outputting a TFM file. A <fontdimen>\n\
+ can be either one of the standard names (in either upper or\n\
+ lowercase), or a number between 1 and 30. Each <real> is taken to be\n\
+ in points (except in the case of the <fontdimen> `SLANT' (parameter\n\
+ 1), which is a dimensionless number).\n\
+no-gf: don't output a GF file.\n\
+output-file <filename>: write the TFM file to `<filename>.tfm' and the\n\
+ GF file to `<filename>.<dpi>gf'; <filename> shouldn't have a suffix;\n\
+ default is <font-name>.tfm and <font-name>.<dpi>gf, or, if those would\n\
+ overwrite the input, those preceded by `x'.\n\
+range <char1>-<char2>: only process characters between <char1> and\n\
+ <char2>, inclusive. \n\
+verbose: print brief progress reports on stdout.\n\
+version: print the version number of this program.\n\
+xheight-char <charcode>: use the height of this character as the\n\
+ default x-height (for the TFM output); default is 120 (ASCII `x').\n\
"
static string
diff --git a/configure.in b/configure.in
index d53b6ac..a1dbaf5 100644
--- a/configure.in
+++ b/configure.in
@@ -1,5 +1,5 @@
dnl Process this file with autoconf to produce a configure script.
-AC_INIT(limn/fit.c)
+AC_INIT(lib/spline.c)
dnl Write output here, instead of putting -D's on the command line.
AC_CONFIG_HEADER(include/c-auto.h)
diff --git a/data/ChangeLog b/data/ChangeLog
new file mode 100644
index 0000000..19658f9
--- /dev/null
+++ b/data/ChangeLog
@@ -0,0 +1,529 @@
+Sat Apr 6 07:42:05 1996 Kathy Hargreaves <letters@cs.umb.edu>
+
+ * itcdingbat.enc: no longer have to accommodate Adobe symbols
+ because they donated the font, so list the non-Adobe symbols as
+ they occur in the sample book.
+
+Fri Dec 29 07:21:58 1995 Kathy Hargreaves <kathy@cs.umb.edu>
+
+ * defs.make (CPPFLAGS): -I$(srcdir)/../include, not
+ -I../$(srcdir)/include.
+
+Mon Oct 16 09:24:40 1995 Kathy Hargreaves <karl@cs.umb.edu>
+
+ * itcdingbat.enc: added this.
+
+ * encoding.map: added itcdingbat -> ITC Zapf Dingbats.
+
+Thu Oct 12 10:42:31 1995 Karl Berry <karl@cs.umb.edu>
+
+ * defs.make (kpathsea_srcdir): Define this for the sake of the
+ dependencies.
+ (M.depend): Use -M and remove the /usr/include files.
+
+Sun Oct 8 07:53:33 1995 Karl Berry <karl@cs.umb.edu>
+
+ * defs.make (kpathsea): Prepend lib to the name.
+
+Sat Aug 7 12:01:46 1993 Karl Berry (karl@cs.umb.edu)
+
+ * defs.make (depend & M.depend): shorten.
+
+Tue Jul 27 09:03:52 1993 Karl Berry (karl@cs.umb.edu)
+
+ * defsprog.make (program): Depend on $(kpathsea).
+ * defs.make: Add definitions for kpathsea.
+
+Sun May 23 09:08:22 1993 Karl Berry (karl@cs.umb.edu)
+
+ * common.cmi (kern fk): Make relative to designsize.
+ (kern AV): Added.
+ (extraspace): Make half of shrink.
+
+ * gnulatin.enc (exclam, question): Add ligatures with ` leading to
+ ...down.
+
+Thu Apr 22 15:18:14 1993 Karl Berry (karl@cs.umb.edu)
+
+ * defs.make (%.o): Put $CFLAGS last.
+
+Mon Mar 22 06:26:35 1993 Karl Berry (karl@cs.umb.edu)
+
+ * defsprog.make (dist): Make the bison output here.
+ * defs.make (dist): Instead of here.
+
+Tue Mar 16 07:32:06 1993 Karl Berry (karl@cs.umb.edu)
+
+ * gnulatin.enc (ellipses): Correct to ellipsis.
+
+Fri Jan 1 14:30:16 1993 Karl Berry (karl@cs.umb.edu)
+
+ * defs.make (realclean): Don't remove M.depend. It causes too
+ much confusion when make tries to remake it.
+
+Sat Oct 31 08:18:24 1992 Karl Berry (karl@cs.umb.edu)
+
+ * texm{ext,sym,ital}.enc: New files.
+
+Wed Oct 28 15:10:12 1992 Karl Berry (karl@claude.cs.umb.edu)
+
+ * Vesion 0.6.
+
+ * defsprog.make (install): Make second arg a file, not a dir.
+
+Tue Oct 27 13:02:40 1992 Karl Berry (karl@cs.umb.edu)
+
+ * defs.make (dist): Make .c files from .y source.
+
+Mon Oct 19 08:05:34 1992 Karl Berry (karl@cs.umb.edu)
+
+ * ascii.enc: Remove trailing .notdef's.
+
+ * encoding.map (mflogo): New entry.
+ * mflogo.enc: New file.
+
+Sun Oct 4 11:31:42 1992 Karl Berry (karl@cs.umb.edu)
+
+ * ggmr.{ifi,1200cmi}: Make links here so we distribute these files
+ (even though we can't use the image they go with for legal reasons).
+
+Tue Sep 15 08:40:11 1992 Karl Berry (karl@hayley)
+
+ * defs.make (RANLIB): define as `@true', so it's silent.
+
+Fri Sep 4 08:42:42 1992 Karl Berry (karl@hayley)
+
+ * defs.make (extraclean): new target.
+
+Thu Sep 3 09:29:53 1992 Karl Berry (karl@hayley)
+
+ * Version 0.5.
+
+Wed Sep 2 16:03:00 1992 Karl Berry (karl@hayley)
+
+ * defsprog.make (TAGS): make unconditional, instead of depending
+ on source files.
+
+ * common.cmi: spelling fixes.
+
+Mon Aug 31 09:38:01 1992 Karl Berry (karl@hayley)
+
+ * defs.make (depend, objects): output the Bison dependencies first.
+
+Tue Aug 18 15:57:53 1992 Karl Berry (karl@hayley)
+
+ * defsprog.make (dist): don't look for *.PS.
+
+Tue Jul 28 14:49:36 1992 Karl Berry (karl@hayley)
+
+ * encoding.map (dvips): maps to afm2tfm's `TeX text + adobestdenc...'.
+
+Mon Jul 27 17:11:26 1992 Karl Berry (karl@hayley)
+
+ * defs.make (ourlibs, dlsym): use `../$(srcdir)'.
+
+Sun Jul 19 08:41:17 1992 Karl Berry (karl@hayley)
+
+ * defs.make (CPPFLAGS): remove the `..'.
+
+Thu Jul 16 17:24:38 1992 Karl Berry (karl@claude.cs.umb.edu)
+
+ * defs.make (depend): use `CPPFLAGS', `INCLUDES'.
+
+Mon Jul 13 17:06:13 1992 Karl Berry (karl@hayley)
+
+ * defs.make (CCFLAGS): forgot to change back to `CFLAGS'.
+
+Sun Jul 5 10:48:06 1992 Karl Berry (karl@hayley)
+
+ * defsprog.make (TAGS): use Bison sources to make the TAGS file,
+
+Thu Jul 2 16:39:58 1992 Karl Berry (karl@hayley)
+
+ * defs.make (CPPFLAGS): new variable.
+ (.c.o): use it.
+
+Mon Jun 29 09:08:43 1992 Karl Berry (karl@hayley)
+
+ * defs.make (%.o): new pattern rule to compile C source.
+ (CCFLAGS): rename from CFLAGS.
+
+Sun Jun 21 15:37:46 1992 Karl Berry (karl@io)
+
+ * defs.make (X_libraries): change -lXaw back to libXaw.a; still
+ loses with dynamic linking because of our FormWidget etc.
+
+Tue Jun 9 10:18:03 1992 Karl Berry (karl@hayley)
+
+ * defs.make (depend): make dependencies from Bison sources.
+
+Thu May 21 13:16:12 1992 Karl Berry (karl@hayley)
+
+ * defs.make (clean): remove dvi etc. files here.
+ (distclean): not here.
+
+ * defs.make (BISONFLAGS): remove -v.
+
+Mon May 18 17:40:34 1992 Karl Berry (karl@hayley)
+
+ * defslib.make: doc fix.
+
+ * defs.make (dist): new target.
+ (distdir): new variables.
+ * defsprog.make (dist): new target.
+
+Thu May 14 22:22:38 1992 Karl Berry (karl@claude.cs.umb.edu)
+
+ * defs.make (X_libraries): add dlsym.o.
+
+Fri May 8 15:58:53 1992 Karl Berry (karl@hayley)
+
+ * defs.make (*clean): change semantics again.
+
+Thu May 7 08:13:03 1992 Karl Berry (karl@hayley)
+
+ * defs.make (X_libraries): change back to -lXaw now that we can
+ link with the dlsym stuff.
+
+ * defs.make (TAGS): add dependencies on the source files; move to
+ defsprog.make.
+
+Wed May 6 09:17:30 1992 Karl Berry (karl@hayley)
+
+ * defs.make (XCFLAGS) [hayley]: set this to include -Wall.
+
+Sun Apr 19 10:41:25 1992 Karl Berry (karl@hayley)
+
+ * defs.make (mostlyclean): rm *.output.
+
+ * defs.make (distclean): new target, same as `realclean'.
+
+Wed Apr 15 13:38:18 1992 Karl Berry (karl@hayley)
+
+ * defs.make (YACC, YFLAGS): add these.
+ (realclean): remove the .c and .h files made from bison files.
+ (objects): add a .o for the yacc files.
+
+Tue Apr 14 13:33:26 1992 Karl Berry (karl@hayley)
+
+ * defs.make (realclean): make a :: rule.
+
+Wed Apr 8 14:14:58 1992 Karl Berry (karl@hayley)
+
+ * dvips.enc: character 32 is a space, not undefined.
+
+Mon Mar 30 09:31:38 1992 Karl Berry (karl at hayley)
+
+ * psymbol.enc: new file.
+
+Sat Mar 28 07:46:49 1992 Karl Berry (karl at hayley)
+
+ * Version 0.4.
+
+ * Change copyright years to 1992 only.
+
+Thu Mar 26 20:54:23 1992 Karl Berry (karl at claude.cs.umb.edu)
+
+ * defs.make (xlibdirslash): define this to work around dynamic
+ linking problems on the Sun.
+
+Sun Mar 8 12:54:14 1992 Karl Berry (karl at hayley)
+
+ * defsprog.make ($(program)): lose our_X_library.
+
+ * defs.make (mostlyclean): new target.
+ (clean): remove extra stuff.
+ (realclean): remove everything.
+ * defslibs.make (clean): change to mostlyclean.
+ * defsprog.make (clean): likewise.
+
+Sun Mar 8 08:43:21 1992 Karl Berry (karl at fosse)
+
+ * defs.make (CFLAGS): include XCFLAGS.
+ (XCFLAGS) [fosse]: define.
+
+Sat Mar 7 09:19:34 1992 Karl Berry (karl at hayley)
+
+ * defs.make: set CC for fosse.
+
+ * defs.make (sources, headers): define these.
+
+ * defs.make (ourlib): add lib here.
+ (fontutil_libraries, our_X_library): remove these.
+ (bitmap_libs): define this, for callers to use.
+ (librarytags): use $(libraries), remove stuff about X and pbm.
+
+Wed Mar 4 10:33:52 1992 Karl Berry (karl at hayley)
+
+ * defs.make (our_X_library): change `gnuw' to `widgets'.
+
+ * defs.make (headertags): remove; just use all of include/.
+ (librarytags): use all the libraries.
+
+ * defs.make (clean): remove TAGS here.
+ (realclean): not here.
+
+Sun Mar 1 13:02:31 1992 Karl Berry (karl at hayley)
+
+ * zdingbat.enc: new file.
+
+ * defslib.make ($(library).a): use ar q, not ar r.
+
+ * defs.make [need_pbm_library] (pbm_library): define.
+ (fontutil_libraries): include $(pbm_library).
+
+Fri Feb 28 16:06:54 1992 Karl Berry (karl at hayley)
+
+ * dvips.enc: new file.
+
+Sat Feb 22 12:52:16 1992 Karl Berry (karl at hayley)
+
+ * adobestd.enc: rename from standard.enc.
+
+Mon Feb 17 15:59:52 1992 Karl Berry (karl at hayley)
+
+ * postscript.map (cmtext): this is now named textext.
+
+ * defs.make (our_X_library): define this to be gnuw.
+ * defsprog.make (program): depend on $(our_X_library).
+
+Sun Feb 16 09:31:32 1992 Karl Berry (karl at hayley)
+
+ * defs.make (X_libraries): include gnuw.a here.
+ (ourlibs): not here.
+
+Tue Feb 11 10:14:18 1992 Karl Berry (karl at hayley)
+
+ * defs.make (X_libraries): append $(wlibs), add -l to each.
+ (syslibs): remove this.
+ (sys_libraries): rename to LIBS.
+ (LOADLIBES): include LIBS and X_libraries.
+ (copt): remove this.
+
+Mon Feb 10 09:39:54 1992 Karl Berry (karl at hayley)
+
+ * defs.make (CFLAGS): include copt.
+ [hayley]: define copt=-posix.
+
+Sat Feb 8 07:05:04 1992 Karl Berry (karl at hayley)
+
+ * defs.make ({extra_,}X_libraries): only define these if
+ `need_X_libraries' is defined.
+
+Thu Jan 9 07:55:08 1992 Karl Berry (karl at hayley)
+
+ * defslib.make (install): use `INSTALL_DATA' (except it's
+ commented out).
+ * defsprog.make (install): use `INSTALL_PROGRAM'.
+ * defs.make: rename `kbase' to `lib', remove `getopt', etc.
+
+Sun Nov 17 06:55:50 1991 Karl Berry (karl at hayley)
+
+ * postscript.map: don't refer to `postscript.c', since it's been
+ renamed to pstype3.c.
+
+Tue Jul 30 13:19:05 1991 Karl Berry (karl at ra.cs.umb.edu)
+
+ * Version 0.3.
+
+Fri Jul 19 09:11:07 1991 Karl Berry (karl at hayley)
+
+ * defs.make (XINCLUDES): remove this.
+ [hayley.fsf.org]: use XCFLAGS instead.
+
+ * *.make: change `fileinstall' to `INSTALLDATA' and `proginstall'
+ to `INSTALL'.
+
+Fri Jun 28 08:59:06 1991 Karl Berry (karl at hayley)
+
+ * defslib.make ($(library).a): remove the .a file before remaking it.
+
+Fri Jun 14 15:35:46 1991 Karl Berry (karl at hayley)
+
+ * defs.make (OPT, LDOPT): replace with XCFLAGS and XLDFLAGS.
+ (gnu): remove.
+ (LOADLIBES): rework so that our libraries aren't looked for in lib.
+ * defsprog.make ($(program)): redo the library dependencies.
+ * defslib.make (install): remove this target; the libraries don't
+ get installed anywhere anymore.
+
+Tue Jun 11 16:40:34 1991 Karl Berry (karl at hayley)
+
+ * defsprog.make (default): rename to `all'.
+
+ * defs.make (default): new dependency `all'.
+ (tags): rename to `TAGS'.
+ (webclean): delete.
+
+Sun Jun 9 13:44:07 1991 Karl Berry (karl at hayley)
+
+ * defs.make (proginstall, fileinstall): use -f for installation.
+
+Thu Jun 6 07:30:56 1991 Karl Berry (karl at hayley)
+
+ * *.make: change to version 2 of the GPL.
+
+Sat Apr 13 17:06:15 1991 Karl Berry (karl at hayley)
+
+ * cmtext.enc: rename to textext.enc.
+
+Mon Apr 8 08:34:13 1991 Karl Berry (karl at hayley)
+
+ * cmtext.enc: add ligatures.
+
+Sat Mar 30 03:54:14 1991 Karl Berry (karl at hayley)
+
+ * texlatin.enc: change `quoteright' to `caron', on the advice of
+ the linguists.
+
+Wed Mar 27 10:28:45 1991 Karl Berry (karl at hayley)
+
+ * texlatin.enc: change code 055 to `asciihyphen', and 0177 to
+ `hyphen'.
+
+Sun Mar 24 16:59:49 1991 Karl Berry (karl at hayley)
+
+ * texlatin.enc: new file.
+
+Thu Mar 7 07:33:13 1991 Karl Berry (karl at hayley)
+
+ * Version 0.2.
+
+Sat Feb 16 17:43:01 1991 Karl Berry (karl at hayley)
+
+ * defs.make (OS): remove this, since we use a configuration file
+ now.
+
+Mon Jan 7 09:20:23 1991 Karl Berry (karl at hayley)
+
+ * defs.make [HOSTNAME=hayley] (sys_libraries): do not include
+ cposix anymore; gcc is configured to do so automatically. [No,
+ rescind this, because of shared libraries gcc doesn't do this
+ anymore.]
+
+ * defs.make: doc fix.
+
+Wed Dec 12 15:49:27 1990 Karl Berry (karl at ra.cs.umb.edu)
+
+ * defs.make (OS): allow for SunOS 4.1.
+
+Fri Nov 23 09:45:16 1990 Karl Berry (karl at hayley)
+
+ * defs.make (research_libraries): add bzr.
+ (LOADLIBES): don't use `libraries'.
+
+Fri Oct 5 07:13:30 1990 Karl Berry (karl at hayley)
+
+ * defs.make (INCLUDES): use XINCLUDES to get extra directories
+ into the list.
+
+Mon Sep 24 16:40:17 1990 Karl Berry (karl at claude)
+
+ * defslib.make (install): remove the library after installing it.
+
+ * defs.make: use `SunOS41', not `SUNOS4'.
+
+Mon Sep 17 18:56:34 1990 Karl Berry (karl at aten)
+
+ * defs.make (gnu_libraries): only use malloc if I'm at home.
+
+Fri Sep 14 10:41:38 1990 Karl Berry (karl at hayley)
+
+ * defslib.make (install): use `libdir', not `researchdir'; use
+ `$(fileinstall)', not `mv'; use `$(AR)', not `ar'.
+ * defsprog.make (install): use `$(proginstall)', not `mv'.
+ * defs.make (researchdir): rename to libdir.
+
+
+Sat Sep 8 09:01:02 1990 Karl Berry (karl at hayley)
+
+ * defs.make: check the envvar HOSTNAME instead of HOSTTYPE.
+
+Fri Sep 7 13:43:18 1990 Karl Berry (karl at hayley)
+
+ * defs.make (LINT): remove this.
+
+Sat Aug 4 14:01:09 1990 Karl Berry (karl at hayley)
+
+ * defs.make (OPT) [i386]: define USG instead of USGr3, for the
+ sake of X.
+ (LDFLAGS): search /usr/local/lib.
+ (INCLUDES): search /usr/local/include.
+
+Fri Jul 13 16:52:35 1990 Karl Berry (karl at hayley)
+
+ * defsprog.make (library_files): compose list from both
+ $(libraries) and $(research_libraries), not just the former.
+
+Thu Jul 12 09:05:47 1990 Karl Berry (karl at hayley)
+
+ * defs.make (realclean): remove .dvi and .log files.
+
+Fri Jun 22 15:16:52 1990 Karl Berry (karl at hayley)
+
+ * defsprog.make ($(program)): make dependent on the libraries as
+ well as the objects.
+
+ * defs.make (CFLAGS, extra_X_libraries): make definitions depend
+ on whether we're running under system V (to make development
+ easier).
+
+Thu Jun 21 14:27:14 1990 Karl Berry (karl at claude)
+
+ * defs.make (default): define as a :: rule.
+ * defslib.make (default): define to be `install'.
+ * defsprog.make (default): define to be `$(program)', so the
+ program doesn't get installed by default.
+
+ * defs.make (LDFLAGS): use LDOPT, not LOPT.
+
+Mon Jun 4 15:40:00 1990 Karl Berry (karl at hayley)
+
+ * defs.make (load_libraries): change the name to $(LOADLIBES).
+ * defsprog.make: ($(program)): likewise.
+
+ * defs.make (LFLAGS): don't include $(OPT); instead, make a new
+ variable, $(LDOPT). Also, change the name to $(LDFLAGS).
+
+Sat Jun 2 16:09:22 1990 Karl Berry (karl at hayley)
+
+ * defs.make (link_libraries): add $(libraries) back in.
+
+Wed May 2 11:53:13 1990 Karl Berry (karl at claude)
+
+ * defslib.make (researchinstall): do mv -f, not just mv.
+
+Thu Apr 12 14:28:39 1990 Karl Berry (karl at hayley)
+
+ * defs.make: always link with the font libraries, since
+ kbase/font.c needs them.
+
+Wed Apr 4 16:45:36 1990 Karl Berry (karl at aten)
+
+ * defsprog.make: do mv -f, not just mv.
+
+Tue Apr 3 08:59:09 1990 Karl Berry (karl at hayley)
+
+ * defs.make: new variables `gnu_libraries', `X_libraries',
+ `extra_X_libraries', `sys_libraries', linked with in that order.
+
+Sun Mar 25 12:00:43 1990 Karl Berry (karl at aten)
+
+ * defs.make: don't define the `libraries' variable to be empty.
+
+Mon Nov 13 08:16:53 1989 Karl Berry (karl at hayley)
+
+ * defs.make (realclean): delete #* and *~, also.
+
+Mon Oct 30 19:18:40 1989 Karl Berry (karl at hayley)
+
+ * all files: add the copyleft.
+
+Tue Oct 10 10:05:53 1989 Karl Berry (karl at hayley)
+
+ * defs.make: delete the ifdef profile definitions, and define OPT,
+ which is included in CFLAGS and LFLAGS, instead. Now can say,
+ e.g., `make OPT=-pg', instead of `make profile=t'.
+
+ * defsprogram.make: rename this to defsprog.make, for the sake of
+ system V.
diff --git a/data/adobestd.enc b/data/adobestd.enc
new file mode 100644
index 0000000..8aa718d
--- /dev/null
+++ b/data/adobestd.enc
@@ -0,0 +1,258 @@
+% Adobe's standard encoding.
+Adobe standard
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+space
+exclam
+quotedbl
+numbersign
+dollar
+percent
+ampersand
+quoteright
+parenleft
+parenright
+asterisk
+plus
+comma
+hyphen
+period
+slash
+zero
+one
+two
+three
+four
+five
+six
+seven
+eight
+nine
+colon
+semicolon
+less
+equal
+greater
+question
+at
+A
+B
+C
+D
+E
+F
+G
+H
+I
+J
+K
+L
+M
+N
+O
+P
+Q
+R
+S
+T
+U
+V
+W
+X
+Y
+Z
+bracketleft
+backslash
+bracketright
+asciicircum
+underscore
+quoteleft
+a
+b
+c
+d
+e
+f
+g
+h
+i
+j
+k
+l
+m
+n
+o
+p
+q
+r
+s
+t
+u
+v
+w
+x
+y
+z
+braceleft
+bar
+braceright
+asciitilde
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+exclamdown
+cent
+sterling
+fraction
+yen
+florin
+section
+currency
+quotesingle
+quotedblleft
+guillemotleft
+guilsinglleft
+guilsinglright
+fi
+fl
+.notdef
+endash
+dagger
+daggerdbl
+periodcentered
+.notdef
+paragraph
+bullet
+quotesinglbase
+quotedblbase
+quotedblright
+guillemotright
+ellipsis
+perthousand
+.notdef
+questiondown
+.notdef
+grave
+acute
+circumflex
+tilde
+macron
+breve
+dotaccent
+dieresis
+.notdef
+ring
+cedilla
+.notdef
+hungarumlaut
+ogonek
+caron
+emdash
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+AE
+.notdef
+ordfeminine
+.notdef
+.notdef
+.notdef
+.notdef
+Lslash
+Oslash
+OE
+ordmasculine
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+ae
+.notdef
+.notdef
+.notdef
+dotlessi
+.notdef
+.notdef
+lslash
+oslash
+oe
+germandbls
+.notdef
+.notdef
+.notdef
+.notdef
diff --git a/data/ascii.enc b/data/ascii.enc
new file mode 100644
index 0000000..b92d2a7
--- /dev/null
+++ b/data/ascii.enc
@@ -0,0 +1,128 @@
+ASCII
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+space
+exclam
+quotedbl
+numbersign
+dollar
+percent
+ampersand
+quoteright
+parenleft
+parenright
+asterisk
+plus
+comma
+hyphen
+period
+slash
+zero
+one
+two
+three
+four
+five
+six
+seven
+eight
+nine
+colon
+semicolon
+less
+equal
+greater
+question
+at
+A
+B
+C
+D
+E
+F
+G
+H
+I
+J
+K
+L
+M
+N
+O
+P
+Q
+R
+S
+T
+U
+V
+W
+X
+Y
+Z
+bracketleft
+backslash
+bracketright
+asciicircum
+underscore
+quoteleft
+a
+b
+c
+d
+e
+f
+g
+h
+i
+j
+k
+l
+m
+n
+o
+p
+q
+r
+s
+t
+u
+v
+w
+x
+y
+z
+braceleft
+bar
+braceright
+asciitilde
diff --git a/data/common.cmi b/data/common.cmi
new file mode 100644
index 0000000..558549f
--- /dev/null
+++ b/data/common.cmi
@@ -0,0 +1,249 @@
+% common.cmi: typeface-independent definitions of character metric
+% information. The definitions for most of the upper and lowercase
+% letters are taken from Tracy. (See `charspace/README' for the
+% full citation.)
+
+% These default values for the spacing parameters are taken from the
+% definitions for the Computer Modern fonts.
+fontdimen quad designsize
+fontdimen space .333 quad
+fontdimen stretch .5 space
+fontdimen shrink .333 space
+fontdimen extraspace .5 shrink
+
+define leading 1.2 designsize
+fontdimen leadingheight .65 leading
+fontdimen leadingdepth .35 leading
+
+% Additional fontdimens to define:
+% slant (if nonzero),
+% defaultrulethickness,
+% version,
+% maybe xheight (defaults to the height of character 120 -- the `x', we hope),
+% and codingscheme, if no existing TFM.
+
+% This is used in the definitions for the numerals.
+define enspace .5 quad
+
+% Used below.
+%
+define half-H-sb .5 H-sb
+define three-quarters-H-sb .75 H-sb
+define slightly-less-H-sb .9 H-sb
+define one-and-half-H-sb 1.5 H-sb
+define slightly-less-twice-H-sb 1.9 H-sb
+define twice-H-sb 2 H-sb
+define thrice-H-sb 3 H-sb
+
+define two-thirds-O-sb .6666 O-sb
+define less-O-sb .8 O-sb
+define slightly-less-O-sb .9 O-sb
+define slightly-more-O-sb 1.1 O-sb
+define one-and-third-O-sb 1.33333 O-sb
+define one-and-three-quarters-O-sb 1.75 O-sb
+define slightly-less-twice-O-sb 1.9 O-sb
+define twice-O-sb 2 O-sb
+
+define minus-one-and-quarter-n-lsb -1.25 n-lsb
+define minus-n-lsb -1 n-lsb
+define slightly-more-n-lsb 1.1 n-lsb
+define one-and-quarter-n-lsb 1.25 n-lsb
+
+define more-half-n-rsb .6 n-rsb
+define one-and-half-n-rsb 1.5 n-rsb
+
+define half-o-sb .5 o-sb
+define slightly-less-o-sb .9 o-sb
+define slightly-more-o-sb 1.1 o-sb
+define one-and-half-o-sb 1.5 o-sb
+
+define minus-uc-min-sb -1 uc-min-sb
+
+define minus-lc-min-sb -1 lc-min-sb
+define twice-lc-min-sb 2 lc-min-sb
+
+
+
+% Uppercase uses: uc-min-sb, H-sb, O-sb, and some above definitions:
+char A uc-min-sb , uc-min-sb
+char B H-sb , half-H-sb
+char C O-sb , half-H-sb
+char D H-sb , O-sb
+char E H-sb , half-H-sb
+char F H-sb , half-H-sb
+char G O-sb , slightly-less-H-sb
+char H H-sb , H-sb
+char I H-sb , H-sb
+char J uc-min-sb , H-sb
+char K H-sb , uc-min-sb
+char L H-sb , uc-min-sb
+char M slightly-less-H-sb , H-sb
+char N slightly-less-H-sb , slightly-less-H-sb
+char O O-sb , O-sb
+char P H-sb , O-sb
+char Q O-sb , O-sb
+char R H-sb , uc-min-sb
+char T uc-min-sb , uc-min-sb
+char U H-sb , slightly-less-H-sb
+char V uc-min-sb , uc-min-sb
+char W uc-min-sb , uc-min-sb
+char X uc-min-sb , uc-min-sb
+char Y uc-min-sb , uc-min-sb
+char Z half-H-sb , half-H-sb
+
+% Lowercase uses: lc-min-sb, n-lsb, o-sb, n-rsb, and some above definitions:
+
+char b n-lsb , o-sb
+char c o-sb , slightly-less-o-sb
+char d o-sb , n-lsb
+char e o-sb , slightly-less-o-sb
+char h slightly-more-n-lsb , n-rsb
+char i slightly-more-n-lsb , n-lsb
+char dotlessi slightly-more-n-lsb , n-lsb
+char j n-lsb , n-lsb
+char dotlessj n-lsb , n-lsb
+char k slightly-more-n-lsb , lc-min-sb
+char l slightly-more-n-lsb , n-lsb
+char m n-lsb , n-rsb
+char n n-lsb , n-rsb
+char o o-sb , o-sb
+char p slightly-more-n-lsb , o-sb
+char q o-sb , n-lsb
+char r n-lsb , lc-min-sb
+char germandbls H-sb , half-H-sb
+char u n-rsb , n-rsb
+char v lc-min-sb , lc-min-sb
+char w lc-min-sb , lc-min-sb
+char x lc-min-sb , lc-min-sb
+char y lc-min-sb , lc-min-sb
+
+% Tracy-like guesses.
+char oslash slightly-more-o-sb , slightly-more-o-sb
+char Delta uc-min-sb , uc-min-sb
+char Oslash O-sb , O-sb
+char Gamma H-sb , uc-min-sb
+char Pi H-sb , H-sb
+char OE O-sb , half-H-sb
+char AE uc-min-sb , half-H-sb
+char ae n-rsb , slightly-less-o-sb
+char oe o-sb , slightly-less-o-sb
+char ff twice-lc-min-sb , lc-min-sb
+char fi twice-lc-min-sb , n-lsb
+char fl twice-lc-min-sb , n-lsb
+char ffi twice-lc-min-sb , n-lsb
+char ffl twice-lc-min-sb , n-lsb
+
+% Non-Tracy guesses.
+char a n-lsb , n-rsb
+char f twice-lc-min-sb , lc-min-sb
+char g twice-lc-min-sb , twice-lc-min-sb
+char s more-half-n-rsb , n-lsb
+char t twice-lc-min-sb , lc-min-sb
+char z twice-lc-min-sb , one-and-quarter-n-lsb
+char ampersand half-H-sb , O-sb
+char asciihyphen 0 , H-sb
+char asterisk slightly-more-O-sb , one-and-third-O-sb
+char emdash minus-uc-min-sb , minus-lc-min-sb
+char endash minus-lc-min-sb , 0
+char hyphen 0 , H-sb
+char polishcross uc-min-sb , uc-min-sb
+char Lambda uc-min-sb , uc-min-sb
+char Omega two-thirds-O-sb , slightly-less-O-sb
+char Xi half-H-sb , three-quarters-H-sb
+
+% (These maybe should be the same as `O', as they are in cmr.)
+char Phi three-quarters-H-sb , H-sb
+char Psi three-quarters-H-sb , H-sb
+char S three-quarters-H-sb , H-sb
+char Sigma three-quarters-H-sb , H-sb
+char Theta three-quarters-H-sb , H-sb
+char Upsilon three-quarters-H-sb , H-sb
+char at three-quarters-H-sb , H-sb
+char dollar three-quarters-H-sb , H-sb
+char sterling three-quarters-H-sb , H-sb
+char slash three-quarters-H-sb , H-sb
+char equal three-quarters-H-sb , H-sb
+char percent three-quarters-H-sb , H-sb
+char numbersign three-quarters-H-sb , H-sb
+char plus three-quarters-H-sb , H-sb
+
+char parenleft one-and-three-quarters-O-sb , H-sb
+char parenright slightly-less-O-sb , twice-O-sb
+
+char quoteleft one-and-third-O-sb , uc-min-sb
+char quoteright uc-min-sb , one-and-half-H-sb
+char quotedblleft twice-H-sb , H-sb
+char quotedblright H-sb , twice-H-sb
+
+char comma lc-min-sb , lc-min-sb
+char semicolon one-and-half-H-sb , one-and-three-quarters-O-sb
+char colon one-and-half-H-sb , slightly-less-twice-O-sb
+char period lc-min-sb , lc-min-sb
+
+char exclam one-and-half-H-sb , slightly-less-twice-O-sb
+char exclamdown one-and-half-H-sb , slightly-less-twice-O-sb
+
+char question three-quarters-H-sb , H-sb
+char questiondown three-quarters-H-sb , H-sb
+
+char bracketleft slightly-less-twice-H-sb , uc-min-sb
+char bracketright lc-min-sb , twice-H-sb
+
+% Accents.
+char macron 0 , 0
+char tilde 0 , 0
+char dotaccents 0 , 0
+char breve 0 , 0
+char dieresis 0 , 0
+char grave 0 , 0
+char caron 0 , 0
+char circumflex 0 , 0
+char hungarumlaut 0 , 0
+char cedilla 0 , 0
+char acute 0 , 0
+char ring 0 , 0
+
+% Old style numerals.
+
+char zerooldstyle O-sb , slightly-less-O-sb
+char oneoldstyle O-sb , slightly-less-O-sb
+char twooldstyle uc-min-sb , O-sb
+char threeoldstyle uc-min-sb , one-and-third-O-sb
+char fouroldstyle lc-min-sb , slightly-less-H-sb
+char fiveoldstyle uc-min-sb , H-sb
+char sixoldstyle slightly-less-O-sb , slightly-more-n-lsb
+char sevenoldstyle uc-min-sb , H-sb
+char eightoldstyle slightly-more-n-lsb , slightly-less-O-sb
+char nineoldstyle slightly-less-o-sb , one-and-half-H-sb
+
+% Numerals are typically defined to have the same set widths, so tables
+% can be printed easily. Since the side bearings will vary depending on
+% the character shapes, we just define them symbolically here.
+
+define numeral-width enspace
+define zero-lsb-percent .5
+define one-lsb-percent .6
+define two-lsb-percent .45
+define three-lsb-percent .5
+define four-lsb-percent .5
+define five-lsb-percent .4
+define six-lsb-percent .5
+define seven-lsb-percent .55
+define eight-lsb-percent .5
+define nine-lsb-percent .5
+
+char-width zero numeral-width , zero-lsb-percent
+char-width one numeral-width , one-lsb-percent
+char-width two numeral-width , two-lsb-percent
+char-width three numeral-width , three-lsb-percent
+char-width four numeral-width , four-lsb-percent
+char-width five numeral-width , five-lsb-percent
+char-width six numeral-width , six-lsb-percent
+char-width seven numeral-width , seven-lsb-percent
+char-width eight numeral-width , eight-lsb-percent
+char-width nine numeral-width , nine-lsb-percent
+
+% Kerns.
+
+kern f k .01 designsize
+kern A V -.01 designsize
diff --git a/data/defs.make b/data/defs.make
new file mode 100644
index 0000000..5f38968
--- /dev/null
+++ b/data/defs.make
@@ -0,0 +1,144 @@
+# Common definitions for Makefiles in this directory hierarchy.
+#
+# Copyright (C) 1992, 2004 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+
+# A GNUmakefile in this hierarchy should first include this file, and
+# then include either `defsprog.make' or `defslib.make', as appropriate.
+# Dependencies are created by `make depend', which writes onto the file
+# `M.depend'. A Makefile should include that, also, at its end.
+
+
+# These variables are used only when the top-level Makefile is not.
+CC = gcc
+CFLAGS = -g
+LDFLAGS = $(XLDFLAGS)
+LIBS = -lm
+RANLIB = ranlib
+srcdir = .
+
+# Here is the rule to make `foo.o' from `foo.c'. We want CFLAGS to be
+# user-settable, so we can't use the default implicit rule.
+kpathsea_srcdir = ../../kpathsea
+CPPFLAGS = $(DEFS) -I$(kpathsea_parent) -I$(srcdir)/../include $(xincludedir)
+%.o: %.c
+ $(CC) $(CPPFLAGS) $(CFLAGS) -c $<
+
+# Here is the rule to make `foo.c' from `foo.y' using Bison.
+# (GNU make's default rule assumes $(YACC) outputs y.tab.c.)
+# We always use Bison, not Yacc.
+BISON = bison
+BISONFLAGS = -d -t
+%.c %.h: %.y
+ $(BISON) $(BISONFLAGS) $< -o $*.c
+
+# Libraries to support bitmap font formats. Defined just so the main
+# Makefiles can use $(bitmap_libs), in case we ever add more formats.
+bitmap_libs = gf pk
+
+# If the caller wants our widgets, they also want the other X libraries.
+# On SunOS 4.1, dynamic linking with -lXaw fails: formWidgetClass and
+# the other X widgets in ../widgets are multiply defined. I don't
+# understand why the entire library file is pulled in with dynamic linking.
+#
+ifneq "$(findstring widgets, $(libraries))" ""
+dlsym = ../$(srcdir)/lib/dlsym.o
+X_sys_libraries = -lXaw -lXmu -lXext -lXt -lX11
+X_libraries = -static $(xlibdir) $(X_sys_libraries) $(dlsym) $(wlibs)
+endif
+
+# Compose the entire list of libraries from the defined `libraries'. We
+# always add `lib' at the beginning and the end, since everything uses that.
+ourlibs := $(foreach lib,lib $(libraries) lib,../$(srcdir)/$(lib)/$(lib).a)
+
+# This is what we will link with.
+LOADLIBES = $(ourlibs) $(X_libraries) $(LIBS)
+
+kpathsea_parent = ../..
+kpathsea_dir = $(kpathsea_parent)/kpathsea
+kpathsea = $(kpathsea_dir)/libkpathsea.a
+
+# Make the list of object files, headers, and sources. The headers only
+# matter for tags.
+sources := $(addsuffix .c, $(c_and_h) $(c_only))
+headers := $(addsuffix .h, $(c_and_h) $(h_only))
+objects := $(addsuffix .o, $(basename $(y) $(sources)))
+
+# The real default target is in either defslib.make or defsprog.make.
+default: all
+.PHONY: default
+
+# Make the dependency file.
+#
+# We don't depend on `$(sources)' because most changes to the sources don't
+# change the dependencies.
+#
+# We assume at most one Bison source per directory here. We also assume
+# GCC 2 for generating the dependencies of the Bison-generated C file.
+# Put the Bison stuff first in the dependency file, since typically lots
+# of other files depend on the Bison .h files.
+M.depend depend:
+ rm -f M.depend
+ test -z "$(y)" || DEPENDENCIES_OUTPUT="M.depend $(y).o" \
+ gcc -x c-header -E $(CPPFLAGS) $(y).y > /dev/null
+ $(CC) -M $(CPPFLAGS) $(sources) \
+ | sed -e 's,\(\.\./\)\+kpathsea/,$$(kpathsea_srcdir)/,g' \
+ -e 's,/usr[^ ]* ,,g' \
+ -e 's,/usr[^ ]*$$,,g' \
+ | grep -v '^ *\\$$' \
+ >> M.depend
+.PHONY: depend
+
+# When `make dist' is called from above, we expect $(dir) to be set to
+# the directory in which we're currently making.
+distdir = ../$(top_distdir)/$(dir)
+
+# We use `find' instead of just `ln *.c *.h' here because not all
+# directories have .c and .h files.
+dist::
+ mkdir $(distdir)
+ ln ChangeLog GNUmakefile M.depend README $(distdir)
+ find \( -name \*.c -o -name \*.h \) -exec ln '{}' $(distdir)/'{}' \;
+.PHONY: dist
+
+# Prevent GNU make version 3 from overflowing system V's arg limit.
+.NOEXPORT:
+
+mostlyclean::
+# Remove most files.
+ rm -f $(objects) *.output
+.PHONY: mostlyclean
+
+clean:: mostlyclean
+# Remove all files that are made by `make all', etc.
+ rm -f *.dvi *.log *.ps core
+.PHONY: clean
+
+distclean:: clean
+# Delete all files that users would normally create from compilation and
+# installation.
+.PHONY: distclean
+
+extraclean:: distclean
+# Delete anything likely to be found in the source directory
+# that shouldn't be in the distribution.
+ rm -f *.tfm *gf *pk *.bzr *~ *\#* patch* *.orig *.rej
+
+realclean:: distclean
+# Remove all files that can be remade with `make'.
+ rm -f TAGS $(addsuffix .c, $(y)) $(addsuffix .h, $(y))
+.PHONY: realclean
diff --git a/data/defslib.make b/data/defslib.make
new file mode 100644
index 0000000..363b22d
--- /dev/null
+++ b/data/defslib.make
@@ -0,0 +1,36 @@
+# Additional definitions for library directories, to be included after
+# defs.make and the definitions of $(sources) and $(library).
+#
+# Copyright (C) 1992, 2004 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+all: $(library).a
+
+# Do not install the libraries anywhere.
+install: $(library).a
+# $(INSTALL_DATA) $(library).a $(libdir)/lib$(library).a
+
+$(library).a: $(objects)
+ rm -f $(library).a
+ $(AR) qc $(library).a $(objects)
+# for o in $(objects); \
+# do \
+# $(AR) qv $(library).a $${o}; \
+# done
+# $(RANLIB) $(library).a
+
+mostlyclean::
+ rm -f $(library).a
diff --git a/data/defsprog.make b/data/defsprog.make
new file mode 100644
index 0000000..0650913
--- /dev/null
+++ b/data/defsprog.make
@@ -0,0 +1,47 @@
+# Additional definitions for programs, to be included after defs.make
+# and the definitions of $(sources) and $(program).
+#
+# Copyright (C) 1992, 2004 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+all: $(program)
+
+install:: $(program)
+ $(INSTALL_PROGRAM) $(program) $(bindir)/$(program)
+
+# Make sure all the libraries this program needs are built.
+$(program): $(objects) $(ourlibs) #$(kpathsea)
+ $(CC) -o $(program) $(LDFLAGS) $(objects) $(LOADLIBES)
+
+# Make a TAGS file for Emacs.
+librarytags := $(patsubst %,../%/*.[hc], $(libraries) lib)
+TAGS:
+ etags -t $(headers) $(sources) $(addsuffix .y, $(y))
+ etags -ta ../include/*.h
+ etags -ta $(librarytags)
+#
+# Even though etags does create a file named `TAGS', call it .PHONY so
+# that the rules will always be run, since we don't list all the dependencies.
+.PHONY: TAGS
+
+# Program directories have additional files to distribute.
+dist::
+ ln .gdbinit TAGS $(distdir)
+ if test -n "$(y)"; then $(MAKE) $(y).c; fi
+ find \( -name \*.y \) -exec ln '{}' $(distdir)/'{}' \;
+
+mostlyclean::
+ rm -f $(program)
diff --git a/data/dingbat-gs-run b/data/dingbat-gs-run
new file mode 100644
index 0000000..b15ce94
--- /dev/null
+++ b/data/dingbat-gs-run
@@ -0,0 +1,2 @@
+gs
+(/u/local/gnu/src/prfont.ps)run
diff --git a/data/dvips.enc b/data/dvips.enc
new file mode 100644
index 0000000..888e635
--- /dev/null
+++ b/data/dvips.enc
@@ -0,0 +1,311 @@
+% The default encoding produced by the afm2tfm program that comes with
+% the dvips distribution, when it is applied to a StandardEncoding
+% PostScript font: almost upward-compatible with TeX text. (The
+% exceptions are the dot accent and Hungarian umlaut.)
+%
+% Some of the ligatures are in different positions, but this is not
+% important, since ligature positions are defined in the TFM file, not
+% by macros.
+%
+% You can get dvips by ftp from labrea.stanford.edu.
+%
+dvips
+
+% 0x0
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+
+% 0x8
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+quotesingle
+exclamdown
+questiondown
+
+% 0x10
+dotlessi
+.notdef
+grave
+acute
+caron
+breve
+macron
+ring
+
+% 0x18
+cedilla
+germandbls
+ae
+oe
+oslash
+AE
+OE
+Oslash
+
+% 0x20
+space
+exclam lig ` =: 016
+quotedbl
+numbersign
+dollar
+percent
+ampersand
+quoteright lig ' =: 0272
+
+% 0x28
+parenleft
+parenright
+asterisk
+plus
+comma
+hyphen lig - =: 0261
+period
+slash
+
+% 0x30
+zero
+one
+two
+three
+four
+five
+six
+seven
+
+% 0x38
+eight
+nine
+colon
+semicolon
+less
+equal
+greater
+question lig ` =: 017
+
+% 0x40
+at
+A
+B
+C
+D
+E
+F
+G
+
+% 0x48
+H
+I
+J
+K
+L
+M
+N
+O
+
+% 0x50
+P
+Q
+R
+S
+T
+U
+V
+W
+
+% 0x58
+X
+Y
+Z
+bracketleft
+backslash
+bracketright
+circumflex
+underscore
+
+% 0x60
+quoteleft lig ` =: 0252
+a
+b
+c
+d
+e
+f lig i =: 0256 lig l =: 0257
+g
+
+% 0x68
+h
+i
+j
+k
+l
+m
+n
+o
+
+% 0x70
+p
+q
+r
+s
+t
+u
+v
+w
+
+% 0x78
+x
+y
+z
+braceleft
+bar
+braceright
+tilde
+dieresis
+
+% 0x80
+% this is different now!
+zcaron
+ydieresis
+ugrave
+udieresis
+ucircumflex
+uacute
+scaron
+otilde
+
+ograve
+odieresis
+ocircumflex
+oacute
+ntilde
+igrave
+idieresis
+icircumflex
+
+iacute
+egrave
+edieresis
+ecircumflex
+eacute
+ccedilla
+atilde
+aring
+
+agrave
+adieresis
+acircumflex
+aacute
+Zcaron
+Ydieresis
+Ugrave
+Udieresis
+
+Ucircumflex
+Uacute
+cent
+sterling
+fraction
+yen
+florin
+section
+
+currency
+Scaron
+quotedblleft
+guillemotleft
+guilsinglleft
+guilsinglright
+fi
+fl
+
+Otilde
+endash lig - =: 0320
+dagger
+daggerdbl
+periodcentered
+Ograve
+paragraph
+bullet
+
+quotesinglbase
+quotedblbase
+quotedblright
+guillemotright
+ellipsis
+perthousand
+Odieresis
+Ocircumflex
+
+Oacute
+Ntilde
+Igrave
+Idieresis
+Icircumflex
+Iacute
+Egrave
+dotaccent
+
+Edieresis
+Ecircumflex
+Eacute
+Ccedilla
+Atilde
+hungarumlaut
+ogonek
+Aring
+
+emdash
+Agrave
+Adieresis
+Acircumflex
+Aacute
+asciitilde
+asciicircum
+.notdef
+
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+
+.notdef
+.notdef
+.notdef
+ordfeminine
+.notdef
+.notdef
+.notdef
+.notdef
+
+Lslash
+.notdef
+.notdef
+ordmasculine
+.notdef
+.notdef
+.notdef
+.notdef
+
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+
+lslash
diff --git a/data/encoding.map b/data/encoding.map
new file mode 100644
index 0000000..9c64273
--- /dev/null
+++ b/data/encoding.map
@@ -0,0 +1,16 @@
+% This file is used by the function `coding_scheme_to_filename' in
+% `lib/encoding.c' to find a default encoding file, based on the
+% CODINGSCHEME string in the TFM file.
+
+adobestd Adobe standard
+ascii ASCII
+dvips dvips
+dvips TeX text + adobestandardencoding
+gnulatin GNU Latin text
+gnulcomp GNU Latin text complement
+mflogo AEFMNOT only
+psymbol PostScript Symbol
+texlatin Extended TeX Latin
+textext TeX text
+zdingbat Zapf Dingbats
+itcdingbat ITC Zapf Dingbats
diff --git a/data/ggmr.1200cmi b/data/ggmr.1200cmi
new file mode 100644
index 0000000..1baade3
--- /dev/null
+++ b/data/ggmr.1200cmi
@@ -0,0 +1,17 @@
+% Charspace input for page 42/Atlas of Typeforms Garamond roman.
+
+codingscheme "GNU Latin text"
+fontdimen defaultrulethickness 1
+fontdimen version 0
+
+% Control letters.
+define H-sb 23
+define O-sb 21
+define n-lsb 14
+define n-rsb 15
+define o-sb 13
+
+% Minumum sidebearings.
+define uc-min-sb 7
+define lc-min-sb 3
+
diff --git a/data/ggmr.ifi b/data/ggmr.ifi
new file mode 100644
index 0000000..43add56
--- /dev/null
+++ b/data/ggmr.ifi
@@ -0,0 +1,102 @@
+% Garamond roman -- basic characters.
+% Source: Atlas of Typeforms, page 42.
+% Original design size is 30pt, but that looks too small to us.
+%
+% -designsize=26
+% -baselines=121,130,120
+%
+% Actually, we can't use this image, because this is a Monotype font,
+% and Monotype is a British company, and Britain has a retroactive type
+% protection law. (See the `Legal issues' section of the manual.)
+%
+A 3 % to -1
+B 2 % to -1
+C 3 % to -5
+D -6 % to -1
+E -2 % to -1
+F -3 % to -1
+G
+H -2 % to -1
+I 1 % to -1
+J
+K -3 % to -1
+L -1 % to -1
+.notdef
+M 1 % to -1
+.notdef % a one-pixel blot
+N
+O -2 % to -5
+P -5 % to -1
+Q
+R -1 % to -1
+S -3 % to -5
+T -1 % to -1
+U
+V
+W
+X -4 % to -1
+Y -1 % to -1
+Z -4 % to -1
+a
+b
+c
+d
+e
+.notdef
+.notdef
+.notdef
+f -4 % to 0
+g
+h
+i 3 2 % to 0
+j 0 2
+k
+l -6 % to 0
+m
+n -2 % to 0
+o
+p
+q
+r 6 % to 0
+s
+t
+u -5 % to -7
+v
+w
+x 1 % to 0
+y
+z -1 % to 0
+ae -2 % ae (decimal 241), to -7
+oe 2 % oe (250)
+ff -3 % ff (176), to 0
+fi -1 % fi (174), to 0
+.notdef
+fl % fl (175)
+ffi % ffi (214)
+ffl 3 % ffl (215), to 0
+.notdef
+ampersand
+AE 2 % AE (225), to -1
+OE 1 % OE (234), to -1
+sterling % sterling (163)
+oneoldstyle -1 % to zero
+twooldstyle -3 % to zero
+threeoldstyle
+fouroldstyle
+fiveoldstyle
+sixoldstyle -1 % to -5
+sevenoldstyle -1 % to -109 (like 3)
+eightoldstyle
+nineoldstyle 1 % to -121 (like 5)
+zerooldstyle -3
+period 5
+comma
+semicolon 8 2 % to -75 (like ,)
+colon 4 2 % to -5
+asciihyphen
+exclam 2 2 % to -5
+question 4 2 % to -5
+quoteleft -1 % to make the tops at 231
+quoteright
+parenleft
+parenright 1 % to make the tops at 330
diff --git a/data/gnulatin.enc b/data/gnulatin.enc
new file mode 100644
index 0000000..45b5d63
--- /dev/null
+++ b/data/gnulatin.enc
@@ -0,0 +1,324 @@
+% The GNU latin text font encoding scheme, as developed by Karl Berry
+% and Kathy Hargreaves on 31 December 91.
+GNU Latin text
+
+% 0x0
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+
+% 0x8
+bullet % Standard 267
+dagger % Standard 262
+daggerdbl % Standard 263
+ff lig i =: 016 lig l =: 017 % TeX Text
+fi % TeX Text
+fl % TeX Text
+ffi % TeX Text
+ffl % TeX Text
+
+% 0x10
+quotedblleft % Extended TeX Latin
+quotedblright % Extended TeX Latin
+guilsinglleft % Standard 0254
+guilsinglright % Standard 0255
+quotesinglbase % Standard 0270
+endash lig - =: 026 % Extended TeX Latin
+emdash % Extended TeX Latin
+compoundwordmark % Extended TeX Latin (non-Adobe name)
+
+% 0x18
+zerolowered % Extended TeX Latin (non-Adobe name)
+threequartersemdash % Expert 075
+quotesingle % Standard 0251 (foot mark)
+oe % TeX Text
+quotedblbase % Standard 0271
+perthousand % Standard 0275
+OE % TeX Text
+florin % Standard 0246
+
+% 0x20
+space
+exclam lig ` =: 0xa1 % !` -> exclamdown
+quotedbl
+numbersign
+dollar
+percent
+ampersand
+quoteright lig ' =: 021
+
+% 0x28
+parenleft
+parenright
+asterisk
+plus
+comma
+asciihyphen lig - =: 025
+period
+slash
+
+% 0x30
+zero
+one
+two
+three
+four
+five
+six
+seven
+
+% 0x38
+eight
+nine
+colon
+semicolon
+less
+equal
+greater
+question lig ` =: 0277 % ?` -> questiondown
+
+% 0x40
+at
+A
+B
+C
+D
+E
+F
+G
+
+% 0x48
+H
+I
+J
+K
+L
+M
+N
+O
+
+% 0x50
+P
+Q
+R
+S
+T
+U
+V
+W
+
+% 0x58
+X
+Y
+Z
+bracketleft
+backslash
+bracketright
+asciicircum
+underscore
+
+% 0x60
+quoteleft lig ` =: 020 % `` => opening double quote char
+a
+b
+c
+d
+e
+f lig f =: 013 lig i =: 014 lig l =: 015
+g
+
+% 0x68
+h
+i
+j
+k
+l
+m
+n
+o
+
+% 0x70
+p
+q
+r
+s
+t
+u
+v
+w
+
+% 0x78
+x
+y
+z
+braceleft
+bar
+braceright
+asciitilde
+fraction % Standard 244
+
+% 0x80
+zerooldstyle % Expert 060
+oneoldstyle % Expert 061
+twooldstyle % Expert 062
+threeoldstyle % Expert 063
+fouroldstyle % Expert 064
+fiveoldstyle % Expert 065
+sixoldstyle % Expert 066
+sevenoldstyle % Expert 067
+
+% 0x88
+eightoldstyle % Expert 070
+nineoldstyle % Expert 071
+Lslash % TeX Text
+lslash % non-Adobe name
+ij % Extended TeX Latin 0274 (non-Adobe name)
+Eng % Extended TeX Latin (non-Adobe name)
+eng % Extended TeX Latin 0255 (non-Adobe name)
+SS % Extended TeX Latin 0337 (non-Adobe name)
+
+% 0x90
+dotlessi
+grave
+colonmonetary % Expert 173
+circumflex
+tilde
+ellipsis % Standard 0274
+breve
+dotaccent
+
+% 0x98
+dotlessj % TeX Text 021 (non-Adobe name)
+ % (Adobe replicated ISO dieresis 230)
+dbar % Extended TeX Latin 0236 (non-Adobe name)
+ring
+cedilla % Standard 0313
+IJ % Extended TeX Latin 0234 (non-Adobe name)
+hungarumlaut
+ogonek
+caron
+
+% 0xa0
+nobreakspace % (non-Adobe name)
+exclamdown
+cent
+sterling
+currency
+yen
+brokenbar
+section
+
+% 0xa8
+dieresis
+copyright
+ordfeminine
+guillemotleft
+logicalnot
+hyphen
+registered
+macron
+
+% 0xb0
+degree
+plusminus
+twosuperior
+threesuperior
+acute
+mu
+paragraph
+periodcentered
+
+% 0xb8
+cedilla
+onesuperior
+ordmasculine
+guillemotright
+onequarter
+onehalf
+threequarters
+questiondown
+
+% 0xc0
+Agrave
+Aacute
+Acircumflex
+Atilde
+Adieresis
+Aring
+AE
+Ccedilla
+
+% 0xc8
+Egrave
+Eacute
+Ecircumflex
+Edieresis
+Igrave
+Iacute
+Icircumflex
+Idieresis
+
+% 0xd0
+Eth
+Ntilde
+Ograve
+Oacute
+Ocircumflex
+Otilde
+Odieresis
+multiply
+
+% 0xd8
+Oslash
+Ugrave
+Uacute
+Ucircumflex
+Udieresis
+Yacute
+Thorn
+germandbls
+
+% 0xe0
+agrave
+aacute
+acircumflex
+atilde
+adieresis
+aring
+ae
+ccedilla
+
+% 0xe8
+egrave
+eacute
+ecircumflex
+edieresis
+igrave
+iacute
+icircumflex
+idieresis
+
+% 0xf0
+eth
+ntilde
+ograve
+oacute
+ocircumflex
+otilde
+odieresis
+divide
+
+% 0xf8
+oslash
+ugrave
+uacute
+ucircumflex
+udieresis
+yacute
+thorn
+ydieresis
diff --git a/data/gnulcomp.enc b/data/gnulcomp.enc
new file mode 100644
index 0000000..0f81e74
--- /dev/null
+++ b/data/gnulcomp.enc
@@ -0,0 +1,294 @@
+% The GNU latin text complement font encoding scheme, as developed by
+% Karl Berry and Kathy Hargreaves on 7 January 92.
+GNU Latin text complement
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+%
+zerofitted % non-Adobe name
+onefitted
+twofitted % non-Adobe name
+threefitted % non-Adobe name
+fourfitted % non-Adobe name
+fivefitted % non-Adobe name
+sixfitted % non-Adobe name
+sevenfitted % non-Adobe name
+%
+eightfitted % non-Adobe name
+ninefitted % non-Adobe name
+Abreve % Extended TeX Latin 0200 (non-Adobe name)
+Aogonek % Extended TeX Latin 0201 (non-Adobe name)
+CAcute % Extended TeX Latin 0202 (non-Adobe name)
+Ccaron % Extended TeX Latin 0203 (non-Adobe name)
+Ecaron % Extended TeX Latin 0205 (non-Adobe name)
+Eogonek % Extended TeX Latin 0206 (non-Adobe name)
+%
+Lacute % Extended TeX Latin 0210 (non-Adobe name)
+Lapostrophe % Extended TeX Latin 0211 (non-Adobe name)
+Nacute % Extended TeX Latin 0213 (non-Adobe name)
+Ncaron % Extended TeX Latin 0214 (non-Adobe name)
+Racute % Extended TeX Latin 0217 (non-Adobe name)
+Rcaron % Extended TeX Latin 0220 (non-Adobe name)
+Tcaron % Extended TeX Latin 0224 (non-Adobe name)
+Togonek % Extended TeX Latin 0225 (non-Adobe name)
+%
+Dcaron % Extended TeX Latin 0204 (non-Adobe name)
+exclamsmall % Expert
+Hungarumlautsmall % Expert
+Gbreve % Extended TeX Latin 0207 (non-Adobe name)
+dollaroldstyle % Expert
+dollarsuperior % Expert
+ampersandsmall % Expert
+Acutesmall % Expert
+%
+parenleftsuperior % Expert
+parenrightsuperior % Expert
+twodotenleader % Expert
+onedotenleader % Expert
+Idot % Extended TeX Latin 0235 (non-Adobe name)
+Sacute % Extended TeX Latin 0221 (non-Adobe name)
+Scaron % Extended TeX Latin 0222 (non-Adobe name)
+Sogonek % Extended TeX Latin 0223 (non-Adobe name)
+%
+zerooldstylefitted % non-Adobe name
+oneoldstylefitted % non-Adobe name
+twooldstylefitted % non-Adobe name
+threeoldstylefitted % non-Adobe name
+fouroldstylefitted % non-Adobe name
+fiveoldstylefitted % non-Adobe name
+sixoldstylefitted % non-Adobe name
+sevenoldstylefitted % non-Adobe name
+%
+eightoldstylefitted % non-Adobe name
+nineoldstylefitted % non-Adobe name
+Uhungarumlaut % Extended TeX Latin 0226 (non-Adobe name)
+Uring % Extended TeX Latin 0227 (non-Adobe name)
+commasuperior % Expert
+Ohungarumlaut % Extended TeX Latin 0216 (non-Adobe name)
+periodsuperior % Expert
+questionsmall % Expert
+%
+tt % non-Adobe name
+asuperior % Expert
+bsuperior % Expert
+centsuperior % Expert
+dsuperior % Expert
+esuperior % Expert
+gg % non-Adobe name
+ll % non-Adobe name
+%
+Zacute % Extended TeX Latin 0231 (non-Adobe name)
+isuperior % Expert
+Yhungarumlaut % Extended TeX Latin 0230 (non-Adobe name)
+centoldstyle % Expert 0242
+lsuperior % Expert
+msuperior % Expert
+nsuperior % Expert
+osuperior % Expert
+%
+Zcaron % Extended TeX Latin 0232 (non-Adobe name)
+Zdot % Extended TeX Latin 0233 (non-Adobe name)
+rsuperior % Expert
+ssuperior % Expert
+tsuperior % Expert
+fb
+fh
+fk
+%
+Ethsmall % Expert 0360
+Oslashsmall % Expert 0370
+Thornsmall % Expert 0376
+parenrightinferior % Expert
+Lslashsmall % Expert 0243
+parenleftinferior % Expert
+Circumflexsmall % Expert
+hyphensuperior % Expert
+%
+Gravesmall % Expert
+Asmall % Expert
+Bsmall % Expert
+Csmall % Expert
+Dsmall % Expert
+Esmall % Expert
+Fsmall % Expert
+Gsmall % Expert
+%
+Hsmall % Expert
+Ismall % Expert
+Jsmall % Expert
+Ksmall % Expert
+Lsmall % Expert
+Msmall % Expert
+Nsmall % Expert
+Osmall % Expert
+%
+Psmall % Expert
+Qsmall % Expert
+Rsmall % Expert
+Ssmall % Expert
+Tsmall % Expert
+Usmall % Expert
+Vsmall % Expert
+Wsmall % Expert
+%
+Xsmall % Expert
+Ysmall % Expert
+Zsmall % Expert
+AEsmall % Expert 0346
+OEsmall % Expert 0367
+rupiah % Expert
+Tildesmall % Expert
+soldstyle % non-Adobe name
+%
+Aswash % non-Adobe name
+Bswash % non-Adobe name
+Cswash % non-Adobe name
+Dswash % non-Adobe name
+Eswash % non-Adobe name
+Fswash % non-Adobe name
+Gswash % non-Adobe name
+Hswash % non-Adobe name
+%
+Iswash % non-Adobe name
+Jswash % non-Adobe name
+Kswash % non-Adobe name
+Lswash % non-Adobe name
+Mswash % non-Adobe name
+Nswash % non-Adobe name
+Oswash % non-Adobe name
+Pswash % non-Adobe name
+%
+Qswash % non-Adobe name
+Rswash % non-Adobe name
+Sswash % non-Adobe name
+Tswash % non-Adobe name
+Uswash % non-Adobe name
+Vswash % non-Adobe name
+Wswash % non-Adobe name
+Xswash % non-Adobe name
+%
+Yswash % non-Adobe name
+Zswash % non-Adobe name
+abreve % Extended TeX Latin 0240 (non-Adobe name)
+aogonek % Extended TeX Latin 0241 (non-Adobe name)
+cacute % Extended TeX Latin 0242 (non-Adobe name)
+ccaron % Extended TeX Latin 0243 (non-Adobe name)
+ecaron % Extended TeX Latin 0245 (non-Adobe name)
+egonek % Extended TeX Latin 0246 (non-Adobe name)
+%
+dapostrophe % Extended TeX Latin 0244 (non-Adobe name)
+exclamdownsmall % Expert
+gabreve % Extended TeX Latin 0247 (non-Adobe name)
+lacute % Extended TeX Latin 0250 (non-Adobe name)
+lapostrophe % Extended TeX Latin 0251 (non-Adobe name)
+sacute % Extended TeX Latin 0261 (non-Adobe name)
+scaron % Extended TeX Latin 0262 (non-Adobe name)
+sogonek % Extended TeX Latin 0263 (non-Adobe name)
+%
+Dieresissmall % Expert
+Brevesmall % Expert
+Caronsmall % Expert
+ohungarumlaut % Extended TeX Latin 0256 (non-Adobe name)
+Dotaccentsmall % Expert
+nacute % Extended TeX Latin 0253 (non-Adobe name)
+ncaron % Extended TeX Latin 0254 (non-Adobe name)
+Macronsmall % Expert
+%
+racute % Extended TeX Latin 0257 (non-Adobe name)
+rcaron % Extended TeX Latin 0260 (non-Adobe name)
+figuredash % Expert
+hypheninferior % Expert
+tapostrophe % Extended TeX Latin 0264 (non-Adobe name)
+togonek % Extended TeX Latin 0265 (non-Adobe name)
+Ogoneksmall % Expert
+Ringsmall % Expert
+%
+Cedillasmall % Expert
+zacute % Extended TeX Latin 0271 (non-Adobe name)
+zcaron % Extended TeX Latin 0272 (non-Adobe name)
+zdot % Extended TeX Latin 0273 (non-Adobe name)
+onequarter % Expert
+onehalf % Expert
+threequarters % Expert
+questiondownsmall % Expert
+%
+oneeigthth % Expert
+threeeighths % Expert
+fiveeighths % Expert
+seveneighths % Expert
+onethird % Expert
+twothirds % Expert
+uhungarumlaut % Extended TeX Latin 0266 (non-Adobe name)
+uring % Extended TeX Latin 0267 (non-Adobe name)
+%
+zerosuperior % Expert
+onesuperior % Expert
+twosuperior % Expert
+threesuperior % Expert
+foursuperior % Expert
+fivesuperior % Expert
+sixsuperior % Expert
+sevensuperior % Expert
+%
+eightsuperior % Expert
+ninesuperior % Expert
+zeroinferior % Expert
+oneinferior % Expert
+twoinferior % Expert
+threeinferior % Expert
+fourinferior % Expert
+fiveinferior % Expert
+%
+sixinferior % Expert
+seveninferior % Expert
+eightinferior % Expert
+nineinferior % Expert
+centinferior % Expert
+dollarinferior % Expert
+periodinferior % Expert
+commainferior % Expert
+%
+aswash % non-Adobe name
+bswash % non-Adobe name
+cswash % non-Adobe name
+dswash % non-Adobe name
+eswash % non-Adobe name
+fswash % non-Adobe name
+gswash % non-Adobe name
+hswash % non-Adobe name
+%
+iswash % non-Adobe name
+jswash % non-Adobe name
+kswash % non-Adobe name
+lswash % non-Adobe name
+mswash % non-Adobe name
+nswash % non-Adobe name
+oswash % non-Adobe name
+pswash % non-Adobe name
+%
+qswash % non-Adobe name
+rswash % non-Adobe name
+sswash % non-Adobe name
+tswash % non-Adobe name
+uswash % non-Adobe name
+vswash % non-Adobe name
+wswash % non-Adobe name
+xswash % non-Adobe name
+%
+yswash % non-Adobe name
+zswash % non-Adobe name
+ct % non-Adobe name
+st % non-Adobe name
+ft % non-Adobe name
+sp % non-Adobe name
+fr % non-Adobe name
+es % non-Adobe name
+
+
+
+
diff --git a/data/itcdingbat.enc b/data/itcdingbat.enc
new file mode 100644
index 0000000..f0280d1
--- /dev/null
+++ b/data/itcdingbat.enc
@@ -0,0 +1,286 @@
+% Encoding used for ITC Zapf Dingbats not appearing in Zapf Dingbats.
+% No overlap with the Zapf Dingbats encoding file (zdingbats.enc).
+%
+ITC Zapf Dingbats
+% 0
+g1112
+g1113
+g2112
+g3113
+g2115
+g1401
+% 6
+g1402
+g1403
+g2309
+g2401
+g2402
+g3308
+g3401
+g3402
+g3403
+% 15
+g1310
+g1311
+g2310
+g2311
+g3310
+g3311
+%
+g2451
+g2361
+g1459
+g1460
+g1457
+g1357
+g1359
+%
+g2260
+g1355
+g2261
+g2351
+g2452
+g2453
+g2455
+g2456
+%
+g2265
+g2251
+g2252
+g2253
+g2254
+g2255
+g2256
+%
+g2257
+g2258
+g2359
+g1251
+g1252
+g1253
+g1256
+%
+g1258
+g1456
+g2352
+g2353
+g2355
+g2356
+%
+g1452
+g1453
+g1260
+g1261
+g1360
+g1361
+%
+g2459
+g3251
+g3252
+g3253
+g3254
+g3255
+g3256
+g3257
+g3258
+%
+g3351
+g1202
+g1203
+g1205
+g1210
+g1301
+%
+g1461
+g2201
+g2202
+g2204
+%
+g3213
+g1207
+g2208
+g2211
+g2212
+%
+g3366
+g3304
+%
+g1462
+g2213
+g3111
+g3161
+g3207
+%
+g3262
+%
+g3263
+g3264
+g3265
+g1415
+g1413
+g2413
+g2415
+%
+g3415
+%
+g3101
+%
+g3102
+g3103
+g3104
+g3105
+g3106
+g3107
+g3108
+g3109
+g3110
+g1151
+g1152
+g1153
+g1154
+g1155
+%
+g1156
+g1157
+g1158
+g1159
+g1160
+g2151 % Almost Adobe a130-9 but not quite.
+g2152
+g2153
+g2154
+g2155
+g2156
+g2157
+g2158
+g2159
+g2160
+%
+g3151
+g3152
+g3153
+g3154
+g3155
+g3156
+g3157
+g3158
+g3159
+g3160
+g1162
+g2162
+%
+g1408
+g1409
+g2406
+g2407
+g2408
+g2409
+%
+g3408
+g3409
+g3315
+g3316
+g1265
+g1266
+%
+g3164
+g3165
+g1264
+g2366
+g1315
+g2316
+%
+g2564
+g2565
+g1464
+g1465
+g1404
+g1405
+g3405
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
diff --git a/data/mflogo.enc b/data/mflogo.enc
new file mode 100644
index 0000000..26c6e12
--- /dev/null
+++ b/data/mflogo.enc
@@ -0,0 +1,87 @@
+% Encoding for the Metafont logo fonts.
+AEFMNOT only
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+A
+.notdef
+.notdef
+.notdef
+E
+F
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+M
+N
+O
+.notdef
+.notdef
+.notdef
+.notdef
+T
diff --git a/data/myprfont.ps b/data/myprfont.ps
new file mode 100644
index 0000000..762bf01
--- /dev/null
+++ b/data/myprfont.ps
@@ -0,0 +1,154 @@
+%!
+%%Creator: Eric Gisin <egisin@waterloo.csnet>
+%%Title: Print font catalog
+% Copyright (c) 1986 Eric Gisin
+% Copyright (C) 1992 Aladdin Enterprises, Menlo Park, CA (ghost@aladdin.com)
+% Modified to print all 256 encoded characters.
+% Copyright (C) 1993 Aladdin Enterprises, Menlo Park, CA (ghost@aladdin.com)
+% Modified to print unencoded characters.
+% Copyright (C) 1994 Aladdin Enterprises, Menlo Park, CA (ghost@aladdin.com)
+% Modified to always create 256-element Encoding vectors.
+% Copyright (C) 1995 Aladdin Enterprises, Menlo Park, CA (ghost@aladdin.com)
+% Modified to print more than 128 unencoded characters.
+%
+% Call on /ZapfDingbats. Kathryn Hargreaves 10-20-95
+
+% Example usages at bottom of file
+
+/#copies 1 def
+/min { 2 copy gt { exch } if pop } bind def
+
+/leftmarginadjust 6 def % The printer is off by this much.
+
+/T6 /Times-Roman findfont 6 scalefont def
+/Temp 64 string def
+/Inch {72 mul} def
+/Base 16 def % char code output base
+/TempEncoding [ 256 { /.notdef } repeat ] def
+
+% do single character of page
+% output to rectangle ll=(0,-24) ur=(36,24)
+/DoChar {
+ /C exch def
+ /S (_) dup 0 C put def
+ /N F /Encoding get C get def
+
+ % print code name, width and char name
+ /W F setfont S stringwidth pop def
+ T6 setfont
+ N /.notdef ne {0 -20 moveto N Temp cvs show} if
+ 0 -12 moveto C Base Temp cvrs show ( ) show
+ W 0.0005 add Temp cvs 0 5 getinterval show
+
+ % print char with reference lines
+ N /.notdef ne {
+ 3 0 translate
+ 0 0 moveto F24 setfont N glyphshow
+ /W S stringwidth pop def
+ 0 -6 moveto 0 24 lineto
+ W -6 moveto W 24 lineto
+ -3 0 moveto W 3 add 0 lineto
+ 0 setlinewidth stroke
+ } if
+} def
+
+% print page title
+/DoTitle {
+ /Times-Roman findfont 18 scalefont setfont
+ 18 10.5 Inch moveto FName Temp cvs show ( ) show ((24 point)) show
+} def
+
+% print one block of characters
+/DoBlock { % firstcode lastcode
+ /FirstCode 2 index def
+ 1 exch {
+ /I exch def
+ /Xn I FirstCode sub 16 mod def /Yn I FirstCode sub 16 idiv def
+ gsave
+ Xn 36 mul 9 add Yn -56 mul 9.5 Inch add translate
+ I DoChar
+ grestore
+ } for
+} def
+
+% print a line of character
+/DoLine { % firstcode lastcode
+ 1 exch { (_) dup 0 3 index put show pop } for
+} def
+
+% print font sample page
+/DoFont {
+ /FName exch def % font name
+ /F FName findfont def
+ /F24 F 24 scalefont def
+ /Line0 96 string def
+ /Line1 96 string def
+
+ % Display the first 128 encoded characters.
+
+ DoTitle (, characters 0-127) show
+ 0 127 DoBlock
+ F 10 scalefont setfont
+ 18 2.0 Inch moveto 0 63 DoLine
+ 18 1.5 Inch moveto 64 127 DoLine
+ showpage
+
+ % Display the second 128 encoded characters.
+
+ DoTitle (, characters 128-255) show
+ 128 255 DoBlock
+ F 10 scalefont setfont
+ 18 2.0 Inch moveto 128 191 DoLine
+ 18 1.5 Inch moveto 192 255 DoLine
+ showpage
+
+ F /FontType get 1 eq
+ {
+ % Find and display the unencoded characters.
+
+ /Encoded F /Encoding get length dict def
+ F /Encoding get { true Encoded 3 1 roll put } forall
+ /Unencoded [ F /CharStrings get
+ { pop dup Encoded exch known { pop } if }
+ forall ] def
+ /Count Unencoded length def
+
+ % Print the unencoded characters in blocks of 128.
+
+ 0 128 Unencoded length 1 sub
+ { dup 128 add Unencoded length min 1 index sub
+ Unencoded 3 1 roll getinterval TempEncoding copy
+ /BlockEncoding exch def
+ /BlockCount BlockEncoding length def
+ save
+ F length dict F
+ { 1 index /FID eq { pop pop } { 2 index 3 1 roll put } ifelse }
+ forall dup /Encoding TempEncoding put
+ /* exch definefont
+ /F exch def
+ /F24 F 24 scalefont def
+
+ DoTitle (, unencoded characters) show
+ 0 BlockCount 1 sub DoBlock
+ F 10 scalefont setfont
+ 18 2.0 Inch moveto 0 BlockCount 64 min 1 sub DoLine
+ BlockCount 64 gt
+ { 18 1.5 Inch moveto 64 BlockCount 128 min 1 sub DoLine
+ }
+ if
+ showpage
+ restore
+ } for
+
+ }
+ if
+
+} def
+
+% Do font samples
+% /Times-Roman DoFont % Test (less than a minute)
+% /Hershey-Gothic-English DoFont % Test (8 minutes)
+/ZapfDingbats DoFont % Test
+
+% Do a complete catalog
+% FontDirectory {pop DoFont} forall % All fonts (quite a long time)
diff --git a/data/mytestfont.tex b/data/mytestfont.tex
new file mode 100644
index 0000000..8b8fdda
--- /dev/null
+++ b/data/mytestfont.tex
@@ -0,0 +1,227 @@
+% A testbed for font evaluation (see The METAFONTbook, Appendix H)
+
+\tracinglostchars=0
+\tolerance=1000
+\raggedbottom
+\nopagenumbers
+\parindent=0pt
+\newlinechar=`@
+\hyphenpenalty=200
+\doublehyphendemerits=30000
+\hyphenation{prom-i-nent}
+
+\newcount\m \newcount\n \newcount\p \newdimen\dim
+\chardef\other=12
+
+\font\eighttt = cmtt8
+
+\def\today{\ifcase\month\or
+ January\or February\or March\or April\or May\or June\or
+ July\or August\or September\or October\or November\or December\fi
+ \space\number\day, \number\year}
+\def\hours{\n=\time \divide\n 60
+ \m=-\n \multiply\m 60 \advance\m \time
+ \twodigits\n\twodigits\m}
+\def\twodigits#1{\ifnum #1<10 0\fi \number#1}
+
+\def\init{\message{@Name of the font to test = }
+ \read-1 to\fontname \startfont
+ \message{Now type a test command (\string\help\space for help):}}
+\def\startfont{\font\testfont=\fontname \spaceskip=0pt
+ \leftline{\sevenrm Test of {\eighttt \fontname\unskip}\ on \today\ at \hours}
+ \nobreak\medskip
+ \nobreak
+ \testfont \setbaselineskip
+ \ifdim\fontdimen6\testfont<10pt \rightskip=0pt plus 20pt
+ \else\rightskip=0pt plus 2em \fi
+ \spaceskip=\fontdimen2\testfont % space between words (\raggedright)
+ \xspaceskip=\fontdimen2\testfont \advance\xspaceskip by\fontdimen7\testfont}
+
+{\catcode`\|=0 \catcode`\\=\other
+|gdef|help{|message{%
+\init switches to another font;@%
+\end or \bye finishes the run;@%
+\table prints the font layout in tabular format;@%
+\text prints a sample text, assuming TeX text font conventions;@%
+\sample combines \table and \text;@%
+\mixture mixes a background character with a series of others;@%
+\alternation interleaves a background character with a series;@%
+\alphabet prints all lowercase letters within a given background;@%
+\ALPHABET prints all uppercase letters within a given background;@%
+\series prints a series of letters within a given background;@%
+\lowers prints a comprehensive test of lowercase;@%
+\uppers prints a comprehensive test of uppercase;@%
+\digits prints a comprehensive test of numerals;@%
+\math prints a comprehensive test of TeX math italic;@%
+\names prints a text that mixes upper and lower case;@%
+\punct prints a punctuation test;@%
+\bigtest combines many of the above routines;@%
+\help repeats this message;@%
+and you can use ordinary TeX commands (e.g., to \input a file).}}}
+
+\def\setbaselineskip{\setbox0=\hbox{\n=0
+\loop\char\n \ifnum \n<255 \advance\n 1 \repeat}
+\baselineskip=6pt \advance\baselineskip\ht0 \advance\baselineskip\dp0 }
+
+\def\setchar#1{{\escapechar-1\message{\string#1 character = }%
+ \def\do##1{\catcode`##1=\other}\dospecials
+ \read-1 to\next
+ \expandafter\finsetchar\next\next#1}}
+\def\finsetchar#1#2\next#3{\global\chardef#3=`#1
+ \ifnum #3=`\# \global\chardef#3=#2 \fi}
+\def\promptthree{\setchar\background
+ \setchar\starting \setchar\ending}
+
+\def\mixture{\promptthree \domix\mixpattern}
+\def\alternation{\promptthree \domix\altpattern}
+\def\mixpattern{\0\1\0\0\1\1\0\0\0\1\1\1\0\1}
+\def\altpattern{\0\1\0\1\0\1\0\1\0\1\0\1\0\1\0\1\0}
+\def\domix#1{\par\chardef\0=\background \n=\starting
+ \loop \chardef\1=\n #1\endgraf
+ \ifnum \n<\ending \advance\n 1 \repeat}
+
+\def\!{\discretionary{\background}{\background}{\background}}
+\def\series{\promptthree \!\doseries\starting\ending\par}
+\def\doseries#1#2{\n=#1\loop\char\n\!\ifnum\n<#2\advance\n 1 \repeat}
+\def\complower{\!\doseries{`a}{`z}\doseries{'31}{'34}\par}
+\def\compupper{\!\doseries{`A}{`Z}\doseries{'35}{'37}\par}
+\def\compdigs{\!\doseries{`0}{`9}\par}
+\def\alphabet{\setchar\background\complower}
+\def\ALPHABET{\setchar\background\compupper}
+
+\def\lowers{\docomprehensive\complower{`a}{`z}{'31}{'34}}
+\def\uppers{\docomprehensive\compupper{`A}{`Z}{'35}{'37}}
+\def\digits{\docomprehensive\compdigs{`0}{`4}{`5}{`9}}
+\def\docomprehensive#1#2#3#4#5{\par\chardef\background=#2
+ \loop{#1} \ifnum\background<#3\m=\background\advance\m 1
+ \chardef\background=\m \repeat \chardef\background=#4
+ \loop{#1} \ifnum\background<#5\m=\background\advance\m 1
+ \chardef\background=\m \repeat}
+
+\def\names{ {\AA}ngel\aa\ Beatrice Claire
+ Diana \'Erica Fran\c{c}oise Ginette H\'el\`ene Iris
+ Jackie K\=aren {\L}au\.ra Mar{\'\i}a N\H{a}ta{\l}{\u\i}e {\O}ctave
+ Pauline Qu\^eneau Roxanne Sabine T\~a{\'\j}a Ur\v{s}ula
+ Vivian Wendy Xanthippe Yv{\o}nne Z\"azilie\par}
+\def\punct{\par\dopunct{min}\dopunct{pig}\dopunct{hid}
+ \dopunct{HIE}\dopunct{TIP}\dopunct{fluff}
+ \$1,234.56 + 7/8 = 9\% @ \#0\par}
+\def\dopunct#1{#1,\ #1:\ #1;\ `#1'\ ?`#1?\ !`#1!\ (#1)\ [#1]\ #1*\ #1.\par}
+
+\def\bigtest{\sample
+ hamburgefonstiv HAMBURGEFONSTIV\par
+ \names \punct \lowers \uppers \digits}
+
+\def\math{\textfont1=\testfont \skewchar\testfont=\skewtrial
+ \mathchardef\Gamma="100 \mathchardef\Delta="101
+ \mathchardef\Theta="102 \mathchardef\Lambda="103 \mathchardef\Xi="104
+ \mathchardef\Pi="105 \mathchardef\Sigma="106 \mathchardef\Upsilon="107
+ \mathchardef\Phi="108 \mathchardef\Psi="109 \mathchardef\Omega="10A
+ \def\ii{i} \def\jj{j}
+ \def\\##1{|##1|+}\mathtrial
+ \def\\##1{##1_2+}\mathtrial
+ \def\\##1{##1^2+}\mathtrial
+ \def\\##1{##1/2+}\mathtrial
+ \def\\##1{2/##1+}\mathtrial
+ \def\\##1{##1,{}+}\mathtrial
+ \def\\##1{d##1+}\mathtrial
+ \let\ii=\imath \let\jj=\jmath \def\\##1{\hat##1+}\mathtrial}
+\newcount\skewtrial \skewtrial='177
+\def\mathtrial{$\\A \\B \\C \\D \\E \\F \\G \\H \\I \\J \\K \\L \\M \\N \\O
+ \\P \\Q \\R \\S \\T \\U \\V \\W \\X \\Y \\Z \\a \\b \\c \\d \\e \\f \\g
+ \\h \\\ii \\\jj \\k \\l \\m \\n \\o \\p \\q \\r \\s \\t \\u \\v \\w \\x \\y
+ \\z \\\alpha \\\beta \\\gamma \\\delta \\\epsilon \\\zeta \\\eta \\\theta
+ \\\iota \\\kappa \\\lambda \\\mu \\\nu \\\xi \\\pi \\\rho \\\sigma \\\tau
+ \\\upsilon \\\phi \\\chi \\\psi \\\omega \\\vartheta \\\varpi \\\varphi
+ \\\Gamma \\\Delta \\\Theta \\\Lambda \\\Xi \\\Pi \\\Sigma \\\Upsilon
+ \\\Phi \\\Psi \\\Omega \\\partial \\\ell \\\wp$\par}
+\def\mathsy{\begingroup\skewtrial='060 % for math symbol font tests
+ \def\mathtrial{$\\A \\B \\C \\D \\E \\F \\G \\H \\I \\J \\K \\L
+ \\M \\N \\O \\P \\Q \\R \\S \\T \\U \\V \\W \\X \\Y \\Z$\par}
+ \math\endgroup}
+
+\def\oct#1{\hbox{\rm\'{}\kern-.2em\it#1\/\kern.05em}} % octal constant
+\def\hex#1{\hbox{\rm\H{}\tt#1}} % hexadecimal constant
+\def\setdigs#1"#2{\gdef\h{#2}% \h=hex prefix; \0\1=corresponding octal
+ \m=\n \divide\m by 64 \xdef\0{\the\m}%
+ \multiply\m by-64 \advance\m by\n \divide\m by 8 \xdef\1{\the\m}}
+\def\testrow{\setbox0=\hbox{\penalty 1\def\\{\char"\h}%
+ \\0\\1\\2\\3\\4\\5\\6\\7\\8\\9\\A\\B\\C\\D\\E\\F%
+ \global\p=\lastpenalty}} % \p=1 if none of the characters exist
+
+\def\oddline{\cr
+ \noalign{\nointerlineskip}
+ \multispan{19}\hrulefill&
+ \setbox0=\hbox{\lower 2.3pt\hbox{\hex{\h x}}}\smash{\box0}\cr
+ \noalign{\nointerlineskip}}
+
+\newif\ifskipping
+\def\evenline{
+ \loop
+ \skippingfalse
+ \ifnum\n<256
+ \m=\n \divide\m 16
+ \chardef\next=\m
+ \expandafter\setdigs\meaning\next
+ \testrow
+% \ifnum\p=1
+% \skippingtrue
+% \fi
+ \fi
+ \ifskipping \global\advance\n 16
+ \repeat
+ \ifnum\n=256
+ \let\next=\endchart
+ \else
+ \let\next=\morechart
+ \fi
+ \next
+ }
+\def\morechart{\cr\noalign{\hrule\penalty5000}
+ \chartline \oddline \m=\1 \advance\m 1 \xdef\1{\the\m}
+ \chartline \evenline}
+\def\chartline{&\oct{\0\1x}&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&\:&&}
+\def\chartstrut{\lower4.5pt\vbox to14pt{}}
+\def\table{$$\global\n=0
+ \halign to\hsize\bgroup
+ \chartstrut##\tabskip0pt plus10pt&
+ &\hfil##\hfil&\vrule##\cr
+ \lower6.5pt\null
+ &&&\oct0&&\oct1&&\oct2&&\oct3&&\oct4&&\oct5&&\oct6&&\oct7&\evenline}
+\def\endchart{\cr\noalign{\hrule}
+ \raise11.5pt\null&&&\hex 8&&\hex 9&&\hex A&&\hex B&
+ &\hex C&&\hex D&&\hex E&&\hex F&\cr\egroup$$\par}
+\def\:{\setbox0=\hbox{\char\n}%
+ \ifdim\ht0>7.5pt\reposition
+ \else\ifdim\dp0>2.5pt\reposition\fi\fi
+ \box0\global\advance\n 1 }
+\def\reposition{\setbox0=\vbox{\kern2pt\box0}\dim=\dp0
+ \advance\dim 2pt \dp0=\dim}
+\def\centerlargechars{
+ \def\reposition{\setbox0=\hbox{$\vcenter{\kern2pt\box0\kern2pt}$}}}
+
+\def\text{{\advance\baselineskip-4pt
+\setbox0=\hbox{abcdefghijklmnopqrstuvwxyz}
+\ifdim\hsize>2\wd0 \ifdim 15pc>2\wd0 \hsize=15pc \else \hsize=2.5\wd0 \fi\fi
+On November 14, 1885, Senator \& Mrs.~Leland Stanford called
+together at their San Francisco mansion the 24~prominent men who had
+been chosen as the first trustees of The Leland Stanford Junior University.
+They handed to the board the Founding Grant of the University, which they
+had executed three days before. This document---with various amendments,
+legislative acts, and court decrees---remains as the University's charter.
+In bold, sweeping language it stipulates that the objectives of the University
+are ``to qualify students for personal success and direct usefulness in life;
+and to promote the publick welfare by exercising an influence in behalf of
+humanity and civilization, teaching the blessings of liberty regulated by
+law, and inculcating love and reverence for the great principles of
+government as derived from the inalienable rights of man to life, liberty,
+and the pursuit of happiness.'' \moretext
+(!`THE DAZED BROWN FOX QUICKLY GAVE 12345--67890 JUMPS!)\par}}
+\def\moretext{?`But aren't Kafka's Schlo{\ss} and {\AE}sop's {\OE}uvres
+often na{\"\i}ve vis-\`a-vis the d{\ae}monic ph{\oe}nix's official r\^ole
+in fluffy souffl\'es? }
+\def\omitaccents{\let\moretext=\relax}
+
+\def\sample{\table\text}
+
+\ifx\noinit!\else\init\fi
diff --git a/data/psymbol.enc b/data/psymbol.enc
new file mode 100644
index 0000000..c73fc3e
--- /dev/null
+++ b/data/psymbol.enc
@@ -0,0 +1,267 @@
+PostScript Symbol
+% 0
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+% 020
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+% 040
+space
+exclam
+universal
+numbersign
+existential
+percent
+ampersand
+suchthat
+parenleft
+parenright
+asteriskmath
+plus
+comma
+minus
+period
+slash
+% 060
+zero
+one
+two
+three
+four
+five
+six
+seven
+eight
+nine
+colon
+semicolon
+less
+equal
+greater
+question
+% 100
+congruent
+Alpha
+Beta
+Chi
+Delta
+Epsilon
+Phi
+Gamma
+Eta
+Iota
+theta1
+Kappa
+Lambda
+Mu
+Nu
+Omicron
+Pi
+Theta
+Rho
+Sigma
+Tau
+Upsilon
+sigma1
+Omega
+Xi
+Psi
+Zeta
+bracketleft
+therefore
+bracketright
+perpendicular
+underscore
+% \140
+radicalex
+alpha
+beta
+chi
+delta
+epsilon
+phi
+gamma
+eta
+iota
+phi1
+kappa
+lambda
+mu
+nu
+omicron
+pi
+theta
+rho
+sigma
+tau
+upsilon
+omega1
+omega
+xi
+psi
+zeta
+braceleft
+bar
+braceright
+similar
+.notdef
+% \200
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+% \240
+.notdef
+Upsilon1
+minute
+lessequal
+fraction
+infinity
+florin
+club
+diamond
+heart
+spade
+arrowboth
+arrowleft
+arrowup
+arrowright
+arrowdown
+degree
+plusminus
+second
+greaterequal
+multiply
+proportional
+partialdiff
+bullet
+divide
+notequal
+equivalence
+approxequal
+ellipsis
+arrowvertex
+arrowhorizex
+carriagereturn
+% \300
+aleph
+Ifraktur
+Rfraktur
+weierstrass
+circlemultiply
+circleplus
+emptyset
+intersection
+union
+propersuperset
+reflexsuperset
+notsubset
+propersubset
+reflexsubset
+element
+notelement
+angle
+gradient
+registerserif
+copyrightserif
+trademarkserif
+product
+radical
+dotmath
+logicalnot
+logicaland
+logicalor
+arrowdblboth
+arrowdblleft
+arrowdblup
+arrowdblright
+arrowdbldown
+% \340
+lozenge
+angleleft
+registersans
+copyrightsans
+trademarksans
+summation
+parenlefttp
+parenleftex
+parenleftbt
+bracketlefttp
+bracketleftex
+bracketleftbt
+bracelefttp
+braceleftmid
+braceleftbt
+braceex
+.notdef
+angleright
+integral
+integraltp
+integralex
+integralbt
+parenrighttp
+parenrightex
+parenrightbt
+bracketrighttp
+bracketrightex
+bracketrightbt
+bracerighttp
+bracerightmid
+bracerightbt
+.notdef
diff --git a/data/texlatin.enc b/data/texlatin.enc
new file mode 100644
index 0000000..c5615d8
--- /dev/null
+++ b/data/texlatin.enc
@@ -0,0 +1,259 @@
+% The extended TeX font encoding scheme (Latin), as specified by Cork in
+% TUGboat 11(4), November 1990, page 516.
+Extended TeX Latin
+grave
+acute
+circumflex
+tilde
+dieresis
+hungarumlaut
+ring
+caron
+breve
+macron
+dotaccent
+cedilla
+ogonek
+quotesinglbase
+guilsinglleft
+guilsinglright
+quotedblleft
+quotedblright
+quotedblbase
+guillemotleft
+guillemotright
+endash lig - =: 026
+emdash
+compoundwordmark % non-Adobe
+zerolowered % non-Adobe
+dotlessi
+dotlessj % non-Adobe
+ff lig i =: 036 lig l =: 037
+fi
+fl
+ffi
+ffl
+visiblespace % non-Adobe
+exclam lig ` =: 0275
+quotedbl
+numbersign
+dollar
+percent
+ampersand
+quoteright lig ' =: 021
+parenleft
+parenright
+asterisk
+plus
+comma
+asciihyphen lig - =: 025
+period
+slash
+zero
+one
+two
+three
+four
+five
+six
+seven
+eight
+nine
+colon
+semicolon
+less
+equal
+greater
+question lig ` =: 0276
+at
+A
+B
+C
+D
+E
+F
+G
+H
+I
+J
+K
+L
+M
+N
+O
+P
+Q
+R
+S
+T
+U
+V
+W
+X
+Y
+Z
+bracketleft
+backslash
+bracketright
+asciicircum
+underscore
+quoteleft lig ` =: 020 % `` => opening double quote char
+a
+b
+c
+d
+e
+f lig f =: 033 lig i =: 034 lig l =: 035
+g
+h
+i
+j
+k
+l
+m
+n
+o
+p
+q
+r
+s
+t
+u
+v
+w
+x
+y
+z
+braceleft
+bar
+braceright
+asciitilde
+hyphen % non-Adobe
+Abreve % non-Adobe
+Aogonek % non-Adobe
+Cacute % non-Adobe
+Ccaron % non-Adobe
+Dcaron % non-Adobe
+Ecaron % non-Adobe
+Eogonek % non-Adobe
+Gbreve % non-Adobe
+Lacute % non-Adobe
+Lcaron % represented with quoteright; non-Adobe
+Lslash
+Nacute % non-Adobe
+Ncaron % non-Adobe
+Eng % non-Adobe
+Ohungarumlaut % non-Adobe
+Racute % non-Adobe
+Rcaron % non-Adobe
+Sacute % non-Adobe
+Scaron
+Scedilla % non-Adobe
+Tcaron % non-Adobe
+Tcedilla % non-Adobe
+Uhungarumlaut % non-Adobe
+Uring % non-Adobe
+Ydieresis
+Zacute % non-Adobe
+Zcaron
+Zdot % non-Adobe
+IJ % non-Adobe
+Idot % non-Adobe
+dbar % non-Adobe
+section
+abreve % non-Adobe
+aogonek % non-Adobe
+cacute % non-Adobe
+ccaron % non-Adobe
+dcaron % represented with quoteright; non-Adobe
+ecaron % non-Adobe
+eogonek % non-Adobe
+gbreve % non-Adobe
+lacute % non-Adobe
+lcaron % represented with quoteright; non-Adobe
+lslash
+nacute % non-Adobe
+ncaron % non-Adobe
+eng % non-Adobe
+ohungarumlaut % non-Adobe
+racute % non-Adobe
+rcaron % non-Adobe
+sacute % non-Adobe
+scaron
+scedilla % non-Adobe
+tcaron % represented with quoteright; non-Adobe
+tcedilla % non-Adobe
+uhungarumlaut % non-Adobe
+uring % non-Adobe
+ydieresis
+zacute % non-Adobe
+zcaron
+zdot % non-Adobe
+ij % non-Adobe
+exclamdown
+questiondown
+sterling
+Agrave
+Aacute
+Acircumflex
+Atilde
+Adieresis
+Aring
+AE
+Ccedilla
+Egrave
+Eacute
+Ecircumflex
+Edieresis
+Igrave
+Iacute
+Icircumflex
+Idieresis
+Eth % non-Adobe
+Ntilde
+Ograve
+Oacute
+Ocircumflex
+Otilde
+Odieresis
+OE
+Oslash
+Ugrave
+Uacute
+Ucircumflex
+Udieresis
+Yacute % non-Adobe
+Thorn
+germandblS % non-Adobe
+agrave
+aacute
+acircumflex
+atilde
+adieresis
+aring
+ae
+ccedilla
+egrave
+eacute
+ecircumflex
+edieresis
+igrave
+iacute
+icircumflex
+idieresis
+eth % non-Adobe
+ntilde
+ograve
+oacute
+ocircumflex
+otilde
+odieresis
+oe
+oslash
+ugrave
+uacute
+ucircumflex
+udieresis
+yacute % non-Adobe
+thorn
+germandbls % non-Adobe
diff --git a/data/texmext.enc b/data/texmext.enc
new file mode 100644
index 0000000..3ef0842
--- /dev/null
+++ b/data/texmext.enc
@@ -0,0 +1,161 @@
+/TeX math extension
+
+% 0x0
+parenleftbig
+parenrightbig
+bracketleftbig
+bracketrightbig
+floorleftbig
+floorrightbig
+ceilingleftbig
+ceilingrightbig
+
+% 0x8
+braceleftbig
+bracerightbig
+angbracketleftbig
+angbracketrightbig
+vextendsingle
+vextenddouble
+slashbig
+backslashbig
+
+% 0x10
+parenleftBig
+parenrightBig
+parenleftbigg
+parenrightbigg
+bracketleftbigg
+bracketrightbigg
+floorleftbigg
+floorrightbigg
+
+% 0x18
+ceilingleftbigg
+ceilingrightbigg
+braceleftbigg
+bracerightbigg
+angbracketleftbigg
+angbracketrightbigg
+slashbigg
+backslashbigg
+
+% 0x20
+parenleftBigg
+parenrightBigg
+bracketleftBigg
+bracketrightBigg
+floorleftBigg
+floorrightBigg
+ceilingleftBigg
+ceilingrightBigg
+
+% 0x28
+braceleftBigg
+bracerightBigg
+angbracketleftBigg
+angbracketrightBigg
+slashBigg
+backslashBigg
+slashBig
+backslashBig
+
+% 0x30
+parenlefttp
+parenrighttp
+bracketlefttp
+bracketrighttp
+bracketleftbt
+bracketrightbt
+bracketleftex
+bracketrightex
+
+% 0x38
+bracelefttp
+bracerighttp
+braceleftbt
+bracerightbt
+braceleftmid
+bracerightmid
+braceex
+arrowvertex
+
+% 0x40
+parenleftbt
+parenrightbt
+parenleftex
+parenrightex
+angbracketleftBig
+angbracketrightBig
+unionsqtext
+unionsqdisplay
+
+% 0x48
+contintegraltext
+contintegraldisplay
+circledottext
+circledotdisplay
+circleplustext
+circleplusdisplay
+circlemultiplytext
+circlemultiplydisplay
+
+% 0x50
+summationtext
+producttext
+integraltext
+uniontext
+intersectiontext
+unionmultitext
+logicalandtext
+logicalortext
+
+% 0x58
+summationdisplay
+productdisplay
+integraldisplay
+uniondisplay
+intersectiondisplay
+unionmultidisplay
+logicalanddisplay
+logicalordisplay
+
+% 0x60
+coproducttext
+coproductdisplay
+hatwide
+hatwider
+hatwidest
+tildewide
+tildewider
+tildewidest
+
+% 0x68
+bracketleftBig
+bracketrightBig
+floorleftBig
+floorrightBig
+ceilingleftBig
+ceilingrightBig
+braceleftBig
+bracerightBig
+
+% 0x70
+radicalbig
+radicalBig
+radicalbigg
+radicalBigg
+radicalbt
+radicalvertex
+radicaltp
+arrowvertexdbl
+
+% 0x78
+arrowtp
+arrowbt
+bracehtipdownleft
+bracehtipdownright
+bracehtipupleft
+bracehtipupright
+arrowdbltp
+arrowdblbt
diff --git a/data/texmital.enc b/data/texmital.enc
new file mode 100644
index 0000000..af76d9c
--- /dev/null
+++ b/data/texmital.enc
@@ -0,0 +1,161 @@
+TeX math italic
+
+% 0x0
+Gamma
+Delta
+Theta
+Lambda
+Xi
+Pi
+Sigma
+Upsilon
+
+% 0x8
+Phi
+Psi
+Omega
+alpha
+beta
+gamma
+delta
+epsilon1
+
+% 0x10
+zeta
+eta
+theta
+iota
+kappa
+lambda
+mu
+nu
+
+% 0x18
+xi
+pi
+rho
+sigma
+tau
+upsilon
+phi
+chi
+
+% 0x20
+psi
+omega
+epsilon
+theta1
+pi1
+rho1
+sigma1
+phi1
+
+% 0x28
+arrowlefttophalf
+arrowleftbothalf
+arrowrighttophalf
+arrowrightbothalf
+arrowhookleft
+arrowhookright
+triangleright
+triangleleft
+
+% 0x30
+zerooldstyle
+oneoldstyle
+twooldstyle
+threeoldstyle
+fouroldstyle
+fiveoldstyle
+sixoldstyle
+sevenoldstyle
+
+% 0x38
+eightoldstyle
+nineoldstyle
+period
+comma
+less
+slash
+greater
+star
+
+% 0x40
+partialdiff
+A
+B
+C
+D
+E
+F
+G
+
+% 0x48
+H
+I
+J
+K
+L
+M
+N
+O
+
+% 0x50
+P
+Q
+R
+S
+T
+U
+V
+W
+
+% 0x58
+X
+Y
+Z
+flat
+natural
+sharp
+slurbelow
+slurabove
+
+% 0x60
+lscript
+a
+b
+c
+d
+e
+f
+g
+
+% 0x68
+h
+i
+j
+k
+l
+m
+n
+o
+
+% 0x70
+p
+q
+r
+s
+t
+u
+v
+w
+
+% 0x78
+x
+y
+z
+dotlessi
+dotlessj
+weierstrass
+vector
+tie
diff --git a/data/texmsym.enc b/data/texmsym.enc
new file mode 100644
index 0000000..bd15aa3
--- /dev/null
+++ b/data/texmsym.enc
@@ -0,0 +1,161 @@
+TeX math symbols
+
+% 0x0
+minus
+periodcentered
+multiply
+asteriskmath
+divide
+diamondmath
+plusminus
+minusplus
+
+% 0x8
+circleplus
+circleminus
+circlemultiply
+circledivide
+circledot
+circlecopyrt
+openbullet
+bullet
+
+% 0x10
+equivasymptotic
+equivalence
+reflexsubset
+reflexsuperset
+lessequal
+greaterequal
+precedesequal
+followsequal
+
+% 0x18
+similar
+approxequal
+propersubset
+propersuperset
+lessmuch
+greatermuch
+precedes
+follows
+
+% 0x20
+arrowleft
+arrowright
+arrowup
+arrowdown
+arrowboth
+arrownortheast
+arrowsoutheast
+similarequal
+
+% 0x28
+arrowdblleft
+arrowdblright
+arrowdblup
+arrowdbldown
+arrowdblboth
+arrownorthwest
+arrowsouthwest
+proportional
+
+% 0x30
+prime
+infinity
+element
+owner
+triangle
+triangleinv
+negationslash
+mapsto
+
+% 0x38
+universal
+existential
+logicalnot
+emptyset
+Rfractur
+Ifractur
+latticetop
+perpendicular
+
+% 0x40
+aleph
+A
+B
+C
+D
+E
+F
+G
+
+% 0x48
+H
+I
+J
+K
+L
+M
+N
+O
+
+% 0x50
+P
+Q
+R
+S
+T
+U
+V
+W
+
+% 0x58
+X
+Y
+Z
+union
+intersection
+unionmulti
+logicaland
+logicalor
+
+% 0x60
+turnstileleft
+turnstileright
+floorleft
+floorright
+ceilingleft
+ceilingright
+braceleft
+braceright
+
+% 0x68
+angbracketleft
+angbracketright
+bar
+bardbl
+arrowbothv
+arrowdblbothv
+backslash
+wreathproduct
+
+% 0x70
+radical
+coproduct
+nabla
+integral
+unionsq
+intersectionsq
+subsetsqequal
+supersetsqequal
+
+% 0x78
+section
+dagger
+daggerdbl
+paragraph
+club
+diamond
+heart
+spade
diff --git a/data/textext.enc b/data/textext.enc
new file mode 100644
index 0000000..53b95f7
--- /dev/null
+++ b/data/textext.enc
@@ -0,0 +1,140 @@
+% TeX Text, e.g., Computer Modern Roman (cmr).
+% From page 427 of the TeXbook (among other places).
+%
+TeX text
+
+% 0x0
+Gamma
+Delta
+Theta
+Lambda
+Xi
+Pi
+Sigma
+Upsilon
+
+% 0x8
+Phi
+Psi
+Omega
+ff lig i =: 016 lig l =: 017
+fi
+fl
+ffi
+ffl
+
+% 0x10
+dotlessi
+dotlessj
+grave
+acute
+caron
+breve
+macron
+ring
+
+% 0x18
+cedilla
+germandbls
+ae
+oe
+oslash
+AE
+OE
+Oslash
+polishlcross
+exclam lig ` =: 074
+quotedblright
+numbersign
+dollar
+percent
+ampersand
+quoteright lig ' =: 042
+parenleft
+parenright
+asterisk
+plus
+comma
+hyphen lig - =: 0173
+period
+slash
+zero
+one
+two
+three
+four
+five
+six
+seven
+eight
+nine
+colon
+semicolon
+exclamdown
+equal
+questiondown
+question lig ` =: 076
+at
+A
+B
+C
+D
+E
+F
+G
+H
+I
+J
+K
+L
+M
+N
+O
+P
+Q
+R
+S
+T
+U
+V
+W
+X
+Y
+Z
+bracketleft
+quotedblleft
+bracketright
+circumflex
+dotaccent
+quoteleft lig ` =: 0134
+a
+b
+c
+d
+e
+f lig f =: 013 lig i =: 014 lig l =: 015
+g
+h
+i
+j
+k
+l
+m
+n
+o
+p
+q
+r
+s
+t
+u
+v
+w
+x
+y
+z
+endash lig - =: 0174
+emdash
+hungarumlaut
+tilde
+dieresis
diff --git a/data/windows.enc b/data/windows.enc
new file mode 100644
index 0000000..38da2c0
--- /dev/null
+++ b/data/windows.enc
@@ -0,0 +1,273 @@
+Windows 3.1 Latin 1
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+space
+exclam
+quotedbl
+numbersign
+dollar
+percent
+ampersand
+quotesingle
+parenleft
+parenright
+asterisk
+plus
+comma
+hyphen
+period
+slash
+zero
+one
+two
+three
+four
+five
+six
+seven
+eight
+nine
+colon
+semicolon
+less
+equal
+greater
+question
+at
+A
+B
+C
+D
+E
+F
+G
+H
+I
+J
+K
+L
+M
+N
+O
+P
+Q
+R
+S
+T
+U
+V
+W
+X
+Y
+Z
+bracketleft
+backslash
+bracketright
+asciicircum
+underscore
+grave
+a
+b
+c
+d
+e
+f
+g
+h
+i
+j
+k
+l
+m
+n
+o
+p
+q
+r
+s
+t
+u
+v
+w
+x
+y
+z
+braceleft
+bar
+braceright
+asciitilde
+delete
+
+% 0x8
+.notdef
+.notdef
+quotesinglbase
+florin
+quotedblbase
+ellipsis
+dagger
+daggerdbl
+circumflex
+perthousand
+Scaron
+guilsinglleft
+OE
+.notdef
+.notdef
+.notdef
+
+% 0x9
+.notdef
+quoteleft
+quoteright
+quotedblleft
+quotedblright
+bullet
+endash
+emdash
+tildeaccent
+trademark
+scaron
+guilsinglright
+oe
+.notdef
+.notdef
+Ydieresis
+
+% 0xa
+nobreakspace
+exclamdown
+cent
+sterling
+currency
+yen
+brokenbar
+section
+dieresis
+copyright
+ordfeminine
+guillemotleft
+logicalnot
+softhyphen
+registered
+macron
+
+% 0xb
+degree
+plusminus
+twosuperior
+threesuperior
+acute
+mu
+paragraph
+periodcentered
+cedilla
+onesuperior
+ordmasculine
+guillemotright
+onequarter
+onehalf
+threequarters
+questiondown
+
+% 0xc0
+Agrave
+Aacute
+Acircumflex
+Atilde
+Adieresis
+Aring
+AE
+Ccedilla
+Egrave
+Eacute
+Ecircumflex
+Edieresis
+Igrave
+Iacute
+Icircumflex
+Idieresis
+
+% 0xd0
+Eth
+Ntilde
+Ograve
+Oacute
+Ocircumflex
+Otilde
+Odieresis
+multiply
+Oslash
+Ugrave
+Uacute
+Ucircumflex
+Udieresis
+Yacute
+Thorn
+germandbls
+
+% 0xe0
+agrave
+aacute
+acircumflex
+atilde
+adieresis
+aring
+ae
+ccedilla
+egrave
+eacute
+ecircumflex
+edieresis
+igrave
+iacute
+icircumflex
+idieresis
+
+% 0xf0
+eth
+ntilde
+ograve
+oacute
+ocircumflex
+otilde
+odieresis
+divide
+oslash
+ugrave
+uacute
+ucircumflex
+udieresis
+yacute
+thorn
+ydieresis
diff --git a/data/zdingbat.enc b/data/zdingbat.enc
new file mode 100644
index 0000000..5263698
--- /dev/null
+++ b/data/zdingbat.enc
@@ -0,0 +1,260 @@
+% Encoding used for Zapf Dingbats and probably nothing else.
+% Wonderfully descriptive names here: ax is the ``N'' number in
+% pzdr.afm.
+Zapf Dingbats
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+space
+a1
+a2
+a202
+a3
+a4
+a5
+a119
+a118
+a117
+a11
+a12
+a13
+a14
+a15
+a16
+a105
+a17
+a18
+a19
+a20
+a21
+a22
+a23
+a24
+a25
+a26
+a27
+a28
+a6
+a7
+a8
+a9
+a10
+a29
+a30
+a31
+a32
+a33
+a34
+a35
+a36
+a37
+a38
+a39
+a40
+a41
+a42
+a43
+a44
+a45
+a46
+a47
+a48
+a49
+a50
+a51
+a52
+a53
+a54
+a55
+a56
+a57
+a58
+a59
+a60
+a61
+a62
+a63
+a64
+a65
+a66
+a67
+a68
+a69
+a70
+a71
+a72
+a73
+a74
+a203
+a75
+a204
+a76
+a77
+a78
+a79
+a81
+a82
+a83
+a84
+a97
+a98
+a99
+a100
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+.notdef
+a101
+a102
+a103
+a104
+a106
+a107
+a108
+a112
+a111
+a110
+a109
+a120
+a121
+a122
+a123
+a124
+a125
+a126
+a127
+a128
+a129
+a130
+a131
+a132
+a133
+a134
+a135
+a136
+a137
+a138
+a139
+a140
+a141
+a142
+a143
+a144
+a145
+a146
+a147
+a148
+a149
+a150
+a151
+a152
+a153
+a154
+a155
+a156
+a157
+a158
+a159
+a160
+a161
+a163
+a164
+a196
+a165
+a192
+a166
+a167
+a168
+a169
+a170
+a171
+a172
+a173
+a162
+a174
+a175
+a176
+a177
+a178
+a179
+a193
+a180
+a199
+a181
+a200
+a182
+.notdef
+a201
+a183
+a184
+a197
+a185
+a194
+a198
+a186
+a195
+a187
+a188
+a189
+a190
+a191
+
diff --git a/doc/.cvsignore b/doc/.cvsignore
new file mode 100644
index 0000000..f3c7a7c
--- /dev/null
+++ b/doc/.cvsignore
@@ -0,0 +1 @@
+Makefile
diff --git a/fontconvert/.cvsignore b/fontconvert/.cvsignore
new file mode 100644
index 0000000..77d8dee
--- /dev/null
+++ b/fontconvert/.cvsignore
@@ -0,0 +1 @@
+M.depend
diff --git a/fontconvert/.gdbinit b/fontconvert/.gdbinit
new file mode 100644
index 0000000..64a316d
--- /dev/null
+++ b/fontconvert/.gdbinit
@@ -0,0 +1,165 @@
+directory ../lib
+directory ../gf
+directory ../pk
+directory ../tfm
+#
+define redo
+file fontconvert
+end
+#
+#set args -verbose -remap=::a,000:-1,,a:b,b:: cmr10
+#set args pbkl -dpi=85 -verbose -gf \
+#-omit 0,9,0240,0241,0255,0261,0262,0263,0266,0267,0270,0271,0272,0275,\
+#0302,0303,\
+#0305,0306,0312,0313,0314,0315,0322,0323,0324,0350,0351,0352,0353,0361 \
+#-remap 0245:0267,0246:0266,0247:0373,\
+#0250:0322,0251:0323,0252:0324,0253:0302,0254:0310,0256:0341,0257:0351,\
+#0264:0245,\
+#0273:0343,0274:0353,0277:0371,\
+#0301:0241,0304:0240,0307:0253,\
+#0310:0273,0316:0352,0317:0372,\
+#0341:0264,0343:0271,\
+#0370:0305,0371:0306,0372:0307,0373:0312
+#set args -verbose -gf -column-split=v@114,285,395,499 ../imgtogf/ggmb14x.1200
+#set args -verbose -gf -column-split=0220@188 -column-split=0224@174 \
+# ../imgtogf/ggmbi14.1200
+#set args -gf -tfm -baseline-adjust=a:-8,c:-8,e:-6,f:-1,h:-2,i:-2,k:-2,l:-1,\
+#m:-1,n:-1,o:-2,r:-1,x:-1,z:-1 \
+# -verbose -ou=../ourfonts/ggmr30i ../ourfonts/ggmr30h.1200
+#set args -verbose \
+# -fontdimens=1:3.4,space:4.9 -fontdimens=xheight:.6,17:28.1 -tfm \
+# dingbat
+#set args -verbose -tfm \
+# -fontdimens=space:10,stretch:3,shrink:1,xheight:12,quad:30,\
+#extraspace:2 \
+# ../ourfonts/ggmr30i.1200
+#set args -verbose -gf ../ourfonts/ggmr30i.1200gf \
+# -output-file=../ourfonts/ggmr30j \
+# -remap=0243:0277,0256:034,0257:035,0260:033,0326:036,0327:037,\
+#0341:0306,0352:0327,0361:0346,0372:0367
+#set args -verbose -epsf ./msg64.300gf
+#set args -remap 060:0200,061:0201,062:0202,063:0203,064:0204,065:0205,\
+# 066:0206,067:0207,070:0210,071:0211,033:013,034:014,035:015,036:016,\
+# 037:017,0277:0243,0327:036,0367:033 \
+# -dpi 1200 -gf -output-file foo -verbose ../charspace/ggmr30n
+#set args -dpi 1200 -tfm -output-file ../ourfonts/0930 ../imagetofont/0930.1200gf
+#set args -dpi 1200 -tfm -output-file ../ourfonts/ctst30 ../imagetofont/ctst30.1200gf
+#set args -dpi 1200 -tfm -output-file ../ourfonts/ctst30 ../imagetofont/ctst30.1200gf
+#set args -dpi 1200 -gf -output-file ../ourfonts/ggmr30p \
+# -concat ../ourfonts/0930.1200gf ../ourfonts/ggmr30o.1200gf
+#set args -dpi 1200 -gf -tfm -output-file ../ourfonts/ggmr30p -verbose\
+# -concat ../ourfonts/0930.1200gf ../ourfonts/ggmr30o.1200gf
+#set args -dpi 1200 -baseline-adjust 0372:10,0373:10 -tfm -gf \
+# -output-file ../ourfonts/ggmc30b ../ourfonts/ggmc30a.1200gf
+#
+# test output files.
+#set args -verbose -dpi 1200 -tfm -output-file foo.tfm ../ourfonts/0930.1200gf
+#set args -verbose -dpi 1200 -epsf -output-file foo ../ourfonts/0930.1200gf
+#set args -verbose -dpi 1200 -epsf -output-file foo.bar ../ourfonts/0930.1200gf
+#set args -verbose -dpi 1200 -gf -tfm -output-file foo.bar ../ourfonts/0930.1200gf
+#set args -verbose -dpi 1200 -gf ../ourfonts/0930.1200gf
+#set args -verbose -dpi 1200 -tfm ../ourfonts/0930.1200gf
+#
+#set args -verbose -dpi 1200 -tfm -output-file ../ourfonts/ggmr30s \
+# ../ourfonts/ggmr30s
+#
+# test -tfm-header option
+#set args -verbose -dpi 1200 -tfm -output-file ../ourfonts/foo30 \
+# -tfm-header checksum:5,designsize:24,codingscheme:fooscheme \
+# -fontdimens slant:3,space:2 ../ourfonts/foo30.1200gf
+#set args -verbose -dpi 1200 -tfm -output-file ../ourfonts/foo30 \
+# -tfm-header checksum:5,designsize:24,codingscheme:fooscheme \
+# ../ourfonts/foo30.1200gf
+#
+# test -design-size, checksum zeroing
+#set args -verbose -dpi 1200 -tfm -gf -output-file ../ourfonts/foo30 \
+# -tfm-header designsize:20 -design-size 30 ../ourfonts/foo30.1200gf
+#
+# scale ggm*30 to ggm*26 with TFM header only
+#set args -verbose -dpi 1200 -tfm -output-file ../ourfonts/ggmr26a \
+# -tfm-header designsize:26 ../ourfonts/ggmr30u
+#set args -verbose -dpi 1200 -tfm -output-file ../ourfonts/ggmc26a \
+# -tfm-header designsize:26 ../ourfonts/ggmc30b
+#
+# make a small tfm files with ligatures fi, fl, among other things.
+#set args -verbose -range 013-l -tfm -gf -output-file ffl10 cmr10
+# omit l, so no more fl or ffl.
+#set args -verbose -range 013-i -tfm -gf -output-file ffi10 cmr10
+# omit ff, so no ffi, ffl.
+#set args -verbose -range 014-l -tfm -gf -output-file fl10 cmr10
+# should delete all kerns but 67 for 65.
+#set args -verbose -range 65-67 -tfm -gf -output-file ac10 cmr10
+# remap 65's kern 67 character to 68.
+#set args -verbose -range 65-67 -remap 67:68 -tfm -gf -output-file ad10 cmr10
+# remap 11's lig character 108 to 109 and its destination 15 to 16.
+#set args -verbose -range 11-108 -remap 108:109,15:16 -tfm -gf \
+# -output-file rffl10 cmr10
+#
+# test -design-size option.
+#set args -verbose -tfm -gf -output-file ds -range a-a \
+# -tfm-header designsize:0 cmr10
+#set args -verbose -tfm -gf -output-file ds -range a-a -design-size 0 \
+# -tfm-header checksum:1 cmr10
+#set args -verbose -tfm -gf -output-file ds -range a-a -design-size 0 crm10
+#set args -verbose -tfm -gf -output-file ds -range a-a -design-size 12 cmr10
+#
+# scale ggm*30 to ggm*26 with global -design-size option.
+#set args -verbose -dpi 1200 -tfm -gf -output-file ../ourfonts/ggmr26a \
+# -design-size 26 ../ourfonts/ggmr30u
+#set args -verbose -dpi 1200 -tfm -gf -output-file ../ourfonts/ggmc26a \
+# -design-size 26 ../ourfonts/ggmc30b
+#
+# add space to ggmr26b->ggmr26c
+#set args -verbose -dpi 1200 -tfm -gf -output-file ../ourfonts/ggmr26c \
+# -fontdimens space:11.5 ../ourfonts/ggmr26b
+#
+#set args -tfm -verbose ../ourfonts/bodoni/gbdrsp.1200
+#set args -verbose -tfm ../imageto/slashsp.1200
+#set args -verbose -tfm \
+# -tfm-header codingscheme:"GNU Latin Text",designsize:72 \
+# ../imageto/slash10.1200
+#
+#set args -verbose -gf -text cmr10.300 -out=xcmr10.300gf > cmr10.txt
+#
+# Could have also used -range to get single Y.
+#set args -verbose -tfm -gf -dpi 1200 -encoding gnulatin \
+# -omit "`cat /w/ourfonts/garamond/r/ring/Y-r.omt`" \
+# -output-file /w/ourfonts/garamond/r/ring/Y-r \
+# /w/ourfonts/garamond/r/ring/ring10
+#
+# Remap Y-r's `J' (bitmap is a Y with a diresis) into `bracketleft' of Y-rb.
+#set args -verbose -tfm -gf -dpi 1200 -encoding gnulatin \
+# -remap J:bracketleft \
+# -output-file /w/ourfonts/garamond/r/ring/Y-rb \
+# /w/ourfonts/garamond/r/ring/Y-r
+#
+# Same as above, using -range; will obviate Y-rb; also change designsize.
+#set args -verbose -tfm -gf -dpi 1200 -encoding gnulatin \
+# -range \[-\[ \
+# -designsize 12.413793103 \
+# -output-file /w/ourfonts/garamond/r/ring/Y-r \
+# /w/ourfonts/garamond/r/ring/ring10
+#
+# Get ring's accents and set designsize (as per Y-r above) for for them.
+#set args -verbose -tfm -gf -dpi 1200 -encoding gnulatin \
+# -omit "`cat /w/ourfonts/garamond/r/ring/ring-r.omt`" \
+# -designsize 12.413793103 \
+# -output-file /w/ourfonts/garamond/r/ring/ring-r \
+# /w/ourfonts/garamond/r/ring/ring10
+#
+# Get adobe's characters and set designsize (as with ring above) for for them.
+#set args -verbose -tfm -gf -dpi 1200 -encoding gnulatin \
+# -omit "`cat /w/ourfonts/garamond/r/adobe/adobe.omt`" \
+# -designsize 12.413793103 \
+# -output-file /w/ourfonts/garamond/r/adobe/adobe \
+# /w/ourfonts/garamond/r/adobe/adobe10
+#
+#set args -verbose -tfm ../gsrenderfont/cmr.300
+
+#
+# Dingbats
+#
+#set args -verbose -tfm -encoding itcdingbat \
+# -output-file $ourfonts/dingbats/g111236 $ourfonts/dingbats/g111236.1200gf
+set args -verbose -tfm -encoding itcdingbat \
+ -output-file $ourfonts/dingbats/g140236 $ourfonts/dingbats/g140236.1200gf
diff --git a/fontconvert/main.c b/fontconvert/main.c
index a50b311..675fc49 100644
--- a/fontconvert/main.c
+++ b/fontconvert/main.c
@@ -1,6 +1,6 @@
/* fontconvert -- various operations on a bitmap font.
-Copyright (C) 1992 Free Software Foundation, Inc.
+Copyright (C) 1992, 2004 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -365,72 +365,72 @@ column_extract (bitmap_type source, unsigned start, unsigned finish)
/* This is defined in version.c. */
extern string version_string;
-#define USAGE "Options:
-<font_name> should be a filename, possibly with a resolution, e.g.,
+#define USAGE "Options:\n\
+<font_name> should be a filename, possibly with a resolution, e.g.,\n\
`cmr10' or `cmr10.300'.\n" \
GETOPT_USAGE \
-"baseline-adjust <char1>:<integer1>,<char2>:<integer2>,...: move the baseline
- of each <char> by the corresponding <integer>. A positive number
- moves the baseline up, a negative one down.
-column-split <char>@<column1>,...,<columnN>: split the character with
- code <char> (before remapping) before each of the <column>s, producing n
- new characters, with codes <char>, <char> + 1, ..., <char> + n, whose
- bitmaps go from 0 to <column1> - 1 (inclusive), then <column1> to
- <column2> - 1, ..., from <columnN> to the bitmap width.
- Give the <column>s in bitmap coordinates, i.e., starting at zero.
- To split more than one character, give this option for each.
-concat <font_name>,<font_name>,...: concatenate the main input font with
- the given <font_name>s; if a character code exists in more than one
- font, it's the first occurrence that counts.
-designsize <real>: use this as the design size for both the GF and TFM
- output files, if any, unless overridden by `designsize' in the
- `tfm-header' option.
-dpi <unsigned>: use a resolution of <unsigned>; default is 300.
-encoding <filename>: read encoding information for the character specs
- from `<filename>.enc'; there is no default. Must come before any
- options which use character specs.
-epsf: output each character as an Encapsulated PostScript file named
- <font_name>-<code>.eps, where <code> is the character code in decimal.
-filter-passes <unsigned>: do the filtering this many times on each
- character; default is 0.
-filter-size <unsigned>: half the size of the filter cell, i.e., a side
- is this number * 2 + 1; default is 1.
-filter-threshold <real>: if the average of the pixels in the filter cell
- is greater than this, change the pixel; default is .5.
-fontdimens <fontdimen>:<real>,<fontdimen>:<real>,...: assign each <real>
- to the corresponding <fontdimen> when outputting a TFM file. A
- <fontdimen> can be either one of the standard names (in either upper
- or lowercase), or a number between 1 and 30. Each <real> is taken to
- be in points (except in the case of the <fontdimen> `slant' (parameter
- 1), which is a dimensionless number).
-gf: write a GF file to `<font_name>.<dpi>gf'. If this would overwrite the
- input file, write to `x<font_name>.<dpi>gf' instead.
-help: print this message.
-omit <char1>,<char2>,...: omit the characters with the given codes or names
- (before remapping) from the output.
-output-file <filename>: use <filename> as the output filename if it has
- a suffix, and as the base of the output files if it doesn't. It
- cannot have a suffix if using the `epsf' option, or both the `gf' and the
- `tfm' option. Default is the base part of the input font name.
-random <real>: move each pixel a (uniformly) random distance between
- -<real> and <real> in both x and y; default is 0.
-random-threshold <real>: if randomizing, do not move pixels with
- probability <real>; default is 0.2.
-range <char1>-<char2>: only process characters between <char1> and
- <char2> in the input font, inclusive.
-remap <char1>:<char2>,<char1>:<char2>,...: for each pair, make the input
- character with code <char1> have code <char2> in the output.
-text: output the font to stdout as plain text, using `*'s and ` 's.
-tfm: write a TFM file to `<font_name>.tfm'. If this would overwrite the
- input file, write to `x<font_name>.tfm' instead.
-tfm-header: <header-item>:<value>,<header-item>:<value>,...: assign each
- <value> to the corresponding <header-item> when outputting a TFM file.
- A <header-item> is one of `checksum', `designsize' or `codingscheme',
- with casefolding. `checksum' requires an unsigned integer,
- `designsize' a real, with 1.0 <= designsize < 2048, and `codingscheme'
- a string of length less than 40 containing no parens or commas.
-verbose: print brief progress reports on stdout.
-version: print the version number of this program.
+"baseline-adjust <char1>:<integer1>,<char2>:<integer2>,...: move the baseline\n\
+ of each <char> by the corresponding <integer>. A positive number\n\
+ moves the baseline up, a negative one down.\n\
+column-split <char>@<column1>,...,<columnN>: split the character with\n\
+ code <char> (before remapping) before each of the <column>s, producing n\n\
+ new characters, with codes <char>, <char> + 1, ..., <char> + n, whose\n\
+ bitmaps go from 0 to <column1> - 1 (inclusive), then <column1> to\n\
+ <column2> - 1, ..., from <columnN> to the bitmap width.\n\
+ Give the <column>s in bitmap coordinates, i.e., starting at zero.\n\
+ To split more than one character, give this option for each.\n\
+concat <font_name>,<font_name>,...: concatenate the main input font with\n\
+ the given <font_name>s; if a character code exists in more than one\n\
+ font, it's the first occurrence that counts.\n\
+designsize <real>: use this as the design size for both the GF and TFM\n\
+ output files, if any, unless overridden by `designsize' in the\n\
+ `tfm-header' option.\n\
+dpi <unsigned>: use a resolution of <unsigned>; default is 300.\n\
+encoding <filename>: read encoding information for the character specs\n\
+ from `<filename>.enc'; there is no default. Must come before any\n\
+ options which use character specs.\n\
+epsf: output each character as an Encapsulated PostScript file named\n\
+ <font_name>-<code>.eps, where <code> is the character code in decimal.\n\
+filter-passes <unsigned>: do the filtering this many times on each\n\
+ character; default is 0.\n\
+filter-size <unsigned>: half the size of the filter cell, i.e., a side\n\
+ is this number * 2 + 1; default is 1.\n\
+filter-threshold <real>: if the average of the pixels in the filter cell\n\
+ is greater than this, change the pixel; default is .5.\n\
+fontdimens <fontdimen>:<real>,<fontdimen>:<real>,...: assign each <real>\n\
+ to the corresponding <fontdimen> when outputting a TFM file. A\n\
+ <fontdimen> can be either one of the standard names (in either upper\n\
+ or lowercase), or a number between 1 and 30. Each <real> is taken to\n\
+ be in points (except in the case of the <fontdimen> `slant' (parameter\n\
+ 1), which is a dimensionless number).\n\
+gf: write a GF file to `<font_name>.<dpi>gf'. If this would overwrite the\n\
+ input file, write to `x<font_name>.<dpi>gf' instead.\n\
+help: print this message.\n\
+omit <char1>,<char2>,...: omit the characters with the given codes or names\n\
+ (before remapping) from the output.\n\
+output-file <filename>: use <filename> as the output filename if it has\n\
+ a suffix, and as the base of the output files if it doesn't. It\n\
+ cannot have a suffix if using the `epsf' option, or both the `gf' and the\n\
+ `tfm' option. Default is the base part of the input font name.\n\
+random <real>: move each pixel a (uniformly) random distance between\n\
+ -<real> and <real> in both x and y; default is 0.\n\
+random-threshold <real>: if randomizing, do not move pixels with\n\
+ probability <real>; default is 0.2.\n\
+range <char1>-<char2>: only process characters between <char1> and\n\
+ <char2> in the input font, inclusive.\n\
+remap <char1>:<char2>,<char1>:<char2>,...: for each pair, make the input\n\
+ character with code <char1> have code <char2> in the output.\n\
+text: output the font to stdout as plain text, using `*'s and ` 's.\n\
+tfm: write a TFM file to `<font_name>.tfm'. If this would overwrite the\n\
+ input file, write to `x<font_name>.tfm' instead.\n\
+tfm-header: <header-item>:<value>,<header-item>:<value>,...: assign each\n\
+ <value> to the corresponding <header-item> when outputting a TFM file.\n\
+ A <header-item> is one of `checksum', `designsize' or `codingscheme',\n\
+ with casefolding. `checksum' requires an unsigned integer,\n\
+ `designsize' a real, with 1.0 <= designsize < 2048, and `codingscheme'\n\
+ a string of length less than 40 containing no parens or commas.\n\
+verbose: print brief progress reports on stdout.\n\
+version: print the version number of this program.\n\
"
/* We return the name of the font to process. */
diff --git a/gf/.cvsignore b/gf/.cvsignore
new file mode 100644
index 0000000..77d8dee
--- /dev/null
+++ b/gf/.cvsignore
@@ -0,0 +1 @@
+M.depend
diff --git a/gf/gf_input.c b/gf/gf_input.c
index d0c81e6..a5f6ace 100644
--- a/gf/gf_input.c
+++ b/gf/gf_input.c
@@ -1,6 +1,6 @@
/* gf_input.c: read objects from one GF file.
-Copyright (C) 1992 Free Software Foundation, Inc.
+Copyright (C) 1992, 2004 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -94,7 +94,7 @@ boolean
gf_open_input_file (string filename)
{
if (gf_input_file != NULL)
- FATAL2 ("gf_open_input_file: Attempt to open `%s', but `%s' is
+ FATAL2 ("gf_open_input_file: Attempt to open `%s', but `%s' is \
already open", filename, gf_input_filename);
gf_input_filename = filename;
diff --git a/imageto/.cvsignore b/imageto/.cvsignore
new file mode 100644
index 0000000..77d8dee
--- /dev/null
+++ b/imageto/.cvsignore
@@ -0,0 +1 @@
+M.depend
diff --git a/imageto/.gdbinit b/imageto/.gdbinit
new file mode 100644
index 0000000..17d0d31
--- /dev/null
+++ b/imageto/.gdbinit
@@ -0,0 +1,129 @@
+directory ../gf
+directory ../pbm
+directory ../pk
+directory ../lib
+
+define redo
+file imageto
+end
+
+set environment TFMINPUTS = $ourfonts/dingbats/
+set environment TFMFONTS = $ourfonts/dingbats/
+set environment TEXMFOUTPUT = $ourfonts/dingbats/
+#set environment KPATHSEA_DEBUG = -1
+
+
+
+# Bodoni.
+#set args -verbose -encoding-file=encoding.bdk -baselines=285,301,399 \
+# -clean-threshold=.4 -print-guidelines bdk
+#set args -verbose -encoding-file=encoding.bdb -baselines 265,280,296 bdb
+# Some junk is between the first two real lines, and a black bar is after
+# the last. Hence the two extra baselines.
+#set args -verbose -encoding-file=encoding.bdki -baselines=286,12,293,322,1 \
+# -clean-threshold=25 -range=I-I -nchars=1 -print-clean-info bdki
+#set args -verbose -encoding-file=encoding.tmi -print-guidelines \
+# -print-clean-info -design-size=72 -clean-threshold=30 -nchars=6 tmi
+
+# Atlas (15 June 92)
+#set args -verbose -strips ../ourfonts/garamond/atlas/ggmr.img
+#set args -verbose -baselines=327,338,342 -clean-threshold=23 \
+# -print-guidelines -print-clean-info \
+# -designsize=30 -encoding=gnulatin \
+# -output-file=../ourfonts/garamond/atlas/ggmr \
+# ../ourfonts/garamond/atlas/ggmr.img
+
+#set args -verbose -baselines=1,335,1,340,333 -clean-threshold=31 \
+# -design-size=30 ../images/ggmri
+#set args -verbose -strips ../images/ggmi
+#set args -verbose -baselines=154,156,155 \
+# -design-size=14 ../images/ggmb
+#set args -verbose -baselines=152,158,160,161,162 -clean-threshold=36 \
+# -design-size=14 ../images/ggmbi
+
+# 09
+#set args -print-guidelines -design-size=30 -dpi 1200 -input-format=img \
+# -verbose -info-file ../data/09.ifi -baselines 57 ../img/09.img
+#set args -print-guidelines -design-size=30 -dpi 1200 -input-format=img \
+# -verbose -info-file ../data/09.ifi -output-file ../fonts/0930a \
+# -baselines 57 ../img/09.img
+#set args -print-guidelines -design-size=30 -dpi 1200 -input-format=img \
+# -verbose -info-file ctst -output-file ../fonts/ggmc ../img/ctst.img
+#set args -print-guidelines -design-size=30 -dpi 1200 -input-format=img \
+# -verbose -info-file 09 ../fonts/09.img
+#set args -verbose -strips -output-file ../ourfonts/garamond/r/09/09 \
+# ../ourfonts/garamond/r/09/09.img
+#
+# ctst
+#set args -design-size=30 -dpi 1200 -input-format=img -verbose \
+# -strips ../ourfonts/img/ctst.img
+#set args -design-size=30 -dpi 1200 -input-format=img -verbose \
+# -info-file ../ourfonts/ifi/ctst ../ourfonts/img/ctst.img
+#
+# fract
+#set args -verbose -strips -output-file fract ../ourfonts/garamond/img/fract.img
+#set args -verbose -dpi 1200 -print-guidelines -print-clean-info \
+# -output-file fract -nchars 5 \
+# ../ourfonts/garamond/img/fract.img > fract.log
+#set args -verbose -dpi 1200 -print-guidelines -print-clean-info \
+# -output-file fract ../ourfonts/garamond/img/fract.img
+#set args -verbose -strips -output-file adobe ../ourfonts/garamond/img/adobe.img
+#set args -verbose -input-format pbm -trace-scanlines -dpi 1 test.pbm
+#
+#set args -verbose -dpi 1200 -print-guidelines \
+# -output-file fract ../ourfonts/garamond/img/fract.img \
+#set args -verbose -dpi 1200 -print-guidelines -baselines 155\
+# -output-file fract ../ourfonts/garamond/img/fract.img
+#
+# tsch
+#set args -verbose -strips -output-file tsch \
+# ../ourfonts/garamond/img/tsch.img
+#set args -verbose -dpi 1200 -print-guidelines \
+# -output-file tsch ../ourfonts/garamond/img/tsch.img
+#set args -verbose -dpi 1200 -print-guidelines -baselines 192,0,20\
+# -output-file tsch ../ourfonts/garamond/img/tsch.img
+#
+# After adding -encoding option:
+# ring
+#set args -verbose -print-guidelines -print-clean-info -encoding gnulatin \
+# -baselines 59 -info-file ../ourfonts/garamond/r/ring/ring.ifi \
+# -output-file ../ourfonts/garamond/r/ring/ring \
+# ../ourfonts/garamond/r/ring/ring.img
+#set args -verbose -strips -output-file ../ourfonts/garamond/r/ring/ring
+# ../ourfonts/garamond/r/ring/ring.img
+#
+# adobe
+#set args -verbose -print-guidelines -print-clean-info -encoding gnulatin \
+# -info-file ../ourfonts/garamond/r/adobe/adobe.ifi \
+# -output-file ../ourfonts/garamond/r/adobe/adobe \
+# ../ourfonts/garamond/r/adobe/adobe.img
+#
+# chart
+#set args -verbose -strips -output-file ../ourfonts/garamond/r/chart/chart \
+# ../ourfonts/garamond/r/chart/chart.img
+#set args -verbose -print-guidelines -print-clean-info -encoding gnulatin \
+# -info-file ../ourfonts/garamond/r/chart/chart.ifi \
+# -output-file ../ourfonts/garamond/r/chart/chart \
+# -clean-threshold 38 -nchars 8 ../ourfonts/garamond/r/chart/chart.img
+#
+# percent
+#set args -verbose -strips -output-file ../ourfonts/garamond/r/percent/perc \
+# ../ourfonts/garamond/r/percent/perc.img
+#set args -verbose -print-guidelines -print-clean-info -encoding gnulatin \
+# -info-file ../ourfonts/garamond/r/percent/perc.ifi \
+# -output-file ../ourfonts/garamond/r/percent/perc \
+# ../ourfonts/garamond/r/percent/perc.img
+#
+# finding out about bb info with atlas (20 Sep 92)
+#set args -verbose -print-guidelines -print-clean-info -nchars=26 \
+#-baselines=121 \
+#-info=$garamond/atlas/first -encoding=gnulatin $garamond/atlas/ggmr.img
+#
+#set args -verb -enc=adobestd -dpi=300 ../gsrenderfont/rpagd.pbm -o=rpagd.150gf
+#set args -verb -epsf map300.img
+#
+# Dingbats
+#set args -verbose -designsize=36 -encoding itcdingbat.enc -print-clean-info \
+# -output-file $ourfonts/dingbats/g1112 $ourfonts/dingbats/g1112.img
+set args -verbose -designsize=36 -encoding itcdingbat.enc -print-clean-info \
+ -output-file $ourfonts/dingbats/g1402 $ourfonts/dingbats/g1402.img
diff --git a/imageto/main.c b/imageto/main.c
index e3215c8..991949a 100644
--- a/imageto/main.c
+++ b/imageto/main.c
@@ -1,6 +1,6 @@
/* imageto -- convert a scanned image.
-Copyright (C) 1992 Free Software Foundation, Inc.
+Copyright (C) 1992, 2004 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -222,41 +222,41 @@ print_scanline (one_byte line[], unsigned width)
/* This is defined in version.c. */
extern string version_string;
-#define USAGE "Options:
-<font_name> should be a base filename, e.g., `ggmr'. (More properly, it
+#define USAGE "Options:\n\
+<font_name> should be a base filename, e.g., `ggmr'. (More properly, it\n\
is an <image_name>, not a <font_name>.)" \
GETOPT_USAGE \
-"baselines <row1>,<row2>,...: define the baselines for each image row.
- The baseline of the first image row is taken to be scanline <row1>, etc.
-designsize <real>: set the designsize of the font to <real>; default is 10.0.
-dpi <unsigned>: resolution (required for pbm input).
-encoding <filename>: read ligature and other encoding information
- from `<filename>.enc'; the default is to assign successive character codes.
-epsf: write the image as an Encapsulated PostScript file, instead of a
- bitmap font.
-help: print this message.
-ifi-file <filename>: use <filename>.ifi (if <filename doesn't have a
- suffix; otherwise use <filename>) for the IFI filename; default is
- `<font_name>.ifi'.
-input-format <format>: specify format of input image; <format> must be
- one of `pbm' or `img'.
-nchars <unsigned>: only write the first <unsigned> (approximately)
- characters to the font; default is infinity.
-output-file <filename>: write to <filename> if <filename> has a suffix.
- If <filename> doesn't have a suffix, then if writing strips, write to
- <filename>sp.<dpi>gf and to <filename>.<dpi>gf if not. By default,
- use <font_name> for <filename>.
-print-clean-info: print gray values for the bounding boxes that are
- considered for cleaning. This implies `-verbose'.
-print-guidelines: print the numbers of the top and bottom rows (in that
- order) of each character. This implies `-verbose'.
-range <char1>-<char2>: only output characters between <char1> and
- <char2>, inclusive.
-strips: take a constant number of scanlines as each character,
- instead of using an IFI file to analyze the image.
-trace-scanlines: show every scanline as we read it.
-verbose: output progress reports.
-version: print the version number of this program.
+"baselines <row1>,<row2>,...: define the baselines for each image row.\n\
+ The baseline of the first image row is taken to be scanline <row1>, etc.\n\
+designsize <real>: set the designsize of the font to <real>; default is 10.0.\n\
+dpi <unsigned>: resolution (required for pbm input).\n\
+encoding <filename>: read ligature and other encoding information\n\
+ from `<filename>.enc'; the default is to assign successive character codes.\n\
+epsf: write the image as an Encapsulated PostScript file, instead of a\n\
+ bitmap font.\n\
+help: print this message.\n\
+ifi-file <filename>: use <filename>.ifi (if <filename doesn't have a\n\
+ suffix; otherwise use <filename>) for the IFI filename; default is\n\
+ `<font_name>.ifi'.\n\
+input-format <format>: specify format of input image; <format> must be\n\
+ one of `pbm' or `img'.\n\
+nchars <unsigned>: only write the first <unsigned> (approximately)\n\
+ characters to the font; default is infinity.\n\
+output-file <filename>: write to <filename> if <filename> has a suffix.\n\
+ If <filename> doesn't have a suffix, then if writing strips, write to\n\
+ <filename>sp.<dpi>gf and to <filename>.<dpi>gf if not. By default,\n\
+ use <font_name> for <filename>.\n\
+print-clean-info: print gray values for the bounding boxes that are\n\
+ considered for cleaning. This implies `-verbose'.\n\
+print-guidelines: print the numbers of the top and bottom rows (in that\n\
+ order) of each character. This implies `-verbose'.\n\
+range <char1>-<char2>: only output characters between <char1> and\n\
+ <char2>, inclusive.\n\
+strips: take a constant number of scanlines as each character,\n\
+ instead of using an IFI file to analyze the image.\n\
+trace-scanlines: show every scanline as we read it.\n\
+verbose: output progress reports.\n\
+version: print the version number of this program.\n\
"
static string
diff --git a/include/Bitmap.h b/include/Bitmap.h
new file mode 100644
index 0000000..ac1470c
--- /dev/null
+++ b/include/Bitmap.h
@@ -0,0 +1,121 @@
+/* Bitmap.h: public header file for a bitmap widget, implemented as a
+ subclass of Athena's Label widget.
+
+Copyright (C) 1992 Free Software Foundation, Inc.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+#ifndef BITMAP_WIDGET_H
+#define BITMAP_WIDGET_H
+
+#include "xt-common.h"
+#include <X11/Xaw/Label.h>
+
+#include "bitmap.h"
+
+
+/* Resources (in addition to those in Core, Simple, and Label):
+
+Name Class RepType Default Value
+---- ----- ------- -------------
+bits Bitmap Pointer NULL
+ A pointer to a `bitmap_type' structure (see `include/bitmap.h') that
+ is what is actually displayed. I didn't want to name this resource
+ `bitmap', since there is already a `bitmap' resource in the Label
+ widget, and the two are different. (In fact, `bits' becomes the
+ Label's `bitmap'.)
+
+expansion Expansion Dimension 16
+ How many times each pixel in the bitmap is replicated.
+
+modified Modified Boolean False
+ This readonly resource says whether or not the bitmap has been modified.
+
+shadow Bitmap BitmapWidget NULL
+ A replica of the widget, possibly with a different expansion
+ (typically, in fact, the shadow bitmap has expansion one). When a
+ pixel in the widget is changed and repainted via the InvertPixel
+ action (see the `translations' resource below), the corresponding
+ pixel in the shadow widget is also changed and repainted.
+
+translations Translations TranslationTable NULL
+ The event bindings associated with this widget. The Bitmap widget
+ provides an action `InvertPixel', which inverts the value of the pixel
+ the pointer is on. `InvertPixel' takes one parameter, which must be
+ one of the symbols `Discrete' or `Continuous' (case is significant).
+ In the latter case, the pixel is only changed if the pointer was 1) not
+ at that same pixel on the last invocation, and 2) on a pixel that is
+ of the opposite color as the pixel at the time of the last `Discrete'
+ invocation. Why? Because it is most useful to be able to move the
+ pointer and change pixels to either black or white, not invert them.
+
+ The Bitmap widget also provides two related sets of actions for copying
+ parts of characters. For the purposes of these actions, imagine that
+ the ``hot spots'' of each pixel in the large bitmap are at the upper
+ left of the visible square. StartSelection() begins a selection
+ operation at the nearest pixel above and to the left of the current
+ point. AdjustSelection() changes the selected rectangle according to
+ the nearest pixel below and to the right of the current pixel; the
+ new point can be in any relationship to the initial point.
+ AcceptSelection() takes the current selection as the final one.
+
+ Once a rectangle has been selected, you can paste it in the same or
+ another character: StartPaste() shows the selected rectangle and
+ MovePaste() moves it around. AcceptPaste(Opaque) changes the bitmap
+ destructively, i.e., each pixel in the selected rectangle overwrites
+ the pixel in the bitmap. AcceptPaste(Transparent) changes the bitmap
+ nondestructively, i.e., a black pixel in the bitmap will remain black.
+
+ Aside from pasting the selection, you can also fill it:
+ FillSelection() fills the current selection with the color of the
+ pixel the pointer is currently on.
+
+ To abort any selection or paste operation, simply move the pointer
+ outside the bitmap before finishing the operation.
+
+ By default, no events are bound to the actions. Default bindings
+ should be put in the app-defaults file.
+*/
+
+#ifndef XtCBitmap
+#define XtCBitmap "Bitmap"
+#endif
+#define XtCExpansion "Expansion"
+#define XtCModified "Modified"
+
+#define XtNbits "bits"
+
+#define XtNexpansion "expansion"
+#define BITMAP_DEFAULT_EXPANSION 16
+
+#define XtNmodified "modified"
+
+#define XtNshadow "shadow"
+
+/* Convenience procedures to get the interesting resources. */
+extern unsigned BitmapExpansion (Widget);
+extern bitmap_type *BitmapBits (Widget);
+extern Boolean BitmapModified (Widget);
+
+
+
+/* The class variable, for arguments to XtCreateWidget et al. */
+extern WidgetClass bitmapWidgetClass;
+
+/* The class record and instance record types. */
+typedef struct _BitmapClassRec *BitmapWidgetClass;
+typedef struct _BitmapRec *BitmapWidget;
+
+#endif /* not BITMAP_WIDGET_H */
diff --git a/include/Item.h b/include/Item.h
new file mode 100644
index 0000000..2d9b524
--- /dev/null
+++ b/include/Item.h
@@ -0,0 +1,72 @@
+/* Item.h: public header file for an ``item widget'': a composite widget
+ consisting of a label and a (string) value. Both subwidgets are
+ created by the Item itself, and geometry requests from them are
+ ignored.
+
+Copyright (C) 1992 Free Software Foundation, Inc.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+#ifndef ITEM_WIDGET_H
+#define ITEM_WIDGET_H
+
+#include "xt-common.h"
+
+#include <kpathsea/types.h>
+
+
+/* Resources (in addition to those in Core and Composite):
+
+Name Class RepType Default Value
+---- ----- ------- -------------
+callback Callback Callback NULL
+ These routines are called when the accept_value action (see below) is
+ performed. The call_data passed is the contents of the `value'
+ resource.
+
+label Label String name of widget
+ A constant string displayed before the editable text. The characters
+ in this string are copied by the Item widget.
+
+length Length Dimension 1
+ The longest `value' allowed, in characters.
+
+translations Translations TranslationTable NULL
+ The event bindings associated with this widget. The Item
+ provides an action `AcceptValue', which calls the routines in the
+ `callback' resource. `AcceptValue' does not take any parameters.
+
+ By default, no events are bound to `AcceptValue'. Default bindings
+ (perhaps to RET and CTRL-M) should be put in the app-defaults file.
+
+value Value String empty string
+ The editable text. The longest value allowed is the value of `length'.
+*/
+
+/* Convenience procedures. */
+extern string ItemGetLabelString (Widget);
+extern string ItemGetValueString (Widget);
+extern Widget ItemGetValueWidget (Widget);
+
+
+
+/* The class variable, for arguments to XtCreateWidget et al. */
+extern WidgetClass itemWidgetClass;
+
+/* The class and instance record types. */
+typedef struct _ItemClassRec *ItemWidgetClass;
+typedef struct _ItemRec *ItemWidget;
+
+#endif /* not ITEM_WIDGET_H */
diff --git a/include/bb-list.h b/include/bb-list.h
new file mode 100644
index 0000000..602cb91
--- /dev/null
+++ b/include/bb-list.h
@@ -0,0 +1,53 @@
+/* bb-list.h: bounding box lists.
+
+Copyright (C) 1992 Free Software Foundation, Inc.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+#ifndef BB_LIST_H
+#define BB_LIST_H
+
+#include "bounding-box.h"
+
+
+typedef struct
+{
+ bounding_box_type *data;
+ unsigned length;
+} bb_list_type;
+
+/* The length of the list. */
+#define BB_LIST_LENGTH(bb_l) ((bb_l).length)
+
+/* The array of elements as a whole. */
+#define BB_LIST_DATA(bb_l) ((bb_l).data)
+
+/* The Nth element in the list. */
+#define BB_LIST_ELT(bb_l, n) BB_LIST_DATA (bb_l)[n]
+
+
+/* Initialize a list. */
+extern bb_list_type bb_list_init (void);
+
+/* Append BB to L. */
+extern void bb_list_append (bb_list_type *l, bounding_box_type bb);
+
+/* Splice the elements in list B2 onto B1, changing B1. */
+extern void bb_list_splice (bb_list_type *B1, bb_list_type B2);
+
+/* Free the memory in a list. */
+extern void bb_list_free (bb_list_type *);
+
+#endif /* not BB_LIST_H */
diff --git a/include/bb-outline.h b/include/bb-outline.h
new file mode 100644
index 0000000..9ec8b7b
--- /dev/null
+++ b/include/bb-outline.h
@@ -0,0 +1,37 @@
+/* bb-outline.h: find a list of bounding boxes enclosing outlines.
+
+Copyright (C) 1992 Free Software Foundation, Inc.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+#ifndef BB_OUTLINE_H
+#define BB_OUTLINE_H
+
+#include "bb-list.h"
+#include "bitmap.h"
+#include <kpathsea/types.h>
+
+
+
+/* Find the bounding boxes around the outlines in the bitmap B. If ALL is
+ true, we find the bounding boxes around all the outlines, including
+ counterforms. If ALL is false, we find only ``outside'' outlines.
+ The character `a', for example, would be represented by one bounding
+ box. We don't look in any of the columns from LEFT to RIGHT,
+ left-inclusive. */
+extern bb_list_type
+ find_outline_bbs (bitmap_type b, boolean all, int left, int right);
+
+#endif /* not BB_OUTLINE_H */
diff --git a/include/bitmap.h b/include/bitmap.h
new file mode 100644
index 0000000..bd289da
--- /dev/null
+++ b/include/bitmap.h
@@ -0,0 +1,115 @@
+/* bitmap.h: definition for a bitmap type. No packing is done by
+ default; each pixel is represented by an entire byte. Among other
+ things, this means the type can be used for both grayscale and binary
+ images.
+
+Copyright (C) 1992, 93 Free Software Foundation, Inc.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+#ifndef BITMAP_H
+#define BITMAP_H
+
+#include <stdio.h>
+#include <kpathsea/types.h>
+#include "bounding-box.h"
+
+
+/* If the bitmap holds 8-bit values, rather than one-bit, the
+ definition of BLACK here is wrong. So don't use it in that case!
+ */
+#define WHITE 0
+#define BLACK 1
+
+
+/* The basic structure and macros to access it. */
+typedef struct
+{
+ dimensions_type dimensions;
+ one_byte *bitmap;
+} bitmap_type;
+
+/* The dimensions of the bitmap, in pixels. */
+#define BITMAP_DIMENSIONS(b) ((b).dimensions)
+
+/* The pixels, represented as an array of bytes (in contiguous storage).
+ Each pixel is a single byte, even for binary fonts. */
+#define BITMAP_BITS(b) ((b).bitmap)
+
+/* These are convenient abbreviations for getting inside the members. */
+#define BITMAP_WIDTH(b) DIMENSIONS_WIDTH (BITMAP_DIMENSIONS (b))
+#define BITMAP_HEIGHT(b) DIMENSIONS_HEIGHT (BITMAP_DIMENSIONS (b))
+
+/* This is the address of the first pixel in the row ROW. */
+#define BITMAP_ROW(b, row) (BITMAP_BITS (b) + (row) * BITMAP_WIDTH (b))
+
+/* This is the pixel at [ROW,COL]. */
+#define BITMAP_PIXEL(b, row, col) \
+ (*(BITMAP_BITS (b) + (row) * BITMAP_WIDTH (b) + (col)))
+
+#define BITMAP_VALID_PIXEL(b, row, col) \
+ (0 <= (row) && (row) < BITMAP_HEIGHT (b) \
+ && 0 <= (col) && (col) < BITMAP_WIDTH (b))
+
+/* Assume that the pixel at [ROW,COL] itself is black.
+ If it's not on the bitmap edge and it's surrounded by all black
+ pixels, then it's interior.
+*/
+#define BITMAP_INTERIOR_PIXEL(b, row, col) \
+ (0 != (row) && (row) != BITMAP_HEIGHT (b) - 1 \
+ && 0 != (col) && (col) != BITMAP_WIDTH (b) - 1 \
+ && BITMAP_PIXEL (b, row - 1, col - 1) == BLACK \
+ && BITMAP_PIXEL (b, row - 1, col) == BLACK \
+ && BITMAP_PIXEL (b, row - 1, col + 1) == BLACK \
+ && BITMAP_PIXEL (b, row, col - 1) == BLACK \
+ && BITMAP_PIXEL (b, row, col + 1) == BLACK \
+ && BITMAP_PIXEL (b, row + 1, col - 1) == BLACK \
+ && BITMAP_PIXEL (b, row + 1, col) == BLACK \
+ && BITMAP_PIXEL (b, row + 1, col + 1) == BLACK)
+
+/* Allocate storage for the bits, set them all to white, and return an
+ initialized structure. */
+extern bitmap_type new_bitmap (dimensions_type);
+
+/* Free that storage. */
+extern void free_bitmap (bitmap_type *);
+
+/* Make a fresh copy of BITMAP in a new structure, and return it. */
+extern bitmap_type copy_bitmap (bitmap_type bitmap);
+
+/* Return the pixels in the bitmap B enclosed by the bounding box BB.
+ The result is put in newly allocated storage. */
+extern bitmap_type extract_subbitmap (bitmap_type b, bounding_box_type bb);
+
+/* Consider the dimensions of a bitmap as a bounding box. The bounding
+ box returned is in bitmap coordinates, rather than Cartesian, and
+ refers to pixels, rather than edges. Specifically, this means that
+ the maximum column is one less than results from `dimensions_to_bb
+ (BITMAP_DIMENSIONS ())'. */
+extern const bounding_box_type bitmap_to_bb (const bitmap_type);
+
+/* Return a vector of zero-based column numbers marking transitions from
+ black to white or white to black in ROW, which is of length WIDTH.
+ The end of the vector is marked with an element of length WIDTH + 1.
+ The first element always marks a white-to-black transition (or it's
+ 0, if the first pixel in ROW is black). */
+extern unsigned *bitmap_find_transitions (const one_byte *row, unsigned width);
+
+/* Print part of or all of a bitmap. */
+extern void print_bounded_bitmap (FILE *, bitmap_type, bounding_box_type);
+extern void print_bitmap (FILE *, bitmap_type);
+
+#endif /* not BITMAP_H */
+
diff --git a/include/bounding-box.h b/include/bounding-box.h
new file mode 100644
index 0000000..1f89f8f
--- /dev/null
+++ b/include/bounding-box.h
@@ -0,0 +1,63 @@
+/* bounding-box.h: operations on both real- and integer-valued bounding boxes.
+
+Copyright (C) 1992 Free Software Foundation, Inc.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+#ifndef BOUNDING_BOX_H
+#define BOUNDING_BOX_H
+
+#include <kpathsea/types.h>
+
+
+/* The bounding box's numbers are usually in Cartesian/Metafont
+ coordinates: (0,0) is towards the lower left. */
+typedef struct
+{
+ signed_4_bytes min_row, max_row;
+ signed_4_bytes min_col, max_col;
+} bounding_box_type;
+
+typedef struct
+{
+ real min_row, max_row;
+ real min_col, max_col;
+} real_bounding_box_type;
+
+/* These accessing macros work for both types of bounding boxes, since
+ the member names are the same. */
+#define MIN_ROW(bb) ((bb).min_row)
+#define MAX_ROW(bb) ((bb).max_row)
+#define MIN_COL(bb) ((bb).min_col)
+#define MAX_COL(bb) ((bb).max_col)
+
+/* See the comments at `get_character_bitmap' in gf_input.c for why the
+ width and height are treated asymetrically. */
+#define BB_WIDTH(bb) (MAX_COL (bb) - MIN_COL (bb))
+#define BB_HEIGHT(bb) (MAX_ROW (bb) - MIN_ROW (bb) + 1)
+
+
+/* Convert a dimensions structure to an integer bounding box, and vice
+ versa. */
+extern const bounding_box_type dimensions_to_bb (dimensions_type);
+extern const dimensions_type bb_to_dimensions (bounding_box_type);
+
+
+/* Update the bounding box BB from the point P. */
+extern void update_real_bounding_box (real_bounding_box_type *bb,
+ real_coordinate_type p);
+extern void update_bounding_box (bounding_box_type *bb, coordinate_type p);
+
+#endif /* not BOUNDING_BOX_H */
diff --git a/include/bzr.h b/include/bzr.h
new file mode 100644
index 0000000..2f267c9
--- /dev/null
+++ b/include/bzr.h
@@ -0,0 +1,134 @@
+/* bzr.h: manipulate Bezier-format font files. See ../bzr/README
+
+
+ for the precise definition of the file format.
+
+Copyright (C) 1992 Free Software Foundation, Inc.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+#ifndef BZR_H
+#define BZR_H
+
+#include <kpathsea/types.h>
+
+#include "bounding-box.h"
+#include "font.h"
+#include "spline.h"
+
+
+/* At most one output (and one input) file can be open at a time;
+ calling either of these routines twice, with no intervening call to
+ close the file, results in a fatal error. */
+extern boolean bzr_open_output_file (string filename);
+extern boolean bzr_open_input_file (string filename);
+
+/* If no output (or input) file is open, a fatal error results. */
+extern void bzr_close_output_file (void);
+extern void bzr_close_input_file (void);
+
+/* Fontwide information at the beginning of the file. */
+typedef struct
+{
+ string comment;
+ real design_size;
+} bzr_preamble_type;
+
+/* The comment usually identifies the creator of the file, but it need
+ not be anything in particular. */
+#define BZR_COMMENT(p) ((p).comment)
+
+/* The design size is given in points (72.27pt=1in). */
+#define BZR_DESIGN_SIZE(p) ((p).design_size)
+
+
+/* You should write the preamble before writing anything els. */
+extern void bzr_put_preamble (bzr_preamble_type);
+
+/* You should be positioned at the beginning of the file (e.g., have
+ just opened it) before calling this. Furthermore, you should call
+ this routine before calling any of the other input routines.
+ (Because this is what reads the design size of the font, and other
+ values in the file are scaled by that.) */
+extern bzr_preamble_type bzr_get_preamble (void);
+
+/* Character information. */
+
+typedef struct
+{
+ charcode_type code;
+ real set_width;
+ real_bounding_box_type bb;
+ spline_list_array_type shape;
+} bzr_char_type;
+
+
+/* The character code is always in the range 0 to 255. You can use the
+ `CHARCODE' macro to access it. */
+
+/* The set width is given in points. You can use the `CHAR_SET_WIDTH'
+ macro to access it. */
+
+/* The character bounding box is not guaranteed to be the tightest
+ possible, but it should be close. The values are in points. The
+ CHAR_HEIGHT, CHAR_DEPTH, CHAR_SET_WIDTH, CHAR_BB, and related macros
+ in `font.h' all work. */
+
+/* The shape is given as a list of lists of lines and cubic splines.
+ Each element of the outer list represents a closed path. The values
+ are in points. */
+#define BZR_SHAPE(c) ((c).shape)
+
+
+/* This routine writes the given character. */
+extern void bzr_put_char (bzr_char_type);
+
+/* This routine returns the next character in the file. If the postamble
+ is next, it returns NULL. Each spline in the `shape' element is
+ guaranteed to have degree `LINEAR' or `CUBIC' (see `spline.h'). */
+extern bzr_char_type *bzr_get_next_char (void);
+
+/* This routine returns the character with the given CODE, or NULL.
+ Each spline in the `shape' element is guaranteed to have degree
+ `LINEAR' or `CUBIC' (see `spline.h'). */
+extern bzr_char_type *bzr_get_char (one_byte code);
+
+/* More fontwide information, this at the end of the file. */
+
+typedef struct
+{
+ real_bounding_box_type font_bb;
+ one_byte nchars;
+} bzr_postamble_type;
+
+/* The font bounding box is guaranteed to be the tightest possible,
+ given the character bounding box. The values are in points. */
+#define BZR_FONT_BB(p) ((p).font_bb)
+
+/* The total number of characters (possibly zero) in the font. */
+#define BZR_NCHARS(p) ((p).nchars)
+
+
+/* The postamble must be written last; the library itself determines the
+ font bounding box, based on the character bounding boxes, so you do
+ not supply it as an argument. */
+extern void bzr_put_postamble (void);
+
+/* And this reads the postamble back. You should be positioned at the
+ postamble (e.g., `bzr_get_char' should have just returned NULL) before
+ calling this. */
+extern bzr_postamble_type bzr_get_postamble (void);
+
+#endif /* not BZR_H */
diff --git a/include/c-auto.h b/include/c-auto.h
new file mode 100644
index 0000000..3d38cf4
--- /dev/null
+++ b/include/c-auto.h
@@ -0,0 +1,71 @@
+/* include/c-auto.h. Generated by configure. */
+/* c-auto.h.in. Generated automatically from configure.in by autoheader. */
+
+/* Define to empty if the keyword does not work. */
+/* #undef const */
+
+/* Define if you have dirent.h. */
+/* #undef DIRENT */
+
+/* Define if you don't have dirent.h, but have ndir.h. */
+/* #undef NDIR */
+
+/* Define if you need to in order for stat and other things to work. */
+/* #undef _POSIX_SOURCE */
+
+/* Define if you have the ANSI C header files. */
+/* #undef STDC_HEADERS */
+
+/* Define if you don't have dirent.h, but have sys/dir.h. */
+/* #undef SYSDIR */
+
+/* Define if you don't have dirent.h, but have sys/ndir.h. */
+/* #undef SYSNDIR */
+
+/* Define if the closedir function returns void instead of int. */
+/* #undef VOID_CLOSEDIR */
+
+/* Define if your putenv doesn't waste space when the same environment
+ variable is assigned more than once, with different (malloced)
+ values. This is true only on NetBSD/FreeBSD, as far as I know. See
+ xputenv.c. */
+/* #undef SMART_PUTENV */
+
+/* Define if you have memmove. */
+/* #undef HAVE_MEMMOVE */
+
+/* Define if you have putenv. */
+/* #undef HAVE_PUTENV */
+
+/* Define if you have the <assert.h> header file. */
+/* #undef HAVE_ASSERT_H */
+
+/* Define if you have the <float.h> header file. */
+/* #undef HAVE_FLOAT_H */
+
+/* Define if you have the <limits.h> header file. */
+/* #undef HAVE_LIMITS_H */
+
+/* Define if you have the <memory.h> header file. */
+/* #undef HAVE_MEMORY_H */
+
+/* Define if you have the <pwd.h> header file. */
+/* #undef HAVE_PWD_H */
+
+/* Define if you have the <stdlib.h> header file. */
+/* #undef HAVE_STDLIB_H */
+
+/* Define if you have the <string.h> header file. */
+/* #undef HAVE_STRING_H */
+
+/* Define if you have the <unistd.h> header file. */
+/* #undef HAVE_UNISTD_H */
+
+/* Define if you have the dnet library (-ldnet). */
+/* #undef HAVE_LIBDNET */
+
+/* Define if you have the dnet_stub library (-ldnet_stub). */
+/* #undef HAVE_LIBDNET_STUB */
+
+/* Define if you have the socket library (-lsocket). */
+/* #undef HAVE_LIBSOCKET */
diff --git a/include/c-errno.h b/include/c-errno.h
new file mode 100644
index 0000000..5c55be1
--- /dev/null
+++ b/include/c-errno.h
@@ -0,0 +1,27 @@
+/* c-errno.h: <errno.h> and the errno variable.
+
+Copyright (C) 1992 Free Software Foundation, Inc.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+#ifndef C_ERRNO_H
+#define C_ERRNO_H
+
+#include <errno.h>
+#ifndef errno
+extern int errno;
+#endif
+
+#endif /* not C_ERRNO_H */
diff --git a/include/c-fopen.h b/include/c-fopen.h
new file mode 100644
index 0000000..e7d476e
--- /dev/null
+++ b/include/c-fopen.h
@@ -0,0 +1,53 @@
+/* c-fopen.h: how to open files with fopen.
+
+Copyright (C) 1992 Free Software Foundation, Inc.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+#ifndef C_FOPEN_H
+#define C_FOPEN_H
+
+/* How to open a text file: */
+#ifndef FOPEN_R_MODE
+#define FOPEN_R_MODE "r"
+#endif
+
+#ifndef FOPEN_W_MODE
+#define FOPEN_W_MODE "w"
+#endif
+
+/* How to open a binary file for reading: */
+#ifndef FOPEN_RBIN_MODE
+#if defined (VMS) || defined (DOS) || defined (VMCMS)
+#define FOPEN_RBIN_MODE "rb"
+#else
+#define FOPEN_RBIN_MODE "r"
+#endif /* not (VM/CMS or DOS or VMS) */
+#endif /* not FOPEN_RBIN_MODE */
+
+/* How to open a binary file for writing: */
+#ifndef FOPEN_WBIN_MODE
+#ifdef DOS
+#define FOPEN_WBIN_MODE "wb"
+#else
+#ifdef VMCMS
+#define FOPEN_WBIN_MODE "wb, lrecl=1024, recfm=f"
+#else
+#define FOPEN_WBIN_MODE "w"
+#endif /* not VM/CMS */
+#endif /* not DOS */
+#endif /* not FOPEN_WBIN_MODE */
+
+#endif /* not C_FOPEN_H */
diff --git a/include/c-limits.h b/include/c-limits.h
new file mode 100644
index 0000000..90fc4e3
--- /dev/null
+++ b/include/c-limits.h
@@ -0,0 +1,34 @@
+/* c-limits.h: include the system parameter file.
+
+Copyright (C) 1992 Free Software Foundation, Inc.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+#ifndef C_LIMITS_H
+#define C_LIMITS_H
+
+#include "c-std.h"
+
+#ifdef LIMITS_H_MISSING
+#include <sys/param.h>
+#else
+#include <limits.h>
+#endif
+
+#if !defined (FLOAT_H_MISSING) && !defined (FLT_MAX)
+#include <float.h>
+#endif
+
+#endif /* not C_LIMITS_H */
diff --git a/include/c-memstr.h b/include/c-memstr.h
new file mode 100644
index 0000000..149ff65
--- /dev/null
+++ b/include/c-memstr.h
@@ -0,0 +1,62 @@
+/* c-memstr.h: memcpy, strchr, etc.
+
+Copyright (C) 1992 Free Software Foundation, Inc.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+#ifndef C_MEMSTR_H
+#define C_MEMSTR_H
+
+#include "c-std.h"
+
+/* Just to be complete, we make both the system V/ANSI and the BSD
+ versions of the string functions available. */
+#if STDC_HEADERS || HAVE_STRING_H
+#include <string.h>
+
+/* An ANSI string.h and pre-ANSI memory.h might conflict. */
+#if !STDC_HEADERS && HAVE_MEMORY_H
+#include <memory.h>
+#endif /* not STDC_HEADERS and HAVE_MEMORY_H */
+
+#define index strchr
+#define rindex strrchr
+
+#ifndef bcmp
+#define bcmp(s1, s2, len) memcmp ((s1), (s2), (len))
+#endif
+#ifndef bcopy
+#define bcopy(from, to, len) memcpy ((to), (from), (len))
+#endif
+#ifndef bzero
+#define bzero(s, len) memset ((s), 0, (len))
+#endif
+
+#else /* not STDC_HEADERS and not HAVE_STRING_H */
+
+#include <strings.h>
+
+#define strchr index
+#define strrchr rindex
+
+#define memcmp(s1, s2, n) bcmp ((s1), (s2), (n))
+#define memcpy(to, from, len) bcopy ((from), (to), (len))
+
+extern char *strtok ();
+extern char *strstr ();
+
+#endif /* not STDC_HEADERS and not HAVE_STRING_H */
+
+#endif /* not C_MEMSTR_H */
diff --git a/include/c-minmax.h b/include/c-minmax.h
new file mode 100644
index 0000000..71017cc
--- /dev/null
+++ b/include/c-minmax.h
@@ -0,0 +1,84 @@
+/* c-minmax.h: define INT_MIN, etc. Assume a 32-bit machine if the
+ values aren't defined.
+
+Copyright (C) 1992 Free Software Foundation, Inc.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+#ifndef C_MINMAX_H
+#define C_MINMAX_H
+
+#include "c-limits.h"
+
+/* Declared in <limits.h> on ANSI C systems. If the system doesn't
+ define it, we use the minimum ANSI values -- except for `int'; we
+ assume 32-bit integers. */
+
+#ifndef SCHAR_MIN
+#define SCHAR_MIN (-127)
+#endif
+#ifndef SCHAR_MAX
+#define SCHAR_MAX 128
+#endif
+#ifndef UCHAR_MAX
+#define UCHAR_MAX 255
+#endif
+
+#ifndef SHRT_MIN
+#define SHRT_MIN (-32767)
+#endif
+#ifndef SHRT_MAX
+#define SHRT_MAX 32767
+#endif
+#ifndef USHRT_MAX
+#define USHRT_MAX 65535
+#endif
+
+#ifndef INT_MIN
+#define INT_MIN (-2147483647)
+#endif
+#ifndef INT_MAX
+#define INT_MAX 2147483647
+#endif
+#ifndef UINT_MAX
+#define UINT_MAX 4294967295
+#endif
+
+#ifndef LONG_MIN
+#define LONG_MIN INT_MIN
+#endif
+#ifndef LONG_MAX
+#define LONG_MAX INT_MAX
+#endif
+#ifndef ULONG_MAX
+#define ULONG_MAX UINT_MAX
+#endif
+
+/* Declared in <float.h> on ANSI C systems. */
+#ifndef DBL_MIN
+#define DBL_MIN 1e-37
+#endif
+#ifndef DBL_MAX
+#define DBL_MAX 1e+37
+#endif
+
+#ifndef FLT_MIN
+#define FLT_MIN 1e-37
+#endif
+#ifndef FLT_MAX
+#define FLT_MAX 1e+37
+#endif
+
+#endif /* not C_MINMAX_H */
diff --git a/include/c-namemx.h b/include/c-namemx.h
new file mode 100644
index 0000000..f8f6613
--- /dev/null
+++ b/include/c-namemx.h
@@ -0,0 +1,41 @@
+/* c-name_max.h: define NAME_MAX, the maximum length of a single
+ component in a pathname.
+
+Copyright (C) 1992 Free Software Foundation, Inc.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+#ifndef C_NAME_MAX_H
+#define C_NAME_MAX_H
+
+#include "c-limits.h"
+
+#ifdef _POSIX_VERSION
+#ifndef NAME_MAX
+#define NAME_MAX pathconf ("/", _PC_NAME_MAX)
+#endif
+#endif /* not _POSIX_VERSION */
+
+/* Most likely the system will truncate filenames if it is not POSIX,
+ and so we can use the BSD value here. */
+#ifndef _POSIX_NAME_MAX
+#define _POSIX_NAME_MAX 255
+#endif
+
+#ifndef NAME_MAX
+#define NAME_MAX _POSIX_NAME_MAX
+#endif
+
+#endif /* not C_NAME_MAX_H */
diff --git a/include/c-pathch.h b/include/c-pathch.h
new file mode 100644
index 0000000..78c3b24
--- /dev/null
+++ b/include/c-pathch.h
@@ -0,0 +1,71 @@
+/* c-pathch.h: define the characters which separate components of
+ pathnames and environment variable paths.
+
+Copyright (C) 1992 Free Software Foundation, Inc.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+#ifndef C_PATHCH_H
+#define C_PATHCH_H
+
+/* What separates pathname components? */
+#ifndef PATH_SEP
+#ifdef VMS
+#define PATH_SEP ':'
+#define PATH_SEP_STRING ":"
+#else
+#ifdef DOS
+#define PATH_SEP '\\'
+#define PATH_SEP_STRING "\\"
+/* On DOS, it's good to allow both \ and / between directories. */
+#define IS_PATH_SEP(ch) ((ch) == PATH_SEP || (ch) == '/')
+#else
+#ifdef VMCMS
+#define PATH_SEP ' '
+#define PATH_SEP_STRING " "
+#else
+#define PATH_SEP '/'
+#define PATH_SEP_STRING "/"
+#endif /* not VM/CMS */
+#endif /* not DOS */
+#endif /* not VMS */
+#endif /* not PATH_SEP */
+
+#ifndef IS_PATH_SEP
+#define IS_PATH_SEP(ch) ((ch) == PATH_SEP)
+#endif
+
+/* What separates elements in environment variable path lists? */
+#ifndef PATH_DELIMITER
+#ifdef VMS
+#define PATH_DELIMITER ','
+#define PATH_DELIMITER_STRING ","
+#else
+#ifdef DOS
+#define PATH_DELIMITER ';'
+#define PATH_DELIMITER_STRING ";"
+#else
+#ifdef VMCMS
+#define PATH_DELIMITER ' '
+#define PATH_DELIMITER_STRING " "
+#else
+#define PATH_DELIMITER ':'
+#define PATH_DELIMITER_STRING ":"
+#endif /* not VM/CMS */
+#endif /* not DOS */
+#endif /* not VMS */
+#endif /* not PATH_DELIMITER */
+
+#endif /* not C_PATHCH_H */
diff --git a/include/c-pathmx.h b/include/c-pathmx.h
new file mode 100644
index 0000000..4596acc
--- /dev/null
+++ b/include/c-pathmx.h
@@ -0,0 +1,37 @@
+/* c-path_max.h: define PATH_MAX, the maximum length of a pathname.
+
+Copyright (C) 1992 Free Software Foundation, Inc.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+#ifndef C_PATH_MAX_H
+#define C_PATH_MAX_H
+
+#include "c-limits.h"
+
+#ifndef _POSIX_PATH_MAX
+#define _POSIX_PATH_MAX 255
+#endif
+
+#ifndef PATH_MAX
+#ifdef MAXPATHLEN
+#define PATH_MAX MAXPATHLEN
+#else
+#define PATH_MAX _POSIX_PATH_MAX
+#endif
+#endif /* not PATH_MAX */
+
+
+#endif /* not C_PATH_MAX_H */
diff --git a/include/c-proto.h b/include/c-proto.h
new file mode 100644
index 0000000..5d473d3
--- /dev/null
+++ b/include/c-proto.h
@@ -0,0 +1,61 @@
+/* c-proto.h: macros to include or discard prototypes.
+
+Copyright (C) 1992 Free Software Foundation, Inc.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+#ifndef C_PROTO_H
+#define C_PROTO_H
+
+/* Although most of the code here is written in GNU C, a few files are
+ shared with other distributions (TeX, xdvi, dvips), and so need to be
+ compilable with common C, also. Here are macros which play around
+ with function declarations to make them work in both cases. The P?H
+ macros are used for declarations, the P?C for definitions. */
+
+#if __STDC__
+
+#define P1H(p1) (p1)
+#define P2H(p1,p2) (p1, p2)
+#define P3H(p1,p2,p3) (p1, p2, p3)
+#define P4H(p1,p2,p3,p4) (p1, p2, p3, p4)
+#define P5H(p1,p2,p3,p4,p5) (p1, p2, p3, p4, p5)
+
+#define P1C(t1,n1)(t1 n1)
+#define P2C(t1,n1, t2,n2)(t1 n1, t2 n2)
+#define P3C(t1,n1, t2,n2, t3,n3)(t1 n1, t2 n2, t3 n3)
+#define P4C(t1,n1, t2,n2, t3,n3, t4,n4)(t1 n1, t2 n2, t3 n3, t4 n4)
+#define P5C(t1,n1, t2,n2, t3,n3, t4,n4, t5,n5) \
+ (t1 n1, t2 n2, t3 n3, t4 n4, t5 n5)
+
+#else /* not __STDC__ */
+
+#define P1H(p1) ()
+#define P2H(p1, p2) ()
+#define P3H(p1, p2, p3) ()
+#define P4H(p1, p2, p3, p4) ()
+#define P5H(p1, p2, p3, p4, p5) ()
+
+#define P1C(t1,n1) (n1) t1 n1;
+#define P2C(t1,n1, t2,n2) (n1, n2) t1 n1; t2 n2;
+#define P3C(t1,n1, t2,n2, t3,n3) (n1, n2, n3) t1 n1; t2 n2; t3 n3;
+#define P4C(t1,n1, t2,n2, t3,n3, t4,n4) (n1, n2, n3, n4) \
+ t1 n1; t2 n2; t3 n3; t4 n4;
+#define P5C(t1,n1, t2,n2, t3,n3, t4,n4, t5,n5) (n1, n2, n3, n4, n5) \
+ t1 n1; t2 n2; t3 n3; t4 n4; t5 n5;
+
+#endif /* not __STDC__ */
+
+#endif /* not C_PROTO_H */
diff --git a/include/c-std.h b/include/c-std.h
new file mode 100644
index 0000000..c1e31da
--- /dev/null
+++ b/include/c-std.h
@@ -0,0 +1,73 @@
+/* c-std.h: the first header files.
+
+Copyright (C) 1992 Free Software Foundation, Inc.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+#ifndef C_STD_H
+#define C_STD_H
+
+/* Header files that essentially all of our sources need, and
+ that all implementations have. We include these first, to help with
+ NULL being defined multiple times. */
+#include <math.h>
+#include <stdio.h>
+
+/* POSIX.1 says that <unistd.h> may require <sys/types.h>. */
+#include <sys/types.h>
+
+/* This is the symbol that X uses to determine if <sys/types.h> has been
+ read, so we define it. */
+#define __TYPES__
+
+/* And X uses this symbol to say whether we have <stddef.h> etc. */
+#ifndef STDC_HEADERS
+#define X_NOT_STDC_ENV
+#endif
+
+/* Be sure we have constants from <unistd.h>. */
+#include "c-unistd.h"
+
+#if STDC_HEADERS
+#include <stdlib.h>
+/* Include <stdlib.h> first to help avoid NULL redefinitions on some
+ systems. Now that we no longer include <stdlib.h> it may be
+ irrelevant. */
+#else
+extern char *getenv ();
+#ifndef ALLOC_RETURN_TYPE
+#ifdef DOS
+#define ALLOC_RETURN_TYPE void
+#else
+#define ALLOC_RETURN_TYPE char
+#endif /* not DOS */
+#endif /* not ALLOC_RETURN_TYPE */
+extern ALLOC_RETURN_TYPE *calloc (), *malloc (), *realloc ();
+#endif /* not STDC_HEADERS */
+
+/* strchr vs. index, memcpy vs. bcopy, etc. */
+#include "c-memstr.h"
+
+/* Error numbers and errno declaration. */
+#include "c-errno.h"
+
+/* Numeric minima and maxima. */
+#include "c-minmax.h"
+
+/* popen is part of POSIX.2, not POSIX.1. So STDC_HEADERS isn't enough. */
+extern FILE *popen ();
+extern double hypot ();
+
+#endif /* not C_STD_H */
diff --git a/include/c-unistd.h b/include/c-unistd.h
new file mode 100644
index 0000000..fa2d2c3
--- /dev/null
+++ b/include/c-unistd.h
@@ -0,0 +1,50 @@
+/* c-unistd.h: ensure we have constants from <unistd.h>. Included from
+ c-std.h.
+
+Copyright (C) 1992 Free Software Foundation, Inc.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+#ifndef C_UNISTD_H
+#define C_UNISTD_H
+
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#include "c-std.h"
+
+/* For fseek. */
+#ifndef SEEK_SET
+#define SEEK_SET 0
+#define SEEK_CUR 1
+#define SEEK_END 2
+#endif /* not SEEK_SET */
+
+/* For access. */
+#ifndef F_OK
+#define F_OK 0
+#define X_OK 1
+#define W_OK 2
+#define R_OK 4
+#endif /* not F_OK */
+
+#ifndef STDIN_FILENO
+#define STDIN_FILENO 0
+#define STDOUT_FILENO 1
+#define STDERR_FILENO 2
+#endif /* not STDIN_FILENO */
+
+#endif /* not C_UNISTD_H */
diff --git a/include/charspec.h b/include/charspec.h
new file mode 100644
index 0000000..a22af23
--- /dev/null
+++ b/include/charspec.h
@@ -0,0 +1,34 @@
+/* charspec.h:
+
+Copyright (C) 1992 Free Software Foundation, Inc.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+#ifndef CHARSPEC_H
+#define CHARSPEC_H
+
+#include "encoding.h"
+#include <kpathsea/types.h>
+
+
+/* If SPEC starts with a digit, return the result of `xparse_charcode
+ (SPEC)'. Otherwise, if ENC is NULL and SPEC is exactly one character
+ long, return that character. Otherwise (ENC is non-NULL), look up
+ SPEC as a character name in ENC and return the corresponding character
+ code. If SPEC is NULL, the empty string, an unrecognized name, or
+ otherwise invalid, give a fatal error. */
+extern charcode_type xparse_charspec (string spec, encoding_info_type *enc);
+
+#endif /* not CHARSPEC_H */
diff --git a/include/cmdline.h b/include/cmdline.h
new file mode 100644
index 0000000..e528d15
--- /dev/null
+++ b/include/cmdline.h
@@ -0,0 +1,135 @@
+/* cmdline.h: macros to help process command-line arguments.
+
+Copyright (C) 1992, 2004 Free Software Foundation, Inc.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+#ifndef CMDLINE_H
+#define CMDLINE_H
+
+#include "filename.h"
+#include "getopt.h"
+#include "global.h"
+
+
+/* Test whether getopt found an option ``A''.
+ Assumes the option index is in the variable `option_index', and the
+ option table in a variable `long_options'. */
+
+#define ARGUMENT_IS(a) STREQ (long_options[option_index].name, a)
+
+
+/* Read the string S as a percentage, i.e., a number between 0 and 100. */
+
+#define GET_PERCENT(s) \
+ ({ \
+ unsigned temp = atou (s); \
+ if (temp > 100) \
+ FATAL1 ("GET_PERCENT: The argument %u should be at most 100, since \
+it's a percentage", temp); \
+ temp / 100.0; \
+ })
+
+
+/* Read the string S as two character codes separated by a hyphen. Put
+ the numeric values of the codes into START and END. */
+
+#define GET_RANGE(s, start, end) \
+ do \
+ { \
+ string str1 = strtok (s, "-"); \
+ if (str1 == NULL) \
+ FATAL1 ("GET_RANGE: No character code in argument `%s'", s); \
+ start = xparse_charcode (str1); \
+ end = xparse_charcode (s + strlen (str1) + 1); \
+ } \
+ while (0)
+
+
+/* In most programs, we want to deduce the resolution from the filename
+ given, if possible. But in some we don't. Correspondingly, we want
+ to remove the suffix if we do deduce the resolution (since the
+ resolution is the suffix (plus a format)). Assumes lots of
+ variables. */
+
+#ifdef CMDLINE_NO_DPI
+#define FIND_CMDLINE_DPI() /* as nothing */
+#define MAYBE_REMOVE_SUFFIX(s) s
+#else
+#define FIND_CMDLINE_DPI() \
+ if (!explicit_dpi) \
+ { \
+ string test_dpi = find_dpi (argv[optind]); \
+ if (test_dpi != NULL) \
+ dpi = test_dpi; \
+ }
+#define MAYBE_REMOVE_SUFFIX(s) remove_suffix (s)
+#endif
+
+
+/* Perform common actions at the end of parsing the arguments. Assumes
+ lots of variables: `printed_version', a boolean for whether the
+ version number has been printed; `optind', the current option index;
+ `argc'; `argv'; and `explicit_dpi', for whether the resolution has
+ been assigned already. */
+
+#define FINISH_COMMAND_LINE() \
+ do \
+ { \
+ /* Just wanted to know the version number? */ \
+ if (printed_version && optind == argc) exit (0); \
+ \
+ /* Exactly one (non-empty) argument left? */ \
+ if (optind + 1 == argc && *argv[optind] != 0) \
+ { \
+ FIND_CMDLINE_DPI (); \
+ return MAYBE_REMOVE_SUFFIX (argv[optind]); \
+ } \
+ else \
+ { \
+ fprintf (stderr, "Usage: %s [options] <font_name>.\n", argv[0]);\
+ fprintf (stderr, "(%s.)\n", optind == argc ? "Missing <font_name>"\
+ : "Too many <font_name>s"); \
+ fputs ("For more information, use ``-help''.\n", stderr); \
+ exit (1); \
+ } \
+ return NULL; /* stop warnings */ \
+ } \
+ while (0)
+
+#define GETOPT_USAGE \
+" You can use `--' or `-' to start an option.\n\
+ You can use any unambiguous abbreviation for an option name.\n\
+ You can separate option names and values with `=' or ` '.\n\
+"
+
+/* What to pass to `strtok' to separate different arguments to an
+ option, as in `-option=arg1,arg2,arg3'. It is useful to allow
+ whitespace as well so that the option value can come from a file, via
+ the shell construct "`cat file`" (including the quotes). */
+#define ARG_SEP ", \t\n"
+
+
+/* This parses a string of unsigned integers separated by commas, and
+ returns a vector of the integers (as numbers). A -1 is appended to
+ mark the end of the list, hence the return type. */
+extern int *scan_unsigned_list (string);
+
+/* If S has the form <name>.<number><stuff>, as in `foo.1200gf', return
+ <number>, as a string; otherwise, return NULL. */
+extern string find_dpi (string s);
+
+#endif /* not CMDLINE_H */
+
diff --git a/include/config.h b/include/config.h
new file mode 100644
index 0000000..76bbe4d
--- /dev/null
+++ b/include/config.h
@@ -0,0 +1,46 @@
+/* config.h: master configuration file, included first by all compilable
+ source files (not headers).
+
+Copyright (C) 1992 Free Software Foundation, Inc.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+#ifndef CONFIG_H
+#define CONFIG_H
+
+/* Standard definitions. */
+#include <kpathsea/config.h>
+
+/* System dependencies that are figured out by `configure'. */
+#include "c-auto.h"
+
+/* ``Standard'' headers. */
+#include "c-std.h"
+
+/* Standard in ANSI C. */
+#include <assert.h>
+
+/* Usually declared in <math.h>, but not always. */
+#ifndef M_PI
+#define M_PI 3.14159265358979323846
+#endif
+
+/* Macros to discard or keep prototypes. */
+#include "c-proto.h"
+
+/* Some definitions of our own. */
+#include "global.h"
+
+#endif /* not CONFIG_H */
diff --git a/include/dirio.h b/include/dirio.h
new file mode 100644
index 0000000..cb70915
--- /dev/null
+++ b/include/dirio.h
@@ -0,0 +1,55 @@
+/* dirio.h: checked directory operations.
+
+Copyright (C) 1992 Free Software Foundation, Inc.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+#ifndef DIRIO_H
+#define DIRIO_H
+
+#if DIRENT || _POSIX_VERSION
+#include <dirent.h>
+#define NLENGTH(dirent) strlen ((dirent)->d_name)
+#else /* not (DIRENT or _POSIX_VERSION) */
+#define dirent direct
+#define NLENGTH(dirent) ((dirent)->d_namlen)
+
+#ifdef SYSNDIR
+#include <sys/ndir.h>
+#endif
+
+#ifdef NDIR
+#include <ndir.h>
+#endif
+
+#ifdef SYSDIR
+#include <sys/dir.h>
+#endif
+
+#endif /* not (DIRENT or _POSIX_VERSION) */
+
+/* Like opendir, closedir, and chdir, but abort if DIRNAME can't be opened. */
+extern DIR *xopendir P1H(string dirname);
+extern void xclosedir P1H(DIR *);
+
+#if 0
+/* Returns true if FN is a directory (or a symlink to a directory). */
+extern boolean dir_p P1H(string fn);
+#endif
+
+/* Returns true if FN is directory with no subdirectories. */
+extern boolean leaf_dir_p P1H(string fn);
+
+#endif /* not DIRIO_H */
diff --git a/include/edge.h b/include/edge.h
new file mode 100644
index 0000000..83a4a9e
--- /dev/null
+++ b/include/edge.h
@@ -0,0 +1,59 @@
+/* edge.h: declarations for edge traversing.
+
+Copyright (C) 1992 Free Software Foundation, Inc.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+#ifndef EDGE_H
+#define EDGE_H
+
+#include "bitmap.h"
+
+/* We consider each pixel to consist of four edges, and we travel along
+ edges, instead of through pixel centers. This is necessary for those
+ unfortunate times when a single pixel is on both an inside and an
+ outside outline.
+
+ The numbers chosen here are not arbitrary; the code that figures out
+ which edge to move to depends on particular values. See the
+ `TRY_PIXEL' macro in `edge.c'. To emphasize this, I've written in the
+ numbers we need for each edge value. */
+
+typedef enum
+{
+ top = 1, left = 2, bottom = 3, right = 0, no_edge = 4
+} edge_type;
+
+/* This choice is also not arbitrary: starting at the top edge makes the
+ code find outside outlines before inside ones, which is certainly
+ what we want. */
+#define START_EDGE top
+
+
+/* Return the next outline edge on B in EDGE, ROW, and COL. */
+extern void next_outline_edge (bitmap_type b, edge_type *edge,
+ unsigned *row, unsigned *col);
+
+/* Return the next edge after START on the pixel ROW/COL in B that is
+ unmarked, according to the MARKED array. */
+extern edge_type next_unmarked_outline_edge (unsigned row, unsigned col,
+ edge_type start, bitmap_type b,
+ bitmap_type marked);
+
+/* Mark the edge E at the pixel ROW/COL in MARKED. */
+extern void mark_edge (edge_type e, unsigned row, unsigned col,
+ bitmap_type *marked);
+
+#endif /* not EDGE_H */
diff --git a/include/encoding.h b/include/encoding.h
new file mode 100644
index 0000000..c464173
--- /dev/null
+++ b/include/encoding.h
@@ -0,0 +1,85 @@
+/* encoding.h: parse a font encoding (.enc) file.
+
+Copyright (C) 1992 Free Software Foundation, Inc.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+#ifndef ENCODING_H
+#define ENCODING_H
+
+#include "font.h"
+#include "list.h"
+#include <kpathsea/types.h>
+
+
+/* A single character from the encoding file. Since we usually want to
+ deal with the entire collection of characters as a group, we don't
+ define any accessor macros for this structure, but rather the next. */
+typedef struct
+{
+ string name;
+ list_type ligature;
+} encoding_char_type;
+
+/* The size of font's encoding vector (PostScript defines this). */
+#define ENCODING_VECTOR_SIZE 256
+
+/* The collection of all the information from the file. */
+typedef struct
+{
+ string coding_scheme;
+ encoding_char_type encoding_char[ENCODING_VECTOR_SIZE];
+} encoding_info_type;
+
+/* The name of the encoding scheme in E_I. */
+#define ENCODING_SCHEME_NAME(e_i) ((e_i).coding_scheme)
+
+/* The Nth encoding character in E_I. */
+#define ENCODING_CHAR_ELT(e_i, n) ((e_i).encoding_char[n])
+
+/* The name of the character CODE in the encoding structure E_I, or NULL
+ if the character doesn't exist. */
+#define ENCODING_CHAR_NAME(e_i, code) (ENCODING_CHAR_ELT (e_i, code).name)
+
+/* The ligature table for the character code in the encoding structure
+ E_I. Each element of the list is a pointer to a `tfm_ligature_type'.
+ The list is garbage if the character doesn't exist. */
+#define ENCODING_CHAR_LIG(e_i, code) (ENCODING_CHAR_ELT (e_i, code).ligature)
+
+
+/* If an encoding file is mandatory for a program to operate, and the
+ user does not specify one, the program should use this. */
+#define DEFAULT_ENCODING "ascii"
+
+/* Returns the character code for the character named NAME in E_I, or -1
+ if NAME is not present or NULL. */
+extern int encoding_number (encoding_info_type e_i, string name);
+
+
+/* Return the basename for the encoding file in which the encoding
+ CODINGSCHEME can be found. Reads the library file (see `libfile.h')
+ `encoding.map'. Case is ignored in the comparison with
+ CODINGSCHEME. If CODINGSCHEME is not present in `encoding.map',
+ issue a warning and return some default. */
+extern string coding_scheme_to_filename (string codingscheme);
+
+
+/* Read the library file (see `libfile.h') `FILENAME.enc', and return
+ the information it contains. If the file cannot be opened, give a
+ fatal error. */
+extern encoding_info_type read_encoding_file (string filename);
+
+#endif /* not ENCODING_H */
+
diff --git a/include/file-input.h b/include/file-input.h
new file mode 100644
index 0000000..cf9d16b
--- /dev/null
+++ b/include/file-input.h
@@ -0,0 +1,51 @@
+/* file-input.h: declarations for file reading.
+
+Copyright (C) 1992 Free Software Foundation, Inc.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+#ifndef FILE_INPUT_H
+#define FILE_INPUT_H
+
+#include <stdio.h>
+#include <kpathsea/types.h>
+
+
+
+/* Read some number of bytes from the file F. The FILENAME argument
+ is passed to perror(3), if the read fails, and then the program is
+ halted. The routines that get more than one byte assume the value is
+ stored in the file in BigEndian order, regardless of the host
+ architecture. */
+
+extern one_byte get_byte (FILE *f, string filename);
+extern two_bytes get_two (FILE *, string);
+extern four_bytes get_four (FILE *, string);
+extern signed_4_bytes get_signed_four (FILE *, string);
+extern address get_n_bytes (unsigned n, FILE *, string);
+
+/* Back up some number of bytes, then read. */
+extern one_byte get_previous_byte (FILE *, string);
+extern two_bytes get_previous_two (FILE *, string);
+extern four_bytes get_previous_four (FILE *, string);
+
+/* Abort if the next or previous byte is not EXPECTED. */
+extern void match_byte (one_byte expected, FILE *, string);
+extern void match_previous_byte (one_byte expected, FILE *, string);
+
+/* Abort if string of bytes is not STRING. */
+extern void match_string_of_bytes (string, FILE *, string);
+
+#endif /* not FILE_INPUT_H */
diff --git a/include/file-output.h b/include/file-output.h
new file mode 100644
index 0000000..0331d6f
--- /dev/null
+++ b/include/file-output.h
@@ -0,0 +1,43 @@
+/* file-output.h: declarations for file reading.
+
+Copyright (C) 1992 Free Software Foundation, Inc.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+#ifndef FILE_OUTPUT_H
+#define FILE_OUTPUT_H
+
+#include <stdio.h>
+#include <kpathsea/types.h>
+
+
+
+/* Write some number of bytes to the file F. The FILENAME argument
+ is passed to perror(3), if the write fails, and then the program is
+ halted. */
+extern void put_byte (one_byte, FILE *f, string filename);
+extern void put_two (two_bytes, FILE *, string);
+extern void put_three (four_bytes, FILE *, string);
+extern void put_four (four_bytes, FILE *, string);
+extern void put_n_bytes (unsigned n, address, FILE *, string);
+
+/* We assume the number is already in two's complement, and so we merely
+ have to output the bits. */
+#define put_signed_byte put_byte
+#define put_signed_two put_two
+#define put_signed_three put_three
+#define put_signed_four put_four
+
+#endif /* not FILE_OUTPUT_H */
diff --git a/include/filename.h b/include/filename.h
new file mode 100644
index 0000000..67ec609
--- /dev/null
+++ b/include/filename.h
@@ -0,0 +1,42 @@
+/* filename.h: declarations for manipulating filenames.
+
+Copyright (C) 1992 Free Software Foundation, Inc.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+#ifndef FILENAME_H
+#define FILENAME_H
+
+#include <kpathsea/types.h>
+
+
+/* This searches specifically for the PK font FONT_NAME at resolution
+ DPI. If FONT_NAME is absolute or explicitly relative, we simply
+ return whether `FONT_NAME.DPIpk' is readable. Otherwise, we use the
+ environment variables PKFONTS, then TEXPKS, then TEXFONTS for the
+ paths to search. We return NULL if the font cannot be found. */
+extern string find_pk_filename (string font_name, unsigned dpi);
+
+/* Like `find_pk_filename', except search for a GF font named
+ `FONT_NAME.DPIgf'. The environment variables used are GFFONTS then
+ TEXFONTS. We return NULL if the font cannot be found. */
+extern string find_gf_filename (string font_name, unsigned dpi);
+
+/* Like `find_pk_filename', except search for a TFM file named
+ `FONT_NAME.tfm'. The environment variable used is TEXFONTS. We
+ return NULL if the font cannot be found. */
+extern string find_tfm_filename (string font_name);
+
+#endif /* not FILENAME_H */
diff --git a/include/fix-num.h b/include/fix-num.h
new file mode 100644
index 0000000..92f9a2c
--- /dev/null
+++ b/include/fix-num.h
@@ -0,0 +1,36 @@
+/* fix-num.h: declarations for ``fix'' numbers, which are a 32-bit
+ word with 20 bits of fraction.
+
+Copyright (C) 1992 Free Software Foundation, Inc.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+#ifndef FIX_NUM_H
+#define FIX_NUM_H
+
+#include <kpathsea/types.h>
+
+
+
+/* The type. */
+typedef long fix_word;
+
+/* Conversions to and from C floating-point numbers. The conversions
+ may not be exact, but since we use this to represent physical
+ quantities, a tiny loss of accuracy does not matter. */
+extern const real fix_to_real (fix_word);
+extern const fix_word real_to_fix (real);
+
+#endif /* not FIX_NUM_H */
diff --git a/include/font.h b/include/font.h
new file mode 100644
index 0000000..886b3ce
--- /dev/null
+++ b/include/font.h
@@ -0,0 +1,243 @@
+/* font.h: operations on fonts independent of a particular file format.
+
+Copyright (C) 1992 Free Software Foundation, Inc.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+#ifndef FONT_LIBRARY_H
+#define FONT_LIBRARY_H
+
+#include "bitmap.h"
+#include "bounding-box.h"
+#include "tfm.h"
+#include <kpathsea/types.h>
+
+
+
+/* A font is a collection of characters, generally at a particular point
+ size and resolution. The `bitmap_font_type' structure holds
+ information that comes entirely from a bitmap file. */
+typedef struct
+{
+ real design_size;
+ string comment;
+ unsigned checksum;
+ string filename;
+} bitmap_font_type;
+
+/* The design size is given in points. It is not necessarily
+ related to the actual dimensions of any of the characters in the
+ font; indeed, usually the design size is quite a bit larger than the
+ largest characters. */
+#define BITMAP_FONT_DESIGN_SIZE(f) ((f).design_size)
+
+/* Sometimes a font comes with a comment identifying its source, who
+ owns the trademark, or some such. */
+#define BITMAP_FONT_COMMENT(f) ((f).comment)
+
+/* The checksum found in the bitmap file. */
+#define BITMAP_FONT_CHECKSUM(f) ((f).checksum)
+
+/* The full pathname for the file that we opened. */
+#define BITMAP_FONT_FILENAME(f) ((f).filename)
+
+
+/* Look for a font named FONT_NAME in PK or GF format, at resolution
+ DPI. This ignores any extension in FONT_NAME; it adds `.<dpi>gf' or
+ `.<dpi>pk'. The font is looked for using the PKFONTS, GFFONTS, and
+ TEXFONTS environment variables, just as with the TeX software. If
+ the font can't be found, this gives a fatal error. */
+extern bitmap_font_type get_bitmap_font (string font_name, unsigned dpi);
+
+/* `close_font', below, works for bitmap fonts, too. */
+
+/* The `font_info_type' holds a `bitmap_font_type', and additional
+ information that we get from a font metric file. */
+typedef struct
+{
+ bitmap_font_type bitmap_font;
+ tfm_global_info_type tfm_font;
+ string tfm_filename;
+} font_info_type;
+
+/* The bitmap information that is associated with this font. */
+#define FONT_BITMAP_FONT(f) ((f).bitmap_font)
+
+/* The TFM information. */
+#define FONT_TFM_FONT(f) ((f).tfm_font)
+
+/* The full pathname for the TFM file that we opened. */
+#define FONT_TFM_FILENAME(f) ((f).tfm_filename)
+
+/* The design size is given in points. It is not necessarily
+ related to the actual dimensions of any of the characters in the
+ font; indeed, usually the design size is quite a bit larger than the
+ largest characters. */
+#define FONT_DESIGN_SIZE(f) BITMAP_FONT_DESIGN_SIZE ((f).bitmap_font)
+
+/* Sometimes a font comes with a comment identifying its source, who
+ owns the trademark, or some such. */
+#define FONT_COMMENT(f) BITMAP_FONT_COMMENT ((f).bitmap_font)
+
+
+/* This calls `get_bitmap_font'; in addition, it looks for FONT_NAME in
+ TFM format. If either the bitmap file or the metric file can't be
+ found, this gives a fatal error. */
+extern font_info_type get_font (string font_name, unsigned dpi);
+
+/* Close any open files associated with FONT_NAME, whether it was opened
+ with `get_bitmap_font' or `get_font'. */
+extern void close_font (string font_name);
+
+/* A character is a bitmap image, and is therefore at a particular size
+ and resolution. It is also at a particular position in a font.
+ Generally, characters also have `side bearings'---extra space at the
+ left and/or right of the character. (In some scripts, there is
+ also displacement above and/or below the character, but we don't take
+ that into account here.) */
+
+typedef struct
+{
+ charcode_type code;
+ int set_width;
+ fix_word tfm_width;
+ bounding_box_type bb;
+ bitmap_type bitmap;
+} char_info_type;
+
+/* The character code in our fonts is always between 0 and 255. */
+#define CHARCODE(c) ((c).code)
+
+/* The set width is given in pixels; it's the sum of the left side
+ bearing, the bitmap's width, and the right side bearing. */
+#define CHAR_SET_WIDTH(c) ((c).set_width)
+
+/* The TFM width is the character's true width divided by the design
+ size (expressed as a fix_word). */
+#define CHAR_TFM_WIDTH(c) ((c).tfm_width)
+
+/* Unlike the font's bounding box, the character bounding box is
+ guaranteed to be the tightest possible; i.e., no all-blank rows occur
+ at the top or bottom, and no all-blank columns occur at the left or
+ right. */
+#define CHAR_BB(c) ((c).bb)
+
+/* The pixels. See `bitmap.h'. */
+#define CHAR_BITMAP(c) ((c).bitmap)
+
+
+/* Abbreviations for the width and height of a character's bitmap. */
+#define CHAR_BITMAP_WIDTH(c) BITMAP_WIDTH (CHAR_BITMAP (c))
+#define CHAR_BITMAP_HEIGHT(c) BITMAP_HEIGHT (CHAR_BITMAP (c))
+
+/* Abbreviations for the parts of the character's bounding box. */
+#define CHAR_MIN_COL(c) MIN_COL (CHAR_BB (c))
+#define CHAR_MAX_COL(c) MAX_COL (CHAR_BB (c))
+#define CHAR_MIN_ROW(c) MIN_ROW (CHAR_BB (c))
+#define CHAR_MAX_ROW(c) MAX_ROW (CHAR_BB (c))
+
+
+/* The height of a character is how far it extends above the baseline. */
+#define CHAR_HEIGHT(c) (CHAR_MAX_ROW (c) >= 0 ? CHAR_MAX_ROW (c) : 0)
+
+/* The depth is far it extends below the baseline (but as a positive
+ number, e.g., if a character's bitmap goes down to row -4, the depth
+ is 4). */
+#define CHAR_DEPTH(c) (CHAR_MIN_ROW (c) < 0 ? -CHAR_MIN_ROW (c) : 0)
+
+
+/* Abbreviations for the left and right side bearings, unless someone
+ else has already defined such macros (in which case they presumably
+ don't want ours). */
+#ifndef CHAR_LSB
+#define CHAR_LSB CHAR_MIN_COL
+#endif
+#ifndef CHAR_RSB
+#define CHAR_RSB(c) (CHAR_SET_WIDTH (c) - CHAR_MAX_COL (c))
+#endif
+
+/* Return the character numbered CODE in the font FONT_NAME, or NULL if
+ that character doesn't exist in that font. If `get_font' or
+ `get_bitmap_font' has not been previously called on FONT_NAME,
+ `get_char' gives a fatal error. */
+extern char_info_type *get_char (string font_name, charcode_type code);
+
+
+/* Print a plain text representation of the character C to the file F. */
+extern void print_char (FILE *f, char_info_type c);
+
+
+/* Typeset the TEXT in the font FONT_NAME, at a resolution of DPI. */
+extern bitmap_type string_to_bitmap (string text,
+ string font_name, unsigned dpi);
+
+/* A raw character is the byte string that defines the character in the
+ font file, in some format. */
+
+typedef enum { pk_format, gf_format } bitmap_format_type;
+
+typedef struct
+{
+ bitmap_format_type bitmap_format;
+ charcode_type code;
+ one_byte *bytes;
+ unsigned allocated;
+ unsigned used;
+ bounding_box_type bb;
+ signed_4_bytes h_escapement;
+ fix_word tfm_width;
+} raw_char_type;
+
+/* CHARCODE works to access the character code of a `raw_char_type'
+ variable. Likewise for the bounding box, horizontal escapement, and
+ TFM width. */
+
+/* The file format the character definition was read from. */
+#define RAW_CHAR_BITMAP_FORMAT(rc) ((rc).bitmap_format)
+
+/* The bytes in the file that comprise the character definition. */
+#define RAW_CHAR_BYTES(rc) ((rc).bytes)
+
+/* The number of allocated bytes to which the buffer points. */
+#define RAW_CHAR_ALLOCATED(rc) ((rc).allocated)
+
+/* The number of bytes actually used. */
+#define RAW_CHAR_USED(rc) ((rc).used)
+
+/* A convenience macro for the first unused byte. */
+#define RAW_CHAR_UNUSED_START(rc) RAW_CHAR_BYTES (rc)[RAW_CHAR_USED (rc)]
+
+
+/* Return the raw character numbered CODE in the font named FONT_NAME,
+ or NULL. The only useful operation on a raw character is to write it
+ to an output file with the appropriate format. */
+extern raw_char_type *get_raw_char (string font_name,
+ charcode_type code);
+
+/* Free all allocated storage in the raw character RAW_CHAR, including
+ the character itself. */
+extern void free_raw_char (raw_char_type *raw_char);
+
+/* Miscellanous constants. */
+
+/* We will only deal with fonts that have at most this many characters,
+ although the bitmap formats allow more. */
+#define MAX_CHARCODE 255
+
+/* Some font formats have pointers within the file (to other places in
+ the file). The null value for such pointers is -1. */
+#define NULL_BYTE_PTR (-1)
+
+#endif /* not FONT_LIBRARY_H */
diff --git a/include/fontmap.h b/include/fontmap.h
new file mode 100644
index 0000000..b7e0bc2
--- /dev/null
+++ b/include/fontmap.h
@@ -0,0 +1,36 @@
+/* fontmap.h: declarations for reading a file to define additional font names.
+
+Copyright (C) 1993 Free Software Foundation, Inc.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+#ifndef FONTMAP_H
+#define FONTMAP_H
+
+typedef struct map_element_struct
+{
+ char *key;
+ char *value;
+ struct map_element_struct *next;
+} map_element_type;
+
+typedef map_element_type **map_type;
+
+
+extern map_type map_create P1H(string *dir_list);
+
+extern char *map_lookup P2H(map_type map, char *key);
+
+#endif /* not FONTMAP_H */
diff --git a/include/gf.h b/include/gf.h
new file mode 100644
index 0000000..c0d8bb2
--- /dev/null
+++ b/include/gf.h
@@ -0,0 +1,156 @@
+/* gf.h: manipulate generic font files. See Metafont: The Program, by
+ Don Knuth, (Volume D of Computers & Typesetting), chapter 46, among
+ other places, for the precise definition of this bitmap format.
+
+Copyright (C) 1992 Free Software Foundation, Inc.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+#ifndef GENERIC_FONT_LIBRARY_H
+#define GENERIC_FONT_LIBRARY_H
+
+#include "bitmap.h"
+#include "bounding-box.h"
+#include "font.h"
+#include <kpathsea/types.h>
+
+
+
+/* At most one GF file can be open for reading (or writing) at a time.
+ You must call `gf_open_input_file' before using any of the `gf_get...'
+ routines; similarly for the output side. */
+
+extern boolean gf_open_input_file (string filename);
+extern void gf_close_input_file (void);
+
+extern boolean gf_open_output_file (string filename);
+extern void gf_close_output_file (void);
+
+/* The only interesting information in the preamble is the comment. */
+
+extern string gf_get_preamble (void);
+extern void gf_put_preamble (string comment);
+
+
+/* An important part of the postamble is the character locators. A
+ character exists in the GF file if its `char_pointer' member in this
+ structure is not `NULL_BYTE_PTR'. */
+typedef struct
+{
+ charcode_type charcode;
+ signed_4_bytes h_escapement;
+ fix_word tfm_width;
+ signed_4_bytes char_pointer;
+} gf_char_locator_type;
+
+
+typedef struct
+{
+ fix_word design_size;
+ unsigned checksum;
+ real h_resolution, v_resolution;
+ bounding_box_type font_bb;
+ gf_char_locator_type char_loc[MAX_CHARCODE + 1];
+} gf_postamble_type;
+
+/* The design size is given as a fix_word in TeX points. */
+#define GF_DESIGN_SIZE(p) ((p).design_size)
+
+/* The GF checksum should match the checksums in the TFM file and/or the
+ PK file, if they exist. */
+#define GF_CHECKSUM(p) ((p).checksum)
+
+/* We express the resolutions in pixels per point multiplied by 2^16. */
+#define GF_H_RESOLUTION(p) ((p).h_resolution)
+#define GF_V_RESOLUTION(p) ((p).v_resolution)
+
+/* The font bounding box may not be the tightest possible. */
+#define GF_FONT_BB(p) ((p).font_bb)
+
+/* An abbreviation for a particular character locator. */
+#define GF_CHAR_LOC(p, code) ((p).char_loc[code])
+
+
+/* Return the postamble in the input file. */
+extern gf_postamble_type gf_get_postamble (void);
+
+/* Write the postamble to the output file. The library fills in the
+ information that is not given as arguments. This must be called
+ after all the characters have been written. The resolution arguments
+ should be given in pixels per inch. */
+extern void gf_put_postamble (fix_word design_size,
+ real h_resolution, real v_resolution);
+
+/* The characters are the most important information in the GF file. */
+
+typedef struct
+{
+ charcode_type code;
+ bitmap_type bitmap;
+ bounding_box_type bb;
+ signed_4_bytes h_escapement;
+ fix_word tfm_width;
+} gf_char_type;
+
+/* GF format actually allows character codes to be a full four bytes
+ long, but we cannot deal with such fonts. */
+#define GF_CHARCODE(gc) ((gc).code)
+
+/* The pixels. See `bitmap.h'. */
+#define GF_BITMAP(gc) ((gc).bitmap)
+
+/* GF format does not guarantee that the bounding box is the tightest
+ possible, but the reading routines do. */
+#define GF_CHAR_BB(gc) ((gc).bb)
+
+/* The set width, in pixels. */
+#define GF_H_ESCAPEMENT(gc) ((gc).h_escapement)
+
+/* The character width as a fix_word. */
+#define GF_TFM_WIDTH(gc) ((gc).tfm_width)
+
+/* Conveniently access each member of the bounding box. */
+#define GF_CHAR_MIN_COL(gc) (MIN_COL (GF_CHAR_BB (gc)))
+#define GF_CHAR_MAX_COL(gc) (MAX_COL (GF_CHAR_BB (gc)))
+#define GF_CHAR_MIN_ROW(gc) (MIN_ROW (GF_CHAR_BB (gc)))
+#define GF_CHAR_MAX_ROW(gc) (MAX_ROW (GF_CHAR_BB (gc)))
+
+/* An abbreviation for the left side bearing ... */
+#define GF_CHAR_LSB GF_CHAR_MIN_COL
+
+/* ... and one for the right side bearing. */
+#define GF_CHAR_RSB(c) (GF_H_ESCAPEMENT (c) - GF_CHAR_MAX_COL (c))
+
+
+/* `gf_get_next_char' reads the next character from the input file and returns
+ it. It also returns (as an argument) whether a character was
+ actually found. If not, you've read to the postamble. */
+extern gf_char_type gf_get_next_char (boolean *found);
+
+/* `gf_get_char' returns a pointer to the character numbered CODE
+ in the input file, or a null pointer if that character doesn't exist. */
+extern gf_char_type *gf_get_char (charcode_type code);
+
+/* Read the character CODE but don't interpret it; the result is only
+ useful as a parameter to `gf_put_raw_char'. */
+extern raw_char_type *gf_get_raw_char (charcode_type code);
+
+/* Write the given character to the output file. */
+extern void gf_put_char (gf_char_type);
+
+/* Write the given raw character. */
+extern void gf_put_raw_char (raw_char_type);
+
+#endif /* not GENERIC_FONT_LIBRARY_H */
diff --git a/include/global.h b/include/global.h
new file mode 100644
index 0000000..cb49189
--- /dev/null
+++ b/include/global.h
@@ -0,0 +1,151 @@
+/* global.h: extend the standard programming environment a little. This
+ is included from config.h, which everyone includes.
+
+Copyright (C) 1992, 93 Free Software Foundation, Inc.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+#ifndef GLOBAL_H
+#define GLOBAL_H
+
+#include <kpathsea/lib.h>
+#include <kpathsea/types.h>
+#include "moretypes.h"
+
+
+/* Define useful abbreviations. */
+
+/* Printer's points, as defined by TeX (and good typesetters everywhere). */
+#define POINTS_PER_INCH 72.27
+
+/* Convert a number V in pixels to printer's points, and vice versa,
+ assuming a resolution of DPI pixels per inch. */
+#define PIXELS_TO_POINTS(v, dpi) (POINTS_PER_INCH * (v) / (dpi))
+#define POINTS_TO_REAL_PIXELS(v, dpi) ((v) * (dpi) / POINTS_PER_INCH)
+#define POINTS_TO_PIXELS(v, dpi) ((int) (POINTS_TO_REAL_PIXELS (v, dpi) + .5))
+
+/* Some simple numeric operations. It is possible to define these much
+ more cleanly in GNU C, but we haven't done that (yet). */
+#define SQUARE(x) ((x) * (x))
+#define CUBE(x) ((x) * (x) * (x))
+#define SAME_SIGN(u,v) ((u) >= 0 && (v) >= 0 || (u) < 0 && (v) < 0)
+#define ROUND(x) ((int) ((x) + .5 * SIGN (x)))
+#define SIGN(x) ((x) > 0 ? 1 : (x) < 0 ? -1 : 0)
+
+#ifndef MAX
+#define MAX(a, b) ((a) > (b) ? (a) : (b))
+#endif
+#ifndef MIN
+#define MIN(a, b) ((a) < (b) ? (a) : (b))
+#endif
+
+/* Too bad C doesn't define operators for these. */
+#define MAX_EQUALS(var, expr) if ((expr) > (var)) (var) = (expr)
+#define MIN_EQUALS(var, expr) if ((expr) < (var)) (var) = (expr)
+
+/* Declarations for commonly-used routines we provide ourselves. The
+ ones here are only needed by us, so we do not provide them in
+ unprototyped form. Others are declared both ways in lib.h. */
+
+/* Return the current date and time a la date(1). */
+extern string now (void);
+
+/* Check if a string is a valid floating-point or decimal integer.
+ Returns false if passed NULL. */
+extern boolean float_ok (string);
+extern boolean integer_ok (string);
+
+/* My converses of atoi, atou, and atof. These all return dynamically
+ allocated strings. */
+extern string itoa (int);
+extern string utoa (unsigned);
+extern string xdtoa (double);
+
+/* Copies the file FROM to the file TO, then unlinks FROM. */
+extern void xrename (string from, string to);
+
+/* If P or *P is null, abort. Otherwise, call free(3) on P,
+ and then set *P to NULL. */
+extern void safe_free (address *p);
+
+
+/* Math functions. */
+
+/* Says whether V1 and V2 are within REAL_EPSILON of each other.
+ Fixed-point arithmetic would be better, to guarantee machine
+ independence, but it's so much more painful to work with. The value
+ here is smaller than can be represented in either a `fix_word' or a
+ `scaled_num', so more precision than this will be lost when we
+ output, anyway. */
+#define REAL_EPSILON 0.00001
+extern const boolean epsilon_equal (real v1, real v2);
+
+/* Arc cosine, in degrees. */
+extern const real acosd (real);
+
+/* Return the Euclidean distance between the two points. */
+extern const real distance (real_coordinate_type, real_coordinate_type);
+extern const real int_distance (coordinate_type, coordinate_type);
+
+/* Slope between two points (delta y per unit x). */
+extern const real slope (real_coordinate_type, real_coordinate_type);
+
+/* Make a real coordinate from an integer one, and vice versa. */
+extern const real_coordinate_type int_to_real_coord (coordinate_type);
+extern const coordinate_type real_to_int_coord (real_coordinate_type);
+
+/* Test if two integer points are adjacent. */
+extern const boolean points_adjacent_p (int row1, int col1, int r2, int c2);
+
+/* Find the largest and smallest elements of an array. */
+extern void find_bounds (real values[], unsigned value_count,
+ /* returned: */ real *the_min, real *the_max);
+
+/* Make all the elements in the array between zero and one. */
+extern real *map_to_unit (real * values, unsigned value_count);
+
+
+/* String functions. */
+
+/* Return (a fresh copy of) SOURCE beginning at START and ending at
+ LIMIT. (Or NULL if LIMIT < START.) */
+extern string substring (string source, const unsigned start,
+ const unsigned limit);
+
+/* Change all uppercase letters in S to lowercase. */
+extern string lowercasify (string s);
+
+
+/* Character code parsing. */
+
+/* If the string S parses as a character code, this sets *VALID to
+ `true' and returns the number. If it doesn't, it sets *VALID to
+ `false' and the return value is garbage.
+
+ We allow any of the following possibilies: a single character, as in
+ `a' or `0'; a decimal number, as in `21'; an octal number, as in `03'
+ or `0177'; a hexadecimal number, as in `0x3' or `0xff'. */
+extern charcode_type parse_charcode (string s, boolean *valid);
+
+/* Like `parse_charcode', but gives a fatal error if the string isn't a
+ valid character code. */
+extern charcode_type xparse_charcode (string s);
+
+/* The environment variable name with which to look up auxiliary files. */
+#ifndef LIB_ENVVAR
+#define LIB_ENVVAR "FONTUTIL_LIB"
+#endif
+
+#endif /* not GLOBAL_H */
diff --git a/include/hexify.h b/include/hexify.h
new file mode 100644
index 0000000..600998c
--- /dev/null
+++ b/include/hexify.h
@@ -0,0 +1,33 @@
+/* hexify.h: change strings to ASCII hex characters.
+
+Copyright (C) 1992 Free Software Foundation, Inc.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+#ifndef HEXIFY_H
+#define HEXIFY_H
+
+#include <kpathsea/types.h>
+
+
+
+/* Convert the LENGTH bytes starting at DATA to a string in ASCII
+ hexadecimal, i.e., a string consisting entirely of the characters 0-9
+ and a-f, and terminated with a null. The result is allocated with
+ malloc. */
+extern string hexify (one_byte *data, unsigned length);
+
+#endif /* not HEXIFY_H */
+
diff --git a/include/identity.h b/include/identity.h
new file mode 100644
index 0000000..9f09767
--- /dev/null
+++ b/include/identity.h
@@ -0,0 +1,26 @@
+/* identity.h.
+
+Copyright (C) 1995 Free Software Foundation, Inc.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+#ifndef IDENTITY_H
+#define IDENTITY_H
+
+/* Return `hostname:pid' as a string. */
+extern string get_identity (void);
+
+#endif /* not IDENTITY_H */
+
diff --git a/include/libfile.h b/include/libfile.h
new file mode 100644
index 0000000..bb83d7a
--- /dev/null
+++ b/include/libfile.h
@@ -0,0 +1,59 @@
+/* libfile.h: read auxiliary data files.
+
+Copyright (C) 1992 Free Software Foundation, Inc.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+#ifndef LIBFILE_H
+#define LIBFILE_H
+
+#include <kpathsea/types.h>
+
+
+/* Open (close) the file `HEAD.SUFFIX' using the library path. Give a
+ fatal error if the file cannot be (has not been) opened. Only one
+ file can be open at a time. `libfile_start' returns the resulting
+ opened FILE structure, although this is commonly ignored by the
+ caller, in favor of using `libfile_line' (declared below) to read
+ from the file. */
+extern FILE *libfile_start (string head, string suffix);
+extern void libfile_close (void);
+
+
+/* The name (line number) of the currently open library file, or NULL (0). */
+extern string libfilename (void);
+extern unsigned libfile_linenumber (void);
+
+
+/* An abbreviation for common error messages. */
+#define LIBFILE_ERROR1(fmt, e1) \
+ FATAL3 ("%s:%u: " fmt, libfilename (), libfile_linenumber (), e1);
+#define LIBFILE_ERROR2(fmt, e1, e2) \
+ FATAL4 ("%s:%u: " fmt, libfilename (), libfile_linenumber (), e1, e2);
+
+#define LIBFILE_WARN1(fmt, e1) \
+ fprintf (stderr, "%s:%u: " fmt "\n", libfilename (), libfile_linenumber (),\
+ e1)
+#define LIBFILE_WARN2(fmt, e1, e2) \
+ fprintf (stderr, "%s:%u: " fmt "\n", libfilename (), libfile_linenumber (),\
+ e1, e2)
+
+
+/* Return the next non-blank non-comment line in the currently open
+ library file, or NULL if at EOF. The terminating newline and any
+ trailing comment are also removed. */
+extern string libfile_line (void);
+
+#endif /* not LIBFILE_H */
diff --git a/include/list.h b/include/list.h
new file mode 100644
index 0000000..98c9d73
--- /dev/null
+++ b/include/list.h
@@ -0,0 +1,56 @@
+/* list.h: simple list (represented as arrays) manipulation.
+
+Copyright (C) 1992 Free Software Foundation, Inc.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+#ifndef LIST_H
+#define LIST_H
+
+#include <kpathsea/types.h>
+
+
+
+typedef struct
+{
+ address *list;
+ unsigned size;
+} list_type;
+
+/* The size of the list L. */
+#define LIST_SIZE(l) ((l).size)
+
+/* The address of the array of data. */
+#define LIST_DATA(l) ((l).list)
+
+/* Get the contents of the element at position INDEX in L. */
+#define LIST_ELT(l, index) LIST_DATA (l)[index]
+
+/* Get the last list element. */
+#define LIST_LAST_ELT(l) LIST_ELT (l, LIST_SIZE (l) - 1)
+
+
+/* Constructor/destructor. */
+extern list_type list_init (void);
+extern void list_free (list_type *);
+
+/* Returns a pointer to ELEMENT_SIZE bytes of memory allocated for the
+ new element. */
+extern address list_append (list_type *, unsigned element_size);
+
+/* An abbreviation for the usual case. */
+#define LIST_TAPPEND(l_ptr, type) list_append (l_ptr, sizeof (type))
+
+#endif /* not LIST_H */
diff --git a/include/logreport.h b/include/logreport.h
new file mode 100644
index 0000000..1909964
--- /dev/null
+++ b/include/logreport.h
@@ -0,0 +1,52 @@
+/* logreport.h: status reporting routines.
+
+Copyright (C) 1992 Free Software Foundation, Inc.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+#ifndef LOGREPORT_H
+#define LOGREPORT_H
+
+#include <stdio.h>
+#include <kpathsea/types.h>
+
+
+/* report.h is a separate file because the programs which use it are a
+ proper subset of the programs which use us. */
+#include "report.h"
+
+
+/* The file we write information to. */
+extern FILE *log_file;
+
+/* Only write if this is true. */
+extern boolean logging;
+
+#define LOG(s) \
+ do { if (logging) fputs (s, log_file); } while (0)
+#define LOG1(s, e) \
+ do { if (logging) fprintf (log_file, s, e); } while (0)
+#define LOG2(s, e1, e2) \
+ do { if (logging) fprintf (log_file, s, e1, e2); } while (0)
+#define LOG3(s, e1, e2, e3) \
+ do { if (logging) fprintf (log_file, s, e1, e2, e3); } while (0)
+#define LOG4(s, e1, e2, e3, e4) \
+ do { if (logging) fprintf (log_file, s, e1, e2, e3, e4); } while (0)
+#define LOG5(s, e1, e2, e3, e4, e5) \
+ do { if (logging) fprintf (log_file, s, e1, e2, e3, e4, e5); } while (0)
+
+extern void flush_log_output (void);
+
+#endif /* not LOGREPORT_H */
diff --git a/include/moretypes.h b/include/moretypes.h
new file mode 100644
index 0000000..99b5dd8
--- /dev/null
+++ b/include/moretypes.h
@@ -0,0 +1,78 @@
+/* moretypes.h: common types beyond types.h.
+
+Copyright (C) 1993 Free Software Foundation, Inc.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+#ifndef MORETYPES_H
+#define MORETYPES_H
+
+/* We use `real' for our floating-point variables. */
+typedef double real;
+
+/* A character code. Perhaps someday we will allow for 16-bit
+ character codes, but for now we are restricted to 256 characters per
+ font (like TeX and PostScript). */
+typedef unsigned char charcode_type;
+
+
+/* Used in file formats. */
+typedef unsigned char one_byte;
+typedef signed char signed_byte;
+typedef unsigned short two_bytes;
+typedef short signed_2_bytes;
+typedef unsigned int four_bytes;
+typedef int signed_4_bytes;
+typedef int byte_count_type;
+
+/* These are intended to be used for output in file formats where a
+ ``byte'' is defined to be eight bits, regardless of the hardware. */
+#define ONE_BYTE_BIG (1 << 8)
+#define TWO_BYTES_BIG (1 << 16)
+#define THREE_BYTES_BIG (1 << 24)
+
+
+/* Complex numbers. */
+typedef struct
+{
+ real real;
+ real imag;
+} complex;
+typedef enum { first_complex_part, second_complex_part} complex_part_type;
+typedef enum { polar_rep, rectangular_rep} complex_rep_type;
+
+
+/* Dimensions of a rectangle. */
+typedef struct
+{
+ unsigned height, width;
+} dimensions_type;
+
+#define DIMENSIONS_HEIGHT(d) ((d).height)
+#define DIMENSIONS_WIDTH(d) ((d).width)
+
+
+/* Cartesian points. */
+typedef struct
+{
+ int x, y;
+} coordinate_type;
+
+typedef struct
+{
+ double x, y;
+} real_coordinate_type;
+
+#endif /* not MORETYPES_H */
diff --git a/include/paths.h b/include/paths.h
new file mode 100644
index 0000000..69eedcd
--- /dev/null
+++ b/include/paths.h
@@ -0,0 +1,25 @@
+/* Generated from paths.h.in (Wed Apr 21 13:14:26 PDT 2004). */
+/* Paths. */
+
+/* If the environment variable `FONTUTIL_LIB' isn't set, use this
+ path instead to search for auxiliary files. */
+#ifndef DEFAULT_LIB_PATH
+#define DEFAULT_LIB_PATH ".:/u/karl/gnu/src/fontutils/data:/usr/local/lib/fontutil"
+#endif
+
+/* The meanings of these paths are described in `filename.h'. They are
+ exactly the same as those in the TeX distribution. */
+
+/* The directories listed in these paths are searched for the various
+ font files. The current directory is always searched first. */
+#ifndef DEFAULT_TFM_PATH
+#define DEFAULT_TFM_PATH ".:/usr/local/lib/tex/fonts//"
+#endif
+
+#ifndef DEFAULT_PK_PATH
+#define DEFAULT_PK_PATH ".:/usr/local/lib/tex/fonts//"
+#endif
+
+#ifndef DEFAULT_GF_PATH
+#define DEFAULT_GF_PATH ".:/usr/local/lib/tex/fonts//"
+#endif
diff --git a/include/pathsrch.h b/include/pathsrch.h
new file mode 100644
index 0000000..6bda1dd
--- /dev/null
+++ b/include/pathsrch.h
@@ -0,0 +1,53 @@
+/* pathsrch.h: environment-variable path searching for files, possibly
+ in subdirectories.
+
+Copyright (C) 1992 Free Software Foundation, Inc.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+#ifndef PATHSEARCH_H
+#define PATHSEARCH_H
+
+#include <kpathsea/types.h>
+
+
+/* Look for FILENAME in each of the directories given in the DIR_LIST
+ array. (Unless DIR_LIST is null, or FILENAME is absolute or
+ explicitly relative, in which case we just look at FILENAME.) Return
+ the complete pathname of the first readable file found, or NULL. */
+extern string find_path_filename P2H(string filename, string *dir_list);
+
+/* Return a NULL-terminated array of all the directory names in the
+ value of the environment variable ENV_NAME (or DEFAULT_PATH if it is
+ not set). Each directory in the list ends with the directory separator,
+ e.g., `/'.
+
+ A leading or trailing path separator (e.g., `:') in the value of
+ ENV_NAME is replaced by DEFAULT_PATH.
+
+ If any element of the path ends with a double directory separator
+ (e.g., `foo//'), it is replaced by all its subdirectories. */
+extern string *initialize_path_list P2H(string env_name, string default_path);
+
+/* Replace a leading or trailing `:' in ENV_PATH with DEFAULT_PATH. If
+ neither is present, return ENV_PATH if that is non-null, else
+ DEFAULT_PATH. */
+extern string expand_default P2H(string env_path, string default_path);
+
+/* Replace a leading ~ or ~name in FILENAME with getenv ("HOME") or
+ name's home directory. */
+extern string expand_tilde P1H(string filename);
+
+#endif /* not PATHSEARCH_H */
diff --git a/include/pbm.h b/include/pbm.h
new file mode 100644
index 0000000..a1e16f5
--- /dev/null
+++ b/include/pbm.h
@@ -0,0 +1,46 @@
+/* pbm.h - header file for libpbm portable bitmap library
+*/
+
+#ifndef _PBM_H_
+#define _PBM_H_
+
+#include "pbmplus.h"
+
+typedef unsigned char bit;
+#define PBM_WHITE 0
+#define PBM_BLACK 1
+
+
+/* Magic constants. */
+
+#define PBM_MAGIC1 'P'
+#define PBM_MAGIC2 '1'
+#define RPBM_MAGIC2 '4'
+#define PBM_FORMAT (PBM_MAGIC1 * 256 + PBM_MAGIC2)
+#define RPBM_FORMAT (PBM_MAGIC1 * 256 + RPBM_MAGIC2)
+#define PBM_TYPE PBM_FORMAT
+
+
+/* Macro for turning a format number into a type number. */
+
+#define PBM_FORMAT_TYPE(f) ((f) == PBM_FORMAT || (f) == RPBM_FORMAT ? PBM_TYPE : -1)
+
+
+/* Declarations of routines. */
+
+void pbm_init ARGS(( int* argcP, char* argv[] ));
+
+#define pbm_allocarray( cols, rows ) ((bit**) pm_allocarray( cols, rows, sizeof(bit) ))
+#define pbm_allocrow( cols ) ((bit*) pm_allocrow( cols, sizeof(bit) ))
+#define pbm_freearray( bits, rows ) pm_freearray( (char**) bits, rows )
+#define pbm_freerow( bitrow ) pm_freerow( (char*) bitrow )
+
+bit** pbm_readpbm ARGS(( FILE* file, int* colsP, int* rowsP ));
+void pbm_readpbminit ARGS(( FILE* file, int* colsP, int* rowsP, int* formatP ));
+void pbm_readpbmrow ARGS(( FILE* file, bit* bitrow, int cols, int format ));
+
+void pbm_writepbm ARGS(( FILE* file, bit** bits, int cols, int rows, int forceplain ));
+void pbm_writepbminit ARGS(( FILE* file, int cols, int rows, int forceplain ));
+void pbm_writepbmrow ARGS(( FILE* file, bit* bitrow, int cols, int forceplain ));
+
+#endif /*_PBM_H_*/
diff --git a/include/pbmplus.h b/include/pbmplus.h
new file mode 100644
index 0000000..e001fea
--- /dev/null
+++ b/include/pbmplus.h
@@ -0,0 +1,196 @@
+/* pbmplus.h - header file for PBM, PGM, PPM, and PNM
+**
+** Copyright (C) 1988, 1989, 1991 by Jef Poskanzer.
+**
+** Permission to use, copy, modify, and distribute this software and its
+** documentation for any purpose and without fee is hereby granted, provided
+** that the above copyright notice appear in all copies and that both that
+** copyright notice and this permission notice appear in supporting
+** documentation. This software is provided "as is" without express or
+** implied warranty.
+
+ Configuration options modified for GNU --karl.
+*/
+
+#ifndef _PBMPLUS_H_
+#define _PBMPLUS_H_
+
+#include <sys/types.h>
+#include <stdio.h>
+
+#include "config.h"
+
+
+#if 0 /* karl */
+#if ! ( defined(BSD) || defined(SYSV) || defined(MSDOS))
+/* CONFIGURE: If your system is >= 4.2BSD, set the BSD option; if you're a
+** System V site, set the SYSV option; and if you're IBM-compatible, set
+** MSDOS. If your compiler is ANSI C, you're probably better off setting
+** SYSV.
+*/
+#define BSD
+/* #define SYSV */
+/* #define MSDOS */
+#endif
+#endif
+
+/* CONFIGURE: If you want to enable writing "raw" files, set this option.
+** "Raw" files are smaller, and much faster to read and write, but you
+** must have a filesystem that allows all 256 ASCII characters to be read
+** and written. You will no longer be able to mail P?M files without
+** using uuencode or the equivalent, or running the files through pnmnoraw.
+** Note that reading "raw" files works whether writing is enabled or not.
+*/
+#define PBMPLUS_RAWBITS
+
+/* CONFIGURE: On some systems, the putc() macro is broken and will return
+** EOF when you write out a 255. For example, ULTRIX does this. This
+** only matters if you have defined RAWBITS. To test whether your system
+** is broken this way, go ahead and compile things with RAWBITS defined,
+** and then try "pbmmake -b 8 1 > file". If it works, fine. If not,
+** define BROKENPUTC1 and try again - if that works, good. Otherwise,
+** BROKENPUTC2 is guaranteed to work, although it's about twice as slow.
+*/
+/* #define PBMPLUS_BROKENPUTC1 */
+/* #define PBMPLUS_BROKENPUTC2 */
+
+#ifdef PBMPLUS_BROKENPUTC1
+#undef putc
+/* This is a fixed version of putc() that should work on most Unix systems. */
+#define putc(x,p) (--(p)->_cnt>=0? ((int)(unsigned char)(*(p)->_ptr++=(unsigned char)(x))) : _flsbuf((unsigned char)(x),p))
+#endif /*PBMPLUS_BROKENPUTC1*/
+#ifdef PBMPLUS_BROKENPUTC2
+#undef putc
+/* For this one, putc() becomes a function, defined in pbm/libpbm1.c. */
+#endif /*PBMPLUS_BROKENPUTC2*/
+
+/* CONFIGURE: PGM can store gray values as either bytes or shorts. For most
+** applications, bytes will be big enough, and the memory savings can be
+** substantial. However, if you need more than 8 bits of resolution, then
+** define this symbol.
+**
+** If you are not making PGM, you can ignore this.
+*/
+/* #define PGM_BIGGRAYS */
+
+/* CONFIGURE: Normally, PPM handles a pixel as a struct of three grays.
+** It can also be configured to pack the three values into a single longword,
+** 10 bits each. If you have configured PGM with the PGM_BIGGRAYS option
+** (store grays as shorts), AND you don't need more than 10 bits for each
+** color component, AND you care more about memory use than speed, then
+** this option might be a win. Under these circumstances it will make
+** some of the programs use 1.5 times less space, but all of the programs
+** will run about 1.4 times slower.
+**
+** If you are not using PGM_BIGGRAYS, then this option is useless -- it
+** doesn't save any space, but it still slows things down.
+**
+** If you are not making PPM, you can ignore this.
+*/
+/* #define PPM_PACKCOLORS */
+
+/* CONFIGURE: uncomment this to enable debugging checks. */
+/* #define DEBUG */
+
+#if 0 /* karl */
+#ifdef SYSV
+#include <string.h>
+#define index strchr
+#define rindex strrchr
+#define srandom srand
+#define random rand
+#define bzero(dst,len) memset(dst, 0, len)
+#define bcopy(src,dst,len) memcpy(dst, src, len)
+#define bcmp memcmp
+#else /*SYSV*/
+#include <strings.h>
+#endif /*SYSV*/
+#endif /* 0 */
+
+/* CONFIGURE: On some systems, malloc.h doesn't declare these, so we have
+** to do it. On other systems, for example HP/UX, it declares them
+** incompatibly. And some systems, for example Dynix, don't have a
+** malloc.h at all. A sad situation. If you have compilation problems
+** that point here, feel free to tweak or remove these declarations.
+*/
+/* Thank you, I did remove them:
+#include <malloc.h>
+extern char* malloc();
+extern char* realloc();
+extern char* calloc();
+*/
+/* End of configurable definitions. */
+
+
+#undef max
+#define max(a,b) ((a) > (b) ? (a) : (b))
+#undef min
+#define min(a,b) ((a) < (b) ? (a) : (b))
+#undef abs
+#define abs(a) ((a) >= 0 ? (a) : -(a))
+#undef odd
+#define odd(n) ((n) & 1)
+
+
+/* Definitions to make PBMPLUS work with either ANSI C or C Classic. */
+
+#if __STDC__
+#define ARGS(alist) alist
+#else /*__STDC__*/
+#define ARGS(alist) ()
+#define const
+#endif /*__STDC__*/
+
+
+/* Initialization. */
+
+void pm_init ARGS(( int* argcP, char* argv[] ));
+
+
+/* Variable-sized arrays definitions. */
+
+char** pm_allocarray ARGS(( int cols, int rows, int size ));
+char* pm_allocrow ARGS(( int cols, int size ));
+void pm_freearray ARGS(( char** its, int rows ));
+void pm_freerow ARGS(( char* itrow ));
+
+
+/* Case-insensitive keyword matcher. */
+
+int pm_keymatch ARGS(( char* str, char* keyword, int minchars ));
+
+
+/* Log base two hacks. */
+
+int pm_maxvaltobits ARGS(( int maxval ));
+int pm_bitstomaxval ARGS(( int bits ));
+
+
+/* Error handling definitions. */
+
+void pm_message( /* char* fmt, char* v1, char* v2, char* v3, char* v4, char* v5 */ ); /* prototypes can't handle this */
+void pm_error( /* char* fmt, char* v1, char* v2, char* v3, char* v4, char* v5 */ ); /* doesn't return */
+void pm_perror ARGS(( char* reason )); /* doesn't return */
+void pm_usage ARGS(( char* usage )); /* doesn't return */
+
+
+/* File open/close that handles "-" as stdin and checks errors. */
+
+FILE* pm_openr ARGS(( char* name ));
+FILE* pm_openw ARGS(( char* name ));
+void pm_close ARGS(( FILE* f ));
+
+
+/* Endian I/O. */
+
+int pm_readbigshort ARGS(( FILE* in, short* sP ));
+int pm_writebigshort ARGS(( FILE* out, short s ));
+int pm_readbiglong ARGS(( FILE* in, long* lP ));
+int pm_writebiglong ARGS(( FILE* out, long l ));
+int pm_readlittleshort ARGS(( FILE* in, short* sP ));
+int pm_writelittleshort ARGS(( FILE* out, short s ));
+int pm_readlittlelong ARGS(( FILE* in, long* lP ));
+int pm_writelittlelong ARGS(( FILE* out, long l ));
+
+
+#endif /*_PBMPLUS_H_*/
diff --git a/include/pk.h b/include/pk.h
new file mode 100644
index 0000000..1e7fd8b
--- /dev/null
+++ b/include/pk.h
@@ -0,0 +1,95 @@
+/* pk.h: manipulate packed format font files. See the PKtype source
+ code (by Tomas Rokicki), among other places, for the precise
+ definition of this bitmap format.
+
+Copyright (C) 1992 Free Software Foundation, Inc.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+#ifndef PACKED_FONT_LIBRARY_H
+#define PACKED_FONT_LIBRARY_H
+
+#include "bounding-box.h"
+#include "font.h"
+#include <kpathsea/types.h>
+
+
+
+/* Prepare and finish off FONT_NAME for reading. */
+extern boolean pk_open_input_file (string font_name);
+extern void pk_close_input_file (string font_name);
+
+/* The global information about the PK file is given in the preamble. */
+typedef struct
+{
+ string comment;
+ fix_word design_size;
+ unsigned checksum;
+ double h_resolution, v_resolution;
+} pk_preamble_type;
+
+/* This usually indicates the source of the PK file. */
+#define PK_COMMENT(p) ((p).comment)
+
+/* The font's design size is in TeX points, expressed as a fix_word. */
+#define PK_DESIGN_SIZE(p) ((p).design_size)
+
+/* The PK checksum should match the checksums in the TFM file and/or the
+ GF file, if they exist. */
+#define PK_CHECKSUM(p) ((p).checksum)
+
+/* We express the resolutions in pixels per point multiplied by 2^16. */
+#define PK_H_RESOLUTION(p) ((p).h_resolution)
+#define PK_V_RESOLUTION(p) ((p).v_resolution)
+
+/* Return the above structure for the font FONT_NAME. */
+extern pk_preamble_type pk_get_preamble (string font_name);
+
+
+
+/* The characters comprise the bulk of the file. */
+typedef struct
+{
+ one_byte code;
+ fix_word tfm_width;
+ signed_4_bytes h_escapement;
+ bounding_box_type bb;
+ bitmap_type bitmap;
+} pk_char_type;
+
+/* The library guarantees that the character code is in the range 0 to
+ 255 (although the PK format does not require that). */
+#define PK_CHARCODE(c) ((c).code)
+
+/* The TFM width is the character's true width divided by the design
+ size (expressed as a fix_word). */
+#define PK_TFM_WIDTH(c) ((c).tfm_width)
+
+/* The horizontal escapement (i.e., set width) is in pixels. */
+#define PK_H_ESCAPEMENT(c) ((c).h_escapement)
+
+/* The bounding box is guaranteed to be the tightest possible. */
+#define PK_CHAR_BB(c) ((c).bb)
+
+/* The bits themselves. See `bitmap.h'. */
+#define PK_BITMAP(c) ((c).bitmap)
+
+
+/* Allocate and return a pointer to the above structure for the
+ character CODE in the font FONT_NAME, or NULL if that character is
+ not in that font. */
+extern pk_char_type *pk_get_char (one_byte code, string font_name);
+
+#endif /* not PACKED_FONT_LIBRARY_H */
diff --git a/include/rand.h b/include/rand.h
new file mode 100644
index 0000000..e2d91ae
--- /dev/null
+++ b/include/rand.h
@@ -0,0 +1,35 @@
+/* rand.h: declarations for pseudo-random number generator.
+
+Copyright (C) 1992 Free Software Foundation, Inc.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+#ifndef RAND_H
+#define RAND_H
+
+/* Forgot the system's idea of `RAND_MAX'. (This must therefore be
+ included after <stdlib.h>.) */
+#ifdef RAND_MAX
+#undef RAND_MAX
+#endif
+#define RAND_MAX ((unsigned) (1 << 31) - 2)
+
+/* Set the state of the random number generator. */
+extern void seed_rand (unsigned seed);
+
+/* Return a pseudo-random number between 0 and RAND_MAX. */
+extern int k_rand (void);
+
+#endif /* not RAND_H */
diff --git a/include/report.h b/include/report.h
new file mode 100644
index 0000000..b1d615c
--- /dev/null
+++ b/include/report.h
@@ -0,0 +1,57 @@
+/* report.h: status reporting routines.
+
+Copyright (C) 1992 Free Software Foundation, Inc.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+#ifndef REPORT_H
+#define REPORT_H
+
+#include <stdio.h>
+#include <kpathsea/types.h>
+
+
+
+/* The file we write information to. */
+extern FILE *report_file;
+
+/* Only print anything if this is true. */
+extern boolean verbose;
+
+
+#define REPORT(s) \
+ do if (verbose) { fputs (s, report_file); fflush (report_file); } \
+ while (0)
+
+#define REPORT1(s, e) \
+ do if (verbose) { fprintf (report_file, s, e); fflush (report_file); }\
+ while (0)
+
+#define REPORT2(s, e1, e2) \
+ do if (verbose) { fprintf (report_file, s, e1, e2); \
+ fflush (report_file); } \
+ while (0)
+
+#define REPORT3(s, e1, e2, e3) \
+ do if (verbose) { fprintf (report_file, s, e1, e2, e3); \
+ fflush (report_file); } \
+ while (0)
+
+#define REPORT4(s, e1, e2, e3, e4) \
+ do if (verbose) { fprintf (report_file, s, e1, e2, e3, e4); \
+ fflush (report_file); } \
+ while (0)
+
+#endif /* not REPORT_H */
diff --git a/include/scaled-num.h b/include/scaled-num.h
new file mode 100644
index 0000000..d4715a8
--- /dev/null
+++ b/include/scaled-num.h
@@ -0,0 +1,39 @@
+/* scaled-num.h: declarations for ``scaled'' numbers, which are a 32-bit
+ word with 16 bits of fraction.
+
+Copyright (C) 1992 Free Software Foundation, Inc.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+#ifndef SCALED_NUM_H
+#define SCALED_NUM_H
+
+#include <kpathsea/types.h>
+
+
+
+/* The type. */
+typedef long scaled;
+
+/* Print a scaled number, rounded to five digits. */
+extern void print_scaled (scaled);
+
+/* Conversions to and from C floating-point numbers. The conversions
+ may not be exact, but since we use this to represent physical
+ quantities, a tiny loss of accuracy does not matter. */
+extern const real scaled_to_real (scaled);
+extern const scaled real_to_scaled (real);
+
+#endif /* not SCALED_NUM_H */
diff --git a/include/spline.h b/include/spline.h
new file mode 100644
index 0000000..f6690cb
--- /dev/null
+++ b/include/spline.h
@@ -0,0 +1,128 @@
+/* spline.h: manipulate the spline representation.
+
+Copyright (C) 1992 Free Software Foundation, Inc.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+#ifndef SPLINE_H
+#define SPLINE_H
+
+#include <stdio.h>
+#include "bounding-box.h"
+#include <kpathsea/types.h>
+
+
+
+/* Third degree is the highest we deal with. */
+typedef enum
+{
+ LINEAR = 1, QUADRATIC = 2, CUBIC = 3
+} polynomial_degree;
+
+
+/* A Bezier spline can be represented as four points in the real plane:
+ a starting point, ending point, and two control points. The
+ curve always lies in the convex hull defined by the four points. It
+ is also convenient to save the divergence of the spline from the
+ straight line defined by the endpoints. */
+typedef struct
+{
+ real_coordinate_type v[4]; /* The control points. */
+ polynomial_degree degree;
+ real linearity;
+} spline_type;
+
+#define START_POINT(spl) ((spl).v[0])
+#define CONTROL1(spl) ((spl).v[1])
+#define CONTROL2(spl) ((spl).v[2])
+#define END_POINT(spl) ((spl).v[3])
+#define SPLINE_DEGREE(spl) ((spl).degree)
+#define SPLINE_LINEARITY(spl) ((spl).linearity)
+
+
+/* Return a spline structure. */
+extern spline_type new_spline (void);
+
+/* Print a spline on the given file. */
+extern void print_spline (FILE *, spline_type);
+
+/* Evaluate SPLINE at the given T value. */
+extern real_coordinate_type evaluate_spline (spline_type spline, real t);
+
+
+
+/* Each outline in a character is typically represented by many
+ splines. So, here is a list structure for that: */
+typedef struct
+{
+ spline_type *data;
+ unsigned length;
+} spline_list_type;
+
+/* An empty list will have length zero (and null data). */
+#define SPLINE_LIST_LENGTH(s_l) ((s_l).length)
+
+/* The address of the beginning of the array of data. */
+#define SPLINE_LIST_DATA(s_l) ((s_l).data)
+
+/* The element INDEX in S_L. */
+#define SPLINE_LIST_ELT(s_l, index) (SPLINE_LIST_DATA (s_l)[index])
+
+/* The last element in S_L. */
+#define LAST_SPLINE_LIST_ELT(s_l) \
+ (SPLINE_LIST_DATA (s_l)[SPLINE_LIST_LENGTH (s_l) - 1])
+
+/* The previous and next elements to INDEX in S_L. */
+#define NEXT_SPLINE_LIST_ELT(s_l, index) \
+ SPLINE_LIST_ELT (s_l, ((index) + 1) % SPLINE_LIST_LENGTH (s_l))
+#define PREV_SPLINE_LIST_ELT(s_l, index) \
+ SPLINE_LIST_ELT (s_l, index == 0 \
+ ? SPLINE_LIST_LENGTH (s_l) - 1 \
+ : index - 1)
+
+/* Construct and destroy new `spline_list_type' objects. */
+extern spline_list_type *new_spline_list (void);
+extern spline_list_type *init_spline_list (spline_type);
+extern void free_spline_list (spline_list_type *);
+
+/* Append the spline S to the list S_LIST. */
+extern void append_spline (spline_list_type *s_list, spline_type s);
+
+/* Append the elements in list S2 to S1, changing S1. */
+extern void concat_spline_lists (spline_list_type *s1, spline_list_type s2);
+
+
+
+/* Each character is in general made up of many outlines. So here is one
+ more list structure. */
+typedef struct
+{
+ spline_list_type *data;
+ unsigned length;
+} spline_list_array_type;
+
+/* Turns out we can use the same definitions for lists of lists as for
+ just lists. But we define the usual names, just in case. */
+#define SPLINE_LIST_ARRAY_LENGTH SPLINE_LIST_LENGTH
+#define SPLINE_LIST_ARRAY_DATA SPLINE_LIST_DATA
+#define SPLINE_LIST_ARRAY_ELT SPLINE_LIST_ELT
+#define LAST_SPLINE_LIST_ARRAY_ELT LAST_SPLINE_LIST_ELT
+
+/* The usual routines. */
+extern spline_list_array_type new_spline_list_array (void);
+extern void free_spline_list_array (spline_list_array_type *);
+extern void append_spline_list (spline_list_array_type *, spline_list_type);
+
+#endif /* not SPLINE_H */
diff --git a/include/statistics.h b/include/statistics.h
new file mode 100644
index 0000000..a2f05c0
--- /dev/null
+++ b/include/statistics.h
@@ -0,0 +1,45 @@
+/* statistics.h: find the first and second moments.
+
+Copyright (C) 1992 Free Software Foundation, Inc.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+#ifndef STATISTICS_H
+#define STATISTICS_H
+
+#include <kpathsea/types.h>
+
+
+
+
+typedef struct
+{
+ real mean;
+ real variance;
+} statistics_type;
+
+/* Compute the statistics on A. */
+extern statistics_type statistics (real *a, unsigned length,
+ unsigned pertinent);
+
+/* Return the mean of the array A, assumed to have length LENGTH -- but
+ only PERTINENT of the entries really count. */
+extern real mean (real *a, unsigned length, unsigned pertinent);
+
+/* Similarly, for the standard deviation. */
+extern real standard_deviation (real *, real mean, unsigned length,
+ unsigned pertinent);
+
+#endif /* not STATISTICS_H */
diff --git a/include/str-lcase.h b/include/str-lcase.h
new file mode 100644
index 0000000..dcc4d98
--- /dev/null
+++ b/include/str-lcase.h
@@ -0,0 +1,31 @@
+/* str-lcase.h: convert a string to lowercase.
+
+Copyright (C) 1992 Free Software Foundation, Inc.
+This file was part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#ifndef STR_LCASE_H
+#define STR_LCASE_H
+
+#include <kpathsea/types.h>
+
+
+/* Return a malloced copy of S with all its uppercase letters replaced
+ with their lowercase counterparts. */
+extern string str_to_lower (string s);
+
+#endif /* not CASE_H */
diff --git a/include/tfm.h b/include/tfm.h
new file mode 100644
index 0000000..aa904b7
--- /dev/null
+++ b/include/tfm.h
@@ -0,0 +1,300 @@
+/* tfm.h: read and write TeX font metric files. See Metafont: The
+ Program, by Don Knuth, (Volume D of Computers & Typesetting), chapter 45,
+ among other places, for the precise definition of this format.
+
+Copyright (C) 1992 Free Software Foundation, Inc.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+#ifndef TFM_FONT_LIBRARY_H
+#define TFM_FONT_LIBRARY_H
+
+#include "fix-num.h"
+#include "list.h"
+#include <kpathsea/types.h>
+
+
+
+/* Only one input file may be open at a time. You therefore do not give a
+ file as a parameter to the routines. */
+extern boolean tfm_open_input_file (string filename);
+extern void tfm_close_input_file (void);
+
+/* The name of the currently open input file, or NULL if none. */
+extern string tfm_input_filename (void);
+
+
+/* We output a property list file, since it is so much easier to deal
+ with than the binary tfm format. The program PLtoTF, which is part
+ of the standard TeX distribution, converts from the one to the other. */
+extern boolean tfm_open_pl_output_file (string filename);
+extern void tfm_close_pl_output_file (void);
+
+/* This uses the PL filename to `tfm_open_pl_output_file' and invokes
+ PLtoTF to output a TFM file with the same root and extension `.tfm',
+ unless TFM_NAME is non-null, in which it is used. You should not
+ call `tfm_close_pl_output_file' before calling this. This flushes
+ all the data written before converting. */
+extern void tfm_convert_pl (string tfm_name, boolean verbose);
+
+
+/* The restriction to 256 characters in a TFM file is part of the file
+ format, so this number should only be changed in the (very unlikely)
+ event that the file format changes. */
+#define TFM_SIZE 256
+
+/* Fontwide information. All real values are in printer's points:
+ 72.27 points = 1 inch. */
+
+/* TFM_MIN_DESIGNSIZE <= designsize < TFM_MAX_DESIGNSIZE. */
+#define TFM_MIN_DESIGNSIZE 1.0
+#define TFM_MAX_DESIGNSIZE 2048
+
+/* Check that a design size's value is in range. */
+#define TFM_CHECK_DESIGN_SIZE(ds) \
+if ((ds) < TFM_MIN_DESIGNSIZE || TFM_MAX_DESIGNSIZE <= (ds)) \
+ FATAL3 ("Design size %.2f is outside range %.1f to %d", \
+ ds, TFM_MIN_DESIGNSIZE, TFM_MAX_DESIGNSIZE);
+
+/* The maximum number of global font parameters we allow. */
+#define TFM_MAX_FONTDIMENS 30
+
+/* The maximum length of a codingscheme string. */
+#define TFM_MAX_CODINGSCHEME_LENGTH 39
+
+
+typedef struct
+{
+ charcode_type first_charcode, last_charcode;
+ four_bytes checksum;
+ real design_size;
+ string coding_scheme;
+ unsigned parameter_count;
+ real parameters[TFM_MAX_FONTDIMENS];
+} tfm_global_info_type;
+
+/* The checksum. */
+#define TFM_CHECKSUM(info) ((info).checksum)
+
+/* The design size of the font. */
+#define TFM_DESIGN_SIZE(info) ((info).design_size)
+
+/* The coding scheme. */
+#define TFM_CODING_SCHEME(info) ((info).coding_scheme)
+
+/* How many parameters are actually being used. */
+#define TFM_FONTDIMEN_COUNT(info) ((info).parameter_count)
+
+/* The NUMBERth parameter of the `tfm_global_info_type' variable INFO,
+ in points. Since font parameters are numbered starting at 1, and the
+ C array starts at 0, we subtract 1 from NUMBER. */
+#define TFM_FONTDIMEN(info, number) ((info).parameters[(number) - 1])
+
+/* Like TFM_FONTDIMEN, but if NUMBER is out of range return RET. */
+#define TFM_SAFE_FONTDIMEN(info, number, ret) \
+ ((number) - 1 < TFM_FONTDIMEN_COUNT (info) \
+ ? TFM_FONTDIMEN (info, number) : (ret))
+
+/* Define symbolic names for the numbers of the parameters we
+ recognize. Some numbers have more than one name. */
+#define TFM_SLANT_PARAMETER 1
+#define TFM_SPACE_PARAMETER 2
+#define TFM_STRETCH_PARAMETER 3
+#define TFM_SHRINK_PARAMETER 4
+#define TFM_XHEIGHT_PARAMETER 5
+#define TFM_QUAD_PARAMETER 6
+#define TFM_EXTRASPACE_PARAMETER 7
+#define TFM_NUM1_PARAMETER 8
+#define TFM_NUM2_PARAMETER 9
+#define TFM_NUM3_PARAMETER 10
+#define TFM_DENOM1_PARAMETER 11
+#define TFM_DENOM2_PARAMETER 12
+#define TFM_SUP1_PARAMETER 13
+#define TFM_SUP2_PARAMETER 14
+#define TFM_SUP3_PARAMETER 15
+#define TFM_SUB1_PARAMETER 16
+#define TFM_SUB2_PARAMETER 17
+#define TFM_SUPDROP_PARAMETER 18
+#define TFM_SUBDROP_PARAMETER 19
+#define TFM_DELIM1_PARAMETER 20
+#define TFM_DELIM2_PARAMETER 21
+#define TFM_AXISHEIGHT_PARAMETER 22
+#define TFM_DEFAULTRULETHICKNESS_PARAMETER 8
+#define TFM_BIGOPSPACING1_PARAMETER 9
+#define TFM_BIGOPSPACING2_PARAMETER 10
+#define TFM_BIGOPSPACING3_PARAMETER 11
+#define TFM_BIGOPSPACING4_PARAMETER 12
+#define TFM_BIGOPSPACING5_PARAMETER 13
+
+/* These are not in any of the standard TeX fonts, but the information
+ is useful nevertheless. */
+#define TFM_LEADINGHEIGHT_PARAMETER 23
+#define TFM_LEADINGDEPTH_PARAMETER 24
+#define TFM_FONTSIZE_PARAMETER 25
+#define TFM_VERSION_PARAMETER 26
+
+/* Return the global info from the current input font. */
+extern tfm_global_info_type tfm_get_global_info (void);
+
+/* We could have more routines here, one for each global quantity.
+ These call `tfm_get_global_info' for you, so that if all you are
+ interested in is, say, the interword space, you can get only that. */
+extern unsigned tfm_get_checksum (void);
+extern double tfm_get_design_size (void);
+extern string tfm_get_coding_scheme (void);
+extern double tfm_get_interword_space (void);
+extern double tfm_get_x_height (void);
+
+
+/* Return an initialized structure. This doesn't read any files. */
+extern tfm_global_info_type tfm_init_global_info (void);
+
+
+/* The `first_charcode', `last_charcode', and `parameter_count'
+ members of this structure are computed automatically. The rest of
+ the structure is output to the PL file. */
+extern void tfm_put_global_info (tfm_global_info_type);
+
+
+/* Set the header in TFM_INFO according to the string S, which
+ should look like: <header-item>:<value>,<header-item>:<value>,...,
+ where each <header-item> is <header-item> can be one of the strings
+ `checksum', `designsize' or `codingscheme', with casefolding. `checksum'
+ requires <four-bytes>, `designsize' a <real>, with TFM_MIN_DESIGNSIZE
+ <= <real> <= TFM_MAX_DESIGNSIZE, and `codingscheme' a <string> of
+ length not greater than TFM_MAX_CODINGSCHEME_LENGTH and containing no
+ parentheses or commas. */
+extern void tfm_set_header (string s, tfm_global_info_type *tfm_info);
+
+/* Set the design (and font size) of TFM_INFO to DESIGN_SIZE, if they're
+ not set already. */
+extern void tfm_set_design_size (real design_size,
+ tfm_global_info_type *tfm_info);
+
+/* Set values in INFO according to the specification in S, which should
+ look like `<fontdimen>:<real>,<fontdimen>:<real>,...', where each
+ <fontdimen> is either a number between 1 and TFM_MAX_FONTDIMENS
+ or one of the standard names. */
+extern void tfm_set_fontdimens (string s, tfm_global_info_type *info);
+
+/* Return the fontdimen number of S if we recognize it as the name of a
+ fontdimen, else zero. */
+extern unsigned tfm_fontdimen_number (string s);
+
+/* Return the fontdimen name corresponding to the number N if there is
+ one, else NULL. The first fontdimen is numbered 1. If there is more
+ than one name for N, it's arbitrary which is returned. */
+extern string tfm_fontdimen_name (unsigned n);
+
+/* Set parameter P in INFO to V. Set any intervening parameters
+ between the previous last parameter set in TFM_INFO and P to zero. */
+extern void tfm_set_fontdimen (tfm_global_info_type *info, unsigned p, real v);
+
+/* Set the `fontsize' fontdimen in TFM_INFO to the designsize, if the
+ latter is set. */
+extern void tfm_set_fontsize (tfm_global_info_type *tfm_info);
+
+/* We store the character dimensions we read as both approximate
+ floating point values, in printer's points, and as (unscaled by the
+ design_size) `fix_word' values. On output, we look only at the
+ former. */
+
+typedef struct
+{
+ boolean exists;
+ charcode_type code;
+ real width, height, depth, italic_correction;
+ fix_word fix_width, fix_height, fix_depth, fix_italic_correction;
+ list_type kern;
+ list_type ligature;
+} tfm_char_type;
+
+/* Says whether or not this character was in the TFM file. */
+#define TFM_CHAR_EXISTS(tc) ((tc).exists)
+
+/* The character code. */
+#define TFM_CHARCODE(tc) ((tc).code)
+
+/* The (possibly negative) dimensions, in points and fixes. */
+#define TFM_WIDTH(tc) ((tc).width)
+#define TFM_FIX_WIDTH(tc) ((tc).fix_width)
+#define TFM_HEIGHT(tc) ((tc).height)
+#define TFM_FIX_HEIGHT(tc) ((tc).fix_height)
+#define TFM_DEPTH(tc) ((tc).depth)
+#define TFM_FIX_DEPTH(tc) ((tc).fix_depth)
+#define TFM_ITALIC_CORRECTION(tc) ((tc).italic_correction)
+#define TFM_FIX_ITALIC_CORRECTION(tc) ((tc).fix_italic_correction)
+
+/* The kern list. */
+#define TFM_KERN(tc) ((tc).kern)
+
+/* The ligature list. */
+#define TFM_LIGATURE(tc) ((tc).ligature)
+
+
+/* This allocates and returns an array of `TFM_SIZE' elements, filled
+ with the information in the input file about each character. */
+extern tfm_char_type *tfm_get_chars (void);
+
+/* Return a pointer to the TFM information about the single character
+ CODE, or NULL if the character CODE wasn't in the TFM file. */
+extern tfm_char_type *tfm_get_char (charcode_type code);
+
+/* Return a single initialized `tfm_char_type' structure, and an
+ initialized array of `TFM_SIZE' elements, respectively. These are
+ useful for output. */
+extern tfm_char_type tfm_new_char (void);
+extern tfm_char_type *tfm_new_chars (void);
+
+/* Take an array of `TFM_SIZE' elements and outputs them to
+ the PL file. The fix_word dimensions aren't looked at. */
+extern void tfm_put_chars (tfm_char_type *);
+
+/* Output the single TFM character C. */
+extern void tfm_put_char (tfm_char_type c);
+
+/* When typesetting, the current character + `character' leads to
+ `ligature'. The TFM format was extended in 1990 to allow for more
+ complicated ligatures than this, but we do not make those
+ distinctions. */
+typedef struct
+{
+ charcode_type character;
+ charcode_type ligature;
+} tfm_ligature_type;
+
+/* Similarly for kerns. */
+typedef struct
+{
+ charcode_type character;
+ real kern;
+} tfm_kern_type;
+
+
+/* Return the kern between the characters LEFT and RIGHT; if no such
+ kern exists, return zero. */
+extern real tfm_get_kern (tfm_char_type left, charcode_type right);
+
+/* Make the kern for the character RIGHT in the list of `tfm_kern_type's
+ KERN_LIST be K (taken to be printer's points), replacing any kern
+ already present. */
+extern void tfm_set_kern (list_type *kern_list, charcode_type right, real k);
+
+/* Add a ligature in LIG_LIST for the character RIGHT to yield LIGATURE,
+ replacing any ligature already present. */
+extern void tfm_set_ligature (list_type *lig_list, charcode_type right,
+ charcode_type ligature);
+
+#endif /* not TFM_FONT_LIBRARY_H */
diff --git a/include/varstring.h b/include/varstring.h
new file mode 100644
index 0000000..0768e4b
--- /dev/null
+++ b/include/varstring.h
@@ -0,0 +1,64 @@
+/* varstring.h: variable-length strings.
+
+Copyright (C) 1992 Free Software Foundation, Inc.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+#ifndef VARSTRING_H
+#define VARSTRING_H
+
+#include <kpathsea/types.h>
+
+
+
+/* Initialize a variable-length string. */
+typedef struct
+{
+ unsigned allocated;
+ unsigned used;
+ string data;
+} variable_string;
+
+/* The data characters. */
+#define VS_CHARS(vs) ((vs).data)
+
+/* This is the number of bytes allocated for the string. */
+#define VS_ALLOCATED(vs) ((vs).allocated)
+
+/* This is the number of bytes used. */
+#define VS_USED(vs) ((vs).used)
+
+
+/* Create a new structure, initializing the data to a null byte. */
+extern variable_string vs_init (void);
+
+/* Free the string. */
+extern void vs_free (variable_string *);
+
+
+/* Put NEW_CHAR at position POS in S. POS may be beyond the current
+ length of S. You are responsible for putting a null at the end of
+ the string when you are done constructing it, if you want one. */
+extern void vs_set_char (variable_string *s, unsigned pos, char new_char);
+
+/* Put NEW_CHAR at the end of V. As with `vs_set_char', no null is
+ appended. */
+extern void vs_append_char (variable_string *v, char new_char);
+
+/* Return concatenation of VS1 and VS2 in a new variable string. */
+extern variable_string vs_concat (variable_string vs1, variable_string vs2);
+
+#endif /* not VARSTRING_H */
+
diff --git a/include/vector.h b/include/vector.h
new file mode 100644
index 0000000..cf58143
--- /dev/null
+++ b/include/vector.h
@@ -0,0 +1,103 @@
+/* vector.h: operations on vectors and points.
+
+Copyright (C) 1992 Free Software Foundation, Inc.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+#ifndef VECTOR_H
+#define VECTOR_H
+
+#include <kpathsea/types.h>
+
+
+/* Our vectors are represented as displacements along the x and y axes. */
+
+typedef struct
+{
+ real dx, dy;
+} vector_type;
+
+
+/* Consider a point as a vector from the origin. */
+extern const vector_type make_vector (const real_coordinate_type);
+
+/* And a vector as a point, i.e., a displacement from the origin. */
+extern const real_coordinate_type vector_to_point (const vector_type);
+
+
+/* Definitions for these common operations can be found in any decent
+ linear algebra book, and most calculus books. */
+
+extern const real magnitude (const vector_type);
+extern const vector_type normalize (const vector_type);
+
+extern const vector_type Vadd (const vector_type, const vector_type);
+extern const real Vdot (const vector_type, const vector_type);
+extern const vector_type Vmult_scalar (const vector_type, const real);
+extern const real Vangle (const vector_type in, const vector_type out);
+
+/* These operations could have been named `P..._vector' just as well as
+ V..._point, so we may as well allow both names. */
+#define Padd_vector Vadd_point
+extern const real_coordinate_type Vadd_point
+ (const real_coordinate_type, const vector_type);
+
+#define Psubtract_vector Vsubtract_point
+extern const real_coordinate_type Vsubtract_point
+ (const real_coordinate_type, const vector_type);
+
+/* This returns the rounded sum. */
+#define IPadd_vector Vadd_int_point
+extern const coordinate_type Vadd_int_point
+ (const coordinate_type, const vector_type);
+
+/* Take the absolute value of both components. */
+extern const vector_type Vabs (const vector_type);
+
+
+
+/* Operations on points with real coordinates. It is not orthogonal,
+ but more convenient, to have the subtraction operator return a
+ vector, and the addition operator return a point. */
+extern const vector_type Psubtract
+ (const real_coordinate_type, const real_coordinate_type);
+
+/* These are heavily used in spline fitting, so we define them as macros
+ instead of functions. */
+#define Padd(rc1, rc2) \
+ ((real_coordinate_type) { (rc1).x + (rc2).x, (rc1).y + (rc2).y })
+#define Pmult_scalar(rc, r) \
+ ((real_coordinate_type) { (rc).x * (r), (rc).y * (r) })
+
+#if 0
+extern const real_coordinate_type Padd (real_coordinate_type,
+ real_coordinate_type);
+extern const real_coordinate_type Pmult_scalar (real_coordinate_type, real);
+#endif
+
+/* Similarly, for points with integer coordinates; here, a subtraction
+ operator that does return another point is useful. */
+extern const vector_type IPsubtract
+ (const coordinate_type, const coordinate_type);
+extern const coordinate_type IPsubtractP
+ (const coordinate_type, const coordinate_type);
+extern const coordinate_type IPadd
+ (const coordinate_type, const coordinate_type);
+extern const coordinate_type IPmult_scalar (const coordinate_type, const int);
+extern const real_coordinate_type IPmult_real
+ (const coordinate_type, const real);
+extern const boolean IPequal (const coordinate_type, const coordinate_type);
+
+#endif /* not VECTOR_H */
diff --git a/include/xmessage.h b/include/xmessage.h
new file mode 100644
index 0000000..f9a75a3
--- /dev/null
+++ b/include/xmessage.h
@@ -0,0 +1,35 @@
+/* message.h: temporarily display a message under X11.
+
+Copyright (C) 1992 Free Software Foundation, Inc.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+#ifndef MESSAGE_H
+#define MESSAGE_H
+
+#include <kpathsea/types.h>
+#include "xt-common.h"
+
+
+/* Using the widget W as the parent, display the string S in a popup
+ window, using the Label widget. The ARGS and N_ARGS parameters are
+ used when the Label is created. */
+extern void x_message
+ (Widget w, string s, ArgList args, Cardinal n_args);
+
+/* Equivalent to `x_message (W, s ".", NULL, 0)'. */
+extern void x_warning (Widget w, string s);
+
+#endif /* not MESSAGE_H */
diff --git a/include/xt-common.h b/include/xt-common.h
new file mode 100644
index 0000000..0f05b45
--- /dev/null
+++ b/include/xt-common.h
@@ -0,0 +1,140 @@
+/* xt-common.h: declarations that all programs using Xt need.
+
+Copyright (C) 1992 Free Software Foundation, Inc.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+#ifndef XT_COMMON_H
+#define XT_COMMON_H
+
+/* See the kpathsea/INSTALL file for the purpose of the FOIL... */
+#ifndef FOIL_X_WCHAR_T
+#define wchar_t foil_x_defining_wchar_t
+#define X_WCHAR
+#endif
+#undef input /* the XWMHints structure has a field named `input' */
+#undef output
+#include <X11/Intrinsic.h>
+#include <X11/StringDefs.h>
+
+
+/* Our own definitions. */
+
+/* It is convenient to have this type for declaring action procedures. */
+typedef void action_proc_type (Widget, XEvent *, String *, Cardinal *);
+
+/* We virtually always want an arg array and its length together in
+ parameter lists. */
+#define XTARG(arg_array) (arg_array), XtNumber (arg_array)
+
+/* Assign a value to an Xt argument. */
+#define XTASSIGN_ARG(arg, val) (arg).value = (XtArgVal) (val)
+
+/* We use command buttons the same way in all programs, so here are
+ macros to make it easy to use them. */
+
+/* Our buttons only have one procedure associated with them. This macro
+ expands into an XtCallbackRec array. */
+#define SINGLE_CALLBACK(proc, data) \
+ { { (XtCallbackProc) proc, (XtPointer) (data) }, \
+ { NULL, NULL } \
+ }
+
+/* This macro declares a command widget. The routine that performs the
+ action should be named `NAME_command'; it will be passed the
+ CLIENT_DATA argument. The string TITLE appears in the window. */
+#define DECLARE_BUTTON(name, title, client_data) \
+ XtCallbackRec name##_callback_list[] \
+ = SINGLE_CALLBACK (name##_command, client_data); \
+ Arg name##_args[] \
+ = { { XtNfromHoriz, (XtArgVal) NULL }, /* We assign to this below. */\
+ { XtNlabel, (XtArgVal) title }, \
+ { XtNcallback, (XtArgVal) name##_callback_list }, \
+ }; \
+ Widget name##_widget /* The invoker supplies the semicolon. */
+
+
+/* This macro defines a command button NAME, by using the variables
+ that DECLARE_BUTTON creates. It also keeps track of the widget that
+ should be to the left of the new one, by assuming a variable
+ `widget_to_the_left'. */
+
+#define DEFINE_BUTTON(name, parent) \
+ name##_args[0].value = (XtArgVal) widget_to_the_left; \
+ name##_widget = XtCreateManagedWidget (#name, commandWidgetClass, \
+ parent, XTARG (name##_args)); \
+ widget_to_the_left = name##_widget
+ /* The invoker supplies the semicolon. */
+
+
+/* Parse a character code in STR; if invalid, give a warning. If valid,
+ assign the value to CODE. Return whether it was valid. */
+#define XTPARSE_CHARCODE(code, str, widget) \
+ ({ \
+ boolean valid; \
+ charcode_type test = parse_charcode (str, &valid); \
+ \
+ if (valid) \
+ code = test; \
+ else \
+ { \
+ string s = concat3 ("`", str, "': invalid character code"); \
+ x_warning (XtParent (widget), s); \
+ free (s); \
+ }; \
+ valid; \
+ })
+
+
+/* Find the widget whose name is NAME in the widget tree rooted at
+ TOP. If no such widget can be found, give a fatal error.
+
+ We use the extra variable `root' in case `top' is an expression
+ involving some other widget named `w'. */
+#define XFIND_WIDGET(top, name) \
+ ({ \
+ Widget root = top; \
+ Widget w = XtNameToWidget (root, name); \
+ if (w == NULL) \
+ { \
+ string s = concat3 ("Cannot find widget `", name, "'."); \
+ XtErrorMsg ("noWidget", "FindWidget", "Error", s, NULL, 0); \
+ } \
+ w; \
+ })
+
+
+/* For consistency, so we can give `Pointer' as a `type' below. */
+typedef XtPointer Pointer;
+
+/* We define our widget resources in a predictable way. We assume an
+ `OFFSET' macro has been defined as, e.g.,
+ #define OFFSET(field) XtOffset (BitmapWidget, bitmap.field)
+*/
+#define DEFINE_RESOURCE(name, field_name, class_name, type, \
+ default_type, default) \
+ { XtN##name, XtC##class_name, XtR##type, sizeof (type), \
+ OFFSET (field_name), XtR##default_type, (XtPointer) (default) }
+
+#define IMMEDIATE_RESOURCE2(name, field_name, class_name, type, default)\
+ DEFINE_RESOURCE (name, field_name, class_name, type, Immediate, default)
+
+#define IMMEDIATE_RESOURCE(name, class_name, type, default) \
+ IMMEDIATE_RESOURCE2 (name, name, class_name, type, default)
+
+#define STRING_RESOURCE(name, class_name, default) \
+ DEFINE_RESOURCE (name, name, class_name, String, String, default)
+
+#endif /* not XT_COMMON_H */
diff --git a/lib/.cvsignore b/lib/.cvsignore
new file mode 100644
index 0000000..77d8dee
--- /dev/null
+++ b/lib/.cvsignore
@@ -0,0 +1 @@
+M.depend
diff --git a/lib/GNUmakefile b/lib/GNUmakefile
index ed258fa..ac9a0d7 100644
--- a/lib/GNUmakefile
+++ b/lib/GNUmakefile
@@ -1,6 +1,6 @@
# Makefile for the fontutils library.
#
-# Copyright (C) 1992, 93 Free Software Foundation, Inc.
+# Copyright (C) 1992, 1993, 2004 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -27,7 +27,7 @@ library = lib
c_only = $(malloc) bb-list bb-outline bitmap bounding-box \
charcode charspec cmdline concat concat3 concat4 concat5 dlsym edge \
encoding float-ok fmod file-input file-output filename fix-num font \
-getopt getopt1 hexify identity integer-ok libfile line list logreport \
+hexify identity integer-ok libfile line list logreport \
make-prefix math now numtoa pathsrch rand report safe-free scaled-num \
spline statistics str-lcase str-to-bit substring varstring vector \
xmessage xopendir xrename
diff --git a/lib/report.c b/lib/report.c
index fc732b2..42412a6 100644
--- a/lib/report.c
+++ b/lib/report.c
@@ -1,6 +1,6 @@
/* report.c: showing information to the user online.
-Copyright (C) 1992 Free Software Foundation, Inc.
+Copyright (C) 1992, 2004 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -24,4 +24,4 @@ boolean verbose = false;
/* Where to output the reports. If a particular program uses standard
output for real output, this gets changed to `stderr'. */
-FILE *report_file = stdout;
+FILE *report_file = NULL;
diff --git a/pbm/.cvsignore b/pbm/.cvsignore
new file mode 100644
index 0000000..77d8dee
--- /dev/null
+++ b/pbm/.cvsignore
@@ -0,0 +1 @@
+M.depend
diff --git a/pbm/.gdbinit b/pbm/.gdbinit
new file mode 100644
index 0000000..a760af7
--- /dev/null
+++ b/pbm/.gdbinit
@@ -0,0 +1,6 @@
+define redo
+symbol-file pbmascii
+exec-file pbmascii
+end
+
+set args <../gsrenderfont/phvr.pbm >/tmp/pbm
diff --git a/pbm/libpbm1.c b/pbm/libpbm1.c
index 5b8258a..95e8c95 100644
--- a/pbm/libpbm1.c
+++ b/pbm/libpbm1.c
@@ -1,6 +1,6 @@
/* libpbm1.c - pbm utility library part 1
**
-** Copyright (C) 1988 by Jef Poskanzer.
+** Copyright (C) 1988, 2004 by Jef Poskanzer.
**
** Permission to use, copy, modify, and distribute this software and its
** documentation for any purpose and without fee is hereby granted, provided
@@ -16,9 +16,9 @@
#include "libpbm.h"
#include <kpathsea/c-ctype.h>
-#include <varargs.h>
#if 0 /* karl */
+#include <varargs.h>
extern char *malloc ();
extern void free ();
extern void exit ();
@@ -216,9 +216,8 @@ void
pm_perror( reason )
char* reason;
{
- extern char* sys_errlist[];
extern int errno;
- char* e;
+ const char* e;
e = sys_errlist[errno];
diff --git a/pk/.cvsignore b/pk/.cvsignore
new file mode 100644
index 0000000..77d8dee
--- /dev/null
+++ b/pk/.cvsignore
@@ -0,0 +1 @@
+M.depend
diff --git a/tfm/.cvsignore b/tfm/.cvsignore
new file mode 100644
index 0000000..77d8dee
--- /dev/null
+++ b/tfm/.cvsignore
@@ -0,0 +1 @@
+M.depend
diff --git a/tfm/tfm_input.c b/tfm/tfm_input.c
index 5e2c8e1..8b56e4a 100644
--- a/tfm/tfm_input.c
+++ b/tfm/tfm_input.c
@@ -1,6 +1,6 @@
/* tfm_input.c: read a TFM file.
-Copyright (C) 1992 Free Software Foundation, Inc.
+Copyright (C) 1992, 2004 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -81,7 +81,7 @@ boolean
tfm_open_input_file (string filename)
{
if (tfm_input_file != NULL)
- FATAL2 ("tfm_open_input_file: Attempt to open `%s', but `%s' is
+ FATAL2 ("tfm_open_input_file: Attempt to open `%s', but `%s' is \
already open", filename, tfm_input_name);
tfm_input_name = filename;
@@ -264,7 +264,7 @@ get_tfm_params ()
than we can deal with. */
if (tfm_header.param_word_count > TFM_MAX_FONTDIMENS)
{
- WARNING3 ("%s: TFM file has %u parameters, which is more than the
+ WARNING3 ("%s: TFM file has %u parameters, which is more than the \
%u I can handle",
tfm_input_name, tfm_header.param_word_count,
TFM_MAX_FONTDIMENS);
@@ -384,9 +384,9 @@ get_char ()
#define GET_CHAR_DIMEN(d) \
if (d##_index != 0) \
{ \
- TFM_FSEEK (tfm_header.##d##_pos + d##_index*4, SEEK_SET); \
+ TFM_FSEEK (tfm_header.d##_pos + d##_index*4, SEEK_SET); \
tfm_char.fix_##d = TFM_GET_FOUR (); \
- tfm_char.##d = fix_to_real (tfm_char.fix_##d) \
+ tfm_char.d = fix_to_real (tfm_char.fix_##d) \
* global_info->design_size; \
}