diff -Nrc2 fontutils-0.5/ChangeLog fontutils-0.6/ChangeLog
*** fontutils-0.5/ChangeLog	Thu Sep  3 09:13:13 1992
--- fontutils-0.6/ChangeLog	Wed Oct 28 16:07:53 1992
***************
*** 1,2 ****
--- 1,67 ----
+ Wed Oct 28 15:09:29 1992  Karl Berry  (karl@claude.cs.umb.edu)
+ 
+ 	* Version 0.6.
+ 
+ 	* GNUmakefile.in (install): Install data files with file as second
+ 	arg, not directory.
+ 
+ Sun Oct 25 15:29:19 1992  Karl Berry  (karl@cs.umb.edu)
+ 
+ 	* GNUmakefile.in (realclean): Depend on distclean.
+ 
+ 	* GNUmakefile.in (installargs): Passed texinputdir as mfinputdir.
+ 
+ 	* GNUmakefile.in (install): Correct to `emacs_datadir' in the mkdir.
+ 
+ Thu Oct 15 08:35:21 1992  Karl Berry  (karl@cs.umb.edu)
+ 
+ 	* configure: Ran Autoconf 1.2.
+ 
+ Mon Oct  5 10:24:15 1992  Karl Berry  (karl@cs.umb.edu)
+ 
+ 	* configure.in: Generate doc/Makefile. (arif@stat.fsu.edu)
+ 
+ 	* GNUmakefile.in (install): Install common.cmi. (ab@meiko.co.uk)
+ 
+ Sun Oct  4 11:22:45 1992  Karl Berry  (karl@cs.umb.edu)
+ 
+ 	* GNUmakefile.in (examplefiles): Remove; just make links.
+         (dist): Don't copy them.
+ 
+ Sun Sep 20 12:53:29 1992  Karl Berry  (karl@cs.umb.edu)
+ 
+         * GNUmakefile.in (config.status): use sh to run configure --no-create.
+ 
+         * GNUmakefile.in (realclean): OK, don't remove configure.
+ 
+ Mon Sep 14 17:50:54 1992  Karl Berry  (karl@hayley)
+ 
+         * GNUmakefile.in (realclean): separate from distclean.
+         (distclean): remove GNUmakefile.
+         (config.status): new target.
+         (GNUmakefile): depend on config.status.
+ 
+ Sat Sep 12 14:53:31 1992  Karl Berry  (karl@hayley)
+ 
+         * GNUmakefile.in (dist): replace remaining occurrences of
+           `fontutils-$(version) with `$(top_distdir)'.
+ 
+ Thu Sep 10 08:57:02 1992  Karl Berry  (karl@hayley)
+ 
+         * GNUmakefile.in (dist): changed where the COPYING* files are kept.
+ 
+         * GNUmakefile.in (xincludedir, xlibdir): say that these are
+           options, not just directories.
+ 
+         * GNUmakefile.in (realclean): remove configure.
+ 
+ Tue Sep  8 16:42:04 1992  Karl Berry  (karl@hayley)
+ 
+         * configure.in: test for more Unix variants.
+ 
+ Fri Sep  4 08:39:15 1992  Karl Berry  (karl@hayley)
+ 
+         * GNUmakefile.in (extraclean): new target.
+ 
  Thu Sep  3 08:54:12 1992  Karl Berry  (karl@hayley)
  
diff -Nrc2 fontutils-0.5/GNUmakefile.in fontutils-0.6/GNUmakefile.in
*** fontutils-0.5/GNUmakefile.in	Thu Sep  3 15:16:41 1992
--- fontutils-0.6/GNUmakefile.in	Wed Oct 28 16:08:03 1992
***************
*** 18,22 ****
  
  # Version number of this release.
! version = 0.5
  
  # Installation prefixes.  Since GNU programs and the TeX system may be
--- 18,22 ----
  
  # Version number of this release.
! version = 0.6
  
  # Installation prefixes.  Since GNU programs and the TeX system may be
***************
*** 34,41 ****
  emacslispdir = $(emacs_datadir)/elisp # Where to install .el files.
  
! texmf_datadir = $(texmf_prefix)/lib
! mfdatadir = $(texmf_datadir)/mf
  mfinputdir = $(mfdatadir)/macros
! texdatadir = $(texmf_datadir)/tex
  texinputdir = $(texdatadir)/macros
  
--- 34,40 ----
  emacslispdir = $(emacs_datadir)/elisp # Where to install .el files.
  
! mfdatadir = $(texmf_prefix)/lib/mf
  mfinputdir = $(mfdatadir)/macros
! texdatadir = $(texmf_prefix)/lib/tex
  texinputdir = $(texdatadir)/macros
  
***************
*** 58,62 ****
  default_gf_path = $(default_tfm_path)
  
- # Start of system configuration section.
  SHELL = /bin/sh
  srcdir = @srcdir@
--- 57,60 ----
***************
*** 63,70 ****
  VPATH = @srcdir@
  
! # Make #include <X11/...> work.
  xincludedir = @xincludedir@
  
! # Make -lX... work.
  xlibdir = @xlibdir@
  
--- 61,69 ----
  VPATH = @srcdir@
  
! # Compiler option to make #include <X11/...> work, i.e., should start it
! # with `-I'.
  xincludedir = @xincludedir@
  
! # Loader option to make -lX... work, i.e., should start with `-L'.
  xlibdir = @xlibdir@
  
***************
*** 92,107 ****
  default: all
  
! .PHONY: all install libraries clean realclean distclean depend dist
  
- include/paths.h: include/paths.h.in GNUmakefile GNUmakefile.in
- 	rm -f $@
- 	echo "/* Generated from paths.h.in (`date`).  */" > $@
- 	sed -e "s,replace-with-lib-path,$(default_lib_path)," \
-             -e "s,replace-with-tfm-path,$(default_tfm_path)," \
-             -e "s,replace-with-pk-path,$(default_pk_path)," \
-             -e "s,replace-with-gf-path,$(default_gf_path)," \
-           $< >> $@
- 
- 
  makeargs = $(MFLAGS) \
    SHELL="$(SHELL)" CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" \
--- 91,96 ----
  default: all
  
! .PHONY: all install libraries clean distclean extraclean realclean depend dist
  
  makeargs = $(MFLAGS) \
    SHELL="$(SHELL)" CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" \
***************
*** 109,118 ****
    xlibdir="$(xlibdir)" xincludedir='$(xincludedir)' srcdir=$(srcdir)
  
! all:	include/paths.h libraries
  	for dir in $(programs);						\
  	do								\
! 	  (cd $${dir}; $(MAKE) $(makeargs));				\
  	done
  
  
  installargs = bindir=$(bindir) \
--- 98,122 ----
    xlibdir="$(xlibdir)" xincludedir='$(xincludedir)' srcdir=$(srcdir)
  
! all: libraries
  	for dir in $(programs);						\
  	do								\
! 	  (cd $${dir}; $(MAKE) $(makeargs) all);			\
  	done
  
+ libraries: include/paths.h
+ 	for dir in $(libraries);					\
+ 	do								\
+ 	  (cd $${dir}; $(MAKE) $(makeargs));				\
+         done
+ 
+ include/paths.h: include/paths.h.in GNUmakefile GNUmakefile.in
+ 	rm -f $@
+ 	echo "/* Generated from paths.h.in (`date`).  */" > $@
+ 	sed -e "s,replace-with-lib-path,$(default_lib_path)," \
+             -e "s,replace-with-tfm-path,$(default_tfm_path)," \
+             -e "s,replace-with-pk-path,$(default_pk_path)," \
+             -e "s,replace-with-gf-path,$(default_gf_path)," \
+           $< >> $@
+ 
  
  installargs = bindir=$(bindir) \
***************
*** 129,134 ****
  	-mkdir $(prefix) $(exec_prefix) $(bindir) $(datadir) $(infodir) \
  	  $(fu_datadir) $(emacs_datadir) $(emacslispdir) $(app_defaults) \
-           $(texmf_prefix) $(texmf_datadir) $(mfdatadir) $(mfinputdir) \
-           $(texdatadir) $(texinputdir) \
            >/dev/null 2>&1
  	for dir in $(programs) doc;					\
--- 133,136 ----
***************
*** 136,149 ****
            (cd $${dir}; $(MAKE) $(installargs) install);			\
          done
! 	cd data; for f in *.enc *.map;					\
! 	  do $(INSTALL_DATA) $$f $(fu_datadir); done
  
  
! libraries: 
! 	for dir in $(libraries);					\
! 	do								\
! 	  (cd $${dir}; $(MAKE) $(makeargs));				\
!         done
  
  
  # Files in the top level directory to be distributed.
--- 138,156 ----
            (cd $${dir}; $(MAKE) $(installargs) install);			\
          done
! 	cd data; for f in *.enc *.map common.cmi;			\
! 	  do $(INSTALL_DATA) $$f $(fu_datadir)/$$f; done
  
  
! configure: configure.in
! 	autoconf
! 
! config.status: configure
! 	sh configure --no-create
! 
! GNUmakefile: GNUmakefile.in config.status
! 	sh config.status
  
+ # Prevent GNU make 3 from overflowing arg limit on system V.
+ .NOEXPORT:
  
  # Files in the top level directory to be distributed.
***************
*** 157,163 ****
  versionfiles = gsrenderfont/gsrf.in */version.c
  
- # Files for the example we describe in the manual.
- examplefiles = ggmr.ifi ggmr.1200cmi
- 
  top_distdir = fontutils-$(version)
  
--- 164,167 ----
***************
*** 171,175 ****
  # Set up the top-level files.
  	ln $(topfiles) $(top_distdir)
! 	cp -p $(HOME)/gnu/COPYING* $(top_distdir)
  	cp -p $(gnu)/lib/aclocal.m4 $(top_distdir)
  #
--- 175,179 ----
  # Set up the top-level files.
  	ln $(topfiles) $(top_distdir)
! 	cp -p $(HOME)/gnu/gnuorg/COPYING* $(top_distdir)
  	cp -p $(gnu)/lib/aclocal.m4 $(top_distdir)
  #
***************
*** 179,184 ****
  	cp -p $(plain)/testfont.tex $(top_distdir)/data
  	cp -p $(ktex)/macros/printeps.tex $(top_distdir)/data
- 	for f in $(examplefiles); do \
-           ln $(garamond)/atlas/$${f} $(top_distdir)/data; done
  	rm -f $(top_distdir)/include/c-auto.h $(top_distdir)/include/paths.h
  #
--- 183,186 ----
***************
*** 192,206 ****
  #
  # Put on the finishing touches.
! 	tar czf fontutils-$(version).tar.Z $(top_distdir)
! 	rm -rf fontutils-$(version)
! 
! # Prevent GNU make 3 from overflowing arg limit on system V.
! .NOEXPORT:
! 
! configure: configure.in
! 	autoconf
! 
! GNUmakefile: GNUmakefile.in
! 	sh config.status
  
  TAGS:
--- 194,199 ----
  #
  # Put on the finishing touches.
! 	tar czf $(top_distdir). $(top_distdir)
! 	rm -rf $(top_distdir)
  
  TAGS:
***************
*** 216,220 ****
  	done
  
! mostlyclean clean realclean distclean::
  	for dir in $(alldirs);						\
  	do								\
--- 209,213 ----
  	done
  
! mostlyclean clean distclean extraclean realclean::
  	for dir in $(alldirs);						\
  	do								\
***************
*** 222,225 ****
  	done
  
! distclean realclean::
! 	rm -f include/c-auto.h include/paths.h config.status Makefile
--- 215,223 ----
  	done
  
! distclean::
! 	rm -f include/c-auto.h include/paths.h config.status GNUmakefile
! 
! realclean:: distclean
! 
! extraclean:: distclean
! 	rm -f *~ *\#*
diff -Nrc2 fontutils-0.5/INSTALL fontutils-0.6/INSTALL
*** fontutils-0.5/INSTALL	Thu Sep  3 09:45:44 1992
--- fontutils-0.6/INSTALL	Tue Oct 27 13:27:20 1992
***************
*** 19,24 ****
     * Run GNU make.  For example, if it's installed as `make', just type
       `make' in the top-level directory.  If all goes well, this will
!      compile all the programs.  *Note Problems::, for known warnings
!      and other trouble during compilation.
  
     * Install the programs and supporting data files with `make install'.
--- 19,23 ----
     * Run GNU make.  For example, if it's installed as `make', just type
       `make' in the top-level directory.  If all goes well, this will
!      compile all the programs.
  
     * Install the programs and supporting data files with `make install'.
diff -Nrc2 fontutils-0.5/NEWS fontutils-0.6/NEWS
*** fontutils-0.5/NEWS	Wed Sep  2 08:54:04 1992
--- fontutils-0.6/NEWS	Sun Oct 25 14:13:14 1992
***************
*** 1,5 ****
! User-visible change log.
  
! Version 0.5
  
  * Manual written!
--- 1,38 ----
! Version 0.6 (28 October 1992)
  
! * Imageto changes:
!   - Automatically removes all pieces of adjacent characters; the
!     `-clean-threshold' kludge is gone.
!   - `-info-filename' option renamed to `-ifi-filename'.
!   - Writes a complete GF font if the image file is incomplete.
!   - No longer crashes on a filename lacking an extension.
! 
! * BZRto changes:
!   - No longer requires TFM files as input along with the BZR files.
!   - Doesn't guess that the CCC file is the same as the BZR file.
!   - Ligature/kern Metafont output doesn't crash on missing characters.
!   - Metafont output does better at not overflowing MF's memory.
! 
! * GSrenderfont changes:
!   - Handles invisible characters, such as spaces.
!   - Reads Type 3 PostScript fonts, as well as Type 1.
!   - No longer requires an output encoding; default is same as input.
!   - Reads fonts that aren't known to Ghostscript by default.
! 
! * Other program changes:
!   - Limn doesn't try to log uninitialized floating-point numbers.
!   - All the programs handle fontnames containing `.' better.
!   - Verbose output usually goes to standard output, instead of standard error.
!   - Minor installation and configuration fixes.
! 
! * Documentation changes:
!   - The chapter on bug reporting has some further explanation of the
!     purpose of what we ask for, and clarifications.  Please read before
!     submitting bug reports.
!   - The chapter on Imageto has been substantially rewritten.  I hope the
!     difficulties people encountered using that program because of
!     deficiencies in the manual will be cleared up now.
!   
! Version 0.5 (3 September 1992)
  
  * Manual written!
***************
*** 18,24 ****
  
  * Imageto uses character names instead of codes, and
!   can write EPSF files.
  
! Version 0.4 (28 Mar 92)
  
  First public release.
--- 51,57 ----
  
  * Imageto uses character names instead of codes, and
!   can write EPS files.
  
! Version 0.4 (28 Mar 1992)
  
  First public release.
diff -Nrc2 fontutils-0.5/README fontutils-0.6/README
*** fontutils-0.5/README	Thu Sep  3 14:18:21 1992
--- fontutils-0.6/README	Sat Oct 17 17:02:25 1992
***************
*** 1,4 ****
  This directory contains the GNU font utilities.  See `ChangeLog' or
! `GNUmakefile.in' for the version number.
  
  See the Texinfo manual in doc/ for installation and usage information.
--- 1,4 ----
  This directory contains the GNU font utilities.  See `ChangeLog' or
! `GNUmakefile.in' for the version number.  See `NEWS' for changes by release.
  
  See the Texinfo manual in doc/ for installation and usage information.
diff -Nrc2 fontutils-0.5/aclocal.m4 fontutils-0.6/aclocal.m4
*** fontutils-0.5/aclocal.m4	Thu Aug 20 10:26:46 1992
--- fontutils-0.6/aclocal.m4	Thu Sep 10 09:03:05 1992
***************
*** 33,36 ****
--- 33,38 ----
    elif test -r /usr/X11/[[include]]/Box.h
    then dir=/usr/X11/[[include]]
+   elif test -r /usr/X11R5/[[include]]/Box.h
+   then dir=/usr/X11R5/[[include]]
    fi
  )
***************
*** 52,55 ****
--- 54,59 ----
  elif test -r /usr/X11/lib/libXaw.a
  then dir1=/usr/X11/lib
+ elif test -r /usr/X11R5/lib/libXaw.a
+ then dir1=/usr/X11R5/lib
  fi
  dir2=""
diff -Nrc2 fontutils-0.5/bin/imagestrip fontutils-0.6/bin/imagestrip
*** fontutils-0.5/bin/imagestrip
--- fontutils-0.6/bin/imagestrip	Fri Oct  2 14:02:13 1992
***************
*** 0 ****
--- 1,25 ----
+ #!/bin/sh
+ 
+ if test $# -ne 1
+ then
+   echo "Usage: $0 <img file>[.img]"
+   exit 1
+ fi
+ 
+ input=`basename $1 .img`
+ 
+ # Show an image via -strips.
+ imageto -verbose -strips ${input}.img
+ 
+ rm -f ${input}sp.tfm
+ fontconvert -verbose -tfm ./${input}sp.1200
+ 
+ gftopk -v ./${input}sp.1200gf
+ rm -f ${input}sp.1200gf
+ 
+ echo ./${input}sp | tex $research/imageto/strips
+ mv strips.dvi ${input}sp.dvi
+ 
+ rm strips.log ${input}sp.pl
+ 
+ exec xdvi -p 1200 -s 12 ${input}sp
diff -Nrc2 fontutils-0.5/bin/show-gf fontutils-0.6/bin/show-gf
*** fontutils-0.5/bin/show-gf
--- fontutils-0.6/bin/show-gf	Sun Oct  4 15:55:56 1992
***************
*** 0 ****
--- 1,37 ----
+ #!/bin/sh
+ # Make a font sample of the given GF file.  Remove any PK file with the
+ # same root, to avoid confusion.
+ 
+ if test $# -ne 1
+ then
+   echo "Usage: $0 <GF file>[gf]."
+   exit 1
+ fi
+ 
+ 
+ gf_name=`echo $1 | sed 's/gf$//'`gf
+ 
+ if test ! -r $gf_name
+ then
+   echo $gf_name: No such file.
+   exit 1
+ fi
+ 
+ pk_name=`echo $gf_name | sed 's/gf$/pk/'`
+ if test -r $pk_name
+ then mv -v $pk_name /tmp
+ fi
+ 
+ root=`echo $gf_name | sed 's/\.[0-9]*gf$//'`
+ tfm_name=$root.tfm
+ 
+ if test -r $tfm_name
+ then mv -v $tfm_name /tmp
+ fi
+ fontconvert -tfm $gf_name
+ 
+ echo $root | tex table
+ 
+ resolution=`echo $gf_name | sed 's/.*\.\([0-9]*\)gf$/\1/'`
+ shrink=`expr $resolution / 100`
+ xdvi -p $resolution -s $shrink table
diff -Nrc2 fontutils-0.5/bpltobzr/ChangeLog fontutils-0.6/bpltobzr/ChangeLog
*** fontutils-0.5/bpltobzr/ChangeLog	Thu Sep  3 09:29:23 1992
--- fontutils-0.6/bpltobzr/ChangeLog	Tue Oct 27 13:02:51 1992
***************
*** 1,2 ****
--- 1,10 ----
+ Tue Oct 27 12:56:53 1992  Karl Berry  (karl@cs.umb.edu)
+ 
+ 	* Version 0.6.
+ 
+ Sun Oct 25 14:23:49 1992  Karl Berry  (karl@cs.umb.edu)
+ 
+ 	* bzr.y (chardef): Use `CHAR_BB' instead of `BZR_CHAR_BB'.
+ 
  Thu Sep  3 09:29:08 1992  Karl Berry  (karl@hayley)
  
diff -Nrc2 fontutils-0.5/bpltobzr/bpl.y fontutils-0.6/bpltobzr/bpl.y
*** fontutils-0.5/bpltobzr/bpl.y	Sun Aug 16 21:43:04 1992
--- fontutils-0.6/bpltobzr/bpl.y	Sun Oct 25 14:24:02 1992
***************
*** 102,106 ****
                CHARCODE (ch) = $2;
                CHAR_SET_WIDTH (ch) = $3;
!               BZR_CHAR_BB (ch) = *$4;
                BZR_SHAPE (ch) = *$5;
                bzr_put_char (ch);
--- 102,106 ----
                CHARCODE (ch) = $2;
                CHAR_SET_WIDTH (ch) = $3;
!               CHAR_BB (ch) = *$4;
                BZR_SHAPE (ch) = *$5;
                bzr_put_char (ch);
diff -Nrc2 fontutils-0.5/bpltobzr/version.c fontutils-0.6/bpltobzr/version.c
*** fontutils-0.5/bpltobzr/version.c	Thu Sep  3 09:46:19 1992
--- fontutils-0.6/bpltobzr/version.c	Tue Oct 27 13:27:58 1992
***************
*** 1 ****
! char *version_string = "bpltobzr version 0.5";
--- 1 ----
! char *version_string = "bpltobzr version 0.6";
diff -Nrc2 fontutils-0.5/bzr/ChangeLog fontutils-0.6/bzr/ChangeLog
*** fontutils-0.5/bzr/ChangeLog	Thu Sep  3 09:29:37 1992
--- fontutils-0.6/bzr/ChangeLog	Tue Oct 27 13:02:51 1992
***************
*** 1,2 ****
--- 1,15 ----
+ Tue Oct 27 12:56:04 1992  Karl Berry  (karl@cs.umb.edu)
+ 
+ 	* Version 0.6.
+ 
+ Sun Oct 18 17:06:39 1992  Karl Berry  (karl@cs.umb.edu)
+ 
+ 	* bzr_{in,out}put.c (BZR_CHAR_{MIN,MAX}_{COL,ROW}): No `BZR_'
+ 	prefix anymore.
+ 
+ 	* bzr_input.c (bzr_get_next_char): New routine (it was declared in
+ 	bzr.h, but not defined!).
+         (bzr_get_char): Call it.
+ 
  Thu Sep  3 09:29:33 1992  Karl Berry  (karl@hayley)
  
diff -Nrc2 fontutils-0.5/bzr/bzr_input.c fontutils-0.6/bzr/bzr_input.c
*** fontutils-0.5/bzr/bzr_input.c	Fri Aug 14 17:24:36 1992
--- fontutils-0.6/bzr/bzr_input.c	Sun Oct 18 17:08:28 1992
***************
*** 140,151 ****
  bzr_get_char (charcode_type code)
  {
-   bzr_char_type *c;
    byte_count_type char_ptr;
-   one_byte command;
-   real_coordinate_type current_point;
-   real (*get_num) (void);
-   real_coordinate_type (*get_point) (void);
-   spline_list_type list;
-   boolean no_current_point = true;
    
    assert (bzr_input_file != NULL);
--- 140,144 ----
***************
*** 161,166 ****
--- 154,181 ----
      return NULL;
      
+   /* Move to the beginning of the character definition.  */
    BZR_FSEEK (char_ptr, SEEK_SET);
    
+   return bzr_get_next_char ();
+ }
+ 
+ 
+ /* This returns the character starting at the current position in
+    `bzr_input_file', or NULL if we are at the postamble, or gives a
+    fatal error if we're not at either.  */
+ 
+ bzr_char_type *
+ bzr_get_next_char ()
+ {
+   bzr_char_type *c;
+   one_byte command;
+   real_coordinate_type current_point;
+   real (*get_num) (void);
+   real_coordinate_type (*get_point) (void);
+   spline_list_type list;
+   boolean no_current_point = true;
+ 
+   assert (bzr_input_file);
+ 
    command = BZR_GET_BYTE ();
    if (command == BOC)
***************
*** 168,195 ****
    else if (command == BOC_ABBREV)
      get_num = bzr_get_abbrev_design_scaled;
    else
!     FATAL1 ("bzr_get_char: Expected BOC, found %u", command);
    
!   c = xmalloc (sizeof (bzr_char_type));
    
!   /* Read the character information that is always present.  */
    CHARCODE (*c) = BZR_GET_BYTE ();
    CHAR_SET_WIDTH (*c) = get_num ();
!   BZR_CHAR_MIN_COL (*c) = get_num ();
!   BZR_CHAR_MIN_ROW (*c) = get_num ();
!   BZR_CHAR_MAX_COL (*c) = get_num ();
!   BZR_CHAR_MAX_ROW (*c) = get_num ();
    
!   if (BZR_CHAR_MIN_COL (*c) > BZR_CHAR_MAX_COL (*c))
      {
!       WARNING2 ("bzr_get_char: Min col %f > max col %f",
!                BZR_CHAR_MIN_COL (*c), BZR_CHAR_MAX_COL (*c));
!       BZR_CHAR_MIN_COL (*c) = BZR_CHAR_MAX_COL (*c);
      }
!   if (BZR_CHAR_MIN_ROW (*c) > BZR_CHAR_MAX_ROW (*c))
      {
!       WARNING2 ("bzr_get_char: Min row %f > max row %f",
!                BZR_CHAR_MIN_ROW (*c), BZR_CHAR_MAX_ROW (*c));
!       BZR_CHAR_MIN_ROW (*c) = BZR_CHAR_MAX_ROW (*c);
      }
    
--- 183,212 ----
    else if (command == BOC_ABBREV)
      get_num = bzr_get_abbrev_design_scaled;
+   else if (command == POST)
+     return NULL;
    else
!     FATAL1 ("bzr_get_next_char: Expected BOC or POST, found %u", command);
    
!   c = XTALLOC1 (bzr_char_type);
    
!   /* Read the beginning-of-character information that is always present.  */
    CHARCODE (*c) = BZR_GET_BYTE ();
    CHAR_SET_WIDTH (*c) = get_num ();
!   CHAR_MIN_COL (*c) = get_num ();
!   CHAR_MIN_ROW (*c) = get_num ();
!   CHAR_MAX_COL (*c) = get_num ();
!   CHAR_MAX_ROW (*c) = get_num ();
    
!   if (CHAR_MIN_COL (*c) > CHAR_MAX_COL (*c))
      {
!       WARNING2 ("bzr_get_next_char: Min col %f > max col %f",
!                CHAR_MIN_COL (*c), CHAR_MAX_COL (*c));
!       CHAR_MIN_COL (*c) = CHAR_MAX_COL (*c);
      }
!   if (CHAR_MIN_ROW (*c) > CHAR_MAX_ROW (*c))
      {
!       WARNING2 ("bzr_get_next_char: Min row %f > max row %f",
!                CHAR_MIN_ROW (*c), CHAR_MAX_ROW (*c));
!       CHAR_MIN_ROW (*c) = CHAR_MAX_ROW (*c);
      }
    
***************
*** 225,229 ****
              if (no_current_point)
                {
!                 WARNING ("bzr_get_char: spline given before the path started");
                  current_point = (real_coordinate_type) { 0.0, 0.0 };
                }
--- 242,246 ----
              if (no_current_point)
                {
!                 WARNING ("bzr_get_next_char: Spline before path started");
                  current_point = (real_coordinate_type) { 0.0, 0.0 };
                }
***************
*** 249,253 ****
              if (no_current_point)
                {
!                 WARNING ("bzr_get_char: line given before the path started");
                  current_point = (real_coordinate_type) { 0.0, 0.0 };
                }
--- 266,270 ----
              if (no_current_point)
                {
!                 WARNING ("bzr_get_next_char: Line before path started");
                  current_point = (real_coordinate_type) { 0.0, 0.0 };
                }
diff -Nrc2 fontutils-0.5/bzr/bzr_output.c fontutils-0.6/bzr/bzr_output.c
*** fontutils-0.5/bzr/bzr_output.c	Fri Aug 14 17:24:36 1992
--- fontutils-0.6/bzr/bzr_output.c	Sun Oct 18 17:08:57 1992
***************
*** 174,179 ****
    put_design_scaled
      = (ABBREV_P (CHAR_SET_WIDTH (c))
!        && ABBREV_P (BZR_CHAR_MIN_COL (c)) && ABBREV_P (BZR_CHAR_MIN_ROW (c))
!        && ABBREV_P (BZR_CHAR_MAX_COL (c)) && ABBREV_P (BZR_CHAR_MAX_ROW (c)))
        ? bzr_put_abbrev_design_scaled : bzr_put_design_scaled;
    BZR_PUT_BYTE (put_design_scaled == bzr_put_abbrev_design_scaled
--- 174,179 ----
    put_design_scaled
      = (ABBREV_P (CHAR_SET_WIDTH (c))
!        && ABBREV_P (CHAR_MIN_COL (c)) && ABBREV_P (CHAR_MIN_ROW (c))
!        && ABBREV_P (CHAR_MAX_COL (c)) && ABBREV_P (CHAR_MAX_ROW (c)))
        ? bzr_put_abbrev_design_scaled : bzr_put_design_scaled;
    BZR_PUT_BYTE (put_design_scaled == bzr_put_abbrev_design_scaled
***************
*** 185,202 ****
       ourselves would require rasterizing the splines, which should not
       be part of this routine.  */
!   put_design_scaled (BZR_CHAR_MIN_COL (c));
!   put_design_scaled (BZR_CHAR_MIN_ROW (c));
!   put_design_scaled (BZR_CHAR_MAX_COL (c));
!   put_design_scaled (BZR_CHAR_MAX_ROW (c));
  
    /* Update the font bounding box.  */
!   if (BZR_CHAR_MIN_COL (c) < MIN_COL (font_bb))
!     MIN_COL (font_bb) = BZR_CHAR_MIN_COL (c);
!   if (BZR_CHAR_MAX_COL (c) > MAX_COL (font_bb))
!     MAX_COL (font_bb) = BZR_CHAR_MAX_COL (c);
!   if (BZR_CHAR_MIN_ROW (c) < MIN_ROW (font_bb))
!     MIN_ROW (font_bb) = BZR_CHAR_MIN_ROW (c);
!   if (BZR_CHAR_MAX_ROW (c) > MAX_ROW (font_bb))
!     MAX_ROW (font_bb) = BZR_CHAR_MAX_ROW (c);
  
    for (this_list = 0; this_list < SPLINE_LIST_ARRAY_LENGTH (shape);
--- 185,202 ----
       ourselves would require rasterizing the splines, which should not
       be part of this routine.  */
!   put_design_scaled (CHAR_MIN_COL (c));
!   put_design_scaled (CHAR_MIN_ROW (c));
!   put_design_scaled (CHAR_MAX_COL (c));
!   put_design_scaled (CHAR_MAX_ROW (c));
  
    /* Update the font bounding box.  */
!   if (CHAR_MIN_COL (c) < MIN_COL (font_bb))
!     MIN_COL (font_bb) = CHAR_MIN_COL (c);
!   if (CHAR_MAX_COL (c) > MAX_COL (font_bb))
!     MAX_COL (font_bb) = CHAR_MAX_COL (c);
!   if (CHAR_MIN_ROW (c) < MIN_ROW (font_bb))
!     MIN_ROW (font_bb) = CHAR_MIN_ROW (c);
!   if (CHAR_MAX_ROW (c) > MAX_ROW (font_bb))
!     MAX_ROW (font_bb) = CHAR_MAX_ROW (c);
  
    for (this_list = 0; this_list < SPLINE_LIST_ARRAY_LENGTH (shape);
diff -Nrc2 fontutils-0.5/bzrto/.gdbinit fontutils-0.6/bzrto/.gdbinit
*** fontutils-0.5/bzrto/.gdbinit	Tue Sep  1 14:29:48 1992
--- fontutils-0.6/bzrto/.gdbinit	Wed Oct 21 06:52:55 1992
***************
*** 8,37 ****
  end
  
- #set args -ascii -pstype3 bsq > bsq.typ
- #set args -pstype3 ../fit-outlines/ggmr-0
- #set args -metafont ../fonts/ggmr30l
- #set args -verbose -metafont -pstype3 cmr12
- #set args -verbose -text -pstype3 -pstype1 -metafont cmr10 > cmr10.txt
- #set args -verbose -text -pstype3 -pstype1 -metafont test10 > test.txt
- #set args -verbose -metafont -pstype1 -output-file foo.bar cmr10
- #set args -verbose -metafont -pstype3 -output-file foo.bar cmr10
- #set args -verbose -metafont -pstype1 cmr10
- #set args -verbose -text cmr10 > cmr10.txt
- #set args -verbose -metafont -output-file foo.mf cmr10
- #set args -verbose -metafont -pstype1 -output-file ../ourfonts/ggmr26D \
- # ../ourfonts/ggmr26D
- #set args -verbose -metafont kmjC
- #set args -verbose -text -pstype1 -encoding=textext cmr10 > cmr10.bpl
- #set args -verbose -metafont cmr10
- #set args -verbose -metafont ../ourfonts/ggmr26d
- #set args -verbose -metafont -ccc-file empty cmr10
- #set args -verbose -metafont -ccc-file smalltest ../ourfonts/ggmr26D
- #set args -verbose -metafont cmr10
- #set args -verbose -text -range 18-19 cmr10
- #set args -verbose -pstype1 ../ourfonts/ggmr26D
- #set args -verbose -pstype1 -ccc-file smalltest ../ourfonts/ggmr26D
- #set args -verbose -pstype1 -metafont cmr10
- #set args -verbose -pstype1 -metafont -concat cmrN12 -range 77-78 cmrM10
- 
  # Concat ggmr26D with Y-Rb (remapped J->bracketleft; now obsolete), to
  # test sizing.
--- 8,11 ----
***************
*** 56,59 ****
    ../ourfonts/garamond/r/atlas/orig/ggmr26D
  
! set args -verbose -encoding=texlatin -ccc=test/aacute.ccc -metafont \
!  test/cmraacu
--- 30,35 ----
    ../ourfonts/garamond/r/atlas/orig/ggmr26D
  
! set args -verbose -pstype1 -pstype3 -mf $ourfonts/cm/cmr10.bzr \
!   -encoding=texlatin \
!   -ps-font-info FontName:ComputerModern-Roman,UniqueID:75 \
!   -ccc=test/aacute
diff -Nrc2 fontutils-0.5/bzrto/ChangeLog fontutils-0.6/bzrto/ChangeLog
*** fontutils-0.5/bzrto/ChangeLog	Thu Sep  3 07:50:41 1992
--- fontutils-0.6/bzrto/ChangeLog	Tue Oct 27 13:02:51 1992
***************
*** 1,4 ****
--- 1,204 ----
+ Tue Oct 27 12:57:01 1992  Karl Berry  (karl@cs.umb.edu)
+ 
+ 	* Version 0.6.
+ 
+ Tue Oct 20 16:28:42 1992  Karl Berry  (karl@cs.umb.edu)
+ 
+ 	* GNUmakefile (install): Make second arg a file, not a directory.
+ 
+ Mon Oct 19 08:14:26 1992  Karl Berry  (karl@cs.umb.edu)
+ 
+ 	* bzrsetup.mf: Doc fix.
+ 
+ 	* metafont.c (metafont_output_bzr_char): Take the subrs as an arg,
+ 	and output a call if the character was previously output as a
+ 	subroutine.
+         (metafont_output_ccc_char): Likewise.
+         * pstype1.c (pstype1_output_{bzr,ccc}_char): Likewise.
+ 
+ 	* pstype1.c (subr_number): New static.
+         (output_subr_start): Assign to it; don't bother to test the
+         character name; don't return anything.  (Change callers.)
+         (OUT_CHAR_SUBR): Use it.
+ 
+ 	* pstype3.c (pstype3_output_char): Don't output the character if
+ 	it is not encoded.
+ 
+ 	* psutil.h (ps_char_output_p): Remove decl.
+         * psutil.c (ps_char_output_p): Remove variable.
+         (ps_output_encoding): Take the array as an option, instead of
+         using a global.
+         * pstype[13].c (char_output_p): New static; change to use this,
+           and pass to `ps_output_encoding'.  (Otherwise, the test for
+           `space' only work for the first output format.)
+ 
+ 	* psutil.c (INIT_CODE): Delete; it's unused now.
+ 
+ 	* psutil.c (out_notdef_loop): If only one character is undefined,
+ 	don't output a loop.
+ 
+ 	* psutil.c (ps_output_encoding): If the character doesn't exist in
+ 	the encoding, don't output it.
+ 
+ 	* main.c (output_{bzr,ccc}_{char,subr}): Output all formats
+ 	requested, not just the first.
+ 
+ 	* psutil.c (ps_output_encoding): Output the codingscheme string as
+ 	a comment.
+ 
+ 	* pstype1.c (CHARCODE_TO_SUBRS_INDEX, SUBRS_OFFSET): Remove.
+ 	Change calls.
+ 
+ 	* char.c (update_subrs, subr_chars): Return the number of
+ 	subrs found.
+         * char.h (subr_chars): Change decl.
+         * pstype1.c (pstype1_start_subrs): New routine.
+         * pstype1.h: Analogous changes.
+         * main.c (count_non_subr_chars): New routine.
+         (main): Call it, and the new PS1 routines.
+ 
+ 	* psutil.c (ps_set_font_info): Assign to the interword space if we
+ 	have TFM info.
+ 
+ 	* psutil.c (ps_set_font_info): Had test for `strstr' in weight
+ 	part reversed.
+ 
+ 	* pstype1.c ({PUT,DEF}_END): Rename to READONLY_{PUT,DEF}; change
+ 	calls.
+ 
+ 	* metafont.c (output_char_title): New routine.
+         (output_subr_start, output_{ccc,bzr}_char): Call it.
+ 
+ 	* main.c (read_bzr_files): Report the filenames as we read them.
+         (main): Report the character codes as we write them.
+ 
+ Sun Oct 18 15:19:30 1992  Karl Berry  (karl@cs.umb.edu)
+ 
+ 	* char.c: Include ccc.h.
+ 
+ 	* pstype1.c (output_ccc_body): Rewrite -- same as metafont.c now.
+         (OUTPUT_BB_CHAR, UPDATE_*, OUT_MOVE, OUTPUT_MOVE): Delete.
+         (out_move, out_bb_char): New routine.
+ 
+ 	* pstype1.c (output_subr_start): Call `init_charstring_buffers' here.
+         (output_bzr_body): Not here.
+ 
+ Mon Oct 12 08:27:38 1992  Karl Berry  (karl@cs.umb.edu)
+ 
+ 	* pstype1.c (output_private_dict_1): Take the UniqueID as an arg.
+         (pstype1_start_output): Change call.
+ 
+ 	* metafont.c (output_{bzr,ccc}_{body,subr,char}): New routines
+ 	rationalizing the old.
+         * metafont.h (output_{bzr,ccc}_{subr,char}): Declare.
+         * main.c (main): Call them.
+         * pstype1.[ch], main.c: Analogous changes.
+ 
+ 	* main.c (output_{bzr,ccc}_subr, read_bzr_file{s,}): New routines.
+         (main): Call them.
+ 
+ 	* char.c (subr_chars, update_subrs): New routine.
+         * char.h (subr_chars): Declare it.
+         (char_type): New type (different from our last `char_type'...).
+         * main.c (main): Call it.
+ 
+ 	* metafont.c (charcode_to_subr_name): Use the character name if
+ 	it's defined and alphabetic.
+ 
+ Sun Oct 11 15:24:19 1992  Karl Berry  (karl@cs.umb.edu)
+ 
+ 	* main.c (starting_char, ending_char): Make external.
+         * main.h: Declare them.
+         * metafont.c (output_ligtable): Loop between them.
+         (mf_char_output_p): No longer needed.
+ 
+ 	* pstype[13].c (tfm_space): Rename to `interword_space'.
+ 
+ 	* pstype1.c (OUTPUT_{BB_CHAR,MOVE}): remove semicolon from end of def.
+ 
+ 	* GNUmakefile (c_and_h): Remove `oblique'.
+         * char.[ch]: Merge oblique.[ch] into here.
+ 
+ 	* input-ccc.c (parse_ccc_file): Take the design size as an arg.
+         * input-ccc.h (parse_ccc_file): Change decl.
+         * main.c (main): Change call.
+ 
+ 	* char.h (char_type, get_new_char): Remove decls.
+         (scale_char): Take a bzr_char_type instead of a char_type.
+         * char.c (get_new_char, scale_{bzr,tfm}_char): Remove all these;
+           change scale_char to take a bzr_char.
+         * main.c (output_subroutines, output_char): Just pass the BZR
+           char, don't use the BZR-extracting macros.
+         * {text,metafont,pstype1}.c: Similar changes.
+ 
+ Tue Oct  6 14:29:18 1992  Karl Berry  (karl@cs.umb.edu)
+ 
+ 	* ccc.y (BZR_TFM_DIMEN): Replace with new macro, DO_CHAR_DIMEN.
+         (unit_of_measure): Use it, using the BZR dimensions instead of the
+         TFM dimensions.
+ 
+ 	* input-ccc.c (get_ccc_fontinfo): Pass the design size and BZR
+ 	characters, not the char_type array; assign a default x-height at the
+ 	end if necessary.
+ 
+ 	* metafont.h (metafont_start_output): Pass a pointer as the TFM
+ 	global info.  (Continuing yesterday's change.)
+         * metafont.c (metafont_start_output): Change definition
+           accordingly -- i.e., we might not have the TFM info.
+ 	* input-ccc.h (parse_ccc_file): Likewise.
+         * input-ccc.c (parse_ccc_file, get_ccc_fontinfo): And it continues.
+ 
+ Mon Oct  5 10:12:03 1992  Karl Berry  (karl@cs.umb.edu)
+ 
+ 	* psutil.h (ps_font_info_type): New member `interword_space'.
+         (ps_init): Rename to `ps_set_font_info', and take no args.
+         * psutil.c (ps_init): Change accordingly; read globals set via
+           options instead of passing the info around.
+         (option_value): New fn.
+         * pstype1.c (pstype1_start_output): Don't pass the font names and
+           TFM info; change call to ps_init for new name; use
+           BZR_DESIGN_SIZE instead of TFM_DESIGN_SIZE.
+         * pstype1.h (pstype1_start_output): Change decl.
+         * pstype3.[ch]: Analogous changes.
+         * main.c (main): Change calls.
+         (read_command_line): New option `-ps-font-info' to generalize
+         `-ps-fontname'.
+         (USAGE): Document it.
+ 
+ 	* main.c (output_subroutines, output_char,
+ 	init_tfm_and_encoding_info): New fns.
+         (main): Call them.
+ 
+ 	* main.c (bzr_name, encoding_*): Make static.
+ 
+ 	* input-ccc.h: Doc fix.
+ 
+ 	* main.c (main): Report 13 chars/line, not 8.
+ 
+ 	* main.c (read_command_line): If -text is given, set `report_file'
+ 	to stderr.
+ 
+ Mon Sep 28 11:20:41 1992  Karl Berry  (karl@cs.umb.edu)
+ 
+ 	* bzrsetup.mf (fill_or_unfill): Delete `loggingall', left in by
+ 	mistake.
+ 
+ Tue Sep 22 13:08:44 1992  Karl Berry  (karl@cs.umb.edu)
+ 
+         * char.h (BCHAR_*): remove unneeded parens.
+ 
+ Mon Sep 21 17:09:12 1992  Karl Berry  (karl@cs.umb.edu)
+ 
+         * metafont.c (NO_CHAR_P): rewrite in opposite sense, rename to
+           HAVE_CHAR_P, and add tests for the characters existing.
+         (output_ligtable): change calls.
+ 
+         * main.c (main): remove the suffix from `font_name' to make the
+           default `ccc_name'.
+ 
  Thu Sep  3 07:45:36 1992  Karl Berry  (karl@hayley)
  
+         * Version 0.5.
+ 
          * metafont.c (metafont_output_ccc_char): fix ) typo.
  
***************
*** 210,214 ****
            isn't NULL, not its BZR info.
  
!         * psutil.c (NO_PARAM_RET): added
            (psinit): call SAFE_TFM_FONT_PARAMETER instead of TFM_FONT_PARAMETER.
  
--- 410,414 ----
            isn't NULL, not its BZR info.
  
!         * psutil.c (NO_PARAM_RET): added.
            (psinit): call SAFE_TFM_FONT_PARAMETER instead of TFM_FONT_PARAMETER.
  
diff -Nrc2 fontutils-0.5/bzrto/GNUmakefile fontutils-0.6/bzrto/GNUmakefile
*** fontutils-0.5/bzrto/GNUmakefile	Mon Aug 17 08:36:32 1992
--- fontutils-0.6/bzrto/GNUmakefile	Tue Oct 20 16:29:05 1992
***************
*** 19,23 ****
  program = bzrto
  
! c_and_h = char input-ccc main metafont oblique pstype1 pstype3 psutil text
  c_only = version
  y = ccc
--- 19,23 ----
  program = bzrto
  
! c_and_h = char input-ccc main metafont pstype1 pstype3 psutil text
  c_only = version
  y = ccc
***************
*** 32,37 ****
  
  install::
! 	$(INSTALL_DATA) bzredit.el $(emacslispdir)
! 	$(INSTALL_DATA) bzrsetup.mf $(mfinputdir)
  
  include M.depend
--- 32,37 ----
  
  install::
! 	$(INSTALL_DATA) bzredit.el $(emacslispdir)/bzredit.el
! 	$(INSTALL_DATA) bzrsetup.mf $(mfinputdir)/bzrsetup.mf
  
  include M.depend
diff -Nrc2 fontutils-0.5/bzrto/M.depend fontutils-0.6/bzrto/M.depend
*** fontutils-0.5/bzrto/M.depend	Wed Sep  2 17:20:36 1992
--- fontutils-0.6/bzrto/M.depend	Sun Oct 25 14:15:51 1992
***************
*** 11,15 ****
    .././include/types.h .././include/bzr.h .././include/bounding-box.h .././include/font.h \
    .././include/bitmap.h .././include/tfm.h .././include/fix-num.h .././include/list.h \
!   .././include/spline.h char.h 
  input-ccc.o : input-ccc.c .././include/config.h .././include/c-auto.h .././include/c-std.h \
    .././include/c-memstr.h .././include/c-errno.h .././include/c-minmax.h .././include/c-limits.h \
--- 11,15 ----
    .././include/types.h .././include/bzr.h .././include/bounding-box.h .././include/font.h \
    .././include/bitmap.h .././include/tfm.h .././include/fix-num.h .././include/list.h \
!   .././include/spline.h char.h input-ccc.h ccc.h 
  input-ccc.o : input-ccc.c .././include/config.h .././include/c-auto.h .././include/c-std.h \
    .././include/c-memstr.h .././include/c-errno.h .././include/c-minmax.h .././include/c-limits.h \
***************
*** 17,21 ****
    .././include/types.h .././include/encoding.h .././include/font.h .././include/bitmap.h \
    .././include/bounding-box.h .././include/tfm.h .././include/fix-num.h .././include/list.h \
!   char.h .././include/bzr.h .././include/spline.h main.h input-ccc.h 
  main.o : main.c .././include/config.h .././include/c-auto.h .././include/c-std.h \
    .././include/c-memstr.h .././include/c-errno.h .././include/c-minmax.h .././include/c-limits.h \
--- 17,21 ----
    .././include/types.h .././include/encoding.h .././include/font.h .././include/bitmap.h \
    .././include/bounding-box.h .././include/tfm.h .././include/fix-num.h .././include/list.h \
!   char.h .././include/bzr.h .././include/spline.h input-ccc.h main.h 
  main.o : main.c .././include/config.h .././include/c-auto.h .././include/c-std.h \
    .././include/c-memstr.h .././include/c-errno.h .././include/c-minmax.h .././include/c-limits.h \
***************
*** 24,29 ****
    .././include/bitmap.h .././include/tfm.h .././include/fix-num.h .././include/list.h \
    .././include/spline.h .././include/cmdline.h .././include/filename.h .././include/getopt.h \
!   .././include/report.h input-ccc.h char.h main.h .././include/encoding.h metafont.h \
!   oblique.h pstype1.h pstype3.h text.h ccc.h 
  metafont.o : metafont.c .././include/config.h .././include/c-auto.h .././include/c-std.h \
    .././include/c-memstr.h .././include/c-errno.h .././include/c-minmax.h .././include/c-limits.h \
--- 24,29 ----
    .././include/bitmap.h .././include/tfm.h .././include/fix-num.h .././include/list.h \
    .././include/spline.h .././include/cmdline.h .././include/filename.h .././include/getopt.h \
!   .././include/report.h input-ccc.h main.h .././include/encoding.h metafont.h \
!   char.h pstype1.h pstype3.h psutil.h text.h ccc.h 
  metafont.o : metafont.c .././include/config.h .././include/c-auto.h .././include/c-std.h \
    .././include/c-memstr.h .././include/c-errno.h .././include/c-minmax.h .././include/c-limits.h \
***************
*** 31,39 ****
    .././include/types.h .././include/bzr.h .././include/bounding-box.h .././include/font.h \
    .././include/bitmap.h .././include/tfm.h .././include/fix-num.h .././include/list.h \
!   .././include/spline.h char.h .././include/vector.h input-ccc.h metafont.h ccc.h 
! oblique.o : oblique.c .././include/config.h .././include/c-auto.h .././include/c-std.h \
!   .././include/c-memstr.h .././include/c-errno.h .././include/c-minmax.h .././include/c-limits.h \
!   .././include/c-seek.h .././include/c-proto.h .././include/global.h .././include/lib.h \
!   .././include/types.h .././include/spline.h .././include/bounding-box.h oblique.h 
  pstype1.o : pstype1.c .././include/config.h .././include/c-auto.h .././include/c-std.h \
    .././include/c-memstr.h .././include/c-errno.h .././include/c-minmax.h .././include/c-limits.h \
--- 31,36 ----
    .././include/types.h .././include/bzr.h .././include/bounding-box.h .././include/font.h \
    .././include/bitmap.h .././include/tfm.h .././include/fix-num.h .././include/list.h \
!   .././include/spline.h .././include/encoding.h .././include/filename.h .././include/vector.h \
!   char.h input-ccc.h main.h metafont.h ccc.h 
  pstype1.o : pstype1.c .././include/config.h .././include/c-auto.h .././include/c-std.h \
    .././include/c-memstr.h .././include/c-errno.h .././include/c-minmax.h .././include/c-limits.h \
***************
*** 41,46 ****
    .././include/types.h .././include/bounding-box.h .././include/bzr.h .././include/font.h \
    .././include/bitmap.h .././include/tfm.h .././include/fix-num.h .././include/list.h \
!   .././include/spline.h char.h .././include/hexify.h .././include/varstring.h \
!   .././include/vector.h input-ccc.h pstype1.h psutil.h ccc.h 
  pstype3.o : pstype3.c .././include/config.h .././include/c-auto.h .././include/c-std.h \
    .././include/c-memstr.h .././include/c-errno.h .././include/c-minmax.h .././include/c-limits.h \
--- 38,43 ----
    .././include/types.h .././include/bounding-box.h .././include/bzr.h .././include/font.h \
    .././include/bitmap.h .././include/tfm.h .././include/fix-num.h .././include/list.h \
!   .././include/spline.h char.h input-ccc.h .././include/encoding.h .././include/hexify.h \
!   .././include/varstring.h .././include/vector.h pstype1.h psutil.h ccc.h 
  pstype3.o : pstype3.c .././include/config.h .././include/c-auto.h .././include/c-std.h \
    .././include/c-memstr.h .././include/c-errno.h .././include/c-minmax.h .././include/c-limits.h \
***************
*** 48,52 ****
    .././include/types.h .././include/bounding-box.h .././include/bzr.h .././include/font.h \
    .././include/bitmap.h .././include/tfm.h .././include/fix-num.h .././include/list.h \
!   .././include/spline.h pstype3.h psutil.h 
  psutil.o : psutil.c .././include/config.h .././include/c-auto.h .././include/c-std.h \
    .././include/c-memstr.h .././include/c-errno.h .././include/c-minmax.h .././include/c-limits.h \
--- 45,49 ----
    .././include/types.h .././include/bounding-box.h .././include/bzr.h .././include/font.h \
    .././include/bitmap.h .././include/tfm.h .././include/fix-num.h .././include/list.h \
!   .././include/spline.h .././include/encoding.h pstype3.h psutil.h 
  psutil.o : psutil.c .././include/config.h .././include/c-auto.h .././include/c-std.h \
    .././include/c-memstr.h .././include/c-errno.h .././include/c-minmax.h .././include/c-limits.h \
***************
*** 60,63 ****
    .././include/types.h text.h .././include/bzr.h .././include/bounding-box.h .././include/font.h \
    .././include/bitmap.h .././include/tfm.h .././include/fix-num.h .././include/list.h \
!   .././include/spline.h input-ccc.h char.h 
  version.o : version.c 
--- 57,60 ----
    .././include/types.h text.h .././include/bzr.h .././include/bounding-box.h .././include/font.h \
    .././include/bitmap.h .././include/tfm.h .././include/fix-num.h .././include/list.h \
!   .././include/spline.h input-ccc.h 
  version.o : version.c 
diff -Nrc2 fontutils-0.5/bzrto/README fontutils-0.6/bzrto/README
*** fontutils-0.5/bzrto/README	Wed Mar  4 11:38:03 1992
--- fontutils-0.6/bzrto/README	Mon Oct  5 18:12:41 1992
***************
*** 1,10 ****
! This program converts outline fonts in the homegrown BZR format to a
  form usable for typesetting, such as Metafont or PostScript.
  
  The Metafont file `bzrsetup.mf' is input by the MF code output by this
! program, so mf must be able to find it.  You can generate a font at a
! given size with a command line such as (`$ ' being the shell prompt):
! $ mf '\mode:=localfont; designsize:=24pt#; input foofont'
! To make a 24pt version of foofont.  The default size is 10pt.
  
! The BZR format is described in `../bzr/README'.
--- 1,15 ----
! This program converts outline fonts in our homegrown BZR format to a
  form usable for typesetting, such as Metafont or PostScript.
  
  The Metafont file `bzrsetup.mf' is input by the MF code output by this
! program, so MF must be able to find it.  You can generate a font at a
! given size with a command line such as:
  
!     mf '\mode:=localfont; designsize:=24pt#; input foofont'
! 
! This makes a 24pt version of foofont.  The default size is 10pt.
! 
! Similarly, the Type 3 fonts output by this program use the BuildChar
! routine defined in bzrbuildch.PS.
! 
! The BZR format is described in the manual.
diff -Nrc2 fontutils-0.5/bzrto/bzrsetup.mf fontutils-0.6/bzrto/bzrsetup.mf
*** fontutils-0.5/bzrto/bzrsetup.mf	Wed Sep  2 17:57:33 1992
--- fontutils-0.6/bzrto/bzrsetup.mf	Mon Oct 19 17:03:02 1992
***************
*** 134,140 ****
  def proof_labels (text t) =
    % We need to delimit the arguments here, so \MF\ knows where the
!   % second |text| argument begins.  Our output uses the suffix "e" for
!   % endpoints of segments, and the suffixes "c1" and "c2" for control
!   % points.
    if proofing > 1: general_label (t) (s); fi;
    if proofing > 2: general_label (t) (c1,c2); fi;
--- 134,140 ----
  def proof_labels (text t) =
    % We need to delimit the arguments here, so \MF\ knows where the
!   % second |text| argument begins.  Our output uses the suffix |"s"| for
!   % startpoints of segments, and the suffixes |"c1"| and |"c2"| for
!   % control points.
    if proofing > 1: general_label (t) (s); fi;
    if proofing > 2: general_label (t) (c1,c2); fi;
***************
*** 163,167 ****
  def fill_or_unfill expr p =
    temp_path := p;
-   loggingall;
    if turningnumber temp_path > 0: fill else: unfill fi temp_path;
  enddef;
--- 163,166 ----
diff -Nrc2 fontutils-0.5/bzrto/ccc.y fontutils-0.6/bzrto/ccc.y
*** fontutils-0.5/bzrto/ccc.y	Tue Sep  1 14:46:19 1992
--- fontutils-0.6/bzrto/ccc.y	Sun Oct 11 16:03:33 1992
***************
*** 30,38 ****
  
  
! /* Retrieve the TFM dimension specified by the accessor macro TFM_DIMEN in
!    the character CHAR_PTR.  Assume both the CHAR_PTR and the TFM info in the
!    character exist.  */
! #define BZR_TFM_DIMEN(tfm_dimen, bzr_char_ptr)				\
!   tfm_dimen (*CHAR_TFM_INFO (*(bzr_char_ptr)))
  
  
--- 30,41 ----
  
  
! /* Set the return value RET to either the dimension DIM, if NAME is a
!    valid character name, or an invalid sentinel.  Used in the
!    `unit_of_measure' rule.  */
! #define DO_CHAR_DIMEN(ret, dimen, name)					\
!   if (char_known_p (name))						\
!     ret = dimen_init (dimen);						\
!   else									\
!     DIMEN_VALID (ret) = false
  
  
***************
*** 124,128 ****
                        DIMEN_ABSOLUTE ($$) = true;
                      }
- 
                  | TR_CAPHEIGHT  { $$ = dimen_init (ccc_fontinfo.cap_height); }
                  | TR_DESIGNSIZE { $$ = dimen_init (ccc_fontinfo.design_size); }
--- 127,130 ----
***************
*** 130,174 ****
                  | TR_FONTDEPTH  { $$ = dimen_init (ccc_fontinfo.font_depth); }
                  | TR_XHEIGHT    { $$ = dimen_init (ccc_fontinfo.xheight); }
! 
!                 | TR_HEIGHT '(' T_CHARNAME ')'	
                      {
!                       if (char_known_p ($3))
!                         $$ = dimen_init (BZR_TFM_DIMEN (TFM_HEIGHT,
!                                                         chars[$3.code]));
!                       else
!                         DIMEN_VALID ($$) = false;
                      }
  		| TR_WIDTH '(' T_CHARNAME ')'
                      {
!                       if (char_known_p ($3))
!                         $$ = dimen_init (BZR_TFM_DIMEN (TFM_WIDTH,
!                                                         chars[$3.code]));
!                       else
!                         DIMEN_VALID ($$) = false;
                      }
  		| TR_DEPTH '(' T_CHARNAME ')'
                      {
!                       if (char_known_p ($3))
!                         $$ = dimen_init (BZR_TFM_DIMEN (TFM_DEPTH,
!                                                         chars[$3.code]));
!                       else
!                         DIMEN_VALID ($$) = false;
                      }
                  | TR_BBHEIGHT '(' T_CHARNAME ')'	
                      {
!                       if (char_known_p ($3))
!                         $$ = dimen_init (BB_HEIGHT (BCHAR_BB
!                                                      (*chars[$3.code])));
!                       else
!                         DIMEN_VALID ($$) = false;
                      }
- 		;
                  | TR_BBWIDTH '(' T_CHARNAME ')'	
                      {
!                       if (char_known_p ($3))
!                         $$ = dimen_init (BB_WIDTH (BCHAR_BB
!                                                     (*chars[$3.code])));
!                       else
!                         DIMEN_VALID ($$) = false;
                      }
  		;
--- 132,156 ----
                  | TR_FONTDEPTH  { $$ = dimen_init (ccc_fontinfo.font_depth); }
                  | TR_XHEIGHT    { $$ = dimen_init (ccc_fontinfo.xheight); }
!                 | TR_HEIGHT '(' T_CHARNAME ')'
                      {
!                       DO_CHAR_DIMEN ($$, CHAR_HEIGHT (*chars[$3.code]), $3);
                      }
  		| TR_WIDTH '(' T_CHARNAME ')'
                      {
!                       DO_CHAR_DIMEN ($$, CHAR_SET_WIDTH (*chars[$3.code]), $3);
                      }
  		| TR_DEPTH '(' T_CHARNAME ')'
                      {
!                       DO_CHAR_DIMEN ($$, CHAR_DEPTH (*chars[$3.code]), $3);
                      }
                  | TR_BBHEIGHT '(' T_CHARNAME ')'	
                      {
!                       DO_CHAR_DIMEN
!                         ($$, BB_HEIGHT (CHAR_BB (*chars[$3.code])), $3);
                      }
                  | TR_BBWIDTH '(' T_CHARNAME ')'	
                      {
!                       DO_CHAR_DIMEN
!                         ($$, BB_WIDTH (CHAR_BB (*chars[$3.code])), $3);
                      }
  		;
***************
*** 393,398 ****
  }
  
! /* Return true if the character C is defined in both the BZR and the TFM
!    input fonts, otherwise false.  If it is undefined, give a warning.  */
  
  static boolean
--- 375,379 ----
  }
  
! /* Return true if the character C is defined; otherwise, give a warning.  */
  
  static boolean
***************
*** 402,409 ****
    
    if (chars[c.code] == NULL)
!     CCC_WARN2 ("Character %d (%s) undefined in BZR files", c.code, c.name);
! 
!   else if (CHAR_TFM_INFO (*chars[c.code]) == NULL)
!     CCC_WARN2 ("Character %d (%s) undefined in TFM files", c.code, c.name);
  
    else
--- 383,387 ----
    
    if (chars[c.code] == NULL)
!     CCC_WARN2 ("Character %d (%s) undefined", c.code, c.name);
  
    else
diff -Nrc2 fontutils-0.5/bzrto/char.c fontutils-0.6/bzrto/char.c
*** fontutils-0.5/bzrto/char.c	Mon Aug 31 10:50:54 1992
--- fontutils-0.6/bzrto/char.c	Mon Oct 19 10:24:33 1992
***************
*** 24,77 ****
  
  #include "char.h"
-  
- static void scale_splines (spline_list_array_type *shape, real scale_factor);
- static real_coordinate_type scale_point (real_coordinate_type, real);
- static void scale_bzr_char (bzr_char_type *c, real scale_factor);
- static void scale_tfm_char (tfm_char_type *c, real scale_factor);
- 
- char_type *
- get_new_char (charcode_type code)
- {
-   char_type *new_char;
-   bzr_char_type *bzr_info = bzr_get_char (code);
-   tfm_char_type *tfm_info = tfm_get_char (code);
  
!   if (bzr_info == NULL)
!     return NULL;
  
-   /* OK, we'll have a character to return.  Fill in the `char_type'
-      structure.  */
-   new_char = XTALLOC1 (char_type);
-   
-   CHAR_BZR_INFO (*new_char) = bzr_info;
-   CHAR_TFM_INFO (*new_char) = tfm_info;
  
!   return new_char;
! }
  
! /* Scale the BZR and TFM information in C by SCALE_FACTOR.  */
  
  void
! scale_char (char_type *c, real scale_factor)
  {
!   if (scale_factor != 1)
!     {
!       scale_bzr_char (CHAR_BZR_INFO (*c), scale_factor);
!       scale_tfm_char (CHAR_TFM_INFO (*c), scale_factor);
!     }
! }
! 
! 
! /* Scale the set width, bounding box, and splines in C by SCALE_FACTOR.  */
  
- static void
- scale_bzr_char (bzr_char_type *c, real scale_factor)
- {
    CHAR_SET_WIDTH (*c) *= scale_factor;
!   BZR_CHAR_MIN_COL(*c) *= scale_factor;
!   BZR_CHAR_MAX_COL(*c) *= scale_factor;
!   BZR_CHAR_MIN_ROW(*c) *= scale_factor;
!   BZR_CHAR_MAX_ROW(*c) *= scale_factor;
!   scale_splines (&(BZR_SHAPE (*c)), scale_factor);
  }
  
--- 24,57 ----
  
  #include "char.h"
  
! #include "ccc.h"
  
  
! /* Angle from the vertical by which to slant the shapes, in radians.
!    (-oblique-angle)  */
! real oblique_angle = 0.0;
! 
! 
! static void scale_splines (spline_list_array_type *shape, real scale_factor);
! static real_coordinate_type scale_point (real_coordinate_type, real);
! static real_coordinate_type slant_point (real_coordinate_type);
! static unsigned update_subrs
!   (char_type *[], charcode_type, ccc_type *[], bzr_char_type *[]);
  
! /* Scale the information in C by SCALE_FACTOR.  */
  
  void
! scale_char (bzr_char_type *c, real scale_factor)
  {
!   if (scale_factor == 1)
!     return;
  
    CHAR_SET_WIDTH (*c) *= scale_factor;
!   CHAR_MIN_COL(*c) *= scale_factor;
!   CHAR_MAX_COL(*c) *= scale_factor;
!   CHAR_MIN_ROW(*c) *= scale_factor;
!   CHAR_MAX_ROW(*c) *= scale_factor;
! 
!   scale_splines (&BZR_SHAPE (*c), scale_factor);
  }
  
***************
*** 122,179 ****
    return scaled_p;
  }
  
  
! /* Scale all the character dimensions in C by SCALE_FACTOR.  */
  
! static void
! scale_tfm_char (tfm_char_type *c, real scale_factor)
  {
!   unsigned this_kern;
!   list_type kern_table;
    
!   /* If things are confused, the TFM file may not have the same
!      characters defined as the BZR file.  */
!   if (c == NULL)
!     return;
!     
!   kern_table = TFM_KERN (*c);
    
!   for (this_kern = 0; this_kern < LIST_SIZE (kern_table); this_kern++)
      {
!       tfm_kern_type *kern = LIST_ELT (kern_table, this_kern);
        
!       kern->kern *= scale_factor;
      }
  
!   TFM_WIDTH (*c) *= scale_factor;
!   TFM_HEIGHT (*c) *= scale_factor;
!   TFM_FIX_WIDTH (*c) *= scale_factor;
!   TFM_FIX_HEIGHT (*c) *= scale_factor;
!   TFM_DEPTH (*c) *= scale_factor;
!   TFM_FIX_DEPTH (*c) *= scale_factor;
  }
- 
- /* Make a new TFM character from the information in BB and assign it to
-    `CHARS[CODE]', allocating space if necessary.  */
  
! void
! char_make_tfm (char_type *chars[], charcode_type code,
!                real_bounding_box_type bb)
  {
!   tfm_char_type *new_tfm_char = XTALLOC1 (tfm_char_type);
    
!   TFM_CHAR_EXISTS (*new_tfm_char) = true;
!   TFM_CHARCODE (*new_tfm_char) = code;
!   TFM_WIDTH (*new_tfm_char) = BB_WIDTH (bb);
!   TFM_HEIGHT (*new_tfm_char) = MAX_ROW (bb);
!   TFM_DEPTH (*new_tfm_char) = -MIN_ROW (bb);
!   TFM_ITALIC_CORRECTION (*new_tfm_char) = 0.0;
!   TFM_KERN (*new_tfm_char) = list_init ();
!   TFM_LIGATURE (*new_tfm_char) = list_init ();
! 
!   /* If this character didn't exist in the BZR input, have to define it. */
!   if (chars[code] == NULL)
!     chars[code] = XTALLOC1 (char_type);
!     
!   CHAR_TFM_INFO (*chars[code]) = new_tfm_char;
  }
--- 102,251 ----
    return scaled_p;
  }
+ 
+ /* Merge CCC_CHARS and BZR_CHARS between STARTING_CHAR and ENDING_CHAR,
+    with the latter taking precedence.  For each element in CCC_CHARS we use
+    also incorporate any other characters it needs.  Return the resulting
+    array of structures, and the number of subroutines found in SUBR_COUNT.  */
+    
+ char_type **
+ subr_chars (bzr_char_type *bzr_chars[], ccc_type *ccc_chars[],
+             charcode_type starting_char, charcode_type ending_char,
+             unsigned *subr_count)
+ {
+   unsigned code;
+   char_type **subrs = XTALLOC (MAX_CHARCODE + 1, char_type *);
+   
+   *subr_count = 0;
+   for (code = 0; code <= MAX_CHARCODE; code++)
+     subrs[code] = NULL;
+ 
+   for (code = starting_char; code <= ending_char; code++)
+     {
+       if (ccc_chars[code])
+         *subr_count += update_subrs (subrs, code, ccc_chars, bzr_chars);
+     }
+ 
+   return subrs;
+ }
  
  
! /* Update in SUBRS all the characters in CCC_CHARS and BZR_CHARS that
!    are used as subroutines in CCC_CHARS[CODE].  Prefer entries in
!    BZR_CHARS to ones in CCC_CHARS, if both exist.  We assume
!    CCC_CHARS[CODE] is not null.  */
  
! static unsigned
! update_subrs (char_type *subrs[], charcode_type code,
!               ccc_type *ccc_chars[], bzr_char_type *bzr_chars[])
  {
!   unsigned this_cmd;
!   ccc_type c = *ccc_chars[code];
!   unsigned subr_count = 0;
! 
!   for (this_cmd = 0; this_cmd < LIST_SIZE (c); this_cmd++)
!     { 
!       ccc_cmd_type cmd = *(ccc_cmd_type *) LIST_ELT (c, this_cmd);
!       
!       switch (CCC_OPCODE (cmd))
!         {
!         case TR_SETCHAR:
!         case TR_SETCHARBB:
!           {
!             char_type *new_char = XTALLOC1 (char_type);
!             charcode_type subr_code = CCC_CHARCODE (cmd);
!             
!             /* If we already needed this character, keep going.  */
!             if (subrs[subr_code])
!               continue;
!             
!             /* Prefer the BZR definition to the CCC if we have both.  */
!             if (bzr_chars[subr_code])
!               {
!                 CHAR_CLASS (*new_char) = bzr_char_class;
!                 CHAR_BZR (*new_char) = bzr_chars[subr_code];
!                 subrs[subr_code] = new_char;
!                 subr_count++;
!               }
!             else if (ccc_chars[subr_code])
!               {
!                 CHAR_CLASS (*new_char) = ccc_char_class;
!                 CHAR_CCC (*new_char) = ccc_chars[subr_code];
!                 subrs[subr_code] = new_char;
!                 subr_count++;
!                 
!                 /* This CCC char might need more subroutines, so recurse.  */
!                 subr_count
!                   += update_subrs (subrs, subr_code, ccc_chars, bzr_chars);
!               }
!             else
!               WARNING2 ("Char %d used by CCC char %d, but undefined",
!                         subr_code, code);
!           }
!           break;
! 
!         case TR_HMOVE:
!         case TR_VMOVE:
!           break;
! 
!         default:
!           FATAL2 ("Bad CCC command %d in char %d", CCC_OPCODE (cmd), code);
! 	}
!     }
    
!   return subr_count;
! }
! 
! /* Transform all the coordinates in each spline in the list.  */
! 
! spline_list_array_type
! oblique_splines (spline_list_array_type shape)
! {
!   unsigned this_list;
!   spline_list_array_type answer = new_spline_list_array ();
! 
!   if (oblique_angle == 0.0) return shape;
    
!   for (this_list = 0; this_list < SPLINE_LIST_ARRAY_LENGTH (shape);
!        this_list++)
      {
!       unsigned this_spline;
!       spline_list_type list = SPLINE_LIST_ARRAY_ELT (shape, this_list);
!       spline_list_type *new = new_spline_list ();
! 
!       for (this_spline = 0; this_spline < SPLINE_LIST_LENGTH (list);
!            this_spline++)
!         {
!           spline_type s = SPLINE_LIST_ELT (list, this_spline);
! 
!           START_POINT (s) = slant_point (START_POINT (s));
!           END_POINT (s) = slant_point (END_POINT (s));
!           
!           if (SPLINE_DEGREE (s) == CUBIC)
!             {
!               CONTROL1 (s) = slant_point (CONTROL1 (s));
!               CONTROL2 (s) = slant_point (CONTROL2 (s));
!             }
! 
!           append_spline (new, s);
!         }
        
!       append_spline_list (&answer, *new);
      }
+   free_spline_list_array (&shape);
  
!   return answer;
  }
  
! 
! /* Slant the single point P.  This is just trigonometry.  */
! 
! static real_coordinate_type
! slant_point (real_coordinate_type p)
  {
!   real_coordinate_type slanted_p;
!   
!   slanted_p.y = p.y;
!   slanted_p.x = p.x + tan (oblique_angle) * p.y;
    
!   return slanted_p;
  }
diff -Nrc2 fontutils-0.5/bzrto/char.h fontutils-0.6/bzrto/char.h
*** fontutils-0.5/bzrto/char.h	Mon Aug 31 10:24:08 1992
--- fontutils-0.6/bzrto/char.h	Mon Oct 19 10:24:34 1992
***************
*** 21,60 ****
  
  #include "bzr.h"
! #include "tfm.h"
  
  
- /* The representation of a single character.  */
  typedef struct
  {
!   bzr_char_type *bzr_info;
!   tfm_char_type *tfm_info;
  } char_type;
  
! /* The bzr-derived information about the character C.  */
! #define CHAR_BZR_INFO(c) ((c).bzr_info)
! #define BCHAR_BB(c) (BZR_CHAR_BB (*(CHAR_BZR_INFO (c))))
! #define BCHAR_MIN_COL(c) (BZR_CHAR_MIN_COL (*(CHAR_BZR_INFO (c))))
! #define BCHAR_MAX_COL(c) (BZR_CHAR_MAX_COL (*(CHAR_BZR_INFO (c))))
! #define BCHAR_MIN_ROW(c) (BZR_CHAR_MIN_ROW (*(CHAR_BZR_INFO (c))))
! #define BCHAR_MAX_ROW(c) (BZR_CHAR_MAX_ROW (*(CHAR_BZR_INFO (c))))
! #define BCHAR_BB_WIDTH(c) (BZR_CHAR_BB_WIDTH (*(CHAR_BZR_INFO (c))))
! #define BCHAR_SHAPE(c)    (BZR_SHAPE(*(CHAR_BZR_INFO (c))))
! 
! /* The tfm-derived information about the character C.  */
! #define CHAR_TFM_INFO(c) ((c).tfm_info)
! 
! 
! /* Return a pointer to the character CODE.  Return NULL if there is no
!    BZR info for CODE.  */
! extern char_type *get_new_char (charcode_type code);
  
! /* Scale a character by SCALE_FACTOR.  */
! extern void scale_char (char_type *, real scale_factor);
  
  
! /* Create a `tfm_char_type' structure from the information in BB and
!    assign it to `CHARS[CODE]'.  */
! extern void char_make_tfm (char_type *chars[], charcode_type code,
!                            real_bounding_box_type bb);
  
  #endif /* not CHAR_H */
--- 21,58 ----
  
  #include "bzr.h"
! #include "input-ccc.h"
  
+ typedef enum { bzr_char_class, ccc_char_class } char_class_type;
  
  typedef struct
  {
!   char_class_type tag;
!   union
!   {
!     bzr_char_type *bzr_char;
!     ccc_type *ccc_char;
!   } u;
  } char_type;
  
! #define CHAR_CLASS(c) ((c).tag)
! #define CHAR_BZR(c) ((c).u.bzr_char)
! #define CHAR_CCC(c) ((c).u.ccc_char)
  
! 
! /* See char.c.  */
! extern real oblique_angle;
! 
! /* Slant all splines in the list by `oblique_angle'.  */
! extern spline_list_array_type oblique_splines (spline_list_array_type);
  
  
! /* Return an array of which characters are needed by CCC_CHARS (between
!    START and END) as subroutines, and how many we found in SUBR_COUNT.  */
! extern char_type **subr_chars (bzr_char_type *[], ccc_type *ccc_chars[],
!                                charcode_type start, charcode_type end,
!                                unsigned *subr_count);
! 
! /* Scale a character by SCALE_FACTOR.  */
! extern void scale_char (bzr_char_type *, real scale_factor);
  
  #endif /* not CHAR_H */
diff -Nrc2 fontutils-0.5/bzrto/input-ccc.c fontutils-0.6/bzrto/input-ccc.c
*** fontutils-0.5/bzrto/input-ccc.c	Mon Aug 17 16:36:03 1992
--- fontutils-0.6/bzrto/input-ccc.c	Sun Oct 11 15:42:33 1992
***************
*** 32,36 ****
  
  /* The information we've collected about the characters.  */
! char_type **chars;
  
  /* The information for resolving various CCC units of measure.  */
--- 32,36 ----
  
  /* The information we've collected about the characters.  */
! bzr_char_type **chars;
  
  /* The information for resolving various CCC units of measure.  */
***************
*** 41,48 ****
  
  /* Go through all of CHARS, setting the various components in the return
!    struct.  Some defaults are taken from TFM_INFO.  */
  
  static ccc_fontinfo_type
! get_ccc_fontinfo (char_type **chars, tfm_global_info_type tfm_info)
  {
    ccc_fontinfo_type ccc_info; /* What we'll return.  */
--- 41,50 ----
  
  /* Go through all of CHARS, setting the various components in the return
!    struct.  Some defaults are taken from TFM_INFO (if it's non-null),
!    and the global `encoding_info'.  */
  
  static ccc_fontinfo_type
! get_ccc_fontinfo (real design_size, bzr_char_type *chars[],
!                   tfm_global_info_type *tfm_info)
  {
    ccc_fontinfo_type ccc_info; /* What we'll return.  */
***************
*** 53,67 ****
  
    /* The designsize is always present.  */
!   ccc_info.design_size = TFM_DESIGN_SIZE (tfm_info);
    
    /* If the `quad' parameter is not present in TFM_INFO to define the
       font's em space, use the design size.  */
!   ccc_info.em = TFM_SAFE_FONTDIMEN (tfm_info, TFM_QUAD_PARAMETER,
!                                     TFM_DESIGN_SIZE (tfm_info));
  
    /* If the `xheight' parameter is present in TFM_INFO, use it.  */
!   if (TFM_XHEIGHT_PARAMETER <= TFM_FONTDIMEN_COUNT (tfm_info))
      {
!       ccc_info.xheight = TFM_FONTDIMEN (tfm_info, TFM_XHEIGHT_PARAMETER);
        xheight_found = true;
      }
--- 55,71 ----
  
    /* The designsize is always present.  */
!   ccc_info.design_size = design_size;
    
    /* If the `quad' parameter is not present in TFM_INFO to define the
       font's em space, use the design size.  */
!   ccc_info.em
!     = tfm_info
!       ? TFM_SAFE_FONTDIMEN (*tfm_info, TFM_QUAD_PARAMETER, design_size)
!       : design_size;
  
    /* If the `xheight' parameter is present in TFM_INFO, use it.  */
!   if (tfm_info && TFM_XHEIGHT_PARAMETER <= TFM_FONTDIMEN_COUNT (*tfm_info))
      {
!       ccc_info.xheight = TFM_FONTDIMEN (*tfm_info, TFM_XHEIGHT_PARAMETER);
        xheight_found = true;
      }
***************
*** 73,123 ****
    for (this_char = 0; this_char < MAX_CHARCODE; this_char++)
      {
!       tfm_char_type *tfm_char;
!       
!       if (chars[this_char] == NULL)
!         continue;
!         
!       tfm_char = CHAR_TFM_INFO (*(chars[this_char]));
! 
!       if (tfm_char && TFM_CHAR_EXISTS (*tfm_char))
          {
!            int char_height = TFM_HEIGHT (*tfm_char);
!            int char_depth = TFM_DEPTH (*tfm_char);
!            string char_name = ENCODING_CHAR_NAME (encoding_info, this_char);
! 
!            if (!cap_height_found && char_height > font_height) 
!              font_height = char_height;
! 
!            if (char_depth > ccc_fontinfo.font_depth) 
!              ccc_info.font_depth = char_depth;
! 
!            /* If it's a letter from which we can find the font's
!               cap_height, use it.  Don't use `F' et al. because they
!               might have serifs that go above the height of the stem.  */
!            if (!cap_height_found && char_name[1] == 0
!                && (*char_name == 'B'
!                    || *char_name == 'D'
!                    || *char_name == 'H'
!                    || *char_name == 'P'
!                    || *char_name == 'R'
!                    || *char_name == 'X'))
!              {
!                ccc_info.cap_height = char_height;
!                cap_height_found = true;
!              }
! 
!            /* If we haven't found the x-height yet, and `this_char' is a
!               letter from which we can determined it, use it.  */
!            if (!xheight_found && char_name[1] == 0
!                && (*char_name == 'u'
!                    || *char_name == 'v'
!                    || *char_name == 'w'
!                    || *char_name == 'x'
!                    || *char_name == 'y'
!                    || *char_name == 'z'))
!              {
!                ccc_info.xheight = char_height;
!                xheight_found = true;
!              }
          }
      }
--- 77,121 ----
    for (this_char = 0; this_char < MAX_CHARCODE; this_char++)
      {
!       if (chars[this_char])
          {
!           bzr_char_type c = *chars[this_char];
!           int char_height = CHAR_HEIGHT (c);
!           int char_depth = CHAR_DEPTH (c);
!           string char_name = ENCODING_CHAR_NAME (encoding_info, this_char);
! 
!           if (char_height > font_height) 
!             font_height = char_height;
! 
!           if (char_depth > ccc_info.font_depth) 
!             ccc_info.font_depth = char_depth;
! 
!           /* If it's a letter from which we can find the font's
!              cap_height, use it.  Don't use `F' et al. because they
!              might have serifs that go above the height of the stem.  */
!           if (!cap_height_found && char_name[1] == 0
!               && (*char_name == 'B'
!                   || *char_name == 'D'
!                   || *char_name == 'H'
!                   || *char_name == 'P'
!                   || *char_name == 'R'
!                   || *char_name == 'X'))
!             {
!               ccc_info.cap_height = char_height;
!               cap_height_found = true;
!             }
! 
!           /* If we haven't found the x-height yet, and `this_char' is a
!              letter from which we can determined it, use it.  */
!           if (!xheight_found && char_name[1] == 0
!               && (*char_name == 'u'
!                   || *char_name == 'v'
!                   || *char_name == 'w'
!                   || *char_name == 'x'
!                   || *char_name == 'y'
!                   || *char_name == 'z'))
!             {
!               ccc_info.xheight = char_height;
!               xheight_found = true;
!             }
          }
      }
***************
*** 128,131 ****
--- 126,133 ----
      ccc_info.cap_height = font_height;
    
+   /* Similarly for the x-height.  */
+   if (!xheight_found)
+     ccc_info.xheight = .6 * font_height;
+ 
    return ccc_info;
  }
***************
*** 138,143 ****
  
  ccc_type **
! parse_ccc_file (string in_filename, char_type **chars_arg,
! 		tfm_global_info_type tfm_info, boolean warning_p)
  {
    string ccc_name = extend_filename (in_filename, "ccc");
--- 140,146 ----
  
  ccc_type **
! parse_ccc_file (string in_filename, bzr_char_type *chars_arg[],
! 		tfm_global_info_type *tfm_info, real design_size,
!                 boolean warning_p)
  {
    string ccc_name = extend_filename (in_filename, "ccc");
***************
*** 154,164 ****
        extern int yyparse ();
        
!       ccc_fontinfo = get_ccc_fontinfo (chars_arg, tfm_info);
! 
!       /* We have to use these globals to communicate with the parser.  */
!       chars = chars_arg;
        ccc_filename = ccc_name;
        
!       /* Parse the input.  */
        yyparse ();
  
--- 157,167 ----
        extern int yyparse ();
        
!       /* We have to use these globals, since we can't alter `yyparse's
!          signature.  */
!       ccc_fontinfo = get_ccc_fontinfo (design_size, chars_arg, tfm_info);
        ccc_filename = ccc_name;
+       chars = chars_arg;
        
!       /* Parse the CCC source file.  */
        yyparse ();
  
diff -Nrc2 fontutils-0.5/bzrto/input-ccc.h fontutils-0.6/bzrto/input-ccc.h
*** fontutils-0.5/bzrto/input-ccc.h	Mon Aug 31 09:35:21 1992
--- fontutils-0.6/bzrto/input-ccc.h	Sun Oct 18 16:32:38 1992
***************
*** 21,25 ****
  #define INPUT_CCC_H
  
- #include "char.h"
  #include "list.h"
  #include "tfm.h"
--- 21,24 ----
***************
*** 94,98 ****
  extern FILE *ccc_file;
  extern string ccc_filename;
! extern char_type **chars;
  extern ccc_fontinfo_type ccc_fontinfo;
  extern ccc_type *ccc_chars[];
--- 93,97 ----
  extern FILE *ccc_file;
  extern string ccc_filename;
! extern bzr_char_type **chars;
  extern ccc_fontinfo_type ccc_fontinfo;
  extern ccc_type *ccc_chars[];
***************
*** 100,108 ****
  
  /* Read the CCC file NAME, extended with `.ccc' if necessary.  Warn
!    about the file not existing only if WARN_P is true.  Update `chars',
     taking defaults from T.  */
  
! extern ccc_type **parse_ccc_file (string name, char_type **chars,
!                                   tfm_global_info_type t, boolean warn_p);
  
  #endif /* not CCC_H */
--- 99,108 ----
  
  /* Read the CCC file NAME, extended with `.ccc' if necessary.  Warn
!    about the file not existing only if WARN_P is true.  Update CHARS,
     taking defaults from T.  */
  
! extern ccc_type **parse_ccc_file
!   (string name, bzr_char_type **chars, tfm_global_info_type *t,
!    real design_size, boolean warn_p);
  
  #endif /* not CCC_H */
diff -Nrc2 fontutils-0.5/bzrto/main.c fontutils-0.6/bzrto/main.c
*** fontutils-0.5/bzrto/main.c	Mon Aug 31 11:29:54 1992
--- fontutils-0.6/bzrto/main.c	Tue Oct 20 10:04:22 1992
***************
*** 21,25 ****
  
  #include "bzr.h"
! #define CMDLINE_NO_DPI /* Outline fonts are resolution-independent.  */
  #include "cmdline.h"
  #include "filename.h"
--- 21,25 ----
  
  #include "bzr.h"
! #define CMDLINE_NO_DPI /* BZR fonts are resolution-independent.  */
  #include "cmdline.h"
  #include "filename.h"
***************
*** 33,39 ****
  #include "main.h"
  #include "metafont.h"
- #include "oblique.h"
  #include "pstype1.h"
  #include "pstype3.h"
  #include "text.h"
  
--- 33,39 ----
  #include "main.h"
  #include "metafont.h"
  #include "pstype1.h"
  #include "pstype3.h"
+ #include "psutil.h"
  #include "text.h"
  
***************
*** 41,44 ****
--- 41,56 ----
  
  
+ /* The encoding vector.  This is not static because it's too much
+    trouble to pass it down to the output routines.  */
+ encoding_info_type encoding_info;
+ 
+ /* Says which characters we should process.  This is independent of the
+    ordering in the font file.  (-range)  */
+ charcode_type starting_char = 0;
+ charcode_type ending_char = MAX_CHARCODE;
+ 
+ /* The font parameters from the main TFM file, or NULL.  */
+ tfm_global_info_type *tfm_global_info;
+ 
  /* The name of the CCC input file specified by the user.  (-ccc-file)  */
  static string ccc_name = NULL;
***************
*** 55,63 ****
  /* The names of BZR files to be concatenated onto the main one in the
     output.  (-concat)  */
! list_type bzr_name_list;
  
! /* The encoding file and its data structure.  (-encoding)  */
! string encoding_name = NULL;
! encoding_info_type encoding_info;
  
  /* The name of the output file specified by the user.  (-output-file)  */
--- 67,74 ----
  /* The names of BZR files to be concatenated onto the main one in the
     output.  (-concat)  */
! static list_type bzr_name_list;
  
! /* The name of the encoding file.  (-encoding)  */
! static string encoding_name = NULL;
  
  /* The name of the output file specified by the user.  (-output-file)  */
***************
*** 67,81 ****
  static string ps_fontname;
  
- /* Says which characters we should process.  This is independent of the
-    ordering in the font file.  (-range)  */
- static int starting_char = 0;
- static int ending_char = MAX_CHARCODE;
- 
  /* This is defined in version.c.  */
  extern string version_string;
  
! static string read_command_line (int, string []);
  static void append_concat_list (list_type *, string);
  
  int
  main (unsigned argc, string argv[])
--- 78,103 ----
  static string ps_fontname;
  
  /* This is defined in version.c.  */
  extern string version_string;
  
! /* The number of characters we report per line if verbose.  */
! #define NCHARS_PER_LINE 13
! 
  static void append_concat_list (list_type *, string);
+ static unsigned count_non_subr_chars
+   (char_type *[], bzr_char_type *[], ccc_type *[]);
+ static void init_tfm_and_encoding_info
+   (string, tfm_global_info_type **, encoding_info_type *);
+ static void output_bzr_char (bzr_char_type, char_type *[]);
+ static void output_bzr_subr (bzr_char_type);
+ static void output_ccc_char (ccc_type, charcode_type, char_type *[]);
+ static void output_ccc_subr (ccc_type, charcode_type, char_type *[]);
+ static void read_bzr_file (bzr_char_type *[], string);
+ static bzr_char_type **read_bzr_files (list_type);
+ static string read_command_line (int, string []);
  
+ /* Convert generic outline fonts in BZR format to a form that can
+    actually be used for typesetting.  */
+ 
  int
  main (unsigned argc, string argv[])
***************
*** 84,97 ****
    bzr_preamble_type preamble;
    bzr_postamble_type postamble;
!   real global_bzr_designsize;
!   char_type *chars[MAX_CHARCODE + 1];
    ccc_type **ccc_chars;
!   tfm_global_info_type tfm_info;
    unsigned this_char;
-   unsigned this_bzr_name;
-   string *first_element;
-   string font_name;
-   string font_basename;
-   string tfm_name, tfm_root;
    boolean ccc_warning_p = true;
    unsigned char_count = 0;
--- 106,116 ----
    bzr_preamble_type preamble;
    bzr_postamble_type postamble;
!   bzr_char_type **bzr_chars;
    ccc_type **ccc_chars;
!   char_type **chars, **subrs;
!   string *first_name;
!   string font_name, font_rootname;
!   unsigned subr_count;
    unsigned this_char;
    boolean ccc_warning_p = true;
    unsigned char_count = 0;
***************
*** 98,110 ****
  
    /* Initialize the list of BZR filenames to have one empty element at
!      the beginning, which we will fill in with the main BZR name.  */
    bzr_name_list = list_init ();
!   first_element = LIST_TAPPEND (&bzr_name_list, string);
    
    font_name = read_command_line (argc, argv);
!   font_basename = remove_suffix (basename (font_name));
  
    if (output_name == NULL)
!     output_name = strtok (xstrdup (font_basename), "0123456789");
    else 
      if (find_suffix (output_name) != NULL
--- 117,129 ----
  
    /* Initialize the list of BZR filenames to have one empty element at
!      the beginning, which we fill in below with the main BZR name.  */
    bzr_name_list = list_init ();
!   first_name = LIST_TAPPEND (&bzr_name_list, string);
    
    font_name = read_command_line (argc, argv);
!   font_rootname = remove_suffix (basename (font_name));
  
    if (output_name == NULL)
!     output_name = strtok (xstrdup (font_rootname), "0123456789");
    else 
      if (find_suffix (output_name) != NULL
***************
*** 116,123 ****
    bzr_name = extend_filename (font_name, "bzr");
    if (!bzr_open_input_file (bzr_name))
!     FATAL1 ("%s: Could not find BZR file", bzr_name);
  
    /* Read the global information from the BZR file and then close it, as
!      we open it again below.  */
    preamble = bzr_get_preamble ();
    postamble = bzr_get_postamble ();
--- 135,145 ----
    bzr_name = extend_filename (font_name, "bzr");
    if (!bzr_open_input_file (bzr_name))
!     FATAL_PERROR (bzr_name);
  
+   /* The first element of the BZR name list.  */
+   *first_name = bzr_name;
+ 
    /* Read the global information from the BZR file and then close it, as
!      we open it again below when reading the characters.  */
    preamble = bzr_get_preamble ();
    postamble = bzr_get_postamble ();
***************
*** 124,294 ****
    bzr_close_input_file ();
    
!   global_bzr_designsize = BZR_DESIGN_SIZE (preamble);
! 
!   /* Open the main TFM info.  */
!   tfm_root = make_suffix (bzr_name, "tfm");
!   tfm_name = find_tfm_filename (tfm_root);
! 
!   /* We need the TFM file for the main BZR file.  */
  
-   if (tfm_name == NULL || !tfm_open_input_file (tfm_name))
-     FATAL1 ("%s: Could not find TFM file", tfm_root);
- 
-   /* Just get the TFM global info and then close the file again, as we
-      open it again below.  */
-   tfm_info = tfm_get_global_info ();
-   tfm_close_input_file ();
-   
-   /* Read the encoding information.  */
-   if (encoding_name == NULL)
-     encoding_name = coding_scheme_to_filename (TFM_CODING_SCHEME (tfm_info));
-     
-   encoding_info = read_encoding_file (encoding_name);
-   TFM_CODING_SCHEME (tfm_info) = ENCODING_SCHEME_NAME (encoding_info);
- 
    if (output[metafont])
!     metafont_start_output (output_name, preamble, tfm_info);
!     
    if (output[pstype1])
!     pstype1_start_output (font_basename, output_name, preamble, postamble,
!     			  ps_fontname, tfm_info); 
    if (output[pstype3])
!     pstype3_start_output (font_basename, output_name, preamble, postamble, 
! 			  ps_fontname, tfm_info); 
    if (output[text])
!     text_start_output (font_basename, preamble);
!   
!   for (this_char = 0; this_char < MAX_CHARCODE; this_char++)
!     chars[this_char] = NULL;
! 
!   /* The first element of the BZR name list.  */
!   *first_element = bzr_name;
  
-   /* Go through the BZR name list, concatenating the characters in the
-      files to the main font:
  
!      Output subroutines for all the BZR characters we have, then output 
!      the characters in terms of these subroutines.  We do this so we can
!      build composite characters, e.g, those with accents, using existing
!      characters.  */
  
!   for (this_bzr_name = 0; this_bzr_name < LIST_SIZE (bzr_name_list); 
!        this_bzr_name++)
      {
!       real local_bzr_designsize;
!       real designsize_ratio;
!       bzr_preamble_type preamble;
!       bzr_postamble_type postamble;
!       string tfm_name;
!       string bzr_name = *(string *) LIST_ELT (bzr_name_list, this_bzr_name);
! 
!       bzr_name = extend_filename (bzr_name, "bzr");
! 
!       if (!bzr_open_input_file (bzr_name))
!         FATAL1 ("%s: Could not find BZR file", bzr_name);
! 
!       preamble = bzr_get_preamble ();
!       postamble = bzr_get_postamble ();
!       local_bzr_designsize = BZR_DESIGN_SIZE (preamble);
!       designsize_ratio = global_bzr_designsize / local_bzr_designsize;
!       
!       tfm_name = find_tfm_filename (make_suffix (bzr_name, "tfm"));
  
-       if (tfm_name == NULL || !tfm_open_input_file (tfm_name))
-         FATAL1 ("%s: Could not find TFM file", basename (bzr_name));
  
!       for (this_char = starting_char; this_char <= ending_char; this_char++)
          {
!           char_type *c = get_new_char (this_char);
            
! 	  /* Don't do a character that's already been done.  */
! 	  if (c != NULL && chars[this_char] != NULL)
! 	    {
! 	      WARNING2 ("%s: character %d already used", bzr_name, this_char);
!               c = NULL;  /* So won't go into IF statement below.  */
! 	    }
  
! 	  /* If there is BZR information for this code...  */
! 	  if (c != NULL)
!             {
! 	      BCHAR_SHAPE (*c) = oblique_splines (BCHAR_SHAPE (*c));
! 	      scale_char (c, designsize_ratio);
  
! 	      if (output[metafont])
!                 metafont_output_char_subr (*(CHAR_BZR_INFO (*c)));
  
!               if (output[pstype1])
!                 pstype1_output_char_subr (*(CHAR_BZR_INFO (*c)));
  
!               chars[this_char] = c;
  
! 	      /* We don't deal with Type 3; just output the char below.  */
!               /* See below also for text.  */
! 	      
! 	    }
!         }
!       bzr_close_input_file ();
        tfm_close_input_file ();
      }
    
!   if (output[pstype1])
!     pstype1_intermediate_output ();
!     
!   /* Read the composite character definitions.  */
!   if (ccc_name == NULL)
      {
!       ccc_name = font_name;
!       ccc_warning_p = false;
      }
  
!   ccc_chars = parse_ccc_file (ccc_name, chars, tfm_info, ccc_warning_p);
  
-   for (this_char = starting_char; this_char <= ending_char; this_char++)
-     {
-       if (chars[this_char] != NULL || ccc_chars[this_char] != NULL)
-         REPORT1 ("[%u", this_char);
  
!       if (chars[this_char] != NULL)
!         {
! 	  char_type c = *(chars[this_char]);
!           
! 	  if (output[metafont])
!             metafont_output_bzr_char (c);
  
! 	  if (output[pstype1])
!             pstype1_output_bzr_char (*(CHAR_BZR_INFO (c)));
  
!           if (output[pstype3])
!             pstype3_output_char (*(CHAR_BZR_INFO (c)));
  
!           if (output[text])
!             text_output_bzr_char (*(CHAR_BZR_INFO (c)));
!         }
!       else if (ccc_chars[this_char] != NULL)
          {
!           if (output[metafont])
!             metafont_output_ccc_char (*(ccc_chars[this_char]), chars,
!                                       this_char, global_bzr_designsize);
!           if (output[pstype1])
!             pstype1_output_ccc_char (*(ccc_chars[this_char]), chars,
!                                      this_char, global_bzr_designsize);
  
!           if (output[text])
!             text_output_ccc_char (*(ccc_chars[this_char]));
          }
  
!       if (chars[this_char] != NULL || ccc_chars[this_char] != NULL)
!         REPORT1 ("]%c", ++char_count % 8 ? ' ' : '\n');
      }
  
!   if (output[metafont]) metafont_finish_output (chars);
!   if (output[pstype1]) pstype1_finish_output ();
!   if (output[pstype3]) pstype3_finish_output ();
!   if (output[text]) text_finish_output (postamble);
  
-   if (char_count % 8 != 0)
-     REPORT ("\n");
  
!   return 0;
  }
  
--- 146,455 ----
    bzr_close_input_file ();
    
!   /* Read global TFM information, if we have it, and make sure we have
!      an encoding vector.  */
!   init_tfm_and_encoding_info (bzr_name, &tfm_global_info, &encoding_info);
  
    if (output[metafont])
!     metafont_start_output (output_name, preamble, tfm_global_info);
    if (output[pstype1])
!     pstype1_start_output (output_name, preamble, postamble);
    if (output[pstype3])
!     pstype3_start_output (output_name, preamble, postamble);
    if (output[text])
!     text_start_output (font_name, preamble);
  
  
!   /* We don't know which BZR characters the CCC file might use, so just
!      read them all.  */
!   bzr_chars = read_bzr_files (bzr_name_list);
  
!   /* Read the composite character definitions.  */
!   if (ccc_name == NULL)
      {
!       ccc_name = remove_suffix (font_name);
!       ccc_warning_p = false;
!     }
!   ccc_chars = parse_ccc_file (ccc_name, bzr_chars, tfm_global_info,
!                               BZR_DESIGN_SIZE (preamble), ccc_warning_p);
! 
! 
!   /* We've read the input.  Figure out which characters we need as
!      subroutines (because they're used in the CCC characters).  */
!   subrs = subr_chars (bzr_chars, ccc_chars, starting_char, ending_char,
!                       &subr_count);
! 
! 
!   /* An ugly special case due to context dependence in PostScript.  */
!   if (output[pstype1])
!     pstype1_start_subrs (subr_count);
! 
!   /* Output all the characters needed as subroutines.  We cannot simply
!      output every character as a subroutine, because for 1200dpi
!      originals the result is too large to fit in even big Metafont's
!      260K memory.  */
!   REPORT ("Writing subroutines:\n");
!   for (this_char = 0; this_char <= MAX_CHARCODE; this_char++)
!     if (subrs[this_char])
!       { 
!         char_type subr = *subrs[this_char];
!         
!         char_count++;
!         REPORT2 ("[%d]%c", this_char,
!                  char_count % NCHARS_PER_LINE ? ' ' : '\n');
! 
!         /* If we have both BZR and CCC definitions for `this_char',
!            prefer the former.  */
!         if (CHAR_CLASS (subr) == bzr_char_class)
!           output_bzr_subr (*CHAR_BZR (subr));
!         else if (CHAR_CLASS (subr) == ccc_char_class)
!           output_ccc_subr (*CHAR_CCC (subr), this_char, subrs);
!         else
!           abort ();
!       }
! 
! 
!   /* The ugly special case continues.  */
!   if (output[pstype1])
!     pstype1_start_chars (count_non_subr_chars (subrs, bzr_chars, ccc_chars));
  
  
!   /* And finally, output the non-subroutine characters.  */
!   REPORT1 ("%sWriting characters:\n",
!            char_count % NCHARS_PER_LINE ? "\n" : "");
!   for (this_char = starting_char; this_char <= ending_char; this_char++)
!     {
!       if (bzr_chars[this_char] || ccc_chars[this_char])
          {
!           char_count++;
!           REPORT2 ("[%d]%c", this_char,
!                    char_count % NCHARS_PER_LINE ? ' ' : '\n');
            
!           if (bzr_chars[this_char])
!             output_bzr_char (*bzr_chars[this_char], subrs);
!           else if (ccc_chars[this_char])
!             output_ccc_char (*ccc_chars[this_char], this_char, subrs);
!           else
!             abort ();
!         }
!     }
  
!   if (output[metafont]) metafont_finish_output (bzr_name_list, chars);
!   if (output[pstype1]) pstype1_finish_output ();
!   if (output[pstype3]) pstype3_finish_output ();
!   if (output[text]) text_finish_output (postamble);
  
!   if (char_count % NCHARS_PER_LINE != 0)
!     REPORT ("\n");
  
!   return 0;
! }
! 
! /* Read the global information from the TFM file corresponding to
!    BZR_NAME (if it exists) into TFM_INFO.  Also read an encoding file
!    specified either by `encoding_name' or the codingscheme info from the
!    TFM file into ENCODING_INFO.  */
! 
! static void
! init_tfm_and_encoding_info (string bzr_name, tfm_global_info_type **tfm_info,
!                             encoding_info_type *encoding_info)
! {
!   /* Open the main TFM file if it exists.  */
!   string tfm_root = make_suffix (bzr_name, "tfm");
!   string tfm_name = find_tfm_filename (tfm_root);
  
!   if (tfm_name == NULL || !tfm_open_input_file (tfm_name))
!     {
!       *tfm_info = NULL;
!       if (encoding_name == NULL)
!         encoding_name = DEFAULT_ENCODING;
!     }
!   else
!     {
!       *tfm_info = XTALLOC1 (tfm_global_info_type);
  
!       /* Just get the TFM global info and then close the file again, as
!          we will open it again later for the characters.  */
!       **tfm_info = tfm_get_global_info ();
        tfm_close_input_file ();
+ 
+       /* If the user hasn't specified an encoding name, guess from the
+          TFM info.  */
+       if (encoding_name == NULL)
+         encoding_name
+           = coding_scheme_to_filename (TFM_CODING_SCHEME (**tfm_info));
      }
+ 
+   /* In any case, read the encoding file.  I don't think we actually
+      need this in all cases, but what the heck, it's no problem to read
+      the default one.  */
+   *encoding_info = read_encoding_file (encoding_name);
+ }
+ 
+ /* Read each BZR file in BZR_NAMES, merging all the characters.  We
+    scale all characters to the size of the first font, and oblique the
+    characters if `oblique_angle' is nonzero.  */
+ 
+ static bzr_char_type **
+ read_bzr_files (list_type bzr_names)
+ {
+   unsigned c, name;
+   bzr_char_type **bzr_chars = XTALLOC (MAX_CHARCODE + 1, bzr_char_type *);
    
!   /* Assume we'll find nothing.  */
!   for (c = 0; c <= MAX_CHARCODE; c++)
!     bzr_chars[c] = NULL;
! 
!   /* Read all the files, updating the array as we go.  */
!   for (name = 0; name < LIST_SIZE (bzr_names); name++)
      {
!       string *bzr_name = LIST_ELT (bzr_names, name);
!       
!       REPORT1 ("(%s", *bzr_name);
!       read_bzr_file (bzr_chars, *bzr_name);
!       REPORT (")\n");
      }
  
!   return bzr_chars;
! }
  
  
! /* If the BZR file BZR_NAME exists, read it and update BZR_CHARS.  We do
!    not overwrite existing BZR characters, since earlier files should
!    override later files.  (The first file is the main input file.)
!    Complain about missing input files, since the user specified all
!    these names explicitly.  We scale and oblique the characters we read
!    if desired.  */
  
! static void
! read_bzr_file (bzr_char_type *bzr_chars[], string passed_bzr_name)
! {
!   unsigned char_count = 0;
!   static real output_design_size = 0.0;
!   string bzr_name = make_suffix (passed_bzr_name, "bzr");
  
!   if (bzr_open_input_file (bzr_name))
!     {
!       bzr_char_type *file_char;
!       bzr_preamble_type pre = bzr_get_preamble ();
!       
!       /* Scale everything to the design size of the first font.  */
!       if (output_design_size == 0.0)
!         output_design_size = BZR_DESIGN_SIZE (pre);
  
!       while (file_char = bzr_get_next_char ())
          {
!           unsigned code = CHARCODE (*file_char);
!           
!           char_count++;
!           REPORT2 ("%c[%d]", char_count % NCHARS_PER_LINE ? ' ' : '\n', code);
!           
!           if (bzr_chars[code] == NULL)
!             {
!               real design_size_ratio
!                 = BZR_DESIGN_SIZE (pre) / output_design_size;
  
!               BZR_SHAPE (*file_char)
!                 = oblique_splines (BZR_SHAPE (*file_char));
!               scale_char (file_char, design_size_ratio);
!               
!               bzr_chars[code] = file_char;
!             }
!           else
!             free (file_char);
          }
  
!       bzr_close_input_file ();
      }
+   else
+     perror (bzr_name);
+ }
+ 
+ /* Output BZR_CHAR as a subroutine in whatever output formats the user
+    has requested.  Except that PostScript Type 3 and text output don't
+    do subroutines, so we just output the character straight.  */
  
! static void
! output_bzr_subr (bzr_char_type bzr_char)
! {
!   if (output[metafont])
!     metafont_output_bzr_subr (bzr_char);
!   
!   if (output[pstype1])
!     pstype1_output_bzr_subr (bzr_char);
!   
!   /* Don't need to do Type 3 or text, since all the subroutines will
!      also get output as characters.  */
! }
  
  
! /* Output CCC_CHAR as a subroutine.  We do nothing for the Type 3
!    output format here, since it doesn't deal with subroutines.  */
! 
! static void
! output_ccc_subr (ccc_type ccc_char, charcode_type code, char_type *subrs[])
! {
!   if (output[metafont])
!     metafont_output_ccc_subr (ccc_char, code, subrs);
!   
!   if (output[pstype1])
!     pstype1_output_ccc_subr (ccc_char, code, subrs);
!   
!   /* Don't need to do Type 3 or text, since all the subroutines will
!      also get output as characters.  */
! }
! 
! 
! /* Output BZR_CHAR as a character (as opposed to a subroutine).  */
! 
! static void
! output_bzr_char (bzr_char_type bzr_char, char_type *subrs[])
! {
!   if (output[metafont])
!     metafont_output_bzr_char (bzr_char, subrs);
!   
!   if (output[pstype1])
!     pstype1_output_bzr_char (bzr_char, subrs);
!   
!   if (output[pstype3])
!     pstype3_output_char (bzr_char);
!   
!   if (output[text])
!     text_output_bzr_char (bzr_char);
! }
! 
! 
! /* Output CCC_CHAR as a character (as opposed to a subroutine).  Again,
!    we do nothing for Type 3 here.  */
! 
! static void
! output_ccc_char (ccc_type ccc_char, charcode_type code, char_type *subrs[])
! {
!   if (output[metafont])
!     metafont_output_ccc_char (ccc_char, code, subrs);
!   
!   if (output[pstype1])
!     pstype1_output_ccc_char (ccc_char, code, subrs);
!   
!   /* if (output[pstype3])
!        do nothing; */
!   
!   if (output[text])
!     text_output_ccc_char (ccc_char);
! }
! 
! /* Count the number of characters (between `starting_char' and
!    `ending_char') that we will output, not including subroutines.  */
! 
! static unsigned
! count_non_subr_chars (char_type *subrs[], bzr_char_type *bzr_chars[],
!                       ccc_type *ccc_chars[])
! {
!   unsigned this_char;
!   unsigned char_count = 0;
!   
!   for (this_char = starting_char; this_char <= ending_char; this_char++)
!     char_count += bzr_chars[this_char] || ccc_chars[this_char];
! 
!   return char_count;
  }
  
***************
*** 303,308 ****
  "concat <bzr_name_1>,<bzr_name_2>,...: concatenate the main input bzr file with
    the given <bzr_name>s; if a character code exists in more than one
!   bzr file, it's the first occurrence that counts.  You must provide
!   corresponding TFM files <bzr_name_1>.tfm, <bzr_name_2>.tfm, ...
  ccc-file <filename>: read the CCC file <filename> (if <filename> has a
    suffix) or <filename>.ccc (if it doesn't).  Default is <font_name>.
--- 464,468 ----
  "concat <bzr_name_1>,<bzr_name_2>,...: concatenate the main input bzr file with
    the given <bzr_name>s; if a character code exists in more than one
!   bzr file, it's the first occurrence that counts.
  ccc-file <filename>: read the CCC file <filename> (if <filename> has a
    suffix) or <filename>.ccc (if it doesn't).  Default is <font_name>.
***************
*** 309,315 ****
  encoding <filename>: specify the encoding file; if <filename> has no
    suffix, use <filename>.enc, otherwise just <filename>.  Default is to
!   try to guess the encoding from the coding_scheme string in the TFM file.
! fontname <string>: the full name of the output font, e.g.,
!   `Times-BoldItalic'; default is the <font_name>.
  help: print this message.
  metafont: translate the font to a Metafont program.
--- 469,474 ----
  encoding <filename>: specify the encoding file; if <filename> has no
    suffix, use <filename>.enc, otherwise just <filename>.  Default is to
!   try to guess the encoding from the coding_scheme string in the TFM
!   file if exists, else to use the default " DEFAULT_ENCODING ".
  help: print this message.
  metafont: translate the font to a Metafont program.
***************
*** 322,331 ****
    `metafont', `pstype1' and `pstype3' options are give.  Default is
    <font_name> with a trailing number removed.
! pstype1: translate the font to (unencrypted) PostScript type 1 font format.
! pstype3: translate the font to PostScript type 3 font format.
  range <char1>-<char2>: only work on characters between <char1> and
    <char2> inclusive.
  text: translate the font to human-readable text; write to stdout.
! verbose: print brief progress reports on stderr.
  version: print the version number of this program.
  "
--- 481,495 ----
    `metafont', `pstype1' and `pstype3' options are give.  Default is
    <font_name> with a trailing number removed.
! ps-font-info <name>:<value>,...: assign each <value> to the
!   corresponding <name> when outputting a PostScript font.  Possible
!   <name>s: FontName, FamilyName, Weight, ItalicAngle, isFixedPitch,
!   UnderlinePosition, UnderlineThickness, UniqueID, version.  Case is
!   significant.  See the manual for more details.
! pstype1: translate the font to (unencrypted) PostScript Type 1 font format.
! pstype3: translate the font to PostScript Type 3 font format.
  range <char1>-<char2>: only work on characters between <char1> and
    <char2> inclusive.
  text: translate the font to human-readable text; write to stdout.
! verbose: print brief progress reports.
  version: print the version number of this program.
  "
***************
*** 350,353 ****
--- 514,518 ----
          { "oblique-angle",	1, 0, 0 },
          { "output-file",	1, 0, 0 },
+         { "ps-font-info",	1, 0, 0 },
          { "pstype1",		0, (int *) &output[pstype1], 1 },
          { "pstype3",		0, (int *) &output[pstype3], 1 },
***************
*** 392,398 ****
--- 557,569 ----
          output_name = optarg;
  
+       else if (ARGUMENT_IS ("ps-font-info"))
+         ps_global_info = optarg;
+         
        else if (ARGUMENT_IS ("range"))
          GET_RANGE (optarg, starting_char, ending_char);
          
+       else if (ARGUMENT_IS ("text"))
+         report_file = stderr;
+ 
        else if (ARGUMENT_IS ("version"))
          printf ("%s.\n", version_string);
***************
*** 403,408 ****
    FINISH_COMMAND_LINE ();
  }
- 
- 
  
  /* The string S is a list of font names, separated by commas.  We append
--- 574,577 ----
diff -Nrc2 fontutils-0.5/bzrto/main.h fontutils-0.6/bzrto/main.h
*** fontutils-0.5/bzrto/main.h	Mon Aug 17 09:29:43 1992
--- fontutils-0.6/bzrto/main.h	Sun Oct 11 17:35:28 1992
***************
*** 21,27 ****
--- 21,36 ----
  
  #include "encoding.h"
+ #include "tfm.h"
  
  /* The encoding vector information for the input font.  */
  extern encoding_info_type encoding_info;
+ 
+ /* Which characters to process.  */
+ extern charcode_type starting_char;
+ extern charcode_type ending_char;
+ 
+ /* The global information from the main TFM font, or NULL if no such
+    font could be read.  */
+ extern tfm_global_info_type *tfm_global_info;
  
  #endif /* not MAIN_H */
diff -Nrc2 fontutils-0.5/bzrto/metafont.c fontutils-0.6/bzrto/metafont.c
*** fontutils-0.5/bzrto/metafont.c	Thu Sep  3 07:36:55 1992
--- fontutils-0.6/bzrto/metafont.c	Mon Oct 19 16:39:01 1992
***************
*** 20,24 ****
  
  #include "bzr.h"
! #include "char.h"
  #include "font.h"
  #include "spline.h"
--- 20,25 ----
  
  #include "bzr.h"
! #include "encoding.h"
! #include "filename.h"
  #include "font.h"
  #include "spline.h"
***************
*** 26,30 ****
--- 27,33 ----
  #include "vector.h"
  
+ #include "char.h"
  #include "input-ccc.h"
+ #include "main.h"
  #include "metafont.h"
  
***************
*** 37,56 ****
  
  
- /* Whether or not a particular character has been written.  */
- static boolean mf_char_output_p[MAX_CHARCODE + 1];
- 
- 
  /* Macros for output to `mf_file'.  */
! #define OUT1(str, arg)		    fprintf (mf_file, str, arg)
! #define OUT2(str, arg1, arg2)	    fprintf (mf_file, str, arg1, arg2)
! #define OUT3(str, arg1, arg2, arg3) fprintf (mf_file, str, arg1, arg2, arg3)
! #define OUT4(str, arg1, arg2, arg3, arg4) \
!                                  fprintf (mf_file, str, arg1, arg2, arg3, arg4)
! 
! #define OUT_LINE(str)		     OUT1 ("%s\n", str)
! #define OUT_STRING(str)		     OUT1 ("%s", str)
! #define OUT_STATEMENT(str)	     OUT1 ("%s;\n", str)
! #define OUT_PT_SHARP_ASSIGNMENT(lhs, rhs)  OUT2 ("%s := %.3fpt#;\n", lhs, rhs)
! #define OUT_U_ASSIGNMENT(lhs, rhs)  OUT2 ("%s := %.3fu;\n", lhs, rhs)
  
  #define OUT_ZASSIGNMENT(lhs, c, l, s, pt)				\
--- 40,52 ----
  
  
  /* Macros for output to `mf_file'.  */
! #define OUT1(str, a)		  fprintf (mf_file, str, a)
! #define OUT2(str, a1, a2)	  fprintf (mf_file, str, a1, a2)
! #define OUT3(str, a1, a2, a3)	  fprintf (mf_file, str, a1, a2, a3)
! #define OUT4(str, a1, a2, a3, a4) fprintf (mf_file, str, a1, a2, a3, a4)
! 
! #define OUT_LINE(str)      OUT1 ("%s\n", str)
! #define OUT_STRING(str)    OUT1 ("%s", str)
! #define OUT_STATEMENT(str) OUT1 ("%s;\n", str)
  
  #define OUT_ZASSIGNMENT(lhs, c, l, s, pt)				\
***************
*** 62,66 ****
  
  #define OUT_POINT(p) OUT2 ("(%.3fu,%.3fu)", p.x, p.y)
- #define OUT_CHAR_SUBR(c) OUT1 (INDENT "%s;\n", charcode_to_subr_name (c))
  
  /* How to indent.  */
--- 58,61 ----
***************
*** 68,75 ****
  
  
  static void out_bb_char (real_bounding_box_type *,
                           real_coordinate_type *, bzr_char_type);
  static void out_move (real_coordinate_type *, real, real, boolean);
! static void output_ligtable (char_type **);
  
  /* Start things off.  We want to write to a Metafont file, e.g.,
--- 63,77 ----
  
  
+ static string charcode_to_subr_name (charcode_type);
  static void out_bb_char (real_bounding_box_type *,
                           real_coordinate_type *, bzr_char_type);
  static void out_move (real_coordinate_type *, real, real, boolean);
! static void output_bzr_body (bzr_char_type);
! static real_bounding_box_type output_ccc_body (ccc_type, char_type *[]);
! static void output_char_title (charcode_type);
! static void output_ligtable (list_type, char_type **);
! static void output_subr_start (charcode_type code);
! static tfm_char_type **read_tfm_files (list_type);
! static void read_tfm_file (tfm_char_type *[], string);
  
  /* Start things off.  We want to write to a Metafont file, e.g.,
***************
*** 78,82 ****
  void
  metafont_start_output (string output_name, bzr_preamble_type pre, 
! 		       tfm_global_info_type info)
  {
    unsigned this_param;
--- 80,84 ----
  void
  metafont_start_output (string output_name, bzr_preamble_type pre, 
! 		       tfm_global_info_type *info)
  {
    unsigned this_param;
***************
*** 94,98 ****
    /* Output the size that our original data is based on.  The font can
       be generated at sizes different than this.  */
!   OUT_PT_SHARP_ASSIGNMENT ("true_design_size#", BZR_DESIGN_SIZE (pre));
    
    /* The real work is done in an auxiliary file.  */
--- 96,100 ----
    /* Output the size that our original data is based on.  The font can
       be generated at sizes different than this.  */
!   OUT1 ("true_design_size# := %.3fpt#;\n", BZR_DESIGN_SIZE (pre));
    
    /* The real work is done in an auxiliary file.  */
***************
*** 99,118 ****
    OUT_STATEMENT ("input bzrsetup");
  
!   /* Output the fontwide information given in INFO.  */
!   OUT1 ("font_coding_scheme := \"%s\";\n", TFM_CODING_SCHEME (info));
    OUT1 ("font_identifier := \"%s\";\n", output_name);
  
!   for (this_param = 1; this_param <= TFM_FONTDIMEN_COUNT (info);
!        this_param++)
!     OUT2 ("fontdimen %u: %.3fpt# * u#;\n", this_param,
!           TFM_FONTDIMEN (info, this_param)); 
  }
  
! /* Metafont doesn't allow numerals in identifiers, so we can't just use
!    the decimal character code to distinguish the subroutines.  Instead, we
!    use a base-16 representation where zero is `a', one is `b', ...,
     fifteen is `o'.  */
  
! #define SUBR_NAME_PREFIX  "charsubr_"
  
  static string
--- 101,179 ----
    OUT_STATEMENT ("input bzrsetup");
  
!   /* Output the fontwide information given in the global `encoding_info'.  */
!   OUT1 ("font_coding_scheme := \"%s\";\n",
!         ENCODING_SCHEME_NAME (encoding_info));
    OUT1 ("font_identifier := \"%s\";\n", output_name);
  
!   if (info)
!     for (this_param = 1; this_param <= TFM_FONTDIMEN_COUNT (*info);
!          this_param++)
!       if (TFM_FONTDIMEN (*info, this_param) != 0.0)
!         OUT2 ("fontdimen %u: %.3fpt# * u#;\n", this_param,
!               TFM_FONTDIMEN (*info, this_param)); 
! }
! 
! 
! /* Used to output the character names as ``titles'', which Metafont
!    displays and puts on proofsheets in some circumstances.  */
! 
! static void
! output_char_title (charcode_type code)
! {
!   string title = ENCODING_CHAR_NAME (encoding_info, code);
!   
!   if (title == NULL)
!     title = concat ("character #", utoa (code));
!     
!   OUT1 (INDENT "\"%s\";\n", title);
  }
  
! /* Output of subroutines.  The main part of the subroutine is done in
!    the same way as a character, it's just the adminstrative junk that's
!    different.  We have to remember some information in case this
!    subroutine later gets output as a character.  I'm not entirely sure
!    that we need it in all cases, but it seems cleaner to just always
!    save it.  */
! 
! void
! metafont_output_bzr_subr (bzr_char_type c)
! {
!   output_subr_start (CHARCODE (c));
!   output_bzr_body (c);
!   OUT_STATEMENT ("enddef");
! }
! 
! 
! void
! metafont_output_ccc_subr (ccc_type c, charcode_type code, char_type *subrs[])
! {
!   output_subr_start (code);
!   output_ccc_body (c, subrs);
!   OUT_STATEMENT ("enddef");
! }
! 
! 
! /* Output the common beginning of a subroutine.  The character name is a
!    Metafont ``title'' which gets output on proofsheets and sometimes on
!    the terminal.  */
! 
! static void
! output_subr_start (charcode_type code)
! {
!   OUT1 ("def %s = \n", charcode_to_subr_name (code));
!   output_char_title (code);
! }
! 
! 
! /* When we do need to output a subroutine, however, we have to choose a
!    name for it.  Since Metafont doesn't allow numerals in identifiers,
!    so we can't just use the decimal character code to distinguish the
!    subroutines.  Instead, we use the character name from the global
!    `encoding_info', or, if the encoding name is not strictly alphabetic
!    (e.g., `.notdef') a base-16 representation where zero is `a', ...,
     fifteen is `o'.  */
  
! #define OUT_CHAR_SUBR(c) OUT1 (INDENT "%s;\n", charcode_to_subr_name (c))
! #define SUBR_NAME_PREFIX "bzr_subr_"
  
  static string
***************
*** 119,128 ****
  charcode_to_subr_name (charcode_type code)
  {
!   unsigned high = code >> 4;
!   unsigned low = code - (high << 4);
    
!   char alpha[3] = { high + 'a', low + 'a', 0 };
    
!   return concat (SUBR_NAME_PREFIX, alpha);
  }
  
--- 180,224 ----
  charcode_to_subr_name (charcode_type code)
  {
!   string subr_name;
!   string name = ENCODING_CHAR_NAME (encoding_info, code);
! 
!   if (strspn (name, "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ")
!       != strlen (name))
!     {
!       unsigned high = code >> 4;
!       unsigned low = code - (high << 4);
!       char alpha[3] = { high + 'a', low + 'a', 0 };
! 
!       subr_name = concat (SUBR_NAME_PREFIX, alpha);
!     }
!   else
!     subr_name = concat (SUBR_NAME_PREFIX, name);
!   
!   return subr_name;
! }
! 
! /* Output of characters.  Eventually we should do something about
!    italic corrections.  Also, it might be better to use a symbolic name
!    for the character code instead of hardwiring an integer constant.
!    Then different encodings could be selected at Metafont-time.  If the
!    character is already as a subroutine, just output a call.  */
! 
! void
! metafont_output_bzr_char (bzr_char_type c, char_type *subrs[])
! {
!   unsigned code = CHARCODE (c);
!   
!   OUT4 ("\nbeginchar (%d, %.3fu#, %.3fu#, %.3fu#);\n", 
!         code, CHAR_SET_WIDTH (c), CHAR_MAX_ROW (c), CHAR_DEPTH (c));
    
!   if (subrs[code])
!     OUT_CHAR_SUBR (code);
!   else
!     {
!       output_char_title (code);
!       output_bzr_body (c);
!     }
    
!   OUT_STATEMENT ("endchar");
  }
  
***************
*** 129,140 ****
  
  void
! metafont_output_char_subr (bzr_char_type c)
  {
    unsigned this_list;
-   boolean was_output = false;
-   spline_list_array_type shape = BZR_SHAPE (c);
    charcode_type code = CHARCODE (c);
! 
!   OUT1 ("def %s = \n", charcode_to_subr_name (code));
  
    /* Go through the list of splines once, assigning the control points
--- 225,257 ----
  
  void
! metafont_output_ccc_char (ccc_type c, charcode_type code, char_type *subrs[])
! {
!   real_bounding_box_type bb;
!   
!   if (subrs[code])
!     WARNING ("Sorry, CCC characters can't be subroutines yet");
!   else
!     {
!       OUT1 ("\nbegin_no_dimen_char (%d);\n", code);
! 
!       output_char_title (code);
!       bb = output_ccc_body (c, subrs);
! 
!       /* Set this character's dimensions: width, height, depth.  */
!       OUT3 (INDENT "set_char_dimens (%.3fu#, %.3fu#, %.3fu#);\n",
!             BB_WIDTH (bb), MAX_ROW (bb), -MIN_ROW (bb));
!       OUT_STATEMENT ("end_no_dimen_char");
!     }
! }
! 
! /* Output the shape in the BZR character C.  */
! 
! static void
! output_bzr_body (bzr_char_type c)
  {
    unsigned this_list;
    charcode_type code = CHARCODE (c);
!   spline_list_array_type shape = BZR_SHAPE (c);
!   boolean was_output = false;
  
    /* Go through the list of splines once, assigning the control points
***************
*** 232,264 ****
          OUT3 (INDENT INDENT "%u\\%u\\%u,\n", code, this_list, this_spline);
      }
    if (was_output)
      OUT_STRING (");\n");
-   
-   OUT_STATEMENT ("enddef");
  }
- 
- /* Output a character which only uses one subroutine.  */
  
- void
- metafont_output_bzr_char (char_type c)
- {
-   bzr_char_type bzr_char = *CHAR_BZR_INFO (c);
-   tfm_char_type tfm_char = *CHAR_TFM_INFO (c);
-   charcode_type code = CHARCODE (bzr_char);
-   
-   fprintf (mf_file, "\nbeginchar (%d, %.3fu#, %.3fu#, %.3fu#);\n", 
-            code, CHAR_SET_WIDTH (bzr_char), BZR_CHAR_MAX_ROW (bzr_char), 
-            CHAR_DEPTH (bzr_char));
  
!   if (TFM_ITALIC_CORRECTION (tfm_char) != 0)
!     OUT1 (INDENT "italcorr %.3fpt#;\n", TFM_ITALIC_CORRECTION (tfm_char));
!     
!   OUT_CHAR_SUBR (code);
!   OUT_STATEMENT ("endchar");
!   mf_char_output_p[code] = true;
! }
! 
! /* Output a character which might use more than one subroutine.
!    Changes the TFM information for that character.  */
  
  #define OUT_HMOVE(h, a) out_move (&current, h, 0.0, a)
--- 349,360 ----
          OUT3 (INDENT INDENT "%u\\%u\\%u,\n", code, this_list, this_spline);
      }
+ 
    if (was_output)
      OUT_STRING (");\n");
  }
  
  
! /* Output the definition of CCC character CCC_CHAR.  All the subroutines
!    must be defined in SUBRS.  */
  
  #define OUT_HMOVE(h, a) out_move (&current, h, 0.0, a)
***************
*** 265,271 ****
  #define OUT_VMOVE(v, a) out_move (&current, 0.0, v, a)
  
! void
! metafont_output_ccc_char (ccc_type ccc_char, char_type **chars,
!                           charcode_type ccc_code, real bzr_designsize)
  {
    unsigned this_cmd;
--- 361,366 ----
  #define OUT_VMOVE(v, a) out_move (&current, 0.0, v, a)
  
! static real_bounding_box_type
! output_ccc_body (ccc_type ccc_char, char_type *subrs[])
  {
    unsigned this_cmd;
***************
*** 274,279 ****
      = (real_bounding_box_type) { FLT_MAX, FLT_MIN, FLT_MAX, FLT_MIN };
  
-   fprintf (mf_file, "\nbegin_no_dimen_char (%d);\n", ccc_code);
- 
    for (this_cmd = 0; this_cmd < LIST_SIZE (ccc_char); this_cmd++)
      { 
--- 369,372 ----
***************
*** 284,297 ****
          case TR_SETCHAR:
            {
!             bzr_char_type bzr_char
!               = *CHAR_BZR_INFO (*chars[CCC_CHARCODE (cmd)]);
! 
!             update_real_bounding_box (&bb, current);
  
!             OUT_HMOVE (CHAR_LSB (bzr_char), false);
!             out_bb_char (&bb, &current, bzr_char);
!             OUT_HMOVE (CHAR_RSB (bzr_char), false);
! 
!             update_real_bounding_box (&bb, current);
            }
            break;
--- 377,401 ----
          case TR_SETCHAR:
            {
!             char_type subr = *subrs[CCC_CHARCODE (cmd)];
  
!             if (CHAR_CLASS (subr) == bzr_char_class)
!               {
!                 bzr_char_type bzr_char = *CHAR_BZR (subr);
!                 
!                 update_real_bounding_box (&bb, current);
!                 OUT_HMOVE (CHAR_LSB (bzr_char), false);
! 
!                 out_bb_char (&bb, &current, bzr_char);
! 
!                 OUT_HMOVE (CHAR_RSB (bzr_char), false);
!                 update_real_bounding_box (&bb, current);
!               }
!             else
!               /* We haven't implemented this yet since it doesn't seem
!                  all that necessary at the moment, and it would require
!                  figuring out a bounding box and possibly side bearings
!                  for CCC character -- certainly not impossible, but not
!                  trivial, either.  */
!               WARNING ("Sorry, I can't `setchar' a CCC char yet");
            }
            break;
***************
*** 298,303 ****
  
          case TR_SETCHARBB:
!           out_bb_char (&bb, &current,
!                        *CHAR_BZR_INFO (*chars[CCC_CHARCODE (cmd)]));
            break;
  
--- 402,413 ----
  
          case TR_SETCHARBB:
!           {
!             char_type subr = *subrs[CCC_CHARCODE (cmd)];
! 
!             if (CHAR_CLASS (subr) == bzr_char_class)
!               out_bb_char (&bb, &current, *CHAR_BZR (subr));
!             else
!               WARNING ("Sorry, I can't `setcharbb' a CCC char yet");
!           }
            break;
  
***************
*** 311,328 ****
  
          default:
!           FATAL2 ("Bad command %d in CCC character %d", CCC_OPCODE (cmd),
!                   ccc_code);
!           break;
  	}
      }
!    
!    /* Set this character's dimensions: width, height, depth.  */
!    
!   OUT3 (INDENT "set_char_dimens (%.3fu#, %.3fu#, %.3fu#);\n",
!         BB_WIDTH (bb), MAX_ROW (bb), -MIN_ROW (bb));
!   OUT_STATEMENT ("end_no_dimen_char");
!   mf_char_output_p[ccc_code] = true;
! 
!   char_make_tfm (chars, ccc_code, bb);
  }
  
--- 421,429 ----
  
          default:
!           FATAL1 ("Bad command %d in CCC character", CCC_OPCODE (cmd));
  	}
      }
!   
!   return bb;
  }
  
***************
*** 356,360 ****
  {
    /* Update BB with the current point.  */
!   update_real_bounding_box (bb, VOFFSET_POINT (BZR_CHAR_MIN_ROW (bzr_char)));
  
    /* Output the call to the character.  */
--- 457,461 ----
  {
    /* Update BB with the current point.  */
!   update_real_bounding_box (bb, VOFFSET_POINT (CHAR_MIN_ROW (bzr_char)));
  
    /* Output the call to the character.  */
***************
*** 362,378 ****
    
    /* Move by the width of the shape.  */
!   out_move (current, BZR_CHAR_BB_WIDTH (bzr_char), 0, false);
  
    /* Update the BB again with the new current point.  */
!   update_real_bounding_box (bb, VOFFSET_POINT (BZR_CHAR_MAX_ROW (bzr_char)));
  }
  
! /* We use `bye' to finish off the Metafont output, instead of the
!    primitive `end', since that makes adding cleanup operations simpler.  */
  
  void
! metafont_finish_output (char_type **chars)
  {
!   output_ligtable (chars);
    
    OUT_LINE ("\nbye.");
--- 463,480 ----
    
    /* Move by the width of the shape.  */
!   out_move (current, BB_WIDTH (CHAR_BB (bzr_char)), 0, false);
  
    /* Update the BB again with the new current point.  */
!   update_real_bounding_box (bb, VOFFSET_POINT (CHAR_MAX_ROW (bzr_char)));
  }
  
! /* We use a macro `bye' to finish off the Metafont output, instead of the
!    primitive `end', for maximal flexibility.  (Although in practice it
!    makes no difference, since `end' can be redefined just like `bye'.)  */
  
  void
! metafont_finish_output (list_type bzr_names, char_type **chars)
  {
!   output_ligtable (bzr_names, chars);
    
    OUT_LINE ("\nbye.");
***************
*** 381,392 ****
  
  
! /* True if didn't get output to `mf_file', or if the character
!    doesn't exist in the TFM file.  (The latter should only occur if the
!    TFM file being read doesn't match the bitmap file from which we
!    generated the BZR file .)  */
! 
! #define NO_CHAR_P(code) 						\
!   (!mf_char_output_p[code] 						\
!    || !TFM_CHAR_EXISTS (*(CHAR_TFM_INFO (*(chars[code])))))
  
  /* Start or continue the ligtable for the character CODE.  */
--- 483,489 ----
  
  
! /* True if the character CODE exists in the array `tfm_chars'.  */
! 
! #define HAVE_CHAR_P(code) (tfm_chars[code] != NULL)
  
  /* Start or continue the ligtable for the character CODE.  */
***************
*** 405,424 ****
  
  static void
! output_ligtable (char_type **chars)
  {
    unsigned code;
    
!   for (code = 0; code <= MAX_CHARCODE; code++)
      {
        list_type kern_list, ligature_list;
        unsigned this_kern, this_lig;
!       tfm_char_type *c = CHAR_TFM_INFO (*(chars[code]));
        boolean output_something = false;
        
!       /* If this character didn't get output, or if we don't have TFM
!          information for it, don't do anything.  */
!       if (NO_CHAR_P (code))
          continue;
!       
        /* Output the kerns.  */
        kern_list = c->kern;
--- 502,523 ----
  
  static void
! output_ligtable (list_type bzr_names, char_type **chars)
  {
    unsigned code;
+   tfm_char_type **tfm_chars = read_tfm_files (bzr_names);
    
!   for (code = starting_char; code <= ending_char; code++)
      {
        list_type kern_list, ligature_list;
        unsigned this_kern, this_lig;
!       tfm_char_type *c;
        boolean output_something = false;
        
!       /* If we don't have TFM information for CODE, don't do anything.  */
!       if (!HAVE_CHAR_P (code))
          continue;
! 
!       c = tfm_chars[code];
! 
        /* Output the kerns.  */
        kern_list = c->kern;
***************
*** 427,435 ****
            tfm_kern_type *kern = LIST_ELT (kern_list, this_kern);
  
!           if (NO_CHAR_P (kern->character))
!             continue;
! 
!           LIGTABLE_ENTRY (code);
!           OUT2 ("hex\"%x\" kern %.4fpt#", kern->character, kern->kern);
          }
        
--- 526,534 ----
            tfm_kern_type *kern = LIST_ELT (kern_list, this_kern);
  
!           if (HAVE_CHAR_P (kern->character))
!             {
!               LIGTABLE_ENTRY (code);
!               OUT2 ("hex\"%x\" kern %.3fpt#", kern->character, kern->kern);
!             }
          }
        
***************
*** 440,448 ****
            tfm_ligature_type *lig = LIST_ELT (ligature_list, this_lig);
  
!           if (NO_CHAR_P (lig->character) || NO_CHAR_P (lig->ligature))
!             continue;
! 
! 	  LIGTABLE_ENTRY (code);
!           OUT2 ("hex\"%x\" =: hex\"%x\"", lig->character, lig->ligature);
          }
  
--- 539,547 ----
            tfm_ligature_type *lig = LIST_ELT (ligature_list, this_lig);
  
!           if (HAVE_CHAR_P (lig->character) && HAVE_CHAR_P (lig->ligature))
!           {
!   	    LIGTABLE_ENTRY (code);
!             OUT2 ("hex\"%x\" =: hex\"%x\"", lig->character, lig->ligature);
!           }
          }
  
***************
*** 449,452 ****
--- 548,611 ----
        if (output_something)
          OUT_LINE (";");
+     }
+ }
+ 
+ 
+ /* We want to retain kerning and ligature information from the original
+    TFM files, if such exist.  Our goal here is to read the TFM file
+    corresponding to each name in BZR_NAMES and return the union of all
+    the characters found as an array of `tfm_char_type's.  We do not
+    complain about nonexistent TFM files.  */
+ 
+ static tfm_char_type **
+ read_tfm_files (list_type bzr_names)
+ {
+   unsigned c, name;
+   tfm_char_type **tfm_chars = XTALLOC (MAX_CHARCODE + 1, tfm_char_type *);
+   
+   /* Assume we'll find nothing.  */
+   for (c = 0; c <= MAX_CHARCODE; c++)
+     tfm_chars[c] = NULL;
+ 
+   /* Read all the files, updating the array as we go.  */
+   for (name = 0; name < LIST_SIZE (bzr_names); name++)
+     {
+       string *bzr_name = LIST_ELT (bzr_names, name);
+       
+       read_tfm_file (tfm_chars, *bzr_name);
+     }
+ 
+   return tfm_chars;
+ }
+ 
+ 
+ /* If the TFM file corresponding to BZR_NAME exists, read it and update
+    TFM_CHARS.  We do not overwrite existing TFM characters, since
+    earlier files should override later files.  (The first file is the
+    main input file.)  Arguably multiple characters should be a warning,
+    but I'm not sure.  */
+ 
+ static void
+ read_tfm_file (tfm_char_type *tfm_chars[], string bzr_name)
+ {
+   string tfm_root = make_suffix (bzr_name, "tfm");
+   string tfm_name = find_tfm_filename (tfm_root);
+ 
+   if (tfm_name != NULL && tfm_open_input_file (tfm_name))
+     {
+       unsigned code;
+       tfm_char_type *file_chars = tfm_get_chars ();
+       
+       for (code = 0; code <= MAX_CHARCODE; code++)
+         {
+           if (tfm_chars[code] == NULL && TFM_CHAR_EXISTS (file_chars[code]))
+             {
+               tfm_chars[code] = XTALLOC1 (tfm_char_type);
+               *tfm_chars[code] = file_chars[code];
+             }
+         }
+ 
+       free (file_chars);
+       tfm_close_input_file ();
      }
  }
diff -Nrc2 fontutils-0.5/bzrto/metafont.h fontutils-0.6/bzrto/metafont.h
*** fontutils-0.5/bzrto/metafont.h	Mon Aug 17 15:18:14 1992
--- fontutils-0.6/bzrto/metafont.h	Mon Oct 19 16:39:01 1992
***************
*** 28,43 ****
  /* This is called first.  */
  extern void metafont_start_output (string output_name, bzr_preamble_type, 
! 				   tfm_global_info_type);
  
! /* Then this is called for each character.  */
! extern void metafont_output_char_subr (bzr_char_type);
  
  /* Then we call one or the other of these.  */
! extern void metafont_output_bzr_char (char_type);
! extern void metafont_output_ccc_char (ccc_type, char_type **,
! 				      charcode_type, real);
  
  /* And finally this is called at the end.  */
! extern void metafont_finish_output (char_type **);
  
  #endif /* not METAFONT_H */
--- 28,43 ----
  /* This is called first.  */
  extern void metafont_start_output (string output_name, bzr_preamble_type, 
! 				   tfm_global_info_type *);
  
! /* Then these are called for characters needed as subroutines.  */
! extern void metafont_output_bzr_subr (bzr_char_type);
! extern void metafont_output_ccc_subr (ccc_type, charcode_type, char_type *[]);
  
  /* Then we call one or the other of these.  */
! extern void metafont_output_bzr_char (bzr_char_type, char_type *[]);
! extern void metafont_output_ccc_char (ccc_type, charcode_type, char_type *[]);
  
  /* And finally this is called at the end.  */
! extern void metafont_finish_output (list_type, char_type **);
  
  #endif /* not METAFONT_H */
diff -Nrc2 fontutils-0.5/bzrto/pstype1.c fontutils-0.6/bzrto/pstype1.c
*** fontutils-0.5/bzrto/pstype1.c	Mon Aug 31 15:43:04 1992
--- fontutils-0.6/bzrto/pstype1.c	Mon Oct 19 17:15:36 1992
***************
*** 23,29 ****
  #include "bzr.h"
  #include "char.h"
  #include "hexify.h"
  #include "spline.h"
- #include "tfm.h"
  #include "varstring.h"
  #include "vector.h"
--- 23,29 ----
  #include "bzr.h"
  #include "char.h"
+ #include "encoding.h"
  #include "hexify.h"
  #include "spline.h"
  #include "varstring.h"
  #include "vector.h"
***************
*** 44,53 ****
  static real em_factor;
  
! /* The interword space from the TFM file, in points.  */
! static real tfm_space;
  
! /* The UniqueID from the font info, or zero.  */
! static unsigned unique_id;
  
  
  /* This should be used for outputting a string S on a line by itself.  */
--- 44,67 ----
  static real em_factor;
  
! /* The interword space, in points.  */
! static real interword_space;
  
! /* Whether or not a particular character has been written.  We depend on
!    this being initialized to false by virtue of its storage class.  */
! static boolean char_output_p[ENCODING_VECTOR_SIZE];
! 
! /* For each character code, tells the corresponding subroutine number;
!    assigned by `output_subr_start'.  */
! static unsigned subr_number[MAX_CHARCODE + 1];
  
+ /* As we read a character, we encode each command in the Type 1 scheme
+    and stick the result into a buffer.  (Because we need to output the
+    length of the entire charstring before we output the charstring
+    itself, we can't output as we go.)  */
+ static variable_string charstring_buffer;
+ 
+ /* Before encrypting, fill this and prepend onto above.  */
+ static variable_string pre_charstring_buffer;
+ 
  
  /* This should be used for outputting a string S on a line by itself.  */
***************
*** 64,99 ****
  #define OUT4(s, e1, e2, e3, e4)						\
    do { fprintf (ps_file, s, e1, e2, e3, e4); } while (0)
! 
  /* Type 1 opcodes.  */
  typedef unsigned char type1_opcode;
  
! #define T1_CALLSUBR		10
! #define T1_CLOSEPATH		9
! #define T1_ENDCHAR		14
! #define T1_HLINETO		6
! #define T1_HMOVETO		22
! #define T1_HSBW			13
! #define T1_HVCURVETO		31
! #define T1_RETURN		11
! #define T1_RLINETO		5
! #define T1_RMOVETO		21
! #define T1_RRCURVETO		8
  #define T1_VHCURVETO	30
! #define T1_VLINETO	7
! #define T1_VMOVETO	4
! 
! #define PUT_END "|"
! #define DEF_END "|-"
! 
! /* The first three positions in the Subrs array are reserved.  */
! #define SUBRS_OFFSET 4
! #define CHARCODE_TO_SUBRS_INDEX(c) ((c) + SUBRS_OFFSET)
  
! #define OUT_CHAR_SUBR(c) 						\
!  do {									\
!       absolute_cs_number (CHARCODE_TO_SUBRS_INDEX (c), &charstring_buffer);\
!       cs_byte (T1_CALLSUBR, &charstring_buffer);			\
!     } while (0)
  
  static void begin_char (string);
  static void end_char (real, real);
--- 78,105 ----
  #define OUT4(s, e1, e2, e3, e4)						\
    do { fprintf (ps_file, s, e1, e2, e3, e4); } while (0)
! 
! 
  /* Type 1 opcodes.  */
  typedef unsigned char type1_opcode;
  
! #define T1_CALLSUBR	10
! #define T1_CLOSEPATH	 9
! #define T1_ENDCHAR	14
! #define T1_HLINETO	 6
! #define T1_HMOVETO	22
! #define T1_HSBW		13
! #define T1_HVCURVETO	31
! #define T1_RETURN	11
! #define T1_RLINETO	 5
! #define T1_RMOVETO	21
! #define T1_RRCURVETO	 8
  #define T1_VHCURVETO	30
! #define T1_VLINETO	 7
! #define T1_VMOVETO	 4
  
! #define READONLY_PUT "|"
! #define READONLY_DEF "|-"
  
+ static void absolute_cs_number (int, variable_string *);
  static void begin_char (string);
  static void end_char (real, real);
***************
*** 101,108 ****
  static variable_string cs_encrypt (variable_string);
  static void cs_number (real, variable_string *);
- static void absolute_cs_number (int, variable_string *);
  static void init_charstring_buffers (void);
  static void out_curveto (real_coordinate_type *, spline_type);
  static void out_lineto (real_coordinate_type *, real_coordinate_type);
  static void out_moveto (real_coordinate_type *, real_coordinate_type);
  static void out_point (real_coordinate_type *, real_coordinate_type);
--- 107,116 ----
  static variable_string cs_encrypt (variable_string);
  static void cs_number (real, variable_string *);
  static void init_charstring_buffers (void);
+ static void out_bb_char
+   (real_bounding_box_type *, real_coordinate_type *, bzr_char_type);
  static void out_curveto (real_coordinate_type *, spline_type);
  static void out_lineto (real_coordinate_type *, real_coordinate_type);
+ static void out_move (real_coordinate_type *, real, real, boolean);
  static void out_moveto (real_coordinate_type *, real_coordinate_type);
  static void out_point (real_coordinate_type *, real_coordinate_type);
***************
*** 109,144 ****
  static void out_relative_cmd (real_coordinate_type *, real_coordinate_type,
                                type1_opcode, type1_opcode, type1_opcode);
  static void output_charstring_buffers (string);
! static void output_private_dict_1 (void);
  static void output_private_dict_2 (void);
  static int points_to_adobes (real);
  
! /* As we read a character, we encode each command in the Type 1 scheme
!    and stick the result into a buffer.  (Because we need to output the
!    length of the entire charstring before we output the charstring
!    itself, we can't output as we go.)  */
! static variable_string charstring_buffer;
  
! /* Before encrypting, fill this and prepend onto above.  */
! static variable_string pre_charstring_buffer;
  
! /* This should be called before the others in this file.  It opens the
!    output file `OUTPUT_NAME.gsf', writes some preliminary boilerplate, the
!    font bounding box, and sets up to write the characters.  */
  
  void
! pstype1_start_output (string font_name, string output_name,
! 		      bzr_preamble_type pre, bzr_postamble_type post, 
!                       string ps_fontname, tfm_global_info_type tfm_info)
! {
!   /* Find general information about the font.  Pass in the filename
!      we were given.  */
!   ps_font_info_type ps_info = ps_init (font_name, ps_fontname, tfm_info);
! 
!   /* Remember the natural interword space, so we can output it later, if
!      necessary.  Ditto for the UniqueID.  */
!   tfm_space = TFM_SAFE_FONTDIMEN (tfm_info, TFM_SPACE_PARAMETER, 0);
!   unique_id = ps_info.unique_id;
  
    /* If a Type 3 font is eexec-encrypted and in ASCII, its extension
       should be `pfa'.  If they are eexec-encrypted and binary, its
--- 117,158 ----
  static void out_relative_cmd (real_coordinate_type *, real_coordinate_type,
                                type1_opcode, type1_opcode, type1_opcode);
+ static void output_bzr_body (bzr_char_type);
+ static real_bounding_box_type output_ccc_body (ccc_type, char_type **);
+ static void output_char_finish (real, real, charcode_type);
+ static boolean output_char_start (charcode_type);
  static void output_charstring_buffers (string);
! static void output_private_dict_1 (unsigned);
  static void output_private_dict_2 (void);
+ static void output_subr_end (void);
+ static void output_subr_start (charcode_type);
  static int points_to_adobes (real);
  
! /* Convert N, a number in printer's points, to the 1000-unit/em
!    coordinate system the Type 1 format requires.  (We call these units
!    ``adobes''.)  We've already computed the scaling factor `em_factor'
!    for this, since it depends only on the design size of the font.  */
  
! static int
! points_to_adobes (real n)
! {
!   int n_in_adobes = ROUND (n * em_factor);
!   
!   return n_in_adobes;
! }
  
! /* This routine should be called before the others in this file.  It
!    opens the output file `OUTPUT_NAME.gsf', writes some preliminary
!    boilerplate, the font bounding box, and sets up to write the
!    characters.  */
  
  void
! pstype1_start_output (string output_name,
! 		      bzr_preamble_type pre, bzr_postamble_type post)
! {
!   ps_font_info_type ps_info = ps_set_font_info ();
  
+   /* Remember the natural interword space, so we can output it later.  */
+   interword_space = ps_info.interword_space;
+ 
    /* If a Type 3 font is eexec-encrypted and in ASCII, its extension
       should be `pfa'.  If they are eexec-encrypted and binary, its
***************
*** 159,163 ****
       this font's size.  */
    OUT_LINE ("/FontMatrix [0.001 0 0 0.001 0 0] readonly def"); 
!   em_factor = 1000.0 / TFM_DESIGN_SIZE (tfm_info);
    
    /* Some interpreters refuse to handle a normal array,
--- 173,177 ----
       this font's size.  */
    OUT_LINE ("/FontMatrix [0.001 0 0 0.001 0 0] readonly def"); 
!   em_factor = 1000.0 / BZR_DESIGN_SIZE (pre);
    
    /* Some interpreters refuse to handle a normal array,
***************
*** 172,204 ****
       we've read all the characters, so we can guess good values.  I hope
       this doesn't break any interpreters, but it probably will.  */
!   output_private_dict_1 ();
! 
!   /* Start the character subroutine definitions.  */
    
!   /* Define Subrs as part of Private; also, we must make the procedures
!      in the Private dictionary visible because the CharStrings definitions
!      will use them.  */
    OUT_LINE ("Private begin");
!   OUT1 ("/Subrs %d array \n", MAX_CHARCODE + 1 + SUBRS_OFFSET);
  }
! 
  void
! pstype1_intermediate_output ()
  {
!   /* End the subroutine definitions and start the character definitions.
!      Aside from the characters in the input font, we always output
!      characters `.notdef' and `space'.  */
!      
!   OUT_LINE (DEF_END);
!   OUT1 ("/CharStrings %d dict begin\n", MAX_CHARCODE + 1);
  
!   begin_char (".notdef");
!   end_char (0, 0);
  }
  
! /* Output the character C as a subroutine.  */
  
  void
! pstype1_output_char_subr (bzr_char_type c)
  {
    unsigned this_list;
--- 186,372 ----
       we've read all the characters, so we can guess good values.  I hope
       this doesn't break any interpreters, but it probably will.  */
!   output_private_dict_1 (ps_info.unique_id);
! }
! 
! /* Start the character subroutine definitions.  We need to make the
!    procedures in `Private' visible because the charstring definitions
!    use them -- i.e., the `-|', `-|', and `|' routines.  */
    
! void
! pstype1_start_subrs (unsigned subr_count)
! {
    OUT_LINE ("Private begin");
!   OUT1 ("/Subrs %d array \n", subr_count);
  }
! 
! 
! /* Output the BZR character C as a subroutine.  */
! 
  void
! pstype1_output_bzr_subr (bzr_char_type c)
  {
!   output_subr_start (CHARCODE (c));
!   output_bzr_body (c);
!   output_subr_end ();
! }
  
! 
! /* And the same, for the CCC character C.  */
! 
! void
! pstype1_output_ccc_subr (ccc_type c, charcode_type code, char_type *subrs[])
! {
!   output_subr_start (code);
!   output_ccc_body (c, subrs);
!   output_subr_end ();
! }
! 
! 
! /* Output a call to the subroutine corresponding to the character code
!    CODE.  */
! 
! #define OUT_CHAR_SUBR(code) 						\
!  do {									\
!    absolute_cs_number (subr_number[code], &charstring_buffer);		\
!    cs_byte (T1_CALLSUBR, &charstring_buffer);				\
!  } while (0)
! 
! 
! /* Output the common beginning of a subroutine.  We don't check if CODE
!    is in the encoding, since a character might well be used as a
!    subroutine but not be encoded.  */
! 
! static void
! output_subr_start (charcode_type code)
! {
!   static unsigned current_subr_number = 0;
!   
!   subr_number[code] = current_subr_number;
!   OUT1 ("dup %d ", current_subr_number++);
!   init_charstring_buffers ();
! }
! 
! 
! /* And the common ending.  */
! 
! static void
! output_subr_end ()
! {
!   cs_byte (T1_RETURN, &charstring_buffer);
!   output_charstring_buffers (READONLY_PUT);
  }
  
! /* End the subroutine definitions and start the character definitions.
!    Aside from the characters in the input font, we always output
!    the two characters `.notdef' and `space' (this happens in
!    `pstype1_finish_output).  */
!      
! void
! pstype1_start_chars (unsigned char_count)
! {
!   OUT_LINE (READONLY_DEF " % Subrs");
!   OUT1 ("/CharStrings %d dict begin\n", char_count + 2);
! }
! 
! 
! /* Output the BZR character C; if it is defined in SUBRS, just output a
!    call to the already-defined subroutine.  */
! 
! void
! pstype1_output_bzr_char (bzr_char_type c, char_type *subrs[])
! {
!   unsigned code = CHARCODE (c);
!   
!   if (output_char_start (code))
!     {
!       if (subrs[code])
!         OUT_CHAR_SUBR (code);
!       else
!         output_bzr_body (c);
!       
!       output_char_finish (CHAR_LSB (c), CHAR_SET_WIDTH (c), code);
!     }
! }
! 
  
+ /* Output the CCC character C with character code CODE, and using the
+    character definitions in SUBRS.  */
+ 
  void
! pstype1_output_ccc_char (ccc_type c, charcode_type code, char_type *subrs[])
! {
!   if (output_char_start (code))
!     {
!       if (subrs[code])
!         WARNING ("Sorry, CCC characters can't be subroutines yet");
!       else
!         {
!           real_bounding_box_type bb = output_ccc_body (c, subrs);
!           output_char_finish (MIN_COL (bb), MAX_COL (bb), code);
!         }
!     }
! }
! 
! 
! /* Common beginning for characters.  */
! 
! static boolean
! output_char_start (charcode_type code)
! {
!   string charname = ps_encoding_name (code);
!   boolean ok = !STREQ (charname, ".notdef");
!   
!   if (ok)
!     begin_char (charname);
!   
!   return ok;
! }
! 
! 
! /* Begin a character definition, i.e., a definition in the CharStrings
!    dictionary.  We are given the character name, the left sidebearing,
!    and the set width.  The latter two are in printer's points.  We
!    always output an `hsbw' command -- our characters do not have y
!    sidebearings.  */
! 
! static void
! begin_char (string name)
! {
!   OUT1 ("/%s\t", name);
! 
!   /* We cannot just output the bytes of the charstring as we go, because
!      we need to output the length of the charstring before the
!      charstring itself, so we can use readhexstring in the PostScript.  */
!   init_charstring_buffers ();
! }
! 
! 
! /* Common ending.  */
! 
! static void
! output_char_finish (real lsb, real set_width, charcode_type code)
! {
!   end_char (lsb, set_width);
!   char_output_p[code] = true;
! }
! 
! 
! /* End a character definition with the `endchar' command.  */
! 
! static void
! end_char (real lsb, real set_width)
! {
!   cs_number (lsb, &pre_charstring_buffer);
!   cs_number (set_width, &pre_charstring_buffer);
!   cs_byte (T1_HSBW, &pre_charstring_buffer);
! 
!   cs_byte (T1_ENDCHAR, &charstring_buffer);
!   output_charstring_buffers (READONLY_DEF);
! }
! 
! /* Output the splines in C.  */
! 
! static void
! output_bzr_body (bzr_char_type c)
  {
    unsigned this_list;
***************
*** 206,218 ****
    real_coordinate_type start = { 0.0, 0.0 };
    real_coordinate_type current = start;
-   charcode_type code = CHARCODE (c);
-   string charname = ps_encoding_name (code);
-   
-   if (STREQ (charname, ".notdef"))
-     return;
-     
-   /* Start the definition.  */
-   OUT1 ("dup %d ", CHARCODE_TO_SUBRS_INDEX (code));
-   init_charstring_buffers ();
  
    /* Go through the list of splines, outputting the
--- 374,377 ----
***************
*** 242,397 ****
        cs_byte (T1_CLOSEPATH, &charstring_buffer);
      }
-   out_moveto (&current, start);
-   cs_byte (T1_RETURN, &charstring_buffer);
-   output_charstring_buffers (PUT_END);
- }
- 
- /* Output a character which only uses one subroutine.  */
- 
- void
- pstype1_output_bzr_char (bzr_char_type c)
- {
-   charcode_type code = CHARCODE (c);
-   string charname = ps_encoding_name (code);
  
!   begin_char (charname);
!   OUT_CHAR_SUBR (code);
!   end_char (CHAR_LSB (c), CHAR_SET_WIDTH (c));
!   ps_char_output_p[CHARCODE (c)] = true;
  }
- 
- /* Macros for pstype1_output_ccc_char: assume `cp' and `bb' are defined.  */ 
- 
- /* Moves.  */
  
- #define OUT_MOVE(h, v, a)						\
-   do									\
-     {									\
-       real_coordinate_type save_cp = cp;				\
-       real_coordinate_type rel_p = (real_coordinate_type){h, v};	\
-       out_moveto (&cp, Padd (cp, rel_p));				\
-       cp = save_cp;							\
-     }									\
-   while (0)
-   
- #define OUT_HMOVE(h, a) OUT_MOVE (h, 0.0, a)
- #define OUT_VMOVE(v, a) OUT_MOVE (0.0, v, a)
- 
- /* Output a(n absolute, if ABSOLUTE is true) move to relative (H, V),
-    updating the bounding box and the current point.  */
-    
- #define OUTPUT_MOVE(h, v, absolute)					\
-   do									\
-     {									\
-       OUT_HMOVE (h, absolute);						\
-       UPDATE_BB_MOVE (h, v);						\
-       UPDATE_CP_MOVE (h, v);						\
-     }									\
-   while (0);
- 
- 
- /* Update bounding box `bb' using BC's bounding box relative to `cp'.  */
- 
- #define UPDATE_BB_CHAR(bc)						\
-   do 									\
-     {									\
-       update_real_bounding_box (&(bb), 					\
-            (real_coordinate_type) {cp.x + BZR_CHAR_MIN_COL (bc),	\
-                                    cp.y + BZR_CHAR_MIN_ROW (bc)});	\
- 									\
-       update_real_bounding_box (&(bb), 					\
-            (real_coordinate_type) {cp.x + BZR_CHAR_MAX_COL (bc),	\
-                                    cp.y + BZR_CHAR_MAX_ROW (bc)});	\
-     }									\
-   while (0);
- 
- 
- /* Update bounding box `bb' according to a move H, V relative to `cp'.  */
- 
- #define UPDATE_BB_MOVE(h, v) 						\
-   update_real_bounding_box (&(bb), 					\
- 		            (real_coordinate_type) {cp.x + h, cp.y + v});
- 
- 
- /* Update the current point according to a move H, V.  */
- 
- #define UPDATE_CP_MOVE(h, v) 						\
-   cp = Padd (cp, ((real_coordinate_type){(h), (v)}))
- 
- 
- /* Output a character with charcode C, updating the bounding box for it.  */
- #define OUTPUT_BB_CHAR(bc, c)						\
-   do									\
-     {									\
-       OUT_CHAR_SUBR (c);						\
-       UPDATE_BB_CHAR (bc);						\
-       OUT_HMOVE (BZR_CHAR_BB_WIDTH (bc), false);			\
-       UPDATE_CP_MOVE (BZR_CHAR_BB_WIDTH (bc), 0);			\
-     }									\
-   while (0);
  
  
! /* Output the composite character C.  */
  
! void
! pstype1_output_ccc_char (ccc_type ccc_char, char_type **chars,
!                          charcode_type ccc_code, real bzr_designsize)
  {
-   real ccc_char_lsb;
    unsigned this_cmd;
!   real_coordinate_type cp = (real_coordinate_type) { 0.0, 0.0 };
    real_bounding_box_type bb
      = (real_bounding_box_type) { FLT_MAX, FLT_MIN, FLT_MAX, FLT_MIN };
-   string charname = ps_encoding_name (ccc_code);
  
-   begin_char (charname);
- 
    for (this_cmd = 0; this_cmd < LIST_SIZE (ccc_char); this_cmd++)
      { 
-       real move;
-       bzr_char_type *bzr_char;
-       charcode_type bzr_code;
        ccc_cmd_type cmd = *(ccc_cmd_type *) LIST_ELT (ccc_char, this_cmd);
-       int op_code = CCC_OPCODE (cmd);
        
!       switch (op_code)
          {
          case TR_SETCHAR:
!           bzr_code = CCC_CHARCODE (cmd);
!           bzr_char = CHAR_BZR_INFO (*(chars[bzr_code]));
!           ccc_char_lsb = CHAR_LSB (*bzr_char);
!           OUTPUT_MOVE ((real) CHAR_LSB (*bzr_char), 0, false);
!           OUTPUT_BB_CHAR (*bzr_char, bzr_code);
!           OUTPUT_MOVE ((real) CHAR_RSB (*bzr_char), 0, false);
            break;
  
          case TR_SETCHARBB:
!           bzr_code = CCC_CHARCODE (cmd);
!           bzr_char = CHAR_BZR_INFO (*(chars[bzr_code]));
!           ccc_char_lsb = 0;
!           OUTPUT_BB_CHAR (*bzr_char, bzr_code);
            break;
  
          case TR_HMOVE:
!           move = CCC_DIMEN_AMOUNT (cmd);
!           OUT_HMOVE (move, CCC_DIMEN_ABSOLUTE (cmd));
!           UPDATE_CP_MOVE (move, 0);
            break;
  
          case TR_VMOVE:
!           move = CCC_DIMEN_AMOUNT (cmd);
!           OUT_VMOVE (move, CCC_DIMEN_ABSOLUTE (cmd));
!           UPDATE_CP_MOVE (0, move);
            break;
  
          default:
!           FATAL2 ("bad command %d in CCC character %d", op_code, ccc_code);
!           break;
  	}
      }
!   end_char (ccc_char_lsb, BB_WIDTH (bb));
!   ps_char_output_p[ccc_code] = true;
  
!   char_make_tfm (chars, ccc_code, bb);
  }
  
--- 401,524 ----
        cs_byte (T1_CLOSEPATH, &charstring_buffer);
      }
  
!   /* If we're outputting a subroutine, we want to wind up back at the
!      origin, I guess.  */
!   out_moveto (&current, start);
  }
  
  
+ /* Output the composite character C, with all subroutines defined in SUBRS.  */
  
! #define OUT_HMOVE(h, a) out_move (&current, h, 0.0, a)
! #define OUT_VMOVE(v, a) out_move (&current, 0.0, v, a)
  
! static real_bounding_box_type
! output_ccc_body (ccc_type ccc_char, char_type **subrs)
  {
    unsigned this_cmd;
!   real_coordinate_type current = (real_coordinate_type) { 0.0, 0.0 };
    real_bounding_box_type bb
      = (real_bounding_box_type) { FLT_MAX, FLT_MIN, FLT_MAX, FLT_MIN };
  
    for (this_cmd = 0; this_cmd < LIST_SIZE (ccc_char); this_cmd++)
      { 
        ccc_cmd_type cmd = *(ccc_cmd_type *) LIST_ELT (ccc_char, this_cmd);
        
!       switch (CCC_OPCODE (cmd))
          {
          case TR_SETCHAR:
!           {
!             char_type subr = *subrs[CCC_CHARCODE (cmd)];
! 
!             if (CHAR_CLASS (subr) == bzr_char_class)
!               {
!                 bzr_char_type bzr_char = *CHAR_BZR (subr);
!                 
!                 update_real_bounding_box (&bb, current);
!                 OUT_HMOVE (CHAR_LSB (bzr_char), false);
! 
!                 out_bb_char (&bb, &current, bzr_char);
! 
!                 OUT_HMOVE (CHAR_RSB (bzr_char), false);
!                 update_real_bounding_box (&bb, current);
!               }
!             else
!               /* We haven't implemented this yet since it doesn't seem
!                  all that necessary at the moment, and it would require
!                  figuring out a bounding box and possibly side bearings
!                  for CCC character -- certainly not impossible, but not
!                  trivial, either.  */
!               WARNING ("Sorry, I can't `setchar' a CCC char yet");
!           }
            break;
  
          case TR_SETCHARBB:
!           {
!             char_type subr = *subrs[CCC_CHARCODE (cmd)];
! 
!             if (CHAR_CLASS (subr) == bzr_char_class)
!               out_bb_char (&bb, &current, *CHAR_BZR (subr));
!             else
!               WARNING ("Sorry, I can't `setcharbb' a CCC char yet");
!           }
            break;
  
          case TR_HMOVE:
!           OUT_HMOVE (CCC_DIMEN_AMOUNT (cmd), CCC_DIMEN_ABSOLUTE (cmd));
            break;
  
          case TR_VMOVE:
!           OUT_VMOVE (CCC_DIMEN_AMOUNT (cmd), CCC_DIMEN_ABSOLUTE (cmd));
            break;
  
          default:
!           FATAL1 ("Bad command %d in CCC character", CCC_OPCODE (cmd));
  	}
      }
!   
!   return bb;
! }
! /* Move by H horizontally and V vertically.  If ABSOLUTE is true, the
!    amount moved is supposed to be independent of the character size, but
!    we don't know how to implement that yet.  Update CURRENT.  */
! 
! static void
! out_move (real_coordinate_type *current, real h, real v, boolean absolute)
! {
!   real_coordinate_type new
!     = (real_coordinate_type) { current->x + h, current->y + v};
! 
!   if (absolute)
!     WARNING2 ("Move [by (%.2f,%.2f)] in absolute units unimplemented", h, v);
! 
!   out_moveto (current, new);
!   *current = new;
! }
! 
  
! /* Output the character shape in BZR_CHAR, sans side bearings.  Update
!    CURRENT by the width of the shape, and update BB by the points before
!    and after the character.  We take into account the height of the
!    character when updating BB, even though we don't translate the
!    current point up there.  */
! 
! #define VOFFSET_POINT(voffset) \
!   ((real_coordinate_type) { current->x, current->y + (voffset) })
! 
! static void
! out_bb_char (real_bounding_box_type *bb, real_coordinate_type *current,
!              bzr_char_type bzr_char)
! {
!   /* Update BB with the current point.  */
!   update_real_bounding_box (bb, VOFFSET_POINT (CHAR_MIN_ROW (bzr_char)));
! 
!   /* Output the call to the character.  */
!   OUT_CHAR_SUBR (CHARCODE (bzr_char));
!   
!   /* Move by the width of the shape.  */
!   out_move (current, BB_WIDTH (CHAR_BB (bzr_char)), 0, false);
! 
!   /* Update the BB again with the new current point.  */
!   update_real_bounding_box (bb, VOFFSET_POINT (CHAR_MAX_ROW (bzr_char)));
  }
  
***************
*** 494,498 ****
      }
    
!   /* Fall back.  */
    else
      {
--- 621,625 ----
      }
    
!   /* Fall back to general case.  */
    else
      {
***************
*** 503,550 ****
      }
  }
- 
- /* Begin a character definition, i.e., a definition in the CharStrings
-    dictionary.  We are given the character name, the left sidebearing,
-    and the set width.  The latter two are in printer's points.  We
-    always output an `hsbw' command -- our characters do not have y
-    sidebearings.  */
- 
- static void
- begin_char (string name)
- {
-   OUT1 ("/%s ", name);
- 
-   /* We cannot just output the bytes of the charstring as we go, because
-      we need to output the length of the charstring before the
-      charstring itself, so we can use readhexstring in the PostScript.  */
-   init_charstring_buffers ();
- }
- 
- 
- /* End a character definition with the `endchar' command.  */
- 
- static void
- end_char (real lsb, real set_width)
- {
-   cs_number (lsb, &pre_charstring_buffer);
-   cs_number (set_width, &pre_charstring_buffer);
-   cs_byte (T1_HSBW, &pre_charstring_buffer);
- 
-   cs_byte (T1_ENDCHAR, &charstring_buffer);
-   output_charstring_buffers (DEF_END);
- }
- 
- /* Convert N, a number in printer's points, to the 1000-unit/em coordinate
-    system the Type 1 format requires.  (We call these units ``adobes''.)
-    We've already computed the scaling factor for this, since it depends
-    only on the design size of the font.  */
- 
- static int
- points_to_adobes (real n)
- {
-   int n_in_adobes = ROUND (n * em_factor);
-   
-   return n_in_adobes;
- }
  
  /* Charstring operations.  */
--- 630,633 ----
***************
*** 577,581 ****
    absolute_cs_number (n_in_adobes, buffer);
  }
!   
  static void
  absolute_cs_number (int n, variable_string *buffer)
--- 660,667 ----
    absolute_cs_number (n_in_adobes, buffer);
  }
! 
! 
! /* See section 6.2 of the book Adobe Type 1 Font Format.  */
! 
  static void
  absolute_cs_number (int n, variable_string *buffer)
***************
*** 633,639 ****
  /* Output what we've collected in `pre_charstring_buffer' and
     `charstring_buffer'.  Because Type 1 BuildChar is only required to
!    handle encrypted charstrings, we must encrypt our encoded charstring.
!    END is xx.
!    */
  
  static void
--- 719,723 ----
  /* Output what we've collected in `pre_charstring_buffer' and
     `charstring_buffer'.  Because Type 1 BuildChar is only required to
!    handle encrypted charstrings, we must encrypt our encoded charstring.  */
  
  static void
***************
*** 670,684 ****
    /* If the space character hasn't been output, do so (even if it won't
       be encoded).  */
!   if (space_encoding == -1 || !ps_char_output_p[space_encoding])
      {
        begin_char ("space");
!       end_char (0, tfm_space);
        if (space_encoding != -1)
!         ps_char_output_p[ps_encoding_number ("space")] = true;
      }
  
    /* Pop the Private and CharStrings dictionaries from the dictionary
       stack, then define the latter in the main font dict.  */
!   OUT_LINE ("currentdict end readonly");
    OUT_LINE ("end % Private");
    OUT_LINE ("def % CharStrings");
--- 754,772 ----
    /* If the space character hasn't been output, do so (even if it won't
       be encoded).  */
!   if (space_encoding == -1 || !char_output_p[space_encoding])
      {
        begin_char ("space");
!       end_char (0, interword_space);
        if (space_encoding != -1)
!         char_output_p[space_encoding] = true;
      }
  
+   /* Always output `.notdef'.  */
+   begin_char (".notdef");
+   end_char (0, 0);
+ 
    /* Pop the Private and CharStrings dictionaries from the dictionary
       stack, then define the latter in the main font dict.  */
!   OUT_LINE ("currentdict end readonly % CharStrings");
    OUT_LINE ("end % Private");
    OUT_LINE ("def % CharStrings");
***************
*** 685,689 ****
  
    /* Two more elements go in the font dictionary.  */
!   ps_output_encoding (ps_file);
    output_private_dict_2 ();
  
--- 773,777 ----
  
    /* Two more elements go in the font dictionary.  */
!   ps_output_encoding (ps_file, char_output_p);
    output_private_dict_2 ();
  
***************
*** 693,698 ****
    xfclose (ps_file, ps_filename);
  }
! 
! 
  /* The first part of the Private dictionary defines things that are
     independent of the character definitions.  */
--- 781,785 ----
    xfclose (ps_file, ps_filename);
  }
! 
  /* The first part of the Private dictionary defines things that are
     independent of the character definitions.  */
***************
*** 699,710 ****
  
  static void
! output_private_dict_1 ()
  {
!   OUT_LINE ("/Private 8 dict begin");
    OUT_LINE ("  /MinFeature {16 16} def");
    OUT_LINE ("  /password 5839 def");
  
!   /* According to the spec, the only reason to set lenIV to 4 is to be
!      compatible with the interpreter in the original LaserWriter.  We
       don't care about that, so we may as well reduce the number of bytes
       wasted on encryption.  */
--- 786,797 ----
  
  static void
! output_private_dict_1 (unsigned unique_id)
  {
!   OUT_LINE ("/Private 9 dict begin");
    OUT_LINE ("  /MinFeature {16 16} def");
    OUT_LINE ("  /password 5839 def");
  
!   /* According to the spec, the only reason to keep `lenIV' at 4 is to
!      be compatible with the interpreter in the original LaserWriter.  We
       don't care about that, so we may as well reduce the number of bytes
       wasted on encryption.  */
***************
*** 712,716 ****
  
    if (unique_id)
!     OUT1   ("  /UniqueID %d def\n", unique_id);
  
    /* Here is how a character or a subroutine will get defined.  We
--- 799,803 ----
  
    if (unique_id)
!     OUT1 ("  /UniqueID %d def\n", unique_id);
  
    /* Here is how a character or a subroutine will get defined.  We
***************
*** 722,730 ****
    OUT_LINE ("  /-| {string currentfile exch readhexstring pop} readonly def");
  
!   /* Once we have the string, we have to define the character.  */
    OUT_LINE ("  /|- {readonly def} readonly def");
  
!   /* Once we have the string, we have to define the subroutine.  */
!   OUT_LINE ("  /| {readonly put} readonly def");
    
    /* End defining the private dictionary.  */
--- 809,817 ----
    OUT_LINE ("  /-| {string currentfile exch readhexstring pop} readonly def");
  
!   /* Once we have the string, this procedure defines the character.  */
    OUT_LINE ("  /|- {readonly def} readonly def");
  
!   /* Likewise, for subroutines.  */
!   OUT_LINE ("  /|  {readonly put} readonly def");
    
    /* End defining the private dictionary.  */
***************
*** 735,739 ****
  /* The second part of the Private dictionary defines the hinting
     information, which we know only after we've seen the characters.  Or
!    at least we will know it after we understand how to output hints.  */
  
  static void
--- 822,826 ----
  /* The second part of the Private dictionary defines the hinting
     information, which we know only after we've seen the characters.  Or
!    at least we might know it after we understand how to output hints.  */
  
  static void
diff -Nrc2 fontutils-0.5/bzrto/pstype1.h fontutils-0.6/bzrto/pstype1.h
*** fontutils-0.5/bzrto/pstype1.h	Mon Aug 17 14:59:11 1992
--- fontutils-0.6/bzrto/pstype1.h	Mon Oct 19 16:39:00 1992
***************
*** 25,46 ****
  #include "input-ccc.h"
  #include "tfm.h"
- #include "types.h"
  
  /* This is called first.  */
! extern void pstype1_start_output (string font_name, string output_name,
! 				  bzr_preamble_type, bzr_postamble_type,
!                                   string ps_fontname, tfm_global_info_type);
  
! /* Then this is called for each character.  */
! extern void pstype1_output_char_subr (bzr_char_type);
  
! /* Then we call this.  */
! extern void pstype1_intermediate_output (void);
  
  /* Then we call one or the other of these.  */
! extern void pstype1_output_bzr_char (bzr_char_type);
! extern void pstype1_output_ccc_char (ccc_type ccc_char, char_type **chars,
! 				     charcode_type ccc_code,
! 				     real bzr_designsize);
  
  /* And finally this is called at the end.  */
--- 25,47 ----
  #include "input-ccc.h"
  #include "tfm.h"
  
+ 
  /* This is called first.  */
! extern void pstype1_start_output (string output_name,
! 				  bzr_preamble_type, bzr_postamble_type);
! 
! /* Then these are called for characters needed as subroutines.  */
! extern void pstype1_output_bzr_subr (bzr_char_type);
! extern void pstype1_output_ccc_subr (ccc_type, charcode_type, char_type *[]);
  
! /* This starts the subroutines.  */
! extern void pstype1_start_subrs (unsigned subr_count);
  
! /* And this finishes the subroutines and starts the characters.  */
! extern void pstype1_start_chars (unsigned char_count);
  
  /* Then we call one or the other of these.  */
! extern void pstype1_output_bzr_char (bzr_char_type, char_type *[]);
! extern void pstype1_output_ccc_char (ccc_type, charcode_type, char_type *[]);
  
  /* And finally this is called at the end.  */
diff -Nrc2 fontutils-0.5/bzrto/pstype3.c fontutils-0.6/bzrto/pstype3.c
*** fontutils-0.5/bzrto/pstype3.c	Sat Aug 15 13:39:01 1992
--- fontutils-0.6/bzrto/pstype3.c	Mon Oct 19 13:40:45 1992
***************
*** 23,28 ****
  #include "bounding-box.h"
  #include "bzr.h"
  #include "spline.h"
- #include "tfm.h"
  
  #include "pstype3.h"
--- 23,28 ----
  #include "bounding-box.h"
  #include "bzr.h"
+ #include "encoding.h"
  #include "spline.h"
  
  #include "pstype3.h"
***************
*** 34,45 ****
  static string ps_filename;
  
! /* The interword space from the TFM file, in points.  */
! static real tfm_space;
  
  
- /* Subroutines.  */
- static void out_splines (spline_list_array_type);
- 
  
  
  /* Output macros.  */
--- 34,46 ----
  static string ps_filename;
  
! /* The interword space, in points.  */
! static real interword_space;
  
+ /* Whether or not a particular character has been written.  We depend on
+    this being initialized to false by virtue of its storage class.  */
+ static boolean char_output_p[ENCODING_VECTOR_SIZE];
  
  
+ static void out_splines (spline_list_array_type);
  
  /* Output macros.  */
***************
*** 96,101 ****
      }									\
     while (0)
- 
- 
  
  /* This should be called before the others in this file.  It opens the
--- 97,100 ----
***************
*** 111,124 ****
  
  void
! pstype3_start_output (string font_name, string output_name,
! 		      bzr_preamble_type pre, bzr_postamble_type post,
!                       string ps_fontname, tfm_global_info_type tfm_info)
  {
!   /* Find general information about the font.  Pass in the filename
!      we were given.  */
!   ps_font_info_type ps_info = ps_init (font_name, ps_fontname, tfm_info);
  
!   /* I don't know of any real convention about what extension to give
!      Type 3 fonts, so: */
    ps_filename = extend_filename (output_name, "pf3");
    ps_file = xfopen (ps_filename, "w");
--- 110,120 ----
  
  void
! pstype3_start_output (string output_name, 
! 		      bzr_preamble_type pre, bzr_postamble_type post)
  {
!   ps_font_info_type ps_info = ps_set_font_info ();
  
!   /* I don't know of any convention about what extension to give Type 3
!      fonts, so I use `pf3'.  */
    ps_filename = extend_filename (output_name, "pf3");
    ps_file = xfopen (ps_filename, "w");
***************
*** 126,130 ****
    /* Remember the natural interword space, so we can output it later, if
       necessary.  */
!   tfm_space = TFM_FONTDIMEN (tfm_info, TFM_SPACE_PARAMETER);
  
    /* Output some identification.  */
--- 122,126 ----
    /* Remember the natural interword space, so we can output it later, if
       necessary.  */
!   interword_space = ps_info.interword_space;
  
    /* Output some identification.  */
***************
*** 134,138 ****
    OUT_LINE ("/FontType 3 def");
    
!   /* xx should probably physically insert the BuildChar routine, as
       (run) doesn't work when the font is downloaded.  */
    OUT_LINE ("(" BUILD_CHAR_FILENAME ") run");
--- 130,134 ----
    OUT_LINE ("/FontType 3 def");
    
!   /* We should probably physically insert the BuildChar routine, as
       (run) doesn't work when the font is downloaded.  */
    OUT_LINE ("(" BUILD_CHAR_FILENAME ") run");
***************
*** 150,159 ****
    OUT_LINE ("/.notdef [ 0 0 0 0 0 0 {} ] def");
  }
- 
- 
- 
  
  /* This is called on each character to be output.  We set the global
!    `ps_char_output_p' at the given character code.  It then outputs a
     character description in the following format (which depends on the
     BuildChar routine):
--- 146,152 ----
    OUT_LINE ("/.notdef [ 0 0 0 0 0 0 {} ] def");
  }
  
  /* This is called on each character to be output.  We set the global
!    `char_output_p' for the given character code.  It then outputs a
     character description in the following format (which depends on the
     BuildChar routine):
***************
*** 168,181 ****
  pstype3_output_char (bzr_char_type c)
  {
!   ps_char_output_p[CHARCODE (c)] = true;
  
!   OUT1 ("/%s ", ps_encoding_name (CHARCODE (c)));
!   OUT5 ("[ %.3f 0 %.3f %.3f %.3f %.3f {\n", CHAR_SET_WIDTH (c),
!               BZR_CHAR_MIN_COL (c), BZR_CHAR_MIN_ROW (c),
!               BZR_CHAR_MAX_COL (c), BZR_CHAR_MAX_ROW (c));
  
!   out_splines (BZR_SHAPE (c));
  
!   OUT_LINE ("  fill } ] def");
  }
  
--- 161,179 ----
  pstype3_output_char (bzr_char_type c)
  {
!   string charname = ps_encoding_name (CHARCODE (c));
!   
!   if (!STREQ (charname, ".notdef"))
!     {
!       char_output_p[CHARCODE (c)] = true;
  
!       OUT1 ("/%s ", charname);
!       OUT5 ("[ %.3f 0 %.3f %.3f %.3f %.3f {\n", CHAR_SET_WIDTH (c),
!                   CHAR_MIN_COL (c), CHAR_MIN_ROW (c),
!                   CHAR_MAX_COL (c), CHAR_MAX_ROW (c));
  
!       out_splines (BZR_SHAPE (c));
  
!       OUT_LINE ("  fill } ] def");
!     }
  }
  
***************
*** 214,220 ****
      }
  }
- 
- 
- 
  
  /* This finishes up the PostScript for the character descriptions and for
--- 212,215 ----
***************
*** 228,236 ****
    /* If the space character hasn't been output, do so (even if it won't
       be encoded).  */
!   if (space_encoding == -1 || !ps_char_output_p[space_encoding])
      {
!       OUT1 ("/space [ %d 0 0 0 0 0 {} ] def\n", ROUND (tfm_space));
        if (space_encoding != -1)
!         ps_char_output_p[ps_encoding_number ("space")] = true;
      }
  
--- 223,231 ----
    /* If the space character hasn't been output, do so (even if it won't
       be encoded).  */
!   if (space_encoding == -1 || !char_output_p[space_encoding])
      {
!       OUT1 ("/space [ %d 0 0 0 0 0 {} ] def\n", ROUND (interword_space));
        if (space_encoding != -1)
!         char_output_p[space_encoding] = true;
      }
  
***************
*** 239,243 ****
  
    /* Now that we've seen all the characters, we can output the encoding.  */
!   ps_output_encoding (ps_file);
  
    /* Define and discard the font.  */
--- 234,238 ----
  
    /* Now that we've seen all the characters, we can output the encoding.  */
!   ps_output_encoding (ps_file, char_output_p);
  
    /* Define and discard the font.  */
diff -Nrc2 fontutils-0.5/bzrto/pstype3.h fontutils-0.6/bzrto/pstype3.h
*** fontutils-0.5/bzrto/pstype3.h	Mon Apr 13 14:23:12 1992
--- fontutils-0.6/bzrto/pstype3.h	Mon Oct  5 18:12:41 1992
***************
*** 26,32 ****
  
  /* This is called first.  */
! extern void pstype3_start_output (string font_name, string output_name,
! 				  bzr_preamble_type, bzr_postamble_type, 
!                                   string, tfm_global_info_type);
  
  /* Then this is called for each character.  */
--- 26,31 ----
  
  /* This is called first.  */
! extern void pstype3_start_output (string output_name,
! 				  bzr_preamble_type, bzr_postamble_type);
  
  /* Then this is called for each character.  */
diff -Nrc2 fontutils-0.5/bzrto/psutil.c fontutils-0.6/bzrto/psutil.c
*** fontutils-0.5/bzrto/psutil.c	Sun Aug 16 11:42:31 1992
--- fontutils-0.6/bzrto/psutil.c	Mon Oct 19 17:15:36 1992
***************
*** 28,34 ****
  
  
! /* Whether or not a particular character has been written.  We don't set
!    this, but we use it to figure out the encoding to output.  */
! boolean ps_char_output_p[ENCODING_VECTOR_SIZE];
  
  
--- 28,34 ----
  
  
! /* Information for the PostScript FontInfo dictionary, etc.
!    (-ps-font-info)  */
! string ps_global_info = NULL;
  
  
***************
*** 40,77 ****
  #define OUT2(s, e1, e2) do { fprintf (f, s, e1, e2); } while (0)
  
! 
  static void out_notdef_loop (FILE *, charcode_type, charcode_type);
- 
- 
  
! /* Return the information that goes in the FontInfo dictionary for the
!    font FONT_NAME, as well as a few other miscellaneous things.  This
!    uses TFM_INFO for some of the information, PS_FONT_NAME for others,
!    and guesses for the rest.  */
! 
! #define NO_PARAM_RET -1
  
  ps_font_info_type
! ps_init (string font_name, string ps_font_name, tfm_global_info_type tfm_info)
  {
    ps_font_info_type ret;
  
!   /* Default the full font name to the font's filename.  */
!   ret.font_name = ps_font_name ? : font_name;
    
!   /* The family name would be `Times' for the font `Times-BoldItalic', 
!       but it's `Helvetica' for `Helvetica'.  (It should be `Lucida' for
!      `LucidaBright-Italic', but we don't handle that case.)  */
!   ret.family_name = strchr (ret.font_name, '-');
!   if (ret.family_name == NULL)
!     ret.family_name = ret.font_name;  /* E.g., `Helvetica'.  */
!   else
!     ret.family_name
!       = substring (ret.font_name, 0, ret.family_name - 1- ret.font_name);
  
!   /* If the font name contains `Bold', that's the weight.  Otherwise,
!      guess `Medium'.  (I don't know of any programs that actually care
!      about this.)  */
!   ret.weight = strstr (ret.font_name, "Bold") ? "Bold" : "Medium";
  
    /* We should be able to compute the italic angle by somehow looking at
--- 40,88 ----
  #define OUT2(s, e1, e2) do { fprintf (f, s, e1, e2); } while (0)
  
! static string option_value (string, string);
  static void out_notdef_loop (FILE *, charcode_type, charcode_type);
  
! /* Return the information that goes in the FontInfo dictionary, etc.  We
!    use the global variables `ps_global_info' and `tfm_global_info' to
!    determine the information.  Either or both might be null.  */
  
  ps_font_info_type
! ps_set_font_info ()
  {
    ps_font_info_type ret;
  
!   /* The PostScript name of the font.  */
!   ret.font_name = option_value (ps_global_info, "FontName") ? : "unknown";
    
!   /* The typeface family which includes this font.  */
!   ret.family_name = option_value (ps_global_info, "FamilyName");
!   if (!ret.family_name)
!     { /* Since they didn't specify a family name, try to guess from the
!          font name.  The family name is `Times' for the font
!          `Times-BoldItalic', but it's `Helvetica' for `Helvetica'.  (It
!          should be `Lucida' for `LucidaBright-Italic', but we don't
!          handle that case.)  */
!       ret.family_name = strchr (ret.font_name, '-');
!       if (!ret.family_name)
!         ret.family_name = ret.font_name;  /* The `Helvetica' case.  */
!       else
!         ret.family_name
!           = substring (ret.font_name, 0, ret.family_name - 1 - ret.font_name);
!     }
  
!   ret.weight = option_value (ps_global_info, "Weight");
!   if (!ret.weight)
!     { /* Again, since they didn't specify a weight, try to guess from
!          the font name.  */
!       unsigned w;
!       string weights[]
!         = { "Black", "Book", "Bold", "Demi", "ExtraBold", "Light",
!             "Heavy", "Regular", "Semibold", "Ultra", NULL };
!       
!       for (w = 0; weights[w] != NULL && !strstr (ret.font_name, weights[w]);
!            w++)
!         ;
!       ret.weight = weights[w] ? : "Medium";
!     }
  
    /* We should be able to compute the italic angle by somehow looking at
***************
*** 78,100 ****
       the characters.  bdftops.ps rotates the `I' and takes the angle
       that minimizes the width, for example.  */
!   ret.italic_angle = 0;
    
    /* Monospaced fonts have no stretch or shrink in their interword
!      space (or shouldn't), but they do have a nonzero interword space
!      (math fonts sometimes have all their interword space parameters set
!      to zero).  */
!   ret.monospace_p
!     = TFM_SAFE_FONTDIMEN (tfm_info, TFM_STRETCH_PARAMETER, -1) == 0.0
!       && TFM_SAFE_FONTDIMEN (tfm_info, TFM_SHRINK_PARAMETER, -1) == 0.0
!       && TFM_SAFE_FONTDIMEN (tfm_info, TFM_SPACE_PARAMETER, 0) > 0.0;
  
    /* What might be a good way to compute this one?  */
!   ret.underline_position = -100;
    
!   /* Here we can use the rule thickness from the TFM file, if it's set.
!      Otherwise, just guess.  (A better guess would be the dominant stem
!      width in the font.)  */
!   ret.underline_thickness
!     = TFM_SAFE_FONTDIMEN (tfm_info, TFM_DEFAULTRULETHICKNESS_PARAMETER, 50);
  
    /* What to do about the UniqueID's?  Actually, I'm not sure they
--- 89,146 ----
       the characters.  bdftops.ps rotates the `I' and takes the angle
       that minimizes the width, for example.  */
!   {
!     string angle_str = option_value (ps_global_info, "ItalicAngle");
!     ret.italic_angle = angle_str ? atof (angle_str) : 0;
!   }
    
+   /* The interword space must come from `tfm_global_info'.  Otherwise,
+      we just let it be zero.  */
+   ret.interword_space
+     = tfm_global_info
+       ? TFM_SAFE_FONTDIMEN (*tfm_global_info, TFM_SPACE_PARAMETER, 0.0)
+       : 0.0;
+ 
    /* Monospaced fonts have no stretch or shrink in their interword
!      space (or shouldn't), but they do have a nonzero interword space.
!      (Except TeX math fonts have all their interword space parameters
!      set to zero).  */
!   {
!     string monospace_str = option_value (ps_global_info, "isFixedPitch");
!     if (monospace_str)
!       ret.monospace_p = STREQ (monospace_str, "true"); 
!     else if (tfm_global_info)
!       ret.monospace_p
!         =    TFM_SAFE_FONTDIMEN (*tfm_global_info, TFM_STRETCH_PARAMETER, -1)
!              == 0.0
!           && TFM_SAFE_FONTDIMEN (*tfm_global_info, TFM_SHRINK_PARAMETER, -1)
!              == 0.0
!           && TFM_SAFE_FONTDIMEN (*tfm_global_info, TFM_SPACE_PARAMETER, 0)
!              > 0.0;
!     else
!       ret.monospace_p = false;
!   }
  
    /* What might be a good way to compute this one?  */
!   {
!     string under_str = option_value (ps_global_info, "UnderlinePosition");
!     ret.underline_position = under_str ? atof (under_str) : -100;
!   }
    
!   /* Here we use the rule thickness from the TFM file, if it's set.
!      Otherwise, we should guess the dominant stem width in the font, but
!      that's too much work for too little return.  */
!   {
! #define DEFAULT_THICKNESS 50
!     string under_str = option_value (ps_global_info, "UnderlineThickness");
!     if (under_str)
!       ret.underline_thickness = atof (under_str);
!     else if (tfm_global_info)
!       ret.underline_thickness
!         = TFM_SAFE_FONTDIMEN (*tfm_global_info,
!                               TFM_DEFAULTRULETHICKNESS_PARAMETER,
!                               DEFAULT_THICKNESS);
!     else
!       ret.underline_thickness = DEFAULT_THICKNESS;
!   }
  
    /* What to do about the UniqueID's?  Actually, I'm not sure they
***************
*** 102,112 ****
       fonts to get a UniqueID from them, which is semi-reasonable, but a
       lot of trouble.  We just omit them.  */
!   ret.unique_id = 0;
    
    /* If there is no version number in the TFM file, then just say it's
       version 0.  */
!   ret.version = dtoa (TFM_SAFE_FONTDIMEN (tfm_info, TFM_VERSION_PARAMETER, 0));
    return ret;
  }
  
  /* Output the common beginning (after the %! line) of a PostScript font
--- 148,225 ----
       fonts to get a UniqueID from them, which is semi-reasonable, but a
       lot of trouble.  We just omit them.  */
!   {
!     string unique_id_str = option_value (ps_global_info, "UniqueID");
!     ret.unique_id = unique_id_str ? atou (unique_id_str) : 0;
!     if (ret.unique_id >= 1 << 24)
!       {
!         WARNING1 ("%u: UniqueID >= 2**24; changing to zero", ret.unique_id);
!         ret.unique_id = 0;
!       }
!   }
    
    /* If there is no version number in the TFM file, then just say it's
       version 0.  */
!   {
!     ret.version = option_value (ps_global_info, "version");
!     if (!ret.version)
!       ret.version
!         = tfm_global_info
!           && TFM_FONTDIMEN_COUNT (*tfm_global_info) >= TFM_VERSION_PARAMETER
!           ? dtoa (TFM_FONTDIMEN (*tfm_global_info, TFM_VERSION_PARAMETER))
!           : "0";
!   }
! 
    return ret;
  }
+ 
+ 
+ /* Consider OPTION_STR as a list of <name>:<value> items separated by
+    commas; return the <value> (as a string) associated with NAME, or
+    NULL.  This could plausibly be put in `lib', but since we have one
+    place (the routine just above) where we need to set each of a given
+    set of names, as opposed to doing something with each specified
+    item, we just define it here.  */
+ 
+ static string 
+ option_value (string option_str, string name)
+ {
+   string item_end;
+   string value = NULL;
+   string item_start = option_str;
+ 
+   if (option_str == NULL)
+     return NULL;
+     
+   do
+     {
+       string item, colon;
+       
+       item_end = strchr (item_start, ',');
+       item = item_end
+              ? substring (item_start, 0, item_end - 1 - item_start)
+              : item_start;
+       colon = strchr (item, ':');
+       
+       if (colon)
+         {
+           string item_name = substring (item, 0, colon - 1 - item);
+           
+           if (STREQ (item_name, name))
+             value = xstrdup (colon + 1);
+ 
+           free (item_name);
+         }
+       else
+         WARNING1 ("%s: Missing colon in option string", item);
+       
+       if (item != item_start)
+         free (item);
+       
+       item_start = item_end + 1;
+     }
+   while (item_end);
+   
+   return value;
+ }
  
  /* Output the common beginning (after the %! line) of a PostScript font
***************
*** 147,155 ****
  
    if (ps_info.unique_id)
!     OUT1 ("/UniqueID %d\n", ps_info.unique_id);
  }
- 
- 
-    
  
  /* Return the name corresponding to the number N in the current
--- 260,265 ----
  
    if (ps_info.unique_id)
!     OUT1 ("/UniqueID %d def\n", ps_info.unique_id);
  }
  
  /* Return the name corresponding to the number N in the current
***************
*** 182,192 ****
  
  
! /* Output the encoding vector to the file F, based on the variables
!    `ps_char_output_p' and `encoding'.  */
! 
! #define INIT_CODE  ENCODING_VECTOR_SIZE
  
  void
! ps_output_encoding (FILE *f)
  {
    unsigned c;
--- 292,300 ----
  
  
! /* Output the encoding vector to the file F, based on CHAR_OUTPUT_P and
!    the global `encoding'.  */
  
  void
! ps_output_encoding (FILE *f, boolean char_output_p[])
  {
    unsigned c;
***************
*** 193,197 ****
    int range_start = -1;
  
!   fprintf (f, "/Encoding %d array\n", ENCODING_VECTOR_SIZE);
  
    for (c = 0; c < ENCODING_VECTOR_SIZE; c++)
--- 301,306 ----
    int range_start = -1;
  
!   fprintf (f, "/Encoding %d array %% %s\n", ENCODING_VECTOR_SIZE,
!            ENCODING_SCHEME_NAME (encoding_info));
  
    for (c = 0; c < ENCODING_VECTOR_SIZE; c++)
***************
*** 198,202 ****
      { /* Write sequences of .notdef's and characters we didn't output
           using a loop.  */
!       if (!ps_char_output_p[c]
  	  || STREQ (ENCODING_CHAR_NAME (encoding_info, c), ".notdef"))
  	{ /* Start or continue a loop.  */
--- 307,312 ----
      { /* Write sequences of .notdef's and characters we didn't output
           using a loop.  */
!       if (!char_output_p[c]
!           || ENCODING_CHAR_NAME (encoding_info, c) == NULL
  	  || STREQ (ENCODING_CHAR_NAME (encoding_info, c), ".notdef"))
  	{ /* Start or continue a loop.  */
***************
*** 218,223 ****
      }
    
!   /* If the encoding ends with .notdef's, we'll be in the midst of a
!      loop. */
    if (range_start != -1)
      out_notdef_loop (f, range_start, c - 1);
--- 328,332 ----
      }
    
!   /* If the character 255 is not encoded, we'll be in the midst of a loop. */
    if (range_start != -1)
      out_notdef_loop (f, range_start, c - 1);
***************
*** 228,233 ****
  
  
! /* Output a loop to write .notdef's into the Encoding vector between
!    START and END.  */
  
  static void
--- 337,342 ----
  
  
! /* Output a loop to put .notdef's into the encoding vector between START
!    and END.  Assume the `Encoding' array is the top of the stack.  */
  
  static void
***************
*** 234,238 ****
  out_notdef_loop (FILE *f, charcode_type start, charcode_type end)
  {
!   /* Assume the Encoding array is the top of the operand stack.  */
!   OUT2 ("  %d 1 %d { 1 index exch /.notdef put } bind for\n", start, end);
  }
--- 343,349 ----
  out_notdef_loop (FILE *f, charcode_type start, charcode_type end)
  {
!   if (start == end)
!     OUT1 ("  dup %d /.notdef put\n", start);
!   else
!     OUT2 ("  %d 1 %d { 1 index exch /.notdef put } bind for\n", start, end);
  }
diff -Nrc2 fontutils-0.5/bzrto/psutil.h fontutils-0.6/bzrto/psutil.h
*** fontutils-0.5/bzrto/psutil.h	Tue Apr 14 08:30:38 1992
--- fontutils-0.6/bzrto/psutil.h	Mon Oct 19 13:27:04 1992
***************
*** 31,34 ****
--- 31,35 ----
    string family_name;
    string font_name;
+   real interword_space;
    int italic_angle; /* In degrees.  */
    boolean monospace_p;
***************
*** 40,48 ****
  
  
! /* Return the information that goes in the FontInfo dictionary for the
!    font FONT_NAME, as well as a few other miscellanous things.  We
!    initialize the `ps_char_output_p' global.  */
! extern ps_font_info_type ps_init (string font_name, string ps_fontname,
!                                   tfm_global_info_type);
  
  /* Output the starting boilerplate that is the same for Type 1 and Type
--- 41,47 ----
  
  
! /* Return the information that goes in the FontInfo dictionary, as well
!    as a few other miscellanous things.  */
! extern ps_font_info_type ps_set_font_info (void);
  
  /* Output the starting boilerplate that is the same for Type 1 and Type
***************
*** 51,61 ****
                             string comment);
  
! /* Output an encoding vector, using a global vector `ps_char_output_p'
!    (declared below) to tell which characters exist in the font.
!    `ps_init' must be called before this.  */
! extern void ps_output_encoding (FILE *);
  
! /* Return the name corresponding to the character code N in the current
!    encoding.  */
  extern string ps_encoding_name (charcode_type n);
  
--- 50,58 ----
                             string comment);
  
! /* Output an encoding vector, using CHAR_OUTPUT_P to tell which
!    characters exist in the font.  */
! extern void ps_output_encoding (FILE *, boolean char_output_p[]);
  
! /* Return the name corresponding to character code N in `encoding_info'.  */
  extern string ps_encoding_name (charcode_type n);
  
***************
*** 64,71 ****
  extern int ps_encoding_number (string name);
  
! /* Says whether a particular character has been output.  Initialized by
!    `ps_init', and used by `ps_output_encoding', et al.  Defined in
!    psutil.c.  */
! extern boolean ps_char_output_p[];
  
  #endif /* not PSUTIL_H */
--- 61,66 ----
  extern int ps_encoding_number (string name);
  
! /* User option; see psutil.c.  */
! extern string ps_global_info;
  
  #endif /* not PSUTIL_H */
diff -Nrc2 fontutils-0.5/bzrto/text.c fontutils-0.6/bzrto/text.c
*** fontutils-0.5/bzrto/text.c	Tue Sep  1 14:04:24 1992
--- fontutils-0.6/bzrto/text.c	Sun Oct 11 15:42:32 1992
***************
*** 66,71 ****
    printf ("  (width \"%.3f\")\n", CHAR_SET_WIDTH (c));
    printf ("  (bb ");
!   OUT_NUM4 (BZR_CHAR_MIN_COL (c), BZR_CHAR_MAX_COL (c),
!             BZR_CHAR_MIN_ROW (c), BZR_CHAR_MAX_ROW (c));
    puts (")");
  
--- 66,71 ----
    printf ("  (width \"%.3f\")\n", CHAR_SET_WIDTH (c));
    printf ("  (bb ");
!   OUT_NUM4 (CHAR_MIN_COL (c), CHAR_MAX_COL (c),
!             CHAR_MIN_ROW (c), CHAR_MAX_ROW (c));
    puts (")");
  
diff -Nrc2 fontutils-0.5/bzrto/version.c fontutils-0.6/bzrto/version.c
*** fontutils-0.5/bzrto/version.c	Thu Sep  3 09:46:19 1992
--- fontutils-0.6/bzrto/version.c	Tue Oct 27 13:27:58 1992
***************
*** 1 ****
! char *version_string = "bzrto version 0.5";
--- 1 ----
! char *version_string = "bzrto version 0.6";
diff -Nrc2 fontutils-0.5/charspace/ChangeLog fontutils-0.6/charspace/ChangeLog
*** fontutils-0.5/charspace/ChangeLog	Thu Sep  3 09:29:46 1992
--- fontutils-0.6/charspace/ChangeLog	Tue Oct 27 13:02:50 1992
***************
*** 1,2 ****
--- 1,6 ----
+ Tue Oct 27 13:01:50 1992  Karl Berry  (karl@cs.umb.edu)
+ 
+ 	* Version 0.6.
+ 
  Thu Sep  3 09:29:46 1992  Karl Berry  (karl@hayley)
  
diff -Nrc2 fontutils-0.5/charspace/version.c fontutils-0.6/charspace/version.c
*** fontutils-0.5/charspace/version.c	Thu Sep  3 09:46:19 1992
--- fontutils-0.6/charspace/version.c	Tue Oct 27 13:27:58 1992
***************
*** 1 ****
! char *version_string = "charspace version 0.5";
--- 1 ----
! char *version_string = "charspace version 0.6";
diff -Nrc2 fontutils-0.5/configure fontutils-0.6/configure
*** fontutils-0.5/configure	Thu Sep  3 09:34:07 1992
--- fontutils-0.6/configure	Thu Oct 15 08:35:21 1992
***************
*** 78,87 ****
  # Find the source files, if location was not specified.
  if test -z "$srcdir"; then
!   srcdirdefaulted=yes; srcdir=.
!   if test ! -r $unique_file; then srcdir=..; fi
  fi
  if test ! -r $srcdir/$unique_file; then
    if test x$srcdirdefaulted = xyes; then
!     echo "configure: Can not find sources in \`.' or \`..'." 1>&2
    else
      echo "configure: Can not find sources in \`${srcdir}'." 1>&2
--- 78,94 ----
  # Find the source files, if location was not specified.
  if test -z "$srcdir"; then
!   srcdirdefaulted=yes
!   # Try the directory containing this script, then `..'.
!   prog=$0
!   confdir=`echo $prog|sed 's%/[^/][^/]*$%%'`
!   test "X$confdir" = "X$prog" && confdir=.
!   srcdir=$confdir
!   if test ! -r $srcdir/$unique_file; then
!     srcdir=..
!   fi
  fi
  if test ! -r $srcdir/$unique_file; then
    if test x$srcdirdefaulted = xyes; then
!     echo "configure: Can not find sources in \`${confdir}' or \`..'." 1>&2
    else
      echo "configure: Can not find sources in \`${srcdir}'." 1>&2
***************
*** 191,195 ****
  # Make sure to not get the incompatible SysV /etc/install and
  # /usr/sbin/install, which might be in PATH before a BSD-like install,
! # or the SunOS /usr/etc/install directory.
  if test -z "$INSTALL"; then
    echo checking for install
--- 198,202 ----
  # Make sure to not get the incompatible SysV /etc/install and
  # /usr/sbin/install, which might be in PATH before a BSD-like install,
! # or the SunOS /usr/etc/install directory, or the AIX /bin/install.
  if test -z "$INSTALL"; then
    echo checking for install
***************
*** 201,208 ****
      *)
        if test -f $dir/install; then
! 	INSTALL="$dir/install -c"
! 	INSTALL_PROGRAM='$(INSTALL)'
! 	INSTALL_DATA='$(INSTALL) -m 644'
! 	break
        fi
        ;;
--- 208,219 ----
      *)
        if test -f $dir/install; then
! 	if grep dspmsg $dir/install >/dev/null 2>&1; then
! 	  : AIX
! 	else
! 	  INSTALL="$dir/install -c"
! 	  INSTALL_PROGRAM='$(INSTALL)'
! 	  INSTALL_DATA='$(INSTALL) -m 644'
! 	  break
! 	fi
        fi
        ;;
***************
*** 230,233 ****
--- 241,277 ----
  
  
+ echo checking for AIX
+ cat <<EOF > conftest.c
+ $DEFS
+ #ifdef _AIX
+   yes
+ #endif
+ 
+ EOF
+ eval "$CPP conftest.c > conftest.out 2>&1"
+ if egrep "yes" conftest.out >/dev/null 2>&1; then
+   DEFS="${DEFS}#define _ALL_SOURCE 1
+ "
+ fi
+ rm -f conftest*
+ 
+ 
+ echo checking for DYNIX/ptx libseq
+ cat <<EOF > conftest.c
+ $DEFS
+ #if defined(_SEQUENT_)
+   yes
+ #endif
+ 
+ EOF
+ eval "$CPP conftest.c > conftest.out 2>&1"
+ if egrep "yes" conftest.out >/dev/null 2>&1; then
+   SEQUENT=1
+ fi
+ rm -f conftest*
+ 
+ test -n "$SEQUENT" && test -f /usr/lib/libseq.a &&
+   LIBS="$LIBS -lseq"
+ 
  echo checking for POSIXized ISC
  if test -d /etc/conf/kconfig.d &&
***************
*** 249,252 ****
--- 293,398 ----
  fi
  
+ echo checking for minix/config.h
+ cat <<EOF > conftest.c
+ $DEFS
+ #include <minix/config.h>
+ EOF
+ err=`eval "$CPP conftest.c 2>&1 >/dev/null"`
+ if test -z "$err"; then
+   MINIX=1
+ fi
+ rm -f conftest*
+ 
+ # The Minix shell can't assign to the same variable on the same line!
+ if test -n "$MINIX"; then
+   DEFS="${DEFS}#define _POSIX_SOURCE 1
+ "
+   DEFS="${DEFS}#define _POSIX_1_SOURCE 2
+ "
+   DEFS="${DEFS}#define _MINIX 1
+ "
+ fi
+ 
+ echo checking for directory library header
+ echo checking for dirent.h
+ cat <<EOF > conftest.c
+ $DEFS
+ #include <dirent.h>
+ EOF
+ err=`eval "$CPP conftest.c 2>&1 >/dev/null"`
+ if test -z "$err"; then
+   DEFS="${DEFS}#define DIRENT 1
+ " dirheader=dirent.h
+ fi
+ rm -f conftest*
+ 
+ if test -z "$dirheader"; then
+ echo checking for sys/ndir.h
+ cat <<EOF > conftest.c
+ $DEFS
+ #include <sys/ndir.h>
+ EOF
+ err=`eval "$CPP conftest.c 2>&1 >/dev/null"`
+ if test -z "$err"; then
+   DEFS="${DEFS}#define SYSNDIR 1
+ " dirheader=sys/ndir.h
+ fi
+ rm -f conftest*
+ 
+ fi
+ if test -z "$dirheader"; then
+ echo checking for sys/dir.h
+ cat <<EOF > conftest.c
+ $DEFS
+ #include <sys/dir.h>
+ EOF
+ err=`eval "$CPP conftest.c 2>&1 >/dev/null"`
+ if test -z "$err"; then
+   DEFS="${DEFS}#define SYSDIR 1
+ " dirheader=sys/dir.h
+ fi
+ rm -f conftest*
+ 
+ fi
+ 
+ echo checking for closedir return value
+ cat <<EOF > conftest.c
+ #include <sys/types.h>
+ #include <$dirheader>
+ int closedir(); main() { exit(0); }
+ EOF
+ eval $compile
+ if test -s conftest && (./conftest; exit) 2>/dev/null; then
+   :
+ else
+   DEFS="${DEFS}#define VOID_CLOSEDIR 1
+ "
+ fi
+ rm -f conftest*
+ 
+ echo checking for Xenix
+ cat <<EOF > conftest.c
+ $DEFS
+ #if defined(M_XENIX) && !defined(M_UNIX)
+   yes
+ #endif
+ 
+ EOF
+ eval "$CPP conftest.c > conftest.out 2>&1"
+ if egrep "yes" conftest.out >/dev/null 2>&1; then
+   XENIX=1
+ fi
+ rm -f conftest*
+ 
+ if test -n "$XENIX"; then
+   DEFS="${DEFS}#define VOID_CLOSEDIR 1
+ "
+   LIBS="$LIBS -lx"
+   case "$DEFS" in
+   *SYSNDIR*) ;;
+   *) LIBS="-ldir $LIBS" ;; # Make sure -ldir precedes any -lx.
+   esac
+ fi
+ 
  
  echo checking for directory library header
***************
*** 363,366 ****
--- 509,513 ----
  #include <stdarg.h>
  #include <string.h>
+ #include <float.h>
  #include <limits.h>
  EOF
***************
*** 416,419 ****
--- 563,568 ----
    elif test -r /usr/X11/include/Box.h
    then dir=/usr/X11/include
+   elif test -r /usr/X11R5/include/Box.h
+   then dir=/usr/X11R5/include
    fi
  
***************
*** 436,439 ****
--- 585,590 ----
  elif test -r /usr/X11/lib/libXaw.a
  then dir1=/usr/X11/lib
+ elif test -r /usr/X11R5/lib/libXaw.a
+ then dir1=/usr/X11R5/lib
  fi
  dir2=""
***************
*** 452,456 ****
      if test $dir != . && test -f $dir/gcc; then
        # Not all systems have dirname.
!       prefix=`echo $dir|sed 's,/[^/][^/]*$,,'`
        break
      fi
--- 603,607 ----
      if test $dir != . && test -f $dir/gcc; then
        # Not all systems have dirname.
!       prefix=`echo $dir|sed 's%/[^/][^/]*$%%'`
        break
      fi
***************
*** 463,471 ****
  if test -n "$prefix"; then
    test -z "$exec_prefix" && exec_prefix='$(prefix)'
!   prsub="s,^prefix[ 	]*=.*$,prefix = $prefix,"
  fi
  if test -n "$exec_prefix"; then
    prsub="$prsub
! s,^exec_prefix[ 	]*=.*$,exec_prefix = $exec_prefix,"
  fi
  
--- 614,622 ----
  if test -n "$prefix"; then
    test -z "$exec_prefix" && exec_prefix='$(prefix)'
!   prsub="s%^prefix[ 	]*=.*$%prefix = $prefix%"
  fi
  if test -n "$exec_prefix"; then
    prsub="$prsub
! s%^exec_prefix[ 	]*=.*$%exec_prefix = $exec_prefix%"
  fi
  
***************
*** 477,481 ****
  # Generated automatically by configure.
  # Run this file to recreate the current configuration.
! # This directory was configured as follows:
  # $0 $*
  
--- 628,634 ----
  # Generated automatically by configure.
  # Run this file to recreate the current configuration.
! # This directory was configured as follows,
! # on host `(hostname || uname -n) 2>/dev/null`:
! #
  # $0 $*
  
***************
*** 485,489 ****
  esac
  
! trap 'rm -f ./GNUmakefile include/c-auto.h; exit 1' 1 3 15
  CC='$CC'
  CPP='$CPP'
--- 638,642 ----
  esac
  
! trap 'rm -f ./GNUmakefile doc/Makefile include/c-auto.h; exit 1' 1 3 15
  CC='$CC'
  CPP='$CPP'
***************
*** 505,512 ****
  
  top_srcdir=$srcdir
! for file in ./GNUmakefile; do
    srcdir=$top_srcdir
    # Remove last slash and all that follows it.  Not all systems have dirname.
!   dir=`echo $file|sed 's,/[^/][^/]*$,,'`
    if test "$dir" != "$file"; then
      test "$top_srcdir" != . && srcdir=$top_srcdir/$dir
--- 658,665 ----
  
  top_srcdir=$srcdir
! for file in ./GNUmakefile doc/Makefile; do
    srcdir=$top_srcdir
    # Remove last slash and all that follows it.  Not all systems have dirname.
!   dir=`echo $file|sed 's%/[^/][^/]*$%%'`
    if test "$dir" != "$file"; then
      test "$top_srcdir" != . && srcdir=$top_srcdir/$dir
***************
*** 518,532 ****
    sed -e "
  $prsub
! s,@CC@,$CC,g
! s,@CPP@,$CPP,g
! s,@INSTALL@,$INSTALL,g
! s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,g
! s,@INSTALL_DATA@,$INSTALL_DATA,g
! s,@RANLIB@,$RANLIB,g
! s,@wlibs@,$wlibs,g
! s,@xincludedir@,$xincludedir,g
! s,@xlibdir@,$xlibdir,g
! s,@LIBS@,$LIBS,g
! s,@srcdir@,$srcdir,g
  " $top_srcdir/${file}.in >> $file
  done
--- 671,685 ----
    sed -e "
  $prsub
! s%@CC@%$CC%g
! s%@CPP@%$CPP%g
! s%@INSTALL@%$INSTALL%g
! s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
! s%@INSTALL_DATA@%$INSTALL_DATA%g
! s%@RANLIB@%$RANLIB%g
! s%@wlibs@%$wlibs%g
! s%@xincludedir@%$xincludedir%g
! s%@xlibdir@%$xlibdir%g
! s%@LIBS@%$LIBS%g
! s%@srcdir@%$srcdir%g
  " $top_srcdir/${file}.in >> $file
  done
***************
*** 545,548 ****
--- 698,702 ----
  filenum == 1 && $1 == "#define" \
  { defs[$2] = $3
+   defined[$2] = 1
    for (i = 4; i <= NF; i++)
      defs[$2] = defs[$2] " " $i
***************
*** 550,554 ****
  /END_OF_DEFS/ { filenum = 2; next }
  filenum == 2 && $1 == "#define" && \
! defs[$2] != "" {
    $3 = defs[$2]
    print; next
--- 704,708 ----
  /END_OF_DEFS/ { filenum = 2; next }
  filenum == 2 && $1 == "#define" && \
! defined[$2] == 1 {
    $3 = defs[$2]
    print; next
***************
*** 555,559 ****
  }
  filenum == 2 && $1 == "#undef" && \
! defs[$2] != "" {
    $1 = "#define"
    $2 = $2 " " defs[$2]
--- 709,713 ----
  }
  filenum == 2 && $1 == "#undef" && \
! defined[$2] == 1 {
    $1 = "#define"
    $2 = $2 " " defs[$2]
diff -Nrc2 fontutils-0.5/configure.in fontutils-0.6/configure.in
*** fontutils-0.5/configure.in	Wed Jul 22 08:50:53 1992
--- fontutils-0.6/configure.in	Mon Oct  5 10:29:32 1992
***************
*** 18,23 ****
--- 18,27 ----
  AC_PROG_RANLIB
  
+ AC_AIX
+ AC_DYNIX_SEQ
  AC_ISC_POSIX
  AC_ISC_WLIBS
+ AC_MINIX
+ AC_XENIX_DIR
  
  AC_DIR_HEADER
***************
*** 33,35 ****
  
  # This will generate `Makefile'(s), `config.status', and our header file.
! AC_OUTPUT(./GNUmakefile)
--- 37,39 ----
  
  # This will generate `Makefile'(s), `config.status', and our header file.
! AC_OUTPUT(./GNUmakefile doc/Makefile)
diff -Nrc2 fontutils-0.5/data/ChangeLog fontutils-0.6/data/ChangeLog
*** fontutils-0.5/data/ChangeLog	Thu Sep  3 09:29:53 1992
--- fontutils-0.6/data/ChangeLog	Wed Oct 28 16:08:15 1992
***************
*** 1,2 ****
--- 1,32 ----
+ 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)
  
diff -Nrc2 fontutils-0.5/data/ascii.enc fontutils-0.6/data/ascii.enc
*** fontutils-0.5/data/ascii.enc	Fri Mar 20 14:59:47 1992
--- fontutils-0.6/data/ascii.enc	Mon Oct 19 08:07:58 1992
***************
*** 127,257 ****
  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
- .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
- .notdef
- .notdef
- .notdef
- .notdef
- .notdef
- .notdef
- .notdef
- .notdef
--- 127,128 ----
diff -Nrc2 fontutils-0.5/data/defs.make fontutils-0.6/data/defs.make
*** fontutils-0.5/data/defs.make	Mon Aug 31 09:45:54 1992
--- fontutils-0.6/data/defs.make	Tue Oct 27 13:26:06 1992
***************
*** 29,33 ****
  LDFLAGS = $(XLDFLAGS)
  LIBS = -lm
! RANLIB = true
  srcdir = .
  
--- 29,33 ----
  LDFLAGS = $(XLDFLAGS)
  LIBS = -lm
! RANLIB = @true
  srcdir = .
  
***************
*** 117,120 ****
--- 117,121 ----
  	mkdir $(distdir)
  	ln ChangeLog GNUmakefile M.depend README $(distdir)
+ 	if test -n "$(y)"; then $(MAKE) $(y).c; fi
  	find \( -name \*.c -o -name \*.h \) -exec ln '{}' $(distdir)/'{}' \;
  .PHONY: dist
***************
*** 134,139 ****
  
  distclean:: clean
! # Remove all files that would not be in a distribution.
  .PHONY: distclean
  
  realclean:: distclean
--- 135,146 ----
  
  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
diff -Nrc2 fontutils-0.5/data/defsprog.make fontutils-0.6/data/defsprog.make
*** fontutils-0.5/data/defsprog.make	Wed Sep  2 17:31:07 1992
--- fontutils-0.6/data/defsprog.make	Wed Oct 28 16:08:24 1992
***************
*** 21,25 ****
  
  install:: $(program)
! 	$(INSTALL_PROGRAM) $(program) $(bindir)
  
  # Make sure all the libraries this program needs are built.
--- 21,25 ----
  
  install:: $(program)
! 	$(INSTALL_PROGRAM) $(program) $(bindir)/$(program)
  
  # Make sure all the libraries this program needs are built.
diff -Nrc2 fontutils-0.5/data/encoding.map fontutils-0.6/data/encoding.map
*** fontutils-0.5/data/encoding.map	Tue Jul 28 14:53:25 1992
--- fontutils-0.6/data/encoding.map	Mon Oct 19 08:07:58 1992
***************
*** 9,12 ****
--- 9,13 ----
  gnulatin	GNU Latin text
  gnulcomp 	GNU Latin text complement
+ mflogo		AEFMNOT only
  psymbol 	PostScript Symbol
  texlatin	Extended TeX Latin
diff -Nrc2 fontutils-0.5/data/ggmr.1200cmi fontutils-0.6/data/ggmr.1200cmi
*** fontutils-0.5/data/ggmr.1200cmi	Wed Sep  2 15:26:25 1992
--- fontutils-0.6/data/ggmr.1200cmi	Sun Oct  4 11:31:40 1992
***************
*** 1,3 ****
! % Charspace input for the main Garamond letters.
  
  codingscheme "GNU Latin text"
--- 1,3 ----
! % Charspace input for page 42/Atlas of Typeforms Garamond roman.
  
  codingscheme "GNU Latin text"
diff -Nrc2 fontutils-0.5/data/ggmr.ifi fontutils-0.6/data/ggmr.ifi
*** fontutils-0.5/data/ggmr.ifi	Tue Aug 18 14:03:43 1992
--- fontutils-0.6/data/ggmr.ifi	Sun Oct  4 11:31:40 1992
***************
*** 1,3 ****
! % Info for Monotype Garamond roman 30 pt, page 42 of An Atlas of Typeforms.
  A 3 % to -1
  B 2 % to -1
--- 1,13 ----
! % 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
diff -Nrc2 fontutils-0.5/data/mflogo.enc fontutils-0.6/data/mflogo.enc
*** fontutils-0.5/data/mflogo.enc
--- fontutils-0.6/data/mflogo.enc	Mon Oct 19 08:07:58 1992
***************
*** 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 -Nrc2 fontutils-0.5/doc/Makefile.in fontutils-0.6/doc/Makefile.in
*** fontutils-0.5/doc/Makefile.in
--- fontutils-0.6/doc/Makefile.in	Wed Oct 28 16:10:29 1992
***************
*** 0 ****
--- 1,92 ----
+ # Makefile for the various bits of documentation.
+ #
+ # 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 1, 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.
+ 
+ # For `install'.
+ prefix = /usr/local
+ infodir = $(prefix)/info
+ 
+ INSTALL = @INSTALL@
+ INSTALL_DATA = @INSTALL_DATA@
+ 
+ MAKEINFO = makeinfo
+ SHELL = /bin/sh
+ TEX = tex
+ TEXINDEX = texindex
+ 
+ default: fontu.info
+ 
+ all: INSTALL fontu.dvi
+ 
+ fontu.dvi: fontu.cps
+ 	$(TEX) fontu.texi
+ fontu.cps: fontu.cp
+ 	$(TEXINDEX) fontu.??
+ fontu.cp: *.texi
+ 	$(TEX) fontu.texi
+ 
+ fontu.info: *.texi
+ 	$(MAKEINFO) fontu.texi
+ 
+ install: fontu.info
+ 	for i in fontu.info*; do $(INSTALL_DATA) $$i $(infodir); done
+ 
+ update:
+ 	emacs -batch -l update.el
+ 
+ # We don't automatically generate dependencies.
+ depend:
+ 
+ # Separate the installation instructions into a separate file, for the
+ # benefit of people who don't want to look at the info file.
+ INSTALL: fontu.info
+ 	sed -n '/Node: Installation/,/Good luck./p' fontu.info-1 \
+           | grep -v  > $@
+ 
+ # Prevent GNU make 3 from overflowing arg limit on system V.
+ .NOEXPORT:
+ 
+ # `make dist' should only be called from the top-level Makefile, as it
+ # depends on $(version), $(top_distdir), and $(dir).
+ # 
+ distdir = ../$(top_distdir)/$(dir)
+ distfiles = Makefile.in update.el *.texi
+ 
+ dist::
+ 	mkdir $(distdir)
+ 	ln Makefile $(distfiles) $(distdir)
+ 	cp -p $(plain)/texinfo.tex $(distdir)
+ #
+ # Have to add the version number and date before making the Info file.
+ 	(cd $(distdir); \
+          add-version $(version) fontu.texi intro.texi; \
+          add-date fontu.texi; \
+  	 $(MAKE) INSTALL fontu.cps distclean)
+ 	mv $(distdir)/INSTALL ../$(top_distdir)/INSTALL
+ 
+ clean mostlyclean:
+ 	rm -f fontu.?? *.dvi *.log *.toc
+ 
+ distclean: clean
+ 	rm -f Makefile
+ 	for f in fontu.??s; do if test ! -s $$f; then rm -f $$f; fi; done
+ 
+ extraclean: distclean
+ 	rm -f *~ \#* patch* *.orig *.rej *.bak *.ckp core a.out
+ 
+ realclean: distclean
+ 	rm -f *.info* fontu.??? INSTALL
diff -Nrc2 fontutils-0.5/doc/bugs.texi fontutils-0.6/doc/bugs.texi
*** fontutils-0.5/doc/bugs.texi	Thu Sep  3 09:28:54 1992
--- fontutils-0.6/doc/bugs.texi	Mon Oct 12 10:06:49 1992
***************
*** 6,11 ****
  @chapter Bugs
  
! @cindex bugs, reporting
  
  Your bug reports are essential in making these programs reliable.
  
--- 6,13 ----
  @chapter Bugs
  
! (This chapter is adapted from the analogous one in the GCC manual,
! written by Richard Stallman.)
  
+ @cindex bug reports, purpose of
  Your bug reports are essential in making these programs reliable.
  
***************
*** 22,28 ****
  suggestions for improvements, no matter how small.
  
! To enable us to fix the bug, you should include all the following.  If
! the bug was in installation, as opposed to in actually running one of
! the programs, the last two items are irrelevant.
  
  @itemize @bullet
--- 24,125 ----
  suggestions for improvements, no matter how small.
  
! In order for a bug report to serve its purpose, you must include the
! information that makes for fixing the bug, as described below.
! 
! Thanks (in advance)!
! 
! @menu
! * Bug criteria::                Have you found a bug?
! * Bug reporting::               How to effectively report a bug.
! @end menu
! 
! 
! @node Bug criteria, Bug reporting,  , Bugs
! @section Bug criteria
! 
! @cindex criteria for bugs
! @cindex bugs, criteria for
! 
! If you are not sure whether you have found a bug, here are some
! guidelines:
! 
! @itemize @bullet
! 
! @item
! @cindex fatal signals
! If a program gets a fatal signal, for any input whatsoever, that
! is a bug.  Reliable programs never crash.
! 
! @item
! @cindex invalid output fonts
! @cindex bad output fonts
! @cindex validity of fonts, checking
! @cindex fatal errors and invalid output fonts
! @pindex gftype@r{, checking validity font}
! @pindex tftopl@r{, checking validity font}
! If a program produces an invalid font, for any input whatsoever, that is
! a bug---unless the program reported a fatal error that forced it to quit
! prematurely.  For example, if Metafont gives errors reading the output
! of @code{bzrto -mf}, that is a bug.  You can run the @TeX{} utility
! programs GFtype and TFtoPL to check the validity of a GF or TFM file.
! 
! @item
! @cindex error messages, spurious
! @cindex spurious error messages
! If a program gives an error message for valid input, that is a bug.
! Similarly, if a program gives a fatal error when it could continue
! processing, that is a bug.  It is sometimes hard to tell if these
! conditions obtain; you must use your best judgement.
! 
! @item
! @cindex error messages, missing
! If a program does not give an error message for invalid input, that is a bug.
! 
! @end itemize
! 
! 
! @node Bug reporting,  , Bug criteria, Bugs
! @section Bug reporting
! 
! @cindex bugs, reporting
! @cindex compilation bugs, reporting
! @cindex installation bugs, reporting
! 
! The purpose of a bug report is to enable someone to
! fix the bug if it is not known.  It isn't important what happens if the
! bug is already known.  Therefore, always write your bug reports on the
! assumption that the bug is not known.
! 
! Sometimes people give a few sketchy facts and ask, ``Does this ring a
! bell?'' or ``Should this be happening?''  This cannot help us fix a bug,
! so it is basically useless.  We can only respond by asking for the
! details below, so we can investigate.  You might as well expedite
! matters by sending them to begin with.
! 
! Try to make your bug report self-contained.  If we ask you for more
! information, it is best if you include all the original information in
! your response, as well as the new information.  We might have discarded
! the previous message, or even if we haven't, it takes us time to search
! for it.  Similarly, if you've reported bugs before, it is still best to
! send all the information; we can't possibly remember what environment
! everyone uses!
! 
! @menu
! * Necessary information::       What you need to send.
! * Unnecessary information::     What you don't need to send.
! * Documentation bugs::          Report the bugs in the manual, too.
! @end menu
! 
! 
! @node Necessary information, Unnecessary information,  , Bug reporting
! @subsection Necessary information
! 
! To enable us to fix a bug, please include all the information below.  If
! the bug was in compilation or installation, as opposed to in actually
! running one of the programs, the last two items are irrelevant.  But in
! that case, please also make sure it is not a known problem before
! reporting it.  @xref{Problems}.
! 
! You should include all of the following in your bug report:
  
  @itemize @bullet
***************
*** 29,33 ****
  
  @item
! The version of the font utilities.  You can get this from the top-level
  files @file{ChangeLog} or @file{GNUmakefile.in}, or from the
  @samp{-version} option which all the programs have.
--- 126,130 ----
  
  @item
! The version number of the program.  You can get this from the top-level
  files @file{ChangeLog} or @file{GNUmakefile.in}, or from the
  @samp{-version} option which all the programs have.
***************
*** 38,42 ****
  
  @item
! A description of the bug.
  
  @item
--- 135,140 ----
  
  @item
! A description of the bug.  For example, ``The program gets a fatal
! signal,'' or ``The baselines in the generated font are too high.''
  
  @item
***************
*** 58,78 ****
  But if you don't want to take the time to break up the font, please send
  in the bug report anyway (with the entire font).  We much prefer that to
! you not reporting the bug at all.
  
  @end itemize
  
! @cindex compilation bugs, reporting
! @cindex installation bugs, reporting
! If the bug is in compilation or installation, please make sure it is not
! a known problem before reporting it.  @xref{Problems}.
  
  @cindex manual bugs, reporting
  @cindex documentation bugs, reporting
  It is just as important to report bugs in the documentation as in the
  programs.  If you want to do something using these programs, and reading
! the manual doesn't tell you how to do it, that is probably a bug.  In
! fact, the best way to report it is something like: ``I want to do
! @var{x}; I looked in the manual in sections @var{a}, @var{b}, and
! @var{c}, but they only explained part of how to do @var{x}.''
  
  If your bug report makes it clear that you've actually made an attempt
--- 156,245 ----
  But if you don't want to take the time to break up the font, please send
  in the bug report anyway (with the entire font).  We much prefer that to
! you not reporting the bug at all!
  
  @end itemize
  
! In other words, we need enough information so that we can run the
! offending program under the debugger, so we can find out what's
! happening.  Without all the command-line arguments, or the input file in
! question, we cannot do this.  Since you must have found the bug by
! running the program with a particular set of options and on a particular
! input file, you already have this information; all you need to do is
! send it!
! 
! 
! @node Unnecessary information, Documentation bugs, Necessary information, Bug reporting
! @subsection Unnecessary information
! 
! Here are some things that are not necessary to include in a bug report.
! 
! @itemize @bullet
! 
! @item
! @cindex envelope of bugs
! @cindex bugs, envelope of
! A description of the envelope of the bug.
! 
! Often people who encounter a bug spend a lot of time investigating which
! changes to the input file or command-line options will make the bug go
! away and which changes will not affect it.
! 
! This is often time consuming and not very useful, because the way we
! will find the bug is by running a single example under the debugger with
! breakpoints, not by pure deduction from a series of examples.  You might
! as well save your time for something else.
! 
! @item
! @cindex patches for bugs
! @cindex bugs, sending patches for
! @cindex sending patches for bugs
! A patch for the bug.
! 
! A patch for the bug is useful if it is a good one.  But don't omit the
! necessary information, such as the test case, on the assumption that a
! patch is all we need.  We might see problems with your patch and decide
! to fix the problem another way, or we might not understand the patch at
! all.  Without an example, we won't be able to verify that the bug is
! fixed.
! 
! Also, if we can't understand what bug you are trying to fix, or why your
! patch should be an improvement, we won't install it.  A test case will
! help us to understand.
  
+ @xref{Sending Patches, , Sending Patches for GNU CC, gcc, GCC Manual},
+ for more details on the best way to write changes.
+ 
+ @item
+ @cindex bugs, sending backtraces for
+ @cindex backtraces, sending for bugs
+ Sometimes people send just a backtrace, but that is not useful by
+ itself.  It is usually the values of local or global variables which
+ matter, sometimes very far away from the location where you noticed the
+ bug.  We need to be able to run the debugger ourselves to investigate.
+ 
+ @item
+ @cindex bugs, guesses about cause
+ @cindex guesses about bugs
+ A guess about what the bug is or what it depends on.
+ 
+ Such guesses are not useful, and often wrong.  It is impossible to guess
+ correctly without using the debugger to find the facts, so you might as
+ well save your imagination for other things!
+ 
+ @end itemize
+ 
+ 
+ @node Documentation bugs,  , Unnecessary information, Bug reporting
+ @subsection Documentation bugs
+ 
  @cindex manual bugs, reporting
  @cindex documentation bugs, reporting
+ 
  It is just as important to report bugs in the documentation as in the
  programs.  If you want to do something using these programs, and reading
! the manual doesn't tell you how, that is probably a bug.  In fact, the
! best way to report it is something like: ``I want to do @var{x}; I
! looked in the manual in sections @var{a} and @var{b}, but they didn't
! explain it.''
  
  If your bug report makes it clear that you've actually made an attempt
***************
*** 79,82 ****
  to find the answers using the manual, we will be much more likely to
  take action (since we won't have to search the manual ourselves).
- 
- Thanks (in advance)!
--- 246,247 ----
diff -Nrc2 fontutils-0.5/doc/bzredit.texi fontutils-0.6/doc/bzredit.texi
*** fontutils-0.5/doc/bzredit.texi	Wed Sep  2 17:17:14 1992
--- fontutils-0.6/doc/bzredit.texi	Mon Oct  5 10:02:21 1992
***************
*** 167,174 ****
  @enumerate
  
  @findex bpl-quit
  @cindex quitting @code{bpl-mode}
  @cindex leaving @code{bpl-mode}
! @item
  @code{bpl-quit} (@kbd{C-c q} and @kbd{C-c C-q}), which kills the
  Ghostscript subprocess and then removes the BPL buffer from the screen.
--- 167,176 ----
  @enumerate
  
+ @item
  @findex bpl-quit
  @cindex quitting @code{bpl-mode}
  @cindex leaving @code{bpl-mode}
! @kindex C-c q
! @kindex C-c C-q
  @code{bpl-quit} (@kbd{C-c q} and @kbd{C-c C-q}), which kills the
  Ghostscript subprocess and then removes the BPL buffer from the screen.
***************
*** 176,182 ****
  left for you to do by hand.
  
  @findex bpl-erasepage
  @findex erasepage
! @item
  @code{bpl-erasepage} (@kbd{C-c e} and @kbd{C-c C-e}), which sends an
  @code{erasepage} command to Ghostscript, thus erasing whatever is
--- 178,186 ----
  left for you to do by hand.
  
+ @item
  @findex bpl-erasepage
  @findex erasepage
! @kindex C-c e
! @kindex C-c C-e
  @code{bpl-erasepage} (@kbd{C-c e} and @kbd{C-c C-e}), which sends an
  @code{erasepage} command to Ghostscript, thus erasing whatever is
***************
*** 183,191 ****
  currently displayed.
  
  @findex bpl-show-char
  @cindex showing edited characters
  @cindex displaying edited characters
! @item
! @code{bpl-show-char} (@kbd{C-c e} and @kbd{C-c C-c}), which sends to
  Ghostscript a PostScript translation of the character that point is in.
  
--- 187,197 ----
  currently displayed.
  
+ @item
  @findex bpl-show-char
  @cindex showing edited characters
  @cindex displaying edited characters
! @kindex C-c c
! @kindex C-c C-C
! @code{bpl-show-char} (@kbd{C-c c} and @kbd{C-c C-c}), which sends to
  Ghostscript a PostScript translation of the character that point is in.
  
diff -Nrc2 fontutils-0.5/doc/bzrto.texi fontutils-0.6/doc/bzrto.texi
*** fontutils-0.5/doc/bzrto.texi	Thu Sep  3 15:26:25 1992
--- fontutils-0.6/doc/bzrto.texi	Tue Oct 20 10:04:22 1992
***************
*** 51,64 ****
  @cindex BZR files, converting to Metafont
  
  Metafont is a language for specifying graphic shapes, particularly
  characters in a font of a type, as well as the name of the program which
  interprets the language.  It is commonly used to generate fonts for
! @TeX{}-related software (@TeX{} and Metafont were developed more-or-less
! simultaneously by Donald Knuth during the years 1977--1985).
! @xref{Archives}, for how to obtain the Metafont program.
  
  @opindex -metafont
  BZRto generates a Metafont font @file{@var{foo}.mf} from the input file
! @file{@var{foo}.bzr} if you specify the @samp{-metafont} option, as in:
  
  @example
--- 51,66 ----
  @cindex BZR files, converting to Metafont
  
+ @cindex Knuth, Donald E.
  Metafont is a language for specifying graphic shapes, particularly
  characters in a font of a type, as well as the name of the program which
  interprets the language.  It is commonly used to generate fonts for
! @TeX{} and related software (@TeX{} and Metafont were developed
! more-or-less simultaneously by Donald Knuth during the years
! 1977--1985).  @xref{Archives}, for how to obtain the Metafont program.
  
  @opindex -metafont
  BZRto generates a Metafont font @file{@var{foo}.mf} from the input file
! @file{@var{foo}10.bzr} (the @samp{10} being the design size of the
! input) if you specify the @samp{-metafont} option, as in:
  
  @example
***************
*** 83,89 ****
  The assignment to @code{mode} tells Metafont the name of your output
  device.  @code{localfont} should be a synonym for some real output
! device, as defined when Metafont was installed; the GF file will be
! named @file{@var{foo}.@var{dpi}gf}, where @var{dpi} is the resolution of
! the @code{localfont} device.
  
  Given the TFM and GF file, you can now use the font in @TeX{}.
--- 85,91 ----
  The assignment to @code{mode} tells Metafont the name of your output
  device.  @code{localfont} should be a synonym for some real output
! device, defined when Metafont was installed.  The GF file will be named
! @file{@var{foo}.@var{dpi}gf}, where @var{dpi} is the resolution of the
! @code{localfont} device.
  
  Given the TFM and GF file, you can now use the font in @TeX{}.
***************
*** 91,95 ****
  @menu
  * Metafont output at any size::  Making larger or smaller fonts.
! * Proofing with Metafont::     Metafont can help with debugging fonts.
  @end menu
  
--- 93,97 ----
  @menu
  * Metafont output at any size::  Making larger or smaller fonts.
! * Proofing with Metafont::      Metafont can help with debugging fonts.
  @end menu
  
***************
*** 131,135 ****
  By default, @code{mag} is 1.0.  You can also assign to both @code{mag}
  and @code{designsize}.  For example, if you set @code{designsize} to 5
! and @code{mag} to 4, the output will be a font at a size of 20@dmn{pt}.
  
  @cindex nonlinear scaling
--- 133,137 ----
  By default, @code{mag} is 1.0.  You can also assign to both @code{mag}
  and @code{designsize}.  For example, if you set @code{designsize} to 5
! and @code{mag} to 4, the output will be a 20@dmn{pt} font.
  
  @cindex nonlinear scaling
***************
*** 157,163 ****
  enough to be able to make out small details.  This blowing-up process is
  called @dfn{proofing}.  Metafont works together with GFtoDVI, another
! program created as part of the @TeX{} project, to make this fairly easy
! to accomplish.
  
  You can make two kinds of proofs with Metafont: @dfn{gray proofs} and
  @dfn{smoke proofs}.  Metafont calls the former @code{proof} mode, and
--- 159,166 ----
  enough to be able to make out small details.  This blowing-up process is
  called @dfn{proofing}.  Metafont works together with GFtoDVI, another
! program created as part of the @TeX{} project, to do this.
  
+ @cindex gray proofs
+ @cindex smoke proofs
  You can make two kinds of proofs with Metafont: @dfn{gray proofs} and
  @dfn{smoke proofs}.  Metafont calls the former @code{proof} mode, and
***************
*** 170,173 ****
--- 173,177 ----
  @end example
  
+ @findex nodisplays
  @noindent (See the preceding sections for general information on running
  Metafont.)  In @code{proof} or @code{smoke} mode, by default Metafont
***************
*** 184,188 ****
  resolution is chosen so that the @code{designsize} of the font fills
  @code{proof_size} inches; by default, @code{proof_size} is 7, which
! works well both for letter-size and A4 paper.
  
  @vindex proof_resolution
--- 188,192 ----
  resolution is chosen so that the @code{designsize} of the font fills
  @code{proof_size} inches; by default, @code{proof_size} is 7, which
! works well enough for both letter-size and A4 paper.
  
  @vindex proof_resolution
***************
*** 191,195 ****
  300 by default.
  
! @flindex bzrsetup.mf
  You can change the values of @code{proof_size} and
  @code{proof_resolution} on the command line; the actual calculation is
--- 195,199 ----
  300 by default.
  
! @flindex bzrsetup.mf@r{, computing proof values}
  You can change the values of @code{proof_size} and
  @code{proof_resolution} on the command line; the actual calculation is
***************
*** 198,208 ****
  After running Metafont, you will have a GF file, e.g.,
  @file{@var{foo}.2602gf}.  You can then make a DVI file you can preview
! or print with: @samp{gftodvi @var{foo}.2602gf}; this creates
! @file{@var{foo}.dvi}.  In the DVI output from GFtoDVI, each character in
! the font has its own page.  Some additional information is also present,
! as follows:
  
  @cindex gray fonts
! @cindex gray proofs
  In @code{proof} mode, the character shapes are printed in a ``gray''
  font, and the starting and ending points of each spline (or line) in the
--- 202,216 ----
  After running Metafont, you will have a GF file, e.g.,
  @file{@var{foo}.2602gf}.  You can then make a DVI file you can preview
! or print with:
! @example
! gftodvi @var{foo}.2602gf
! @end example
! @noindent This creates @file{@var{foo}.dvi}.  In the DVI output from
! GFtoDVI, each character in the font has its own page.  Some additional
! information is also present, as follows:
  
  @cindex gray fonts
! @cindex control points of splines, seeing
! @cindex endpoints of splines, seeings
  In @code{proof} mode, the character shapes are printed in a ``gray''
  font, and the starting and ending points of each spline (or line) in the
***************
*** 213,224 ****
  the right defining where it appears.
  
! @cindex smoke proofs
  In @code{smoke} mode, the character shapes are printed in black; if you
! put the output on a wall and stand back, you can get a decent idea of
! how the font is coming along.  The character is also shown at its true
! size off to the right (assuming you made the font at the true-size
  resolution, of course).
  
  @opindex -overflow-label-offset
  You may find that the extra information to the right of the character
  (``overflow equations'' in @code{proof} mode; the true-size character in
--- 221,235 ----
  the right defining where it appears.
  
! @cindex Wall, The
  In @code{smoke} mode, the character shapes are printed in black; if you
! put the output on the wall and stand back, you can get an idea of how
! the font is coming along.  The character is also shown at its true size
! off to the right (assuming you have made the font at the true-size
  resolution, of course).
  
  @opindex -overflow-label-offset
+ @cindex losing proof information
+ @cindex proof information, losing
+ @cindex overflow equations, losing
  You may find that the extra information to the right of the character
  (``overflow equations'' in @code{proof} mode; the true-size character in
***************
*** 239,244 ****
  @cindex BZR files, converting to Type 1
  
! The Type 1 font format is the most common representation for PostScript
! fonts, invented by Adobe Systems, Inc.  Adobe first published its
  specification in the book @cite{Adobe Type 1 Font Format} in 1990.  It
  defines a limited set of operations; general PostScript programs cannot
--- 250,255 ----
  @cindex BZR files, converting to Type 1
  
! The Type 1 font format, invented by Adobe Systems, Inc., is the most
! common representation for PostScript fonts.  Adobe first published its
  specification in the book @cite{Adobe Type 1 Font Format} in 1990.  It
  defines a limited set of operations; general PostScript programs cannot
***************
*** 245,253 ****
  be represented as Type 1 fonts.  It also defines hints---ways of
  improving characters' appearances at low resolution and/or small small
! sizes---which cannot be represented in PostScript itself.
  
  @opindex -pstype1
  BZRto generates a Type 1 font @file{@var{foo}.gsf} from the input file
! @file{@var{foo}.bzr} if you specify the @samp{-pstype1} option, as in:
  
  @example
--- 256,265 ----
  be represented as Type 1 fonts.  It also defines hints---ways of
  improving characters' appearances at low resolution and/or small small
! sizes---which cannot be represented in PostScript proper.
  
  @opindex -pstype1
  BZRto generates a Type 1 font @file{@var{foo}.gsf} from the input file
! @file{@var{foo}10.bzr} (the @samp{10} being the design size of the
! input) if you specify the @samp{-pstype1} option, as in:
  
  @example
***************
*** 256,260 ****
  
  The file @file{@var{foo}.gsf} consists only of plain text (it's not
! really ``human-readable'', since Type 1 format requires some encryption
  of the character outlines).
  
--- 268,272 ----
  
  The file @file{@var{foo}.gsf} consists only of plain text (it's not
! really ``human-readable'', since Type 1 format requires encryption
  of the character outlines).
  
***************
*** 262,267 ****
  @cindex Type 1 fonts, encryption of
  @cindex unencrypted Type 1 fonts
! Although Type 1 format allows for encryption of the entire font, it does
! not insist on it, and naturally BZRto does not do so.  Some deficient
  PostScript interpreters do not recognize unencrypted fonts; but
  Ghostscript, the GNU quasi-PostScript interpreter, has no trouble.  We
--- 274,279 ----
  @cindex Type 1 fonts, encryption of
  @cindex unencrypted Type 1 fonts
! Although Type 1 format also allows for encryption of the entire font,
! this is not required, and BZRto does not do it.  Some deficient
  PostScript interpreters do not recognize unencrypted fonts; but
  Ghostscript, the GNU quasi-PostScript interpreter, has no trouble.  We
***************
*** 279,286 ****
  
  Type 3 PostScript fonts are not defined in a singular format, as are
! Type 1 or Metafont fonts (see the previous sections).  Rather, they are
! general PostScript programs which happen to meet the PostScript
! language's (liberal) requirements for being a font.  They can therefore
! be used with any PostScript interpreter.
  
  @opindex -pstype3
--- 291,298 ----
  
  Type 3 PostScript fonts are not defined in a singular format, as are
! Type 1 fonts (see the previous section).  Rather, they are general
! PostScript programs which happen to meet the PostScript language's
! (liberal) requirements for being a font.  They can therefore be used
! with any PostScript interpreter.
  
  @opindex -pstype3
***************
*** 293,296 ****
--- 305,309 ----
  @end example
  
+ @cindex PF3 abbreviation
  We do not know of any conventional extension for Type 3 fonts; we made
  up @file{pf3} to stand for ``PostScript font Type 3''.
***************
*** 299,303 ****
  The most important part of a Type 3 font is the @code{BuildChar}
  routine, which does the actual rendering from the character program.
! Unlike Type 1 fonts, each Type 3 font must supply its own
  @code{BuildChar} routine.
  
--- 312,317 ----
  The most important part of a Type 3 font is the @code{BuildChar}
  routine, which does the actual rendering from the character program.
! Unlike Type 1 fonts, whose @code{BuildChar} routine is built into the
! PostScript interpreter, each Type 3 font supplies its own
  @code{BuildChar} routine.
  
***************
*** 308,316 ****
  directory).  They use the PostScript @code{run} command to read that
  file; so if you want to download one to a printer (which naturally will
! not have access to that file), you must replace the @code{run} command
! with the contents of the file.  For PostScript interpreters which run on
! a host computer, such as Ghostscript, you have to install
! @file{bzrbuildch.PS} in a directory where it will be found, but you need
! not modify the fonts.
  
  
--- 322,330 ----
  directory).  They use the PostScript @code{run} command to read that
  file; so if you want to download one to a printer (which naturally will
! not have access to the file on your computer), you must replace the
! @code{run} command with the contents of the file.  For PostScript
! interpreters which run on a host computer, such as Ghostscript, you have
! to install @file{bzrbuildch.PS} in a directory where it will be found,
! but you need not modify the fonts.
  
  
***************
*** 416,419 ****
--- 430,434 ----
  
  @item bbheight ( @var{name} )
+ @vindex bbheight @r{CCC dimension}
  The height exclusive of blank space above or below the shape of the
  character @var{name} if it exists.
***************
*** 420,428 ****
  
  @item bbwidth ( @var{name} )
  The width exclusive of side bearings of the character @var{name} if it
  exists.
  
- @vindex capheight @r{CCC dimension}
  @item capheight 
  The height of the capital letters, e.g., @samp{H}.  See @samp{xheight}
  for how this is determined.
--- 435,444 ----
  
  @item bbwidth ( @var{name} )
+ @vindex bbwidth @r{CCC dimension}
  The width exclusive of side bearings of the character @var{name} if it
  exists.
  
  @item capheight 
+ @vindex capheight @r{CCC dimension}
  The height of the capital letters, e.g., @samp{H}.  See @samp{xheight}
  for how this is determined.
***************
*** 429,442 ****
  
  @item depth ( @var{name} )
! The TFM depth of the character @var{name}.
             
  @item designsize 
! The design size of the main input font, as stored in the TFM file.
  
  @item em
  The quad width of the font.  This value is determined analogously to
! @samp{xheight}, above.
             
  @item fontdepth 
  The maximum depth any character in the font descends below the baseline.
  Again, this is determined analogously to @samp{xheight}.
--- 445,462 ----
  
  @item depth ( @var{name} )
! @vindex depth @r{CCC dimension}
! The depth of the character @var{name}.
             
  @item designsize 
! @vindex designsize @r{CCC dimension}
! The design size of the main input BZR font.
  
  @item em
+ @vindex em @r{CCC dimension}
  The quad width of the font.  This value is determined analogously to
! @samp{xheight}, below.
             
  @item fontdepth 
+ @vindex fontdepth @r{CCC dimension}
  The maximum depth any character in the font descends below the baseline.
  Again, this is determined analogously to @samp{xheight}.
***************
*** 443,450 ****
  
  @item height ( @var{name} ) 
! The TFM height of the character @var{name}.
  
- @vindex pt @r{CCC dimension}
  @item pt 
  Printer's points; 72.27@dmn{pt} = 1@dmn{in}.  Since dimensions specified
  in points are absolute distances, they do not scale when the font size
--- 463,471 ----
  
  @item height ( @var{name} ) 
! @vindex height @r{CCC dimension}
! The height of the character @var{name}.
  
  @item pt 
+ @vindex pt @r{CCC dimension}
  Printer's points; 72.27@dmn{pt} = 1@dmn{in}.  Since dimensions specified
  in points are absolute distances, they do not scale when the font size
***************
*** 452,463 ****
  
  @item width ( @var{name} ) 
! The TFM width of the character @var{name}.
  
- @vindex xheight @r{CCC dimension}
  @item xheight 
! The x-height of the main input font.  If the TFM file defines this, its
! value is used; otherwise, the height of a suitable character (e.g.,
! @samp{x}) is used if one exists; otherwise, it's zero.  BZRto treats the
! other font-related units of measure in the same way.
  
  @end table
--- 473,486 ----
  
  @item width ( @var{name} ) 
! @vindex width @r{CCC dimension}
! The set width of the character @var{name}.
  
  @item xheight 
! @vindex xheight @r{CCC dimension}
! The x-height of the main input font.  If a TFM file corresponding to the
! main BZR file exists and defines this, that value is used; otherwise, the
! height of a suitable character (e.g., @samp{x}) is used if one exists;
! otherwise, it's zero.  BZRto treats the other font-related units of
! measure in the same way.
  
  @end table
***************
*** 481,484 ****
--- 504,508 ----
  @table @samp
  
+ @item -concat @var{bzr-name1}, @var{bzr-name2}, @dots{}
  @opindex -concat
  @cindex concatenating outline fonts
***************
*** 486,498 ****
  @cindex outline fonts, concatenating
  @cindex font concatenation
- @item -concat @var{bzr-name1}, @var{bzr-name2}, @dots{}
  Concatenate the main input file with the given @var{bzr-name}s; if a
  character code exists in more than one of the BZR files, it's the first
! occurrence that counts.  You must have a TFM file for each
! @var{bzr-name}.  The BZR files can have any design size; the output is
! normalized to the size of the main input file.
  
- @opindex -ccc-file
  @item -ccc-file @var{filename}
  Read the CCC file @var{filename} (if @var{filename} has a suffix) or
  @file{@var{filename}.ccc} (if it doesn't).  Default is to use
--- 510,520 ----
  @cindex outline fonts, concatenating
  @cindex font concatenation
  Concatenate the main input file with the given @var{bzr-name}s; if a
  character code exists in more than one of the BZR files, it's the first
! occurrence that counts.  The BZR files can have any design size; the
! output is normalized to the size of the main input file.
  
  @item -ccc-file @var{filename}
+ @opindex -ccc-file
  Read the CCC file @var{filename} (if @var{filename} has a suffix) or
  @file{@var{filename}.ccc} (if it doesn't).  Default is to use
***************
*** 500,506 ****
  the file @file{@var{font-name}.ccc}, it does not complain.
  
  @opindex -encoding
  @cindex encoding of input fonts
- @item -encoding @var{filename}
  Specify the encoding file for the input font, so character names in the
  CCC files can be matched to character codes.  If @var{filename} has no
--- 522,528 ----
  the file @file{@var{font-name}.ccc}, it does not complain.
  
+ @item -encoding @var{filename}
  @opindex -encoding
  @cindex encoding of input fonts
  Specify the encoding file for the input font, so character names in the
  CCC files can be matched to character codes.  If @var{filename} has no
***************
*** 507,539 ****
  suffix, use @file{@var{filename}.enc}, otherwise just @var{filename}.
  The default is to guess the encoding from the @samp{codingscheme} string
! in the TFM file.
  
- @opindex -fontname
- @item -fontname @var{string}
- the full name of the output font, e.g.,
- `Times-BoldItalic'; default is the @var{font-name}.
- 
- @opindex -help
  @item -help
  Print a usage message.  @xref{Common options}.
  
- @opindex -metafont
  @item -metafont
  Translate the input to a Metafont program; write to
  @file{@var{font-name}.mf}.  @xref{Metafont and BZRto}.
  
- @opindex -mf
  @item -mf
! Synonym for @samp{-mf}.
  
  @opindex -oblique-angle
  @cindex slanted fonts, making
  @cindex oblique fonts, making
- @item -oblique-angle @var{angle-in-degrees}
  Angle in degrees from the vertical by which to slant the shapes; default
  is zero.
  
- @opindex -output-file
  @item -output-file @var{filename}
  Output to @var{filename} (if it has a suffix) or to
  @file{@var{filename}.@var{font-format}} (if it doesn't), where
--- 529,556 ----
  suffix, use @file{@var{filename}.enc}, otherwise just @var{filename}.
  The default is to guess the encoding from the @samp{codingscheme} string
! in a TFM file corresponding to the main input file, if such exists.
  
  @item -help
+ @opindex -help
  Print a usage message.  @xref{Common options}.
  
  @item -metafont
+ @opindex -metafont
  Translate the input to a Metafont program; write to
  @file{@var{font-name}.mf}.  @xref{Metafont and BZRto}.
  
  @item -mf
! @opindex -mf
! Synonym for @samp{-metafont}.
  
+ @item -oblique-angle @var{angle-in-degrees}
  @opindex -oblique-angle
  @cindex slanted fonts, making
  @cindex oblique fonts, making
  Angle in degrees from the vertical by which to slant the shapes; default
  is zero.
  
  @item -output-file @var{filename}
+ @opindex -output-file
  Output to @var{filename} (if it has a suffix) or to
  @file{@var{filename}.@var{font-format}} (if it doesn't), where
***************
*** 544,573 ****
  input filename of @file{cmr10} becomes @file{cmr}.
  
! @opindex -pstype1
  @item -pstype1
  Translate the input to (unencrypted) PostScript Type 1 font format;
  write to @file{@var{font-name}.gsf}.  @xref{Type 1 and BZRto}.
  
- @opindex -pstype3
  @item -pstype3
  Translate the input to PostScript Type 3 font format; write to
  @file{@var{font-name}.pf3}.  @xref{Type 3 and BZRto}.
  
- @opindex -range
  @item -range @var{char1}-@var{char2}
  Only process characters between the character codes @var{char1} and
  @var{char2}, inclusive.
  
- @opindex -text
  @item -text
  Translate the font to a BPL file, i.e., human-readable text; write to
  standard output.  @xref{BPL files}.
  
- @opindex -verbose
  @item -verbose
! Output progress reports.
  
- @opindex -version
  @item -version
  Print the version number.
  
--- 561,661 ----
  input filename of @file{cmr10} becomes @file{cmr}.
  
! @item -ps-font-info @var{name1}:@var{value1},@dots{}
! @opindex -ps-font-info
! @vindex FontInfo
! Assign each @var{value} to the corresponding @var{name} when outputting
! a PostScript font (either Type 1 or Type 3).  Case is significant in
! both the @var{name}s and @var{value}s.  You can specify the following:
! 
! @table @samp
! 
! @item FontName:@var{string}
! @vindex FontName @r{in PostScript fonts}
! @vindex unknown @r{font name}
! The full PostScript name of the font; e.g., @code{Times-BoldItalic}.
! The default is @code{unknown}.
! 
! @item FamilyName:@var{string}
! @vindex FamilyName @r{in PostScript fonts}
! The name of the typeface family to which this font belongs; e.g.,
! @code{Times}.  The default is to use @code{FontName} up to the first
! @samp{-}.
! 
! @item Weight:@var{string}
! @vindex Weight @r{in PostScript fonts}
! The typographic weight of the font, e.g., @code{Bold}.  If
! @code{FontName} contains one of the strings @samp{Black}, @samp{Book},
! @samp{Bold}, @samp{Demi}, @samp{ExtraBold}, @samp{Light}, @samp{Heavy},
! @samp{Regular}, @samp{Semibold}, or @samp{Ultra}, that is the
! weight.  Otherwise, BZRto uses @samp{Medium}.
! 
! @item ItalicAngle:@var{real}
! @vindex ItalicAngle @r{in PostScript fonts}
! The angle in degrees by which the font slopes to the right from the
! vertical.  Default is zero.  Typical slanted or italic fonts have values
! between 10--20.
! 
! @item isFixedPitch:@code{true} @r{or} @code{false}
! @vindex isFixedPitch @r{in PostScript fonts}
! @cindex monospaced PostScript fonts
! Whether or not this font is monospaced.  If a TFM file corresponding to
! the main BZR file exists, and specifies a zero interword stretch and
! shrink, and a nonzero interword space, the default is @code{true}.
! Otherwise, it's @code{false}.
! 
! @item UnderlinePosition:@var{real}
! @vindex UnderlinePosition @r{in PostScript fonts}
! Distance from the baseline for positioning underlines, in units of the
! character coordinate system.  Default is @math{-100}.
! 
! @item UnderlineThickness:@var{real}
! @vindex UnderlineThickness @r{in PostScript fonts}
! Thickness of underlines.  Default is 50.
! 
! @item UniqueID:@var{non-negative integer}
! @vindex UniqueID @r{in PostScript fonts}
! An integer in the range 0 to 16777215 (2^24 - 1) uniquely identifying
! this font.  The default is zero, meaning (for our purposes) not to
! output any @code{UniqueID}.  This avoids unlikely-but-possible conflicts
! with existing fonts.
! 
! @item version:@var{string}
! @vindex version @r{in PostScript fonts}
! Identification for the particular version of this font.  If a TFM file
! corresponding to the main BZR file exists, and specifies a version
! number, that is the default; otherwise, there is none.
! 
! @end table
! 
! @noindent All values except @code{FontName} and @code{UniqueID} go in
! the @code{FontInfo} dictionary.
! 
  @item -pstype1
+ @opindex -pstype1
  Translate the input to (unencrypted) PostScript Type 1 font format;
  write to @file{@var{font-name}.gsf}.  @xref{Type 1 and BZRto}.
  
  @item -pstype3
+ @opindex -pstype3
  Translate the input to PostScript Type 3 font format; write to
  @file{@var{font-name}.pf3}.  @xref{Type 3 and BZRto}.
  
  @item -range @var{char1}-@var{char2}
+ @opindex -range
  Only process characters between the character codes @var{char1} and
  @var{char2}, inclusive.
  
  @item -text
+ @opindex -text
  Translate the font to a BPL file, i.e., human-readable text; write to
  standard output.  @xref{BPL files}.
  
  @item -verbose
! @opindex -verbose
! Output progress reports to standard output, unless @samp{-text} is
! specified, in which case output to standard error.
  
  @item -version
+ @opindex -version
  Print the version number.
  
diff -Nrc2 fontutils-0.5/doc/charspace.texi fontutils-0.6/doc/charspace.texi
*** fontutils-0.5/doc/charspace.texi	Wed Sep  2 17:17:16 1992
--- fontutils-0.6/doc/charspace.texi	Tue Oct 20 10:04:22 1992
***************
*** 300,304 ****
  @cindex numeral widths
  @vindex numeral-width @r{variable in @file{common.cmi}}
! @flindex common.cmi, @r{numerals in}
  For example, in most fonts, the numerals all have the same width, to
  ease typesetting of columns of them in tables.  Thus, @file{common.cmi}
--- 300,304 ----
  @cindex numeral widths
  @vindex numeral-width @r{variable in @file{common.cmi}}
! @flindex common.cmi@r{, numerals in}
  For example, in most fonts, the numerals all have the same width, to
  ease typesetting of columns of them in tables.  Thus, @file{common.cmi}
***************
*** 519,529 ****
  varies according to the type design: a narrow, spiky typeface will
  have a small interword space relative to a wide, regular one.
  
  @vindex stretch @r{fontdimen}
  @item stretch @r{(3)}
! The @code{stretch} parameter defines the interword stretch of the
! font.  This is typically about one-half of the @code{space} parameter.
! @TeX{} is reluctant to increase interword spacing beyond the width
! @math{@code{space} + @code{stretch}}.
  
  @vindex shrink @r{fontdimen}
--- 519,531 ----
  varies according to the type design: a narrow, spiky typeface will
  have a small interword space relative to a wide, regular one.
+ Exception: in math fonts, the interword space is zero.
  
  @vindex stretch @r{fontdimen}
  @item stretch @r{(3)}
! The @code{stretch} parameter defines the interword stretch of the font.
! This is typically about one-half of the @code{space} parameter.  @TeX{}
! is reluctant to increase interword spacing beyond the width
! @math{@code{space} + @code{stretch}}.  In monospaced fonts, the stretch
! is typically zero.
  
  @vindex shrink @r{fontdimen}
***************
*** 532,536 ****
  This is typically about one-third of the @code{space} parameter.  @TeX{}
  does not decrease interword spacing beyond the width @math{@code{space}
! - @code{shrink}}.
  
  @vindex xheight @r{fontdimen}
--- 534,538 ----
  This is typically about one-third of the @code{space} parameter.  @TeX{}
  does not decrease interword spacing beyond the width @math{@code{space}
! - @code{shrink}}.  In monospaced fonts, the shrink is typically zero.
  
  @vindex xheight @r{fontdimen}
***************
*** 551,555 ****
  @item quad @r{(6)}
  The @code{quad} fontdimen defines the value of the @code{em} dimension
! in @TeX{}.  This is often the same as the design size of the font, but,
  as usual, that's not an absolute requirement.
  
--- 553,557 ----
  @item quad @r{(6)}
  The @code{quad} fontdimen defines the value of the @code{em} dimension
! in @TeX{}.  This is often the same as the design size of the font, but
  as usual, that's not an absolute requirement.
  
diff -Nrc2 fontutils-0.5/doc/enhance.texi fontutils-0.6/doc/enhance.texi
*** fontutils-0.5/doc/enhance.texi	Thu Sep  3 14:18:21 1992
--- fontutils-0.6/doc/enhance.texi	Mon Oct 19 17:30:21 1992
***************
*** 142,150 ****
  unclear how far back the law extends, but Times Roman, designed in the
  late 1920's and 1930's by Stanley Morison and cut by Victor Lardent for
! the Monotype Corporation is probably covered.  (Except that Monotype has
! gone out of business---but probably its creditors would still pursue
! it.)  This does not mean GNU cannot have a Times Roman; it just means we
! cannot start with an English version.  (The law does not forbid
! importing copies of English typefaces.)
  
  @cindex France, font design protection law
--- 142,148 ----
  unclear how far back the law extends, but Times Roman, designed in the
  late 1920's and 1930's by Stanley Morison and cut by Victor Lardent for
! Monotype is probably covered.  This does not mean GNU cannot have a
! Times Roman; it just means we cannot start with an English version, as
! the law does not forbid importing foreign versions of English typefaces.
  
  @cindex France, font design protection law
***************
*** 154,159 ****
  The Romain du Roi typeface designed by Philippe Grandjean in 1702 for
  the French royal family is protected, and perhaps other such ``royal''
! designs.   Since GNU would not want these anyway, it is not
! affected.
  
  @end table
--- 152,157 ----
  The Romain du Roi typeface designed by Philippe Grandjean in 1702 for
  the French royal family is protected, and perhaps other such ``royal''
! designs.  Since these are not widely used anyway, it's not important
! that GNU provide them.
  
  @end table
***************
*** 188,205 ****
  @item BZRto
  @itemize @bullet
- @cindex TrueType
  @item
  Output more font formats, e.g., TrueType.
  @item
  Output hints for Metafont and Type 1 fonts.
- @vindex FontInfo
  @item
  Make better guesses for the @code{FontInfo} information.
- @cindex obliquing
  @item
  Handle obliquing fonts by changing the transform matrix in the output,
  instead of changing the numbers in the splines.
  @item
  Do nonlinear scaling.
  @end itemize
  
--- 186,211 ----
  @item BZRto
  @itemize @bullet
  @item
+ @cindex TrueType
  Output more font formats, e.g., TrueType.
  @item
  Output hints for Metafont and Type 1 fonts.
  @item
+ @vindex FontInfo
  Make better guesses for the @code{FontInfo} information.
  @item
+ @cindex obliquing
  Handle obliquing fonts by changing the transform matrix in the output,
  instead of changing the numbers in the splines.
  @item
+ @cindex nonlinear scaling
+ @cindex scaling, nonlinear
+ @cindex anamorphic scaling
+ @cindex optical scaling
  Do nonlinear scaling.
+ @item
+ @cindex italic corrections
+ Handle italic corrections in the Metafont output somehow.  Probably have
+ to do the same in Charspace.
  @end itemize
  
***************
*** 206,214 ****
  @item Fontconvert
  @itemize @bullet
- @cindex virtual fonts
  @item
  Output virtual fonts as an option, instead of another bitmap font.
- @cindex encodings, translating between
  @item
  Allow specifying entire input encodings and output encodings (the
  same @file{.enc} files that the other programs read).
--- 212,220 ----
  @item Fontconvert
  @itemize @bullet
  @item
+ @cindex virtual fonts
  Output virtual fonts as an option, instead of another bitmap font.
  @item
+ @cindex encodings, translating between
  Allow specifying entire input encodings and output encodings (the
  same @file{.enc} files that the other programs read).
***************
*** 226,237 ****
  @item GSrenderfont
  @itemize @bullet
  @cindex size of characters, maximum
  @cindex limit on character size
- @item
  Allow for characters larger than 1 inch square in the original font.
  @cindex slanted fonts
  @cindex extended fonts
  @cindex small caps
- @item
  Implement slanting, extending, and small caps, a la Dvips.
  @end itemize
--- 232,243 ----
  @item GSrenderfont
  @itemize @bullet
+ @item
  @cindex size of characters, maximum
  @cindex limit on character size
  Allow for characters larger than 1 inch square in the original font.
+ @item
  @cindex slanted fonts
  @cindex extended fonts
  @cindex small caps
  Implement slanting, extending, and small caps, a la Dvips.
  @end itemize
***************
*** 239,248 ****
  @item Imageto
  @itemize @bullet
- @cindex Tiff
  @item
  Recognize more image formats, e.g., Tiff.
  @cindex splitting characters
  @cindex characters, splitting
- @item
  Perhaps the @samp{-column-split} option in Fontconvert should be
  removed, and the equivalent information specified in the IFI file.
--- 245,254 ----
  @item Imageto
  @itemize @bullet
  @item
+ @cindex Tiff
  Recognize more image formats, e.g., Tiff.
+ @item
  @cindex splitting characters
  @cindex characters, splitting
  Perhaps the @samp{-column-split} option in Fontconvert should be
  removed, and the equivalent information specified in the IFI file.
***************
*** 254,261 ****
  Perhaps combine with Imageto.
  @item
  Implement a good rotation algorithm, perhaps as described in: ``A Fast
  Algorithm for General Raster Rotation'', by Alan Paeth, @cite{Graphics
! Interface '86}, pages 77--81.  We'd be interested in hearing of
! alternatives, especially for the case of 90 degree rotation only.
  @end itemize
  
--- 260,271 ----
  Perhaps combine with Imageto.
  @item
+ @pindex pnmrotate
+ @cindex rotation algorithm
  Implement a good rotation algorithm, perhaps as described in: ``A Fast
  Algorithm for General Raster Rotation'', by Alan Paeth, @cite{Graphics
! Interface '86}, pages 77--81.  (We'd be interested in hearing of
! optimized alternatives for the case of 90 degree rotation only).  The
! program @code{pnmrotate}, which mentions that article, in the PBMplus
! distribution could perhaps be adapted.
  @end itemize
  
***************
*** 265,275 ****
  Extend the encoding files to allow defining math attributes, probably by
  rewriting the parsing routines as a Bison grammar.
  @findex string_to_bitmap
  @flindex font.c
! @item
  Write a variant of @code{string_to_bitmap} (in @file{font.c}) which
  understands kerns and ligatures.
- @cindex BDF format
  @item
  Add support for BDF or other bitmap formats.  Unrelated utility programs
  now exist for handling the X11 BDF format (specifically, Bdf2gf and
--- 275,288 ----
  Extend the encoding files to allow defining math attributes, probably by
  rewriting the parsing routines as a Bison grammar.
+ @item
  @findex string_to_bitmap
  @flindex font.c
! @cindex typesetting kerns and ligatures
! @cindex kerns, typesetting
! @cindex ligatures, typesetting
  Write a variant of @code{string_to_bitmap} (in @file{font.c}) which
  understands kerns and ligatures.
  @item
+ @cindex BDF format
  Add support for BDF or other bitmap formats.  Unrelated utility programs
  now exist for handling the X11 BDF format (specifically, Bdf2gf and
***************
*** 423,428 ****
  options}, for more information on option parsing.
  
! @pindex configure
! @flindex include/c-auto.h, @r{creation of}
  The @file{configure} script used to determine system dependencies is
  generated by GNU Autoconf from @file{configure.in}.  When
--- 436,441 ----
  options}, for more information on option parsing.
  
! @pindex configure@r{, creation of}
! @flindex include/c-auto.h@r{, creation of}
  The @file{configure} script used to determine system dependencies is
  generated by GNU Autoconf from @file{configure.in}.  When
diff -Nrc2 fontutils-0.5/doc/fontcvt.texi fontutils-0.6/doc/fontcvt.texi
*** fontutils-0.5/doc/fontcvt.texi	Wed Sep  2 17:17:16 1992
--- fontutils-0.6/doc/fontcvt.texi	Fri Oct 23 15:23:07 1992
***************
*** 149,162 ****
  fonts.
  
- @opindex -space
- @cindex space character, adding
- @item -space [@var{charspec}]
- If Fontconvert is writing a GF file, output at position @var{charspec}
- an entirely blank character, with the width of the interword space in
- the TFM file for the main input font.  If you specify just
- @samp{-space}, without @var{charspec}, the default is 32.  If
- Fontconvert cannot find a TFM file for the main input font, it complains
- and does not output the character.
- 
  @opindex -column-split
  @cindex splitting characters
--- 149,152 ----
***************
*** 383,389 ****
  Print a usage message.  @xref{Common options}.
  
  @opindex -output-file
  @cindex output file, naming
- @item -output-file @var{filename}
  If @var{filename} has a suffix and if only one output file is to be
  written, write to @var{filename}.  If @var{filename} has a suffix and
--- 373,379 ----
  Print a usage message.  @xref{Common options}.
  
+ @item -output-file @var{filename}
  @opindex -output-file
  @cindex output file, naming
  If @var{filename} has a suffix and if only one output file is to be
  written, write to @var{filename}.  If @var{filename} has a suffix and
***************
*** 398,407 ****
  By default, use the name of the main input font for @var{filename}.
  
- @opindex -verbose
  @item -verbose
  Output progress reports.
  
- @opindex -version
  @item -version
  Print the version number.
  
--- 388,397 ----
  By default, use the name of the main input font for @var{filename}.
  
  @item -verbose
+ @opindex -verbose
  Output progress reports.
  
  @item -version
+ @opindex -version
  Print the version number.
  
diff -Nrc2 fontutils-0.5/doc/fontu.texi fontutils-0.6/doc/fontu.texi
*** fontutils-0.5/doc/fontu.texi	Thu Sep  3 15:26:25 1992
--- fontutils-0.6/doc/fontu.texi	Tue Oct 27 13:27:08 1992
***************
*** 18,21 ****
--- 18,22 ----
  @syncodeindex fl cp
  @syncodeindex fn cp
+ @syncodeindex ky cp
  @syncodeindex op cp
  @syncodeindex pg cp
***************
*** 52,57 ****
  into another language, under the above conditions for modified versions,
  except that the sections entitled ``Freedom'' and ``GNU General Public
! License'' may be included in a translation approved by the author
! instead of in the original English.
  @end ifinfo
  
--- 53,58 ----
  into another language, under the above conditions for modified versions,
  except that the sections entitled ``Freedom'' and ``GNU General Public
! License'' may be included in a translation approved by the Free Software
! Foundation instead of in the original English.
  @end ifinfo
  
***************
*** 60,68 ****
  
  @title Font utilities
! @subtitle for version 0.5
! @subtitle September 1992
  @author Karl Berry
  @author with Kathryn A. Hargreaves
  @page
  @vskip 0pt plus 1filll
  Copyright @copyright{} 1992 Free Software Foundation.
--- 61,71 ----
  
  @title Font utilities
! @subtitle for version 0.6
! @subtitle October 1992
  @author Karl Berry
  @author with Kathryn A. Hargreaves
+ 
  @page
+ 
  @vskip 0pt plus 1filll
  Copyright @copyright{} 1992 Free Software Foundation.
***************
*** 83,87 ****
  except that the sections entitled ``Regain your programming freedom''
  and ``GNU General Public License'' may be included in a translation
! approved by the author instead of in the original English.
  
  @end titlepage
--- 86,90 ----
  except that the sections entitled ``Regain your programming freedom''
  and ``GNU General Public License'' may be included in a translation
! approved by the Free Software Foundation instead of in the original English.
  
  @end titlepage
***************
*** 90,97 ****
  @ifinfo
  @node Top, Introduction, (dir), (dir)
  
  This manual documents how to install and run the GNU font utilities.  It
! corresponds to version 0.5 (released in
! September 1992).
  
  The introduction briefly describes the purpose and philosophy of the
--- 93,101 ----
  @ifinfo
  @node Top, Introduction, (dir), (dir)
+ @top Introduction
  
  This manual documents how to install and run the GNU font utilities.  It
! corresponds to version 0.6 (released in
! October 1992).
  
  The introduction briefly describes the purpose and philosophy of the
***************
*** 106,110 ****
  @menu
  * Introduction::                A brief introduction.
! * Installation::                How to install the font utilities.
  * Overview::                    Commonalities to the programs,
  				  a roadmap to how they fit together,
--- 110,114 ----
  @menu
  * Introduction::                A brief introduction.
! * Installation::                How to compile and install the font utilities.
  * Overview::                    Commonalities to the programs,
  				  a roadmap to how they fit together,
***************
*** 127,133 ****
  * Index::                       General index.
  
- 
- 
- 
   --- The Detailed Node Listing ---
  
--- 131,134 ----
***************
*** 167,170 ****
--- 168,182 ----
  * Numeric character codes::     Decimal, octal, hex, or ASCII.
  
+ Bugs
+ 
+ * Bug criteria::                Have you found a bug?
+ * Bug reporting::               How to effectively report a bug.
+ 
+ Bug reporting
+ 
+ * Necessary information::       What you need to send.
+ * Unnecessary information::     What you don't need to send.
+ * Documentation bugs::          Report the bugs in the manual, too.
+ 
  File formats
  
***************
*** 190,193 ****
--- 202,206 ----
  * Viewing an image::            Seeing what's in an image.
  * Image to font conversion::    Extracting a font.
+ * Dirty images::                Handling scanning artifacts or other noise.
  
  IMGrotate
diff -Nrc2 fontutils-0.5/doc/gsrenderf.texi fontutils-0.6/doc/gsrenderf.texi
*** fontutils-0.5/doc/gsrenderf.texi	Wed Sep  2 17:17:14 1992
--- fontutils-0.6/doc/gsrenderf.texi	Sat Oct 24 05:19:05 1992
***************
*** 27,30 ****
--- 27,35 ----
  the extra step after running @TeX{} can be quite inconvenient.
  
+ @pindex ps2pk
+ An alternative to using GSrenderfont is the standalone C program
+ @code{ps2pk}.  It does the same job: rasterizing PostScript fonts.  It
+ is available by ftp from @samp{ftp.urc.tue.nl}.
+ 
  @flindex gsrenderfont/main.c
  @cindex GSrenderfont, prerequisites for
***************
*** 36,44 ****
  @pindex wc
  @cindex Imageto, used by GSrenderfont
- @cindex Fontconvert, used by GSrenderfont
  Besides Ghostscript, GSrenderfont uses @code{gawk} (GNU Awk), the
  standard Unix utilities @code{tail} and @code{wc}, the standard @TeX{}
! utility @code{gftopk}, other programs from this distribution (Imageto
! and Fontconvert), and one small program written expressly for it,
  @code{bbcount}.  Since this last is of doubtful value for anything but
  GSrenderfont, it is not documented here.  See @file{gsrenderfont/main.c}
--- 41,48 ----
  @pindex wc
  @cindex Imageto, used by GSrenderfont
  Besides Ghostscript, GSrenderfont uses @code{gawk} (GNU Awk), the
  standard Unix utilities @code{tail} and @code{wc}, the standard @TeX{}
! utility @code{gftopk}, another programs from this distribution
! (Imageto), and one small program written expressly for it,
  @code{bbcount}.  Since this last is of doubtful value for anything but
  GSrenderfont, it is not documented here.  See @file{gsrenderfont/main.c}
***************
*** 78,90 ****
  @cindex names of fonts in GSrenderfont
  
! GSrenderfont needs two font names to do its job: the PostScript name,
! e.g., @samp{Times-Roman}, and the (output) filename, e.g., @file{ptmr}.
  
  @opindex -font
! You can explicitly specify the first with the @samp{-font} option, and
! the second with a non-option argument.  If you specify both, as in
  
  @example
! gsrenderfont -font=Times-Roman ptmr
  @end example
  
--- 82,103 ----
  @cindex names of fonts in GSrenderfont
  
! @cindex PostScript font names, as filenames
! GSrenderfont needs at least two font names to do its job: the PostScript
! name, e.g., @samp{Times-Roman}, and the output filename, e.g.,
! @file{ptmr}.  (The PostScript font name cannot also be used as the
! filename because of its length.  At best, the result would be unwieldy,
! and at worst, invalid because of operating system restrictions.)
! If the font is not known to Ghostscript (i.e., in its @file{Fontmap}
! @flindex Fontmap
! file), then an input filename is also needed.
  
  @opindex -font
! @opindex -output-file
! You can explicitly specify the first with the @samp{-font} option, the
! second with the @samp{-output-file} option, and the third with a
! non-option argument.  If you specify them all, as in
  
  @example
! gsrenderfont -font=Myfont -out=test myfont.ps
  @end example
  
***************
*** 96,106 ****
  @cindex mapping file for PostScript fonts
  @cindex PostScript fonts, mapping file for
! But if you specify only one, GSrenderfont tries to guess the other using
! a @dfn{mapping file}.  On each line of this file the first
! (whitespace-delimited) word is the filename (possibly preceded by an
! @samp{r}; see @ref{Top, , Introduction, fontname, Filenames for fonts},
! for why), the second word is the PostScript font name, and any remaining
! stuff is ignored.  Unlike the other data files, GSrenderfont does not
! use path searching to find this file; it just uses the default:
  
  @example
--- 109,120 ----
  @cindex mapping file for PostScript fonts
  @cindex PostScript fonts, mapping file for
! But if you specify only the font name or the input filename,
! GSrenderfont tries to guess the other using a @dfn{mapping file}.  On
! each line of this file the first (whitespace-delimited) @dfn{word} is
! the filename (possibly preceded by an @samp{r}; @pxref{Top, ,
! Introduction, fontname, Filenames for fonts}, for why), the second word
! is the PostScript font name, and any remaining stuff is ignored.  Unlike
! the other data files, GSrenderfont does not use path searching to find
! this file; it just uses the default:
  
  @example
***************
*** 108,118 ****
  @end example
  
! @noindent 
  unless you specify a different file with the @samp{-map} option.  The
! reason for this is that the default @file{psfonts.map} should contain
! all the PostScript fonts in use at your site.
  
! GSrenderfont complains and gives up if you don't specify either the
! PostScript font name or the output filename.
  
  
--- 122,135 ----
  @end example
  
! @noindent
  unless you specify a different file with the @samp{-map} option.  The
! reason for this is that @file{psfonts.map} should contain all the
! PostScript fonts in use at your site.
! 
! GSrenderfont complains and gives up if you specify neither the
! PostScript font name nor the input filename.  It also gives up if it
! can't determine the filename from the PostScript name or vice versa.
  
! The default for the output filename is the input filename.
  
  
***************
*** 128,132 ****
  For convenience, GSrenderfont allows you to independently specify the
  point size and the resolution of the output font: the @samp{-point-size}
! option, as an integer in printer's points, and the latter with
  @samp{-dpi} in pixels per inch.  The defaults are 10@dmn{pt} and
  300@dmn{dpi}.
--- 145,149 ----
  For convenience, GSrenderfont allows you to independently specify the
  point size and the resolution of the output font: the @samp{-point-size}
! option, as an integer in points, and the latter with
  @samp{-dpi} in pixels per inch.  The defaults are 10@dmn{pt} and
  300@dmn{dpi}.
***************
*** 154,160 ****
  
  You specify the encoding for the new bitmap font with the
! @samp{-encoding} option; the default is @samp{dvips}.  GSrenderfont
! reads the same encoding files the other programs do; @xref{Encoding
! files}.
  
  As with all other data files in the other programs, GSrenderfont
--- 171,177 ----
  
  You specify the encoding for the new bitmap font with the
! @samp{-encoding} option; the default is to use the encoding of the input
! font.  GSrenderfont reads the same encoding files as the other programs.
! @xref{Encoding files}.
  
  As with all other data files in the other programs, GSrenderfont
***************
*** 210,216 ****
  @end example
  
  @opindex -point-size
  @item -point-size @var{unsigned}
! Render the output at @var{unsigned} printer's points; default is 10.
  
  @opindex -verbose
--- 227,238 ----
  @end example
  
+ @item -output-file @var{filename}
+ @opindex -output-file
+ @cindex output file, naming
+ Use @file{@var{filename}.@var{dpi}pk} for the final PK output.
+ 
  @opindex -point-size
  @item -point-size @var{unsigned}
! Render the output at @var{unsigned} points; default is 10.
  
  @opindex -verbose
diff -Nrc2 fontutils-0.5/doc/imageto.texi fontutils-0.6/doc/imageto.texi
*** fontutils-0.5/doc/imageto.texi	Wed Sep  2 17:17:17 1992
--- fontutils-0.6/doc/imageto.texi	Sat Oct 24 05:19:05 1992
***************
*** 35,45 ****
  @cindex usage of Imageto
  
! Usually there are two steps to extracting a usable font from an image
! file.  First, looking at the image, so you can see what you've got.
! Second, preparing the IFI file describing the image contents: the
! character codes to output, a baseline adjustment, and how many pieces
! there are in each character.  Each step requires running Imageto; the
! first time with either the @samp{-strips} or @samp{-epsf} option, the
! second time with neither.
  
  @cindex scanlines, definition of
--- 35,45 ----
  @cindex usage of Imageto
  
! Usually there are two prerequisites to extracting a usable font from an
! image file.  First, looking at the image, so you can see what you've
! got.  Second, preparing the IFI file describing the contents of the
! image: the character codes to output, any baseline adjustment (as for,
! e.g., @samp{j}), and how many pieces each character has.  Each
! is a separate invocation of Imageto; the first time with either the
! @samp{-strips} or @samp{-epsf} option, the second time with neither.
  
  @cindex scanlines, definition of
***************
*** 47,63 ****
  @cindex bounding boxes in Imageto
  In the second step, Imageto considers the input image as a series of
! image rows.  Each @dfn{image row} consists of all the scanlines between
  a nonblank scanline and the next entirely blank scanline.  (A
  @dfn{scanline} is a single horizontal row of pixels in the image.)
  Within each image row, Imageto looks top-to-bottom, left-to-right, for
! @dfn{bounding boxes}: closed contours, i.e., an area around whose edge
! you can move a pencil without lifting it.
  
  For example, in the following image Imageto would find two image rows,
  the first from scanlines 1 to scanline 7, the second consisting of only
  scanline 10.  There are six bounding boxes in the first image row, only
! one in the second.  (This example shows some typical problems in scanned
! images: the baseline of the @samp{m} is not aligned with those of the
! @samp{i}, @samp{j}, and @samp{l}; a meaningless black line is present.)
  
  @example
--- 47,66 ----
  @cindex bounding boxes in Imageto
  In the second step, Imageto considers the input image as a series of
! @dfn{image rows}.  Each image row consists of all the scanlines between
  a nonblank scanline and the next entirely blank scanline.  (A
  @dfn{scanline} is a single horizontal row of pixels in the image.)
  Within each image row, Imageto looks top-to-bottom, left-to-right, for
! @dfn{bounding boxes}: closed contours, i.e., an area whose edge
! you can trace with a pencil without lifting it.
  
+ @cindex type specimen image, example of
+ @cindex problems in scanned images, example
  For example, in the following image Imageto would find two image rows,
  the first from scanlines 1 to scanline 7, the second consisting of only
  scanline 10.  There are six bounding boxes in the first image row, only
! one in the second.  (This example also shows some typical problems in
! scanned images: the baseline of the @samp{m} is not aligned with those
! of the @samp{i}, @samp{j}, and @samp{l}; a meaningless black line is
! present; the @samp{i} and @samp{j} overlap.)
  
  @example
***************
*** 64,74 ****
    01234567890123456789
   0
!  1         x
!  2 x   x   x
!  3         x
!  4 x   x   x   xxxxx
!  5 x   x   x   x x x
!  6     x       x x x
!  7   xx
   8
   9
--- 67,77 ----
    01234567890123456789
   0
!  1       x
!  2 x x   x
!  3       x
!  4 x x   x   xxxxx
!  5 x x   x   x x x
!  6   x       x x x
!  7 xx
   8
   9
***************
*** 79,82 ****
--- 82,86 ----
  * Viewing an image::            Seeing what's in an image.
  * Image to font conversion::    Extracting a font.
+ * Dirty images::                Handling scanning artifacts or other noise.
  @end menu
  
***************
*** 92,100 ****
  @cindex image file, viewing
  @cindex viewing image files
! Normally, the first step in extracting a font from an image is to see
! exactly what is in the image.  Naturally, this is unnecessary if you
! know exactly what your image file contains.
  
  @opindex -epsf
  The simplest way to get a look at the image file, if you have
  Ghostscript or some other suitable PostScript interpreter, is to convert
--- 96,105 ----
  @cindex image file, viewing
  @cindex viewing image files
! Typically, the first step in extracting a font from an image is to see
! exactly what is in the image.  (Clearly, this is unnecessary if you
! already know what your image file contains.)
  
  @opindex -epsf
+ @cindex Ghostscript, using to look at images
  The simplest way to get a look at the image file, if you have
  Ghostscript or some other suitable PostScript interpreter, is to convert
***************
*** 106,110 ****
  @end example
  
! Here we are reading an input file @file{ggmr.img}; the output is
  @file{ggmr.eps}.  You can then view the EPS file with
  
--- 111,115 ----
  @end example
  
! Here we read an input file @file{ggmr.img}; the output is
  @file{ggmr.eps}.  You can then view the EPS file with
  
***************
*** 116,120 ****
  
  @opindex -strips
! If you don't have either a suitable PostScript interpreter or enough
  disk space to store the EPS file (it uses approximately twice as much
  disk space as the original image), the above won't work.  Instead, to
--- 121,125 ----
  
  @opindex -strips
! If you don't have both a suitable PostScript interpreter and enough
  disk space to store the EPS file (it uses approximately twice as much
  disk space as the original image), the above won't work.  Instead, to
***************
*** 127,131 ****
  The output of this will be @file{ggmrsp.1200gf} (our image having a
  resolution of 1200 dpi).  Although the GF font cannot be conveniently
! viewed directly, you can use @TeX{} to look at it, as follows:
  
  @flindex strips.tex
--- 132,137 ----
  The output of this will be @file{ggmrsp.1200gf} (our image having a
  resolution of 1200 dpi).  Although the GF font cannot be conveniently
! viewed directly, you can use @TeX{} and your favorite DVI processor to
! look at it, as follows:
  
  @flindex strips.tex
***************
*** 142,146 ****
  
  
! @node Image to font conversion,  , Viewing an image, Imageto usage
  @subsection Image to font conversion
  
--- 148,152 ----
  
  
! @node Image to font conversion, Dirty images, Viewing an image, Imageto usage
  @subsection Image to font conversion
  
***************
*** 162,211 ****
  @itemize @bullet
  
  @cindex design size in image
  @opindex -designsize
- @item
  The @emph{design size}, which you specify with the @samp{-designsize}
  option.  The default is 10@dmn{pt}.  Even if you know the true design
! size of the original scanned image, you may not wish to change it.  For
! example, although our originals were 30@dmn{pt}, that resulted in the
! 10@dmn{pt} size being too small to our (20th-century) eyes.  So we
! specified a design size of 26@dmn{pt}.
  
  @cindex baselines in image
  @opindex -baselines
  @opindex -print-guidelines
- @item
  The @emph{baselines}, which you specify with the @samp{-baselines}
! option.  You can specify the baseline for each image row (the top
! scanline of each image row is numbered zero).  You can make an
! adjustment for individual characters in the IFI files, but you save
! yourself at least some of this hassle by specifying a general baseline
! for each row.
  
  For instance, in the example image in @ref{Imageto usage}, it would be
! best to specify @samp{-baselines=4,0}.  (The @samp{4} is scanline #5 in
! that image.)
! 
! You can see what baseline is chosen for each character with the
! @samp{-print-guidelines} option.
! 
! @cindex clean threshold in image
! @cindex blotches in image
! @cindex spots in image
! @cindex dirt
! @cindex overlapping characters
! @opindex -clean-threshold
! @opindex -print-clean-info
! @item
! The @dfn{clean threshold}, which you specify with the
! @samp{-clean-threshold} option.  Scanned images often have (sometimes
! numerous) dark blotches from dirt or miscues in the original printing.
! To omit the blotches from the output font, you can specify
! @code{.notdef} for the character code in the IFI file.  You can also set
! the clean threshold; bounding boxes which enclose a higher percentage
! black than this are omitted from the output automatically.
  
! You can see the percentage of black in each bounding box which is
! considered for cleaning with the @samp{-print-clean-info} option.
  
  @end itemize
--- 168,210 ----
  @itemize @bullet
  
+ @item
  @cindex design size in image
  @opindex -designsize
  The @emph{design size}, which you specify with the @samp{-designsize}
  option.  The default is 10@dmn{pt}.  Even if you know the true design
! size of the original scanned image, you may wish to change it.  For
! example, some of our original specimens were stated to be 30@dmn{pt},
! but that resulted in the 10@dmn{pt} size being too small to our
! (20th-century) eyes.  So we specified a design size of 26@dmn{pt}.
  
+ @item
  @cindex baselines in image
  @opindex -baselines
  @opindex -print-guidelines
  The @emph{baselines}, which you specify with the @samp{-baselines}
! option.  You can specify the baseline for each image row (the bottom
! scanline of each image row is numbered zero, with coordinates increasing
! upward).  You can make an adjustment for individual characters in the
! IFI files, but you save yourself at least some of this hassle by
! specifying a general baseline for each row.
  
  For instance, in the example image in @ref{Imageto usage}, it would be
! best to specify @samp{-baselines=2,0}.  The @samp{2} is scanline #5 in
! that image.  The @samp{0} is an arbitrary value for scanline #10, which
! we will ignore via the IFI file (@pxref{IFI files}).
! 
! @opindex -print-guidelines @r{example}
! For each character written, the @samp{-print-guidelines} option produces
! output on the terminal that looks like:
! @example
! 75 (K) 5/315
! @end example
  
! @noindent This means that character code 75, whose name in
! the encoding file is @samp{K}, has its bottom row at row 5, and its top
! row at row 315; i.e., the character has five blank rows above the
! origin.  This is almost certainly wrong (the letter `K' should sit on
! the typesetting baseline), so we would want to adjust it downwards to 0
! via the individual character adjustment (@pxref{IFI files}).
  
  @end itemize
***************
*** 214,219 ****
  
  @example
! imageto -verbose -baselines=327,338,342 -clean-threshold=23 \
!   -designsize=26 ggmr
  @end example
  
--- 213,217 ----
  
  @example
! imageto -baselines=121,130,120 -designsize=26 ggmr
  @end example
  
***************
*** 221,224 ****
--- 219,286 ----
  
  
+ @node Dirty images,  , Image to font conversion, Imageto usage
+ @subsection Dirty images
+ 
+ @cindex sex
+ @cindex dirty images
+ @cindex noisy images
+ @cindex spots
+ @cindex clean images, not having
+ @cindex scanning artifacts
+ @cindex artifacts, of scanning
+ 
+ Your image may not be completely ``clean'', i.e., the scanning process
+ may have introduced artifacts: black lines at the edge of the paper;
+ blotches where the original had a speck of dirt or ink; broken lines
+ where the image had a continuous line.  To get a correct output font,
+ you must correct these problems.
+ 
+ @cindex blotches in image, ignoring
+ @vindex .notdef@r{, removing blotches with}
+ To remove blotches, you can simply put @code{.notdef} in the appropriate
+ place in the IFI file.  You can find the ``appropriate place'' when you
+ look at the output font; some character will be nothing but a (possibly
+ tiny) speck, and all the characters following will be in the wrong
+ position.
+ 
+ @opindex -print-clean-info @r{example}
+ @cindex bounding boxes, assigned to characters
+ @cindex characters, bounding boxes assigned
+ The @samp{-print-clean-info} option might also help you to
+ diagnose which bounding boxes are being assigned to which characters,
+ when you are in doubt.  Here is an example of its output:
+ 
+ @example
+ [Cleaning 149x383 bitmap:
+   checking (0,99)-(10,152) ... clearing.
+   checking (0,203)-(35,263) ... clearing.
+   checking (0,99)-(130,382) ... keeping.
+   checking (113,0)-(149,37) ... keeping.
+ 106]
+ @end example
+ 
+ @noindent The final @samp{106} is the character code output (ASCII
+ @samp{j}).  The size of the overall bitmap which contains the `j' is 149
+ pixels wide and 383 pixels high.  The bitmap contained four bounding
+ boxes, the last two of which belonged to the `j' and were kept, and the
+ first two from the adjacent character (`i') and were erased.  (As shown
+ in the example image above, the tail of the `j' often overlaps the `i'
+ in type specimens.)
+ 
+ If the image has blobs you have not removed with @code{.notdef}, you
+ will see a small bounding box in this output.  The numbers shown are in
+ ``bitmap coordinates'': (0,0) is the upper left-hand pixel of the
+ bitmap.
+ 
+ 
+ @cindex baselines and blotches
+ @opindex -baselines @r{and blotches}
+ If a blotch appears outside of the row of characters, Imageto will
+ consider it to be its own (very small) image row.  If you are using
+ @samp{-baselines}, you must specify an arbitrary value corresponding to
+ the blotch, even though the bounding box in the image will be ignored.
+ See the section above for an example.
+ 
+ 
  @node IFI files, Invoking Imageto, Imageto usage, Imageto
  @section IFI files
***************
*** 227,240 ****
  @cindex image font information files
  
! @dfn{Image font information} (IFI) files are text files which describe
! the contents of an image file.  You yourself must create it; as we will
! see, the information it contains usually cannot be determined
  automatically.
  
  If your image file is named @file{@var{foo}.img} (or
  @file{@var{foo}.pbm}), it is customary to name the corresponding IFI
  file @file{@var{foo}.ifi}.  That is what Imageto looks for by default.
! If you name it something else, you must use the @samp{-info-filename}
! option to tell Imageto the IFI filename.
  
  Imageto does not look for an IFI file if either the @samp{-strips} or
--- 289,304 ----
  @cindex image font information files
  
! An @dfn{image font information} (IFI) file is a text file which
! describes the contents of an image file.  You yourself must create it;
! as we will see, the information it contains usually cannot be determined
  automatically.
  
+ @cindex IFI files, naming
+ @cindex naming IFI files
  If your image file is named @file{@var{foo}.img} (or
  @file{@var{foo}.pbm}), it is customary to name the corresponding IFI
  file @file{@var{foo}.ifi}.  That is what Imageto looks for by default.
! If you name it something else, you must specify the name with the
! @samp{-ifi-file} option.
  
  Imageto does not look for an IFI file if either the @samp{-strips} or
***************
*** 242,250 ****
  
  @cindex characters, defining in IFI files
! Each nonblank non-comment line in the IFI file represents a
! ``character'' in the image (i.e., a sequence of bounding boxes), and the
! corresponding character in the output font.  @xref{Common file syntax},
! for a description of syntax elements common to all data files processed
! by these programs, including comments.
  
  @cindex entries in IFI files
--- 306,314 ----
  
  @cindex characters, defining in IFI files
! Each nonblank non-comment line in the IFI file represents a a sequence
! of bounding boxes in the image, and a corresponding character in the
! output font.  @xref{Common file syntax}, for a description of syntax
! elements common to all data files processed by these programs, including
! comments.
  
  @cindex entries in IFI files
***************
*** 251,257 ****
  Each line has one to five @dfn{entries}, separated by spaces and/or
  tabs.  If a line contains fewer than five entries, suitable defaults (as
! described below) are taken for the missing trailing entries.  (You
! cannot supply a value for entry #3, say, without also supplying values
! for entries #1 and #2.)
  
  Here is the meaning of each entry, in order:
--- 315,321 ----
  Each line has one to five @dfn{entries}, separated by spaces and/or
  tabs.  If a line contains fewer than five entries, suitable defaults (as
! described below) are taken for the missing trailing entries.  (It is
! impossible to supply a value for entry #3, say, without also supplying
! values for entries #1 and #2.)
  
  Here is the meaning of each entry, in order:
***************
*** 259,290 ****
  @enumerate
  
- @cindex character name in IFI files
  @item
! The character name of the output character.  If the character name is
! @code{.notdef}, Imageto throws away the corresponding bounding boxes.
! Otherwise, Imageto outputs the bounding boxes as a character, assigning
! it the character code of the name as defined in the encoding vector
! (@pxref{Invoking Imageto}).  If the character name is not specified in
! the encoding, Imageto also throws away the bounding boxes, as if it were
! @code{.notedef}.  @xref{Encoding files}, for general information on
! encoding files.
  
  @cindex baseline in IFI files
  @cindex baseline adjustment
  @cindex adjustment, to baseline
- @item
  An adjustment to the baseline of the output character, as a (possibly
! signed) decimal number.  By default, the baseline is taken to be the
! bottom scanline of the image row, but a different scanline can be
! specified with the @samp{-baselines} option.  The number you specify
! here is subtracted from that default, to get the scanline number of the
! baseline for this character.  Thus, a positive adjustment moves the
! baseline up, a negative one down.  The default adjustment is zero.
  
  @cindex bounding box count in IFI files
  @cindex alternating bounding boxes
  @cindex mixed-up characters in image
! @cindex out-of-order character in image
! @item
  The number of bounding boxes which comprise this character, as a decimal
  number.  The default is one.  If this number is negative, it indicates
--- 323,354 ----
  @enumerate
  
  @item
! @cindex character name in IFI files
! The character name of the output character.  Usually, Imageto outputs
! the bounding boxes from the image as a character in the output font,
! assigning it the character code of the name as defined in the encoding
! vector (@pxref{Invoking Imageto}).  However, if the character name is
! @code{.notdef}, or if the character name is not specified in the
! encoding, Imageto just throws away the bounding boxes.  @xref{Encoding
! files}, for general information on encoding files.
  
+ @item
  @cindex baseline in IFI files
  @cindex baseline adjustment
  @cindex adjustment, to baseline
  An adjustment to the baseline of the output character, as a (possibly
! signed) decimal number.  The default baseline is either the bottom
! scanline of the image row, or the value you specified with the
! @samp{-baselines} option.  The number given here, in the IFI file, is
! subtracted from that default.  Thus, a positive adjustment moves the
! baseline up (i.e., moves the character down relative to the typesetting
! baseline), a negative one down.  The default adjustment is zero.
  
+ @item
  @cindex bounding box count in IFI files
  @cindex alternating bounding boxes
  @cindex mixed-up characters in image
! @cindex out-of-order characters in image
! @cindex characters, out-of-order in image
  The number of bounding boxes which comprise this character, as a decimal
  number.  The default is one.  If this number is negative, it indicates
***************
*** 297,307 ****
  @code{-2}.
  
  @cindex side bearings in IFI files
  @cindex left side bearing in IFI files
! @item
! The left side bearing (lsb).  Most type specimens we've seen
! unfortunately don't include side bearing information, but if you happen
! to have such, you can give it here.  (GSrenderfont
! (@pxref{GSrenderfont}) uses this feature).  The default is zero.
  
  You can run Charspace (@pxref{Charspace}) to add side bearings to a font
--- 361,371 ----
  @code{-2}.
  
+ @item
  @cindex side bearings in IFI files
  @cindex left side bearing in IFI files
! The left side bearing (lsb).  Most type specimens unfortunately don't
! include side bearing information, but if you happen to have such, you
! can give it here.  (GSrenderfont (@pxref{GSrenderfont}) uses this
! feature).  The default is zero.
  
  You can run Charspace (@pxref{Charspace}) to add side bearings to a font
***************
*** 344,350 ****
  @table @samp
  
  @opindex -baselines
  @cindex baselines in image
- @item -baselines @var{scanline1},@var{scanline2},@dots{}
  Define the baselines for each image row.  The default baseline for the
  characters in the first image row is taken to be @var{scanline1}, etc.
--- 408,414 ----
  @table @samp
  
+ @item -baselines @var{scanline1},@var{scanline2},@dots{}
  @opindex -baselines
  @cindex baselines in image
  Define the baselines for each image row.  The default baseline for the
  characters in the first image row is taken to be @var{scanline1}, etc.
***************
*** 352,388 ****
  image row is numbered zero.
  
! @opindex -clean-threshold
! @item -clean-threshold @var{percent}
! If a bounding box encloses a larger percentage of black pixels than
! @var{percent}, it is omitted from the output; default is 60.
! 
  @opindex -designsize
  @cindex design size, specifying
  @cindex fontsize
- @item -designsize @var{real}
  Set the design size of the output font to @var{real}; default is 10.0.
  
- @opindex -dpi
  @item -dpi @var{unsigned}
  The resolution of the input image, in pixels per inch (required for PBM
  input).  @xref{Common options}.
  
- @opindex -encoding
  @item -encoding @var{enc-file}
  The encoding file to read for the mapping between character names and
  character codes.  @xref{Encoding files}.  If @var{enc-file} has no
! suffix, @samp{.enc} is appended.  Default is @file{ascii}.
  
- @opindex -epsf
  @item -epsf
  Write the image to @file{@var{image-name}.eps} as an Encapsulated
  PostScript file.
  
- @opindex -help
  @item -help
  Print a usage message.  @xref{Common options}.
  
! @opindex -info-file
! @item -info-file @var{filename}
  Set the name of the IFI file to @var{filename} (if @var{filename} has an
  extension) or @file{@var{filename}.ifi} (if it doesn't).  The default is
--- 416,448 ----
  image row is numbered zero.
  
! @item -designsize @var{real}
  @opindex -designsize
  @cindex design size, specifying
  @cindex fontsize
  Set the design size of the output font to @var{real}; default is 10.0.
  
  @item -dpi @var{unsigned}
+ @opindex -dpi
  The resolution of the input image, in pixels per inch (required for PBM
  input).  @xref{Common options}.
  
  @item -encoding @var{enc-file}
+ @opindex -encoding
  The encoding file to read for the mapping between character names and
  character codes.  @xref{Encoding files}.  If @var{enc-file} has no
! suffix, @samp{.enc} is appended.  Default is to assign successive
! character codes to the character names in the IFI file.
  
  @item -epsf
+ @opindex -epsf
  Write the image to @file{@var{image-name}.eps} as an Encapsulated
  PostScript file.
  
  @item -help
+ @opindex -help
  Print a usage message.  @xref{Common options}.
  
! @opindex -ifi-file
! @itemx -ifi-file @var{filename}
  Set the name of the IFI file to @var{filename} (if @var{filename} has an
  extension) or @file{@var{filename}.ifi} (if it doesn't).  The default is
***************
*** 389,394 ****
  @file{@var{image-name}.ifi}.
  
- @opindex -input-format
  @item -input-format @var{format}
  Specify the format of the input image; @var{format} must be
  one of @samp{pbm} or @samp{img}.  The default is taken from
--- 449,454 ----
  @file{@var{image-name}.ifi}.
  
  @item -input-format @var{format}
+ @opindex -input-format
  Specify the format of the input image; @var{format} must be
  one of @samp{pbm} or @samp{img}.  The default is taken from
***************
*** 395,406 ****
  @var{image-name}, if possible.
  
- @opindex -nchars
  @item -nchars @var{unsigned}
  Only write the first @var{unsigned} (approximately) characters from the
  image to the output font; default is all the characters.
  
  @opindex -output-file
  @cindex output file, naming
- @item -output-file @var{filename}
  Write to @var{filename} if @var{filename} has a suffix.  If it doesn't,
  then if writing strips, write to @var{filename}sp.@var{dpi}gf; else
--- 455,466 ----
  @var{image-name}, if possible.
  
  @item -nchars @var{unsigned}
+ @opindex -nchars
  Only write the first @var{unsigned} (approximately) characters from the
  image to the output font; default is all the characters.
  
+ @item -output-file @var{filename}
  @opindex -output-file
  @cindex output file, naming
  Write to @var{filename} if @var{filename} has a suffix.  If it doesn't,
  then if writing strips, write to @var{filename}sp.@var{dpi}gf; else
***************
*** 408,435 ****
  `@var{image-name} @var{designsize}' for @var{filename}.
  
- @opindex -print-clean-info
  @item -print-clean-info
! Print the percentage black and the sizes of each bounding box considered
! for cleaning.
  
- @opindex -print-guidelines
  @item -print-guidelines
  Print the numbers of the top and bottom scanlines for each
! character.  This implies @samp{verbose}.
  
- @opindex -range
  @item -range @var{char1}-@var{char2}
  Only output characters with codes between @var{char1} and @var{char2},
  inclusive.  (@xref{Common options}, and @ref{Specifying character codes}.)
  
- @opindex -strips
  @item -strips
  Take a constant number of scanlines from the image as each character in
  the output font, instead of using an IFI file to analyze the image.
  
  @cindex scanlines, tracing
  @cindex image, converting to ASCII
  @opindex -trace-scanlines
- @item -trace-scanlines
  Show every scanline as we read it as plain text, using @samp{*} and
  space characters.  This is still another way to view the image
--- 468,497 ----
  `@var{image-name} @var{designsize}' for @var{filename}.
  
  @item -print-clean-info
! @opindex -print-clean-info
! Print the size of each bounding box considered for removal, and the size
! of the containing bitmaps.  This option implies @samp{-verbose}.
! @xref{Dirty images}, for a full explanation of its output.
  
  @item -print-guidelines
+ @opindex -print-guidelines
  Print the numbers of the top and bottom scanlines for each
! character.  This implies @samp{verbose}.  @xref{Image to font
! conversion}, for a full explanation of its output.
  
  @item -range @var{char1}-@var{char2}
+ @opindex -range
  Only output characters with codes between @var{char1} and @var{char2},
  inclusive.  (@xref{Common options}, and @ref{Specifying character codes}.)
  
  @item -strips
+ @opindex -strips
  Take a constant number of scanlines from the image as each character in
  the output font, instead of using an IFI file to analyze the image.
  
+ @item -trace-scanlines
  @cindex scanlines, tracing
  @cindex image, converting to ASCII
  @opindex -trace-scanlines
  Show every scanline as we read it as plain text, using @samp{*} and
  space characters.  This is still another way to view the image
***************
*** 440,449 ****
  the resulting file in Emacs.  This option is primarily for debugging.
  
- @opindex -verbose
  @item -verbose
! Output progress reports.  @xref{Common options}.
  
- @opindex -version
  @item -version
  Print the version number.  @xref{Common options}.
  
--- 502,516 ----
  the resulting file in Emacs.  This option is primarily for debugging.
  
  @item -verbose
! @opindex -verbose
! @kindex . @r{in Imageto verbose output}
! @kindex + @r{in Imageto verbose output}
! Output progress reports.  @xref{Common options}.  Specifically, a
! @samp{.} is output for every 100 scanlines read, a @samp{+} is
! output when an image row does not end on a character boundary, and the
! character code is output inside brackets.
  
  @item -version
+ @opindex -version
  Print the version number.  @xref{Common options}.
  
diff -Nrc2 fontutils-0.5/doc/install.texi fontutils-0.6/doc/install.texi
*** fontutils-0.5/doc/install.texi	Thu Sep  3 08:29:43 1992
--- fontutils-0.6/doc/install.texi	Sun Oct 18 12:57:38 1992
***************
*** 21,26 ****
  for options and other information about the @code{configure} script.
  
! @flindex GNUmakefile, @r{editing}
! @flindex include/c-auto.h, @r{editing}
  @cindex search paths, defining default
  @item
--- 21,26 ----
  for options and other information about the @code{configure} script.
  
! @flindex GNUmakefile@r{, editing}
! @flindex include/c-auto.h@r{, editing}
  @cindex search paths, defining default
  @item
***************
*** 31,36 ****
  Run GNU make.  For example, if it's installed as @file{make}, just type
  @samp{make} in the top-level directory.  If all goes well, this will
! compile all the programs.  @xref{Problems}, for known warnings and other
! trouble during compilation.
  
  @item
--- 31,35 ----
  Run GNU make.  For example, if it's installed as @file{make}, just type
  @samp{make} in the top-level directory.  If all goes well, this will
! compile all the programs.
  
  @item
***************
*** 425,430 ****
  or use a newer version of GCC.
  
! @flindex math.h, @r{wrong}
! @findex fmod, @r{wrong prototype for}
  @cindex Interactive Unix
  @item
--- 424,429 ----
  or use a newer version of GCC.
  
! @flindex math.h@r{, wrong}
! @findex fmod@r{, wrong prototype for}
  @cindex Interactive Unix
  @item
diff -Nrc2 fontutils-0.5/doc/intro.texi fontutils-0.6/doc/intro.texi
*** fontutils-0.5/doc/intro.texi	Thu Sep  3 09:45:31 1992
--- fontutils-0.6/doc/intro.texi	Tue Oct 27 13:27:07 1992
***************
*** 8,12 ****
  @cindex introduction
  
! This manual corresponds to version 0.5 of the GNU font
  utilities.
  
--- 8,12 ----
  @cindex introduction
  
! This manual corresponds to version 0.6 of the GNU font
  utilities.
  
diff -Nrc2 fontutils-0.5/doc/overview.texi fontutils-0.6/doc/overview.texi
*** fontutils-0.5/doc/overview.texi	Wed Sep  2 17:35:13 1992
--- fontutils-0.6/doc/overview.texi	Mon Oct  5 10:12:32 1992
***************
*** 259,264 ****
  @end example
  
- @flindex ggmr.ifi
  @item
  Next, we created the file @file{ggmr.ifi} (distributed in the
  @file{data} directory), listing the characters in the order they
--- 259,264 ----
  @end example
  
  @item
+ @flindex ggmr.ifi
  Next, we created the file @file{ggmr.ifi} (distributed in the
  @file{data} directory), listing the characters in the order they
***************
*** 265,271 ****
  appeared in the image, guessing at baseline offsets and (if necessary)
  including bounding box counts.  Then we ran Imageto again, this time to
! get information about the baselines and black blotches in the image.
  @example
! imageto -print-guidelines -print-clean-info ggmr.img
  @end example
  
--- 265,273 ----
  appeared in the image, guessing at baseline offsets and (if necessary)
  including bounding box counts.  Then we ran Imageto again, this time to
! get information about the baselines and spurious blotches in the image.
! We use the @samp{-encoding} option since some of the characters in the
! image are not in the default @code{ASCII} encoding.
  @example
! imageto -print-guidelines -print-clean-info -encoding=gnulatin ggmr.img
  @end example
  
***************
*** 272,280 ****
  @item
  Based on the information gleaned from that run, we decided on the final
! baselines and clean threshold, and extracted the font (@pxref{Image to
! font conversion}).  (In truth, this took several iterations.)  The
! design size of the original image was stated in the book to be 30@dmn{pt}.
  @example
! imageto -verbose -baselines=327,338,342 -clean-threshold=23 \
    -designsize=30 -encoding=gnulatin ggmr.img
  @end example
--- 274,285 ----
  @item
  Based on the information gleaned from that run, we decided on the final
! baselines, adjusted the bounding box counts for broken-up characters,
! and extracted the font (@pxref{Image to font conversion}).  (In truth,
! this took several iterations.)  The design size of the original image
! was stated in the book to be 30@dmn{pt}.  We noticed several
! blotches in the image we needed to ignore, and so we added
! @code{.notdef} lines to @file{ggmr.ifi} as appropriate.
  @example
! imageto -verbose -baselines=121,130,120 \
    -designsize=30 -encoding=gnulatin ggmr.img
  @end example
***************
*** 450,462 ****
  @table @samp
  
  @opindex -help
  @cindex help, online
- @item -help
  Prints a usage message listing all available options on standard error.
  The program exits after doing so.
  
  @opindex -log
  @cindex log file
- @item -log
  Write information about everything the program is doing to the file
  @file{@var{foo}.log}, where @var{foo} is the root part of the main input
--- 455,467 ----
  @table @samp
  
+ @item -help
  @opindex -help
  @cindex help, online
  Prints a usage message listing all available options on standard error.
  The program exits after doing so.
  
+ @item -log
  @opindex -log
  @cindex log file
  Write information about everything the program is doing to the file
  @file{@var{foo}.log}, where @var{foo} is the root part of the main input
***************
*** 463,466 ****
--- 468,472 ----
  file.
  
+ @item -verbose
  @opindex -verbose
  @cindex verbose output
***************
*** 467,477 ****
  @cindex progress reports
  @cindex status reports
! @item -verbose
  Prints brief status reports as the program runs, typically the character
! code of each character as it is processed.
  
  @opindex -version
  @cindex version number, finding
- @item -version
  Prints the version number of the program on standard output.  If a main
  input file is supplied, processing continues; otherwise, the program
--- 473,486 ----
  @cindex progress reports
  @cindex status reports
! @cindex standard output, used for verbose output
! @cindex file used for verbose output
  Prints brief status reports as the program runs, typically the character
! code of each character as it is processed.  This usually goes to
! standard output; but if the program is outputting other information
! there, it goes to standard error.
  
+ @item -version
  @opindex -version
  @cindex version number, finding
  Prints the version number of the program on standard output.  If a main
  input file is supplied, processing continues; otherwise, the program
***************
*** 485,492 ****
  @table @samp
  
  @cindex dpi, specifying explicitly
  @cindex resolution, specifying explicitly
  @opindex -dpi
- @item -dpi @var{dpi}
  Look for the main input font at a resolution of @var{dpi} pixels per
  inch.  The default is to infer the information from the main input
--- 494,501 ----
  @table @samp
  
+ @item -dpi @var{dpi}
  @cindex dpi, specifying explicitly
  @cindex resolution, specifying explicitly
  @opindex -dpi
  Look for the main input font at a resolution of @var{dpi} pixels per
  inch.  The default is to infer the information from the main input
***************
*** 493,498 ****
  filename (@pxref{Main input file}).
  
- @opindex -output-file
  @item -output-file @var{fname}
  Write the main output of the program to @var{fname}.  If @var{fname} has
  a suffix, it is used unchanged; otherwise, it is extended with some
--- 502,507 ----
  filename (@pxref{Main input file}).
  
  @item -output-file @var{fname}
+ @opindex -output-file
  Write the main output of the program to @var{fname}.  If @var{fname} has
  a suffix, it is used unchanged; otherwise, it is extended with some
***************
*** 501,506 ****
  the current directory.
  
- @opindex -range
  @item -range @code{@var{start}-@var{end}}
  Only look at the characters between the character codes @var{start} and
  @var{end}, inclusive.  The default is to look at all characters in the
--- 510,515 ----
  the current directory.
  
  @item -range @code{@var{start}-@var{end}}
+ @opindex -range
  Only look at the characters between the character codes @var{start} and
  @var{end}, inclusive.  The default is to look at all characters in the
diff -Nrc2 fontutils-0.5/doc/texinfo.tex fontutils-0.6/doc/texinfo.tex
*** fontutils-0.5/doc/texinfo.tex	Thu Sep  3 14:01:37 1992
--- fontutils-0.6/doc/texinfo.tex	Wed Oct 14 10:38:39 1992
***************
*** 23,27 ****
  %what you give them.   Help stamp out software-hoarding!
  
! \def\texinfoversion{2.81/K}
  \message{Loading texinfo package [Version \texinfoversion]:}
  \message{}
--- 23,27 ----
  %what you give them.   Help stamp out software-hoarding!
  
! \def\texinfoversion{2.87/K}
  \message{Loading texinfo package [Version \texinfoversion]:}
  \message{}
***************
*** 301,308 ****
  \def\@{{\tt \char '100}}
  
! % Define @` and @' to be the same as ` and '
! % but suppressing ligatures.
! \def\`{{`}}
! \def\'{{'}}
  
  % Used to generate quoted braces.
--- 301,310 ----
  \def\@{{\tt \char '100}}
  
! % This is turned off because it was never documented
! % and you can use @w{...} around a quote to suppress ligatures.
! %% Define @` and @' to be the same as ` and '
! %% but suppressing ligatures.
! %\def\`{{`}}
! %\def\'{{'}}
  
  % Used to generate quoted braces.
***************
*** 341,353 ****
    \fi
    %
!   % If we don't do the \strut ... \nointerlineskip, we wind up with a
!   % box with a large depth, and hence get (typically) \lineskip leading
!   % (1pt), instead of the usual interline space (\baselineskip).  See
!   % p.82 of the TeXbook.
    \def\Egroup{%
-     \strut            % Put in the normal leading.
      \egroup           % End the \vtop.
      \endgroup         % End the \group.
-     \nointerlineskip  % We inserted our own leading.
    }%
    %
--- 343,354 ----
    \fi
    %
!   % The \vtop we start below produces a box with large depth; thus, TeX
!   % puts \baselineskip glue before it, and (when the next line of text
!   % is done) \lineskip glue after it.  (See p.82 of the TeXbook.)  But
!   % the next line of text also gets us \parskip glue.  Final result:
!   % space below is slightly more than space above.
    \def\Egroup{%
      \egroup           % End the \vtop.
      \endgroup         % End the \group.
    }%
    %
***************
*** 508,517 ****
  }
  
! \def\ignore{\begingroup\ignoresections
! % Make sure that spaces turn into tokens that match what \ignorexxx wants.
! \catcode32=10
! \ignorexxx}
! \long\def\ignorexxx #1\end ignore{\endgroup\ignorespaces}
  
  \def\direntry{\begingroup\direntryxxx}
  \long\def\direntryxxx #1\end direntry{\endgroup\ignorespaces}
--- 509,540 ----
  }
  
! % Ignore @ignore ... @end ignore.
! % 
! \def\ignore{\doignore{ignore}}
! 
! % We ignore @ifinfo text.
! % 
! \def\ifinfo{\doignore{ifinfo}}
! 
! % Ignore text until a line `@end #1'.
! % 
! \def\doignore#1{\begingroup
!   % Don't complain about control sequences we have declared \outer.
!   \ignoresections
!   %
!   % Define a command to swallow text until we reach `@end #1'.
!   \long\def\doignoretext##1\end #1{\enddoignore}%
!   %
!   % Make sure that spaces turn into tokens that match what \doignoretext wants.
!   \catcode32 = 10
!   %
!   % And now expand that command.
!   \doignoretext
! }
  
+ % What we do to finish off ignored text.
+ % 
+ \def\enddoignore{\endgroup\ignorespaces}%
+ 
  \def\direntry{\begingroup\direntryxxx}
  \long\def\direntryxxx #1\end direntry{\endgroup\ignorespaces}
***************
*** 526,531 ****
  \temp}
  \def\Eifset{}
! \def\ifsetfail{\begingroup\ignoresections\ifsetfailxxx}
! \long\def\ifsetfailxxx #1\end ifset{\endgroup\ignorespaces}
  
  \def\ifclear{\begingroup\ignoresections\parsearg\ifclearxxx}
--- 549,553 ----
  \temp}
  \def\Eifset{}
! \def\ifsetfail{\doignore{ifset}}
  
  \def\ifclear{\begingroup\ignoresections\parsearg\ifclearxxx}
***************
*** 536,541 ****
  \temp}
  \def\Eifclear{}
! \def\ifclearfail{\begingroup\ignoresections\ifclearfailxxx}
! \long\def\ifclearfailxxx #1\end ifclear{\endgroup\ignorespaces}
  
  % @set foo
--- 558,562 ----
  \temp}
  \def\Eifclear{}
! \def\ifclearfail{\doignore{ifclear}}
  
  % @set foo
***************
*** 566,571 ****
  \def\iftex{}
  \def\Eiftex{}
- \def\ifinfo{\begingroup\ignoresections\ifinfoxxx}
- \long\def\ifinfoxxx #1\end ifinfo{\endgroup\ignorespaces}
  
  \long\def\menu #1\end menu{}
--- 587,590 ----
***************
*** 585,588 ****
--- 604,611 ----
  \def\math#1{\implicitmath #1\implicitmath}
  
+ % @bullet and @minus need the same treatment as @math, just above.
+ \def\bullet{\implicitmath\ptexbullet\implicitmath}
+ \def\minus{\implicitmath-\implicitmath}
+ 
  \def\node{\ENVcheck\parsearg\nodezzz}
  \def\nodezzz#1{\nodexxx [#1,]}
***************
*** 1221,1227 ****
  \let\item=\itemizeitem}
  
- \def\bullet{$\ptexbullet$}
- \def\minus{$-$}
- 
  % Set sfcode to normal for the chars that usually have another value.
  % These are `.?!:;,'
--- 1244,1247 ----
***************
*** 1621,1627 ****
  \line{\secbf#1\hfill}\kern 2pt\penalty10000}}
  
  \def\entry #1#2{\begingroup
!   \parfillskip=0in \parskip=0in \parindent=0in
    %
    % Do not prefer a separate line ending with a hyphen to fewer lines.
    \finalhyphendemerits = 0
--- 1641,1660 ----
  \line{\secbf#1\hfill}\kern 2pt\penalty10000}}
  
+ % This typesets a paragraph consisting of #1, dot leaders, and then #2
+ % flush to the right margin.  It is used for index and table of contents
+ % entries.  The paragraph is indented by \leftskip.
+ % 
  \def\entry #1#2{\begingroup
!   %
!   % Start a new paragraph if necessary, so our assignments below can't
!   % affect previous text.
!   \par
!   %
!   % Do not fill out the last line with white space.
!   \parfillskip = 0in
    %
+   % No extra space above this paragraph.
+   \parskip = 0in
+   %
    % Do not prefer a separate line ending with a hyphen to fewer lines.
    \finalhyphendemerits = 0
***************
*** 1861,1865 ****
  \outer\def\unnumbered{\parsearg\unnumberedzzz}
  \def\unnumberedzzz #1{\seccheck{unnumbered}%
! \secno=0 \subsecno=0 \subsubsecno=0 \message{(#1)}
  \unnumbchapmacro {#1}%
  \gdef\thischapter{#1}\gdef\thissection{#1}%
--- 1894,1911 ----
  \outer\def\unnumbered{\parsearg\unnumberedzzz}
  \def\unnumberedzzz #1{\seccheck{unnumbered}%
! \secno=0 \subsecno=0 \subsubsecno=0
! %
! % This used to be simply \message{#1}, but TeX fully expands the
! % argument to \message.  Therefore, if #1 contained @-commands, TeX
! % expanded them.  For example, in `@unnumbered The @cite{Book}', TeX
! % expanded @cite (which turns out to cause errors because \cite is meant
! % to be executed, not expanded).  
! % 
! % Anyway, we don't want the fully-expanded definition of @cite to appear
! % as a result of the \message, we just want `@cite' itself.  We use
! % \the<toks register> to achieve this: TeX expands \the<toks> only once,
! % simply yielding the contents of the <toks register>.
! \toks0 = {#1}\message{(\the\toks0)}%
! %
  \unnumbchapmacro {#1}%
  \gdef\thischapter{#1}\gdef\thissection{#1}%
***************
*** 2231,2237 ****
  % See comments in \dochapentry re vbox and related settings
  \def\shortchapentry#1#2#3{%
!    \vbox{\hyphenpenalty=10000\tolerance=5000
!     \parindent=0pt\strut\raggedright
!     {\shortchaplabel{#2}\labelspace #1}\dotfill\doshortpageno{#3}}%
  }
  
--- 2277,2281 ----
  % See comments in \dochapentry re vbox and related settings
  \def\shortchapentry#1#2#3{%
!   \tocentry{\shortchaplabel{#2}\labelspace #1}{\doshortpageno{#3}}%
  }
  
***************
*** 2259,2267 ****
  
  \def\unnumbchapentry#1#2{\dochapentry{#1}{#2}}
! \def\shortunnumberedentry#1#2{%
!    \vbox{\hyphenpenalty=10000\tolerance=5000
!     \parindent=0pt\strut\raggedright
!     #1\dotfill\doshortpageno{#2}}%
! }
  
  % Sections.
--- 2303,2307 ----
  
  \def\unnumbchapentry#1#2{\dochapentry{#1}{#2}}
! \def\shortunnumberedentry#1#2{\tocentry{#1}{\doshortpageno{#2}}}
  
  % Sections.
***************
*** 2289,2326 ****
  \def\dochapentry#1#2{%
     \penalty-300 \vskip\baselineskip
!    % This \vbox (and similar ones in dosecentry etc.) used to be a
!    % \line; changed to permit linebreaks for long headings.  See
!    % comments above \majorheading.  Here we also use \strut to
!    % keep the top end of the vbox from jamming up against the previous
!    % entry in the table of contents.
!    \vbox{\chapentryfonts
!      \hyphenpenalty=10000\tolerance=5000 % this line and next introduced
!      \parindent=0pt\strut\raggedright    % with \line -> \vbox change
!      #1\dotfill
!      \dopageno{#2}}%
     \nobreak\vskip .25\baselineskip
  }
  
! \def\dosecentry#1#2{%
!    \vbox{\secentryfonts \leftskip=\tocindent
!     \hyphenpenalty=10000\tolerance=5000
!     \parindent=0pt\strut\raggedright #1\dotfill
!     \dopageno{#2}}%
! }
! 
! \def\dosubsecentry#1#2{%
!    \vbox{\subsecentryfonts \leftskip=2\tocindent
!     \hyphenpenalty=10000\tolerance=5000
!     \parindent=0pt\strut\raggedright #1\dotfill
!     \dopageno{#2}}%
! }
! 
! \def\dosubsubsecentry#1#2{%
!    \vbox{\subsubsecentryfonts \leftskip=3\tocindent
!     \hyphenpenalty=10000\tolerance=5000
!     \parindent=0pt\strut\raggedright #1\dotfill
!     \dopageno{#2}}%
! }
  
  % Space between chapter (or whatever) number and the title.
  \def\labelspace{\hskip1em \relax}
--- 2329,2364 ----
  \def\dochapentry#1#2{%
     \penalty-300 \vskip\baselineskip
!    \begingroup
!      \chapentryfonts
!      \tocentry{#1}{\dopageno{#2}}%
!    \endgroup
     \nobreak\vskip .25\baselineskip
  }
  
! \def\dosecentry#1#2{\begingroup
!   \secentryfonts \leftskip=\tocindent
!   \tocentry{#1}{\dopageno{#2}}%
! \endgroup}
  
+ \def\dosubsecentry#1#2{\begingroup
+   \subsecentryfonts \leftskip=2\tocindent
+   \tocentry{#1}{\dopageno{#2}}%
+ \endgroup}
+ 
+ \def\dosubsubsecentry#1#2{\begingroup
+   \subsubsecentryfonts \leftskip=3\tocindent
+   \tocentry{#1}{\dopageno{#2}}%
+ \endgroup}
+ 
+ % Final typesetting of a toc entry; we use the same \entry macro as for
+ % the index entries, but we want to suppress hyphenation here.  (We
+ % can't do that in the \entry macro, since index entries might consist
+ % of hyphenated-identifiers-that-do-not-fit-on-a-line-and-nothing-else.)
+ % 
+ \def\tocentry#1#2{\begingroup
+   \hyphenpenalty = 10000
+   \entry{#1}{#2}%
+ \endgroup}
+ 
  % Space between chapter (or whatever) number and the title.
  \def\labelspace{\hskip1em \relax}
***************
*** 2812,2815 ****
--- 2850,2888 ----
  \begingroup\obeylines\spacesplit{#3{#4}}}
  
+ % This is the same as all the others except for the last line.  We need
+ % to parse the arguments differently for @deftp, since the ``attributes''
+ % there are optional.
+ % 
+ \def\deftpparsebody #1#2#3#4 {\begingroup\inENV %
+ \medbreak %
+ % Define the end token that this defining construct specifies
+ % so that it will exit this group.
+ \def#1{\endgraf\endgroup\medbreak}%
+ \def#2##1 {\begingroup\obeylines\spacesplit{#3{##1}}}%
+ \parindent=0in
+ \advance\leftskip by \defbodyindent \advance \rightskip by \defbodyindent
+ \exdentamount=\defbodyindent
+ \begingroup\obeylines\parsetpheaderline{#3{#4}}}
+ 
+ {\obeylines %
+   % Parse the type name and any attributes (field names, etc.).
+   % #1 is the beginning of the macro call that will produce the output,
+   %   i.e., \deftpheader{CLASS}; this is passed from \deftpparsebody.
+   % #2 is the type name, e.g., `struct termios'.
+   % #3 is the (possibly empty) attribute list.
+   % 
+   \gdef\parsetpheaderline#1#2#3^^M{%
+     \endgroup % Started in \deftpparsebody.
+     %
+     % If the attribute list is in fact empty, there will be no space after
+     % #2; so we can't put a space in our TeX parameter list.  But if it
+     % isn't empty, then #3 will begin with an unwanted space.
+     \def\theargs{\ignorespaces #3}%
+     %
+     % Call the macro to produce the output.
+     #1{#2}\theargs %
+   }%
+ }
+ 
  \def\defopvarparsebody #1#2#3#4#5 {\begingroup\inENV %
  \medbreak %
***************
*** 3069,3073 ****
  % @deftp Class window height width ...
  
! \def\deftp{\defvrparsebody\Edeftp\deftpx\deftpheader}
  
  \def\deftpheader #1#2#3{\doind {tp}{\code{#2}}%
--- 3142,3146 ----
  % @deftp Class window height width ...
  
! \def\deftp{\deftpparsebody\Edeftp\deftpx\deftpheader}
  
  \def\deftpheader #1#2#3{\doind {tp}{\code{#2}}%
***************
*** 3317,3320 ****
--- 3390,3447 ----
  }%end \catcode `\@=11
  
+ % Set the baselineskip to #1, and the lineskip and strut size
+ % correspondingly.  There is no deep meaning behind these magic numbers
+ % used as factors; they just match (closely enough) what Knuth defined.
+ % 
+ \def\lineskipfactor{.1}
+ \def\strutheightpercent{.71}
+ \def\strutdepthpercent{.29}
+ %
+ \def\setleading#1{%
+   \baselineskip = #1\relax
+   \normalbaselineskip = \baselineskip
+   \lineskip = \lineskipfactor\baselineskip
+   \setbox\strutbox =\hbox{%
+     \vrule width0pt height\strutheightpercent\baselineskip
+                     depth \strutdepthpercent \baselineskip
+   }%
+ }
+ 
+ % @| inserts a changebar to the left of the current line.  It should
+ % surround any changed text.  This approach does *not* work if the
+ % change spans more than two lines of output.  To handle that, we would
+ % have adopt a much more difficult approach (putting marks into the main
+ % vertical list for the beginning and end of each change).
+ % 
+ \def\|{%
+   % \vadjust can only be used in horizontal mode.
+   \leavevmode
+   %
+   % Append this vertical mode material after the current line in the output.
+   \vadjust{%
+     % We want to insert a rule with the height and depth of the current
+     % leading; that is exactly what \strutbox is supposed to record.
+     \vskip-\baselineskip
+     %
+     % \vadjust-items are inserted at the left edge of the type.  So
+     % the \llap here moves out into the left-hand margin.
+     \llap{%
+       %
+       % For a thicker or thinner bar, change the `1pt'.
+       \vrule height\baselineskip width1pt
+       %
+       % This is the space between the bar and the text.
+       \hskip 12pt
+     }%
+   }%
+ }
+ 
+ % For a final copy, take out the rectangles
+ % that mark overfull boxes (in case you have decided
+ % that the text looks ok even though it passes the margin).
+ % 
+ \def\finalout{\overfullrule=0pt}
+ 
+ 
  % End of control word definitions.
  
***************
*** 3336,3340 ****
  \parindent = \defaultparindent
  \parskip 3pt plus2pt minus2pt
! \baselineskip 13pt
  \advance\topskip by 1.2cm
  
--- 3463,3467 ----
  \parindent = \defaultparindent
  \parskip 3pt plus2pt minus2pt
! \setleading{13pt}
  \advance\topskip by 1.2cm
  
***************
*** 3365,3369 ****
  
  \global\lispnarrowing = 0.3in
! \global\baselineskip 12pt
  \advance\topskip by -1cm
  \global\parskip 3pt plus 1pt
--- 3492,3496 ----
  
  \global\lispnarrowing = 0.3in
! \setleading{12pt}
  \advance\topskip by -1cm
  \global\parskip 3pt plus 1pt
***************
*** 3386,3390 ****
  \global\tolerance=700
  \global\hfuzz=1pt
! \global\baselineskip=12pt
  \global\parskip 15pt plus 1pt
  
--- 3513,3517 ----
  \global\tolerance=700
  \global\hfuzz=1pt
! \setleading{12pt}
  \global\parskip 15pt plus 1pt
  
***************
*** 3401,3409 ****
  \global\pageheight=\vsize
  }
- 
- %% For a final copy, take out the rectangles
- %% that mark overfull boxes (in case you have decided
- %% that the text looks ok even though it passes the margin).
- \def\finalout{\overfullrule=0pt}
  
  % Define macros to output various characters with catcode for normal text.
--- 3528,3531 ----
diff -Nrc2 fontutils-0.5/fontconvert/.gdbinit fontutils-0.6/fontconvert/.gdbinit
*** fontutils-0.5/fontconvert/.gdbinit	Mon Aug 24 15:35:27 1992
--- fontutils-0.6/fontconvert/.gdbinit	Fri Oct 23 12:10:33 1992
***************
*** 116,120 ****
  #  	-fontdimens space:11.5  ../ourfonts/ggmr26b
  
- #set args -range a-a -space=32 ../gsrenderfont/phvr.300 -gf -out phvr.300gf
  #set args -tfm -verbose ../ourfonts/bodoni/gbdrsp.1200
  #set args -verbose -tfm ../imageto/slashsp.1200
--- 116,119 ----
***************
*** 152,160 ****
  
  # 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 -random=5 -random-threshold=.5 -gf -tfm cmr10  -output-file=r
--- 151,159 ----
  
  # 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
diff -Nrc2 fontutils-0.5/fontconvert/ChangeLog fontutils-0.6/fontconvert/ChangeLog
*** fontutils-0.5/fontconvert/ChangeLog	Thu Sep  3 09:30:31 1992
--- fontutils-0.6/fontconvert/ChangeLog	Tue Oct 27 13:02:50 1992
***************
*** 1,2 ****
--- 1,43 ----
+ Tue Oct 27 13:01:55 1992  Karl Berry  (karl@cs.umb.edu)
+ 
+ 	* Version 0.6.
+ 
+ Fri Oct 23 14:15:22 1992  Karl Berry  (karl@cs.umb.edu)
+ 
+ 	* main.c (main): Remove the -space option.
+         * output-gf.c (gf_finish_output): And remove the code that
+           implemented it.
+         (space_char): And this global.
+         * output-gf.h (space_char): And the decl.
+ 
+ Tue Oct 20 11:54:55 1992  Karl Berry  (karl@cs.umb.edu)
+ 
+ 	* main.c (main): Change the reporting so the space or newline
+ 	comes before the character, not after.
+ 
+ 	* main.c (main): Don't remove the suffix when making the output
+ 	filename, as we already did; pass the input name to
+ 	`gf_start_output', not the full bitmap filename.
+ 
+ Mon Oct  5 10:12:03 1992  Karl Berry  (karl@cs.umb.edu)
+ 
+ 	* main.c (read_command_line): If -text is given, set `report_file'
+ 	to stderr.
+ 
+ Sun Oct  4 14:03:53 1992  Karl Berry  (karl@cs.umb.edu)
+ 
+ 	* output-tfm.c (tfm_start_output): Report the TFM filename if we
+ 	are reading one.
+ 
+ 	* main.c (main): Report the full pathname of the font, not just
+ 	what the user gave us.
+ 
+ 	* main.c (main): Call `tfm_finish_output' before `gf_finish_output'.
+ 
+ Tue Sep 22 16:30:25 1992  Karl Berry  (karl@cs.umb.edu)
+ 
+         * output-gf.c (gf_finish_output): output a newline after the space
+           char's code.
+ 
  Thu Sep  3 09:30:31 1992  Karl Berry  (karl@hayley)
  
diff -Nrc2 fontutils-0.5/fontconvert/M.depend fontutils-0.6/fontconvert/M.depend
*** fontutils-0.5/fontconvert/M.depend	Wed Sep  2 17:20:46 1992
--- fontutils-0.6/fontconvert/M.depend	Sun Oct 25 14:16:00 1992
***************
*** 26,31 ****
    .././include/c-seek.h .././include/c-proto.h .././include/global.h .././include/lib.h \
    .././include/types.h .././include/filename.h random.h .././include/bitmap.h \
!   .././include/bounding-box.h .././include/tfm.h .././include/fix-num.h .././include/list.h \
!   filter.h main.h .././include/font.h output-tfm.h 
  random.o : random.c .././include/config.h .././include/c-auto.h .././include/c-std.h \
    .././include/c-memstr.h .././include/c-errno.h .././include/c-minmax.h .././include/c-limits.h \
--- 26,31 ----
    .././include/c-seek.h .././include/c-proto.h .././include/global.h .././include/lib.h \
    .././include/types.h .././include/filename.h random.h .././include/bitmap.h \
!   .././include/bounding-box.h .././include/report.h .././include/tfm.h .././include/fix-num.h \
!   .././include/list.h filter.h main.h .././include/font.h output-tfm.h 
  random.o : random.c .././include/config.h .././include/c-auto.h .././include/c-std.h \
    .././include/c-memstr.h .././include/c-errno.h .././include/c-minmax.h .././include/c-limits.h \
diff -Nrc2 fontutils-0.5/fontconvert/main.c fontutils-0.6/fontconvert/main.c
*** fontutils-0.5/fontconvert/main.c	Sun Aug 23 14:38:30 1992
--- fontutils-0.6/fontconvert/main.c	Fri Oct 23 14:16:05 1992
***************
*** 135,141 ****
  
    /* If no output name was specified on the command line, use the root
!      part of the input name.  */
    if (output_name == NULL)
!     output_name = remove_suffix (basename (font_name));
  
    if (wants_gf && wants_tfm && find_suffix (output_name) != NULL)
--- 135,142 ----
  
    /* If no output name was specified on the command line, use the root
!      part of the input name.  We've already removed the suffix in
!      `read_command_line'.  */
    if (output_name == NULL)
!     output_name = basename (font_name);
  
    if (wants_gf && wants_tfm && find_suffix (output_name) != NULL)
***************
*** 150,154 ****
      epsf_start_output (output_name);
    if (wants_gf)
!     gf_start_output (BITMAP_FONT_FILENAME (f), output_name, dpi,
                       BITMAP_FONT_COMMENT (f)); 
    if (wants_tfm)
--- 151,155 ----
      epsf_start_output (output_name);
    if (wants_gf)
!     gf_start_output (font_name, output_name, dpi,
                       BITMAP_FONT_COMMENT (f)); 
    if (wants_tfm)
***************
*** 173,177 ****
          tfm_start_font (font_name);
          
!       REPORT1 ("(%s\n", font_name);
        
        /* The main loop: convert each character.  */
--- 174,178 ----
          tfm_start_font (font_name);
          
!       REPORT1 ("(%s", BITMAP_FONT_FILENAME (f));
        
        /* The main loop: convert each character.  */
***************
*** 182,186 ****
            if (c == NULL) continue;
  
!           REPORT1 ("[%u", code);
  
            if (omit[code])
--- 183,187 ----
            if (c == NULL) continue;
  
!           REPORT2 ("%c[%u", ++char_count % 8 ? ' ' : '\n', code);
  
            if (omit[code])
***************
*** 196,200 ****
              }
  
!           REPORT1 ("]%c", ++char_count % 8 ? ' ' : '\n');
          }
  
--- 197,201 ----
              }
  
!           REPORT ("]");
          }
  
***************
*** 205,213 ****
    if (wants_epsf)
      epsf_finish_output ();
!   if (wants_gf)
!     gf_finish_output (design_size, atof (dpi));
    if (wants_tfm)
      tfm_finish_output ();
  
    return 0;
  }
--- 206,219 ----
    if (wants_epsf)
      epsf_finish_output ();
! 
!   /* We must finish the TFM output before GF, because `gf_finish_output'
!      might want to open a TFM file -- and we can only have one TFM file
!      open at a time.  (Because we haven't rewritten the TFM library.)  */
    if (wants_tfm)
      tfm_finish_output ();
  
+   if (wants_gf)
+     gf_finish_output (design_size, atof (dpi));
+ 
    return 0;
  }
***************
*** 413,419 ****
  remap <char1>:<char2>,<char1>:<char2>,...: for each pair, make the input
    character with code <char1> have code <char2> in the output.
- space [<char>]: if writing a GF file, output a character the width of the
-   interword space from the TFM file at position <char>.  The default for
-   <char> is 32.
  text: output the font to stdout as plain text, using `*'s and ` 's.
  tfm: write a TFM file to `<font_name>.tfm'.
--- 419,422 ----
***************
*** 457,461 ****
          { "range",		1, 0, 0 },
          { "remap",		1, 0, 0 },
-         { "space",		2, 0, 0 },
          { "text",		0, (int *) &wants_text, 1 },
          { "tfm",		0, (int *) &wants_tfm, 1 },
--- 460,463 ----
***************
*** 544,550 ****
          scan_remap_list (optarg);
  
!       else if (ARGUMENT_IS ("space"))
!         space_char = optarg ? xparse_charspec (optarg, encoding_info) : 32;
!         
        else if (ARGUMENT_IS ("tfm-header"))
          tfm_header = optarg;
--- 546,552 ----
          scan_remap_list (optarg);
  
!       else if (ARGUMENT_IS ("text"))
!         report_file = stderr;
! 
        else if (ARGUMENT_IS ("tfm-header"))
          tfm_header = optarg;
***************
*** 558,563 ****
    FINISH_COMMAND_LINE ();
  }
! 
! 
  /* The string S specifies baseline adjustments for individual
     characters: `<charcode>:<adjustment>,...'.  We set the element
--- 560,564 ----
    FINISH_COMMAND_LINE ();
  }
! 
  /* The string S specifies baseline adjustments for individual
     characters: `<charcode>:<adjustment>,...'.  We set the element
diff -Nrc2 fontutils-0.5/fontconvert/output-gf.c fontutils-0.6/fontconvert/output-gf.c
*** fontutils-0.5/fontconvert/output-gf.c	Fri Jun  5 14:41:02 1992
--- fontutils-0.6/fontconvert/output-gf.c	Fri Oct 23 14:16:05 1992
***************
*** 25,32 ****
  #include "output-gf.h"
  
- /* If not -1, specifies the charcode at which to output an invisible
-    char the width of an interword space.  (-space) */
- int space_char = -1;
- 
  /* The basename of the input file.  */
  static string input_basename;
--- 25,28 ----
***************
*** 77,82 ****
  }
  
! /* Write the space character, if desired, and then the postamble and
!    close the file.  */
  
  void
--- 73,78 ----
  }
  
! /* Write the postamble and close the file.  */
! 
  
  void
***************
*** 83,110 ****
  gf_finish_output (real design_size, real dpi)
  {
-   if (space_char != -1)
-     {
-       string tfm_name = find_tfm_filename (input_basename);
-       
-       if (tfm_name != NULL && tfm_open_input_file (tfm_name))
-         {
-           char_info_type c;
-           real space_width = tfm_get_interword_space ();
-           
-           tfm_close_input_file ();
-           
-           CHARCODE (c) = space_char;
-           BITMAP_WIDTH (CHAR_BITMAP (c)) = 0;
-           BITMAP_HEIGHT (CHAR_BITMAP (c)) = 0;
-           CHAR_BB (c) = ((bounding_box_type) { 0, 0, 0, 0 });
-           CHAR_SET_WIDTH (c) = POINTS_TO_PIXELS (space_width, dpi);
-           CHAR_TFM_WIDTH (c) = real_to_fix (space_width / design_size);
-           REPORT1 ("[%d]", space_char);
-           gf_output_char (c, 1.0);
-         }
-       else
-         WARNING ("I can't output a space character without a TFM file");
-     }
-     
    gf_put_postamble (real_to_fix (design_size), dpi, dpi);
    gf_close_output_file ();
--- 79,82 ----
diff -Nrc2 fontutils-0.5/fontconvert/output-gf.h fontutils-0.6/fontconvert/output-gf.h
*** fontutils-0.5/fontconvert/output-gf.h	Wed Apr  8 15:17:00 1992
--- fontutils-0.6/fontconvert/output-gf.h	Fri Oct 23 14:16:05 1992
***************
*** 23,29 ****
  #include "font.h"
  
- /* See output-gf.c.  */
- extern int space_char;
- 
  /* Initialize GF output, output a character, and finish it up.  */
  extern void gf_start_output
--- 23,26 ----
diff -Nrc2 fontutils-0.5/fontconvert/output-tfm.c fontutils-0.6/fontconvert/output-tfm.c
*** fontutils-0.5/fontconvert/output-tfm.c	Sun Jun 14 08:50:18 1992
--- fontutils-0.6/fontconvert/output-tfm.c	Sun Oct  4 14:41:45 1992
***************
*** 21,24 ****
--- 21,25 ----
  #include "filename.h"
  #include "random.h"
+ #include "report.h"
  #include "tfm.h"
  
***************
*** 99,102 ****
--- 100,105 ----
        have_file_info = true;
  
+       REPORT1 ("Reading %s.\n", input_tfm_name);
+       
        /* Never carry along the checksum.  */
        TFM_CHECKSUM (tfm_info) = 0;
diff -Nrc2 fontutils-0.5/fontconvert/version.c fontutils-0.6/fontconvert/version.c
*** fontutils-0.5/fontconvert/version.c	Thu Sep  3 09:46:20 1992
--- fontutils-0.6/fontconvert/version.c	Tue Oct 27 13:27:59 1992
***************
*** 1 ****
! char *version_string = "fontconvert version 0.5";
--- 1 ----
! char *version_string = "fontconvert version 0.6";
diff -Nrc2 fontutils-0.5/gf/ChangeLog fontutils-0.6/gf/ChangeLog
*** fontutils-0.5/gf/ChangeLog	Thu Sep  3 09:30:43 1992
--- fontutils-0.6/gf/ChangeLog	Tue Oct 27 13:02:51 1992
***************
*** 1,2 ****
--- 1,11 ----
+ Tue Oct 27 12:56:09 1992  Karl Berry  (karl@cs.umb.edu)
+ 
+ 	* Version 0.6.
+ 
+ Mon Sep 21 13:20:29 1992  Karl Berry  (karl@cs.umb.edu)
+ 
+         * gf_output.c (start_put_char): don't claim we are part of the
+           nonexistent put_gf_char in the warning.
+ 
  Thu Sep  3 09:30:43 1992  Karl Berry  (karl@hayley)
  
diff -Nrc2 fontutils-0.5/gf/gf_output.c fontutils-0.6/gf/gf_output.c
*** fontutils-0.5/gf/gf_output.c	Sat Jun  6 10:05:21 1992
--- fontutils-0.6/gf/gf_output.c	Mon Sep 21 13:23:23 1992
***************
*** 224,228 ****
    if (this_char_loc->char_pointer != NULL_BYTE_PTR)
      {
!       WARNING1 ("put_gf_char: Character %u already output", charcode);
        return;
      }
--- 224,228 ----
    if (this_char_loc->char_pointer != NULL_BYTE_PTR)
      {
!       WARNING1 ("gf_put_char: Character %u already output", charcode);
        return;
      }
diff -Nrc2 fontutils-0.5/gsrenderfont/.gdbinit fontutils-0.6/gsrenderfont/.gdbinit
*** fontutils-0.5/gsrenderfont/.gdbinit	Wed Apr 15 08:23:54 1992
--- fontutils-0.6/gsrenderfont/.gdbinit	Fri Oct 23 15:03:58 1992
***************
*** 7,9 ****
  end
  
! set args -verbose pncri
--- 7,9 ----
  end
  
! set args -verbose -trace psyr>/tmp/out
diff -Nrc2 fontutils-0.5/gsrenderfont/ChangeLog fontutils-0.6/gsrenderfont/ChangeLog
*** fontutils-0.5/gsrenderfont/ChangeLog	Thu Sep  3 15:34:26 1992
--- fontutils-0.6/gsrenderfont/ChangeLog	Tue Oct 27 13:02:50 1992
***************
*** 1,2 ****
--- 1,143 ----
+ Tue Oct 27 13:01:59 1992  Karl Berry  (karl@cs.umb.edu)
+ 
+ 	* Version 0.6.
+ 
+ Sat Oct 24 05:03:22 1992  Karl Berry  (karl@cs.umb.edu)
+ 
+ 	* gsrf.in: Don't give -encoding to imageto if the user didn't give
+ 	us an encoding.
+ 
+ Fri Oct 23 07:30:20 1992  Karl Berry  (karl@cs.umb.edu)
+ 
+ 	* writefont.PS (find-encoding): New routine.
+ 	* gsrf.in: Pass a sentinel to use the input encoding by default.
+ 
+ 	* gsrf.in: Take only the first occurrence in the map file.
+ 
+ 	* GNUmakefile (extraclean): Remove all the temp files we might create.
+ 
+ 	* input-pbm.c (pbm_get_block): Go back to finding the first
+ 	all-white row after the block.  Will I ever learn?  We are now
+ 	almost entirely back to the original code, except that we only
+ 	skip at most BLANK_COUNT white rows.  If I had just fixed that bug
+ 	in the first place, I would have been done three days ago.
+ 
+ 	* writefont.PS (set-char-variables): We can output /space now.
+         (output-space-char, number-buffer): Delete.
+         * gsrf.in: Don't do the fontconvert -space stuff.
+ 
+ 	* input-pbm.c (pbm_get_block): Don't read the blank rows into the
+ 	bitmap we return.
+ 
+ 	* writefont.PS (compute-max-char-dimens): Round char-height when
+ 	moving, so the character doesn't get out of its block.
+ 
+ 	* input-pbm.c (get_row): Go back to stdout for the scanline trace.
+ 
+ 	* input-pbm.c (pbm_get_block): Rewrite to read a constant number
+ 	of scanlines.
+ 
+ 	* main.c: Doc fix.
+ 
+ Thu Oct 22 14:49:08 1992  Karl Berry  (karl@cs.umb.edu)
+ 
+ 	* writefont.PS (compute-max-char-dimens): convert
+ 	max-char-tall-in-pixels to an integer after computing it.
+ 
+ 	* input-pbm.c (get_row): Output scanline trace to stderr.
+ 
+ 	* main.c (main): Handle extensions as we do in other programs.
+ 
+ 	* writefont.PS: Use `incr' where appropriate (forgot we had it!).
+ 
+ 	* writefont.PS (encoding-chars-present-3): Set the current point
+ 	before trying to render anything.
+ 
+ 	* writefont.PS (type3-setfont): Copy the dictionary before calling
+ 	definefont.
+ 
+ 	* writefont.PS (encoding-chars-present-3): Pass the character code
+ 	to be rendered, not the character name.
+ 
+ Wed Oct 21 08:40:02 1992  Karl Berry  (karl@cs.umb.edu)
+ 
+ 	* writefont.PS (type3-render-p, type3-setfont,
+ 	encoding-chars-present{,-[13]}): New routines.
+         (reencode-font): Set the new encoding to only those characters
+         which are actually present in the font, as far as we can tell.
+ 
+ Tue Oct 20 10:12:44 1992  Karl Berry  (karl@cs.umb.edu)
+ 
+ 	* GNUmakefile (install): Make second arg a directory, not a file.
+ 
+ 	* writefont.PS (set-font): Don't define `font-charstrings', since
+ 	not all fonts have it.
+ 
+ 	* writefont.PS (concat-strings): Use Ghostscript's predefined
+ 	concatstrings instead.
+ 
+ 	* gsrf.in (-output-file): New option.
+         (filename): Rename to `output_file'; default to new variable
+         `input_file'; pass it to Ghostscript.
+         * writefont.PS (font-basename): Rename to `output-filename'.
+         (input-filename): New argument to program.
+         (reencode-file): Read input-filename if the fontname is unknown to GS.
+ 
+ 	* gsrf.in: Specify ./<filename> to gftopk.
+ 
+ 	* gsrf.in: Specify the .pbm extension explicitly to imageto, in
+ 	case the filename has a `.' in it.
+ 
+ 	* main.c (main): Output to standard output if no output file is
+ 	specified.
+         (read_command_line): Output the version info to stderr.
+         * gsrf.in: Redirect output from bbcount.
+ 
+ 	* gsrf.in: Require both a filename and a fontname to be present,
+ 	and give appropriate error messages.
+ 
+ 	* gsrf.in: Echo the invocation of Ghostscript if we are verbose.
+ 
+ Sat Oct 17 08:36:45 1992  Karl Berry  (karl@cs.umb.edu)
+ 
+ 	* writefont.PS (set-font): Do `setfont' after `scalefont'.
+ 
+ 	* writefont.PS (reencode-font): Test for the various keys we don't
+ 	copy properly -- we were dup'ing the truth value.
+ 
+ Sun Oct 11 15:14:27 1992  Karl Berry  (karl@cs.umb.edu)
+ 
+ 	* writefont.PS (set-font): Use findfont scalefont instead of
+ 	selectfont, in case Ghostscript wasn't installed with level 2 features.
+ 
+ Sun Oct  4 09:42:25 1992  Karl Berry  (karl@cs.umb.edu)
+ 
+ 	* writefont.PS (baseline-adjustment): Negate the depth.
+ 
+ 	* gsrf.in: Remove a PK file so fontconvert will always read the
+ 	newly-output GF file.
+ 
+ 	* gsrf.in: Don't pass -clean-threshold to imageto, since it's no
+ 	longer an option.
+ 
+ 	* main.c (main): `bounding_box_list_type' is now `bb_list_type'.
+ 
+ Tue Sep 22 14:50:47 1992  Karl Berry  (karl@cs.umb.edu)
+ 
+         * gsrf.in: specify -clean-threshold=100, so we don't throw away
+           parts of our characters.
+ 
+ Mon Sep 21 13:00:57 1992  Karl Berry  (karl@cs.umb.edu)
+ 
+         * gsrf.in: use -eq, not =, to see if we should make a space character.
+ 
+         * gsrf.in: if verbose, do not specify -q to gs.
+ 
+ Mon Sep 14 09:30:16 1992  Karl Berry  (karl@hayley)
+ 
+         * GNUmakefile (gsrenderfont): make readonly.
+ 
+         * GNUmakefile (check): depend on bbcount.
+ 
  Thu Sep  3 09:30:47 1992  Karl Berry  (karl@hayley)
  
diff -Nrc2 fontutils-0.5/gsrenderfont/GNUmakefile fontutils-0.6/gsrenderfont/GNUmakefile
*** fontutils-0.5/gsrenderfont/GNUmakefile	Thu Sep  3 15:34:26 1992
--- fontutils-0.6/gsrenderfont/GNUmakefile	Sat Oct 24 04:54:39 1992
***************
*** 30,40 ****
  
  gsrenderfont: gsrf.in
  	sed -e "s,replace-with-lib-path,$(default_lib_path)," $< > $@
  	chmod +x $@
  
  install::
! 	$(INSTALL_PROGRAM) gsrenderfont $(bindir)
! 	$(INSTALL_DATA) fixifibb.awk $(fu_datadir)
! 	$(INSTALL_DATA) writefont.PS $(fu_datadir)
  
  dist::
--- 30,42 ----
  
  gsrenderfont: gsrf.in
+ 	rm -f $@
  	sed -e "s,replace-with-lib-path,$(default_lib_path)," $< > $@
+ 	chmod a-w $@
  	chmod +x $@
  
  install::
! 	$(INSTALL_PROGRAM) gsrenderfont $(bindir)/gsrenderfont
! 	$(INSTALL_DATA) fixifibb.awk $(fu_datadir)/fixifibb.awk
! 	$(INSTALL_DATA) writefont.PS $(fu_datadir)/writefont.PS
  
  dist::
***************
*** 43,49 ****
  include M.depend
  
! check: gsrenderfont
! 	gsrenderfont -verbose -version -font Times-Roman
  
  distclean::
  	rm -f gsrenderfont
--- 45,56 ----
  include M.depend
  
! check: gsrenderfont bbcount
! 	rm -f Style.tfm Style.300*
! 	gsrenderfont -verbose -version Style.ps -font=Style
! 	fontconvert -tfm ./Style.300
  
  distclean::
  	rm -f gsrenderfont
+ 
+ extraclean::
+ 	rm -f *.xifi *.bfi *.pbm *.bbs *.pl *.ifi
diff -Nrc2 fontutils-0.5/gsrenderfont/M.depend fontutils-0.6/gsrenderfont/M.depend
*** fontutils-0.5/gsrenderfont/M.depend	Wed Sep  2 17:20:48 1992
--- fontutils-0.6/gsrenderfont/M.depend	Sun Oct 25 14:16:02 1992
***************
*** 7,12 ****
    .././include/c-memstr.h .././include/c-errno.h .././include/c-minmax.h .././include/c-limits.h \
    .././include/c-seek.h .././include/c-proto.h .././include/global.h .././include/lib.h \
!   .././include/types.h .././include/bb-outline.h .././include/bitmap.h .././include/bounding-box.h \
!   .././include/cmdline.h .././include/filename.h .././include/getopt.h .././include/report.h \
!   input-pbm.h 
  version.o : version.c 
--- 7,12 ----
    .././include/c-memstr.h .././include/c-errno.h .././include/c-minmax.h .././include/c-limits.h \
    .././include/c-seek.h .././include/c-proto.h .././include/global.h .././include/lib.h \
!   .././include/types.h .././include/bb-outline.h .././include/bb-list.h .././include/bounding-box.h \
!   .././include/bitmap.h .././include/cmdline.h .././include/filename.h .././include/getopt.h \
!   .././include/report.h input-pbm.h 
  version.o : version.c 
diff -Nrc2 fontutils-0.5/gsrenderfont/gsrf.in fontutils-0.6/gsrenderfont/gsrf.in
*** fontutils-0.5/gsrenderfont/gsrf.in	Thu Sep  3 09:46:18 1992
--- fontutils-0.6/gsrenderfont/gsrf.in	Tue Oct 27 13:27:57 1992
***************
*** 2,9 ****
  # 
  # Shell script to invoke Ghostscript on a font, create an image, and
! # then run imagetofont to get a bitmap font.  (Can then run
! # fontconvert to get a tfm.)
  
! version=0.5
  
  # Set defaults.
--- 2,9 ----
  # 
  # Shell script to invoke Ghostscript on a font, create an image, and
! # then run imagetofont to get a bitmap font.  (You can then run
! # fontconvert to get a tfm if desired.)
  
! version=0.6
  
  # Set defaults.
***************
*** 10,14 ****
  resolution=300
  point_size=10
! encoding=dvips
  map_file=/usr/local/lib/tex/dvips/psfonts.map
  
--- 10,14 ----
  resolution=300
  point_size=10
! encoding=
  map_file=/usr/local/lib/tex/dvips/psfonts.map
  
***************
*** 81,84 ****
--- 81,99 ----
      ;;
  
+   -output-file=* | -output-fil=* | -output-fi=* | -output-f=* | -output-=* \
+   | -output=* | -output=* | -outpu=* | -outp=* | -out=* | -ou=* | -o=* \
+   | --output-file=* | --output-fil=* | --output-fi=* | --output-f=* \
+   | --output-=* | --output=* | --output=* | --outpu=* | --outp=* \
+   | --out=* | --ou=* | --o=* )
+     output_file=`echo $1 | sed 's/[-a-z_]*=//'`
+     ;;
+   -output-file | -output-fil | -output-fi | -output-f | -output- \
+   | -output | -output | -outpu | -outp | -out | -ou | -o \
+   | --output-file | --output-fil | --output-fi | --output-f | --output- \
+   | --output | --output | --outpu | --outp | --out | --ou | --o)
+     shift
+     output_file=$1
+     ;;
+ 
    -point-size=* | -point-siz=* | -point-si=* | -point-s=* | -point-=* \
    | -point=* | -poin=* | -poi=* | -po=* | -p=* \
***************
*** 115,122 ****
      ;;
  
!   *)   if test -z "$filename"
!        then filename=$1
         else
!          echo "Too many filenames.  Use -help for more information."
           exit 1
         fi
--- 130,138 ----
      ;;
  
!   *)   if test -z "$input_file"
!        then input_file=$1
         else
!          echo "Too many filenames ($1 was the second)."
!          echo "Use -help for more information."
           exit 1
         fi
***************
*** 126,131 ****
  done
  
! # If they just wanted the version number, exit.
! if test -z "$filename" && test -z "$fontname" && test -n "$printed_version"
  then exit 0
  fi
--- 142,146 ----
  done
  
! if test -z "$input_file" && test -z "$fontname" && test -n "$printed_version"
  then exit 0
  fi
***************
*** 135,148 ****
  # r<filename> <fontname> <stuff we ignore>
  # 
! # The filename has an `r' in front because it specifies the raw fonts,
! # not the virtual ones.
  if test -r $map_file
  then
!   if test -n "$filename" && test -z "$fontname"
!   then fontname=`awk "/^r?$filename[ 	]/"'{print $2}' $map_file`
!   elif test -z "$filename" -a -n "$fontname"
    then
!     filename=`awk "/[ 	]$fontname[ 	]*"'$/ {print $1}' $map_file \
!       | sed -e 's/^rp/p/'`
    fi
  fi
--- 150,163 ----
  # r<filename> <fontname> <stuff we ignore>
  # 
! # The filename might have an `r' in front to specify a raw fonts, not
! # the virtual one (for the user).
  if test -r $map_file
  then
!   if test -n "$input_file" && test -z "$fontname"
!   then fontname=`awk "/^r?$input_file[ 	]/"'{print $2; exit}' $map_file`
!   elif test -z "$input_file" && test -n "$fontname"
    then
!     filename=`awk "/[ 	]$fontname[ 	]*"'$/ {print $1; exit}' $map_file \
!       | sed -e 's/^r?p/p/'`
    fi
  fi
***************
*** 149,159 ****
  
  # We need both a filename and a fontname to do anything.
! if test -z "$filename" && test -z "$fontname"
  then
!   echo "Either a fontname (e.g., Times-Roman) or a filename (e.g., phvr)"
!   echo "is needed.  Use -help for more information."
    exit 1
  fi
  
  # We need the lib path for encoding files.
  if test -n "$FONTUTIL_LIB"
--- 164,198 ----
  
  # We need both a filename and a fontname to do anything.
! if test -z "$input_file"
! then
!   if test -z "$fontname"
!   then
!     # Didn't have either one.
!     echo "Either a fontname (e.g., Times-Roman) or a filename (e.g., ptmr)"
!     echo "is needed.  Use -help for more information."
!     exit 1
!   else
!     # Had a fontname, but no filename.
!     echo "I couldn't find the filename corresponding to the font $fontname."
!     echo "Please specify it."
!     exit 1
!   fi
! elif test -z "$fontname"
  then
!   # Had a filename, but no fontname.
!   echo "I couldn't find the font corresponding to the file \`$input_file'."
!   echo "Please specify it with -font."
    exit 1
  fi
  
+ # If we have no output file, use the input file (but strip off `.ps' or
+ # other such extensions).
+ # 
+ if test -z "$output_file"
+ then output_file=`basename $input_file \
+   | sed -e 's/\.ps$//'  -e 's/\.pf3$//' -e 's/\.gsf$//' \
+         -e 's/\.pfa$//' -e 's/\.pfb$//'`
+ fi
+ 
  # We need the lib path for encoding files.
  if test -n "$FONTUTIL_LIB"
***************
*** 162,176 ****
  fi
  
! # Run Ghostscript.  For example:
! # gsnd -I../data -- writefont.PS dvips 300 10 phvr Helvetica
! gsnd -I$lib_path -- writefont.PS \
!   $encoding $resolution $point_size $filename $fontname || exit 1
  
  # Count the bounding boxes in each character.
! bbcount $verbose $filename || exit 1
  
  # Insert the bounding box counts into the IFI file.
! AWKPATH=$lib_path gawk -f fixifibb.awk -vbbsfile=$filename.bbs \
!                     <$filename.xifi >$filename.ifi \
                    || exit 1
  
--- 201,231 ----
  fi
  
! # If the encoding file wasn't specified, use a sentinel to get the
! # one from the input font.  We include a / in the name so it's highly
! # unlikely to ever be a reasonable encoding name itself.
! # 
! if test -z "$encoding"
! then gs_encoding=/encoding-from-input
! else gs_encoding=$encoding
! fi
! 
! # Let Ghostscript give us its normal messages if we are verbose.
! # 
! if test -z "$verbose"
! then quiet="-q"
! fi
! 
! # We don't use gsnd because that always uses -q.
! # 
! gs -DNODISPLAY $quiet -I$lib_path -- writefont.PS \
!   $gs_encoding $resolution $point_size $output_file $input_file $fontname \
! || exit 1
  
  # Count the bounding boxes in each character.
! bbcount $verbose $output_file > $output_file.bbs || exit 1
  
  # Insert the bounding box counts into the IFI file.
! AWKPATH=$lib_path gawk -f fixifibb.awk -vbbsfile=$output_file.bbs \
!                     <$output_file.xifi >$output_file.ifi \
                    || exit 1
  
***************
*** 182,205 ****
  final_resolution=`expr $resolution \* $point_size / 10`
  
! # Make a font out of the image.
! imageto $verbose -encoding=$encoding -input-format=pbm \
!   -dpi=$resolution $filename -o=$filename.${final_resolution}gf || exit 1
! 
! # Add the space character if necessary.
! if test "`wc -l<$filename.bfi`" = 3
! then
!   spacechar="`tail -1 $filename.bfi`"
!   fontconvert -space=$spacechar -gf $filename.${final_resolution}gf \
!     -out=x$filename.${final_resolution}gf
!   mv x$filename.${final_resolution}gf $filename.${final_resolution}gf
  fi
  
! # PK files are smaller than GF files, and hold the same information.
  if test -n "$verbose"
  then verbose=-v
  fi
! gftopk $verbose $filename.${final_resolution}gf || exit 1
  
! rm -f $filename.${final_resolution}gf
! rm -f $filename.bbs $filename.xifi $filename.pbm
! rm -f $filename.bfi $filename.ifi
--- 237,259 ----
  final_resolution=`expr $resolution \* $point_size / 10`
  
! # Make a font out of the image; do not throw away any bounding boxes,
! # there's no noise in this image.
! # 
! if test -n "$encoding"
! then encoding="-encoding=$encoding"
  fi
  
! imageto $verbose $encoding -dpi=$resolution \
!   $output_file.pbm -o=$output_file.${final_resolution}gf || exit 1
! 
! # PK files are smaller than GF files, and hold the same information, so
! # convert to PK form and throw the GF file away.
! # 
  if test -n "$verbose"
  then verbose=-v
  fi
! gftopk $verbose ./$output_file.${final_resolution}gf || exit 1
  
! rm -f $output_file.${final_resolution}gf
! rm -f $output_file.bbs $output_file.xifi $output_file.pbm
! rm -f $output_file.bfi $output_file.ifi
diff -Nrc2 fontutils-0.5/gsrenderfont/input-pbm.c fontutils-0.6/gsrenderfont/input-pbm.c
*** fontutils-0.5/gsrenderfont/input-pbm.c	Tue Apr 21 07:49:06 1992
--- fontutils-0.6/gsrenderfont/input-pbm.c	Fri Oct 23 15:07:45 1992
***************
*** 56,67 ****
    pbm_input_file = NULL;
  }
- 
- 
  
! /* Read a block HEIGHT scanlines high from the image.  The last few
!    scanlines must all be blank (we don't bother to return them).  If
!    they aren't, then a rounding error has caused Ghostscript to give us
!    fewer lines than expected.  Just return a short block, and save that
!    line for next time.  */
  
  /* The constant here must match that in writefont.PS's calculation of
--- 56,66 ----
    pbm_input_file = NULL;
  }
  
! /* Read a block exactly HEIGHT scanlines high from the image.  The last
!    few scanlines must all be blank (we don't bother to return them).  If
!    they aren't, then something is wrong.  A rounding error has caused
!    Ghostscript to give us fewer lines than expected.  Just return a
!    short block, and save the first nonblank line (we don't read past the
!    first) for next time.  */
  
  /* The constant here must match that in writefont.PS's calculation of
***************
*** 72,83 ****
  pbm_get_block (unsigned height)
  {
-   static boolean at_eof = false;
-   static int image_format;
-   static int image_height;
    static int image_width = -1;
    static one_byte *saved_scanline = NULL;
    int c;
!   one_byte *block, *row;
!   unsigned block_height;
    bitmap_type *b = XTALLOC1 (bitmap_type);
  
--- 71,83 ----
  pbm_get_block (unsigned height)
  {
    static int image_width = -1;
    static one_byte *saved_scanline = NULL;
+   static one_byte *blank_row;
+   static int image_format;
+   static int image_height;
    int c;
!   one_byte *row;
!   one_byte *block;
!   unsigned block_height, blank;
    bitmap_type *b = XTALLOC1 (bitmap_type);
  
***************
*** 84,105 ****
    /* Initialize the PBM info if necessary.  */
    if (image_width == -1)
-     pbm_readpbminit (pbm_input_file, &image_width, &image_height,
-                      &image_format);
- 
-   if (at_eof)
-     return NULL;
-     
-   /* If we have a saved scanline, let that start us off.  */
-   if (saved_scanline)
-     {
-       block = saved_scanline;
-       block_height = 1;
-     }
-   else
      {
!       block = NULL;
!       block_height = 0;
      }
  
    /* Attach rows until we get to an all-white row that is after row #
       `height - BLANK_COUNT'.  */
--- 84,98 ----
    /* Initialize the PBM info if necessary.  */
    if (image_width == -1)
      {
!       pbm_readpbminit (pbm_input_file, &image_width, &image_height,
!                        &image_format);
!       blank_row = xmalloc (image_width);
      }
  
+ 
+   /* If we have a saved scanline, let that start us off.  */
+   block = saved_scanline;
+   block_height = !!block;
+ 
    /* Attach rows until we get to an all-white row that is after row #
       `height - BLANK_COUNT'.  */
***************
*** 106,109 ****
--- 99,110 ----
    do
      {
+       /* If we're at the end of the file, quit.  Presumably there was
+          one last blank row at the end or something.  If something was
+          seriously wrong, it'll manifest itself later.  */
+       c = getc (pbm_input_file);
+       if (c == EOF)
+         return NULL;
+       ungetc (c, pbm_input_file);
+ 
        block_height++;
        block = xrealloc (block, block_height * image_width);
***************
*** 111,145 ****
        get_row (row, image_width, image_format);
      }
!   while (!(block_height > height - BLANK_COUNT
!            && memchr (row, BLACK, image_width) == NULL));
  
!   /* Skip more all-blank rows.  We can keep using `row' as our buffer,
!      since it just points to the all-blank row we found; we won't be
!      including it in the bitmap we return.  We might hit the end of the
!      image here, in which case we just stop.  */
!   do
      {
        c = getc (pbm_input_file);
!       at_eof = c == EOF;
  
!       if (!at_eof)
!         {
!           ungetc (c, pbm_input_file);
!           get_row (row, image_width, image_format);
!         }
      }
!   while (!at_eof && memchr (row, BLACK, image_width) == NULL);
!   
!   /* If we are not at eof, save the nonblank row we found to start us
!      off next time.  */
!   if (!at_eof)
      {
        saved_scanline = xmalloc (image_width);
!       memcpy (saved_scanline, row, image_width);
      }
! 
    /* Fill in the bitmap to return.  */
    BITMAP_WIDTH (*b) = image_width;
!   BITMAP_HEIGHT (*b) = block_height - 1;
    BITMAP_BITS (*b) = block;
  
--- 112,147 ----
        get_row (row, image_width, image_format);
      }
!   while (block_height <= height - BLANK_COUNT
!          || memchr (row, BLACK, image_width));
  
!   /* Skip the next BLANK_COUNT rows (they had better be blank).  We can
!      keep using `row' as our buffer, since it just points to the
!      all-blank row we found; we won't be including it in the bitmap we
!      return.  We might hit the end of the image here, in which case we
!      just stop.  */
!   for (blank = 1; blank < BLANK_COUNT; blank++)
      {
        c = getc (pbm_input_file);
!       if (c == EOF)
!         break;
!         
!       ungetc (c, pbm_input_file);
!       get_row (blank_row, image_width, image_format);
  
!       if (memchr (blank_row, BLACK, image_width) != NULL)
!         break;
      }
! 
!   if (blank == BLANK_COUNT)
!     saved_scanline = NULL;
!   else
      {
        saved_scanline = xmalloc (image_width);
!       memcpy (saved_scanline, blank_row, image_width);
      }
!   
    /* Fill in the bitmap to return.  */
    BITMAP_WIDTH (*b) = image_width;
!   BITMAP_HEIGHT (*b) = block_height;
    BITMAP_BITS (*b) = block;
  
diff -Nrc2 fontutils-0.5/gsrenderfont/main.c fontutils-0.6/gsrenderfont/main.c
*** fontutils-0.5/gsrenderfont/main.c	Fri Jun  5 09:20:26 1992
--- fontutils-0.6/gsrenderfont/main.c	Fri Oct 23 07:09:46 1992
***************
*** 57,61 ****
     Ghostscript.  So this program reads an image, counts the bounding
     boxes in each character, and writes another file with the bounding
!    box counts.  */
  
  #define PROGRAM_NAME "bbcount"
--- 57,66 ----
     Ghostscript.  So this program reads an image, counts the bounding
     boxes in each character, and writes another file with the bounding
!    box counts.
!    
!    We assume that all characters occupy the same number of scanlines; we
!    simply read that constant number for each character.  We can't put
!    other marks in the image to avoid this assumption, since then Imageto
!    will have to contend with t.  */
  
  #define PROGRAM_NAME "bbcount"
***************
*** 70,96 ****
    string font_name = read_command_line (argc, argv);
    
!   /* Since we have to read two input files, we just throw away any
!      extension they give us.  This doesn't support filenames like
!      `a.b.pbm'.  */
!   string font_basename = basename (font_name);
!   if (font_basename != font_name)
!     WARNING2 ("%s: Ignoring extension on `%s'", PROGRAM_NAME, font_name);
  
    /* Open the image input file.  */
!   pbm_open_input_file (concat (font_basename, ".pbm"));
    
    /* Read the information about that image file.  */
!   bfi = read_bfi_file (concat (font_basename, ".bfi"));
  
    if (output_name == NULL)
!     output_name = font_basename;
! 
!   output_name =  extend_filename (output_name, "bbs");
                      
-   bbs_file = xfopen (output_name, "w");
- 
    while ((b = pbm_get_block (bfi.char_height)) != NULL)
      {
!       bounding_box_list_type boxes = find_outline_bbs (*b, false, 0, 0);
        fprintf (bbs_file, "%d\n", BB_LIST_LENGTH (boxes));
        
--- 75,102 ----
    string font_name = read_command_line (argc, argv);
    
!   /* We have to read two input files, but they might have given us a
!      suffix on the PBM file, so we have to remove it for the BFI.  This
!      doesn't support filenames like `a.b.pbm'.  */
  
    /* Open the image input file.  */
!   pbm_open_input_file (extend_filename (font_name, "pbm"));
    
    /* Read the information about that image file.  */
!   bfi = read_bfi_file (make_suffix (font_name, "bfi"));
  
    if (output_name == NULL)
!     {
!       bbs_file = stdout;
!       report_file = stderr;
!     }
!   else
!     {
!       output_name =  make_suffix (output_name, "bbs");
!       bbs_file = xfopen (output_name, "w");
!     }
                      
    while ((b = pbm_get_block (bfi.char_height)) != NULL)
      {
!       bb_list_type boxes = find_outline_bbs (*b, false, 0, 0);
        fprintf (bbs_file, "%d\n", BB_LIST_LENGTH (boxes));
        
***************
*** 139,145 ****
  "help: print this message.
  output-file <filename>: write to <filename>.bbs if <filename> has no
!   suffix, and to <filename> if it has.  Default is the concatenation of
!   <font_name> with the size removed (e.g., for `cmr10' it would be `cmr')
!   and `.bbs'.
  trace-scanlines: show every scanline as we read it.
  verbose: output progress reports to stderr.
--- 145,149 ----
  "help: print this message.
  output-file <filename>: write to <filename>.bbs if <filename> has no
!   suffix, and to <filename> if it has.  Default is standard output.
  trace-scanlines: show every scanline as we read it.
  verbose: output progress reports to stderr.
***************
*** 183,187 ****
        
        else if (ARGUMENT_IS ("version"))
!         printf ("%s.\n", version_string);
  
        /* Else it was a flag; getopt has already done the assignment.  */
--- 187,191 ----
        
        else if (ARGUMENT_IS ("version"))
!         fprintf (stderr, "%s.\n", version_string);
  
        /* Else it was a flag; getopt has already done the assignment.  */
diff -Nrc2 fontutils-0.5/gsrenderfont/version.c fontutils-0.6/gsrenderfont/version.c
*** fontutils-0.5/gsrenderfont/version.c	Thu Sep  3 09:46:20 1992
--- fontutils-0.6/gsrenderfont/version.c	Tue Oct 27 13:27:59 1992
***************
*** 1 ****
! char *version_string = "bbcount version 0.5";
--- 1 ----
! char *version_string = "bbcount version 0.6";
diff -Nrc2 fontutils-0.5/gsrenderfont/writefont.PS fontutils-0.6/gsrenderfont/writefont.PS
*** fontutils-0.5/gsrenderfont/writefont.PS	Fri Aug 21 16:15:19 1992
--- fontutils-0.6/gsrenderfont/writefont.PS	Sat Oct 24 05:00:24 1992
***************
*** 17,23 ****
  % Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  
! % Make a local environment.
! % 
! 100 dict begin
  
  /verbose false def
--- 17,21 ----
  % Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  
! 100 dict begin % our local environment
  
  /verbose false def
***************
*** 47,66 ****
  
  
- % Leaves the concatenation of two string arguments on the stack.
- % 
- /concat-strings
- {
-   /string-2 exch def
-   /string-1 exch def	
-   /after-string-1 string-1 length def
-   /answer-string-length string-1 length string-2 length add def
-   /answer-string answer-string-length string def
-   string-1 answer-string copy pop
-   answer-string after-string-1 string-2 putinterval
-   answer-string
- }
- bdef
- 
- 
  % DICT pdict prints all the components in the dictionary in a
  % human-readable way.
--- 45,48 ----
***************
*** 82,86 ****
  
  % Use the real definition of points, not PostScript's.
! /points-per-inch 72.27 def
  /inches-per-point 1 points-per-inch div def
  
--- 64,68 ----
  
  % Use the real definition of points, not PostScript's.
! /points-per-inch 72 def
  /inches-per-point 1 points-per-inch div def
  
***************
*** 90,116 ****
  /points {points-per-pixel mul} bdef	% Use on stuff expressed in pixels.
  /pixels {pixels-per-point mul} bdef	% Use on stuff expressed in points.
- 
- 
  
! % Set the font to `gs-fontname', with encoding `output-encoding'.
! % We cannot rely on the encoding vector only for whether the font defines a
! % certain character; we must also look in the CharStrings.  (The
! % Ghostscript fonts are all StandardEncoding, yet not all characters are
! % defined.)  Unfortunately, this makes this program only work with Type
! % 1 fonts (or Type 3 fonts which store the character definitions in a
! % dictionary named `CharStrings').
  % 
  /set-font
  {
!   gs-fontname cvlit /newfont output-encoding reencode-font
!   /newfont point-size cvi selectfont
    /font-encoding currentfont /Encoding get def
-   /font-charstrings currentfont /CharStrings get def
  }
  bdef
  
! % /OLD-FONTNAME /NEW-FONTNAME NEW-ENCODING defines the font NEW-FONTNAME
! % to be just like OLD-FONTNAME except that the encoding is NEW-ENCODING.
! % Based on the Cookbook encoding vector examples.
  % 
  /reencode-font
--- 72,103 ----
  /points {points-per-pixel mul} bdef	% Use on stuff expressed in pixels.
  /pixels {pixels-per-point mul} bdef	% Use on stuff expressed in points.
  
! % Make a new font whose PostScript name is `/newfont', which is the same
! % as the font with name `gs-fontname' (read from file `input-filename'
! % if necessary) except it has encoding `output-encoding'.
  % 
+ % Set the currentfont to /newfont scaled to `point-size'.
+ % 
  /set-font
  {
!   % Make the new font /newfont.
!   input-filename gs-fontname cvlit /newfont output-encoding reencode-font
! 
!   % Make it the current font (at the requested size).
!   /newfont findfont point-size cvi scalefont setfont
! 
!   % Define the global `font-encoding' for future use.
    /font-encoding currentfont /Encoding get def
  }
  bdef
  
! 
! % (OLD-FILENAME) /OLD-FONTNAME /NEW-FONTNAME NEW-ENCODING reencode-font
! % defines the font NEW-FONTNAME to be like OLD-FONTNAME except that the
! % encoding is NEW-ENCODING.  Based on the Cookbook encoding examples.
! % 
! % We read OLD-FILENAME if /OLD-FONTNAME is unknown to Ghostscript.  We
! % determine this by looking at the dictionary `Fontmap' that Ghostscript
! % defines when it starts up.
  % 
  /reencode-font
***************
*** 118,149 ****
    /new-encoding exch def
    /new-fontname exch def
!   
!   /old-fontdict exch findfont def
    /new-fontdict old-fontdict maxlength dict def
!   
!   % Copy all the elements except FID and Encoding.
    old-fontdict
      {
        exch % now have key at top the stack
!       dup /FID ne  dup /Encoding ne  dup /FontName ne  and and
!         { exch new-fontdict 3 1 roll put }
          { pop pop}
        ifelse
      }
    forall
!   
!   % Install the new Encoding and FontName.
!   new-fontdict /Encoding new-encoding put
!   new-fontdict /FontName new-fontname put
    
    % Define the font.
    new-fontname new-fontdict definefont pop
  }
  bdef
  
  
  
  
! % FILENAME parse-encoding-file tries to read the encoding file
  % `FILENAME.enc'.  If the file can't be found, we quit.  Otherwise, we
  % parse it into an encoding vector and return that on the stack.
--- 105,333 ----
    /new-encoding exch def
    /new-fontname exch def
!   /old-fontname exch def
!   /old-filename exch def
! 
!   % If OLD-FONTNAME is not in `Fontmap', read OLD-FILENAME.
!   Fontmap old-fontname cvn known  not
!     { (Reading `) old-filename concatstrings ('...) concatstrings vreport
!       old-filename run
! 
!       % If reading OLD-FILENAME didn't define OLD-FONTNAME, complain.
!       FontDirectory old-fontname cvn known  not
!         { (Reading `) =only
!           old-filename =only
!           (' didn't define the font `) =only
!           old-fontname =only
!           ('!) =
!           quit
!         }
!       if
!     }
!   if
! 
!   % Get the old font, and make the dictionary that will be the new font.
!   /old-fontdict old-fontname findfont def
    /new-fontdict old-fontdict maxlength dict def
! 
!   % Copy all the elements except `FID', `Encoding', and `FontName'.
    old-fontdict
      {
        exch % now have key at top the stack
!       dup /FID eq  1 index /Encoding eq  2 index /FontName eq  or or
          { pop pop}
+         { exch new-fontdict 3 1 roll put }
        ifelse
      }
    forall
! 
!   % But if NEW-ENCODING is this sentinel value, we copy the existing
!   % encoding vector.
!   % 
!   new-encoding (/encoding-from-input) eq
!     {
!       /new-encoding old-fontdict /Encoding get 256 array copy def
!     }
!   if
    
+   % Get another encoding array, this one a subset of NEW-ENCODING, which
+   % contains only those characters that are actually present in the font
+   % -- sometimes the encoding vectors lie.
+   % 
+   new-fontdict new-encoding encoding-chars-present
+   /ok-encoding exch def
+ 
+   % Install the new Encoding and FontName.  The 10-character limit on
+   % the FontName is not serious, since we are the ones who specify it
+   % (in fact, new-fontname is the name `/newfont').
+   new-fontdict /Encoding ok-encoding put
+   new-fontdict /FontName new-fontname 10 string cvs put
+ 
    % Define the font.
    new-fontname new-fontdict definefont pop
  }
+ bdef % reencode-font
+ 
+ 
+ % FONT-DICT ENCODING encoding-chars-present => NEW-ENCODING returns an
+ % encoding vector contain all and only those characters which are
+ % present in both the font represented by FONT-DICT (which lacks an
+ % Encoding entry) and ENCODING.
+ % 
+ % We have to use different algorithms for Type 1 and Type 3 fonts.
+ % 
+ /encoding-chars-present
+ {
+   /font-type 2 index /FontType get def
+   
+   font-type 1 eq
+     { encoding-chars-present-1 }
+     { encoding-chars-present-3 }
+   ifelse
+ }
+ bdef % encoding-chars-present
+ 
+ 
+ % (See encoding-chars-present).  For Type 1 fonts, we can just look in
+ % the CharStrings entry (which is required) of FONT-DICT.
+ % 
+ /encoding-chars-present-1
+ {
+   /orig-encoding exch def
+   /font-dict exch def
+   
+   /font-charstrings font-dict /CharStrings get def
+   
+   /new-encoding 256 array def
+   /charcode 0 def
+   
+   % For each element in the old vector, see if it's in `CharStrings'.
+     orig-encoding
+     {   font-charstrings 1 index known
+         { new-encoding charcode 3 -1 roll put }
+         { new-encoding charcode /.notdef put  pop }
+       ifelse
+       /charcode incr
+     }
+   forall
+   
+   % Return the new vector.
+   new-encoding
+ }
+ bdef
+ 
+ 
+ % (See encoding-chars-present).  For Type 3 fonts, the character
+ % definitions might be in a dictionary named anything at all.  Heck,
+ % there might not even be a dictionary.  So the best I can think of is
+ % to try to render each character; if it succeeds, we'll say it's
+ % present, and if it fails, we'll omit it.
+ % 
+ % We change the current font to be the one specified by FONT-DICT.
+ % (Since we're going to change fonts again right after we return,
+ % there's no point in saving and restoring.)
+ % 
+ /encoding-chars-present-3
+ {
+   /orig-encoding exch def
+   /font-dict exch def
+   
+   /new-encoding 256 array def
+   
+   % Set up the current font.
+   font-dict orig-encoding type3-setfont
+   
+   % Have to have a current point for `show' to work.
+   % 
+   0 0 moveto
+   
+   % For each element in the old vector, see if we can render it.
+   0 1 255
+     { dup type3-render-p
+         % Push the name we will put in the new vector.
+         { orig-encoding 1 index  get }
+         { /.notdef }
+       ifelse
+ 
+       % Now have charcode and charname on the stack.
+       new-encoding 3 1 roll put
+     }
+   for
+   
+   % Return the new vector.
+   new-encoding
+ }
  bdef
  
  
+ % FONT-DICT ENCODING type3-setfont sets the current font to be the one
+ % represented by FONT-DICT.  We have to set up the encoding vector and
+ % do the definefont ourselves.
+ % 
+ /type3-setfont
+ {
+   /test-encoding exch def
+   /font-dict exch def
+   
+   % Use our new encoding in the test font.
+   font-dict /Encoding test-encoding put
+   
+   % Have to copy the dictionary explicitly, else it will become readonly
+   % and we won't be able to change the encoding for real later.
+   % 
+   font-dict dup maxlength dict copy
+   /type3-testfont exch definefont setfont
+ }
+ bdef
+ 
+ 
+ % CHARCODE type3-render-p => bool returns true if rendering CHARCODE
+ % does not produce an error.  We assume the current font is set to the
+ % right thing.
+ % 
+ /type3-render-p
+ {
+   /char exch def
+   put-char-in-buffer
  
+   % If the BuildChar fails, make sure no junk is left on the operand or
+   % dictionary stacks.
+   countdictstack
+   mark
+   
+   % Render the character
+   { char-buffer show } stopped not
+   
+   % Since we need to clear the operand stack, we have to save the
+   % result.  But since we're going to clear the dictionary stack also,
+   % we have to explicitly use our dictionary.
+   envGSRF /ok 3 -1 roll put
+   
+   cleartomark
+     {
+       dup countdictstack eq { exit } if
+       end
+     }
+   loop
+   pop % The original `countdictstack' value.
+   
+   % Return whether or not we succeeded.
+   ok
+ }
+ bdef
  
! % ENCODING-NAME find-encoding ENCODING reads the encoding file
! % `ENCODING-NAME.enc' unless ENCODING-NAME is a sentinel value, in which
! % case we just return it.
! % 
! /find-encoding
! {
!   dup (/encoding-from-input) eq not
!     { parse-encoding-file }
!   if
! }
! bdef
! 
! 
! % (FILENAME) parse-encoding-file tries to read the encoding file
  % `FILENAME.enc'.  If the file can't be found, we quit.  Otherwise, we
  % parse it into an encoding vector and return that on the stack.
***************
*** 159,163 ****
    
    % Ignore the coding scheme (assumption here that the .enc file does
!   % not have zero or one non-blank non-comment lines):
    encoding-line pop
  
--- 343,348 ----
    
    % Ignore the coding scheme (assumption here that the .enc file does
!   % not have zero or one non-blank non-comment lines, i.e., is empty or
!   % just a comment):
    encoding-line pop
  
***************
*** 176,181 ****
        put
        
!       % Increment /charcode.
!       /charcode charcode 1 add def
      }
    loop
--- 361,366 ----
        put
        
!       % We're on the next character code.
!       /charcode incr
      }
    loop
***************
*** 201,205 ****
  /open-encoding-file
  {
!   (.enc) concat-strings
    findlibfile
      { exch pop /encodingfile exch def }
--- 386,390 ----
  /open-encoding-file
  {
!   (.enc) concatstrings
    findlibfile
      { exch pop /encodingfile exch def }
***************
*** 214,217 ****
--- 399,404 ----
  % returns the first token on the line (i.e., a name).
  % 
+ % Sorry about this hard limit, but I don't want to program variable
+ % strings in PostScript.
  /line-buffer 1000 string def
  
***************
*** 232,239 ****
    loop
  }
! bdef
! 
! 
! 
  
  % Expects a character code on the stack.  Sets /char to that integer,
--- 419,423 ----
    loop
  }
! bdef % encoding-line
  
  % Expects a character code on the stack.  Sets /char to that integer,
***************
*** 245,279 ****
     /char exch def
     /char-name font-encoding char get def
-    % All-blank characters like space wreak havoc with the bbcount and
-    % imagetofont algorithms, so don't output those.
-    /char-in-font
-      char-name /.notdef ne
-      char-name /space ne
-      and
-      font-charstrings char-name known
-      and
-    def
- }
- bdef
  
! 
! % Since we ignored space characters in `set-char-variables' (just
! % above), here is a routine to write the space's charcode to a file.
! % We are passed the file on the stack.
! % 
! /number-buffer 20 string def
! %
! /output-space-char
! {
!   0 1 255 { dup font-encoding exch get /space eq { exit } { pop } ifelse } for
!   dup type (integertype) eq % It's an integer if we found it, a space if not.
!     { number-buffer cvs
!       1 index exch % get the file
!       writestring
!       (\n) writestring
!     }
!   if
  }
! bdef % output-space-char
  
  
--- 429,437 ----
     /char exch def
     /char-name font-encoding char get def
  
!    % There's no point in outputting .notdef.
!    /char-in-font  char-name /.notdef ne  def
  }
! bdef
  
  
***************
*** 296,299 ****
--- 454,458 ----
      newpath
      0 0 moveto
+ 
      char-buffer true charpath      
      flattenpath
***************
*** 320,345 ****
    grestore
  }
! bdef
! 
! % Expects a label string.
! % 
! /print-char-dimensions
! {
!   /label exch def
!   verbose 
!     {() = label =
!      char-buffer (char: ) =only = 
!      char-height (char-height: ) =only =
!      char-depth (char-depth: ) =only =
!      char-tall (char-tall: ) =only =
!      char-stringwidth (char-stringwidth: ) =only =
!      char-width (char-width: ) =only =
!      char-left-sidebearing (char-left-sidebearing: ) =only =
!      char-right-sidebearing (char-right-sidebearing: ) =only =
!      flush
!     }
!   if
! }
! bdef % print-char-dimensions
  
  % If the char is defined in the font, show it on on a line by itself, ni
--- 479,483 ----
    grestore
  }
! bdef % find-char-dimensions-in-pixels
  
  % If the char is defined in the font, show it on on a line by itself, ni
***************
*** 355,359 ****
        put-char-in-buffer
        find-char-dimensions-in-pixels
!       %%char-name print-char-dimensions
  
        % If the lsb is negative, the character protrudes to the left of
--- 493,497 ----
        put-char-in-buffer
        find-char-dimensions-in-pixels
!       %%char-name print-char-dimensions %%
  
        % If the lsb is negative, the character protrudes to the left of
***************
*** 362,366 ****
            char-left-sidebearing 0 lt { char-left-sidebearing neg } { 0 } ifelse
          points
!         char-height points neg
        rmoveto
  
--- 500,504 ----
            char-left-sidebearing 0 lt { char-left-sidebearing neg } { 0 } ifelse
          points
!         char-height ceiling points neg
        rmoveto
  
***************
*** 373,377 ****
        % Leave enough blank rows to fill up the max-char-tall-in-pixels
        % space.  This will always be more than the descender.
!       0  max-char-tall-in-pixels char-height sub points neg  rmoveto
      }
    if
--- 511,515 ----
        % Leave enough blank rows to fill up the max-char-tall-in-pixels
        % space.  This will always be more than the descender.
!       0  max-char-tall-in-pixels char-height ceiling sub points neg  rmoveto
      }
    if
***************
*** 378,381 ****
--- 516,541 ----
  }
  bdef % show-char
+ 
+ 
+ % Expects a label string.
+ % 
+ /print-char-dimensions
+ {
+   /label exch def
+   verbose 
+     {() = label =
+      char-buffer (char: ) =only = 
+      char-height (char-height: ) =only =
+      char-depth (char-depth: ) =only =
+      char-tall (char-tall: ) =only =
+      char-stringwidth (char-stringwidth: ) =only =
+      char-width (char-width: ) =only =
+      char-left-sidebearing (char-left-sidebearing: ) =only =
+      char-right-sidebearing (char-right-sidebearing: ) =only =
+      flush
+     }
+   if
+ }
+ bdef % print-char-dimensions
  
  % IFI stuff.
***************
*** 396,400 ****
  /baseline-adjustment
  {
!   char-depth round cvi 1 sub output-buffer cvs
  }
  bdef
--- 556,560 ----
  /baseline-adjustment
  {
!   char-depth round cvi 1 sub neg output-buffer cvs
  }
  bdef
***************
*** 414,420 ****
  {
    char-left-sidebearing round output-buffer cvs
!   ( ) concat-strings
    char-right-sidebearing round output-buffer cvs 
!   concat-strings
  }
  bdef
--- 574,580 ----
  {
    char-left-sidebearing round output-buffer cvs
!   ( ) concatstrings
    char-right-sidebearing round output-buffer cvs 
!   concatstrings
  }
  bdef
***************
*** 501,514 ****
          {
            /extant-char-count incr
!           
            put-char-in-buffer
            find-char-dimensions-in-pixels
!           
            % The set width might be smaller than the bounding box if we
            % have negative side bearings.
            char-stringwidth char-width max
!           /max-char-width-in-pixels exch  max=
            
!           /max-char-tall-in-pixels char-tall max=
          }
        if
--- 661,677 ----
          {
            /extant-char-count incr
! 
            put-char-in-buffer
            find-char-dimensions-in-pixels
! 
            % The set width might be smaller than the bounding box if we
            % have negative side bearings.
            char-stringwidth char-width max
!           /max-char-width-in-pixels exch max=
            
!           % Accents (for example) might have a positive depth, and thus
!           % the height will be less than the height + depth, and what we
!           % want is the largest y coordinate.
!           /max-char-tall-in-pixels char-tall char-height max max=
          }
        if
***************
*** 516,522 ****
    for
  
!   % We also want to have at least a couple blank rows between each character.
!   % The constant here is also used in bbcount's pbm-reading routines.
!   /max-char-tall-in-pixels max-char-tall-in-pixels 4 add ceiling def
    
    verbose
--- 679,687 ----
    for
  
!   % We also want to have some blank rows between characters.  The
!   % constant here is also used in bbcount's pbm-reading routines.
!   /max-char-tall-in-pixels
!     max-char-tall-in-pixels ceiling  4 add  cvi
!   def
    
    verbose
***************
*** 564,569 ****
  }
  bdef % compute-final-device-dimens
- 
- 
  
  % make-gsfont, the main program.
--- 729,732 ----
***************
*** 570,578 ****
  
  % Arguments:
! %   gs-fontname (e.g., Times-Roman---no slash in front)
! %   font-basename (e.g., phvr -- to get hvr.pbm and hvr.ifi)
! %   point-size
! %   pixels-per-inch (e.g., 300 -- can't have nonsquare pixels)
! %   output-encoding-filename (e.g., textext -- to find the .enc file)
  % 
  /make-gsfont
--- 733,744 ----
  
  % Arguments:
! %   gs-fontname		(e.g., Times-Roman -- no slash in front)
! %   input-filename	(e.g., ptmr -- unused if the font is in Fontmap)
! %   output-filename	(e.g., ptmr -- to get ptmr.pbm and ptmr.ifi)
! %   point-size		(e.g., 10 -- in PostScript points)
! %   pixels-per-inch	(e.g., 300 -- can't have nonsquare pixels)
! %   encoding-filename	(e.g., textext -- to find .enc file)
! % 
! % (Except `encoding-filename' might be a sentinel value, not a filename.)
  % 
  /make-gsfont
***************
*** 579,597 ****
  {
    /gs-fontname exch def
!   /font-basename exch def
    /point-size exch cvi def
    /pixels-per-inch exch cvi def
!   /output-encoding-filename exch def
  
!   % Look for the file `output-encoding-name.enc' and parse it,
    % returning an encoding dictionary.
    % 
!     (Parsing encoding file ) output-encoding-filename concat-strings
!     (.enc...) concat-strings
    vreport
!   /output-encoding output-encoding-filename parse-encoding-file def
  
!   % Now that we know the encoding, we can make the font we're going to
!   % render the current font.
    % 
    (Reencoding and setting font...) vreport
--- 745,764 ----
  {
    /gs-fontname exch def
!   /input-filename exch def
!   /output-filename exch def
    /point-size exch cvi def
    /pixels-per-inch exch cvi def
!   /encoding-filename exch def
  
!   % Look for the file `encoding-filename.enc' and parse it,
    % returning an encoding dictionary.
    % 
!     (Using encoding `) encoding-filename concatstrings
!     (' for output...) concatstrings
    vreport
!   /output-encoding encoding-filename find-encoding def
  
!   % Now that we know the output encoding, we can make the font we're
!   % going to render the current font.
    % 
    (Reencoding and setting font...) vreport
***************
*** 622,626 ****
  
    (Writing PBM file...) vreport
!   /pbm-filename font-basename (.pbm) concat-strings def
    /pbm-file pbm-filename (w) file def
    pbm-file currentdevice writeppmfile
--- 789,793 ----
  
    (Writing PBM file...) vreport
!   /pbm-filename output-filename (.pbm) concatstrings def
    /pbm-file pbm-filename (w) file def
    pbm-file currentdevice writeppmfile
***************
*** 628,632 ****
  
    (Writing BFI file...) vreport
!   /bfi-filename font-basename (.bfi) concat-strings def
    /bfi-file bfi-filename (w) file def
    bfi-file extant-char-count output-buffer cvs writestring
--- 795,799 ----
  
    (Writing BFI file...) vreport
!   /bfi-filename output-filename (.bfi) concatstrings def
    /bfi-file bfi-filename (w) file def
    bfi-file extant-char-count output-buffer cvs writestring
***************
*** 634,642 ****
    bfi-file max-char-tall-in-pixels output-buffer cvs writestring
    bfi-file (\n) writestring
-   bfi-file output-space-char
    bfi-file closefile
    
    (Writing XIFI file...) vreport
!   /ifi-filename font-basename (.xifi) concat-strings def
    /ifi-file ifi-filename (w) file def
    0 1 255 { output-char-info } for
--- 801,808 ----
    bfi-file max-char-tall-in-pixels output-buffer cvs writestring
    bfi-file (\n) writestring
    bfi-file closefile
    
    (Writing XIFI file...) vreport
!   /ifi-filename output-filename (.xifi) concatstrings def
    /ifi-file ifi-filename (w) file def
    0 1 255 { output-char-info } for
diff -Nrc2 fontutils-0.5/imageto/.gdbinit fontutils-0.6/imageto/.gdbinit
*** fontutils-0.5/imageto/.gdbinit	Sun Aug 16 17:55:30 1992
--- fontutils-0.6/imageto/.gdbinit	Fri Oct 23 10:24:08 1992
***************
*** 109,110 ****
--- 109,116 ----
  #  ../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 -verbose ../gsrenderfont/cmr.pbm -dpi=300 -enc=dvips
diff -Nrc2 fontutils-0.5/imageto/ChangeLog fontutils-0.6/imageto/ChangeLog
*** fontutils-0.5/imageto/ChangeLog	Thu Sep  3 09:30:54 1992
--- fontutils-0.6/imageto/ChangeLog	Tue Oct 27 13:02:50 1992
***************
*** 1,2 ****
--- 1,118 ----
+ Tue Oct 27 13:02:04 1992  Karl Berry  (karl@cs.umb.edu)
+ 
+ 	* Version 0.6.
+ 
+ Sat Oct 24 05:13:02 1992  Karl Berry  (karl@cs.umb.edu)
+ 
+ 	* ifi.c (read_ifi_file): Just do successive character codes if we
+ 	don't have an encoding file.
+         * main.c (USAGE): Change doc.
+ 
+ Fri Oct 23 10:43:46 1992  Karl Berry  (karl@cs.umb.edu)
+ 
+ 	* out-chars.c (output_chars): Free the bounding box list we construct.
+ 
+ 	* out-chars.c (output_chars): If the IFI struct says no bounding
+ 	boxes, don't read any of the bitmap, and reconsider the current bb.
+ 
+ Tue Oct 20 17:17:26 1992  Karl Berry  (karl@cs.umb.edu)
+ 
+ 	* GNUmakefile (install): Make the second arg a file, not a directory.
+ 
+ Fri Oct 16 15:40:53 1992  Karl Berry  (karl@cs.umb.edu)
+ 
+ 	* out-epsf.c: Doc fix.
+ 
+ Mon Oct  5 09:31:30 1992  Karl Berry  (karl@cs.umb.edu)
+ 
+ 	* main.c (read_command_line): Make -print-clean-info imply -verbose.
+         (main): Remove now-redundant test for `print_clean_info'.
+ 
+ 	* out-chars.c (write_image_chars): Only report "+" if we have to
+ 	keep reading vertically, not horizontally.
+         (do_image_line): Remove the report from here.
+ 
+ Sun Oct  4 08:59:55 1992  Karl Berry  (karl@cs.umb.edu)
+ 
+ 	* out-chars.c (write_image_chars): Don't keep adding to
+ 	`row_height' for appended image rows, just assign.
+ 
+ 	* main.c (main): Test for zero resolution here.
+         (set_input_format): Not here.
+ 
+ 	* out-chars.c (clean_threshold): Remove.
+         * out-chars.h: Likewise.
+         * main.c (USAGE, read_command_line): And here.
+ 
+ 	* out-chars.c (bb_equal_p): New fn.
+ 
+ 	* out-chars.c (offset_bb_list): Function moved here from bb-outline.c.
+ 
+ 	* out-chars.c (clean_bitmap): Rewrite to take a list of known
+ 	boxes, and remove those that aren't in the list.
+         (output_chars): Only call `clean_bitmap' once, after we've
+         combined everything.
+         (image_to_bitmap_bbs): New fn.
+ 
+ Sat Oct  3 13:54:39 1992  Karl Berry  (karl@cs.umb.edu)
+ 
+ 	* out-chars.c (write_image_chars): Don't abort if the image ends
+ 	prematurely, just give a warning and return.
+ 
+ 	* out-chars.c (OUTPUT_CHAR_P): New macro.
+         (output_chars): Use it, instead of repeating the same expr several
+         times.
+ 
+ Fri Oct  2 16:14:03 1992  Karl Berry  (karl@cs.umb.edu)
+ 
+ 	* out-chars.[ch]: New files constructed from main.[ch].
+         * main.c: Include out-chars.h.
+ 
+ 	* extract.c (REPORT_SCANLINE): use REPORT.
+ 
+ 	* main.c (-info-filename): remove this option.
+ 
+ 	* {epsf,strips}.[ch]: Rename to out-*.
+ 	* GNUmakefile (c_and_h): Likewise.
+ 
+ 	* ifi.[ch]: New files constructed from image-char.[ch] and main.c.
+         * main.c: include ifi.h.
+         (extract_chars): Change call to read_ifi_file.
+         * GNUmakefile (c_and_h): add `ifi', remove `image-char'.
+ 
+ Mon Sep 28 11:11:59 1992  Karl Berry  (karl@cs.umb.edu)
+ 
+ 	* main.c: change `fprintf (stderr's to use REPORT*.
+ 
+ 	* main.c (clean_bitmap): print the size of the bounding box being
+ 	cleaned, not that of the enclosing character.  (halvers@sol.crd.ge.com)
+ 
+ Tue Sep 22 13:01:54 1992  Karl Berry  (karl@cs.umb.edu)
+ 
+         * main.c (read_ifi_file): call make_suffix to make the default IFI
+           filename, instead of appending to the root.
+         (input_rootname): remove.
+         (main): don't assign to input_rootname; just set output_name to
+           the fn call.
+         (input_name): new static.
+ 
+         * main.c (clean_bitmap): if clean_threshold is 1.0, do nothing;
+           else only clean if the gray value is > threshold, not >=.
+ 
+         * main.c: make diagnostic messages consistent.
+ 
+         * main.c (do_image_line): set `bb_offset' to just the width
+           of the previous bb, since we're already incorporating the
+           interbb whitespace in the second bb.
+ 
+ Mon Sep 21 10:32:07 1992  Karl Berry  (karl@cs.umb.edu)
+ 
+         * main.c (read_command_line): new option -ifi-file, a synonym for
+           -info-file.
+         (USAGE): document it.
+ 
+         * main.c (set_input_format): don't call strcmp on NULL if the
+           input filename lacks an extension.
+ 
  Thu Sep  3 09:30:54 1992  Karl Berry  (karl@hayley)
  
diff -Nrc2 fontutils-0.5/imageto/GNUmakefile fontutils-0.6/imageto/GNUmakefile
*** fontutils-0.5/imageto/GNUmakefile	Sat Aug 29 16:14:02 1992
--- fontutils-0.6/imageto/GNUmakefile	Tue Oct 20 17:17:53 1992
***************
*** 19,23 ****
  program = imageto
  
! c_and_h = bitmap2 epsf extract image-char input-img input-pbm main strips
  h_only = image-header
  c_only = version
--- 19,24 ----
  program = imageto
  
! c_and_h = bitmap2 extract ifi input-img input-pbm main \
!           out-chars out-epsf out-strips
  h_only = image-header
  c_only = version
***************
*** 32,36 ****
  
  install::
! 	$(INSTALL_DATA) strips.tex $(texinputdir)
  
  include M.depend
--- 33,37 ----
  
  install::
! 	$(INSTALL_DATA) strips.tex $(texinputdir)/strips.tex
  
  include M.depend
diff -Nrc2 fontutils-0.5/imageto/M.depend fontutils-0.6/imageto/M.depend
*** fontutils-0.5/imageto/M.depend	Wed Sep  2 17:20:53 1992
--- fontutils-0.6/imageto/M.depend	Sun Oct 25 14:16:07 1992
***************
*** 3,20 ****
    .././include/c-seek.h .././include/c-proto.h .././include/global.h .././include/lib.h \
    .././include/types.h .././include/bitmap.h .././include/bounding-box.h bitmap2.h 
- epsf.o : epsf.c .././include/config.h .././include/c-auto.h .././include/c-std.h \
-   .././include/c-memstr.h .././include/c-errno.h .././include/c-minmax.h .././include/c-limits.h \
-   .././include/c-seek.h .././include/c-proto.h .././include/global.h .././include/lib.h \
-   .././include/types.h .././include/hexify.h .././include/report.h epsf.h image-header.h \
-   main.h 
  extract.o : extract.c .././include/config.h .././include/c-auto.h .././include/c-std.h \
    .././include/c-memstr.h .././include/c-errno.h .././include/c-minmax.h .././include/c-limits.h \
    .././include/c-seek.h .././include/c-proto.h .././include/global.h .././include/lib.h \
!   .././include/types.h .././include/bitmap.h .././include/bounding-box.h bitmap2.h \
!   extract.h main.h image-header.h input-img.h input-pbm.h 
! image-char.o : image-char.c .././include/config.h .././include/c-auto.h .././include/c-std.h \
    .././include/c-memstr.h .././include/c-errno.h .././include/c-minmax.h .././include/c-limits.h \
    .././include/c-seek.h .././include/c-proto.h .././include/global.h .././include/lib.h \
!   .././include/types.h image-char.h 
  input-img.o : input-img.c .././include/config.h .././include/c-auto.h .././include/c-std.h \
    .././include/c-memstr.h .././include/c-errno.h .././include/c-minmax.h .././include/c-limits.h \
--- 3,17 ----
    .././include/c-seek.h .././include/c-proto.h .././include/global.h .././include/lib.h \
    .././include/types.h .././include/bitmap.h .././include/bounding-box.h bitmap2.h 
  extract.o : extract.c .././include/config.h .././include/c-auto.h .././include/c-std.h \
    .././include/c-memstr.h .././include/c-errno.h .././include/c-minmax.h .././include/c-limits.h \
    .././include/c-seek.h .././include/c-proto.h .././include/global.h .././include/lib.h \
!   .././include/types.h .././include/bitmap.h .././include/bounding-box.h .././include/report.h \
!   bitmap2.h extract.h main.h image-header.h input-img.h input-pbm.h 
! ifi.o : ifi.c .././include/config.h .././include/c-auto.h .././include/c-std.h \
    .././include/c-memstr.h .././include/c-errno.h .././include/c-minmax.h .././include/c-limits.h \
    .././include/c-seek.h .././include/c-proto.h .././include/global.h .././include/lib.h \
!   .././include/types.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/libfile.h ifi.h main.h image-header.h 
  input-img.o : input-img.c .././include/config.h .././include/c-auto.h .././include/c-std.h \
    .././include/c-memstr.h .././include/c-errno.h .././include/c-minmax.h .././include/c-limits.h \
***************
*** 30,39 ****
    .././include/c-seek.h .././include/c-proto.h .././include/global.h .././include/lib.h \
    .././include/types.h .././include/cmdline.h .././include/filename.h .././include/getopt.h \
!   .././include/gf.h .././include/bitmap.h .././include/bounding-box.h .././include/font.h \
!   .././include/tfm.h .././include/fix-num.h .././include/list.h .././include/libfile.h \
!   .././include/report.h .././include/bb-outline.h bitmap2.h .././include/encoding.h \
!   epsf.h image-header.h extract.h image-char.h input-img.h input-pbm.h main.h \
!   strips.h 
! strips.o : strips.c .././include/config.h .././include/c-auto.h .././include/c-std.h \
    .././include/c-memstr.h .././include/c-errno.h .././include/c-minmax.h .././include/c-limits.h \
    .././include/c-seek.h .././include/c-proto.h .././include/global.h .././include/lib.h \
--- 27,47 ----
    .././include/c-seek.h .././include/c-proto.h .././include/global.h .././include/lib.h \
    .././include/types.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/gf.h \
!   .././include/report.h ifi.h image-header.h input-img.h input-pbm.h main.h out-chars.h \
!   out-epsf.h out-strips.h 
! out-chars.o : out-chars.c .././include/config.h .././include/c-auto.h .././include/c-std.h \
!   .././include/c-memstr.h .././include/c-errno.h .././include/c-minmax.h .././include/c-limits.h \
!   .././include/c-seek.h .././include/c-proto.h .././include/global.h .././include/lib.h \
!   .././include/types.h .././include/bb-outline.h .././include/bb-list.h .././include/bounding-box.h \
!   .././include/bitmap.h .././include/gf.h .././include/font.h .././include/tfm.h \
!   .././include/fix-num.h .././include/list.h .././include/report.h bitmap2.h extract.h \
!   ifi.h image-header.h main.h out-strips.h 
! out-epsf.o : out-epsf.c .././include/config.h .././include/c-auto.h .././include/c-std.h \
!   .././include/c-memstr.h .././include/c-errno.h .././include/c-minmax.h .././include/c-limits.h \
!   .././include/c-seek.h .././include/c-proto.h .././include/global.h .././include/lib.h \
!   .././include/types.h .././include/hexify.h .././include/report.h main.h image-header.h \
!   out-epsf.h 
! out-strips.o : out-strips.c .././include/config.h .././include/c-auto.h .././include/c-std.h \
    .././include/c-memstr.h .././include/c-errno.h .././include/c-minmax.h .././include/c-limits.h \
    .././include/c-seek.h .././include/c-proto.h .././include/global.h .././include/lib.h \
***************
*** 40,43 ****
    .././include/types.h .././include/gf.h .././include/bitmap.h .././include/bounding-box.h \
    .././include/font.h .././include/tfm.h .././include/fix-num.h .././include/list.h \
!   .././include/report.h input-img.h image-header.h input-pbm.h main.h strips.h 
  version.o : version.c 
--- 48,51 ----
    .././include/types.h .././include/gf.h .././include/bitmap.h .././include/bounding-box.h \
    .././include/font.h .././include/tfm.h .././include/fix-num.h .././include/list.h \
!   .././include/report.h main.h image-header.h out-strips.h 
  version.o : version.c 
diff -Nrc2 fontutils-0.5/imageto/bitmap2.c fontutils-0.6/imageto/bitmap2.c
*** fontutils-0.5/imageto/bitmap2.c	Mon Jun 15 07:57:07 1992
--- fontutils-0.6/imageto/bitmap2.c	Tue Sep 22 12:48:44 1992
***************
*** 41,45 ****
    DIMENSIONS_HEIGHT (new_dimens) = BITMAP_HEIGHT (b2);
    new = new_bitmap (new_dimens);
!   
    for (row = 0; row < BITMAP_HEIGHT (b2); row++)
      {
--- 41,46 ----
    DIMENSIONS_HEIGHT (new_dimens) = BITMAP_HEIGHT (b2);
    new = new_bitmap (new_dimens);
! 
!   /* Choice of `b2' or `b1' here is arbitrary, of course.  */
    for (row = 0; row < BITMAP_HEIGHT (b2); row++)
      {
diff -Nrc2 fontutils-0.5/imageto/extract.c fontutils-0.6/imageto/extract.c
*** fontutils-0.5/imageto/extract.c	Sat Jun 20 15:19:19 1992
--- fontutils-0.6/imageto/extract.c	Fri Oct  2 17:03:40 1992
***************
*** 23,26 ****
--- 23,27 ----
  #include "bitmap.h"
  #include "bounding-box.h"
+ #include "report.h"
  
  #include "bitmap2.h"
***************
*** 132,141 ****
     some kind of status report.  */
  
! #define REPORT_SCANLINE()						\
!   if (verbose && ++scanline_count % 100 == 0)				\
!     {									\
!       putc ('.', stderr);						\
!       fflush (stderr);							\
!     }
  
  /* Read scanlines of width WIDTH from the image file until we get one
--- 133,137 ----
     some kind of status report.  */
  
! #define REPORT_SCANLINE() if (++scanline_count % 100 == 0) REPORT (".")
  
  /* Read scanlines of width WIDTH from the image file until we get one
***************
*** 199,203 ****
          { /* Perhaps doubling is the wrong thing to do here, as it may
               waste quite a bit of memory.  But it's simple.  */
!           rows_allocated <<= 1;
            image = xrealloc (image, rows_allocated * width);
  	}
--- 195,199 ----
          { /* Perhaps doubling is the wrong thing to do here, as it may
               waste quite a bit of memory.  But it's simple.  */
!           rows_allocated += 100 /* ;<<= 1*/;
            image = xrealloc (image, rows_allocated * width);
  	}
diff -Nrc2 fontutils-0.5/imageto/ifi.c fontutils-0.6/imageto/ifi.c
*** fontutils-0.5/imageto/ifi.c
--- fontutils-0.6/imageto/ifi.c	Sat Oct 24 05:14:04 1992
***************
*** 0 ****
--- 1,197 ----
+ /* ifi.c: read an IFI file.  */
+ 
+ #include "config.h"
+ 
+ #include "encoding.h"
+ #include "libfile.h"
+ 
+ #include "ifi.h"
+ #include "main.h"
+ 
+ 
+ /* The name of the encoding file specified by the user, and the
+    structure we parse it into.  (-encoding)  */
+ string encoding_name = NULL;
+ 
+ /* The name of the IFI file.  (-ifi-file)  */
+ string ifi_filename = NULL;
+ 
+ 
+ static void append_image_char (image_char_list_type *l, image_char_type c);
+ static image_char_list_type new_image_char_list (void);
+ 
+ /* Read the IFI file `ifi_filename' (or construct the IFI filename from
+    `input_name'), which gives us information about the image we are
+    going to read.
+    
+    See the documentation for full details and examples of IFI files.
+    Here we just sketch the bare bones.
+    
+    Each (non-blank, non-comment) line in this file represents a
+    ``character'' in the image, and has one to five entries, separated by
+    spaces and/or tabs.  Comments start with `%' and continue to the end
+    of the line.
+    
+    The first entry represents the character code.  See the documentation
+    for the various forms of charcodes.  We also allow `.notdef', meaning
+    the ``character'' should not be output in the font.  
+    
+    The second entry, if it exists, is an adjustment to the
+    baseline.  We move the baseline down for negative numbers, and up
+    for positive ones.  Default is zero.
+    
+    The third entry, if it exists, is the number of bounding boxes that
+    comprise this character.  If it is negative, the bounding boxes
+    are not consecutive in the image; instead, they alternate with
+    bounding boxes for some other character.
+    
+    The fourth and fifth entries, if they exist, are the left and right
+    side bearings, respectively.  */
+    
+ image_char_list_type
+ read_ifi_file (unsigned *total_count)
+ {
+   string line;
+   int bb_count;
+   encoding_info_type *encoding_info;
+   int n = 0;
+   image_char_list_type image_char_list = new_image_char_list ();
+   
+   if (encoding_name)
+     {
+       encoding_info = XTALLOC1 (encoding_info_type);
+       *encoding_info = read_encoding_file (encoding_name);
+     }
+   else  
+     encoding_info = NULL;
+     
+   if (!ifi_filename)
+     ifi_filename = make_suffix (input_name, "ifi");
+ 
+   libfile_start (ifi_filename, "ifi");
+ 
+   *total_count = 0;
+ 
+   while ((line = libfile_line ()) != NULL)
+     {
+       image_char_type c;
+       string baseline_adjust_str, bb_count_str, charname;
+       string lsb_str, rsb_str;
+       string save_line = line; /* So we can free it.  */
+       
+       /* The character name.  */
+       charname = strtok (line, " \t");
+       
+       /* `libfile_line' should never return an empty line.  */
+       assert (charname != NULL);
+       
+       if (STREQ (charname, ".notdef"))
+         IMAGE_CHAR_OMIT (c) = true;
+       else
+         {
+           if (encoding_info)
+             n = encoding_number (*encoding_info, charname);
+           else
+             n++;
+           
+           if (n == -1)
+             {
+               LIBFILE_WARN2 ("Character `%s' undefined in encoding %s",
+                         charname, ENCODING_SCHEME_NAME (*encoding_info));
+               IMAGE_CHAR_OMIT (c) = true;
+ 	    }
+           else
+             {
+     	      IMAGE_CHARCODE (c) = n;
+               IMAGE_CHARNAME (c) = xstrdup (charname);
+               IMAGE_CHAR_OMIT (c) = false;
+ 	    }
+         }
+ 
+       /* The baseline adjustment.  */
+       baseline_adjust_str = strtok (NULL, " \t");
+       IMAGE_CHAR_BASELINE_ADJUST (c)
+         = baseline_adjust_str == NULL ? 0 : atoi (baseline_adjust_str);
+       
+       /* The bounding box count.  */
+       bb_count_str = strtok (NULL, " \t");
+       bb_count = bb_count_str == NULL ? 1 : atoi (bb_count_str);
+       
+       if (bb_count < 0)
+         {
+           IMAGE_CHAR_BB_COUNT (c) = -bb_count;
+           IMAGE_CHAR_BB_ALTERNATING (c) = true;
+         }
+       else
+         {
+           IMAGE_CHAR_BB_COUNT (c) = bb_count;
+           IMAGE_CHAR_BB_ALTERNATING (c) = false;
+         }
+ 
+       /* The left side bearing.  */
+       lsb_str = strtok (NULL, " \t");
+       IMAGE_CHAR_LSB (c) = lsb_str == NULL ? 0 : atoi (lsb_str);
+       
+       /* The right side bearing.  */
+       rsb_str = strtok (NULL, " \t");
+       IMAGE_CHAR_RSB (c) = rsb_str == NULL ? 0 : atoi (rsb_str);
+       
+       *total_count += IMAGE_CHAR_BB_COUNT (c);
+       append_image_char (&image_char_list, c);
+       free (save_line);
+     }
+   
+   libfile_close ();
+   if (encoding_info)
+     free (encoding_info);
+   
+   return image_char_list;
+ }
+ 
+ /* Return an initialized, empty list.  */
+ 
+ static image_char_list_type
+ new_image_char_list ()
+ {
+   image_char_list_type l;
+   
+   IMAGE_CHAR_LIST_LENGTH (l) = 0;
+   IMAGE_CHAR_LIST_DATA (l) = NULL;
+   
+   return l;
+ }
+ 
+ 
+ /* Append the character C to the list L.  */
+ 
+ void
+ append_image_char (image_char_list_type *l, image_char_type c)
+ {
+   IMAGE_CHAR_LIST_LENGTH (*l)++;
+   IMAGE_CHAR_LIST_DATA (*l)
+     = xrealloc (IMAGE_CHAR_LIST_DATA (*l),
+                   IMAGE_CHAR_LIST_LENGTH (*l) * sizeof (image_char_type));
+   IMAGE_CHAR (*l, IMAGE_CHAR_LIST_LENGTH (*l) - 1) = c;
+ }
+ 
+ 
+ /* Return false if the box BOX_COUNT boxes beyond FIRST_CHAR in LIST
+    is in the middle of a character, true otherwise.  To do this, we
+    add up all the box counts for characters starting at FIRST_CHAR,
+    until we see where we land.  */
+ 
+ boolean
+ box_at_char_boundary_p (image_char_list_type list, unsigned first_char,
+                         unsigned box_count)
+ {
+   unsigned count = 0;
+   
+   while (count < box_count && first_char < IMAGE_CHAR_LIST_LENGTH (list))
+     {
+       image_char_type c = IMAGE_CHAR (list, first_char);
+       count += IMAGE_CHAR_BB_COUNT (c);
+       first_char++;
+     }
+     
+   return count == box_count;
+ }
diff -Nrc2 fontutils-0.5/imageto/ifi.h fontutils-0.6/imageto/ifi.h
*** fontutils-0.5/imageto/ifi.h
--- fontutils-0.6/imageto/ifi.h	Fri Oct  2 17:13:40 1992
***************
*** 0 ****
--- 1,91 ----
+ /* ifi.h: information about the characters in the image.
+ 
+ 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 IFI_H
+ #define IFI_H
+ 
+ #include "types.h"
+ 
+ 
+ /* See ifi.c.  */
+ extern string encoding_name, ifi_filename;
+ 
+ 
+ /* A single character in the image.  */
+ typedef struct 
+ {
+   charcode_type charcode;
+   string charname;
+   boolean omit;
+   int baseline_adjust;
+   unsigned bb_count;
+   boolean alternating;
+   int lsb, rsb;
+ } image_char_type;
+ 
+ /* The character code.  This is garbage if `omit' is true.  */
+ #define IMAGE_CHARCODE(c) ((c).charcode)
+ 
+ /* The character name.  */
+ #define IMAGE_CHARNAME(c) ((c).charname)
+ 
+ /* Says whether this character should be output.  */
+ #define IMAGE_CHAR_OMIT(c) ((c).omit)
+ 
+ /* How far the baseline should be moved from the row's baseline.  */
+ #define IMAGE_CHAR_BASELINE_ADJUST(c) ((c).baseline_adjust)
+ 
+ /* How many bounding boxes comprise this character.  */
+ #define IMAGE_CHAR_BB_COUNT(c) ((c).bb_count)
+ 
+ /* Says whether the bounding boxes in this character are consecutive
+    (the usual case) or alternate.  */
+ #define IMAGE_CHAR_BB_ALTERNATING(c) ((c).alternating)
+ 
+ /* The side bearings.  */
+ #define IMAGE_CHAR_LSB(c) ((c).lsb)
+ #define IMAGE_CHAR_RSB(c) ((c).rsb)
+ 
+ 
+ /* A list of the above.  */
+ typedef struct
+ {
+   image_char_type *data;
+   unsigned length;
+ } image_char_list_type;
+ 
+ /* The Nth element of the list L.  */
+ #define IMAGE_CHAR(l, n) ((l).data[n])
+ 
+ /* The list as a whole.  */
+ #define IMAGE_CHAR_LIST_DATA(l) ((l).data)
+ 
+ /* The length of the list.  */
+ #define IMAGE_CHAR_LIST_LENGTH(l) ((l).length)
+ 
+ 
+ /* Read the IFI file IFI_FILENAME. Return the total number of characters
+    read in TOTAL_COUNT.  */
+ extern image_char_list_type read_ifi_file (unsigned *total_count);
+ 
+ /* Return false if the box BOX_COUNT boxes beyond FIRST_CHAR in LIST
+    is in the middle of a character, true otherwise.  */
+ extern boolean box_at_char_boundary_p
+   (image_char_list_type list, unsigned first_char, unsigned box_count);
+ 
+ #endif /* not IFI_H */
diff -Nrc2 fontutils-0.5/imageto/main.c fontutils-0.6/imageto/main.c
*** fontutils-0.5/imageto/main.c	Fri Aug 21 16:14:20 1992
--- fontutils-0.6/imageto/main.c	Sat Oct 24 05:14:04 1992
***************
*** 20,36 ****
  
  #include <ctype.h>
  #define CMDLINE_NO_DPI /* It's not in the input filename.  */
  #include "cmdline.h"
  #include "getopt.h"
  #include "gf.h"
- #include "libfile.h"
  #include "report.h"
  
! #include "bb-outline.h"
! #include "bitmap2.h"
! #include "encoding.h"
! #include "epsf.h"
! #include "extract.h"
! #include "image-char.h"
  #include "image-header.h"
  #include "input-img.h"
--- 20,32 ----
  
  #include <ctype.h>
+ 
  #define CMDLINE_NO_DPI /* It's not in the input filename.  */
  #include "cmdline.h"
+ #include "encoding.h" /* For `DEFAULT_ENCODING'.  */
  #include "getopt.h"
  #include "gf.h"
  #include "report.h"
  
! #include "ifi.h" /* For `encoding_name'.  */
  #include "image-header.h"
  #include "input-img.h"
***************
*** 37,52 ****
  #include "input-pbm.h"
  #include "main.h"
! #include "strips.h"
! 
! 
! /* For temporary debugging.  */
! boolean debug;
  
- /* The design size of the font we're creating.  (-designsize)  */
- real design_size = 10.0;
  
! /* The name of the encoding file specified by the user, and the
!    structure we parse it into.  (-encoding)  */
! static string encoding_name = NULL;
  
  /* Pointers to functions based on input format.  (-input-format)  */
--- 33,43 ----
  #include "input-pbm.h"
  #include "main.h"
! #include "out-chars.h"
! #include "out-epsf.h"
! #include "out-strips.h"
  
  
! /* General information about the image.  Set by the input routines.  */
! image_header_type image_header;
  
  /* Pointers to functions based on input format.  (-input-format)  */
***************
*** 56,88 ****
  boolean (*image_get_scanline) (one_byte *) = NULL;
  
  /* Show every scanline on the terminal as we read it?  (-trace-scanlines) */
  boolean trace_scanlines = false;
- 
- /* General information about the image.  */
- image_header_type image_header;
  
  /* Private variables.  */
  
! /* A list of the image rows on which the baselines occur.  The end of
!    the list is marked with an element -1.  (-baselines)  */
! static int *baseline_list = NULL;
! 
! /* If a bounding box encloses more black (as a percentage) than this, it
!    is cleared.  (-clean-threshold)  */
! static real clean_threshold = .6;
! 
! /* If set, write an EPSF file.  (-epsf)  */
! static boolean do_epsf = false;
! 
! /* If set, prints diagnostics about which boxes are and aren't cleaned. 
!    (-print-clean-info)  */ 
! static boolean print_clean_info = false;
! 
! /* The name of the IFI file.  (-info-file)  */
! static string info_filename = NULL;
! 
! /* The non-extension and non-directory part of the filename for the
!    input image.  */
! static string input_rootname;
  
  /* The suffix for the image file.  */
--- 47,60 ----
  boolean (*image_get_scanline) (one_byte *) = NULL;
  
+ /* The filename for the input image.  */
+ string input_name;
+ 
  /* Show every scanline on the terminal as we read it?  (-trace-scanlines) */
  boolean trace_scanlines = false;
  
  /* Private variables.  */
  
! /* The design size of the font we're creating.  (-designsize)  */
! static real design_size = 10.0;
  
  /* The suffix for the image file.  */
***************
*** 89,100 ****
  static string input_extension;
  
! /* How many character reports fit on a line.  */
! static unsigned nchars_per_line;
! 
! /* Find about this many characters in the image, then stop.  This is
!    useful only for testing, because converting the entire image takes a long
!    time.  So we might in truth output a few more characters than
!    specified here.  (-nchars)  */
! static unsigned nchars_wanted = MAX_CHARCODE + 1;
  
  /* The name of the file we're going to write.  (-output-file) */
--- 61,66 ----
  static string input_extension;
  
! /* If set, write an EPSF file.  (-epsf)  */
! static boolean output_epsf = false;
  
  /* The name of the file we're going to write.  (-output-file) */
***************
*** 101,119 ****
  static string output_name;
  
- /* Says whether to print the row numbers of each character as we go, 
-    so that the user can decide how to adjust jumping baselines. 
-    (-print-guidelines)  */
- static boolean print_guidelines = false;
- 
- /* Says which characters we should process.  This is independent of the
-    ordering in the font file.  (-range) */
- static int starting_char = 0;
- static int ending_char = MAX_CHARCODE;
- 
- /* Where the baseline of the current row is in the image.  The first row
-    is #1, and so on.  We start over at row 1 at each image row.*/
- static unsigned row_baseline;
- static unsigned row_height;
- 
  /* If set, make each ``character'' a (more or less) constant number of
     scanlines.  (-strips) */
--- 67,70 ----
***************
*** 120,136 ****
  static boolean do_strips = false;
  
- /* How many boxes total the character take up.  */
- static unsigned total_boxes_expected;
  
- 
- static gf_char_type bitmap_to_gf_char
-   (bitmap_type, real, bounding_box_type, image_char_type);
- static void clean_bitmap (bitmap_type *, int, int);
- static boolean do_image_line
-   (bitmap_type, unsigned *, unsigned *, real, image_char_list_type);
- static void extract_chars (image_header_type);
- static image_char_list_type read_ifi_file (unsigned *);
- static unsigned output_chars
-   (bounding_box_list_type, bitmap_type, real, image_char_list_type, unsigned);
  static string read_command_line (int, string[]);
  static void set_img_input_format (void);
--- 71,75 ----
***************
*** 139,144 ****
  
  /* We have three different strategies for processing the image:
!      1) (-strips) takes a constant number of scanlines as each character,
!      2)  (normal) analyze the image and write out the ``true'' characters,
       3)   (-epsf) write out the image as an Encapsulated PostScript file.
     
--- 78,83 ----
  
  /* We have three different strategies for processing the image:
!      1)  (normal) analyze the image and write out the ``true'' characters,
!      2) (-strips) takes a constant number of scanlines as each character,
       3)   (-epsf) write out the image as an Encapsulated PostScript file.
     
***************
*** 157,165 ****
  main (int argc, string argv[])
  {
!   string input_name = read_command_line (argc, argv);
!   boolean writing_gf = !do_epsf;
!   
!   set_input_format (input_name);
    
    /* Open the main input file.  */
    (*image_open_input_file) (extend_filename (input_name, input_extension));
--- 96,115 ----
  main (int argc, string argv[])
  {
!   boolean writing_gf;
! 
!   input_name = read_command_line (argc, argv);
!   writing_gf = !output_epsf;
    
+   set_input_format (input_name);  
+ 
+   /* If the input format is PBM, then they must also tell us the dpi.  */
+   if (image_open_input_file == pbm_open_input_file 
+       && image_header.hres == 0)
+     {
+       fprintf (stderr, "If you use PBM format, you must supply the dpi.\n");
+       fprintf (stderr, "For more information, use ``-help''.\n");
+       exit (1);
+     }
+ 
    /* Open the main input file.  */
    (*image_open_input_file) (extend_filename (input_name, input_extension));
***************
*** 169,178 ****
    (*image_get_header) ();
  
-   /* We might use this in `read_ifi_file', so always set it.  */
-   input_rootname = remove_suffix (basename (input_name));
- 
    /* If the user didn't give an output name, use the input name.  */
    if (output_name == NULL)
!     output_name = input_rootname;
    
    /* If they didn't give an output name with a suffix, use ours.  */
--- 119,125 ----
    (*image_get_header) ();
  
    /* If the user didn't give an output name, use the input name.  */
    if (output_name == NULL)
!     output_name = remove_suffix (basename (input_name));
    
    /* If they didn't give an output name with a suffix, use ours.  */
***************
*** 187,191 ****
            output_name = concat5 (output_name, suffix, ".", dpi, "gf");
  	}
!       else if (do_epsf)
          output_name = concat (output_name, ".eps");
        else
--- 134,138 ----
            output_name = concat5 (output_name, suffix, ".", dpi, "gf");
  	}
!       else if (output_epsf)
          output_name = concat (output_name, ".eps");
        else
***************
*** 209,221 ****
           the TFM file get too big.  */
        design_size = 100.0;
!       write_chars_as_strips (image_header);
      }
!   else if (do_epsf)
      write_epsf (output_name, image_header);
    else
!     extract_chars (image_header);
  
    /* Clean up.  */
!   if (verbose || print_clean_info)
      REPORT ("\n");
  
--- 156,168 ----
           the TFM file get too big.  */
        design_size = 100.0;
!       write_chars_as_strips (image_header, design_size);
      }
!   else if (output_epsf)
      write_epsf (output_name, image_header);
    else
!     write_image_chars (image_header, design_size);
  
    /* Clean up.  */
!   if (verbose)
      REPORT ("\n");
  
***************
*** 234,802 ****
  }
  
- /* Analyze the input image, outputting the characters we find.  */
- 
- static void
- extract_chars (image_header_type image_header)
- {
-   bitmap_type *image_bitmap;
-   unsigned nchars_done = 0;
- 
-   /* Read the image information.  This tells us to which character
-        each bounding box belongs, among other things.  */
-   image_char_list_type image_char_list
-     = read_ifi_file (&total_boxes_expected);
- 
-   /* Since we report (a lot) more information when `print_guidelines' is true,
-      we can fit fewer characters per line.  */
-   nchars_per_line = print_guidelines ? 1 : 11;
- 
-   /* The main loop also (and more commonly) exits when we've read the
-      entire image.  */ 
-   while (nchars_done < nchars_wanted)
-     {
-       unsigned *transitions;
- 
-       /* Read one line of characters in the image.  After this,
-          `image_bitmap' is, for example, `a...z', with blank columns at
-          the left and right.  Whatever is in the original image.  */
-       image_bitmap
-         = some_black_to_all_white_row (image_header.width, &transitions);
-       if (image_bitmap == NULL)
-         break; /* We've read the whole image file.  */
- 
-       if (baseline_list == NULL || *baseline_list == -1)
-         {
-          if (baseline_list != NULL)
-             WARNING ("imageto: Not enough baselines specified");
-           row_baseline = 0;
-         }
-       else
-         row_baseline = *baseline_list++;
- 
-       row_height = BITMAP_HEIGHT (*image_bitmap);
- 
-       /* If `do_image_line' fails, we're supposed to read the next
-          row in the image, and put it below the current line.  For
-          example, if a line has only an `!' on it, we will only get
-          the stem on the first call to `some_black_to_all_white_row'.  
-          We want to get the dot in there, too.  */
-       while (!do_image_line (*image_bitmap, transitions, &nchars_done,
-                              (real) image_header.hres, image_char_list))
-         {
-           bitmap_type *revised
-             = append_next_image_row (*image_bitmap, image_header.width,
-                                      &transitions);
-           if (revised == NULL)
-             FATAL ("imageto: Image ended in the midst of a character");
- 
-           free_bitmap (image_bitmap);
-           image_bitmap = revised;
-           if (baseline_list == NULL)
-             row_baseline = 0;
- 
- 	 row_height += BITMAP_HEIGHT (*image_bitmap);
-         }
- 
-       free_bitmap (image_bitmap);
-     }
- }
- 
- 
- /* Analyze and output all of the bitmap IMAGE, which is one line of type
-    in the original.  The resolution of the image is H_RESOLUTION, and
-    we've read NCHARS characters so far.  We use IMAGE_CHAR_LIST and the
-    transition vector TRANSITIONS, which has in it how IMAGE breaks into
-    characters.
-    
-    We return false if we need to be given another image row.  */
- 
- #define NEXT_TRANSITION()  ({						\
-   if (*transitions == BITMAP_WIDTH (image) + 1)				\
-     {									\
-       WARNING ("do_image_line: Expected more transitions");		\
-       break;								\
-     }									\
-   *transitions++;							\
- })
- 
- static boolean
- do_image_line (bitmap_type image, unsigned *transitions, unsigned *nchars, 
-                real h_resolution, image_char_list_type image_char_list)
- {
-   static unsigned box_count = 0;
-   bounding_box_type bb;
-   MIN_ROW (bb) = 0;
-   MAX_ROW (bb) = BITMAP_HEIGHT (image) - 1;
-   
-   /* `nchars_wanted' is an option to the program, defined at the top.  */
-   while (*nchars < nchars_wanted && *transitions != BITMAP_WIDTH (image) + 1)
-     {
-       int bb_offset = 0;
-       unsigned original_box_count = box_count;
-       bounding_box_list_type boxes = init_bounding_box_list ();
-       bitmap_type *char_bitmap = XTALLOC1 (bitmap_type);
-       bitmap_type *temp_bitmap = XTALLOC1 (bitmap_type);
- 
-       /* The first element of TRANSITIONS is white-to-black.
-          Thereafter, they alternate.  */
-       MIN_COL (bb) = NEXT_TRANSITION ();
-       MAX_COL (bb) = NEXT_TRANSITION ();
-       
-       /* After this, `char_bitmap' might be just an `a' (with blank
-          rows above and below, because `a' has neither a descender nor
-          an ascender), then `b', and so on.  In many specimens, some
-          characters overlap; for example, we might get `ij' as one
-          bitmap, instead of `i' and then `j'.  */
-       *char_bitmap = extract_subbitmap (image, bb);
-       *temp_bitmap = copy_bitmap (*char_bitmap);
- 
-       while (true)
-         {
-           bounding_box_list_type temp_boxes;
-           bounding_box_type previous_bb;
- 
-           /* If we've read all the bounding boxes expected, we're done.  */
-           if (box_count == total_boxes_expected)
-             break;
- 
-           /* If we've read more than we expected to, we're in trouble.  */
-           if (box_count > total_boxes_expected)
-             {
-               WARNING2 ("do_image_line: Read box #%u but expected only %u",
-                         box_count, total_boxes_expected);
-               /* No point in giving this message more than once.  */
-               total_boxes_expected = INT_MAX;
-             }
- 
-           /* Find bounding boxes around all the shapes in `char_bitmap'.
-              Continuing the `ij' example, this would result in four
-              bounding boxes (one for each dot, one for the dotless `i',
-              and one for the dotless `j').  */
-           temp_boxes = find_outline_bbs (*temp_bitmap, false, 0, 0);
- 
-           /* The subimages we've created all start at column zero.  But
-              we want to put the images side-by-side, instead of
-              overlaying them.  So we change the bounding box numbers.  */
-           offset_bounding_box_list (&temp_boxes, bb_offset);
- 
-           box_count += BB_LIST_LENGTH (temp_boxes);
-           append_bounding_box_list (&boxes, temp_boxes);
- 
-           /* See if the white column was in the middle of a character.  */
-           if (box_at_char_boundary_p (image_char_list, *nchars,
-                                       box_count - original_box_count))
-             break;
- 
-           /* It was.  We have to read more (horizontally) of the image,
-              if we have it.  If we don't, return false, so our caller
-              can read more (vertically). */
- 
- 	  free_bitmap (temp_bitmap);
- 
- 	  if (*transitions == BITMAP_WIDTH (image) + 1)
-             { /* Forget that we've seen this before.  */
-               box_count = original_box_count;
-               return false;
-             }
- 
- 	  previous_bb = bb;
- 	  MIN_COL (bb) = NEXT_TRANSITION ();
-           MAX_COL (bb) = NEXT_TRANSITION ();
- 	  bb_offset = MIN_COL (bb) - MAX_COL (previous_bb);
- 	  /* Leave in the white space between the character parts.  */
- 	  MIN_COL (bb) = MAX_COL (previous_bb);
-           
-           *temp_bitmap = extract_subbitmap (image, bb);
-           REPORT ("+");
-           if (temp_bitmap == NULL)
-             {
-               WARNING1 ("imageto: Expected more bounding boxes for `%d'",
-                        IMAGE_CHARCODE (IMAGE_CHAR (image_char_list, *nchars)));
-               break;
-             }
- 
-           /* The boxes `temp_bitmap' should be just to the right of the
-              bitmap we've accumulated in `char_bitmap'.  */
-           bb_offset += BITMAP_WIDTH (*char_bitmap);
- 
- 	  /* When this happens, it usually means that the IFI file
-              didn't specify enough bounding boxes for some character,
-              and so things are out of sync.  */
-           if (BITMAP_HEIGHT (*char_bitmap) != BITMAP_HEIGHT (*temp_bitmap))
-             {
-               WARNING ("imageto: Line ended inside a character");
-               break;
-             }
-           bitmap_concat (char_bitmap, *temp_bitmap);
-         }  /* while (true)  */
-         
-       free_bitmap (temp_bitmap);
- 
-       /* Convert the bits inside those bounding boxes into one (if not
-         overlapping with another) or more (if overlapping) characters
- 	in the GF font.  */
-       *nchars += output_chars (boxes, *char_bitmap, h_resolution,
-                                image_char_list, *nchars);
- 
-       free_bitmap (char_bitmap);
-       free_bounding_box_list (&boxes);
-     }
-   
-   return true;
- }
- 
- /* This macro figures out how the previous and next bounding boxes
-    overlap the current bounding box, which we assume is `BB_LIST_ELT
-    (boxes, this_box)'.  The variables we assign to, `left_edge' and
-    `right_edge', must be already declared.  We have to put the numbers
-    in the coordinate system of the bitmap of the single character we're
-    working on, instead of the coordinate system the bounding boxes
-    numbers are in, which is the group of characters we were sent.  */
- 
- #define SET_EDGES(bb)							\
-   left_edge								\
-     = this_box == 0							\
-       ? 0								\
-       : MAX_COL (BB_LIST_ELT (boxes, this_box - 1)) - MIN_COL (bb);	\
-   right_edge								\
-     = this_box == BB_LIST_LENGTH (boxes) - 1				\
-       ? BB_WIDTH (bb)							\
-       : MIN_COL (BB_LIST_ELT (boxes, this_box + 1)) - MIN_COL (bb);
- 
- 
- /* For each bounding box in the list BOXES, extract from IMAGE_BITMAP
-    and turn the resulting bitmap into a single character in the font. 
-    The information in IMAGE_CHAR_LIST maps bounding boxes to character codes;
-    consecutive bounding boxes may belong to the same character.  For
-    example, `i' will appear twice, once for the dot and once for the
-    stem.  We assume that all the bounding boxes for a given character
-    will appear in IMAGE_BITMAP.
-    
-    We return the number of characters (not bounding boxes) found,
-    including characters that were omitted.  */
- 
- static unsigned
- output_chars (bounding_box_list_type boxes, bitmap_type image_bitmap, 
- 	      real h_resolution, image_char_list_type image_char_list,
-               unsigned current_char)
- {  
-   static unsigned char_count = 0;
-   int left_edge, right_edge;
-   unsigned this_box;
-   boolean done[BB_LIST_LENGTH (boxes)];
-   unsigned number_written = 0;
-   
-   for (this_box = 0; this_box < BB_LIST_LENGTH (boxes); this_box++)
-     done[this_box] = false;
- 
-   for (this_box = 0; this_box < BB_LIST_LENGTH (boxes); this_box++)
-     {
-       bounding_box_type bb;
-       bitmap_type bitmap;
-       image_char_type c;
-       one_byte charcode;
-       gf_char_type gf_char;
-       
-       /* `done[this_box]' will be set if we get to a bounding box that
-          has already been combined with a previous one, because of
-          an alternating combination.  Since we never go backwards, we
-          don't bother to set `done' for every box we look at.  */
-       if (done[this_box])
-         continue;
-         
-       bb = BB_LIST_ELT (boxes, this_box);
-       c = IMAGE_CHAR (image_char_list, current_char++);
-       charcode = IMAGE_CHARCODE (c);
-       
-       if (charcode >= starting_char && charcode <= ending_char
-           && !IMAGE_CHAR_OMIT (c))
-         {
-           bitmap = extract_subbitmap (image_bitmap, bb);
-           
-           /* Remove extraneous blobs and such.  We have to do this when
-              we first have the bitmap, before anything has been combined.
- 	     Otherwise, the dot on the `i', for example, would get
-              cleaned away.  */
- 
-           SET_EDGES (bb);
-           clean_bitmap (&bitmap, left_edge, right_edge);
-         }
- 
-       while (IMAGE_CHAR_BB_COUNT (c)-- > 1)
-         {
-           unsigned combine_box;
-           
-           if (IMAGE_CHAR_BB_ALTERNATING (c))
-             {
-               /* Don't increment `this_box', since it is incremented at
-                  the end of the loop, and the next box is part of
-                  another character.  */
-               combine_box = this_box + 2;
-               /* Don't look at the second box again in the outer loop:  */
-               done[combine_box] = true;
-             }
-           else
-             combine_box = ++this_box;
- 
-           if (combine_box >= BB_LIST_LENGTH (boxes))
-             {
-               WARNING1 ("output_chars: Not enough outlines for char %u",
-                         (unsigned) charcode);
-               break;
-             }
- 
-           if (charcode >= starting_char && charcode <= ending_char
-               && !IMAGE_CHAR_OMIT (c))
-             {
-               /* Get the shape to combine with `bitmap'.  */
-               bounding_box_type next_bb = BB_LIST_ELT (boxes, combine_box);
-               bitmap_type next_bitmap
-                 = extract_subbitmap (image_bitmap, next_bb);
- 
-               SET_EDGES (bb);
-               clean_bitmap (&bitmap, left_edge, right_edge);
-               combine_images (&bitmap, next_bitmap, &bb, next_bb);
-               free_bitmap (&next_bitmap);
-             }
-         }
-       
-       if (charcode >= starting_char && charcode <= ending_char
-           && !IMAGE_CHAR_OMIT (c))
-         {
-           REPORT ("[");
-           gf_char = bitmap_to_gf_char (bitmap, h_resolution, bb, c);
-           gf_put_char (gf_char);
-           REPORT ("]");
-           /* This and the GF character's bitmap are the same, so we only
-              need to free one of the two.  */
-           free_bitmap (&bitmap);
-         }
-       else
-         REPORT ("x"); /* We're ignoring this character.  */
- 
-       REPORT1 ("%c", ++char_count % nchars_per_line ? ' ' : '\n');
-       number_written++;
-     }
-   
-   return number_written;
- }              
- 
- 
- #define BB_TO_CARTESIAN(x) 						\
-   (row_height - 1 - (x) - row_baseline 					\
-    - IMAGE_CHAR_BASELINE_ADJUST (image_char))
- 
- /* Derive the information necessary to output the font character from
-    the bitmap B, and return it.  The resolution of the bitmap is given in
-    pixels per inch as H_RESOLUTION.  The bounding box BB encloses the
-    character in the image coordinates.  We use BB, plus the global
-    `baseline', to determine the positioning of the GF character.  */
- 
- static gf_char_type
- bitmap_to_gf_char (bitmap_type b, real h_resolution,
-                    bounding_box_type bb, image_char_type image_char)
- {
-   gf_char_type gf_char;
-   real width_in_points;
-   charcode_type charcode = IMAGE_CHARCODE (image_char);
-   bounding_box_type cartesian_bb;  
-   
-   MIN_ROW (cartesian_bb) = BB_TO_CARTESIAN (MAX_ROW (bb));
-   MAX_ROW (cartesian_bb) = BB_TO_CARTESIAN (MIN_ROW (bb));
-   
-   REPORT1 ("%u", charcode);
-   
-   GF_CHARCODE (gf_char) = charcode;
-   GF_BITMAP (gf_char) = b;
-   GF_CHAR_MIN_COL (gf_char) = IMAGE_CHAR_LSB (image_char);
-   GF_CHAR_MAX_COL (gf_char) = GF_CHAR_MIN_COL (gf_char) + BITMAP_WIDTH (b);
-   GF_CHAR_MIN_ROW (gf_char) = MIN_ROW (cartesian_bb);
-   GF_CHAR_MAX_ROW (gf_char) = MAX_ROW (cartesian_bb);
- 
-   GF_H_ESCAPEMENT (gf_char) = (GF_CHAR_MAX_COL (gf_char)
-                                + IMAGE_CHAR_RSB (image_char));
- 
-   width_in_points = GF_H_ESCAPEMENT (gf_char) * POINTS_PER_INCH / h_resolution;
-   GF_TFM_WIDTH (gf_char) = real_to_fix (width_in_points / design_size);
- 
-   if (print_guidelines)
-     fprintf (stderr, " (%s) %d/%d",  IMAGE_CHARNAME (image_char),
- 	     MIN_ROW (cartesian_bb), MAX_ROW (cartesian_bb));
- 
-   return gf_char;
- }
- 
- 
- /* Find the bounding boxes of all outlines inside B.  For each of them
-    that are sufficiently black, white them out.  In the type specimens,
-    many characters overlap their neighbors by just a few pixels.  When
-    we extract the pixels inside the bounding box of the `d', say, a few
-    pixels of the `e' may creep in on the right.  We want to get rid of
-    those.  Other junk might show up due to dark spots on the page, and
-    we want to get rid of those, too.  Hence the test for ``sufficiently
-    black''.  */
- 
- static void
- clean_bitmap (bitmap_type *b, int left, int right)
- {
-   unsigned this_box;
-   bounding_box_list_type boxes 
-     = find_outline_bbs (*b, false, left, right);
-   
-   for (this_box = 0; this_box < BB_LIST_LENGTH (boxes); this_box++)
-     {
-       bounding_box_type bb = BB_LIST_ELT (boxes, this_box);
-       
-       /* If the bounding box encloses the entire character, we don't
-           have to bother checking how black it is.  */
-           
-       if (!(BB_WIDTH (bb) == BITMAP_WIDTH (*b)
-             && BB_HEIGHT (bb) == BITMAP_HEIGHT (*b)))
-         {
-           real average_gray;
-           unsigned this_row, this_col;
-           unsigned black_count = 0;
-           unsigned total_pixels = BB_WIDTH (bb) * BB_HEIGHT (bb);
-           
-           for (this_row = MIN_ROW (bb); this_row <= MAX_ROW (bb); this_row++)
-             for (this_col = MIN_COL (bb); this_col < MAX_COL (bb); this_col++)
-               {
-                 if (BITMAP_PIXEL (*b, this_row, this_col) == BLACK)
-                   black_count++;
-               }
-           average_gray = (real) black_count / total_pixels;
- 
-           if (print_clean_info)
-             fprintf (stderr, "\nCleaning %ux%u:", BITMAP_WIDTH (*b),
-                      BITMAP_HEIGHT (*b)); 
- 
- 	  if (average_gray >= clean_threshold)
-             {
-               if (print_clean_info)
-                 fprintf (stderr, " clearing %.2f. ", average_gray);
-               for (this_row = MIN_ROW (bb); this_row <= MAX_ROW (bb);
-                    this_row++)
-                 for (this_col = MIN_COL (bb); this_col < MAX_COL (bb);
-                      this_col++)
-                   BITMAP_PIXEL (*b, this_row, this_col) = WHITE;
-             }
-           else if (print_clean_info)
-             fprintf (stderr, " omitting %.2f. ", average_gray);
-         }
-     }
- }
- 
- /* Read an IFI file, which gives us some information about the
-    image we are going to read.  If `info_filename' is set (which the
-    user can do), use that for the name; otherwise, construct it from the
-    font name.
-    
-    See the documentation for full details and examples of IFI files.
-    Here we just sketch the bare bones.
-    
-    Each (non-blank, non-comment) line in this file represents a
-    ``character'' in the image, and has one to five entries, separated by
-    spaces and/or tabs.  Comments start with `%' and continue to the end
-    of the line.
-    
-    The first entry represents the character code.  See the documentation
-    for the various forms of charcodes.  We also allow `.notdef', meaning
-    the ``character'' should not be output in the font.  
-    
-    The second entry, if it exists, is an adjustment to the
-    baseline.  We move the baseline down for negative numbers, and up
-    for positive ones.  Default is zero.
-    
-    The third entry, if it exists, is the number of bounding boxes that
-    comprise this character.  If it is negative, the bounding boxes
-    are not consecutive in the image; instead, they alternate with
-    bounding boxes for some other character.
-    
-    The fourth and fifth entries, if they exist, are the left and right
-    side bearings, respectively.  */
-    
- static image_char_list_type
- read_ifi_file (unsigned *total_count)
- {
-   string line;
-   int bb_count;
-   image_char_list_type image_char_list = new_image_char_list ();
-   encoding_info_type encoding_info 
-     = read_encoding_file (encoding_name ? : DEFAULT_ENCODING);
-   
-   libfile_start (info_filename ? : input_rootname, "ifi");
- 
-   *total_count = 0;
- 
-   while ((line = libfile_line ()) != NULL)
-     {
-       image_char_type c;
-       string baseline_adjust_str, bb_count_str, charname;
-       string lsb_str, rsb_str;
-       string save_line = line; /* So we can free it.  */
-       
-       /* The character name.  */
-       charname = strtok (line, " \t");
-       
-       /* `libfile_line' should never return an empty line.  */
-       assert (charname != NULL);
-       
-       if (STREQ (charname, ".notdef"))
-         IMAGE_CHAR_OMIT (c) = true;
-       else
-         {
-           int n = encoding_number (encoding_info, charname);
-           
-           if (n == -1)
-             {
-               WARNING2 ("Character `%s' undefined in encoding %s",
-                         charname, ENCODING_SCHEME_NAME (encoding_info));
-               IMAGE_CHAR_OMIT (c) = true;
- 	    }
-           else
-             {
-     	      IMAGE_CHARCODE (c) = n;
-               IMAGE_CHARNAME (c) = xstrdup (charname);
-               IMAGE_CHAR_OMIT (c) = false;
- 	    }
-         }
- 
-       /* The baseline adjustment.  */
-       baseline_adjust_str = strtok (NULL, " \t");
-       IMAGE_CHAR_BASELINE_ADJUST (c)
-         = baseline_adjust_str == NULL ? 0 : atoi (baseline_adjust_str);
-       
-       /* The bounding box count.  */
-       bb_count_str = strtok (NULL, " \t");
-       bb_count = bb_count_str == NULL ? 1 : atoi (bb_count_str);
-       
-       if (bb_count < 0)
-         {
-           IMAGE_CHAR_BB_COUNT (c) = -bb_count;
-           IMAGE_CHAR_BB_ALTERNATING (c) = true;
-         }
-       else
-         {
-           IMAGE_CHAR_BB_COUNT (c) = bb_count;
-           IMAGE_CHAR_BB_ALTERNATING (c) = false;
-         }
- 
-       /* The left side bearing.  */
-       lsb_str = strtok (NULL, " \t");
-       IMAGE_CHAR_LSB (c) = lsb_str == NULL ? 0 : atoi (lsb_str);
-       
-       /* The right side bearing.  */
-       rsb_str = strtok (NULL, " \t");
-       IMAGE_CHAR_RSB (c) = rsb_str == NULL ? 0 : atoi (rsb_str);
-       
-       *total_count += IMAGE_CHAR_BB_COUNT (c);
-       append_image_char (&image_char_list, c);
-       free (save_line);
-     }
-   
-   libfile_close ();
-   return image_char_list;
- }
- 
  /* We are semi-clever about printing this, for the sake of huge images.  */
  
--- 181,184 ----
***************
*** 845,858 ****
  "baselines <row1>,<row2>,...: define the baselines for each image row.
    The baseline of the first image row is taken to be scanline <row1>, etc.
- clean-threshold <percent>: if a bounding box encloses more black than
-   this, it is cleared; default is 60.
  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 " DEFAULT_ENCODING ".
  epsf: write the image as an Encapsulated PostScript file, instead of a
    bitmap font.
  help: print this message.
! info-file <filename>: use <filename>.ifi (if <filename doesn't have a
    suffix; otherwise use <filename>) for the IFI filename; default is
    `<font_name>.ifi'.
--- 227,238 ----
  "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'.
***************
*** 866,872 ****
    use <font_name> for <filename>.
  print-clean-info: print gray values for the bounding boxes that are
!   considered for cleaning.
  print-guidelines: print the numbers of the top and bottom rows (in that
!   order) of each character.  This implies `verbose'.
  range <char1>-<char2>: only process characters between <char1> and
    <char2>, inclusive. 
--- 246,252 ----
    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 process characters between <char1> and
    <char2>, inclusive. 
***************
*** 874,878 ****
    instead of using an IFI file to analyze the image.
  trace-scanlines: show every scanline as we read it.
! verbose: output progress reports to stderr.
  version: print the version number of this program.
  "
--- 254,258 ----
    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.
  "
***************
*** 886,896 ****
    struct option long_options[]
      = { { "baselines",		1, 0, 0 },
-         { "clean-threshold",	1, 0, 0 },
          { "designsize",		1, 0, 0 },
          { "encoding",		1, 0, 0 },
!         { "epsf",		0, (int *) &do_epsf, 1 },
          { "help",               0, 0, 0 },
  	{ "dpi",		1, 0, 0 },
!         { "info-file",		1, 0, 0 },
          { "nchars",		1, 0, 0 },
          { "input-format",	1, 0, 0 },
--- 266,275 ----
    struct option long_options[]
      = { { "baselines",		1, 0, 0 },
          { "designsize",		1, 0, 0 },
          { "encoding",		1, 0, 0 },
!         { "epsf",		0, (int *) &output_epsf, 1 },
          { "help",               0, 0, 0 },
  	{ "dpi",		1, 0, 0 },
!         { "ifi-file",		1, 0, 0 },
          { "nchars",		1, 0, 0 },
          { "input-format",	1, 0, 0 },
***************
*** 919,925 ****
        if (ARGUMENT_IS ("baselines"))
          baseline_list = scan_unsigned_list (optarg);
-         
-       else if (ARGUMENT_IS ("clean-threshold"))
-         clean_threshold = GET_PERCENT (optarg);
        
        else if (ARGUMENT_IS ("designsize"))
--- 298,301 ----
***************
*** 942,947 ****
          }
  
!       else if (ARGUMENT_IS ("info-file"))
!         info_filename = optarg;
  
        else if (ARGUMENT_IS ("input-format"))
--- 318,323 ----
          }
  
!       else if (ARGUMENT_IS ("ifi-file"))
!         ifi_filename = optarg;
  
        else if (ARGUMENT_IS ("input-format"))
***************
*** 962,966 ****
          output_name = optarg;
  
!       else if (ARGUMENT_IS ("print-guidelines"))
          verbose = true;
  
--- 338,343 ----
          output_name = optarg;
  
!       else if (ARGUMENT_IS ("print-clean-info")
!                || ARGUMENT_IS ("print-guidelines"))
          verbose = true;
  
***************
*** 974,979 ****
      }
    
!   if (do_strips && do_epsf)
!     FATAL ("Sorry, -strips and -epsf are mutually exclusive");
  
    FINISH_COMMAND_LINE ();
--- 351,356 ----
      }
    
!   if (do_strips && output_epsf)
!     FATAL ("imageto: Sorry, -strips and -epsf are mutually exclusive");
  
    FINISH_COMMAND_LINE ();
***************
*** 994,998 ****
  
    /* Try to guess based on FILENAME.  */
!   input_extension = find_suffix (filename);
  
    if (STREQ (input_extension, "img"))
--- 371,375 ----
  
    /* Try to guess based on FILENAME.  */
!   input_extension = find_suffix (filename) ? : "";
  
    if (STREQ (input_extension, "img"))
***************
*** 1006,1018 ****
        fprintf (stderr, "You must supply an input format.\n");
        fprintf (stderr, "(I can't guess from the filename `%s'.)\n", filename);
-       fprintf (stderr, "For more information, use ``-help''.\n");
-       exit (1);
-     }
- 
-   /* If the input format is PBM, then they must also tell us the dpi.  */
-   if (image_open_input_file == pbm_open_input_file 
-       && image_header.hres == 0)
-     {
-       fprintf (stderr, "If you use PBM format, you must supply the dpi.\n");
        fprintf (stderr, "For more information, use ``-help''.\n");
        exit (1);
--- 383,386 ----
diff -Nrc2 fontutils-0.5/imageto/main.h fontutils-0.6/imageto/main.h
*** fontutils-0.5/imageto/main.h	Mon Jun 15 07:57:07 1992
--- fontutils-0.6/imageto/main.h	Fri Oct  2 17:13:10 1992
***************
*** 25,31 ****
  
  /* See main.c for explanations of these globals.  */
! extern real design_size;
! extern boolean trace_scanlines, verbose, debug;
  extern image_header_type image_header;
  
  /* Generic routines to manipulate the image.  */
--- 25,31 ----
  
  /* See main.c for explanations of these globals.  */
! extern boolean trace_scanlines;
  extern image_header_type image_header;
+ extern string input_name;
  
  /* Generic routines to manipulate the image.  */
diff -Nrc2 fontutils-0.5/imageto/out-chars.c fontutils-0.6/imageto/out-chars.c
*** fontutils-0.5/imageto/out-chars.c
--- fontutils-0.6/imageto/out-chars.c	Fri Oct 23 11:13:31 1992
***************
*** 0 ****
--- 1,604 ----
+ /* out-chars.c: try to extract the real characters from the image.
+ 
+ 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.  */
+ 
+ #include "config.h"
+ 
+ #include "bb-outline.h"
+ #include "gf.h"
+ #include "report.h"
+ 
+ #include "bitmap2.h"
+ #include "extract.h"
+ #include "ifi.h"
+ #include "image-header.h"
+ #include "main.h"
+ #include "out-strips.h"
+ 
+ 
+ /* A list of the image rows on which the baselines occur.  The end of
+    the list is marked with an element -1.  (-baselines)  */
+ int *baseline_list = NULL;
+ 
+ /* Find about this many characters in the image, then stop.  This is
+    useful only for testing, because converting the entire image takes a long
+    time.  So we might in truth output a few more characters than
+    specified here.  (-nchars)  */
+ unsigned nchars_wanted = MAX_CHARCODE + 1;
+ 
+ /* If set, prints diagnostics about which boxes are and aren't cleaned. 
+    (-print-clean-info)  */ 
+ boolean print_clean_info = false;
+ 
+ /* Says whether to print the row numbers of each character as we go, 
+    so that the user can decide how to adjust jumping baselines. 
+    (-print-guidelines)  */
+ boolean print_guidelines = false;
+ 
+ /* Says which characters to output.  This is independent of the
+    ordering in the font file.  (-range) */
+ int starting_char = 0;
+ int ending_char = MAX_CHARCODE;
+ 
+ /* The design size of the font we're creating.  */
+ static real design_size;
+ 
+ /* Where the baseline of the current row is in the image.  The first row
+    is #1, and so on.  We start over at row 1 at each image row.*/
+ static unsigned row_baseline;
+ static unsigned row_height;
+ 
+ /* How many boxes total the characters take up.  */
+ static unsigned total_boxes_expected;
+ 
+ 
+ static boolean bb_equal_p (bounding_box_type, bounding_box_type);
+ static gf_char_type bitmap_to_gf_char
+   (bitmap_type, real, bounding_box_type, image_char_type);
+ static void clean_bitmap (bitmap_type *, bb_list_type);
+ static boolean do_image_line
+   (bitmap_type, unsigned *, unsigned *, real, image_char_list_type);
+ static void image_to_bitmap_bbs (bb_list_type *);
+ extern void offset_bb_list (bb_list_type *l, int offset);
+ static unsigned output_chars
+   (bb_list_type, bitmap_type, real, image_char_list_type, unsigned);
+ 
+ /* Analyze the input image, outputting the characters we find.  */
+ 
+ void
+ write_image_chars (image_header_type image_header, real ds)
+ {
+   bitmap_type *image_bitmap;
+   unsigned nchars_done = 0;
+ 
+   /* Read the image information.  This tells us to which character
+        each bounding box belongs, among other things.  */
+   image_char_list_type image_char_list = read_ifi_file (&total_boxes_expected);
+ 
+   /* Remember this so we don't need to pass it through all the
+      intervening routines to the low-level output.  */
+   design_size = ds;
+   
+   /* The main loop also (and more commonly) exits when we've read the
+      entire image.  */ 
+   while (nchars_done < nchars_wanted)
+     {
+       unsigned *transitions;
+ 
+       /* Read one line of characters in the image.  After this,
+          `image_bitmap' is, for example, `a...z', with blank columns at
+          the left and right.  Whatever is in the original image.  */
+       image_bitmap
+         = some_black_to_all_white_row (image_header.width, &transitions);
+       if (image_bitmap == NULL)
+         break; /* We've read the whole image file.  */
+ 
+       if (baseline_list == NULL || *baseline_list == -1)
+         {
+          if (baseline_list != NULL)
+             WARNING ("imageto: Not enough baselines specified");
+           row_baseline = 0;
+         }
+       else
+         row_baseline = *baseline_list++;
+ 
+       row_height = BITMAP_HEIGHT (*image_bitmap);
+ 
+       /* If `do_image_line' fails, we're supposed to read the next
+          row in the image, and put it below the current line.  For
+          example, if a line has only an `!' on it, we will only get
+          the stem on the first call to `some_black_to_all_white_row'.  
+          We want to get the dot in there, too.  */
+       while (!do_image_line (*image_bitmap, transitions, &nchars_done,
+                              (real) image_header.hres, image_char_list))
+         {
+           bitmap_type *revised
+             = append_next_image_row (*image_bitmap, image_header.width,
+                                      &transitions);
+           if (revised == NULL)
+             {
+               WARNING ("imageto: Image ended in the midst of a character");
+               break;
+             }
+ 
+           /* Tell the user the image row didn't end on a character.  */
+           REPORT ("+");
+ 
+           free_bitmap (image_bitmap);
+           image_bitmap = revised;
+           if (baseline_list == NULL)
+             row_baseline = 0;
+ 
+ 	 row_height = BITMAP_HEIGHT (*image_bitmap);
+         }
+ 
+       free_bitmap (image_bitmap);
+     }
+ }
+ 
+ /* Analyze and output all of the bitmap IMAGE, which is one line of type
+    in the original.  The resolution of the image is H_RESOLUTION, and
+    we've read NCHARS characters so far.  We use IMAGE_CHAR_LIST and the
+    transition vector TRANSITIONS, which has in it how IMAGE breaks into
+    characters.
+    
+    We return false if we need to be given another image row.  */
+ 
+ #define NEXT_TRANSITION()  ({						\
+   if (*transitions == BITMAP_WIDTH (image) + 1)				\
+     {									\
+       WARNING ("imageto: Expected more transitions");			\
+       break;								\
+     }									\
+   *transitions++;							\
+ })
+ 
+ static boolean
+ do_image_line (bitmap_type image, unsigned *transitions, unsigned *nchars, 
+                real h_resolution, image_char_list_type image_char_list)
+ {
+   static unsigned box_count = 0;
+   bounding_box_type bb;
+   
+   /* We always use the entire image line vertically.  */
+   MIN_ROW (bb) = 0;
+   MAX_ROW (bb) = BITMAP_HEIGHT (image) - 1;
+   
+   /* `nchars_wanted' is an option to the program, defined at the top.  */
+   while (*nchars < nchars_wanted && *transitions != BITMAP_WIDTH (image) + 1)
+     {
+       int bb_offset = 0;
+       unsigned original_box_count = box_count;
+       bb_list_type boxes = bb_list_init ();
+       bitmap_type *char_bitmap = XTALLOC1 (bitmap_type);
+       bitmap_type *temp_bitmap = XTALLOC1 (bitmap_type);
+ 
+       /* The first element of TRANSITIONS is white-to-black.
+          Thereafter, they alternate.  */
+       MIN_COL (bb) = NEXT_TRANSITION ();
+       MAX_COL (bb) = NEXT_TRANSITION ();
+       
+       /* After this, `char_bitmap' might be just an `a' (with blank
+          rows above and below, because `a' has neither a descender nor
+          an ascender), then `b', and so on.  In many specimens, some
+          characters overlap; for example, we might get `ij' as one
+          bitmap, instead of `i' and then `j'.  */
+       *char_bitmap = extract_subbitmap (image, bb);
+       *temp_bitmap = copy_bitmap (*char_bitmap);
+ 
+       while (true)
+         {
+           bb_list_type temp_boxes;
+           bounding_box_type previous_bb;
+ 
+           /* If we've read all the bounding boxes expected, we're done.  */
+           if (box_count == total_boxes_expected)
+             break;
+ 
+           /* If we've read more than we expected to, we're in trouble.  */
+           if (box_count > total_boxes_expected)
+             {
+               WARNING2 ("imageto: Read box #%u but expected only %u",
+                         box_count, total_boxes_expected);
+               /* No point in giving this message more than once.  */
+               total_boxes_expected = INT_MAX;
+             }
+ 
+           /* Find bounding boxes around all the shapes in `char_bitmap'.
+              Continuing the `ij' example, this would result in four
+              bounding boxes (one for each dot, one for the dotless `i',
+              and one for the dotless `j').  */
+           temp_boxes = find_outline_bbs (*temp_bitmap, false, 0, 0);
+ 
+           /* The subimages we've created all start at column zero.  But
+              we want to put the images side-by-side, instead of
+              overlaying them.  So we change the bounding box numbers.  */
+           offset_bb_list (&temp_boxes, bb_offset);
+ 
+           box_count += BB_LIST_LENGTH (temp_boxes);
+           bb_list_splice (&boxes, temp_boxes);
+ 
+           /* If the white column was at the end of a character, exit the
+              loop to output what we've got..  */
+           if (box_at_char_boundary_p (image_char_list, *nchars,
+                                       box_count - original_box_count))
+             break;
+ 
+           /* If we're at the end of the image row, tell our caller that
+              we had to quit in the middle of a character.  */
+ 	  if (*transitions == BITMAP_WIDTH (image) + 1)
+             { /* Forget that we've seen this before.  */
+               box_count = original_box_count;
+               return false;
+             }
+ 
+ 	  previous_bb = bb;
+ 	  MIN_COL (bb) = NEXT_TRANSITION ();
+           MAX_COL (bb) = NEXT_TRANSITION ();
+           
+ 	  /* Leave in the white space between the character parts.  */
+ 	  MIN_COL (bb) = MAX_COL (previous_bb);
+           
+ 	  free_bitmap (temp_bitmap);
+           *temp_bitmap = extract_subbitmap (image, bb);
+           if (temp_bitmap == NULL)
+             {
+               WARNING1 ("imageto: Expected more bounding boxes for `%d'",
+                        IMAGE_CHARCODE (IMAGE_CHAR (image_char_list, *nchars)));
+               break;
+             }
+ 
+           /* The boxes `temp_bitmap' should be just to the right of the
+              bitmap we've accumulated in `char_bitmap'.  This happens
+              above, next time through the loop.  */
+           bb_offset = BITMAP_WIDTH (*char_bitmap);
+ 
+ 	  /* When this happens, it usually means that the IFI file
+              didn't specify enough bounding boxes for some character,
+              and so things are out of sync.  */
+           if (BITMAP_HEIGHT (*char_bitmap) != BITMAP_HEIGHT (*temp_bitmap))
+             {
+               WARNING ("imageto: Line ended inside a character");
+               break;
+             }
+           bitmap_concat (char_bitmap, *temp_bitmap);
+         }  /* while (true) */
+         
+       free_bitmap (temp_bitmap);
+ 
+       /* Convert the bits inside those bounding boxes into one (if not
+          overlapping with another) or more (if overlapping) characters
+ 	 in the GF font.  */
+       *nchars += output_chars (boxes, *char_bitmap, h_resolution,
+                                image_char_list, *nchars);
+ 
+       free_bitmap (char_bitmap);
+       bb_list_free (&boxes);
+     }
+   
+   return true;
+ }
+ 
+ /* Move all the elements in BB_LIST to the right by OFFSET.  */
+ 
+ void
+ offset_bb_list (bb_list_type *bb_list, int offset)
+ {
+   unsigned this_bb;
+   
+   for (this_bb = 0; this_bb < BB_LIST_LENGTH (*bb_list); this_bb++)
+     {
+       bounding_box_type *bb = &BB_LIST_ELT (*bb_list, this_bb);
+       MIN_COL (*bb) += offset;
+       MAX_COL (*bb) += offset;
+     }
+ }
+ 
+ 
+ /* Return true if BB1 and BB2 are equal.  */
+ 
+ static boolean
+ bb_equal_p (bounding_box_type bb1, bounding_box_type bb2)
+ {
+   return
+     MIN_COL (bb1) == MIN_COL (bb2)
+     && MIN_ROW (bb1) == MIN_ROW (bb2)
+     && MAX_COL (bb1) == MAX_COL (bb2)
+     && MAX_ROW (bb1) == MAX_ROW (bb2);
+ }
+ 
+ /* For each bounding box in the list BOXES, extract from IMAGE_BITMAP
+    and turn the resulting bitmap into a single character in the font. 
+    The information in IMAGE_CHAR_LIST maps bounding boxes to character codes;
+    consecutive bounding boxes may belong to the same character.  For
+    example, `i' will appear twice, once for the dot and once for the
+    stem.  We assume that all the bounding boxes for a given character
+    will appear in IMAGE_BITMAP.
+    
+    We return the number of characters (not bounding boxes) found,
+    including characters that were omitted.  */
+ 
+ /* Predicate to tell us if we want to actually write the character.  */
+ #define OUTPUT_CHAR_P(code, image_char)					\
+   ((code) >= starting_char && (code) <= ending_char			\
+    && !IMAGE_CHAR_OMIT (image_char))
+ 
+ static unsigned
+ output_chars (bb_list_type boxes, bitmap_type image_bitmap, 
+ 	      real h_resolution, image_char_list_type image_char_list,
+               unsigned current_char)
+ {  
+   static unsigned char_count = 0;
+   int this_box; /* Because we might have to subtract when it's zero.  */
+   boolean done[BB_LIST_LENGTH (boxes)];
+ 
+   /* Since we report (a lot) more information when `print_guidelines' is
+      true, we can fit fewer characters per line.  */
+   unsigned nchars_per_line = print_guidelines ? 1 : 11;
+ 
+   unsigned nchars_written = 0;
+   
+   for (this_box = 0; this_box < BB_LIST_LENGTH (boxes); this_box++)
+     done[this_box] = false;
+ 
+   for (this_box = 0; this_box < BB_LIST_LENGTH (boxes); this_box++)
+     {
+       bounding_box_type bb;
+       bitmap_type bitmap;
+       image_char_type c;
+       charcode_type charcode;
+       bb_list_type bb_list = bb_list_init ();
+       
+       /* `done[this_box]' will be set if we get to a bounding box that
+          has already been combined with a previous one, because of
+          an alternating combination.  Since we never go backwards, we
+          don't bother to set `done' for every box we look at.  */
+       if (done[this_box])
+         continue;
+         
+       c = IMAGE_CHAR (image_char_list, current_char++);
+       charcode = IMAGE_CHARCODE (c);
+       
+       REPORT ("[");
+ 
+       /* Only bother to collect the character image if we're going to
+          output it; otherwise, it just wastes a lot of time and space.  */
+       if (OUTPUT_CHAR_P (charcode, c))
+         { /* A character consisting of zero bounding boxes is invisible;
+              e.g., a space.  We don't want to read any of the bitmap for
+              such a thing.  */
+           if (IMAGE_CHAR_BB_COUNT (c) == 0)
+             {
+               BITMAP_HEIGHT (bitmap) = 0;
+               BITMAP_WIDTH (bitmap) = 0;
+               BITMAP_BITS (bitmap) = NULL;
+               bb = (bounding_box_type) { 0, 0, 0, 0 };
+               
+               /* Since we're not eating up any bounding boxes,
+                  reconsider the current one.  */
+               this_box--;
+             }
+           else
+             {
+               bb = BB_LIST_ELT (boxes, this_box);
+               bitmap = extract_subbitmap (image_bitmap, bb);
+               bb_list_append (&bb_list, bb);
+             }
+         }
+ 
+       while (IMAGE_CHAR_BB_COUNT (c)-- > 1)
+         {
+           unsigned combine_box;
+           
+           if (IMAGE_CHAR_BB_ALTERNATING (c))
+             {
+               /* Don't increment `this_box', since it is incremented at
+                  the end of the loop, and the next box is part of
+                  another character.  */
+               combine_box = this_box + 2;
+               /* Don't look at the second box again in the outer loop.  */
+               done[combine_box] = true;
+             }
+           else
+             combine_box = ++this_box;
+ 
+           if (combine_box >= BB_LIST_LENGTH (boxes))
+             {
+               WARNING1 ("imageto: Not enough outlines for char %u",
+                         (unsigned) charcode);
+               break;
+             }
+ 
+           if (OUTPUT_CHAR_P (charcode, c))
+             {
+               /* Get the shape to combine with `bitmap'.  */
+               bounding_box_type next_bb = BB_LIST_ELT (boxes, combine_box);
+               bitmap_type next_bitmap
+                 = extract_subbitmap (image_bitmap, next_bb);
+ 
+               bb_list_append (&bb_list, next_bb);
+ 
+               combine_images (&bitmap, next_bitmap, &bb, next_bb);
+               free_bitmap (&next_bitmap);
+             }
+         }
+       
+       if (OUTPUT_CHAR_P (charcode, c))
+         {
+           gf_char_type gf_char;
+           
+           if (BITMAP_BITS (bitmap) != NULL)
+             clean_bitmap (&bitmap, bb_list);
+ 
+           gf_char = bitmap_to_gf_char (bitmap, h_resolution, bb, c);
+           gf_put_char (gf_char);
+ 
+           /* This and the GF character's bitmap are the same, so we only
+              need to free one of the two.  */
+           if (BITMAP_BITS (bitmap) != NULL)
+             free_bitmap (&bitmap);
+         }
+       else
+         REPORT ("x"); /* We're ignoring this character.  */
+ 
+       REPORT1 ("]%c", ++char_count % nchars_per_line ? ' ' : '\n');
+       nchars_written++;
+       
+       bb_list_free (&bb_list);
+     }
+   
+   return nchars_written;
+ }
+ 
+ /* Remove bits of adjacent characters that may have crept into B because
+    of overlapping characters in the original image.  KNOWN_BOXES lists
+    all the known parts of B; if we find other bounding boxes in B, we
+    remove them.  */
+ 
+ static void
+ clean_bitmap (bitmap_type *b, bb_list_type known_boxes)
+ {
+   unsigned test;
+   bb_list_type test_boxes = find_outline_bbs (*b, false, BITMAP_WIDTH (*b), 0);
+ 
+   if (print_clean_info)
+     REPORT2 ("Cleaning %ux%u bitmap:\n",
+              BITMAP_WIDTH (*b), BITMAP_HEIGHT (*b));
+ 
+   /* Convert KNOWN_BOXES to the same coordinates as `test_boxes'.  */
+   image_to_bitmap_bbs (&known_boxes);
+   
+   for (test = 0; test < BB_LIST_LENGTH (test_boxes); test++)
+     {
+       unsigned known;
+       unsigned known_length = BB_LIST_LENGTH (known_boxes);
+       bounding_box_type test_bb = BB_LIST_ELT (test_boxes, test);
+ 
+       if (print_clean_info)
+         REPORT4 ("  checking (%d,%d)-(%d,%d) ... ",
+                  MIN_COL (test_bb), MIN_ROW (test_bb),
+                  MAX_COL (test_bb), MAX_ROW (test_bb));
+       
+       /* If we want to keep `test_bb', it will be one of the elements of
+          BB_LIST.  Otherwise, it is a piece of an adjacent character,
+          and we should erase it.  */
+       for (known = 0; known < known_length && !bb_equal_p (test_bb,
+                                              BB_LIST_ELT (known_boxes, known));
+            known++)
+         ;
+       
+       if (known == known_length)
+         {
+           unsigned r;
+           int test_bb_width = BB_WIDTH (test_bb);
+           
+           assert (test_bb_width > 0);
+           
+           if (print_clean_info)
+             REPORT ("clearing.\n");
+ 
+           for (r = MIN_ROW (test_bb); r <= MAX_ROW (test_bb); r++)
+             {
+               one_byte *row = BITMAP_ROW (*b, r);
+               memset (row + MIN_COL (test_bb), 0, test_bb_width);
+             }
+         }
+       else if (print_clean_info)
+         REPORT ("keeping.\n");
+     }
+ }
+ 
+ 
+ /* Translate the elements of BOXES to the origin, i.e., shift each down
+    by the minimum row and column.  We use this in `clean_bitmap' to
+    change bounding boxes in the coordinates of the entire image to the
+    coordinates of the single character we are cleaning.  */
+ 
+ static void
+ image_to_bitmap_bbs (bb_list_type *boxes)
+ {
+   unsigned b;
+   unsigned min_col = UINT_MAX;
+   unsigned min_row = UINT_MAX;
+   
+   /* First find the minimum row and column of all the bb's in BOXES.  */
+   for (b = 0; b < BB_LIST_LENGTH (*boxes); b++)
+     {
+       bounding_box_type bb = BB_LIST_ELT (*boxes, b);
+       
+       assert (MIN_COL (bb) >= 0 && MIN_ROW (bb) >= 0);
+       
+       MIN_EQUALS (min_col, MIN_COL (bb));
+       MIN_EQUALS (min_row, MIN_ROW (bb));
+     }
+ 
+   /* Now translate all the bb's by those minimums.  */
+   for (b = 0; b < BB_LIST_LENGTH (*boxes); b++)
+     {
+       bounding_box_type *bb = &BB_LIST_ELT (*boxes, b);
+       
+       MIN_COL (*bb) -= min_col;
+       MAX_COL (*bb) -= min_col;
+       MIN_ROW (*bb) -= min_row;
+       MAX_ROW (*bb) -= min_row;
+     }
+ }
+ 
+ /* Derive the information necessary to output the font character from
+    the bitmap B, and return it.  The resolution of the bitmap is given
+    in pixels per inch as H_RESOLUTION.  The bounding box BB encloses the
+    character in the image coordinates.  We use BB and the static
+    variables `row_baseline' and `row_height' to determine the
+    positioning of the GF character.  */
+ 
+ #define BB_TO_CARTESIAN(x) 						\
+   (row_height - 1 - (x) - row_baseline 					\
+    - IMAGE_CHAR_BASELINE_ADJUST (image_char))
+ 
+ static gf_char_type
+ bitmap_to_gf_char (bitmap_type b, real h_resolution,
+                    bounding_box_type bb, image_char_type image_char)
+ {
+   gf_char_type gf_char;
+   real width_in_points;
+   bounding_box_type cartesian_bb;  
+   charcode_type charcode = IMAGE_CHARCODE (image_char);
+   
+   MIN_ROW (cartesian_bb) = BB_TO_CARTESIAN (MAX_ROW (bb));
+   MAX_ROW (cartesian_bb) = BB_TO_CARTESIAN (MIN_ROW (bb));
+   
+   REPORT1 ("%u", charcode);
+   
+   GF_CHARCODE (gf_char) = charcode;
+   GF_BITMAP (gf_char) = b;
+   GF_CHAR_MIN_COL (gf_char) = IMAGE_CHAR_LSB (image_char);
+   GF_CHAR_MAX_COL (gf_char) = GF_CHAR_MIN_COL (gf_char) + BITMAP_WIDTH (b);
+   GF_CHAR_MIN_ROW (gf_char) = MIN_ROW (cartesian_bb);
+   GF_CHAR_MAX_ROW (gf_char) = MAX_ROW (cartesian_bb);
+ 
+   GF_H_ESCAPEMENT (gf_char) = (GF_CHAR_MAX_COL (gf_char)
+                                + IMAGE_CHAR_RSB (image_char));
+ 
+   width_in_points = GF_H_ESCAPEMENT (gf_char) * POINTS_PER_INCH / h_resolution;
+   GF_TFM_WIDTH (gf_char) = real_to_fix (width_in_points / design_size);
+ 
+   if (print_guidelines)
+     REPORT3 (" (%s) %d/%d",  IMAGE_CHARNAME (image_char),
+ 	     MIN_ROW (cartesian_bb), MAX_ROW (cartesian_bb));
+ 
+   return gf_char;
+ }
diff -Nrc2 fontutils-0.5/imageto/out-chars.h fontutils-0.6/imageto/out-chars.h
*** fontutils-0.5/imageto/out-chars.h
--- fontutils-0.6/imageto/out-chars.h	Sun Oct  4 11:15:39 1992
***************
*** 0 ****
--- 1,34 ----
+ /* out-chars.h: extract the characters from the image.
+ 
+ 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 OUT_CHARS_H
+ #define OUT_CHARS_H
+ 
+ #include "image-header.h"
+ 
+ 
+ /* See out-chars.c.  */
+ extern int *baseline_list;
+ extern boolean print_clean_info, print_guidelines;
+ extern unsigned nchars_wanted;
+ extern int starting_char, ending_char;
+ 
+ 
+ extern void write_image_chars (image_header_type, real design_size);
+ 
+ #endif /* not OUT_CHARS_H */
diff -Nrc2 fontutils-0.5/imageto/out-epsf.c fontutils-0.6/imageto/out-epsf.c
*** fontutils-0.5/imageto/out-epsf.c
--- fontutils-0.6/imageto/out-epsf.c	Fri Oct 16 15:46:50 1992
***************
*** 0 ****
--- 1,170 ----
+ /* out-epsf.c: output the whole image as an EPS 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.  */
+ 
+ #include "config.h"
+ 
+ #include "hexify.h"
+ #include "report.h"
+ 
+ #include "main.h"
+ #include "out-epsf.h"
+ 
+ extern string version_string;
+ 
+ static void pack_scanline (one_byte *, unsigned);
+ 
+ /* Convert a number in pixels to big points, which are Adobe's units.
+    (72 big points to the inch.)  */
+ #define PIXELS_TO_BP(v, dpi) (72 * (v) / (dpi))
+ 
+ /* Abbreviations for output to `eps_file'.  */
+ #define OUT_STRING(s) fprintf (eps_file, "%s", s)
+ #define OUT_SIMPLE(s) fprintf (eps_file, "%%%%%s\n", s)
+ #define OUT_COMMENT(s, v) fprintf (eps_file, "%%%%%s: %s\n", s, v)
+ #define OUT1(s, v1) fprintf (eps_file, s, v1)
+ #define OUT2(s, v1, v2) fprintf (eps_file, s, v1, v2)
+ #define OUT3(s, v1, v2, v3) fprintf (eps_file, s, v1, v2, v3)
+ 
+ /* Write an Encapsulated PostScript file corresponding to the image.  */
+ 
+ void
+ write_epsf (string output_name, image_header_type image_header)
+ {
+   /* Just black & white, or do we have grayscale?  */
+   boolean monochrome_p = image_header.depth == 1;
+   
+   /* Just for convenience.  */
+   unsigned width = image_header.width;
+   unsigned height = image_header.height;
+   
+   /* We pack the image tightly if it's monochrome.  */
+   unsigned width_used = monochrome_p ? width / 8 + !!(width % 8) : width;
+ 
+   /* Buffer into which we'll read the image data.  */
+   unsigned scanline_count = 0;
+   one_byte *scanline = xmalloc (width);
+   
+   /* Open the output file OUTPUT_NAME.  */
+   FILE *eps_file = xfopen (output_name, "w");
+ 
+   OUT_STRING ("%!PS-Adobe-3.0 EPSF-3.0\n");
+   OUT2 ("%%%%BoundingBox: 0 0 %u %u\n", width, height);
+   OUT_COMMENT ("Creator", version_string);
+   OUT_COMMENT ("Title", output_name);
+   OUT_COMMENT ("CreationDate", now ());
+   OUT_COMMENT ("DocumentData", "Clean7Bit");
+   OUT_SIMPLE ("EndComments");
+   
+   /* We map the image to the unit square for image(mask) and scale the
+      coordinate system to get back to the original size.  I can't grasp
+      how to use the matrix argument to image(mask) to avoid the scaling,
+      but I'm sure it's possible. */
+   OUT2 ("gsave\n  %u %u scale\n", width, height);
+   
+   /* We need a buffer to hold the string chunks as we read them.  It
+      can't be of arbitrary size: it must be an exact multiple of the
+      total number of data characters.  Otherwise, we will read past the
+      end of the data.  */
+   OUT1 ("/image-buffer %u string def\n", width_used);
+   
+   /* If we are monochrome, we use the `imagemask' operator; else `image'.  */
+   OUT2 ("  %u %u", width, height);
+ 
+   if (monochrome_p)
+     OUT_STRING (" true"); /* The `invert' argument.  */
+   else
+     OUT1 (" %u", image_header.depth); /* bits/sample */
+   
+   OUT3 (" [%u 0 0 -%u 0 %u]\n", width, height, height);
+   OUT_STRING ("{currentfile image-buffer readhexstring pop}\n");
+   OUT1 ("%s\n", monochrome_p ? "imagemask" : "image");
+   
+   /* Read the image.  */
+   while ((*image_get_scanline) (scanline))
+     {
+       string h;
+       unsigned loc;
+ 
+       scanline_count++;
+       if (scanline_count % 10 == 0)
+         REPORT1 (".%s", scanline_count % 790 == 0 ? "\n" : "");
+       
+       /* Monochrome images are output with eight samples/byte; grayscale
+          images are output with one sample/byte.  */
+       if (monochrome_p)
+         pack_scanline (scanline, width);
+ 
+       /* Convert binary to ASCII hexadecimal.  */
+       h = hexify (scanline, width_used);
+ 
+       /* Adobe says lines in EPS files should be no more than 255
+          characters.  How silly.  */
+       for (loc = 1; loc <= 2 * width_used; loc++)
+         {
+           putc (h[loc - 1], eps_file);
+           if (loc % 255 == 0)
+             putc ('\n', eps_file);
+ 	}
+       
+       free (h);
+       putc ('\n', eps_file);
+     }
+   
+   /* Restore the ctm.  */
+   OUT_STRING ("grestore\n");
+ 
+   if (scanline_count != image_header.height)
+     WARNING2 ("Expected %u scanlines, read %u", image_header.height,
+               scanline_count); 
+   
+   OUT_SIMPLE ("TRAILER");
+   OUT_SIMPLE ("EOF");
+ }
+ 
+ /* Change the one bit/byte representation (call each byte a `cell') of
+    LENGTH bits in DATA to be eight bits/byte.  Pad the last byte with
+    zero.  We don't change those bytes beyond the end of packed portion,
+    thus assuming they are not looked at.  */
+ 
+ static void
+ pack_scanline (one_byte *data, unsigned length)
+ {
+   unsigned cell; /* Which bit in the original data we're on.  */
+   unsigned packing_loc = 0; /* Which byte we're currently packing.  */
+   unsigned packing_bit = 8; /* How much to shift.  */
+   
+   /* The very first cell has to be treated specially, because we must
+      initialize it with itself shifted left (if we're going to use data
+      in place, that is.)  */
+   data[0] <<= 7;
+   
+   for (cell = 0; cell < length; cell++)
+     {
+       packing_bit--;
+       data[packing_loc] |= data[cell] << packing_bit;
+       if (packing_bit == 0)
+         {
+           packing_bit = 8;
+           packing_loc++;
+           
+           /* After the first byte, we can just clear the byte at
+              `packing_loc', since `cell' has already moved beyond it.  */
+           data[packing_loc] = 0;
+ 	}
+     }
+ }
diff -Nrc2 fontutils-0.5/imageto/out-epsf.h fontutils-0.6/imageto/out-epsf.h
*** fontutils-0.5/imageto/out-epsf.h
--- fontutils-0.6/imageto/out-epsf.h	Fri Oct  2 16:26:23 1992
***************
*** 0 ****
--- 1,28 ----
+ /* out-epsf.h: output the whole image as an EPS 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 OUT_EPSF_H
+ #define OUT_EPSF_H
+ 
+ #include "image-header.h"
+ 
+ 
+ /* Output an EPS file for the image with header H to OUTPUT_NAME.  */
+ extern void write_epsf (string output_name, image_header_type h);
+ 
+ #endif /* not OUT_EPSF_H */
diff -Nrc2 fontutils-0.5/imageto/out-strips.c fontutils-0.6/imageto/out-strips.c
*** fontutils-0.5/imageto/out-strips.c
--- fontutils-0.6/imageto/out-strips.c	Fri Oct  2 17:08:42 1992
***************
*** 0 ****
--- 1,94 ----
+ /* out-strips.c: cut the entire image into strips.
+ 
+ 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.  */
+ 
+ #include "config.h"
+ 
+ #include "gf.h"
+ #include "report.h"
+ 
+ #include "main.h"
+ #include "out-strips.h"
+ 
+ /* Output a ``font'' in which each ``character'' is a constant number of
+    scanlines from the image.  This might use less than resources than
+    the giant PostScript file that -epsf outputs.
+    
+    We only output the GF characters here; we assume the postamble and
+    preamble are written by the caller.  */
+ 
+ void
+ write_chars_as_strips (image_header_type image_header, real design_size)
+ {
+   dimensions_type char_dimens;
+   gf_char_type gf_char;
+   unsigned gf_row;
+   unsigned lines_per_char;
+   one_byte *scanline;
+   real width_in_points;
+   boolean first_char = true;
+   unsigned scanline_count = 0;
+ 
+   /* Set up for the first character.  We divide the image into 256 parts,
+      each of which will turn into one ``character''.  */
+   lines_per_char = image_header.height / 256 + 1;
+   GF_CHARCODE (gf_char) = 0;
+   DIMENSIONS_WIDTH (char_dimens) = image_header.width;
+   DIMENSIONS_HEIGHT (char_dimens) = lines_per_char;
+   GF_BITMAP (gf_char) = new_bitmap (char_dimens);
+   GF_CHAR_MIN_COL (gf_char) = GF_CHAR_MIN_ROW (gf_char) = 0;
+   GF_CHAR_MAX_COL (gf_char) = DIMENSIONS_WIDTH (char_dimens);
+   GF_CHAR_MAX_ROW (gf_char) = DIMENSIONS_HEIGHT (char_dimens) - 1;
+   
+   /* We aren't going to have any side bearings.  */
+   GF_H_ESCAPEMENT (gf_char) = DIMENSIONS_WIDTH (char_dimens);
+   width_in_points = DIMENSIONS_WIDTH (char_dimens) * POINTS_PER_INCH
+                     / (real) image_header.hres;
+   GF_TFM_WIDTH (gf_char) = real_to_fix (width_in_points / design_size);
+   
+   
+   /* Read the image.  */
+   while (true)
+     {
+       if (scanline_count % lines_per_char == 0)
+         {
+           /* We get here when scanline_count == 0, and we haven't read
+              anything, so we can't write anything.  */
+           if (!first_char)
+             {
+               gf_put_char (gf_char);
+               REPORT2 ("[%u]%c", GF_CHARCODE (gf_char),
+                                 (GF_CHARCODE (gf_char) + 1) % 13 ? ' ' : '\n');
+               GF_CHARCODE (gf_char)++;
+             }
+           else
+             first_char = false;
+           gf_row = 0;
+         }
+ 
+       scanline = BITMAP_BITS (GF_BITMAP (gf_char))
+                  + gf_row * DIMENSIONS_WIDTH (char_dimens); 
+       if (!(*image_get_scanline) (scanline)) break;
+ 
+       scanline_count++;
+       gf_row++;
+     }
+   
+   if (scanline_count != image_header.height)
+     WARNING2 ("Expected %u scanlines, read %u", image_header.height,
+               scanline_count); 
+ }
diff -Nrc2 fontutils-0.5/imageto/out-strips.h fontutils-0.6/imageto/out-strips.h
*** fontutils-0.5/imageto/out-strips.h
--- fontutils-0.6/imageto/out-strips.h	Fri Oct  2 17:08:42 1992
***************
*** 0 ****
--- 1,27 ----
+ /* out-strips.h: cut the image into strips.
+ 
+ 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 OUT_STRIPS_H
+ #define OUT_STRIPS_H
+ 
+ #include "image-header.h"
+ 
+ 
+ extern void write_chars_as_strips (image_header_type, real design_size);
+ 
+ #endif /* not OUT_STRIPS_H */
diff -Nrc2 fontutils-0.5/imageto/version.c fontutils-0.6/imageto/version.c
*** fontutils-0.5/imageto/version.c	Thu Sep  3 09:46:20 1992
--- fontutils-0.6/imageto/version.c	Tue Oct 27 13:27:59 1992
***************
*** 1 ****
! char *version_string = "imageto version 0.5";
--- 1 ----
! char *version_string = "imageto version 0.6";
diff -Nrc2 fontutils-0.5/imgrotate/.gdbinit fontutils-0.6/imgrotate/.gdbinit
*** fontutils-0.5/imgrotate/.gdbinit	Fri Aug 14 12:07:45 1992
--- fontutils-0.6/imgrotate/.gdbinit	Fri Oct  2 14:23:30 1992
***************
*** 16,19 ****
  #set args -verbose -flip  -output-file ../ourfonts/garamond/img/tsch.img \
  #  ../ourfonts/garamond/img/180/tsch
! set args -verbose -flip -output-file ../ourfonts/garamond/r/percent/rperc.img \
!   ../ourfonts/garamond/r/percent/perc
--- 16,24 ----
  #set args -verbose -flip  -output-file ../ourfonts/garamond/img/tsch.img \
  #  ../ourfonts/garamond/img/180/tsch
! #set args -verbose -flip -output-file ../ourfonts/garamond/r/percent/rperc.img \
! #  ../ourfonts/garamond/r/percent/perc
! #set args -verbose -rotate $ourfonts/bodoni/gbdb.gmi
! #set args -verbose -flip -output-file ../ourfonts/garamond/r/section/sect.gmi \
! #  ../ourfonts/garamond/r/section/sect
! set args -verbose -flip -output-file ../ourfonts/garamond/rq/vswash/vswsh.img \
!   ../ourfonts/garamond/rq/vswash/vswsh
diff -Nrc2 fontutils-0.5/imgrotate/ChangeLog fontutils-0.6/imgrotate/ChangeLog
*** fontutils-0.5/imgrotate/ChangeLog	Thu Sep  3 09:30:58 1992
--- fontutils-0.6/imgrotate/ChangeLog	Tue Oct 27 13:02:50 1992
***************
*** 1,2 ****
--- 1,10 ----
+ Tue Oct 27 13:02:09 1992  Karl Berry  (karl@cs.umb.edu)
+ 
+ 	* Version 0.6.
+ 
+ Fri Oct 16 08:41:36 1992  Karl Berry  (karl@cs.umb.edu)
+ 
+ 	* main.c (USAGE): Doc fix.
+ 
  Thu Sep  3 09:30:58 1992  Karl Berry  (karl@hayley)
  
diff -Nrc2 fontutils-0.5/imgrotate/main.c fontutils-0.6/imgrotate/main.c
*** fontutils-0.5/imgrotate/main.c	Fri Jun  5 09:20:25 1992
--- fontutils-0.6/imgrotate/main.c	Fri Oct 16 09:54:31 1992
***************
*** 266,274 ****
  "flip: rotate the image 180 degrees.
  help: print this message.
! output-file <filename>: write the output to <filename> if <filname> has
!    a suffix, otherwise write to <filename>.img; the default is the input
!    filename, if the input file directory is different from the execution
!    directory, or the input filename prepended with `x', if the
!    directories are the same.
  rotate-clockwise: rotate the image 90 degrees clockwise.
  verbose: output progress reports to stdout.
--- 266,272 ----
  "flip: rotate the image 180 degrees.
  help: print this message.
! output-file <filename>: write the output to <filename>, extended with
!    `.img' if <filename> does not have a suffix.  The default is the input
!    filename, prepended with `x' if that would overwrite the input file.
  rotate-clockwise: rotate the image 90 degrees clockwise.
  verbose: output progress reports to stdout.
diff -Nrc2 fontutils-0.5/imgrotate/version.c fontutils-0.6/imgrotate/version.c
*** fontutils-0.5/imgrotate/version.c	Thu Sep  3 09:46:21 1992
--- fontutils-0.6/imgrotate/version.c	Tue Oct 27 13:28:00 1992
***************
*** 1 ****
! char *version_string = "imgrotate version 0.5";
--- 1 ----
! char *version_string = "imgrotate version 0.6";
diff -Nrc2 fontutils-0.5/include/ChangeLog fontutils-0.6/include/ChangeLog
*** fontutils-0.5/include/ChangeLog	Thu Sep  3 09:31:02 1992
--- fontutils-0.6/include/ChangeLog	Tue Oct 27 13:02:50 1992
***************
*** 1,2 ****
--- 1,55 ----
+ Tue Oct 27 13:02:44 1992  Karl Berry  (karl@cs.umb.edu)
+ 
+ 	* Version 0.6.
+ 
+ Sun Oct 25 06:27:11 1992  Karl Berry  (karl@cs.umb.edu)
+ 
+ 	* getopt.h: New version.
+ 
+ Sat Oct 17 19:36:59 1992  Karl Berry  (karl@cs.umb.edu)
+ 
+ 	* c-memstr.h (bcmp, bcopy, bzero): Only #define if they are not
+ 	already #define'd.
+ 
+ Tue Oct  6 09:04:23 1992  Karl Berry  (karl@cs.umb.edu)
+ 
+ 	* bzr.h (BZR_CHAR_BB, etc.): Remove, as the CHAR_... macros work fine.
+ 
+ 	* tfm.h (TFM_SAFE_FONTDIMEN): Fully parenthesize.
+ 
+ Mon Oct  5 10:06:28 1992  Karl Berry  (karl@cs.umb.edu)
+ 
+ 	* report.h (report_file): New variable.
+         (REPORT*): Use it.
+ 
+ Sun Oct  4 09:03:07 1992  Karl Berry  (karl@cs.umb.edu)
+ 
+ 	* font.h (CHAR_HEIGHT): Just return the max row, don't add one for
+ 	the baseline.  Why did we want to do this?
+ 
+ 	* lib.h: Doc fix.
+ 
+ 	* bb-list.h: New file, taken from bb-outline.h; rename
+ 	`bounding_box_list' to prefix `bb_list'.
+ 
+ Fri Oct  2 17:01:25 1992  Karl Berry  (karl@cs.umb.edu)
+ 
+ 	* report.h (REPORT): Use fputs instead of fprintf.
+ 	* logreport.h (LOG): Likewise.
+ 
+ Tue Sep 15 08:38:19 1992  Karl Berry  (karl@hayley)
+ 
+         * pbmplus.h: include config.h, and remove the old sysv/bsd
+           configuration stuff.
+ 
+ Tue Sep  8 17:05:33 1992  Karl Berry  (karl@hayley)
+ 
+         * c-auto.h.in (_MINIX, _{ALL,POSIX,POSIX_1}_SOURCE): add #undef's
+           for configure to define.
+ 
+ Sun Sep  6 16:54:48 1992  Karl Berry  (karl@hayley)
+ 
+         * global.h (MAX_INT_LENGTH): increase to 21, for 64-bit numbers.
+ 
  Thu Sep  3 09:31:02 1992  Karl Berry  (karl@hayley)
  
diff -Nrc2 fontutils-0.5/include/bb-list.h fontutils-0.6/include/bb-list.h
*** fontutils-0.5/include/bb-list.h
--- fontutils-0.6/include/bb-list.h	Sun Oct  4 09:25:11 1992
***************
*** 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 -Nrc2 fontutils-0.5/include/bb-outline.h fontutils-0.6/include/bb-outline.h
*** fontutils-0.5/include/bb-outline.h	Tue Jun  2 18:07:46 1992
--- fontutils-0.6/include/bb-outline.h	Sun Oct  4 09:25:11 1992
***************
*** 20,23 ****
--- 20,24 ----
  #define BB_OUTLINE_H
  
+ #include "bb-list.h"
  #include "bitmap.h"
  #include "types.h"
***************
*** 24,44 ****
  
  
- /* This is a list of bounding boxes enclosing outlines.  */
- typedef struct
- {
-   bounding_box_type *data;
-   unsigned length;
- } bounding_box_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_l).data[n])
- 
- 
  /* 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
--- 25,28 ----
***************
*** 47,64 ****
     box.  We don't look in any of the columns from LEFT to RIGHT,
     left-inclusive.  */
! extern bounding_box_list_type
    find_outline_bbs (bitmap_type b, boolean all, int left, int right);
- 
- /* Initialize a list.  */
- extern bounding_box_list_type init_bounding_box_list (void);
- 
- /* Move all the elements in L to the right by OFFSET.  */
- extern void offset_bounding_box_list (bounding_box_list_type *l, int offset);
- 
- /* Append the elements in list B2 to B1, changing B1.  */
- extern void append_bounding_box_list (bounding_box_list_type *B1,
-                                       bounding_box_list_type B2);
- /* Free the memory in a list.  */
- extern void free_bounding_box_list (bounding_box_list_type *);
  
  #endif /* not BB_OUTLINE_H */
--- 31,36 ----
     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 -Nrc2 fontutils-0.5/include/bzr.h fontutils-0.6/include/bzr.h
*** fontutils-0.5/include/bzr.h	Mon Aug 31 20:05:12 1992
--- fontutils-0.6/include/bzr.h	Sun Oct 18 17:06:59 1992
***************
*** 1,3 ****
--- 1,5 ----
  /* bzr.h: manipulate Bezier-format font files.  See ../bzr/README
+ 
+ 
     for the precise definition of the file format.
  
***************
*** 81,91 ****
  /* 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_LSB, and CHAR_RSB macros work.  */
! #define BZR_CHAR_BB(c) ((c).bb)
! #define BZR_CHAR_MIN_COL(c) MIN_COL (BZR_CHAR_BB (c))
! #define BZR_CHAR_MAX_COL(c) MAX_COL (BZR_CHAR_BB (c))
! #define BZR_CHAR_MIN_ROW(c) MIN_ROW (BZR_CHAR_BB (c))
! #define BZR_CHAR_MAX_ROW(c) MAX_ROW (BZR_CHAR_BB (c))
! #define BZR_CHAR_BB_WIDTH(c) BB_WIDTH (BZR_CHAR_BB (c))
  
  /* The shape is given as a list of lists of lines and cubic splines.
--- 83,88 ----
  /* 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.
diff -Nrc2 fontutils-0.5/include/c-auto.h.in fontutils-0.6/include/c-auto.h.in
*** fontutils-0.5/include/c-auto.h.in	Thu Apr 23 07:42:23 1992
--- fontutils-0.6/include/c-auto.h.in	Tue Sep  8 17:08:35 1992
***************
*** 1,4 ****
--- 1,10 ----
  /* c-auto.h.in: template for c-auto.h.  */
  
+ /* These are needed on some Unix variants to get POSIX facilities.  */
+ #undef _ALL_SOURCE
+ #undef _MINIX
+ #undef _POSIX_SOURCE
+ #undef _POSIX_1_SOURCE
+ 
  /* Define if your system has <dirent.h>.  */
  #undef DIRENT
diff -Nrc2 fontutils-0.5/include/c-memstr.h fontutils-0.6/include/c-memstr.h
*** fontutils-0.5/include/c-memstr.h	Wed Jul 22 08:50:54 1992
--- fontutils-0.6/include/c-memstr.h	Sat Oct 17 19:37:23 1992
***************
*** 28,34 ****
--- 28,40 ----
  #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
  #include <strings.h>
diff -Nrc2 fontutils-0.5/include/font.h fontutils-0.6/include/font.h
*** fontutils-0.5/include/font.h	Sun Jun 14 15:15:17 1992
--- fontutils-0.6/include/font.h	Sun Oct  4 14:24:59 1992
***************
*** 149,155 ****
  
  
! /* The height of a character is how far it extends above the baseline,
!    including the row of pixels on the baseline.  */
! #define CHAR_HEIGHT(c) (CHAR_MAX_ROW (c) >= 0 ? CHAR_MAX_ROW (c) + 1 : 0)
  
  /* The depth is far it extends below the baseline (but as a positive
--- 149,154 ----
  
  
! /* 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
diff -Nrc2 fontutils-0.5/include/getopt.h fontutils-0.6/include/getopt.h
*** fontutils-0.5/include/getopt.h	Wed Aug 19 14:47:22 1992
--- fontutils-0.6/include/getopt.h	Wed Oct 21 11:43:35 1992
***************
*** 87,99 ****
  /* Names for the values of the `has_arg' field of `struct option'.  */
  
! enum _argtype
! {
!   no_argument,
!   required_argument,
!   optional_argument
! };
  
  #if __STDC__
  extern int getopt (int argc, char *const *argv, const char *shortopts);
  extern int getopt_long (int argc, char *const *argv, const char *shortopts,
  		        const struct option *longopts, int *longind);
--- 87,103 ----
  /* Names for the values of the `has_arg' field of `struct option'.  */
  
! #define	no_argument		0
! #define required_argument	1
! #define optional_argument	2
  
  #if __STDC__
+ #if defined(__GNU_LIBRARY__)
+ /* Many other libraries have conflicting prototypes for getopt, with
+    differences in the consts, in stdlib.h.  To avoid compilation
+    errors, only prototype getopt for the GNU C library.  */
  extern int getopt (int argc, char *const *argv, const char *shortopts);
+ #else /* not __GNU_LIBRARY__ */
+ extern int getopt ();
+ #endif /* not __GNU_LIBRARY__ */
  extern int getopt_long (int argc, char *const *argv, const char *shortopts,
  		        const struct option *longopts, int *longind);
diff -Nrc2 fontutils-0.5/include/global.h fontutils-0.6/include/global.h
*** fontutils-0.5/include/global.h	Fri Jun 26 16:48:54 1992
--- fontutils-0.6/include/global.h	Sun Sep  6 16:59:09 1992
***************
*** 61,67 ****
  /* Define useful abbreviations.  */
  
! /* This is the maximum number of numerals that result when a 32-bit
!    integer is converted to a string, plus one for a trailing null.  */
! #define MAX_INT_LENGTH  11
  
  /* Printer's points, as defined by TeX (and good typesetters everywhere).  */
--- 61,68 ----
  /* Define useful abbreviations.  */
  
! /* This is the maximum number of numerals that result when a 64-bit
!    integer is converted to a string, plus one for a trailing null byte,
!    plus one for a sign.  */
! #define MAX_INT_LENGTH 21
  
  /* Printer's points, as defined by TeX (and good typesetters everywhere).  */
diff -Nrc2 fontutils-0.5/include/lib.h fontutils-0.6/include/lib.h
*** fontutils-0.5/include/lib.h	Wed Apr 29 15:47:05 1992
--- fontutils-0.6/include/lib.h	Sun Oct  4 09:25:12 1992
***************
*** 67,71 ****
  extern address xcalloc P2H(unsigned nelem, unsigned elsize);
  
! /* (Re)Allocate N items of type T using malloc, or fail.  */
  #define XTALLOC(n, t) (t *) xmalloc ((n) * sizeof (t))
  #define XTALLOC1(t) XTALLOC (1, t)
--- 67,71 ----
  extern address xcalloc P2H(unsigned nelem, unsigned elsize);
  
! /* (Re)Allocate N items of type T using xmalloc/xrealloc.  */
  #define XTALLOC(n, t) (t *) xmalloc ((n) * sizeof (t))
  #define XTALLOC1(t) XTALLOC (1, t)
diff -Nrc2 fontutils-0.5/include/logreport.h fontutils-0.6/include/logreport.h
*** fontutils-0.5/include/logreport.h	Mon Jun  1 15:47:29 1992
--- fontutils-0.6/include/logreport.h	Fri Oct  2 17:02:50 1992
***************
*** 35,39 ****
  
  #define LOG(s)								\
!   do { if (logging) fprintf (log_file, s); } while (0)
  #define LOG1(s, e)							\
    do { if (logging) fprintf (log_file, s, e); } while (0)
--- 35,39 ----
  
  #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)
diff -Nrc2 fontutils-0.5/include/pbmplus.h fontutils-0.6/include/pbmplus.h
*** fontutils-0.5/include/pbmplus.h	Sat Mar  7 10:05:36 1992
--- fontutils-0.6/include/pbmplus.h	Tue Sep 15 08:37:54 1992
***************
*** 9,12 ****
--- 9,14 ----
  ** documentation.  This software is provided "as is" without express or
  ** implied warranty.
+ 
+    Configuration options modified for GNU --karl.
  */
  
***************
*** 18,21 ****
--- 20,27 ----
  #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
***************
*** 28,31 ****
--- 34,38 ----
  /* #define MSDOS */
  #endif
+ #endif
  
  /* CONFIGURE: If you want to enable writing "raw" files, set this option.
***************
*** 87,90 ****
--- 94,98 ----
  /* #define DEBUG */
  
+ #if 0 /* karl */
  #ifdef SYSV
  #include <string.h>
***************
*** 99,102 ****
--- 107,111 ----
  #include <strings.h>
  #endif /*SYSV*/
+ #endif /* 0 */
  
  /* CONFIGURE: On some systems, malloc.h doesn't declare these, so we have
diff -Nrc2 fontutils-0.5/include/report.h fontutils-0.6/include/report.h
*** fontutils-0.5/include/report.h	Fri Mar 27 14:55:09 1992
--- fontutils-0.6/include/report.h	Mon Oct  5 10:12:32 1992
***************
*** 24,27 ****
--- 24,30 ----
  
  
+ /* The file we write information to.  */
+ extern FILE *report_file;
+ 
  /* Only print anything if this is true.  */
  extern boolean verbose;
***************
*** 29,50 ****
  
  #define REPORT(s)							\
!   do if (verbose) { fprintf (stderr, s); fflush (stderr); }		\
    while (0)
  
  #define REPORT1(s, e)							\
!   do if (verbose) { fprintf (stderr, s, e); fflush (stderr); }		\
    while (0)
  
  #define REPORT2(s, e1, e2)						\
!   do if (verbose) { fprintf (stderr, s, e1, e2); fflush (stderr); }	\
    while (0)
  
  #define REPORT3(s, e1, e2, e3)						\
!   do if (verbose) { fprintf (stderr, s, e1, e2, e3); fflush (stderr); }	\
    while (0)
  
  #define REPORT4(s, e1, e2, e3, e4)					\
!   do if (verbose) { fprintf (stderr, s, e1, e2, e3, e4);		\
! 		    fflush (stderr); } 					\
    while (0)
  
--- 32,55 ----
  
  #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)
  
diff -Nrc2 fontutils-0.5/include/tfm.h fontutils-0.6/include/tfm.h
*** fontutils-0.5/include/tfm.h	Tue Jul  7 16:43:56 1992
--- fontutils-0.6/include/tfm.h	Tue Oct  6 11:21:16 1992
***************
*** 105,109 ****
  #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
--- 105,109 ----
  #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
diff -Nrc2 fontutils-0.5/lib/ChangeLog fontutils-0.6/lib/ChangeLog
*** fontutils-0.5/lib/ChangeLog	Thu Sep  3 09:31:06 1992
--- fontutils-0.6/lib/ChangeLog	Tue Oct 27 13:02:51 1992
***************
*** 1,2 ****
--- 1,45 ----
+ Tue Oct 27 12:56:15 1992  Karl Berry  (karl@cs.umb.edu)
+ 
+ 	* Version 0.6.
+ 
+ Sun Oct 25 06:26:42 1992  Karl Berry  (karl@cs.umb.edu)
+ 
+ 	* getopt.c: New version.
+ 
+ Thu Oct 22 17:58:12 1992  Karl Berry  (karl@cs.umb.edu)
+ 
+ 	* make-suffix.c: Doc fix.
+ 
+ Tue Oct 20 11:57:57 1992  Karl Berry  (karl@cs.umb.edu)
+ 
+ 	* filename.c (find_{gf,pk,tfm}_filename): Just concatenate the
+ 	suffix onto the main font name, don't replace a suffix.
+ 
+ Mon Oct  5 10:07:59 1992  Karl Berry  (karl@cs.umb.edu)
+ 
+ 	* report.c (report_file): New variable.
+ 
+ Sun Oct  4 09:13:24 1992  Karl Berry  (karl@cs.umb.edu)
+ 
+ 	* bb-list.c: New file, from bb-outline.c.
+         * GNUmakefile (c_only): Add it.
+         * bb-outline.c: Change calls and decls for new improved names.
+ 
+ Sat Oct  3 16:58:38 1992  Karl Berry  (karl@cs.umb.edu)
+ 
+ 	* bb-outline.c: Doc fix.
+ 
+ Tue Sep 22 12:46:49 1992  Karl Berry  (karl@cs.umb.edu)
+ 
+         * malloc.c (realloc): abort if we can't malloc enough memory to do
+           the realloc.
+ 
+         * bitmap.c (bb_ensure_bounds): new routine.
+         (extract_subbitmap): call it.
+ 
+ Mon Sep 21 12:00:35 1992  Karl Berry  (karl@cs.umb.edu)
+ 
+         * malloc.c: define NO_NEW_HANDLER.
+ 
  Thu Sep  3 09:31:06 1992  Karl Berry  (karl@hayley)
  
diff -Nrc2 fontutils-0.5/lib/GNUmakefile fontutils-0.6/lib/GNUmakefile
*** fontutils-0.5/lib/GNUmakefile	Fri Jun 26 16:54:36 1992
--- fontutils-0.6/lib/GNUmakefile	Sun Oct  4 09:25:11 1992
***************
*** 25,31 ****
  # The headers are in the `include' directory, so don't use `c_and_h' for
  # anything.
! c_only = $(malloc) atou basename bb-outline bitmap bounding-box charcode\
! charspec cmdline concat concat3 concat4 concat5 dir-p dlsym edge	\
! encoding extend-fname float-ok fmod file-input file-output file-p	\
  filename find-suffix fix-num font getopt getopt1 hexify integer-ok	\
  libfile line list logreport make-prefix make-suffix math now numtoa	\
--- 25,31 ----
  # The headers are in the `include' directory, so don't use `c_and_h' for
  # anything.
! c_only = $(malloc) atou basename bb-list bb-outline bitmap bounding-box	\
! charcode charspec cmdline concat concat3 concat4 concat5 dir-p dlsym	\
! edge encoding extend-fname float-ok fmod file-input file-output file-p	\
  filename find-suffix fix-num font getopt getopt1 hexify integer-ok	\
  libfile line list logreport make-prefix make-suffix math now numtoa	\
diff -Nrc2 fontutils-0.5/lib/M.depend fontutils-0.6/lib/M.depend
*** fontutils-0.5/lib/M.depend	Wed Sep  2 17:20:08 1992
--- fontutils-0.6/lib/M.depend	Sun Oct 25 14:15:27 1992
***************
*** 8,16 ****
    .././include/c-seek.h .././include/c-proto.h .././include/global.h .././include/lib.h \
    .././include/types.h 
  bb-outline.o : bb-outline.c .././include/config.h .././include/c-auto.h .././include/c-std.h \
    .././include/c-memstr.h .././include/c-errno.h .././include/c-minmax.h .././include/c-limits.h \
    .././include/c-seek.h .././include/c-proto.h .././include/global.h .././include/lib.h \
!   .././include/types.h .././include/bb-outline.h .././include/bitmap.h .././include/bounding-box.h \
!   .././include/edge.h 
  bitmap.o : bitmap.c .././include/config.h .././include/c-auto.h .././include/c-std.h \
    .././include/c-memstr.h .././include/c-errno.h .././include/c-minmax.h .././include/c-limits.h \
--- 8,20 ----
    .././include/c-seek.h .././include/c-proto.h .././include/global.h .././include/lib.h \
    .././include/types.h 
+ bb-list.o : bb-list.c .././include/config.h .././include/c-auto.h .././include/c-std.h \
+   .././include/c-memstr.h .././include/c-errno.h .././include/c-minmax.h .././include/c-limits.h \
+   .././include/c-seek.h .././include/c-proto.h .././include/global.h .././include/lib.h \
+   .././include/types.h .././include/bb-list.h .././include/bounding-box.h 
  bb-outline.o : bb-outline.c .././include/config.h .././include/c-auto.h .././include/c-std.h \
    .././include/c-memstr.h .././include/c-errno.h .././include/c-minmax.h .././include/c-limits.h \
    .././include/c-seek.h .././include/c-proto.h .././include/global.h .././include/lib.h \
!   .././include/types.h .././include/bb-outline.h .././include/bb-list.h .././include/bounding-box.h \
!   .././include/bitmap.h .././include/edge.h 
  bitmap.o : bitmap.c .././include/config.h .././include/c-auto.h .././include/c-std.h \
    .././include/c-memstr.h .././include/c-errno.h .././include/c-minmax.h .././include/c-limits.h \
diff -Nrc2 fontutils-0.5/lib/bb-list.c fontutils-0.6/lib/bb-list.c
*** fontutils-0.5/lib/bb-list.c
--- fontutils-0.6/lib/bb-list.c	Sun Oct  4 09:34:43 1992
***************
*** 0 ****
--- 1,76 ----
+ /* bb-list.c: operations on 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.  */
+ 
+ #include "config.h"
+ 
+ #include "bb-list.h"
+ 
+ 
+ /* This routine returns an initialized empty list.  */
+ 
+ bb_list_type
+ bb_list_init ()
+ {
+   bb_list_type bb_list;
+   
+   BB_LIST_LENGTH (bb_list) = 0;
+   BB_LIST_DATA (bb_list) = NULL;
+   
+   return bb_list;
+ }
+ 
+ /* Append BB to BB_LIST.  */
+ 
+ void
+ bb_list_append (bb_list_type *bb_list, bounding_box_type bb)
+ {
+   BB_LIST_LENGTH (*bb_list)++;
+   XRETALLOC (BB_LIST_DATA (*bb_list), BB_LIST_LENGTH (*bb_list),
+              bounding_box_type);
+ 
+   BB_LIST_ELT (*bb_list, BB_LIST_LENGTH (*bb_list) - 1) = bb;
+ }
+ 
+ /* Append the elements in the list B2 onto the end of B1.  */
+ 
+ void
+ bb_list_splice (bb_list_type *b1, bb_list_type b2)
+ {
+   unsigned new_length;
+   unsigned this_bb;
+ 
+   if (BB_LIST_LENGTH (b2) == 0)
+     return;
+     
+   assert (b1 != NULL);
+   
+   new_length = BB_LIST_LENGTH (*b1) + BB_LIST_LENGTH (b2);
+   XRETALLOC (BB_LIST_DATA (*b1), new_length, bounding_box_type);
+   
+   for (this_bb = 0; this_bb < BB_LIST_LENGTH (b2); this_bb++)
+     BB_LIST_ELT (*b1, BB_LIST_LENGTH (*b1)++) = BB_LIST_ELT (b2, this_bb);
+ }
+ 
+ /* Free the memory in a list.  */
+ 
+ void
+ bb_list_free (bb_list_type *bb_list)
+ {
+   if (BB_LIST_DATA (*bb_list) != NULL)
+     safe_free ((address *) &BB_LIST_DATA (*bb_list));
+ }
diff -Nrc2 fontutils-0.5/lib/bb-outline.c fontutils-0.6/lib/bb-outline.c
*** fontutils-0.5/lib/bb-outline.c	Sun Jun 21 14:42:02 1992
--- fontutils-0.6/lib/bb-outline.c	Sun Oct  4 09:34:43 1992
***************
*** 20,31 ****
  
  #include "bb-outline.h"
- #include "bitmap.h"
- #include "bounding-box.h"
  #include "edge.h"
  
  
! static bounding_box_type find_one_bb (bitmap_type, edge_type,
!                                       unsigned, unsigned, bitmap_type *);
! static void append_bb (bounding_box_list_type *, bounding_box_type);
  
  /* A character is made up of a list of one or more outlines.  Here, we
--- 20,28 ----
  
  #include "bb-outline.h"
  #include "edge.h"
  
  
! static bounding_box_type find_one_bb
!   (bitmap_type, edge_type, unsigned, unsigned, bitmap_type *);
  
  /* A character is made up of a list of one or more outlines.  Here, we
***************
*** 35,43 ****
     the starting place for one outline.  We get the bounding boxes of the
     outlines, and put them in a list to return.  We don't look at pixels
!    that are at or after the column LEFT_MARK and before RIGHT_MARK.  If
     FIND_INNER is false, we return only outside outlines; otherwise, we
     return both inside and outside.  */
  
! bounding_box_list_type
  find_outline_bbs (bitmap_type b, boolean find_inner,
                    int left_mark, int right_mark)
--- 32,40 ----
     the starting place for one outline.  We get the bounding boxes of the
     outlines, and put them in a list to return.  We don't look at pixels
!    that are at or after the column LEFT_MARK or before RIGHT_MARK.  If
     FIND_INNER is false, we return only outside outlines; otherwise, we
     return both inside and outside.  */
  
! bb_list_type
  find_outline_bbs (bitmap_type b, boolean find_inner,
                    int left_mark, int right_mark)
***************
*** 44,48 ****
  {
    unsigned row, col;
!   bounding_box_list_type bb_list = init_bounding_box_list ();
    bitmap_type marked = new_bitmap (BITMAP_DIMENSIONS (b));
  
--- 41,45 ----
  {
    unsigned row, col;
!   bb_list_type bb_list = bb_list_init ();
    bitmap_type marked = new_bitmap (BITMAP_DIMENSIONS (b));
  
***************
*** 70,74 ****
  	      /* If edge != START_EDGE, it's on an inner bounding box.  */
  	      if (find_inner || edge == START_EDGE)
!                 append_bb (&bb_list, bb);
  	    }
          }
--- 67,78 ----
  	      /* If edge != START_EDGE, it's on an inner bounding box.  */
  	      if (find_inner || edge == START_EDGE)
!                 {
!                   /* The numbers in BB as it comes in refer to pixels;
!                      we have to change the maximum row so that it refers
!                      to the edge beyond the last pixel.  */
!                   MAX_COL (bb)++;
! 
!                   bb_list_append (&bb_list, bb);
!                 }
  	    }
          }
***************
*** 77,82 ****
    return bb_list;
  }
! 
! 
  /* Here we find one of a character's outlines.  We're passed the
     position (ORIGINAL_ROW and ORIGINAL_COL) of a starting pixel and one
--- 81,85 ----
    return bb_list;
  }
! 
  /* Here we find one of a character's outlines.  We're passed the
     position (ORIGINAL_ROW and ORIGINAL_COL) of a starting pixel and one
***************
*** 107,189 ****
  
    return bb;
- }
- 
- /* Make all bounding boxes be OFFSET to the right.  */
- 
- void
- offset_bounding_box_list (bounding_box_list_type *bb_list, int offset)
- {
-   unsigned this_bb;
-   
-   for (this_bb = 0; this_bb < BB_LIST_LENGTH (*bb_list); this_bb++)
-     {
-       bounding_box_type *bb = &BB_LIST_ELT (*bb_list, this_bb);
-       MIN_COL (*bb) += offset;
-       MAX_COL (*bb) += offset;
-     }
- }
- 
- 
- /* Append a bounding box to the list.  This is called when we have
-    completed an entire pixel outline.  The numbers in BB as it comes in
-    refer to pixels; we have to change the maximum row so that it refers
-    to the edge beyond the last pixel.  */
- 
- static void
- append_bb (bounding_box_list_type *bb_list, bounding_box_type bb)
- {
-   BB_LIST_LENGTH (*bb_list)++;
-   BB_LIST_DATA (*bb_list)
-     = xrealloc (BB_LIST_DATA (*bb_list),
-                  BB_LIST_LENGTH (*bb_list) * sizeof (bounding_box_type));
-   MAX_COL (bb)++;
-   BB_LIST_ELT (*bb_list, BB_LIST_LENGTH (*bb_list) - 1) = bb;
- }
- 
- 
- /* This routine returns an initialized empty list.  */
- 
- bounding_box_list_type
- init_bounding_box_list ()
- {
-   bounding_box_list_type bb_list;
-   
-   BB_LIST_LENGTH (bb_list) = 0;
-   BB_LIST_DATA (bb_list) = NULL;
-   
-   return bb_list;
- }
- 
- 
- /* Put the elements in the list B2 onto the end of B1.  B2 is not
-    changed.  */
- 
- void
- append_bounding_box_list (bounding_box_list_type *b1,
-                           bounding_box_list_type b2)
- {
-   unsigned new_length;
-   unsigned this_bb;
- 
-   assert (b1 != NULL);
-   
-   if (BB_LIST_LENGTH (b2) == 0)
-     return;
-     
-   new_length = BB_LIST_LENGTH (*b1) + BB_LIST_LENGTH (b2);
-   BB_LIST_DATA (*b1)
-     = xrealloc (BB_LIST_DATA (*b1), new_length * sizeof (bounding_box_type));
-   
-   for (this_bb = 0; this_bb < BB_LIST_LENGTH (b2); this_bb++)
-     BB_LIST_ELT (*b1, BB_LIST_LENGTH (*b1)++) = BB_LIST_ELT (b2, this_bb);
- }
- 
- 
- /* Here is a routine that frees the memory in a bounding box list.  */
- 
- void
- free_bounding_box_list (bounding_box_list_type *bb_list)
- {
-   if (BB_LIST_DATA (*bb_list) != NULL)
-     safe_free ((address *) &BB_LIST_DATA (*bb_list));
  }
--- 110,112 ----
diff -Nrc2 fontutils-0.5/lib/bitmap.c fontutils-0.6/lib/bitmap.c
*** fontutils-0.5/lib/bitmap.c	Sun Jun 21 14:42:02 1992
--- fontutils-0.6/lib/bitmap.c	Tue Sep 22 13:19:17 1992
***************
*** 22,26 ****
  #include "bounding-box.h"
  
! 
  
  /* Make sure the bitmap is entirely white to begin with.  */
--- 22,26 ----
  #include "bounding-box.h"
  
! static void bb_ensure_bounds (bounding_box_type *, bitmap_type, string);
  
  /* Make sure the bitmap is entirely white to begin with.  */
***************
*** 72,78 ****
  
  /* Return the part of the bitmap SOURCE enclosed by the bounding box BB.
!    BB is interpreted in the bitmap's coordinates; for example, if
!    MIN_ROW (BB) == 10, the subimage will start in the tenth row from the
!    top of SOURCE.  */
  
  bitmap_type
--- 72,78 ----
  
  /* Return the part of the bitmap SOURCE enclosed by the bounding box BB.
!    BB is interpreted in bitmap coordinates, with y increasing downwards;
!    for example, if MIN_ROW (BB) == 10, the subimage will start in the
!    tenth row from the top of SOURCE.  */
  
  bitmap_type
***************
*** 80,98 ****
  {
    unsigned this_row;
!   bitmap_type answer = new_bitmap (bb_to_dimensions (bb));
    BITMAP_BITS (source) += MIN_ROW (bb) * BITMAP_WIDTH (source) + MIN_COL (bb);
    
    for (this_row = MIN_ROW (bb); this_row <= MAX_ROW (bb); this_row++)
      {
!       one_byte *answer_row = BITMAP_ROW (answer, this_row - MIN_ROW (bb));
  
!       memcpy (answer_row, BITMAP_BITS (source), BITMAP_WIDTH (answer));
        BITMAP_BITS (source) += BITMAP_WIDTH (source);
      }
  
!   return answer;
  }
  
  
  
  /* The bounding boxes that we make in this routine are unlike the
--- 80,135 ----
  {
    unsigned this_row;
!   bitmap_type sub = new_bitmap (bb_to_dimensions (bb));
!   
!   /* Move to the bit at which we want to start copying.  */
    BITMAP_BITS (source) += MIN_ROW (bb) * BITMAP_WIDTH (source) + MIN_COL (bb);
    
+   bb_ensure_bounds (&bb, source, "extract_subbitmap");
+ 
    for (this_row = MIN_ROW (bb); this_row <= MAX_ROW (bb); this_row++)
      {
!       one_byte *target = BITMAP_ROW (sub, this_row - MIN_ROW (bb));
  
!       memcpy (target, BITMAP_BITS (source), BITMAP_WIDTH (sub));
        BITMAP_BITS (source) += BITMAP_WIDTH (source);
      }
  
!   return sub;
  }
  
  
+ /* If any of the elements of BB (taken to be in bitmap coordinates) are
+    outside the bounds of the bitmap SOURCE, give a warning (using NAME)
+    and update them.  */
+ 
+ static void
+ bb_ensure_bounds (bounding_box_type *bb, bitmap_type source, string name)
+ {
+   if (MIN_COL (*bb) < 0)
+     {
+       WARNING2 ("%s: min col=%d outside source image", name, MIN_COL (*bb));
+       MIN_COL (*bb) = 0;
+     }
+ 
+   if (MIN_ROW (*bb) < 0)
+     {
+       WARNING2 ("%s: min row=%d outside source image", name, MIN_ROW (*bb));
+       MIN_COL (*bb) = 0;
+     }
+ 
+   /* See comments at `get_character_bitmap' in gf_input.c for why the
+      width and height are treated asymetrically.  */
+   if (MAX_COL (*bb) > BITMAP_WIDTH (source))
+     {
+       WARNING2 ("%s: max col=%d outside source image", name, MAX_COL (*bb));
+       MAX_COL (*bb) = BITMAP_WIDTH (source) - 1;
+     }
+ 
+   if (MAX_ROW (*bb) >= BITMAP_HEIGHT (source))
+     {
+       WARNING2 ("%s: max row=%d outside source image", name, MAX_ROW (*bb));
+       MAX_COL (*bb) = BITMAP_HEIGHT (source) - 1;
+     }
+ }
  
  /* The bounding boxes that we make in this routine are unlike the
***************
*** 194,199 ****
    return vector;
  }
- 
- 
  
  /* Print a part of the bitmap in human-readable form.  */
--- 231,234 ----
diff -Nrc2 fontutils-0.5/lib/filename.c fontutils-0.6/lib/filename.c
*** fontutils-0.5/lib/filename.c	Fri Apr 10 16:51:11 1992
--- fontutils-0.6/lib/filename.c	Tue Oct 20 12:00:57 1992
***************
*** 33,39 ****
    static string *dirs = NULL;
    string pk_var, pk_name, name;
!   char suffix[MAX_INT_LENGTH + 3];
  
!   sprintf (suffix, "%dpk", dpi);
  
    pk_var = getenv ("PKFONTS") ? "PKFONTS"
--- 33,39 ----
    static string *dirs = NULL;
    string pk_var, pk_name, name;
!   char suffix[MAX_INT_LENGTH + sizeof ".pk"];
  
!   sprintf (suffix, ".%dpk", dpi);
  
    pk_var = getenv ("PKFONTS") ? "PKFONTS"
***************
*** 43,47 ****
      dirs = initialize_path_list (pk_var, DEFAULT_PK_PATH);
  
!   name = make_suffix (font_name, suffix);
    pk_name = find_path_filename (name, dirs);
  
--- 43,47 ----
      dirs = initialize_path_list (pk_var, DEFAULT_PK_PATH);
  
!   name = concat (font_name, suffix);
    pk_name = find_path_filename (name, dirs);
  
***************
*** 60,66 ****
    static string *dirs = NULL;
    string gf_var, gf_name, name;
!   char suffix[MAX_INT_LENGTH + 3];
  
!   sprintf (suffix, "%dgf", dpi);
  
    gf_var = getenv ("GFFONTS") ? "GFFONTS" : "TEXFONTS";
--- 60,66 ----
    static string *dirs = NULL;
    string gf_var, gf_name, name;
!   char suffix[MAX_INT_LENGTH + sizeof ".pk"];
  
!   sprintf (suffix, ".%dgf", dpi);
  
    gf_var = getenv ("GFFONTS") ? "GFFONTS" : "TEXFONTS";
***************
*** 69,73 ****
      dirs = initialize_path_list (gf_var, DEFAULT_GF_PATH);
  
!   name = make_suffix (font_name, suffix);
    gf_name = find_path_filename (name, dirs);
  
--- 69,73 ----
      dirs = initialize_path_list (gf_var, DEFAULT_GF_PATH);
  
!   name = concat (font_name, suffix);
    gf_name = find_path_filename (name, dirs);
  
***************
*** 90,94 ****
      dirs = initialize_path_list ("TEXFONTS", DEFAULT_TFM_PATH);
  
!   name = make_suffix (font_name, "tfm");
    tfm_name = find_path_filename (name, dirs);
  
--- 90,94 ----
      dirs = initialize_path_list ("TEXFONTS", DEFAULT_TFM_PATH);
  
!   name = concat (font_name, ".tfm");
    tfm_name = find_path_filename (name, dirs);
  
diff -Nrc2 fontutils-0.5/lib/getopt.c fontutils-0.6/lib/getopt.c
*** fontutils-0.5/lib/getopt.c	Wed Aug 26 18:35:59 1992
--- fontutils-0.6/lib/getopt.c	Wed Oct 21 11:43:35 1992
***************
*** 37,44 ****
  #include <stdio.h>
  
- #if defined(USG) || defined(STDC_HEADERS) || defined(__GNU_LIBRARY__)
- #include <string.h>
- #endif
- 
  /* This needs to come after some library #include
     to get __GNU_LIBRARY__ defined.  */
--- 37,40 ----
***************
*** 148,151 ****
--- 144,151 ----
  
  #ifdef	__GNU_LIBRARY__
+ /* We want to avoid inclusion of string.h with non-GNU libraries
+    because there are many ways it can cause trouble.
+    On some systems, it contains special magic macros that don't work
+    in GCC.  */
  #include <string.h>
  #define	my_index	strchr
diff -Nrc2 fontutils-0.5/lib/make-suffix.c fontutils-0.6/lib/make-suffix.c
*** fontutils-0.5/lib/make-suffix.c	Fri Apr 10 16:51:11 1992
--- fontutils-0.6/lib/make-suffix.c	Thu Oct 22 17:58:11 1992
***************
*** 1,3 ****
! /* make-suffix.c: construct a suffix.
  
  Copyright (C) 1992 Free Software Foundation, Inc.
--- 1,3 ----
! /* make-suffix.c: unconditionally change the suffix on a string.
  
  Copyright (C) 1992 Free Software Foundation, Inc.
diff -Nrc2 fontutils-0.5/lib/malloc.c fontutils-0.6/lib/malloc.c
*** fontutils-0.5/lib/malloc.c	Fri May 15 09:03:26 1992
--- fontutils-0.6/lib/malloc.c	Tue Sep 22 16:29:09 1992
***************
*** 749,753 ****
  
  /*  who to call when sbrk returns failure */
! 
  #ifndef NO_NEW_HANDLER
  typedef volatile void (*vfp)();
--- 749,753 ----
  
  /*  who to call when sbrk returns failure */
! #define NO_NEW_HANDLER /* We need nothing fancy --karl */
  #ifndef NO_NEW_HANDLER
  typedef volatile void (*vfp)();
***************
*** 1097,1100 ****
--- 1097,1105 ----
        set_inuse(p);    /* don't let malloc consolidate us yet! */
        newmem = malloc(nb);
+       if (newmem == NULL)
+         {
+           fprintf (stderr, "realloc: malloc of %u bytes failed.\n", nb);
+           abort ();
+         }
        bcopy(mem, newmem, oldsize - SIZE_SZ);
        free(mem);
diff -Nrc2 fontutils-0.5/lib/report.c fontutils-0.6/lib/report.c
*** fontutils-0.5/lib/report.c	Fri Mar 27 14:50:44 1992
--- fontutils-0.6/lib/report.c	Mon Oct  5 10:12:33 1992
***************
*** 22,23 ****
--- 22,27 ----
  /* Says whether to output short progress reports as we run.  (-verbose)  */ 
  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;
diff -Nrc2 fontutils-0.5/limn/.gdbinit fontutils-0.6/limn/.gdbinit
*** fontutils-0.5/limn/.gdbinit	Tue Jul 28 09:50:19 1992
--- fontutils-0.6/limn/.gdbinit	Mon Oct  5 12:26:16 1992
***************
*** 36,40 ****
  #-subdivide-threshold=.1 \
  #-range=\'-\' \
! #-do-display -display-stop \
  #
  #set args -verbose -log chab30 \
--- 36,40 ----
  #-subdivide-threshold=.1 \
  #-range=\'-\' \
! #-do-display  \
  #
  #set args -verbose -log chab30 \
***************
*** 43,65 ****
  #-filter-surround=4 \
  #-range=%-%
! #-do-display -display-stop \
  
! # set args -verbose -do-display -display-stop trap -dpi=72270
  
- #oen36 +corner-surround=15 +tangent-surround=15 \
- # error-threshold=3.0 +filter-iterations=4 +corner-always-threshold=50
  
- # helvR24 +range A-Z +corner-surround=1 +dpi=120 
- 
  # +dpi 1200 +line-threshold 16.0
  # +corner-surround 16 +error-threshold 35.0 +reparameterize-threshold 60.0 \
  
- #set args -verbose -log -dpi=1200 tmi72 \
- 
- #set args -verbose -log cmr10.300 \
- #  -do-display -display-stop\
- #  -range=.-.
- #  -range=\(-,
- 
  # The subdivide parameters make the stem of the t flow more nicely into
  # the tip.
--- 43,54 ----
  #-filter-surround=4 \
  #-range=%-%
! #-do-display  \
  
! # set args -verbose -do-display  trap -dpi=72270
  
  
  # +dpi 1200 +line-threshold 16.0
  # +corner-surround 16 +error-threshold 35.0 +reparameterize-threshold 60.0 \
  
  # The subdivide parameters make the stem of the t flow more nicely into
  # the tip.
***************
*** 80,89 ****
  #  -output-file ggmr26D
  ## -range=a-z \
! ##  -do-display -display-stop \
  ##  -log \
  
- #set args -verbose ligtest
- #set args -verbose cdr10
- 
  # Get Y from ring for sizing.
  #set args -verbose -output-file ../ourfonts/garamond/r/ring/Y-R \
--- 69,75 ----
  #  -output-file ggmr26D
  ## -range=a-z \
! ##  -do-display  \
  ##  -log \
  
  # Get Y from ring for sizing.
  #set args -verbose -output-file ../ourfonts/garamond/r/ring/Y-R \
***************
*** 99,101 ****
    ../ourfonts/garamond/r/ring/ring-r
  
! set args -verbose kgtA.746
--- 85,87 ----
    ../ourfonts/garamond/r/ring/ring-r
  
! set args -verbose -log ggsbi10.1200 -range=37-37
diff -Nrc2 fontutils-0.5/limn/ChangeLog fontutils-0.6/limn/ChangeLog
*** fontutils-0.5/limn/ChangeLog	Thu Sep  3 09:31:10 1992
--- fontutils-0.6/limn/ChangeLog	Tue Oct 27 13:02:50 1992
***************
*** 1,2 ****
--- 1,23 ----
+ Tue Oct 27 13:02:14 1992  Karl Berry  (karl@cs.umb.edu)
+ 
+ 	* Version 0.6.
+ 
+ Sun Oct 25 14:22:34 1992  Karl Berry  (karl@cs.umb.edu)
+ 
+ 	* output-bzr.c (bzr_output_char): No longer have BZR_CHAR_... macros.
+ 
+ Mon Oct  5 11:58:20 1992  Karl Berry  (karl@cs.umb.edu)
+ 
+ 	* curve.c (print_curve): New param `print_t' to say whether to
+ 	print t values.
+         * curve.h: Change decl.
+         * fit.c: Change calls.
+ 
+ 	* xserver.c: Doc fix.
+ 
+ Sun Sep  6 16:46:27 1992  Karl Berry  (karl@hayley)
+ 
+         * display.c (x_output_char): call getchar, not scanf.
+ 
  Thu Sep  3 09:31:10 1992  Karl Berry  (karl@hayley)
  
diff -Nrc2 fontutils-0.5/limn/curve.c fontutils-0.6/limn/curve.c
*** fontutils-0.5/limn/curve.c	Sun Mar 29 19:10:32 1992
--- fontutils-0.6/limn/curve.c	Mon Oct  5 12:25:32 1992
***************
*** 100,105 ****
    /* The t value does not need to be set.  */
  }
- 
- 
  
  /* Show the pixels of the curve online.  */
--- 100,103 ----
***************
*** 124,129 ****
  #define NUM_TO_PRINT 3
  
  void
! log_curve (curve_type curve)
  {
    unsigned this_point;
--- 122,136 ----
  #define NUM_TO_PRINT 3
  
+ #define LOG_CURVE_POINT(c, p, print_t)					\
+   do									\
+     {									\
+       LOG2 ("(%.3f,%.3f)", CURVE_POINT (c, p).x, CURVE_POINT (c, p).y);	\
+       if (print_t)							\
+         LOG1 ("/%.2f", CURVE_T (c, p));					\
+     }									\
+   while (0)
+ 
  void
! log_curve (curve_type curve, boolean print_t)
  {
    unsigned this_point;
***************
*** 145,150 ****
    LOG ("  ");
    
!   /* If the whole curve is short enough, don't print it with ellipses,
!      etc.  */
    if (CURVE_LENGTH (curve) <= NUM_TO_PRINT * 2)
      {
--- 152,156 ----
    LOG ("  ");
    
!   /* If the curve is short enough, don't use ellipses.  */
    if (CURVE_LENGTH (curve) <= NUM_TO_PRINT * 2)
      {
***************
*** 151,157 ****
        for (this_point = 0; this_point < CURVE_LENGTH (curve); this_point++)
          {
!           LOG3 ("(%.3f,%.3f)/%.3f, ", CURVE_POINT (curve, this_point).x,
!                 CURVE_POINT (curve, this_point).y,
!                 CURVE_T (curve, this_point));
            if (this_point != CURVE_LENGTH (curve) - 1
                && (this_point + 1) % NUM_TO_PRINT == 0)
--- 157,163 ----
        for (this_point = 0; this_point < CURVE_LENGTH (curve); this_point++)
          {
!           LOG_CURVE_POINT (curve, this_point, print_t);
!           LOG (" ");
! 
            if (this_point != CURVE_LENGTH (curve) - 1
                && (this_point + 1) % NUM_TO_PRINT == 0)
***************
*** 164,169 ****
             this_point < NUM_TO_PRINT && this_point < CURVE_LENGTH (curve);
             this_point++)
!         LOG3 ("(%.3f,%.3f)/%.3f, ", CURVE_POINT (curve, this_point).x,
!               CURVE_POINT (curve, this_point).y, CURVE_T (curve, this_point));
  
        LOG ("...\n   ...");
--- 170,177 ----
             this_point < NUM_TO_PRINT && this_point < CURVE_LENGTH (curve);
             this_point++)
!         {
!           LOG_CURVE_POINT (curve, this_point, print_t);
!           LOG (" ");
!         }
  
        LOG ("...\n   ...");
***************
*** 172,177 ****
             this_point < CURVE_LENGTH (curve);
             this_point++)
!         LOG3 (", (%.3f,%.3f)/%.2f", CURVE_POINT (curve, this_point).x,
!               CURVE_POINT (curve, this_point).y, CURVE_T (curve, this_point));
      }
  
--- 180,187 ----
             this_point < CURVE_LENGTH (curve);
             this_point++)
!         {
!           LOG (" ");
!           LOG_CURVE_POINT (curve, this_point, print_t);
!         }
      }
  
***************
*** 202,213 ****
  
    LOG (" ");
    for (this_point = 0; this_point < CURVE_LENGTH (curve); this_point++)
!     LOG3 (" (%.3f,%.3f)/%.2f", CURVE_POINT (curve, this_point).x,
! 	  CURVE_POINT (curve, this_point).y, CURVE_T (curve, this_point));
  
    LOG (".\n");
  }
- 
- 
  
  /* Return an initialized but empty curve list.  */
--- 212,224 ----
  
    LOG (" ");
+ 
    for (this_point = 0; this_point < CURVE_LENGTH (curve); this_point++)
!     {
!       LOG (" ");
!       LOG_CURVE_POINT (curve, this_point, true);
!     }
  
    LOG (".\n");
  }
  
  /* Return an initialized but empty curve list.  */
***************
*** 250,255 ****
    curve_list->data[curve_list->length - 1] = curve;
  }
- 
- 
  
  /* Return an initialized but empty curve list array.  */
--- 261,264 ----
diff -Nrc2 fontutils-0.5/limn/curve.h fontutils-0.6/limn/curve.h
*** fontutils-0.5/limn/curve.h	Tue Jul 21 16:09:42 1992
--- fontutils-0.6/limn/curve.h	Mon Oct  5 12:22:03 1992
***************
*** 106,110 ****
  /* Write some or all, respectively, of the curve C in human-readable
     form to the log file, if logging is enabled.  */
! extern void log_curve (curve_type c);
  extern void log_entire_curve (curve_type c);
  
--- 106,110 ----
  /* Write some or all, respectively, of the curve C in human-readable
     form to the log file, if logging is enabled.  */
! extern void log_curve (curve_type c, boolean print_t);
  extern void log_entire_curve (curve_type c);
  
diff -Nrc2 fontutils-0.5/limn/display.c fontutils-0.6/limn/display.c
*** fontutils-0.5/limn/display.c	Mon Jul 27 15:54:04 1992
--- fontutils-0.6/limn/display.c	Sun Sep  6 16:53:02 1992
***************
*** 481,486 ****
    if (!display_continue)
      {
-       char dummy;
-       
        send_event (server_window, foserver_update_pixmap_atom, pixmap);
        XSync (display, False);
--- 481,484 ----
***************
*** 488,492 ****
        if (verbose) putchar ('\n');
        printf ("RET to continue: " );
!       scanf ("%c", &dummy);
      }
  }
--- 486,490 ----
        if (verbose) putchar ('\n');
        printf ("RET to continue: " );
!       (void) getchar ();
      }
  }
diff -Nrc2 fontutils-0.5/limn/fit.c fontutils-0.6/limn/fit.c
*** fontutils-0.5/limn/fit.c	Mon Jul 27 15:54:04 1992
--- fontutils-0.6/limn/fit.c	Mon Oct  5 12:22:03 1992
***************
*** 235,239 ****
    /* We filter all the curves in CURVE_LIST at once; otherwise, we would
       look at an unfiltered curve when computing tangents.  */
!   LOG ("\nFiltering curves (t values may be garbage):\n");
    for (this_curve = 0; this_curve < curve_list.length; this_curve++)
      {
--- 235,239 ----
    /* We filter all the curves in CURVE_LIST at once; otherwise, we would
       look at an unfiltered curve when computing tangents.  */
!   LOG ("\nFiltering curves:\n");
    for (this_curve = 0; this_curve < curve_list.length; this_curve++)
      {
***************
*** 930,934 ****
      }
  
!   log_curve (curve);
    display_curve (curve);
  }
--- 930,934 ----
      }
  
!   log_curve (curve, false);
    display_curve (curve);
  }
***************
*** 1383,1387 ****
      }
    LOG ("  reparameterized curve:\n   ");
!   log_curve (curve);
  
    return true;
--- 1383,1387 ----
      }
    LOG ("  reparameterized curve:\n   ");
!   log_curve (curve, true);
  
    return true;
diff -Nrc2 fontutils-0.5/limn/output-bzr.c fontutils-0.6/limn/output-bzr.c
*** fontutils-0.5/limn/output-bzr.c	Wed Apr 15 15:42:34 1992
--- fontutils-0.6/limn/output-bzr.c	Sun Oct 25 14:22:46 1992
***************
*** 70,77 ****
    CHAR_SET_WIDTH (bzr_char) = PIXELS_TO_POINTS (CHAR_SET_WIDTH (c), dpi_real);
  
!   BZR_CHAR_MIN_COL (bzr_char) = PIXELS_TO_POINTS (CHAR_MIN_COL (c), dpi_real);
!   BZR_CHAR_MAX_COL (bzr_char) = PIXELS_TO_POINTS (CHAR_MAX_COL (c), dpi_real);
!   BZR_CHAR_MIN_ROW (bzr_char) = PIXELS_TO_POINTS (CHAR_MIN_ROW (c), dpi_real);
!   BZR_CHAR_MAX_ROW (bzr_char) = PIXELS_TO_POINTS (CHAR_MAX_ROW (c), dpi_real);
  
    /* We have to change all the values in the spline list to be in
--- 70,77 ----
    CHAR_SET_WIDTH (bzr_char) = PIXELS_TO_POINTS (CHAR_SET_WIDTH (c), dpi_real);
  
!   CHAR_MIN_COL (bzr_char) = PIXELS_TO_POINTS (CHAR_MIN_COL (c), dpi_real);
!   CHAR_MAX_COL (bzr_char) = PIXELS_TO_POINTS (CHAR_MAX_COL (c), dpi_real);
!   CHAR_MIN_ROW (bzr_char) = PIXELS_TO_POINTS (CHAR_MIN_ROW (c), dpi_real);
!   CHAR_MAX_ROW (bzr_char) = PIXELS_TO_POINTS (CHAR_MAX_ROW (c), dpi_real);
  
    /* We have to change all the values in the spline list to be in
diff -Nrc2 fontutils-0.5/limn/version.c fontutils-0.6/limn/version.c
*** fontutils-0.5/limn/version.c	Thu Sep  3 09:46:21 1992
--- fontutils-0.6/limn/version.c	Tue Oct 27 13:28:00 1992
***************
*** 1 ****
! char *version_string = "limn version 0.5";
--- 1 ----
! char *version_string = "limn version 0.6";
diff -Nrc2 fontutils-0.5/limn/xserver.c fontutils-0.6/limn/xserver.c
*** fontutils-0.5/limn/xserver.c	Fri Jun  5 09:20:27 1992
--- fontutils-0.6/limn/xserver.c	Mon Oct  5 12:29:33 1992
***************
*** 26,31 ****
  
  #include "xserver.h"
- 
- 
  
  /* For the resource database.  */
--- 26,29 ----
***************
*** 55,60 ****
    long l[5];
  } message_data_type;
- 
- 
  
  static void dispatch_message (Atom, message_data_type);
--- 53,56 ----
***************
*** 62,67 ****
  static void foserver_update_pixmap (Pixmap);
  static void message_handler (Widget, XEvent *, String *, Cardinal *);
- 
- 
  
  void
--- 58,61 ----
***************
*** 70,74 ****
  {
    unsigned window_size;
!   string identity; /* This will be the contents of the identity_atom */
  #else /* not STANDALONE_SERVER */
  start_server (unsigned window_size, string identity)
--- 64,68 ----
  {
    unsigned window_size;
!   string identity; /* This will be the contents of `identity_atom'.  */
  #else /* not STANDALONE_SERVER */
  start_server (unsigned window_size, string identity)
***************
*** 183,188 ****
      WARNING1 ("foserver: Unknown message `%s'", XGetAtomName (display, a));
  }
! 
! 
  /* Shut down.  */
  
--- 177,181 ----
      WARNING1 ("foserver: Unknown message `%s'", XGetAtomName (display, a));
  }
! 
  /* Shut down.  */
  
diff -Nrc2 fontutils-0.5/pbm/ChangeLog fontutils-0.6/pbm/ChangeLog
*** fontutils-0.5/pbm/ChangeLog	Thu Sep  3 09:31:14 1992
--- fontutils-0.6/pbm/ChangeLog	Tue Oct 27 13:02:51 1992
***************
*** 1,2 ****
--- 1,11 ----
+ Tue Oct 27 12:56:21 1992  Karl Berry  (karl@cs.umb.edu)
+ 
+ 	* Version 0.6.
+ 
+ Tue Sep 15 08:39:17 1992  Karl Berry  (karl@hayley)
+ 
+         * libpbm1.c (malloc, free, exit): don't declare these, rely on
+           config.h.
+ 
  Thu Sep  3 09:31:14 1992  Karl Berry  (karl@hayley)
  
diff -Nrc2 fontutils-0.5/pbm/M.depend fontutils-0.6/pbm/M.depend
*** fontutils-0.5/pbm/M.depend	Wed Sep  2 17:20:10 1992
--- fontutils-0.6/pbm/M.depend	Sun Oct 25 14:15:30 1992
***************
*** 1,3 ****
! libpbm1.o : libpbm1.c .././include/pbm.h .././include/pbmplus.h libpbm.h 
! libpbm2.o : libpbm2.c .././include/pbmplus.h .././include/pbm.h libpbm.h 
! libpbm4.o : libpbm4.c .././include/pbm.h .././include/pbmplus.h libpbm.h 
--- 1,12 ----
! libpbm1.o : libpbm1.c .././include/pbm.h .././include/pbmplus.h .././include/config.h \
!   .././include/c-auto.h .././include/c-std.h .././include/c-memstr.h .././include/c-errno.h \
!   .././include/c-minmax.h .././include/c-limits.h .././include/c-seek.h .././include/c-proto.h \
!   .././include/global.h .././include/lib.h .././include/types.h libpbm.h 
! libpbm2.o : libpbm2.c .././include/pbmplus.h .././include/config.h .././include/c-auto.h \
!   .././include/c-std.h .././include/c-memstr.h .././include/c-errno.h .././include/c-minmax.h \
!   .././include/c-limits.h .././include/c-seek.h .././include/c-proto.h .././include/global.h \
!   .././include/lib.h .././include/types.h .././include/pbm.h libpbm.h 
! libpbm4.o : libpbm4.c .././include/pbm.h .././include/pbmplus.h .././include/config.h \
!   .././include/c-auto.h .././include/c-std.h .././include/c-memstr.h .././include/c-errno.h \
!   .././include/c-minmax.h .././include/c-limits.h .././include/c-seek.h .././include/c-proto.h \
!   .././include/global.h .././include/lib.h .././include/types.h libpbm.h 
diff -Nrc2 fontutils-0.5/pbm/libpbm1.c fontutils-0.6/pbm/libpbm1.c
*** fontutils-0.5/pbm/libpbm1.c	Sat Mar  7 10:02:01 1992
--- fontutils-0.6/pbm/libpbm1.c	Tue Sep 15 08:39:31 1992
***************
*** 10,14 ****
  ** implied warranty.
  **
! ** Minor changes to avoid compiler warnings --karl, 22 July 1991.
  */
  
--- 10,14 ----
  ** implied warranty.
  **
! ** Minor configuration changes for GNU --karl.
  */
  
***************
*** 16,22 ****
--- 16,25 ----
  #include "libpbm.h"
  #include <varargs.h>
+ 
+ #if 0 /* karl */
  extern char *malloc ();
  extern void free ();
  extern void exit ();
+ #endif
  
  /* Variable-sized arrays. */
diff -Nrc2 fontutils-0.5/pbm/pbmascii.c fontutils-0.6/pbm/pbmascii.c
*** fontutils-0.5/pbm/pbmascii.c	Fri Jun  5 09:20:27 1992
--- fontutils-0.6/pbm/pbmascii.c	Fri Oct 23 07:14:42 1992
***************
*** 9,13 ****
    int width, height, format;
    unsigned row;
!   char *image_row;
    
    pbm_readpbminit (stdin, &width, &height, &format);
--- 9,13 ----
    int width, height, format;
    unsigned row;
!   unsigned char *image_row;
    
    pbm_readpbminit (stdin, &width, &height, &format);
***************
*** 33,37 ****
  /*
  Local variables:
! compile-command: "gcc -o pbmascii pbmascii.c pbm.a -lcposix"
  End:
  */
--- 33,37 ----
  /*
  Local variables:
! compile-command: "gcc -g -posix -o pbmascii pbmascii.c pbm.a"
  End:
  */
diff -Nrc2 fontutils-0.5/pk/ChangeLog fontutils-0.6/pk/ChangeLog
*** fontutils-0.5/pk/ChangeLog	Thu Sep  3 09:31:18 1992
--- fontutils-0.6/pk/ChangeLog	Tue Oct 27 13:02:51 1992
***************
*** 1,2 ****
--- 1,6 ----
+ Tue Oct 27 12:56:27 1992  Karl Berry  (karl@cs.umb.edu)
+ 
+ 	* Version 0.6.
+ 
  Thu Sep  3 09:31:18 1992  Karl Berry  (karl@hayley)
  
diff -Nrc2 fontutils-0.5/tfm/ChangeLog fontutils-0.6/tfm/ChangeLog
*** fontutils-0.5/tfm/ChangeLog	Thu Sep  3 09:31:23 1992
--- fontutils-0.6/tfm/ChangeLog	Tue Oct 27 13:02:51 1992
***************
*** 1,2 ****
--- 1,11 ----
+ Tue Oct 27 12:56:39 1992  Karl Berry  (karl@cs.umb.edu)
+ 
+ 	* Version 0.6.
+ 
+ Mon Oct 19 08:11:44 1992  Karl Berry  (karl@cs.umb.edu)
+ 
+ 	* tfm_input.c (tfm_get_chars): Return the newly malloced array,
+ 	not the static variable.
+ 
  Thu Sep  3 09:31:23 1992  Karl Berry  (karl@hayley)
  
diff -Nrc2 fontutils-0.5/tfm/tfm_input.c fontutils-0.6/tfm/tfm_input.c
*** fontutils-0.5/tfm/tfm_input.c	Tue Jul  7 16:45:52 1992
--- fontutils-0.6/tfm/tfm_input.c	Mon Oct 19 08:13:02 1992
***************
*** 305,309 ****
         this_char <= global_info->last_charcode;
         this_char++)
!     /* This fills in the `tfm_chars' global.  */
      (void) tfm_get_char (this_char);
  
--- 305,309 ----
         this_char <= global_info->last_charcode;
         this_char++)
!     /* This fills in the `tfm_char_table' global.  */
      (void) tfm_get_char (this_char);
  
***************
*** 311,319 ****
    tfm_chars = XTALLOC (TFM_SIZE, tfm_char_type);
    memcpy (tfm_chars, tfm_char_table, sizeof (tfm_char_table));
!   return tfm_char_table;
  }
  
  
! /* Read the character CODE.  If the character doesn't exist, return NULL.  */
  
  tfm_char_type *
--- 311,321 ----
    tfm_chars = XTALLOC (TFM_SIZE, tfm_char_type);
    memcpy (tfm_chars, tfm_char_table, sizeof (tfm_char_table));
!   return tfm_chars;
  }
  
  
! /* Read the character CODE.  If the character doesn't exist, return
!    NULL.  If it does, save the information in `tfm_char_table', as well
!    as returning it.  */
  
  tfm_char_type *
diff -Nrc2 fontutils-0.5/widgets/ChangeLog fontutils-0.6/widgets/ChangeLog
*** fontutils-0.5/widgets/ChangeLog	Thu Sep  3 09:31:30 1992
--- fontutils-0.6/widgets/ChangeLog	Tue Oct 27 13:02:51 1992
***************
*** 1,2 ****
--- 1,6 ----
+ Tue Oct 27 12:56:45 1992  Karl Berry  (karl@cs.umb.edu)
+ 
+ 	* Version 0.6.
+ 
  Thu Sep  3 09:31:30 1992  Karl Berry  (karl@hayley)
  
diff -Nrc2 fontutils-0.5/xbfe/ChangeLog fontutils-0.6/xbfe/ChangeLog
*** fontutils-0.5/xbfe/ChangeLog	Thu Sep  3 09:31:33 1992
--- fontutils-0.6/xbfe/ChangeLog	Tue Oct 27 13:02:50 1992
***************
*** 1,2 ****
--- 1,6 ----
+ Tue Oct 27 13:02:23 1992  Karl Berry  (karl@cs.umb.edu)
+ 
+ 	* Version 0.6.
+ 
  Thu Sep  3 09:31:33 1992  Karl Berry  (karl@hayley)
  
diff -Nrc2 fontutils-0.5/xbfe/version.c fontutils-0.6/xbfe/version.c
*** fontutils-0.5/xbfe/version.c	Thu Sep  3 09:46:21 1992
--- fontutils-0.6/xbfe/version.c	Tue Oct 27 13:28:00 1992
***************
*** 1 ****
! char *version_string = "xbfe version 0.5";
--- 1 ----
! char *version_string = "xbfe version 0.6";
