home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / gnu / fontutils-0.5-0.6.diff < prev    next >
Encoding:
Text File  |  1993-03-08  |  519.4 KB  |  15,877 lines

  1. diff -Nrc2 fontutils-0.5/ChangeLog fontutils-0.6/ChangeLog
  2. *** fontutils-0.5/ChangeLog    Thu Sep  3 09:13:13 1992
  3. --- fontutils-0.6/ChangeLog    Wed Oct 28 16:07:53 1992
  4. ***************
  5. *** 1,2 ****
  6. --- 1,67 ----
  7. + Wed Oct 28 15:09:29 1992  Karl Berry  (karl@claude.cs.umb.edu)
  8. +     * Version 0.6.
  9. +     * GNUmakefile.in (install): Install data files with file as second
  10. +     arg, not directory.
  11. + Sun Oct 25 15:29:19 1992  Karl Berry  (karl@cs.umb.edu)
  12. +     * GNUmakefile.in (realclean): Depend on distclean.
  13. +     * GNUmakefile.in (installargs): Passed texinputdir as mfinputdir.
  14. +     * GNUmakefile.in (install): Correct to `emacs_datadir' in the mkdir.
  15. + Thu Oct 15 08:35:21 1992  Karl Berry  (karl@cs.umb.edu)
  16. +     * configure: Ran Autoconf 1.2.
  17. + Mon Oct  5 10:24:15 1992  Karl Berry  (karl@cs.umb.edu)
  18. +     * configure.in: Generate doc/Makefile. (arif@stat.fsu.edu)
  19. +     * GNUmakefile.in (install): Install common.cmi. (ab@meiko.co.uk)
  20. + Sun Oct  4 11:22:45 1992  Karl Berry  (karl@cs.umb.edu)
  21. +     * GNUmakefile.in (examplefiles): Remove; just make links.
  22. +         (dist): Don't copy them.
  23. + Sun Sep 20 12:53:29 1992  Karl Berry  (karl@cs.umb.edu)
  24. +         * GNUmakefile.in (config.status): use sh to run configure --no-create.
  25. +         * GNUmakefile.in (realclean): OK, don't remove configure.
  26. + Mon Sep 14 17:50:54 1992  Karl Berry  (karl@hayley)
  27. +         * GNUmakefile.in (realclean): separate from distclean.
  28. +         (distclean): remove GNUmakefile.
  29. +         (config.status): new target.
  30. +         (GNUmakefile): depend on config.status.
  31. + Sat Sep 12 14:53:31 1992  Karl Berry  (karl@hayley)
  32. +         * GNUmakefile.in (dist): replace remaining occurrences of
  33. +           `fontutils-$(version) with `$(top_distdir)'.
  34. + Thu Sep 10 08:57:02 1992  Karl Berry  (karl@hayley)
  35. +         * GNUmakefile.in (dist): changed where the COPYING* files are kept.
  36. +         * GNUmakefile.in (xincludedir, xlibdir): say that these are
  37. +           options, not just directories.
  38. +         * GNUmakefile.in (realclean): remove configure.
  39. + Tue Sep  8 16:42:04 1992  Karl Berry  (karl@hayley)
  40. +         * configure.in: test for more Unix variants.
  41. + Fri Sep  4 08:39:15 1992  Karl Berry  (karl@hayley)
  42. +         * GNUmakefile.in (extraclean): new target.
  43.   Thu Sep  3 08:54:12 1992  Karl Berry  (karl@hayley)
  44.   
  45. diff -Nrc2 fontutils-0.5/GNUmakefile.in fontutils-0.6/GNUmakefile.in
  46. *** fontutils-0.5/GNUmakefile.in    Thu Sep  3 15:16:41 1992
  47. --- fontutils-0.6/GNUmakefile.in    Wed Oct 28 16:08:03 1992
  48. ***************
  49. *** 18,22 ****
  50.   
  51.   # Version number of this release.
  52. ! version = 0.5
  53.   
  54.   # Installation prefixes.  Since GNU programs and the TeX system may be
  55. --- 18,22 ----
  56.   
  57.   # Version number of this release.
  58. ! version = 0.6
  59.   
  60.   # Installation prefixes.  Since GNU programs and the TeX system may be
  61. ***************
  62. *** 34,41 ****
  63.   emacslispdir = $(emacs_datadir)/elisp # Where to install .el files.
  64.   
  65. ! texmf_datadir = $(texmf_prefix)/lib
  66. ! mfdatadir = $(texmf_datadir)/mf
  67.   mfinputdir = $(mfdatadir)/macros
  68. ! texdatadir = $(texmf_datadir)/tex
  69.   texinputdir = $(texdatadir)/macros
  70.   
  71. --- 34,40 ----
  72.   emacslispdir = $(emacs_datadir)/elisp # Where to install .el files.
  73.   
  74. ! mfdatadir = $(texmf_prefix)/lib/mf
  75.   mfinputdir = $(mfdatadir)/macros
  76. ! texdatadir = $(texmf_prefix)/lib/tex
  77.   texinputdir = $(texdatadir)/macros
  78.   
  79. ***************
  80. *** 58,62 ****
  81.   default_gf_path = $(default_tfm_path)
  82.   
  83. - # Start of system configuration section.
  84.   SHELL = /bin/sh
  85.   srcdir = @srcdir@
  86. --- 57,60 ----
  87. ***************
  88. *** 63,70 ****
  89.   VPATH = @srcdir@
  90.   
  91. ! # Make #include <X11/...> work.
  92.   xincludedir = @xincludedir@
  93.   
  94. ! # Make -lX... work.
  95.   xlibdir = @xlibdir@
  96.   
  97. --- 61,69 ----
  98.   VPATH = @srcdir@
  99.   
  100. ! # Compiler option to make #include <X11/...> work, i.e., should start it
  101. ! # with `-I'.
  102.   xincludedir = @xincludedir@
  103.   
  104. ! # Loader option to make -lX... work, i.e., should start with `-L'.
  105.   xlibdir = @xlibdir@
  106.   
  107. ***************
  108. *** 92,107 ****
  109.   default: all
  110.   
  111. ! .PHONY: all install libraries clean realclean distclean depend dist
  112.   
  113. - include/paths.h: include/paths.h.in GNUmakefile GNUmakefile.in
  114. -     rm -f $@
  115. -     echo "/* Generated from paths.h.in (`date`).  */" > $@
  116. -     sed -e "s,replace-with-lib-path,$(default_lib_path)," \
  117. -             -e "s,replace-with-tfm-path,$(default_tfm_path)," \
  118. -             -e "s,replace-with-pk-path,$(default_pk_path)," \
  119. -             -e "s,replace-with-gf-path,$(default_gf_path)," \
  120. -           $< >> $@
  121.   makeargs = $(MFLAGS) \
  122.     SHELL="$(SHELL)" CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" \
  123. --- 91,96 ----
  124.   default: all
  125.   
  126. ! .PHONY: all install libraries clean distclean extraclean realclean depend dist
  127.   
  128.   makeargs = $(MFLAGS) \
  129.     SHELL="$(SHELL)" CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" \
  130. ***************
  131. *** 109,118 ****
  132.     xlibdir="$(xlibdir)" xincludedir='$(xincludedir)' srcdir=$(srcdir)
  133.   
  134. ! all:    include/paths.h libraries
  135.       for dir in $(programs);                        \
  136.       do                                \
  137. !       (cd $${dir}; $(MAKE) $(makeargs));                \
  138.       done
  139.   
  140.   
  141.   installargs = bindir=$(bindir) \
  142. --- 98,122 ----
  143.     xlibdir="$(xlibdir)" xincludedir='$(xincludedir)' srcdir=$(srcdir)
  144.   
  145. ! all: libraries
  146.       for dir in $(programs);                        \
  147.       do                                \
  148. !       (cd $${dir}; $(MAKE) $(makeargs) all);            \
  149.       done
  150.   
  151. + libraries: include/paths.h
  152. +     for dir in $(libraries);                    \
  153. +     do                                \
  154. +       (cd $${dir}; $(MAKE) $(makeargs));                \
  155. +         done
  156. + include/paths.h: include/paths.h.in GNUmakefile GNUmakefile.in
  157. +     rm -f $@
  158. +     echo "/* Generated from paths.h.in (`date`).  */" > $@
  159. +     sed -e "s,replace-with-lib-path,$(default_lib_path)," \
  160. +             -e "s,replace-with-tfm-path,$(default_tfm_path)," \
  161. +             -e "s,replace-with-pk-path,$(default_pk_path)," \
  162. +             -e "s,replace-with-gf-path,$(default_gf_path)," \
  163. +           $< >> $@
  164.   
  165.   installargs = bindir=$(bindir) \
  166. ***************
  167. *** 129,134 ****
  168.       -mkdir $(prefix) $(exec_prefix) $(bindir) $(datadir) $(infodir) \
  169.         $(fu_datadir) $(emacs_datadir) $(emacslispdir) $(app_defaults) \
  170. -           $(texmf_prefix) $(texmf_datadir) $(mfdatadir) $(mfinputdir) \
  171. -           $(texdatadir) $(texinputdir) \
  172.             >/dev/null 2>&1
  173.       for dir in $(programs) doc;                    \
  174. --- 133,136 ----
  175. ***************
  176. *** 136,149 ****
  177.             (cd $${dir}; $(MAKE) $(installargs) install);            \
  178.           done
  179. !     cd data; for f in *.enc *.map;                    \
  180. !       do $(INSTALL_DATA) $$f $(fu_datadir); done
  181.   
  182.   
  183. ! libraries: 
  184. !     for dir in $(libraries);                    \
  185. !     do                                \
  186. !       (cd $${dir}; $(MAKE) $(makeargs));                \
  187. !         done
  188.   
  189.   
  190.   # Files in the top level directory to be distributed.
  191. --- 138,156 ----
  192.             (cd $${dir}; $(MAKE) $(installargs) install);            \
  193.           done
  194. !     cd data; for f in *.enc *.map common.cmi;            \
  195. !       do $(INSTALL_DATA) $$f $(fu_datadir)/$$f; done
  196.   
  197.   
  198. ! configure: configure.in
  199. !     autoconf
  200. ! config.status: configure
  201. !     sh configure --no-create
  202. ! GNUmakefile: GNUmakefile.in config.status
  203. !     sh config.status
  204.   
  205. + # Prevent GNU make 3 from overflowing arg limit on system V.
  206. + .NOEXPORT:
  207.   
  208.   # Files in the top level directory to be distributed.
  209. ***************
  210. *** 157,163 ****
  211.   versionfiles = gsrenderfont/gsrf.in */version.c
  212.   
  213. - # Files for the example we describe in the manual.
  214. - examplefiles = ggmr.ifi ggmr.1200cmi
  215.   top_distdir = fontutils-$(version)
  216.   
  217. --- 164,167 ----
  218. ***************
  219. *** 171,175 ****
  220.   # Set up the top-level files.
  221.       ln $(topfiles) $(top_distdir)
  222. !     cp -p $(HOME)/gnu/COPYING* $(top_distdir)
  223.       cp -p $(gnu)/lib/aclocal.m4 $(top_distdir)
  224.   #
  225. --- 175,179 ----
  226.   # Set up the top-level files.
  227.       ln $(topfiles) $(top_distdir)
  228. !     cp -p $(HOME)/gnu/gnuorg/COPYING* $(top_distdir)
  229.       cp -p $(gnu)/lib/aclocal.m4 $(top_distdir)
  230.   #
  231. ***************
  232. *** 179,184 ****
  233.       cp -p $(plain)/testfont.tex $(top_distdir)/data
  234.       cp -p $(ktex)/macros/printeps.tex $(top_distdir)/data
  235. -     for f in $(examplefiles); do \
  236. -           ln $(garamond)/atlas/$${f} $(top_distdir)/data; done
  237.       rm -f $(top_distdir)/include/c-auto.h $(top_distdir)/include/paths.h
  238.   #
  239. --- 183,186 ----
  240. ***************
  241. *** 192,206 ****
  242.   #
  243.   # Put on the finishing touches.
  244. !     tar czf fontutils-$(version).tar.Z $(top_distdir)
  245. !     rm -rf fontutils-$(version)
  246. ! # Prevent GNU make 3 from overflowing arg limit on system V.
  247. ! .NOEXPORT:
  248. ! configure: configure.in
  249. !     autoconf
  250. ! GNUmakefile: GNUmakefile.in
  251. !     sh config.status
  252.   
  253.   TAGS:
  254. --- 194,199 ----
  255.   #
  256.   # Put on the finishing touches.
  257. !     tar czf $(top_distdir). $(top_distdir)
  258. !     rm -rf $(top_distdir)
  259.   
  260.   TAGS:
  261. ***************
  262. *** 216,220 ****
  263.       done
  264.   
  265. ! mostlyclean clean realclean distclean::
  266.       for dir in $(alldirs);                        \
  267.       do                                \
  268. --- 209,213 ----
  269.       done
  270.   
  271. ! mostlyclean clean distclean extraclean realclean::
  272.       for dir in $(alldirs);                        \
  273.       do                                \
  274. ***************
  275. *** 222,225 ****
  276.       done
  277.   
  278. ! distclean realclean::
  279. !     rm -f include/c-auto.h include/paths.h config.status Makefile
  280. --- 215,223 ----
  281.       done
  282.   
  283. ! distclean::
  284. !     rm -f include/c-auto.h include/paths.h config.status GNUmakefile
  285. ! realclean:: distclean
  286. ! extraclean:: distclean
  287. !     rm -f *~ *\#*
  288. diff -Nrc2 fontutils-0.5/INSTALL fontutils-0.6/INSTALL
  289. *** fontutils-0.5/INSTALL    Thu Sep  3 09:45:44 1992
  290. --- fontutils-0.6/INSTALL    Tue Oct 27 13:27:20 1992
  291. ***************
  292. *** 19,24 ****
  293.      * Run GNU make.  For example, if it's installed as `make', just type
  294.        `make' in the top-level directory.  If all goes well, this will
  295. !      compile all the programs.  *Note Problems::, for known warnings
  296. !      and other trouble during compilation.
  297.   
  298.      * Install the programs and supporting data files with `make install'.
  299. --- 19,23 ----
  300.      * Run GNU make.  For example, if it's installed as `make', just type
  301.        `make' in the top-level directory.  If all goes well, this will
  302. !      compile all the programs.
  303.   
  304.      * Install the programs and supporting data files with `make install'.
  305. diff -Nrc2 fontutils-0.5/NEWS fontutils-0.6/NEWS
  306. *** fontutils-0.5/NEWS    Wed Sep  2 08:54:04 1992
  307. --- fontutils-0.6/NEWS    Sun Oct 25 14:13:14 1992
  308. ***************
  309. *** 1,5 ****
  310. ! User-visible change log.
  311.   
  312. ! Version 0.5
  313.   
  314.   * Manual written!
  315. --- 1,38 ----
  316. ! Version 0.6 (28 October 1992)
  317.   
  318. ! * Imageto changes:
  319. !   - Automatically removes all pieces of adjacent characters; the
  320. !     `-clean-threshold' kludge is gone.
  321. !   - `-info-filename' option renamed to `-ifi-filename'.
  322. !   - Writes a complete GF font if the image file is incomplete.
  323. !   - No longer crashes on a filename lacking an extension.
  324. ! * BZRto changes:
  325. !   - No longer requires TFM files as input along with the BZR files.
  326. !   - Doesn't guess that the CCC file is the same as the BZR file.
  327. !   - Ligature/kern Metafont output doesn't crash on missing characters.
  328. !   - Metafont output does better at not overflowing MF's memory.
  329. ! * GSrenderfont changes:
  330. !   - Handles invisible characters, such as spaces.
  331. !   - Reads Type 3 PostScript fonts, as well as Type 1.
  332. !   - No longer requires an output encoding; default is same as input.
  333. !   - Reads fonts that aren't known to Ghostscript by default.
  334. ! * Other program changes:
  335. !   - Limn doesn't try to log uninitialized floating-point numbers.
  336. !   - All the programs handle fontnames containing `.' better.
  337. !   - Verbose output usually goes to standard output, instead of standard error.
  338. !   - Minor installation and configuration fixes.
  339. ! * Documentation changes:
  340. !   - The chapter on bug reporting has some further explanation of the
  341. !     purpose of what we ask for, and clarifications.  Please read before
  342. !     submitting bug reports.
  343. !   - The chapter on Imageto has been substantially rewritten.  I hope the
  344. !     difficulties people encountered using that program because of
  345. !     deficiencies in the manual will be cleared up now.
  346. !    
  347. ! Version 0.5 (3 September 1992)
  348.   
  349.   * Manual written!
  350. ***************
  351. *** 18,24 ****
  352.   
  353.   * Imageto uses character names instead of codes, and
  354. !   can write EPSF files.
  355.   
  356. ! Version 0.4 (28 Mar 92)
  357.   
  358.   First public release.
  359. --- 51,57 ----
  360.   
  361.   * Imageto uses character names instead of codes, and
  362. !   can write EPS files.
  363.   
  364. ! Version 0.4 (28 Mar 1992)
  365.   
  366.   First public release.
  367. diff -Nrc2 fontutils-0.5/README fontutils-0.6/README
  368. *** fontutils-0.5/README    Thu Sep  3 14:18:21 1992
  369. --- fontutils-0.6/README    Sat Oct 17 17:02:25 1992
  370. ***************
  371. *** 1,4 ****
  372.   This directory contains the GNU font utilities.  See `ChangeLog' or
  373. ! `GNUmakefile.in' for the version number.
  374.   
  375.   See the Texinfo manual in doc/ for installation and usage information.
  376. --- 1,4 ----
  377.   This directory contains the GNU font utilities.  See `ChangeLog' or
  378. ! `GNUmakefile.in' for the version number.  See `NEWS' for changes by release.
  379.   
  380.   See the Texinfo manual in doc/ for installation and usage information.
  381. diff -Nrc2 fontutils-0.5/aclocal.m4 fontutils-0.6/aclocal.m4
  382. *** fontutils-0.5/aclocal.m4    Thu Aug 20 10:26:46 1992
  383. --- fontutils-0.6/aclocal.m4    Thu Sep 10 09:03:05 1992
  384. ***************
  385. *** 33,36 ****
  386. --- 33,38 ----
  387.     elif test -r /usr/X11/[[include]]/Box.h
  388.     then dir=/usr/X11/[[include]]
  389. +   elif test -r /usr/X11R5/[[include]]/Box.h
  390. +   then dir=/usr/X11R5/[[include]]
  391.     fi
  392.   )
  393. ***************
  394. *** 52,55 ****
  395. --- 54,59 ----
  396.   elif test -r /usr/X11/lib/libXaw.a
  397.   then dir1=/usr/X11/lib
  398. + elif test -r /usr/X11R5/lib/libXaw.a
  399. + then dir1=/usr/X11R5/lib
  400.   fi
  401.   dir2=""
  402. diff -Nrc2 fontutils-0.5/bin/imagestrip fontutils-0.6/bin/imagestrip
  403. *** fontutils-0.5/bin/imagestrip
  404. --- fontutils-0.6/bin/imagestrip    Fri Oct  2 14:02:13 1992
  405. ***************
  406. *** 0 ****
  407. --- 1,25 ----
  408. + #!/bin/sh
  409. + if test $# -ne 1
  410. + then
  411. +   echo "Usage: $0 <img file>[.img]"
  412. +   exit 1
  413. + fi
  414. + input=`basename $1 .img`
  415. + # Show an image via -strips.
  416. + imageto -verbose -strips ${input}.img
  417. + rm -f ${input}sp.tfm
  418. + fontconvert -verbose -tfm ./${input}sp.1200
  419. + gftopk -v ./${input}sp.1200gf
  420. + rm -f ${input}sp.1200gf
  421. + echo ./${input}sp | tex $research/imageto/strips
  422. + mv strips.dvi ${input}sp.dvi
  423. + rm strips.log ${input}sp.pl
  424. + exec xdvi -p 1200 -s 12 ${input}sp
  425. diff -Nrc2 fontutils-0.5/bin/show-gf fontutils-0.6/bin/show-gf
  426. *** fontutils-0.5/bin/show-gf
  427. --- fontutils-0.6/bin/show-gf    Sun Oct  4 15:55:56 1992
  428. ***************
  429. *** 0 ****
  430. --- 1,37 ----
  431. + #!/bin/sh
  432. + # Make a font sample of the given GF file.  Remove any PK file with the
  433. + # same root, to avoid confusion.
  434. + if test $# -ne 1
  435. + then
  436. +   echo "Usage: $0 <GF file>[gf]."
  437. +   exit 1
  438. + fi
  439. + gf_name=`echo $1 | sed 's/gf$//'`gf
  440. + if test ! -r $gf_name
  441. + then
  442. +   echo $gf_name: No such file.
  443. +   exit 1
  444. + fi
  445. + pk_name=`echo $gf_name | sed 's/gf$/pk/'`
  446. + if test -r $pk_name
  447. + then mv -v $pk_name /tmp
  448. + fi
  449. + root=`echo $gf_name | sed 's/\.[0-9]*gf$//'`
  450. + tfm_name=$root.tfm
  451. + if test -r $tfm_name
  452. + then mv -v $tfm_name /tmp
  453. + fi
  454. + fontconvert -tfm $gf_name
  455. + echo $root | tex table
  456. + resolution=`echo $gf_name | sed 's/.*\.\([0-9]*\)gf$/\1/'`
  457. + shrink=`expr $resolution / 100`
  458. + xdvi -p $resolution -s $shrink table
  459. diff -Nrc2 fontutils-0.5/bpltobzr/ChangeLog fontutils-0.6/bpltobzr/ChangeLog
  460. *** fontutils-0.5/bpltobzr/ChangeLog    Thu Sep  3 09:29:23 1992
  461. --- fontutils-0.6/bpltobzr/ChangeLog    Tue Oct 27 13:02:51 1992
  462. ***************
  463. *** 1,2 ****
  464. --- 1,10 ----
  465. + Tue Oct 27 12:56:53 1992  Karl Berry  (karl@cs.umb.edu)
  466. +     * Version 0.6.
  467. + Sun Oct 25 14:23:49 1992  Karl Berry  (karl@cs.umb.edu)
  468. +     * bzr.y (chardef): Use `CHAR_BB' instead of `BZR_CHAR_BB'.
  469.   Thu Sep  3 09:29:08 1992  Karl Berry  (karl@hayley)
  470.   
  471. diff -Nrc2 fontutils-0.5/bpltobzr/bpl.y fontutils-0.6/bpltobzr/bpl.y
  472. *** fontutils-0.5/bpltobzr/bpl.y    Sun Aug 16 21:43:04 1992
  473. --- fontutils-0.6/bpltobzr/bpl.y    Sun Oct 25 14:24:02 1992
  474. ***************
  475. *** 102,106 ****
  476.                 CHARCODE (ch) = $2;
  477.                 CHAR_SET_WIDTH (ch) = $3;
  478. !               BZR_CHAR_BB (ch) = *$4;
  479.                 BZR_SHAPE (ch) = *$5;
  480.                 bzr_put_char (ch);
  481. --- 102,106 ----
  482.                 CHARCODE (ch) = $2;
  483.                 CHAR_SET_WIDTH (ch) = $3;
  484. !               CHAR_BB (ch) = *$4;
  485.                 BZR_SHAPE (ch) = *$5;
  486.                 bzr_put_char (ch);
  487. diff -Nrc2 fontutils-0.5/bpltobzr/version.c fontutils-0.6/bpltobzr/version.c
  488. *** fontutils-0.5/bpltobzr/version.c    Thu Sep  3 09:46:19 1992
  489. --- fontutils-0.6/bpltobzr/version.c    Tue Oct 27 13:27:58 1992
  490. ***************
  491. *** 1 ****
  492. ! char *version_string = "bpltobzr version 0.5";
  493. --- 1 ----
  494. ! char *version_string = "bpltobzr version 0.6";
  495. diff -Nrc2 fontutils-0.5/bzr/ChangeLog fontutils-0.6/bzr/ChangeLog
  496. *** fontutils-0.5/bzr/ChangeLog    Thu Sep  3 09:29:37 1992
  497. --- fontutils-0.6/bzr/ChangeLog    Tue Oct 27 13:02:51 1992
  498. ***************
  499. *** 1,2 ****
  500. --- 1,15 ----
  501. + Tue Oct 27 12:56:04 1992  Karl Berry  (karl@cs.umb.edu)
  502. +     * Version 0.6.
  503. + Sun Oct 18 17:06:39 1992  Karl Berry  (karl@cs.umb.edu)
  504. +     * bzr_{in,out}put.c (BZR_CHAR_{MIN,MAX}_{COL,ROW}): No `BZR_'
  505. +     prefix anymore.
  506. +     * bzr_input.c (bzr_get_next_char): New routine (it was declared in
  507. +     bzr.h, but not defined!).
  508. +         (bzr_get_char): Call it.
  509.   Thu Sep  3 09:29:33 1992  Karl Berry  (karl@hayley)
  510.   
  511. diff -Nrc2 fontutils-0.5/bzr/bzr_input.c fontutils-0.6/bzr/bzr_input.c
  512. *** fontutils-0.5/bzr/bzr_input.c    Fri Aug 14 17:24:36 1992
  513. --- fontutils-0.6/bzr/bzr_input.c    Sun Oct 18 17:08:28 1992
  514. ***************
  515. *** 140,151 ****
  516.   bzr_get_char (charcode_type code)
  517.   {
  518. -   bzr_char_type *c;
  519.     byte_count_type char_ptr;
  520. -   one_byte command;
  521. -   real_coordinate_type current_point;
  522. -   real (*get_num) (void);
  523. -   real_coordinate_type (*get_point) (void);
  524. -   spline_list_type list;
  525. -   boolean no_current_point = true;
  526.     
  527.     assert (bzr_input_file != NULL);
  528. --- 140,144 ----
  529. ***************
  530. *** 161,166 ****
  531. --- 154,181 ----
  532.       return NULL;
  533.       
  534. +   /* Move to the beginning of the character definition.  */
  535.     BZR_FSEEK (char_ptr, SEEK_SET);
  536.     
  537. +   return bzr_get_next_char ();
  538. + }
  539. + /* This returns the character starting at the current position in
  540. +    `bzr_input_file', or NULL if we are at the postamble, or gives a
  541. +    fatal error if we're not at either.  */
  542. + bzr_char_type *
  543. + bzr_get_next_char ()
  544. + {
  545. +   bzr_char_type *c;
  546. +   one_byte command;
  547. +   real_coordinate_type current_point;
  548. +   real (*get_num) (void);
  549. +   real_coordinate_type (*get_point) (void);
  550. +   spline_list_type list;
  551. +   boolean no_current_point = true;
  552. +   assert (bzr_input_file);
  553.     command = BZR_GET_BYTE ();
  554.     if (command == BOC)
  555. ***************
  556. *** 168,195 ****
  557.     else if (command == BOC_ABBREV)
  558.       get_num = bzr_get_abbrev_design_scaled;
  559.     else
  560. !     FATAL1 ("bzr_get_char: Expected BOC, found %u", command);
  561.     
  562. !   c = xmalloc (sizeof (bzr_char_type));
  563.     
  564. !   /* Read the character information that is always present.  */
  565.     CHARCODE (*c) = BZR_GET_BYTE ();
  566.     CHAR_SET_WIDTH (*c) = get_num ();
  567. !   BZR_CHAR_MIN_COL (*c) = get_num ();
  568. !   BZR_CHAR_MIN_ROW (*c) = get_num ();
  569. !   BZR_CHAR_MAX_COL (*c) = get_num ();
  570. !   BZR_CHAR_MAX_ROW (*c) = get_num ();
  571.     
  572. !   if (BZR_CHAR_MIN_COL (*c) > BZR_CHAR_MAX_COL (*c))
  573.       {
  574. !       WARNING2 ("bzr_get_char: Min col %f > max col %f",
  575. !                BZR_CHAR_MIN_COL (*c), BZR_CHAR_MAX_COL (*c));
  576. !       BZR_CHAR_MIN_COL (*c) = BZR_CHAR_MAX_COL (*c);
  577.       }
  578. !   if (BZR_CHAR_MIN_ROW (*c) > BZR_CHAR_MAX_ROW (*c))
  579.       {
  580. !       WARNING2 ("bzr_get_char: Min row %f > max row %f",
  581. !                BZR_CHAR_MIN_ROW (*c), BZR_CHAR_MAX_ROW (*c));
  582. !       BZR_CHAR_MIN_ROW (*c) = BZR_CHAR_MAX_ROW (*c);
  583.       }
  584.     
  585. --- 183,212 ----
  586.     else if (command == BOC_ABBREV)
  587.       get_num = bzr_get_abbrev_design_scaled;
  588. +   else if (command == POST)
  589. +     return NULL;
  590.     else
  591. !     FATAL1 ("bzr_get_next_char: Expected BOC or POST, found %u", command);
  592.     
  593. !   c = XTALLOC1 (bzr_char_type);
  594.     
  595. !   /* Read the beginning-of-character information that is always present.  */
  596.     CHARCODE (*c) = BZR_GET_BYTE ();
  597.     CHAR_SET_WIDTH (*c) = get_num ();
  598. !   CHAR_MIN_COL (*c) = get_num ();
  599. !   CHAR_MIN_ROW (*c) = get_num ();
  600. !   CHAR_MAX_COL (*c) = get_num ();
  601. !   CHAR_MAX_ROW (*c) = get_num ();
  602.     
  603. !   if (CHAR_MIN_COL (*c) > CHAR_MAX_COL (*c))
  604.       {
  605. !       WARNING2 ("bzr_get_next_char: Min col %f > max col %f",
  606. !                CHAR_MIN_COL (*c), CHAR_MAX_COL (*c));
  607. !       CHAR_MIN_COL (*c) = CHAR_MAX_COL (*c);
  608.       }
  609. !   if (CHAR_MIN_ROW (*c) > CHAR_MAX_ROW (*c))
  610.       {
  611. !       WARNING2 ("bzr_get_next_char: Min row %f > max row %f",
  612. !                CHAR_MIN_ROW (*c), CHAR_MAX_ROW (*c));
  613. !       CHAR_MIN_ROW (*c) = CHAR_MAX_ROW (*c);
  614.       }
  615.     
  616. ***************
  617. *** 225,229 ****
  618.               if (no_current_point)
  619.                 {
  620. !                 WARNING ("bzr_get_char: spline given before the path started");
  621.                   current_point = (real_coordinate_type) { 0.0, 0.0 };
  622.                 }
  623. --- 242,246 ----
  624.               if (no_current_point)
  625.                 {
  626. !                 WARNING ("bzr_get_next_char: Spline before path started");
  627.                   current_point = (real_coordinate_type) { 0.0, 0.0 };
  628.                 }
  629. ***************
  630. *** 249,253 ****
  631.               if (no_current_point)
  632.                 {
  633. !                 WARNING ("bzr_get_char: line given before the path started");
  634.                   current_point = (real_coordinate_type) { 0.0, 0.0 };
  635.                 }
  636. --- 266,270 ----
  637.               if (no_current_point)
  638.                 {
  639. !                 WARNING ("bzr_get_next_char: Line before path started");
  640.                   current_point = (real_coordinate_type) { 0.0, 0.0 };
  641.                 }
  642. diff -Nrc2 fontutils-0.5/bzr/bzr_output.c fontutils-0.6/bzr/bzr_output.c
  643. *** fontutils-0.5/bzr/bzr_output.c    Fri Aug 14 17:24:36 1992
  644. --- fontutils-0.6/bzr/bzr_output.c    Sun Oct 18 17:08:57 1992
  645. ***************
  646. *** 174,179 ****
  647.     put_design_scaled
  648.       = (ABBREV_P (CHAR_SET_WIDTH (c))
  649. !        && ABBREV_P (BZR_CHAR_MIN_COL (c)) && ABBREV_P (BZR_CHAR_MIN_ROW (c))
  650. !        && ABBREV_P (BZR_CHAR_MAX_COL (c)) && ABBREV_P (BZR_CHAR_MAX_ROW (c)))
  651.         ? bzr_put_abbrev_design_scaled : bzr_put_design_scaled;
  652.     BZR_PUT_BYTE (put_design_scaled == bzr_put_abbrev_design_scaled
  653. --- 174,179 ----
  654.     put_design_scaled
  655.       = (ABBREV_P (CHAR_SET_WIDTH (c))
  656. !        && ABBREV_P (CHAR_MIN_COL (c)) && ABBREV_P (CHAR_MIN_ROW (c))
  657. !        && ABBREV_P (CHAR_MAX_COL (c)) && ABBREV_P (CHAR_MAX_ROW (c)))
  658.         ? bzr_put_abbrev_design_scaled : bzr_put_design_scaled;
  659.     BZR_PUT_BYTE (put_design_scaled == bzr_put_abbrev_design_scaled
  660. ***************
  661. *** 185,202 ****
  662.        ourselves would require rasterizing the splines, which should not
  663.        be part of this routine.  */
  664. !   put_design_scaled (BZR_CHAR_MIN_COL (c));
  665. !   put_design_scaled (BZR_CHAR_MIN_ROW (c));
  666. !   put_design_scaled (BZR_CHAR_MAX_COL (c));
  667. !   put_design_scaled (BZR_CHAR_MAX_ROW (c));
  668.   
  669.     /* Update the font bounding box.  */
  670. !   if (BZR_CHAR_MIN_COL (c) < MIN_COL (font_bb))
  671. !     MIN_COL (font_bb) = BZR_CHAR_MIN_COL (c);
  672. !   if (BZR_CHAR_MAX_COL (c) > MAX_COL (font_bb))
  673. !     MAX_COL (font_bb) = BZR_CHAR_MAX_COL (c);
  674. !   if (BZR_CHAR_MIN_ROW (c) < MIN_ROW (font_bb))
  675. !     MIN_ROW (font_bb) = BZR_CHAR_MIN_ROW (c);
  676. !   if (BZR_CHAR_MAX_ROW (c) > MAX_ROW (font_bb))
  677. !     MAX_ROW (font_bb) = BZR_CHAR_MAX_ROW (c);
  678.   
  679.     for (this_list = 0; this_list < SPLINE_LIST_ARRAY_LENGTH (shape);
  680. --- 185,202 ----
  681.        ourselves would require rasterizing the splines, which should not
  682.        be part of this routine.  */
  683. !   put_design_scaled (CHAR_MIN_COL (c));
  684. !   put_design_scaled (CHAR_MIN_ROW (c));
  685. !   put_design_scaled (CHAR_MAX_COL (c));
  686. !   put_design_scaled (CHAR_MAX_ROW (c));
  687.   
  688.     /* Update the font bounding box.  */
  689. !   if (CHAR_MIN_COL (c) < MIN_COL (font_bb))
  690. !     MIN_COL (font_bb) = CHAR_MIN_COL (c);
  691. !   if (CHAR_MAX_COL (c) > MAX_COL (font_bb))
  692. !     MAX_COL (font_bb) = CHAR_MAX_COL (c);
  693. !   if (CHAR_MIN_ROW (c) < MIN_ROW (font_bb))
  694. !     MIN_ROW (font_bb) = CHAR_MIN_ROW (c);
  695. !   if (CHAR_MAX_ROW (c) > MAX_ROW (font_bb))
  696. !     MAX_ROW (font_bb) = CHAR_MAX_ROW (c);
  697.   
  698.     for (this_list = 0; this_list < SPLINE_LIST_ARRAY_LENGTH (shape);
  699. diff -Nrc2 fontutils-0.5/bzrto/.gdbinit fontutils-0.6/bzrto/.gdbinit
  700. *** fontutils-0.5/bzrto/.gdbinit    Tue Sep  1 14:29:48 1992
  701. --- fontutils-0.6/bzrto/.gdbinit    Wed Oct 21 06:52:55 1992
  702. ***************
  703. *** 8,37 ****
  704.   end
  705.   
  706. - #set args -ascii -pstype3 bsq > bsq.typ
  707. - #set args -pstype3 ../fit-outlines/ggmr-0
  708. - #set args -metafont ../fonts/ggmr30l
  709. - #set args -verbose -metafont -pstype3 cmr12
  710. - #set args -verbose -text -pstype3 -pstype1 -metafont cmr10 > cmr10.txt
  711. - #set args -verbose -text -pstype3 -pstype1 -metafont test10 > test.txt
  712. - #set args -verbose -metafont -pstype1 -output-file foo.bar cmr10
  713. - #set args -verbose -metafont -pstype3 -output-file foo.bar cmr10
  714. - #set args -verbose -metafont -pstype1 cmr10
  715. - #set args -verbose -text cmr10 > cmr10.txt
  716. - #set args -verbose -metafont -output-file foo.mf cmr10
  717. - #set args -verbose -metafont -pstype1 -output-file ../ourfonts/ggmr26D \
  718. - # ../ourfonts/ggmr26D
  719. - #set args -verbose -metafont kmjC
  720. - #set args -verbose -text -pstype1 -encoding=textext cmr10 > cmr10.bpl
  721. - #set args -verbose -metafont cmr10
  722. - #set args -verbose -metafont ../ourfonts/ggmr26d
  723. - #set args -verbose -metafont -ccc-file empty cmr10
  724. - #set args -verbose -metafont -ccc-file smalltest ../ourfonts/ggmr26D
  725. - #set args -verbose -metafont cmr10
  726. - #set args -verbose -text -range 18-19 cmr10
  727. - #set args -verbose -pstype1 ../ourfonts/ggmr26D
  728. - #set args -verbose -pstype1 -ccc-file smalltest ../ourfonts/ggmr26D
  729. - #set args -verbose -pstype1 -metafont cmr10
  730. - #set args -verbose -pstype1 -metafont -concat cmrN12 -range 77-78 cmrM10
  731.   # Concat ggmr26D with Y-Rb (remapped J->bracketleft; now obsolete), to
  732.   # test sizing.
  733. --- 8,11 ----
  734. ***************
  735. *** 56,59 ****
  736.     ../ourfonts/garamond/r/atlas/orig/ggmr26D
  737.   
  738. ! set args -verbose -encoding=texlatin -ccc=test/aacute.ccc -metafont \
  739. !  test/cmraacu
  740. --- 30,35 ----
  741.     ../ourfonts/garamond/r/atlas/orig/ggmr26D
  742.   
  743. ! set args -verbose -pstype1 -pstype3 -mf $ourfonts/cm/cmr10.bzr \
  744. !   -encoding=texlatin \
  745. !   -ps-font-info FontName:ComputerModern-Roman,UniqueID:75 \
  746. !   -ccc=test/aacute
  747. diff -Nrc2 fontutils-0.5/bzrto/ChangeLog fontutils-0.6/bzrto/ChangeLog
  748. *** fontutils-0.5/bzrto/ChangeLog    Thu Sep  3 07:50:41 1992
  749. --- fontutils-0.6/bzrto/ChangeLog    Tue Oct 27 13:02:51 1992
  750. ***************
  751. *** 1,4 ****
  752. --- 1,204 ----
  753. + Tue Oct 27 12:57:01 1992  Karl Berry  (karl@cs.umb.edu)
  754. +     * Version 0.6.
  755. + Tue Oct 20 16:28:42 1992  Karl Berry  (karl@cs.umb.edu)
  756. +     * GNUmakefile (install): Make second arg a file, not a directory.
  757. + Mon Oct 19 08:14:26 1992  Karl Berry  (karl@cs.umb.edu)
  758. +     * bzrsetup.mf: Doc fix.
  759. +     * metafont.c (metafont_output_bzr_char): Take the subrs as an arg,
  760. +     and output a call if the character was previously output as a
  761. +     subroutine.
  762. +         (metafont_output_ccc_char): Likewise.
  763. +         * pstype1.c (pstype1_output_{bzr,ccc}_char): Likewise.
  764. +     * pstype1.c (subr_number): New static.
  765. +         (output_subr_start): Assign to it; don't bother to test the
  766. +         character name; don't return anything.  (Change callers.)
  767. +         (OUT_CHAR_SUBR): Use it.
  768. +     * pstype3.c (pstype3_output_char): Don't output the character if
  769. +     it is not encoded.
  770. +     * psutil.h (ps_char_output_p): Remove decl.
  771. +         * psutil.c (ps_char_output_p): Remove variable.
  772. +         (ps_output_encoding): Take the array as an option, instead of
  773. +         using a global.
  774. +         * pstype[13].c (char_output_p): New static; change to use this,
  775. +           and pass to `ps_output_encoding'.  (Otherwise, the test for
  776. +           `space' only work for the first output format.)
  777. +     * psutil.c (INIT_CODE): Delete; it's unused now.
  778. +     * psutil.c (out_notdef_loop): If only one character is undefined,
  779. +     don't output a loop.
  780. +     * psutil.c (ps_output_encoding): If the character doesn't exist in
  781. +     the encoding, don't output it.
  782. +     * main.c (output_{bzr,ccc}_{char,subr}): Output all formats
  783. +     requested, not just the first.
  784. +     * psutil.c (ps_output_encoding): Output the codingscheme string as
  785. +     a comment.
  786. +     * pstype1.c (CHARCODE_TO_SUBRS_INDEX, SUBRS_OFFSET): Remove.
  787. +     Change calls.
  788. +     * char.c (update_subrs, subr_chars): Return the number of
  789. +     subrs found.
  790. +         * char.h (subr_chars): Change decl.
  791. +         * pstype1.c (pstype1_start_subrs): New routine.
  792. +         * pstype1.h: Analogous changes.
  793. +         * main.c (count_non_subr_chars): New routine.
  794. +         (main): Call it, and the new PS1 routines.
  795. +     * psutil.c (ps_set_font_info): Assign to the interword space if we
  796. +     have TFM info.
  797. +     * psutil.c (ps_set_font_info): Had test for `strstr' in weight
  798. +     part reversed.
  799. +     * pstype1.c ({PUT,DEF}_END): Rename to READONLY_{PUT,DEF}; change
  800. +     calls.
  801. +     * metafont.c (output_char_title): New routine.
  802. +         (output_subr_start, output_{ccc,bzr}_char): Call it.
  803. +     * main.c (read_bzr_files): Report the filenames as we read them.
  804. +         (main): Report the character codes as we write them.
  805. + Sun Oct 18 15:19:30 1992  Karl Berry  (karl@cs.umb.edu)
  806. +     * char.c: Include ccc.h.
  807. +     * pstype1.c (output_ccc_body): Rewrite -- same as metafont.c now.
  808. +         (OUTPUT_BB_CHAR, UPDATE_*, OUT_MOVE, OUTPUT_MOVE): Delete.
  809. +         (out_move, out_bb_char): New routine.
  810. +     * pstype1.c (output_subr_start): Call `init_charstring_buffers' here.
  811. +         (output_bzr_body): Not here.
  812. + Mon Oct 12 08:27:38 1992  Karl Berry  (karl@cs.umb.edu)
  813. +     * pstype1.c (output_private_dict_1): Take the UniqueID as an arg.
  814. +         (pstype1_start_output): Change call.
  815. +     * metafont.c (output_{bzr,ccc}_{body,subr,char}): New routines
  816. +     rationalizing the old.
  817. +         * metafont.h (output_{bzr,ccc}_{subr,char}): Declare.
  818. +         * main.c (main): Call them.
  819. +         * pstype1.[ch], main.c: Analogous changes.
  820. +     * main.c (output_{bzr,ccc}_subr, read_bzr_file{s,}): New routines.
  821. +         (main): Call them.
  822. +     * char.c (subr_chars, update_subrs): New routine.
  823. +         * char.h (subr_chars): Declare it.
  824. +         (char_type): New type (different from our last `char_type'...).
  825. +         * main.c (main): Call it.
  826. +     * metafont.c (charcode_to_subr_name): Use the character name if
  827. +     it's defined and alphabetic.
  828. + Sun Oct 11 15:24:19 1992  Karl Berry  (karl@cs.umb.edu)
  829. +     * main.c (starting_char, ending_char): Make external.
  830. +         * main.h: Declare them.
  831. +         * metafont.c (output_ligtable): Loop between them.
  832. +         (mf_char_output_p): No longer needed.
  833. +     * pstype[13].c (tfm_space): Rename to `interword_space'.
  834. +     * pstype1.c (OUTPUT_{BB_CHAR,MOVE}): remove semicolon from end of def.
  835. +     * GNUmakefile (c_and_h): Remove `oblique'.
  836. +         * char.[ch]: Merge oblique.[ch] into here.
  837. +     * input-ccc.c (parse_ccc_file): Take the design size as an arg.
  838. +         * input-ccc.h (parse_ccc_file): Change decl.
  839. +         * main.c (main): Change call.
  840. +     * char.h (char_type, get_new_char): Remove decls.
  841. +         (scale_char): Take a bzr_char_type instead of a char_type.
  842. +         * char.c (get_new_char, scale_{bzr,tfm}_char): Remove all these;
  843. +           change scale_char to take a bzr_char.
  844. +         * main.c (output_subroutines, output_char): Just pass the BZR
  845. +           char, don't use the BZR-extracting macros.
  846. +         * {text,metafont,pstype1}.c: Similar changes.
  847. + Tue Oct  6 14:29:18 1992  Karl Berry  (karl@cs.umb.edu)
  848. +     * ccc.y (BZR_TFM_DIMEN): Replace with new macro, DO_CHAR_DIMEN.
  849. +         (unit_of_measure): Use it, using the BZR dimensions instead of the
  850. +         TFM dimensions.
  851. +     * input-ccc.c (get_ccc_fontinfo): Pass the design size and BZR
  852. +     characters, not the char_type array; assign a default x-height at the
  853. +     end if necessary.
  854. +     * metafont.h (metafont_start_output): Pass a pointer as the TFM
  855. +     global info.  (Continuing yesterday's change.)
  856. +         * metafont.c (metafont_start_output): Change definition
  857. +           accordingly -- i.e., we might not have the TFM info.
  858. +     * input-ccc.h (parse_ccc_file): Likewise.
  859. +         * input-ccc.c (parse_ccc_file, get_ccc_fontinfo): And it continues.
  860. + Mon Oct  5 10:12:03 1992  Karl Berry  (karl@cs.umb.edu)
  861. +     * psutil.h (ps_font_info_type): New member `interword_space'.
  862. +         (ps_init): Rename to `ps_set_font_info', and take no args.
  863. +         * psutil.c (ps_init): Change accordingly; read globals set via
  864. +           options instead of passing the info around.
  865. +         (option_value): New fn.
  866. +         * pstype1.c (pstype1_start_output): Don't pass the font names and
  867. +           TFM info; change call to ps_init for new name; use
  868. +           BZR_DESIGN_SIZE instead of TFM_DESIGN_SIZE.
  869. +         * pstype1.h (pstype1_start_output): Change decl.
  870. +         * pstype3.[ch]: Analogous changes.
  871. +         * main.c (main): Change calls.
  872. +         (read_command_line): New option `-ps-font-info' to generalize
  873. +         `-ps-fontname'.
  874. +         (USAGE): Document it.
  875. +     * main.c (output_subroutines, output_char,
  876. +     init_tfm_and_encoding_info): New fns.
  877. +         (main): Call them.
  878. +     * main.c (bzr_name, encoding_*): Make static.
  879. +     * input-ccc.h: Doc fix.
  880. +     * main.c (main): Report 13 chars/line, not 8.
  881. +     * main.c (read_command_line): If -text is given, set `report_file'
  882. +     to stderr.
  883. + Mon Sep 28 11:20:41 1992  Karl Berry  (karl@cs.umb.edu)
  884. +     * bzrsetup.mf (fill_or_unfill): Delete `loggingall', left in by
  885. +     mistake.
  886. + Tue Sep 22 13:08:44 1992  Karl Berry  (karl@cs.umb.edu)
  887. +         * char.h (BCHAR_*): remove unneeded parens.
  888. + Mon Sep 21 17:09:12 1992  Karl Berry  (karl@cs.umb.edu)
  889. +         * metafont.c (NO_CHAR_P): rewrite in opposite sense, rename to
  890. +           HAVE_CHAR_P, and add tests for the characters existing.
  891. +         (output_ligtable): change calls.
  892. +         * main.c (main): remove the suffix from `font_name' to make the
  893. +           default `ccc_name'.
  894.   Thu Sep  3 07:45:36 1992  Karl Berry  (karl@hayley)
  895.   
  896. +         * Version 0.5.
  897.           * metafont.c (metafont_output_ccc_char): fix ) typo.
  898.   
  899. ***************
  900. *** 210,214 ****
  901.             isn't NULL, not its BZR info.
  902.   
  903. !         * psutil.c (NO_PARAM_RET): added
  904.             (psinit): call SAFE_TFM_FONT_PARAMETER instead of TFM_FONT_PARAMETER.
  905.   
  906. --- 410,414 ----
  907.             isn't NULL, not its BZR info.
  908.   
  909. !         * psutil.c (NO_PARAM_RET): added.
  910.             (psinit): call SAFE_TFM_FONT_PARAMETER instead of TFM_FONT_PARAMETER.
  911.   
  912. diff -Nrc2 fontutils-0.5/bzrto/GNUmakefile fontutils-0.6/bzrto/GNUmakefile
  913. *** fontutils-0.5/bzrto/GNUmakefile    Mon Aug 17 08:36:32 1992
  914. --- fontutils-0.6/bzrto/GNUmakefile    Tue Oct 20 16:29:05 1992
  915. ***************
  916. *** 19,23 ****
  917.   program = bzrto
  918.   
  919. ! c_and_h = char input-ccc main metafont oblique pstype1 pstype3 psutil text
  920.   c_only = version
  921.   y = ccc
  922. --- 19,23 ----
  923.   program = bzrto
  924.   
  925. ! c_and_h = char input-ccc main metafont pstype1 pstype3 psutil text
  926.   c_only = version
  927.   y = ccc
  928. ***************
  929. *** 32,37 ****
  930.   
  931.   install::
  932. !     $(INSTALL_DATA) bzredit.el $(emacslispdir)
  933. !     $(INSTALL_DATA) bzrsetup.mf $(mfinputdir)
  934.   
  935.   include M.depend
  936. --- 32,37 ----
  937.   
  938.   install::
  939. !     $(INSTALL_DATA) bzredit.el $(emacslispdir)/bzredit.el
  940. !     $(INSTALL_DATA) bzrsetup.mf $(mfinputdir)/bzrsetup.mf
  941.   
  942.   include M.depend
  943. diff -Nrc2 fontutils-0.5/bzrto/M.depend fontutils-0.6/bzrto/M.depend
  944. *** fontutils-0.5/bzrto/M.depend    Wed Sep  2 17:20:36 1992
  945. --- fontutils-0.6/bzrto/M.depend    Sun Oct 25 14:15:51 1992
  946. ***************
  947. *** 11,15 ****
  948.     .././include/types.h .././include/bzr.h .././include/bounding-box.h .././include/font.h \
  949.     .././include/bitmap.h .././include/tfm.h .././include/fix-num.h .././include/list.h \
  950. !   .././include/spline.h char.h 
  951.   input-ccc.o : input-ccc.c .././include/config.h .././include/c-auto.h .././include/c-std.h \
  952.     .././include/c-memstr.h .././include/c-errno.h .././include/c-minmax.h .././include/c-limits.h \
  953. --- 11,15 ----
  954.     .././include/types.h .././include/bzr.h .././include/bounding-box.h .././include/font.h \
  955.     .././include/bitmap.h .././include/tfm.h .././include/fix-num.h .././include/list.h \
  956. !   .././include/spline.h char.h input-ccc.h ccc.h 
  957.   input-ccc.o : input-ccc.c .././include/config.h .././include/c-auto.h .././include/c-std.h \
  958.     .././include/c-memstr.h .././include/c-errno.h .././include/c-minmax.h .././include/c-limits.h \
  959. ***************
  960. *** 17,21 ****
  961.     .././include/types.h .././include/encoding.h .././include/font.h .././include/bitmap.h \
  962.     .././include/bounding-box.h .././include/tfm.h .././include/fix-num.h .././include/list.h \
  963. !   char.h .././include/bzr.h .././include/spline.h main.h input-ccc.h 
  964.   main.o : main.c .././include/config.h .././include/c-auto.h .././include/c-std.h \
  965.     .././include/c-memstr.h .././include/c-errno.h .././include/c-minmax.h .././include/c-limits.h \
  966. --- 17,21 ----
  967.     .././include/types.h .././include/encoding.h .././include/font.h .././include/bitmap.h \
  968.     .././include/bounding-box.h .././include/tfm.h .././include/fix-num.h .././include/list.h \
  969. !   char.h .././include/bzr.h .././include/spline.h input-ccc.h main.h 
  970.   main.o : main.c .././include/config.h .././include/c-auto.h .././include/c-std.h \
  971.     .././include/c-memstr.h .././include/c-errno.h .././include/c-minmax.h .././include/c-limits.h \
  972. ***************
  973. *** 24,29 ****
  974.     .././include/bitmap.h .././include/tfm.h .././include/fix-num.h .././include/list.h \
  975.     .././include/spline.h .././include/cmdline.h .././include/filename.h .././include/getopt.h \
  976. !   .././include/report.h input-ccc.h char.h main.h .././include/encoding.h metafont.h \
  977. !   oblique.h pstype1.h pstype3.h text.h ccc.h 
  978.   metafont.o : metafont.c .././include/config.h .././include/c-auto.h .././include/c-std.h \
  979.     .././include/c-memstr.h .././include/c-errno.h .././include/c-minmax.h .././include/c-limits.h \
  980. --- 24,29 ----
  981.     .././include/bitmap.h .././include/tfm.h .././include/fix-num.h .././include/list.h \
  982.     .././include/spline.h .././include/cmdline.h .././include/filename.h .././include/getopt.h \
  983. !   .././include/report.h input-ccc.h main.h .././include/encoding.h metafont.h \
  984. !   char.h pstype1.h pstype3.h psutil.h text.h ccc.h 
  985.   metafont.o : metafont.c .././include/config.h .././include/c-auto.h .././include/c-std.h \
  986.     .././include/c-memstr.h .././include/c-errno.h .././include/c-minmax.h .././include/c-limits.h \
  987. ***************
  988. *** 31,39 ****
  989.     .././include/types.h .././include/bzr.h .././include/bounding-box.h .././include/font.h \
  990.     .././include/bitmap.h .././include/tfm.h .././include/fix-num.h .././include/list.h \
  991. !   .././include/spline.h char.h .././include/vector.h input-ccc.h metafont.h ccc.h 
  992. ! oblique.o : oblique.c .././include/config.h .././include/c-auto.h .././include/c-std.h \
  993. !   .././include/c-memstr.h .././include/c-errno.h .././include/c-minmax.h .././include/c-limits.h \
  994. !   .././include/c-seek.h .././include/c-proto.h .././include/global.h .././include/lib.h \
  995. !   .././include/types.h .././include/spline.h .././include/bounding-box.h oblique.h 
  996.   pstype1.o : pstype1.c .././include/config.h .././include/c-auto.h .././include/c-std.h \
  997.     .././include/c-memstr.h .././include/c-errno.h .././include/c-minmax.h .././include/c-limits.h \
  998. --- 31,36 ----
  999.     .././include/types.h .././include/bzr.h .././include/bounding-box.h .././include/font.h \
  1000.     .././include/bitmap.h .././include/tfm.h .././include/fix-num.h .././include/list.h \
  1001. !   .././include/spline.h .././include/encoding.h .././include/filename.h .././include/vector.h \
  1002. !   char.h input-ccc.h main.h metafont.h ccc.h 
  1003.   pstype1.o : pstype1.c .././include/config.h .././include/c-auto.h .././include/c-std.h \
  1004.     .././include/c-memstr.h .././include/c-errno.h .././include/c-minmax.h .././include/c-limits.h \
  1005. ***************
  1006. *** 41,46 ****
  1007.     .././include/types.h .././include/bounding-box.h .././include/bzr.h .././include/font.h \
  1008.     .././include/bitmap.h .././include/tfm.h .././include/fix-num.h .././include/list.h \
  1009. !   .././include/spline.h char.h .././include/hexify.h .././include/varstring.h \
  1010. !   .././include/vector.h input-ccc.h pstype1.h psutil.h ccc.h 
  1011.   pstype3.o : pstype3.c .././include/config.h .././include/c-auto.h .././include/c-std.h \
  1012.     .././include/c-memstr.h .././include/c-errno.h .././include/c-minmax.h .././include/c-limits.h \
  1013. --- 38,43 ----
  1014.     .././include/types.h .././include/bounding-box.h .././include/bzr.h .././include/font.h \
  1015.     .././include/bitmap.h .././include/tfm.h .././include/fix-num.h .././include/list.h \
  1016. !   .././include/spline.h char.h input-ccc.h .././include/encoding.h .././include/hexify.h \
  1017. !   .././include/varstring.h .././include/vector.h pstype1.h psutil.h ccc.h 
  1018.   pstype3.o : pstype3.c .././include/config.h .././include/c-auto.h .././include/c-std.h \
  1019.     .././include/c-memstr.h .././include/c-errno.h .././include/c-minmax.h .././include/c-limits.h \
  1020. ***************
  1021. *** 48,52 ****
  1022.     .././include/types.h .././include/bounding-box.h .././include/bzr.h .././include/font.h \
  1023.     .././include/bitmap.h .././include/tfm.h .././include/fix-num.h .././include/list.h \
  1024. !   .././include/spline.h pstype3.h psutil.h 
  1025.   psutil.o : psutil.c .././include/config.h .././include/c-auto.h .././include/c-std.h \
  1026.     .././include/c-memstr.h .././include/c-errno.h .././include/c-minmax.h .././include/c-limits.h \
  1027. --- 45,49 ----
  1028.     .././include/types.h .././include/bounding-box.h .././include/bzr.h .././include/font.h \
  1029.     .././include/bitmap.h .././include/tfm.h .././include/fix-num.h .././include/list.h \
  1030. !   .././include/spline.h .././include/encoding.h pstype3.h psutil.h 
  1031.   psutil.o : psutil.c .././include/config.h .././include/c-auto.h .././include/c-std.h \
  1032.     .././include/c-memstr.h .././include/c-errno.h .././include/c-minmax.h .././include/c-limits.h \
  1033. ***************
  1034. *** 60,63 ****
  1035.     .././include/types.h text.h .././include/bzr.h .././include/bounding-box.h .././include/font.h \
  1036.     .././include/bitmap.h .././include/tfm.h .././include/fix-num.h .././include/list.h \
  1037. !   .././include/spline.h input-ccc.h char.h 
  1038.   version.o : version.c 
  1039. --- 57,60 ----
  1040.     .././include/types.h text.h .././include/bzr.h .././include/bounding-box.h .././include/font.h \
  1041.     .././include/bitmap.h .././include/tfm.h .././include/fix-num.h .././include/list.h \
  1042. !   .././include/spline.h input-ccc.h 
  1043.   version.o : version.c 
  1044. diff -Nrc2 fontutils-0.5/bzrto/README fontutils-0.6/bzrto/README
  1045. *** fontutils-0.5/bzrto/README    Wed Mar  4 11:38:03 1992
  1046. --- fontutils-0.6/bzrto/README    Mon Oct  5 18:12:41 1992
  1047. ***************
  1048. *** 1,10 ****
  1049. ! This program converts outline fonts in the homegrown BZR format to a
  1050.   form usable for typesetting, such as Metafont or PostScript.
  1051.   
  1052.   The Metafont file `bzrsetup.mf' is input by the MF code output by this
  1053. ! program, so mf must be able to find it.  You can generate a font at a
  1054. ! given size with a command line such as (`$ ' being the shell prompt):
  1055. ! $ mf '\mode:=localfont; designsize:=24pt#; input foofont'
  1056. ! To make a 24pt version of foofont.  The default size is 10pt.
  1057.   
  1058. ! The BZR format is described in `../bzr/README'.
  1059. --- 1,15 ----
  1060. ! This program converts outline fonts in our homegrown BZR format to a
  1061.   form usable for typesetting, such as Metafont or PostScript.
  1062.   
  1063.   The Metafont file `bzrsetup.mf' is input by the MF code output by this
  1064. ! program, so MF must be able to find it.  You can generate a font at a
  1065. ! given size with a command line such as:
  1066.   
  1067. !     mf '\mode:=localfont; designsize:=24pt#; input foofont'
  1068. ! This makes a 24pt version of foofont.  The default size is 10pt.
  1069. ! Similarly, the Type 3 fonts output by this program use the BuildChar
  1070. ! routine defined in bzrbuildch.PS.
  1071. ! The BZR format is described in the manual.
  1072. diff -Nrc2 fontutils-0.5/bzrto/bzrsetup.mf fontutils-0.6/bzrto/bzrsetup.mf
  1073. *** fontutils-0.5/bzrto/bzrsetup.mf    Wed Sep  2 17:57:33 1992
  1074. --- fontutils-0.6/bzrto/bzrsetup.mf    Mon Oct 19 17:03:02 1992
  1075. ***************
  1076. *** 134,140 ****
  1077.   def proof_labels (text t) =
  1078.     % We need to delimit the arguments here, so \MF\ knows where the
  1079. !   % second |text| argument begins.  Our output uses the suffix "e" for
  1080. !   % endpoints of segments, and the suffixes "c1" and "c2" for control
  1081. !   % points.
  1082.     if proofing > 1: general_label (t) (s); fi;
  1083.     if proofing > 2: general_label (t) (c1,c2); fi;
  1084. --- 134,140 ----
  1085.   def proof_labels (text t) =
  1086.     % We need to delimit the arguments here, so \MF\ knows where the
  1087. !   % second |text| argument begins.  Our output uses the suffix |"s"| for
  1088. !   % startpoints of segments, and the suffixes |"c1"| and |"c2"| for
  1089. !   % control points.
  1090.     if proofing > 1: general_label (t) (s); fi;
  1091.     if proofing > 2: general_label (t) (c1,c2); fi;
  1092. ***************
  1093. *** 163,167 ****
  1094.   def fill_or_unfill expr p =
  1095.     temp_path := p;
  1096. -   loggingall;
  1097.     if turningnumber temp_path > 0: fill else: unfill fi temp_path;
  1098.   enddef;
  1099. --- 163,166 ----
  1100. diff -Nrc2 fontutils-0.5/bzrto/ccc.y fontutils-0.6/bzrto/ccc.y
  1101. *** fontutils-0.5/bzrto/ccc.y    Tue Sep  1 14:46:19 1992
  1102. --- fontutils-0.6/bzrto/ccc.y    Sun Oct 11 16:03:33 1992
  1103. ***************
  1104. *** 30,38 ****
  1105.   
  1106.   
  1107. ! /* Retrieve the TFM dimension specified by the accessor macro TFM_DIMEN in
  1108. !    the character CHAR_PTR.  Assume both the CHAR_PTR and the TFM info in the
  1109. !    character exist.  */
  1110. ! #define BZR_TFM_DIMEN(tfm_dimen, bzr_char_ptr)                \
  1111. !   tfm_dimen (*CHAR_TFM_INFO (*(bzr_char_ptr)))
  1112.   
  1113.   
  1114. --- 30,41 ----
  1115.   
  1116.   
  1117. ! /* Set the return value RET to either the dimension DIM, if NAME is a
  1118. !    valid character name, or an invalid sentinel.  Used in the
  1119. !    `unit_of_measure' rule.  */
  1120. ! #define DO_CHAR_DIMEN(ret, dimen, name)                    \
  1121. !   if (char_known_p (name))                        \
  1122. !     ret = dimen_init (dimen);                        \
  1123. !   else                                    \
  1124. !     DIMEN_VALID (ret) = false
  1125.   
  1126.   
  1127. ***************
  1128. *** 124,128 ****
  1129.                         DIMEN_ABSOLUTE ($$) = true;
  1130.                       }
  1131.                   | TR_CAPHEIGHT  { $$ = dimen_init (ccc_fontinfo.cap_height); }
  1132.                   | TR_DESIGNSIZE { $$ = dimen_init (ccc_fontinfo.design_size); }
  1133. --- 127,130 ----
  1134. ***************
  1135. *** 130,174 ****
  1136.                   | TR_FONTDEPTH  { $$ = dimen_init (ccc_fontinfo.font_depth); }
  1137.                   | TR_XHEIGHT    { $$ = dimen_init (ccc_fontinfo.xheight); }
  1138. !                 | TR_HEIGHT '(' T_CHARNAME ')'    
  1139.                       {
  1140. !                       if (char_known_p ($3))
  1141. !                         $$ = dimen_init (BZR_TFM_DIMEN (TFM_HEIGHT,
  1142. !                                                         chars[$3.code]));
  1143. !                       else
  1144. !                         DIMEN_VALID ($$) = false;
  1145.                       }
  1146.           | TR_WIDTH '(' T_CHARNAME ')'
  1147.                       {
  1148. !                       if (char_known_p ($3))
  1149. !                         $$ = dimen_init (BZR_TFM_DIMEN (TFM_WIDTH,
  1150. !                                                         chars[$3.code]));
  1151. !                       else
  1152. !                         DIMEN_VALID ($$) = false;
  1153.                       }
  1154.           | TR_DEPTH '(' T_CHARNAME ')'
  1155.                       {
  1156. !                       if (char_known_p ($3))
  1157. !                         $$ = dimen_init (BZR_TFM_DIMEN (TFM_DEPTH,
  1158. !                                                         chars[$3.code]));
  1159. !                       else
  1160. !                         DIMEN_VALID ($$) = false;
  1161.                       }
  1162.                   | TR_BBHEIGHT '(' T_CHARNAME ')'    
  1163.                       {
  1164. !                       if (char_known_p ($3))
  1165. !                         $$ = dimen_init (BB_HEIGHT (BCHAR_BB
  1166. !                                                      (*chars[$3.code])));
  1167. !                       else
  1168. !                         DIMEN_VALID ($$) = false;
  1169.                       }
  1170. -         ;
  1171.                   | TR_BBWIDTH '(' T_CHARNAME ')'    
  1172.                       {
  1173. !                       if (char_known_p ($3))
  1174. !                         $$ = dimen_init (BB_WIDTH (BCHAR_BB
  1175. !                                                     (*chars[$3.code])));
  1176. !                       else
  1177. !                         DIMEN_VALID ($$) = false;
  1178.                       }
  1179.           ;
  1180. --- 132,156 ----
  1181.                   | TR_FONTDEPTH  { $$ = dimen_init (ccc_fontinfo.font_depth); }
  1182.                   | TR_XHEIGHT    { $$ = dimen_init (ccc_fontinfo.xheight); }
  1183. !                 | TR_HEIGHT '(' T_CHARNAME ')'
  1184.                       {
  1185. !                       DO_CHAR_DIMEN ($$, CHAR_HEIGHT (*chars[$3.code]), $3);
  1186.                       }
  1187.           | TR_WIDTH '(' T_CHARNAME ')'
  1188.                       {
  1189. !                       DO_CHAR_DIMEN ($$, CHAR_SET_WIDTH (*chars[$3.code]), $3);
  1190.                       }
  1191.           | TR_DEPTH '(' T_CHARNAME ')'
  1192.                       {
  1193. !                       DO_CHAR_DIMEN ($$, CHAR_DEPTH (*chars[$3.code]), $3);
  1194.                       }
  1195.                   | TR_BBHEIGHT '(' T_CHARNAME ')'    
  1196.                       {
  1197. !                       DO_CHAR_DIMEN
  1198. !                         ($$, BB_HEIGHT (CHAR_BB (*chars[$3.code])), $3);
  1199.                       }
  1200.                   | TR_BBWIDTH '(' T_CHARNAME ')'    
  1201.                       {
  1202. !                       DO_CHAR_DIMEN
  1203. !                         ($$, BB_WIDTH (CHAR_BB (*chars[$3.code])), $3);
  1204.                       }
  1205.           ;
  1206. ***************
  1207. *** 393,398 ****
  1208.   }
  1209.   
  1210. ! /* Return true if the character C is defined in both the BZR and the TFM
  1211. !    input fonts, otherwise false.  If it is undefined, give a warning.  */
  1212.   
  1213.   static boolean
  1214. --- 375,379 ----
  1215.   }
  1216.   
  1217. ! /* Return true if the character C is defined; otherwise, give a warning.  */
  1218.   
  1219.   static boolean
  1220. ***************
  1221. *** 402,409 ****
  1222.     
  1223.     if (chars[c.code] == NULL)
  1224. !     CCC_WARN2 ("Character %d (%s) undefined in BZR files", c.code, c.name);
  1225. !   else if (CHAR_TFM_INFO (*chars[c.code]) == NULL)
  1226. !     CCC_WARN2 ("Character %d (%s) undefined in TFM files", c.code, c.name);
  1227.   
  1228.     else
  1229. --- 383,387 ----
  1230.     
  1231.     if (chars[c.code] == NULL)
  1232. !     CCC_WARN2 ("Character %d (%s) undefined", c.code, c.name);
  1233.   
  1234.     else
  1235. diff -Nrc2 fontutils-0.5/bzrto/char.c fontutils-0.6/bzrto/char.c
  1236. *** fontutils-0.5/bzrto/char.c    Mon Aug 31 10:50:54 1992
  1237. --- fontutils-0.6/bzrto/char.c    Mon Oct 19 10:24:33 1992
  1238. ***************
  1239. *** 24,77 ****
  1240.   
  1241.   #include "char.h"
  1242. -  
  1243. - static void scale_splines (spline_list_array_type *shape, real scale_factor);
  1244. - static real_coordinate_type scale_point (real_coordinate_type, real);
  1245. - static void scale_bzr_char (bzr_char_type *c, real scale_factor);
  1246. - static void scale_tfm_char (tfm_char_type *c, real scale_factor);
  1247. - char_type *
  1248. - get_new_char (charcode_type code)
  1249. - {
  1250. -   char_type *new_char;
  1251. -   bzr_char_type *bzr_info = bzr_get_char (code);
  1252. -   tfm_char_type *tfm_info = tfm_get_char (code);
  1253.   
  1254. !   if (bzr_info == NULL)
  1255. !     return NULL;
  1256.   
  1257. -   /* OK, we'll have a character to return.  Fill in the `char_type'
  1258. -      structure.  */
  1259. -   new_char = XTALLOC1 (char_type);
  1260. -   
  1261. -   CHAR_BZR_INFO (*new_char) = bzr_info;
  1262. -   CHAR_TFM_INFO (*new_char) = tfm_info;
  1263.   
  1264. !   return new_char;
  1265. ! }
  1266.   
  1267. ! /* Scale the BZR and TFM information in C by SCALE_FACTOR.  */
  1268.   
  1269.   void
  1270. ! scale_char (char_type *c, real scale_factor)
  1271.   {
  1272. !   if (scale_factor != 1)
  1273. !     {
  1274. !       scale_bzr_char (CHAR_BZR_INFO (*c), scale_factor);
  1275. !       scale_tfm_char (CHAR_TFM_INFO (*c), scale_factor);
  1276. !     }
  1277. ! }
  1278. ! /* Scale the set width, bounding box, and splines in C by SCALE_FACTOR.  */
  1279.   
  1280. - static void
  1281. - scale_bzr_char (bzr_char_type *c, real scale_factor)
  1282. - {
  1283.     CHAR_SET_WIDTH (*c) *= scale_factor;
  1284. !   BZR_CHAR_MIN_COL(*c) *= scale_factor;
  1285. !   BZR_CHAR_MAX_COL(*c) *= scale_factor;
  1286. !   BZR_CHAR_MIN_ROW(*c) *= scale_factor;
  1287. !   BZR_CHAR_MAX_ROW(*c) *= scale_factor;
  1288. !   scale_splines (&(BZR_SHAPE (*c)), scale_factor);
  1289.   }
  1290.   
  1291. --- 24,57 ----
  1292.   
  1293.   #include "char.h"
  1294.   
  1295. ! #include "ccc.h"
  1296.   
  1297.   
  1298. ! /* Angle from the vertical by which to slant the shapes, in radians.
  1299. !    (-oblique-angle)  */
  1300. ! real oblique_angle = 0.0;
  1301. ! static void scale_splines (spline_list_array_type *shape, real scale_factor);
  1302. ! static real_coordinate_type scale_point (real_coordinate_type, real);
  1303. ! static real_coordinate_type slant_point (real_coordinate_type);
  1304. ! static unsigned update_subrs
  1305. !   (char_type *[], charcode_type, ccc_type *[], bzr_char_type *[]);
  1306.   
  1307. ! /* Scale the information in C by SCALE_FACTOR.  */
  1308.   
  1309.   void
  1310. ! scale_char (bzr_char_type *c, real scale_factor)
  1311.   {
  1312. !   if (scale_factor == 1)
  1313. !     return;
  1314.   
  1315.     CHAR_SET_WIDTH (*c) *= scale_factor;
  1316. !   CHAR_MIN_COL(*c) *= scale_factor;
  1317. !   CHAR_MAX_COL(*c) *= scale_factor;
  1318. !   CHAR_MIN_ROW(*c) *= scale_factor;
  1319. !   CHAR_MAX_ROW(*c) *= scale_factor;
  1320. !   scale_splines (&BZR_SHAPE (*c), scale_factor);
  1321.   }
  1322.   
  1323. ***************
  1324. *** 122,179 ****
  1325.     return scaled_p;
  1326.   }
  1327.   
  1328.   
  1329. ! /* Scale all the character dimensions in C by SCALE_FACTOR.  */
  1330.   
  1331. ! static void
  1332. ! scale_tfm_char (tfm_char_type *c, real scale_factor)
  1333.   {
  1334. !   unsigned this_kern;
  1335. !   list_type kern_table;
  1336.     
  1337. !   /* If things are confused, the TFM file may not have the same
  1338. !      characters defined as the BZR file.  */
  1339. !   if (c == NULL)
  1340. !     return;
  1341. !     
  1342. !   kern_table = TFM_KERN (*c);
  1343.     
  1344. !   for (this_kern = 0; this_kern < LIST_SIZE (kern_table); this_kern++)
  1345.       {
  1346. !       tfm_kern_type *kern = LIST_ELT (kern_table, this_kern);
  1347.         
  1348. !       kern->kern *= scale_factor;
  1349.       }
  1350.   
  1351. !   TFM_WIDTH (*c) *= scale_factor;
  1352. !   TFM_HEIGHT (*c) *= scale_factor;
  1353. !   TFM_FIX_WIDTH (*c) *= scale_factor;
  1354. !   TFM_FIX_HEIGHT (*c) *= scale_factor;
  1355. !   TFM_DEPTH (*c) *= scale_factor;
  1356. !   TFM_FIX_DEPTH (*c) *= scale_factor;
  1357.   }
  1358. - /* Make a new TFM character from the information in BB and assign it to
  1359. -    `CHARS[CODE]', allocating space if necessary.  */
  1360.   
  1361. ! void
  1362. ! char_make_tfm (char_type *chars[], charcode_type code,
  1363. !                real_bounding_box_type bb)
  1364.   {
  1365. !   tfm_char_type *new_tfm_char = XTALLOC1 (tfm_char_type);
  1366.     
  1367. !   TFM_CHAR_EXISTS (*new_tfm_char) = true;
  1368. !   TFM_CHARCODE (*new_tfm_char) = code;
  1369. !   TFM_WIDTH (*new_tfm_char) = BB_WIDTH (bb);
  1370. !   TFM_HEIGHT (*new_tfm_char) = MAX_ROW (bb);
  1371. !   TFM_DEPTH (*new_tfm_char) = -MIN_ROW (bb);
  1372. !   TFM_ITALIC_CORRECTION (*new_tfm_char) = 0.0;
  1373. !   TFM_KERN (*new_tfm_char) = list_init ();
  1374. !   TFM_LIGATURE (*new_tfm_char) = list_init ();
  1375. !   /* If this character didn't exist in the BZR input, have to define it. */
  1376. !   if (chars[code] == NULL)
  1377. !     chars[code] = XTALLOC1 (char_type);
  1378. !     
  1379. !   CHAR_TFM_INFO (*chars[code]) = new_tfm_char;
  1380.   }
  1381. --- 102,251 ----
  1382.     return scaled_p;
  1383.   }
  1384. + /* Merge CCC_CHARS and BZR_CHARS between STARTING_CHAR and ENDING_CHAR,
  1385. +    with the latter taking precedence.  For each element in CCC_CHARS we use
  1386. +    also incorporate any other characters it needs.  Return the resulting
  1387. +    array of structures, and the number of subroutines found in SUBR_COUNT.  */
  1388. +    
  1389. + char_type **
  1390. + subr_chars (bzr_char_type *bzr_chars[], ccc_type *ccc_chars[],
  1391. +             charcode_type starting_char, charcode_type ending_char,
  1392. +             unsigned *subr_count)
  1393. + {
  1394. +   unsigned code;
  1395. +   char_type **subrs = XTALLOC (MAX_CHARCODE + 1, char_type *);
  1396. +   
  1397. +   *subr_count = 0;
  1398. +   for (code = 0; code <= MAX_CHARCODE; code++)
  1399. +     subrs[code] = NULL;
  1400. +   for (code = starting_char; code <= ending_char; code++)
  1401. +     {
  1402. +       if (ccc_chars[code])
  1403. +         *subr_count += update_subrs (subrs, code, ccc_chars, bzr_chars);
  1404. +     }
  1405. +   return subrs;
  1406. + }
  1407.   
  1408.   
  1409. ! /* Update in SUBRS all the characters in CCC_CHARS and BZR_CHARS that
  1410. !    are used as subroutines in CCC_CHARS[CODE].  Prefer entries in
  1411. !    BZR_CHARS to ones in CCC_CHARS, if both exist.  We assume
  1412. !    CCC_CHARS[CODE] is not null.  */
  1413.   
  1414. ! static unsigned
  1415. ! update_subrs (char_type *subrs[], charcode_type code,
  1416. !               ccc_type *ccc_chars[], bzr_char_type *bzr_chars[])
  1417.   {
  1418. !   unsigned this_cmd;
  1419. !   ccc_type c = *ccc_chars[code];
  1420. !   unsigned subr_count = 0;
  1421. !   for (this_cmd = 0; this_cmd < LIST_SIZE (c); this_cmd++)
  1422. !     { 
  1423. !       ccc_cmd_type cmd = *(ccc_cmd_type *) LIST_ELT (c, this_cmd);
  1424. !       
  1425. !       switch (CCC_OPCODE (cmd))
  1426. !         {
  1427. !         case TR_SETCHAR:
  1428. !         case TR_SETCHARBB:
  1429. !           {
  1430. !             char_type *new_char = XTALLOC1 (char_type);
  1431. !             charcode_type subr_code = CCC_CHARCODE (cmd);
  1432. !             
  1433. !             /* If we already needed this character, keep going.  */
  1434. !             if (subrs[subr_code])
  1435. !               continue;
  1436. !             
  1437. !             /* Prefer the BZR definition to the CCC if we have both.  */
  1438. !             if (bzr_chars[subr_code])
  1439. !               {
  1440. !                 CHAR_CLASS (*new_char) = bzr_char_class;
  1441. !                 CHAR_BZR (*new_char) = bzr_chars[subr_code];
  1442. !                 subrs[subr_code] = new_char;
  1443. !                 subr_count++;
  1444. !               }
  1445. !             else if (ccc_chars[subr_code])
  1446. !               {
  1447. !                 CHAR_CLASS (*new_char) = ccc_char_class;
  1448. !                 CHAR_CCC (*new_char) = ccc_chars[subr_code];
  1449. !                 subrs[subr_code] = new_char;
  1450. !                 subr_count++;
  1451. !                 
  1452. !                 /* This CCC char might need more subroutines, so recurse.  */
  1453. !                 subr_count
  1454. !                   += update_subrs (subrs, subr_code, ccc_chars, bzr_chars);
  1455. !               }
  1456. !             else
  1457. !               WARNING2 ("Char %d used by CCC char %d, but undefined",
  1458. !                         subr_code, code);
  1459. !           }
  1460. !           break;
  1461. !         case TR_HMOVE:
  1462. !         case TR_VMOVE:
  1463. !           break;
  1464. !         default:
  1465. !           FATAL2 ("Bad CCC command %d in char %d", CCC_OPCODE (cmd), code);
  1466. !     }
  1467. !     }
  1468.     
  1469. !   return subr_count;
  1470. ! }
  1471. ! /* Transform all the coordinates in each spline in the list.  */
  1472. ! spline_list_array_type
  1473. ! oblique_splines (spline_list_array_type shape)
  1474. ! {
  1475. !   unsigned this_list;
  1476. !   spline_list_array_type answer = new_spline_list_array ();
  1477. !   if (oblique_angle == 0.0) return shape;
  1478.     
  1479. !   for (this_list = 0; this_list < SPLINE_LIST_ARRAY_LENGTH (shape);
  1480. !        this_list++)
  1481.       {
  1482. !       unsigned this_spline;
  1483. !       spline_list_type list = SPLINE_LIST_ARRAY_ELT (shape, this_list);
  1484. !       spline_list_type *new = new_spline_list ();
  1485. !       for (this_spline = 0; this_spline < SPLINE_LIST_LENGTH (list);
  1486. !            this_spline++)
  1487. !         {
  1488. !           spline_type s = SPLINE_LIST_ELT (list, this_spline);
  1489. !           START_POINT (s) = slant_point (START_POINT (s));
  1490. !           END_POINT (s) = slant_point (END_POINT (s));
  1491. !           
  1492. !           if (SPLINE_DEGREE (s) == CUBIC)
  1493. !             {
  1494. !               CONTROL1 (s) = slant_point (CONTROL1 (s));
  1495. !               CONTROL2 (s) = slant_point (CONTROL2 (s));
  1496. !             }
  1497. !           append_spline (new, s);
  1498. !         }
  1499.         
  1500. !       append_spline_list (&answer, *new);
  1501.       }
  1502. +   free_spline_list_array (&shape);
  1503.   
  1504. !   return answer;
  1505.   }
  1506.   
  1507. ! /* Slant the single point P.  This is just trigonometry.  */
  1508. ! static real_coordinate_type
  1509. ! slant_point (real_coordinate_type p)
  1510.   {
  1511. !   real_coordinate_type slanted_p;
  1512. !   
  1513. !   slanted_p.y = p.y;
  1514. !   slanted_p.x = p.x + tan (oblique_angle) * p.y;
  1515.     
  1516. !   return slanted_p;
  1517.   }
  1518. diff -Nrc2 fontutils-0.5/bzrto/char.h fontutils-0.6/bzrto/char.h
  1519. *** fontutils-0.5/bzrto/char.h    Mon Aug 31 10:24:08 1992
  1520. --- fontutils-0.6/bzrto/char.h    Mon Oct 19 10:24:34 1992
  1521. ***************
  1522. *** 21,60 ****
  1523.   
  1524.   #include "bzr.h"
  1525. ! #include "tfm.h"
  1526.   
  1527.   
  1528. - /* The representation of a single character.  */
  1529.   typedef struct
  1530.   {
  1531. !   bzr_char_type *bzr_info;
  1532. !   tfm_char_type *tfm_info;
  1533.   } char_type;
  1534.   
  1535. ! /* The bzr-derived information about the character C.  */
  1536. ! #define CHAR_BZR_INFO(c) ((c).bzr_info)
  1537. ! #define BCHAR_BB(c) (BZR_CHAR_BB (*(CHAR_BZR_INFO (c))))
  1538. ! #define BCHAR_MIN_COL(c) (BZR_CHAR_MIN_COL (*(CHAR_BZR_INFO (c))))
  1539. ! #define BCHAR_MAX_COL(c) (BZR_CHAR_MAX_COL (*(CHAR_BZR_INFO (c))))
  1540. ! #define BCHAR_MIN_ROW(c) (BZR_CHAR_MIN_ROW (*(CHAR_BZR_INFO (c))))
  1541. ! #define BCHAR_MAX_ROW(c) (BZR_CHAR_MAX_ROW (*(CHAR_BZR_INFO (c))))
  1542. ! #define BCHAR_BB_WIDTH(c) (BZR_CHAR_BB_WIDTH (*(CHAR_BZR_INFO (c))))
  1543. ! #define BCHAR_SHAPE(c)    (BZR_SHAPE(*(CHAR_BZR_INFO (c))))
  1544. ! /* The tfm-derived information about the character C.  */
  1545. ! #define CHAR_TFM_INFO(c) ((c).tfm_info)
  1546. ! /* Return a pointer to the character CODE.  Return NULL if there is no
  1547. !    BZR info for CODE.  */
  1548. ! extern char_type *get_new_char (charcode_type code);
  1549.   
  1550. ! /* Scale a character by SCALE_FACTOR.  */
  1551. ! extern void scale_char (char_type *, real scale_factor);
  1552.   
  1553.   
  1554. ! /* Create a `tfm_char_type' structure from the information in BB and
  1555. !    assign it to `CHARS[CODE]'.  */
  1556. ! extern void char_make_tfm (char_type *chars[], charcode_type code,
  1557. !                            real_bounding_box_type bb);
  1558.   
  1559.   #endif /* not CHAR_H */
  1560. --- 21,58 ----
  1561.   
  1562.   #include "bzr.h"
  1563. ! #include "input-ccc.h"
  1564.   
  1565. + typedef enum { bzr_char_class, ccc_char_class } char_class_type;
  1566.   
  1567.   typedef struct
  1568.   {
  1569. !   char_class_type tag;
  1570. !   union
  1571. !   {
  1572. !     bzr_char_type *bzr_char;
  1573. !     ccc_type *ccc_char;
  1574. !   } u;
  1575.   } char_type;
  1576.   
  1577. ! #define CHAR_CLASS(c) ((c).tag)
  1578. ! #define CHAR_BZR(c) ((c).u.bzr_char)
  1579. ! #define CHAR_CCC(c) ((c).u.ccc_char)
  1580.   
  1581. ! /* See char.c.  */
  1582. ! extern real oblique_angle;
  1583. ! /* Slant all splines in the list by `oblique_angle'.  */
  1584. ! extern spline_list_array_type oblique_splines (spline_list_array_type);
  1585.   
  1586.   
  1587. ! /* Return an array of which characters are needed by CCC_CHARS (between
  1588. !    START and END) as subroutines, and how many we found in SUBR_COUNT.  */
  1589. ! extern char_type **subr_chars (bzr_char_type *[], ccc_type *ccc_chars[],
  1590. !                                charcode_type start, charcode_type end,
  1591. !                                unsigned *subr_count);
  1592. ! /* Scale a character by SCALE_FACTOR.  */
  1593. ! extern void scale_char (bzr_char_type *, real scale_factor);
  1594.   
  1595.   #endif /* not CHAR_H */
  1596. diff -Nrc2 fontutils-0.5/bzrto/input-ccc.c fontutils-0.6/bzrto/input-ccc.c
  1597. *** fontutils-0.5/bzrto/input-ccc.c    Mon Aug 17 16:36:03 1992
  1598. --- fontutils-0.6/bzrto/input-ccc.c    Sun Oct 11 15:42:33 1992
  1599. ***************
  1600. *** 32,36 ****
  1601.   
  1602.   /* The information we've collected about the characters.  */
  1603. ! char_type **chars;
  1604.   
  1605.   /* The information for resolving various CCC units of measure.  */
  1606. --- 32,36 ----
  1607.   
  1608.   /* The information we've collected about the characters.  */
  1609. ! bzr_char_type **chars;
  1610.   
  1611.   /* The information for resolving various CCC units of measure.  */
  1612. ***************
  1613. *** 41,48 ****
  1614.   
  1615.   /* Go through all of CHARS, setting the various components in the return
  1616. !    struct.  Some defaults are taken from TFM_INFO.  */
  1617.   
  1618.   static ccc_fontinfo_type
  1619. ! get_ccc_fontinfo (char_type **chars, tfm_global_info_type tfm_info)
  1620.   {
  1621.     ccc_fontinfo_type ccc_info; /* What we'll return.  */
  1622. --- 41,50 ----
  1623.   
  1624.   /* Go through all of CHARS, setting the various components in the return
  1625. !    struct.  Some defaults are taken from TFM_INFO (if it's non-null),
  1626. !    and the global `encoding_info'.  */
  1627.   
  1628.   static ccc_fontinfo_type
  1629. ! get_ccc_fontinfo (real design_size, bzr_char_type *chars[],
  1630. !                   tfm_global_info_type *tfm_info)
  1631.   {
  1632.     ccc_fontinfo_type ccc_info; /* What we'll return.  */
  1633. ***************
  1634. *** 53,67 ****
  1635.   
  1636.     /* The designsize is always present.  */
  1637. !   ccc_info.design_size = TFM_DESIGN_SIZE (tfm_info);
  1638.     
  1639.     /* If the `quad' parameter is not present in TFM_INFO to define the
  1640.        font's em space, use the design size.  */
  1641. !   ccc_info.em = TFM_SAFE_FONTDIMEN (tfm_info, TFM_QUAD_PARAMETER,
  1642. !                                     TFM_DESIGN_SIZE (tfm_info));
  1643.   
  1644.     /* If the `xheight' parameter is present in TFM_INFO, use it.  */
  1645. !   if (TFM_XHEIGHT_PARAMETER <= TFM_FONTDIMEN_COUNT (tfm_info))
  1646.       {
  1647. !       ccc_info.xheight = TFM_FONTDIMEN (tfm_info, TFM_XHEIGHT_PARAMETER);
  1648.         xheight_found = true;
  1649.       }
  1650. --- 55,71 ----
  1651.   
  1652.     /* The designsize is always present.  */
  1653. !   ccc_info.design_size = design_size;
  1654.     
  1655.     /* If the `quad' parameter is not present in TFM_INFO to define the
  1656.        font's em space, use the design size.  */
  1657. !   ccc_info.em
  1658. !     = tfm_info
  1659. !       ? TFM_SAFE_FONTDIMEN (*tfm_info, TFM_QUAD_PARAMETER, design_size)
  1660. !       : design_size;
  1661.   
  1662.     /* If the `xheight' parameter is present in TFM_INFO, use it.  */
  1663. !   if (tfm_info && TFM_XHEIGHT_PARAMETER <= TFM_FONTDIMEN_COUNT (*tfm_info))
  1664.       {
  1665. !       ccc_info.xheight = TFM_FONTDIMEN (*tfm_info, TFM_XHEIGHT_PARAMETER);
  1666.         xheight_found = true;
  1667.       }
  1668. ***************
  1669. *** 73,123 ****
  1670.     for (this_char = 0; this_char < MAX_CHARCODE; this_char++)
  1671.       {
  1672. !       tfm_char_type *tfm_char;
  1673. !       
  1674. !       if (chars[this_char] == NULL)
  1675. !         continue;
  1676. !         
  1677. !       tfm_char = CHAR_TFM_INFO (*(chars[this_char]));
  1678. !       if (tfm_char && TFM_CHAR_EXISTS (*tfm_char))
  1679.           {
  1680. !            int char_height = TFM_HEIGHT (*tfm_char);
  1681. !            int char_depth = TFM_DEPTH (*tfm_char);
  1682. !            string char_name = ENCODING_CHAR_NAME (encoding_info, this_char);
  1683. !            if (!cap_height_found && char_height > font_height) 
  1684. !              font_height = char_height;
  1685. !            if (char_depth > ccc_fontinfo.font_depth) 
  1686. !              ccc_info.font_depth = char_depth;
  1687. !            /* If it's a letter from which we can find the font's
  1688. !               cap_height, use it.  Don't use `F' et al. because they
  1689. !               might have serifs that go above the height of the stem.  */
  1690. !            if (!cap_height_found && char_name[1] == 0
  1691. !                && (*char_name == 'B'
  1692. !                    || *char_name == 'D'
  1693. !                    || *char_name == 'H'
  1694. !                    || *char_name == 'P'
  1695. !                    || *char_name == 'R'
  1696. !                    || *char_name == 'X'))
  1697. !              {
  1698. !                ccc_info.cap_height = char_height;
  1699. !                cap_height_found = true;
  1700. !              }
  1701. !            /* If we haven't found the x-height yet, and `this_char' is a
  1702. !               letter from which we can determined it, use it.  */
  1703. !            if (!xheight_found && char_name[1] == 0
  1704. !                && (*char_name == 'u'
  1705. !                    || *char_name == 'v'
  1706. !                    || *char_name == 'w'
  1707. !                    || *char_name == 'x'
  1708. !                    || *char_name == 'y'
  1709. !                    || *char_name == 'z'))
  1710. !              {
  1711. !                ccc_info.xheight = char_height;
  1712. !                xheight_found = true;
  1713. !              }
  1714.           }
  1715.       }
  1716. --- 77,121 ----
  1717.     for (this_char = 0; this_char < MAX_CHARCODE; this_char++)
  1718.       {
  1719. !       if (chars[this_char])
  1720.           {
  1721. !           bzr_char_type c = *chars[this_char];
  1722. !           int char_height = CHAR_HEIGHT (c);
  1723. !           int char_depth = CHAR_DEPTH (c);
  1724. !           string char_name = ENCODING_CHAR_NAME (encoding_info, this_char);
  1725. !           if (char_height > font_height) 
  1726. !             font_height = char_height;
  1727. !           if (char_depth > ccc_info.font_depth) 
  1728. !             ccc_info.font_depth = char_depth;
  1729. !           /* If it's a letter from which we can find the font's
  1730. !              cap_height, use it.  Don't use `F' et al. because they
  1731. !              might have serifs that go above the height of the stem.  */
  1732. !           if (!cap_height_found && char_name[1] == 0
  1733. !               && (*char_name == 'B'
  1734. !                   || *char_name == 'D'
  1735. !                   || *char_name == 'H'
  1736. !                   || *char_name == 'P'
  1737. !                   || *char_name == 'R'
  1738. !                   || *char_name == 'X'))
  1739. !             {
  1740. !               ccc_info.cap_height = char_height;
  1741. !               cap_height_found = true;
  1742. !             }
  1743. !           /* If we haven't found the x-height yet, and `this_char' is a
  1744. !              letter from which we can determined it, use it.  */
  1745. !           if (!xheight_found && char_name[1] == 0
  1746. !               && (*char_name == 'u'
  1747. !                   || *char_name == 'v'
  1748. !                   || *char_name == 'w'
  1749. !                   || *char_name == 'x'
  1750. !                   || *char_name == 'y'
  1751. !                   || *char_name == 'z'))
  1752. !             {
  1753. !               ccc_info.xheight = char_height;
  1754. !               xheight_found = true;
  1755. !             }
  1756.           }
  1757.       }
  1758. ***************
  1759. *** 128,131 ****
  1760. --- 126,133 ----
  1761.       ccc_info.cap_height = font_height;
  1762.     
  1763. +   /* Similarly for the x-height.  */
  1764. +   if (!xheight_found)
  1765. +     ccc_info.xheight = .6 * font_height;
  1766.     return ccc_info;
  1767.   }
  1768. ***************
  1769. *** 138,143 ****
  1770.   
  1771.   ccc_type **
  1772. ! parse_ccc_file (string in_filename, char_type **chars_arg,
  1773. !         tfm_global_info_type tfm_info, boolean warning_p)
  1774.   {
  1775.     string ccc_name = extend_filename (in_filename, "ccc");
  1776. --- 140,146 ----
  1777.   
  1778.   ccc_type **
  1779. ! parse_ccc_file (string in_filename, bzr_char_type *chars_arg[],
  1780. !         tfm_global_info_type *tfm_info, real design_size,
  1781. !                 boolean warning_p)
  1782.   {
  1783.     string ccc_name = extend_filename (in_filename, "ccc");
  1784. ***************
  1785. *** 154,164 ****
  1786.         extern int yyparse ();
  1787.         
  1788. !       ccc_fontinfo = get_ccc_fontinfo (chars_arg, tfm_info);
  1789. !       /* We have to use these globals to communicate with the parser.  */
  1790. !       chars = chars_arg;
  1791.         ccc_filename = ccc_name;
  1792.         
  1793. !       /* Parse the input.  */
  1794.         yyparse ();
  1795.   
  1796. --- 157,167 ----
  1797.         extern int yyparse ();
  1798.         
  1799. !       /* We have to use these globals, since we can't alter `yyparse's
  1800. !          signature.  */
  1801. !       ccc_fontinfo = get_ccc_fontinfo (design_size, chars_arg, tfm_info);
  1802.         ccc_filename = ccc_name;
  1803. +       chars = chars_arg;
  1804.         
  1805. !       /* Parse the CCC source file.  */
  1806.         yyparse ();
  1807.   
  1808. diff -Nrc2 fontutils-0.5/bzrto/input-ccc.h fontutils-0.6/bzrto/input-ccc.h
  1809. *** fontutils-0.5/bzrto/input-ccc.h    Mon Aug 31 09:35:21 1992
  1810. --- fontutils-0.6/bzrto/input-ccc.h    Sun Oct 18 16:32:38 1992
  1811. ***************
  1812. *** 21,25 ****
  1813.   #define INPUT_CCC_H
  1814.   
  1815. - #include "char.h"
  1816.   #include "list.h"
  1817.   #include "tfm.h"
  1818. --- 21,24 ----
  1819. ***************
  1820. *** 94,98 ****
  1821.   extern FILE *ccc_file;
  1822.   extern string ccc_filename;
  1823. ! extern char_type **chars;
  1824.   extern ccc_fontinfo_type ccc_fontinfo;
  1825.   extern ccc_type *ccc_chars[];
  1826. --- 93,97 ----
  1827.   extern FILE *ccc_file;
  1828.   extern string ccc_filename;
  1829. ! extern bzr_char_type **chars;
  1830.   extern ccc_fontinfo_type ccc_fontinfo;
  1831.   extern ccc_type *ccc_chars[];
  1832. ***************
  1833. *** 100,108 ****
  1834.   
  1835.   /* Read the CCC file NAME, extended with `.ccc' if necessary.  Warn
  1836. !    about the file not existing only if WARN_P is true.  Update `chars',
  1837.      taking defaults from T.  */
  1838.   
  1839. ! extern ccc_type **parse_ccc_file (string name, char_type **chars,
  1840. !                                   tfm_global_info_type t, boolean warn_p);
  1841.   
  1842.   #endif /* not CCC_H */
  1843. --- 99,108 ----
  1844.   
  1845.   /* Read the CCC file NAME, extended with `.ccc' if necessary.  Warn
  1846. !    about the file not existing only if WARN_P is true.  Update CHARS,
  1847.      taking defaults from T.  */
  1848.   
  1849. ! extern ccc_type **parse_ccc_file
  1850. !   (string name, bzr_char_type **chars, tfm_global_info_type *t,
  1851. !    real design_size, boolean warn_p);
  1852.   
  1853.   #endif /* not CCC_H */
  1854. diff -Nrc2 fontutils-0.5/bzrto/main.c fontutils-0.6/bzrto/main.c
  1855. *** fontutils-0.5/bzrto/main.c    Mon Aug 31 11:29:54 1992
  1856. --- fontutils-0.6/bzrto/main.c    Tue Oct 20 10:04:22 1992
  1857. ***************
  1858. *** 21,25 ****
  1859.   
  1860.   #include "bzr.h"
  1861. ! #define CMDLINE_NO_DPI /* Outline fonts are resolution-independent.  */
  1862.   #include "cmdline.h"
  1863.   #include "filename.h"
  1864. --- 21,25 ----
  1865.   
  1866.   #include "bzr.h"
  1867. ! #define CMDLINE_NO_DPI /* BZR fonts are resolution-independent.  */
  1868.   #include "cmdline.h"
  1869.   #include "filename.h"
  1870. ***************
  1871. *** 33,39 ****
  1872.   #include "main.h"
  1873.   #include "metafont.h"
  1874. - #include "oblique.h"
  1875.   #include "pstype1.h"
  1876.   #include "pstype3.h"
  1877.   #include "text.h"
  1878.   
  1879. --- 33,39 ----
  1880.   #include "main.h"
  1881.   #include "metafont.h"
  1882.   #include "pstype1.h"
  1883.   #include "pstype3.h"
  1884. + #include "psutil.h"
  1885.   #include "text.h"
  1886.   
  1887. ***************
  1888. *** 41,44 ****
  1889. --- 41,56 ----
  1890.   
  1891.   
  1892. + /* The encoding vector.  This is not static because it's too much
  1893. +    trouble to pass it down to the output routines.  */
  1894. + encoding_info_type encoding_info;
  1895. + /* Says which characters we should process.  This is independent of the
  1896. +    ordering in the font file.  (-range)  */
  1897. + charcode_type starting_char = 0;
  1898. + charcode_type ending_char = MAX_CHARCODE;
  1899. + /* The font parameters from the main TFM file, or NULL.  */
  1900. + tfm_global_info_type *tfm_global_info;
  1901.   /* The name of the CCC input file specified by the user.  (-ccc-file)  */
  1902.   static string ccc_name = NULL;
  1903. ***************
  1904. *** 55,63 ****
  1905.   /* The names of BZR files to be concatenated onto the main one in the
  1906.      output.  (-concat)  */
  1907. ! list_type bzr_name_list;
  1908.   
  1909. ! /* The encoding file and its data structure.  (-encoding)  */
  1910. ! string encoding_name = NULL;
  1911. ! encoding_info_type encoding_info;
  1912.   
  1913.   /* The name of the output file specified by the user.  (-output-file)  */
  1914. --- 67,74 ----
  1915.   /* The names of BZR files to be concatenated onto the main one in the
  1916.      output.  (-concat)  */
  1917. ! static list_type bzr_name_list;
  1918.   
  1919. ! /* The name of the encoding file.  (-encoding)  */
  1920. ! static string encoding_name = NULL;
  1921.   
  1922.   /* The name of the output file specified by the user.  (-output-file)  */
  1923. ***************
  1924. *** 67,81 ****
  1925.   static string ps_fontname;
  1926.   
  1927. - /* Says which characters we should process.  This is independent of the
  1928. -    ordering in the font file.  (-range)  */
  1929. - static int starting_char = 0;
  1930. - static int ending_char = MAX_CHARCODE;
  1931.   /* This is defined in version.c.  */
  1932.   extern string version_string;
  1933.   
  1934. ! static string read_command_line (int, string []);
  1935.   static void append_concat_list (list_type *, string);
  1936.   
  1937.   int
  1938.   main (unsigned argc, string argv[])
  1939. --- 78,103 ----
  1940.   static string ps_fontname;
  1941.   
  1942.   /* This is defined in version.c.  */
  1943.   extern string version_string;
  1944.   
  1945. ! /* The number of characters we report per line if verbose.  */
  1946. ! #define NCHARS_PER_LINE 13
  1947.   static void append_concat_list (list_type *, string);
  1948. + static unsigned count_non_subr_chars
  1949. +   (char_type *[], bzr_char_type *[], ccc_type *[]);
  1950. + static void init_tfm_and_encoding_info
  1951. +   (string, tfm_global_info_type **, encoding_info_type *);
  1952. + static void output_bzr_char (bzr_char_type, char_type *[]);
  1953. + static void output_bzr_subr (bzr_char_type);
  1954. + static void output_ccc_char (ccc_type, charcode_type, char_type *[]);
  1955. + static void output_ccc_subr (ccc_type, charcode_type, char_type *[]);
  1956. + static void read_bzr_file (bzr_char_type *[], string);
  1957. + static bzr_char_type **read_bzr_files (list_type);
  1958. + static string read_command_line (int, string []);
  1959.   
  1960. + /* Convert generic outline fonts in BZR format to a form that can
  1961. +    actually be used for typesetting.  */
  1962.   int
  1963.   main (unsigned argc, string argv[])
  1964. ***************
  1965. *** 84,97 ****
  1966.     bzr_preamble_type preamble;
  1967.     bzr_postamble_type postamble;
  1968. !   real global_bzr_designsize;
  1969. !   char_type *chars[MAX_CHARCODE + 1];
  1970.     ccc_type **ccc_chars;
  1971. !   tfm_global_info_type tfm_info;
  1972.     unsigned this_char;
  1973. -   unsigned this_bzr_name;
  1974. -   string *first_element;
  1975. -   string font_name;
  1976. -   string font_basename;
  1977. -   string tfm_name, tfm_root;
  1978.     boolean ccc_warning_p = true;
  1979.     unsigned char_count = 0;
  1980. --- 106,116 ----
  1981.     bzr_preamble_type preamble;
  1982.     bzr_postamble_type postamble;
  1983. !   bzr_char_type **bzr_chars;
  1984.     ccc_type **ccc_chars;
  1985. !   char_type **chars, **subrs;
  1986. !   string *first_name;
  1987. !   string font_name, font_rootname;
  1988. !   unsigned subr_count;
  1989.     unsigned this_char;
  1990.     boolean ccc_warning_p = true;
  1991.     unsigned char_count = 0;
  1992. ***************
  1993. *** 98,110 ****
  1994.   
  1995.     /* Initialize the list of BZR filenames to have one empty element at
  1996. !      the beginning, which we will fill in with the main BZR name.  */
  1997.     bzr_name_list = list_init ();
  1998. !   first_element = LIST_TAPPEND (&bzr_name_list, string);
  1999.     
  2000.     font_name = read_command_line (argc, argv);
  2001. !   font_basename = remove_suffix (basename (font_name));
  2002.   
  2003.     if (output_name == NULL)
  2004. !     output_name = strtok (xstrdup (font_basename), "0123456789");
  2005.     else 
  2006.       if (find_suffix (output_name) != NULL
  2007. --- 117,129 ----
  2008.   
  2009.     /* Initialize the list of BZR filenames to have one empty element at
  2010. !      the beginning, which we fill in below with the main BZR name.  */
  2011.     bzr_name_list = list_init ();
  2012. !   first_name = LIST_TAPPEND (&bzr_name_list, string);
  2013.     
  2014.     font_name = read_command_line (argc, argv);
  2015. !   font_rootname = remove_suffix (basename (font_name));
  2016.   
  2017.     if (output_name == NULL)
  2018. !     output_name = strtok (xstrdup (font_rootname), "0123456789");
  2019.     else 
  2020.       if (find_suffix (output_name) != NULL
  2021. ***************
  2022. *** 116,123 ****
  2023.     bzr_name = extend_filename (font_name, "bzr");
  2024.     if (!bzr_open_input_file (bzr_name))
  2025. !     FATAL1 ("%s: Could not find BZR file", bzr_name);
  2026.   
  2027.     /* Read the global information from the BZR file and then close it, as
  2028. !      we open it again below.  */
  2029.     preamble = bzr_get_preamble ();
  2030.     postamble = bzr_get_postamble ();
  2031. --- 135,145 ----
  2032.     bzr_name = extend_filename (font_name, "bzr");
  2033.     if (!bzr_open_input_file (bzr_name))
  2034. !     FATAL_PERROR (bzr_name);
  2035.   
  2036. +   /* The first element of the BZR name list.  */
  2037. +   *first_name = bzr_name;
  2038.     /* Read the global information from the BZR file and then close it, as
  2039. !      we open it again below when reading the characters.  */
  2040.     preamble = bzr_get_preamble ();
  2041.     postamble = bzr_get_postamble ();
  2042. ***************
  2043. *** 124,294 ****
  2044.     bzr_close_input_file ();
  2045.     
  2046. !   global_bzr_designsize = BZR_DESIGN_SIZE (preamble);
  2047. !   /* Open the main TFM info.  */
  2048. !   tfm_root = make_suffix (bzr_name, "tfm");
  2049. !   tfm_name = find_tfm_filename (tfm_root);
  2050. !   /* We need the TFM file for the main BZR file.  */
  2051.   
  2052. -   if (tfm_name == NULL || !tfm_open_input_file (tfm_name))
  2053. -     FATAL1 ("%s: Could not find TFM file", tfm_root);
  2054. -   /* Just get the TFM global info and then close the file again, as we
  2055. -      open it again below.  */
  2056. -   tfm_info = tfm_get_global_info ();
  2057. -   tfm_close_input_file ();
  2058. -   
  2059. -   /* Read the encoding information.  */
  2060. -   if (encoding_name == NULL)
  2061. -     encoding_name = coding_scheme_to_filename (TFM_CODING_SCHEME (tfm_info));
  2062. -     
  2063. -   encoding_info = read_encoding_file (encoding_name);
  2064. -   TFM_CODING_SCHEME (tfm_info) = ENCODING_SCHEME_NAME (encoding_info);
  2065.     if (output[metafont])
  2066. !     metafont_start_output (output_name, preamble, tfm_info);
  2067. !     
  2068.     if (output[pstype1])
  2069. !     pstype1_start_output (font_basename, output_name, preamble, postamble,
  2070. !                   ps_fontname, tfm_info); 
  2071.     if (output[pstype3])
  2072. !     pstype3_start_output (font_basename, output_name, preamble, postamble, 
  2073. !               ps_fontname, tfm_info); 
  2074.     if (output[text])
  2075. !     text_start_output (font_basename, preamble);
  2076. !   
  2077. !   for (this_char = 0; this_char < MAX_CHARCODE; this_char++)
  2078. !     chars[this_char] = NULL;
  2079. !   /* The first element of the BZR name list.  */
  2080. !   *first_element = bzr_name;
  2081.   
  2082. -   /* Go through the BZR name list, concatenating the characters in the
  2083. -      files to the main font:
  2084.   
  2085. !      Output subroutines for all the BZR characters we have, then output 
  2086. !      the characters in terms of these subroutines.  We do this so we can
  2087. !      build composite characters, e.g, those with accents, using existing
  2088. !      characters.  */
  2089.   
  2090. !   for (this_bzr_name = 0; this_bzr_name < LIST_SIZE (bzr_name_list); 
  2091. !        this_bzr_name++)
  2092.       {
  2093. !       real local_bzr_designsize;
  2094. !       real designsize_ratio;
  2095. !       bzr_preamble_type preamble;
  2096. !       bzr_postamble_type postamble;
  2097. !       string tfm_name;
  2098. !       string bzr_name = *(string *) LIST_ELT (bzr_name_list, this_bzr_name);
  2099. !       bzr_name = extend_filename (bzr_name, "bzr");
  2100. !       if (!bzr_open_input_file (bzr_name))
  2101. !         FATAL1 ("%s: Could not find BZR file", bzr_name);
  2102. !       preamble = bzr_get_preamble ();
  2103. !       postamble = bzr_get_postamble ();
  2104. !       local_bzr_designsize = BZR_DESIGN_SIZE (preamble);
  2105. !       designsize_ratio = global_bzr_designsize / local_bzr_designsize;
  2106. !       
  2107. !       tfm_name = find_tfm_filename (make_suffix (bzr_name, "tfm"));
  2108.   
  2109. -       if (tfm_name == NULL || !tfm_open_input_file (tfm_name))
  2110. -         FATAL1 ("%s: Could not find TFM file", basename (bzr_name));
  2111.   
  2112. !       for (this_char = starting_char; this_char <= ending_char; this_char++)
  2113.           {
  2114. !           char_type *c = get_new_char (this_char);
  2115.             
  2116. !       /* Don't do a character that's already been done.  */
  2117. !       if (c != NULL && chars[this_char] != NULL)
  2118. !         {
  2119. !           WARNING2 ("%s: character %d already used", bzr_name, this_char);
  2120. !               c = NULL;  /* So won't go into IF statement below.  */
  2121. !         }
  2122.   
  2123. !       /* If there is BZR information for this code...  */
  2124. !       if (c != NULL)
  2125. !             {
  2126. !           BCHAR_SHAPE (*c) = oblique_splines (BCHAR_SHAPE (*c));
  2127. !           scale_char (c, designsize_ratio);
  2128.   
  2129. !           if (output[metafont])
  2130. !                 metafont_output_char_subr (*(CHAR_BZR_INFO (*c)));
  2131.   
  2132. !               if (output[pstype1])
  2133. !                 pstype1_output_char_subr (*(CHAR_BZR_INFO (*c)));
  2134.   
  2135. !               chars[this_char] = c;
  2136.   
  2137. !           /* We don't deal with Type 3; just output the char below.  */
  2138. !               /* See below also for text.  */
  2139. !           
  2140. !         }
  2141. !         }
  2142. !       bzr_close_input_file ();
  2143.         tfm_close_input_file ();
  2144.       }
  2145.     
  2146. !   if (output[pstype1])
  2147. !     pstype1_intermediate_output ();
  2148. !     
  2149. !   /* Read the composite character definitions.  */
  2150. !   if (ccc_name == NULL)
  2151.       {
  2152. !       ccc_name = font_name;
  2153. !       ccc_warning_p = false;
  2154.       }
  2155.   
  2156. !   ccc_chars = parse_ccc_file (ccc_name, chars, tfm_info, ccc_warning_p);
  2157.   
  2158. -   for (this_char = starting_char; this_char <= ending_char; this_char++)
  2159. -     {
  2160. -       if (chars[this_char] != NULL || ccc_chars[this_char] != NULL)
  2161. -         REPORT1 ("[%u", this_char);
  2162.   
  2163. !       if (chars[this_char] != NULL)
  2164. !         {
  2165. !       char_type c = *(chars[this_char]);
  2166. !           
  2167. !       if (output[metafont])
  2168. !             metafont_output_bzr_char (c);
  2169.   
  2170. !       if (output[pstype1])
  2171. !             pstype1_output_bzr_char (*(CHAR_BZR_INFO (c)));
  2172.   
  2173. !           if (output[pstype3])
  2174. !             pstype3_output_char (*(CHAR_BZR_INFO (c)));
  2175.   
  2176. !           if (output[text])
  2177. !             text_output_bzr_char (*(CHAR_BZR_INFO (c)));
  2178. !         }
  2179. !       else if (ccc_chars[this_char] != NULL)
  2180.           {
  2181. !           if (output[metafont])
  2182. !             metafont_output_ccc_char (*(ccc_chars[this_char]), chars,
  2183. !                                       this_char, global_bzr_designsize);
  2184. !           if (output[pstype1])
  2185. !             pstype1_output_ccc_char (*(ccc_chars[this_char]), chars,
  2186. !                                      this_char, global_bzr_designsize);
  2187.   
  2188. !           if (output[text])
  2189. !             text_output_ccc_char (*(ccc_chars[this_char]));
  2190.           }
  2191.   
  2192. !       if (chars[this_char] != NULL || ccc_chars[this_char] != NULL)
  2193. !         REPORT1 ("]%c", ++char_count % 8 ? ' ' : '\n');
  2194.       }
  2195.   
  2196. !   if (output[metafont]) metafont_finish_output (chars);
  2197. !   if (output[pstype1]) pstype1_finish_output ();
  2198. !   if (output[pstype3]) pstype3_finish_output ();
  2199. !   if (output[text]) text_finish_output (postamble);
  2200.   
  2201. -   if (char_count % 8 != 0)
  2202. -     REPORT ("\n");
  2203.   
  2204. !   return 0;
  2205.   }
  2206.   
  2207. --- 146,455 ----
  2208.     bzr_close_input_file ();
  2209.     
  2210. !   /* Read global TFM information, if we have it, and make sure we have
  2211. !      an encoding vector.  */
  2212. !   init_tfm_and_encoding_info (bzr_name, &tfm_global_info, &encoding_info);
  2213.   
  2214.     if (output[metafont])
  2215. !     metafont_start_output (output_name, preamble, tfm_global_info);
  2216.     if (output[pstype1])
  2217. !     pstype1_start_output (output_name, preamble, postamble);
  2218.     if (output[pstype3])
  2219. !     pstype3_start_output (output_name, preamble, postamble);
  2220.     if (output[text])
  2221. !     text_start_output (font_name, preamble);
  2222.   
  2223.   
  2224. !   /* We don't know which BZR characters the CCC file might use, so just
  2225. !      read them all.  */
  2226. !   bzr_chars = read_bzr_files (bzr_name_list);
  2227.   
  2228. !   /* Read the composite character definitions.  */
  2229. !   if (ccc_name == NULL)
  2230.       {
  2231. !       ccc_name = remove_suffix (font_name);
  2232. !       ccc_warning_p = false;
  2233. !     }
  2234. !   ccc_chars = parse_ccc_file (ccc_name, bzr_chars, tfm_global_info,
  2235. !                               BZR_DESIGN_SIZE (preamble), ccc_warning_p);
  2236. !   /* We've read the input.  Figure out which characters we need as
  2237. !      subroutines (because they're used in the CCC characters).  */
  2238. !   subrs = subr_chars (bzr_chars, ccc_chars, starting_char, ending_char,
  2239. !                       &subr_count);
  2240. !   /* An ugly special case due to context dependence in PostScript.  */
  2241. !   if (output[pstype1])
  2242. !     pstype1_start_subrs (subr_count);
  2243. !   /* Output all the characters needed as subroutines.  We cannot simply
  2244. !      output every character as a subroutine, because for 1200dpi
  2245. !      originals the result is too large to fit in even big Metafont's
  2246. !      260K memory.  */
  2247. !   REPORT ("Writing subroutines:\n");
  2248. !   for (this_char = 0; this_char <= MAX_CHARCODE; this_char++)
  2249. !     if (subrs[this_char])
  2250. !       { 
  2251. !         char_type subr = *subrs[this_char];
  2252. !         
  2253. !         char_count++;
  2254. !         REPORT2 ("[%d]%c", this_char,
  2255. !                  char_count % NCHARS_PER_LINE ? ' ' : '\n');
  2256. !         /* If we have both BZR and CCC definitions for `this_char',
  2257. !            prefer the former.  */
  2258. !         if (CHAR_CLASS (subr) == bzr_char_class)
  2259. !           output_bzr_subr (*CHAR_BZR (subr));
  2260. !         else if (CHAR_CLASS (subr) == ccc_char_class)
  2261. !           output_ccc_subr (*CHAR_CCC (subr), this_char, subrs);
  2262. !         else
  2263. !           abort ();
  2264. !       }
  2265. !   /* The ugly special case continues.  */
  2266. !   if (output[pstype1])
  2267. !     pstype1_start_chars (count_non_subr_chars (subrs, bzr_chars, ccc_chars));
  2268.   
  2269.   
  2270. !   /* And finally, output the non-subroutine characters.  */
  2271. !   REPORT1 ("%sWriting characters:\n",
  2272. !            char_count % NCHARS_PER_LINE ? "\n" : "");
  2273. !   for (this_char = starting_char; this_char <= ending_char; this_char++)
  2274. !     {
  2275. !       if (bzr_chars[this_char] || ccc_chars[this_char])
  2276.           {
  2277. !           char_count++;
  2278. !           REPORT2 ("[%d]%c", this_char,
  2279. !                    char_count % NCHARS_PER_LINE ? ' ' : '\n');
  2280.             
  2281. !           if (bzr_chars[this_char])
  2282. !             output_bzr_char (*bzr_chars[this_char], subrs);
  2283. !           else if (ccc_chars[this_char])
  2284. !             output_ccc_char (*ccc_chars[this_char], this_char, subrs);
  2285. !           else
  2286. !             abort ();
  2287. !         }
  2288. !     }
  2289.   
  2290. !   if (output[metafont]) metafont_finish_output (bzr_name_list, chars);
  2291. !   if (output[pstype1]) pstype1_finish_output ();
  2292. !   if (output[pstype3]) pstype3_finish_output ();
  2293. !   if (output[text]) text_finish_output (postamble);
  2294.   
  2295. !   if (char_count % NCHARS_PER_LINE != 0)
  2296. !     REPORT ("\n");
  2297.   
  2298. !   return 0;
  2299. ! }
  2300. ! /* Read the global information from the TFM file corresponding to
  2301. !    BZR_NAME (if it exists) into TFM_INFO.  Also read an encoding file
  2302. !    specified either by `encoding_name' or the codingscheme info from the
  2303. !    TFM file into ENCODING_INFO.  */
  2304. ! static void
  2305. ! init_tfm_and_encoding_info (string bzr_name, tfm_global_info_type **tfm_info,
  2306. !                             encoding_info_type *encoding_info)
  2307. ! {
  2308. !   /* Open the main TFM file if it exists.  */
  2309. !   string tfm_root = make_suffix (bzr_name, "tfm");
  2310. !   string tfm_name = find_tfm_filename (tfm_root);
  2311.   
  2312. !   if (tfm_name == NULL || !tfm_open_input_file (tfm_name))
  2313. !     {
  2314. !       *tfm_info = NULL;
  2315. !       if (encoding_name == NULL)
  2316. !         encoding_name = DEFAULT_ENCODING;
  2317. !     }
  2318. !   else
  2319. !     {
  2320. !       *tfm_info = XTALLOC1 (tfm_global_info_type);
  2321.   
  2322. !       /* Just get the TFM global info and then close the file again, as
  2323. !          we will open it again later for the characters.  */
  2324. !       **tfm_info = tfm_get_global_info ();
  2325.         tfm_close_input_file ();
  2326. +       /* If the user hasn't specified an encoding name, guess from the
  2327. +          TFM info.  */
  2328. +       if (encoding_name == NULL)
  2329. +         encoding_name
  2330. +           = coding_scheme_to_filename (TFM_CODING_SCHEME (**tfm_info));
  2331.       }
  2332. +   /* In any case, read the encoding file.  I don't think we actually
  2333. +      need this in all cases, but what the heck, it's no problem to read
  2334. +      the default one.  */
  2335. +   *encoding_info = read_encoding_file (encoding_name);
  2336. + }
  2337. + /* Read each BZR file in BZR_NAMES, merging all the characters.  We
  2338. +    scale all characters to the size of the first font, and oblique the
  2339. +    characters if `oblique_angle' is nonzero.  */
  2340. + static bzr_char_type **
  2341. + read_bzr_files (list_type bzr_names)
  2342. + {
  2343. +   unsigned c, name;
  2344. +   bzr_char_type **bzr_chars = XTALLOC (MAX_CHARCODE + 1, bzr_char_type *);
  2345.     
  2346. !   /* Assume we'll find nothing.  */
  2347. !   for (c = 0; c <= MAX_CHARCODE; c++)
  2348. !     bzr_chars[c] = NULL;
  2349. !   /* Read all the files, updating the array as we go.  */
  2350. !   for (name = 0; name < LIST_SIZE (bzr_names); name++)
  2351.       {
  2352. !       string *bzr_name = LIST_ELT (bzr_names, name);
  2353. !       
  2354. !       REPORT1 ("(%s", *bzr_name);
  2355. !       read_bzr_file (bzr_chars, *bzr_name);
  2356. !       REPORT (")\n");
  2357.       }
  2358.   
  2359. !   return bzr_chars;
  2360. ! }
  2361.   
  2362.   
  2363. ! /* If the BZR file BZR_NAME exists, read it and update BZR_CHARS.  We do
  2364. !    not overwrite existing BZR characters, since earlier files should
  2365. !    override later files.  (The first file is the main input file.)
  2366. !    Complain about missing input files, since the user specified all
  2367. !    these names explicitly.  We scale and oblique the characters we read
  2368. !    if desired.  */
  2369.   
  2370. ! static void
  2371. ! read_bzr_file (bzr_char_type *bzr_chars[], string passed_bzr_name)
  2372. ! {
  2373. !   unsigned char_count = 0;
  2374. !   static real output_design_size = 0.0;
  2375. !   string bzr_name = make_suffix (passed_bzr_name, "bzr");
  2376.   
  2377. !   if (bzr_open_input_file (bzr_name))
  2378. !     {
  2379. !       bzr_char_type *file_char;
  2380. !       bzr_preamble_type pre = bzr_get_preamble ();
  2381. !       
  2382. !       /* Scale everything to the design size of the first font.  */
  2383. !       if (output_design_size == 0.0)
  2384. !         output_design_size = BZR_DESIGN_SIZE (pre);
  2385.   
  2386. !       while (file_char = bzr_get_next_char ())
  2387.           {
  2388. !           unsigned code = CHARCODE (*file_char);
  2389. !           
  2390. !           char_count++;
  2391. !           REPORT2 ("%c[%d]", char_count % NCHARS_PER_LINE ? ' ' : '\n', code);
  2392. !           
  2393. !           if (bzr_chars[code] == NULL)
  2394. !             {
  2395. !               real design_size_ratio
  2396. !                 = BZR_DESIGN_SIZE (pre) / output_design_size;
  2397.   
  2398. !               BZR_SHAPE (*file_char)
  2399. !                 = oblique_splines (BZR_SHAPE (*file_char));
  2400. !               scale_char (file_char, design_size_ratio);
  2401. !               
  2402. !               bzr_chars[code] = file_char;
  2403. !             }
  2404. !           else
  2405. !             free (file_char);
  2406.           }
  2407.   
  2408. !       bzr_close_input_file ();
  2409.       }
  2410. +   else
  2411. +     perror (bzr_name);
  2412. + }
  2413. + /* Output BZR_CHAR as a subroutine in whatever output formats the user
  2414. +    has requested.  Except that PostScript Type 3 and text output don't
  2415. +    do subroutines, so we just output the character straight.  */
  2416.   
  2417. ! static void
  2418. ! output_bzr_subr (bzr_char_type bzr_char)
  2419. ! {
  2420. !   if (output[metafont])
  2421. !     metafont_output_bzr_subr (bzr_char);
  2422. !   
  2423. !   if (output[pstype1])
  2424. !     pstype1_output_bzr_subr (bzr_char);
  2425. !   
  2426. !   /* Don't need to do Type 3 or text, since all the subroutines will
  2427. !      also get output as characters.  */
  2428. ! }
  2429.   
  2430.   
  2431. ! /* Output CCC_CHAR as a subroutine.  We do nothing for the Type 3
  2432. !    output format here, since it doesn't deal with subroutines.  */
  2433. ! static void
  2434. ! output_ccc_subr (ccc_type ccc_char, charcode_type code, char_type *subrs[])
  2435. ! {
  2436. !   if (output[metafont])
  2437. !     metafont_output_ccc_subr (ccc_char, code, subrs);
  2438. !   
  2439. !   if (output[pstype1])
  2440. !     pstype1_output_ccc_subr (ccc_char, code, subrs);
  2441. !   
  2442. !   /* Don't need to do Type 3 or text, since all the subroutines will
  2443. !      also get output as characters.  */
  2444. ! }
  2445. ! /* Output BZR_CHAR as a character (as opposed to a subroutine).  */
  2446. ! static void
  2447. ! output_bzr_char (bzr_char_type bzr_char, char_type *subrs[])
  2448. ! {
  2449. !   if (output[metafont])
  2450. !     metafont_output_bzr_char (bzr_char, subrs);
  2451. !   
  2452. !   if (output[pstype1])
  2453. !     pstype1_output_bzr_char (bzr_char, subrs);
  2454. !   
  2455. !   if (output[pstype3])
  2456. !     pstype3_output_char (bzr_char);
  2457. !   
  2458. !   if (output[text])
  2459. !     text_output_bzr_char (bzr_char);
  2460. ! }
  2461. ! /* Output CCC_CHAR as a character (as opposed to a subroutine).  Again,
  2462. !    we do nothing for Type 3 here.  */
  2463. ! static void
  2464. ! output_ccc_char (ccc_type ccc_char, charcode_type code, char_type *subrs[])
  2465. ! {
  2466. !   if (output[metafont])
  2467. !     metafont_output_ccc_char (ccc_char, code, subrs);
  2468. !   
  2469. !   if (output[pstype1])
  2470. !     pstype1_output_ccc_char (ccc_char, code, subrs);
  2471. !   
  2472. !   /* if (output[pstype3])
  2473. !        do nothing; */
  2474. !   
  2475. !   if (output[text])
  2476. !     text_output_ccc_char (ccc_char);
  2477. ! }
  2478. ! /* Count the number of characters (between `starting_char' and
  2479. !    `ending_char') that we will output, not including subroutines.  */
  2480. ! static unsigned
  2481. ! count_non_subr_chars (char_type *subrs[], bzr_char_type *bzr_chars[],
  2482. !                       ccc_type *ccc_chars[])
  2483. ! {
  2484. !   unsigned this_char;
  2485. !   unsigned char_count = 0;
  2486. !   
  2487. !   for (this_char = starting_char; this_char <= ending_char; this_char++)
  2488. !     char_count += bzr_chars[this_char] || ccc_chars[this_char];
  2489. !   return char_count;
  2490.   }
  2491.   
  2492. ***************
  2493. *** 303,308 ****
  2494.   "concat <bzr_name_1>,<bzr_name_2>,...: concatenate the main input bzr file with
  2495.     the given <bzr_name>s; if a character code exists in more than one
  2496. !   bzr file, it's the first occurrence that counts.  You must provide
  2497. !   corresponding TFM files <bzr_name_1>.tfm, <bzr_name_2>.tfm, ...
  2498.   ccc-file <filename>: read the CCC file <filename> (if <filename> has a
  2499.     suffix) or <filename>.ccc (if it doesn't).  Default is <font_name>.
  2500. --- 464,468 ----
  2501.   "concat <bzr_name_1>,<bzr_name_2>,...: concatenate the main input bzr file with
  2502.     the given <bzr_name>s; if a character code exists in more than one
  2503. !   bzr file, it's the first occurrence that counts.
  2504.   ccc-file <filename>: read the CCC file <filename> (if <filename> has a
  2505.     suffix) or <filename>.ccc (if it doesn't).  Default is <font_name>.
  2506. ***************
  2507. *** 309,315 ****
  2508.   encoding <filename>: specify the encoding file; if <filename> has no
  2509.     suffix, use <filename>.enc, otherwise just <filename>.  Default is to
  2510. !   try to guess the encoding from the coding_scheme string in the TFM file.
  2511. ! fontname <string>: the full name of the output font, e.g.,
  2512. !   `Times-BoldItalic'; default is the <font_name>.
  2513.   help: print this message.
  2514.   metafont: translate the font to a Metafont program.
  2515. --- 469,474 ----
  2516.   encoding <filename>: specify the encoding file; if <filename> has no
  2517.     suffix, use <filename>.enc, otherwise just <filename>.  Default is to
  2518. !   try to guess the encoding from the coding_scheme string in the TFM
  2519. !   file if exists, else to use the default " DEFAULT_ENCODING ".
  2520.   help: print this message.
  2521.   metafont: translate the font to a Metafont program.
  2522. ***************
  2523. *** 322,331 ****
  2524.     `metafont', `pstype1' and `pstype3' options are give.  Default is
  2525.     <font_name> with a trailing number removed.
  2526. ! pstype1: translate the font to (unencrypted) PostScript type 1 font format.
  2527. ! pstype3: translate the font to PostScript type 3 font format.
  2528.   range <char1>-<char2>: only work on characters between <char1> and
  2529.     <char2> inclusive.
  2530.   text: translate the font to human-readable text; write to stdout.
  2531. ! verbose: print brief progress reports on stderr.
  2532.   version: print the version number of this program.
  2533.   "
  2534. --- 481,495 ----
  2535.     `metafont', `pstype1' and `pstype3' options are give.  Default is
  2536.     <font_name> with a trailing number removed.
  2537. ! ps-font-info <name>:<value>,...: assign each <value> to the
  2538. !   corresponding <name> when outputting a PostScript font.  Possible
  2539. !   <name>s: FontName, FamilyName, Weight, ItalicAngle, isFixedPitch,
  2540. !   UnderlinePosition, UnderlineThickness, UniqueID, version.  Case is
  2541. !   significant.  See the manual for more details.
  2542. ! pstype1: translate the font to (unencrypted) PostScript Type 1 font format.
  2543. ! pstype3: translate the font to PostScript Type 3 font format.
  2544.   range <char1>-<char2>: only work on characters between <char1> and
  2545.     <char2> inclusive.
  2546.   text: translate the font to human-readable text; write to stdout.
  2547. ! verbose: print brief progress reports.
  2548.   version: print the version number of this program.
  2549.   "
  2550. ***************
  2551. *** 350,353 ****
  2552. --- 514,518 ----
  2553.           { "oblique-angle",    1, 0, 0 },
  2554.           { "output-file",    1, 0, 0 },
  2555. +         { "ps-font-info",    1, 0, 0 },
  2556.           { "pstype1",        0, (int *) &output[pstype1], 1 },
  2557.           { "pstype3",        0, (int *) &output[pstype3], 1 },
  2558. ***************
  2559. *** 392,398 ****
  2560. --- 557,569 ----
  2561.           output_name = optarg;
  2562.   
  2563. +       else if (ARGUMENT_IS ("ps-font-info"))
  2564. +         ps_global_info = optarg;
  2565. +         
  2566.         else if (ARGUMENT_IS ("range"))
  2567.           GET_RANGE (optarg, starting_char, ending_char);
  2568.           
  2569. +       else if (ARGUMENT_IS ("text"))
  2570. +         report_file = stderr;
  2571.         else if (ARGUMENT_IS ("version"))
  2572.           printf ("%s.\n", version_string);
  2573. ***************
  2574. *** 403,408 ****
  2575.     FINISH_COMMAND_LINE ();
  2576.   }
  2577.   
  2578.   /* The string S is a list of font names, separated by commas.  We append
  2579. --- 574,577 ----
  2580. diff -Nrc2 fontutils-0.5/bzrto/main.h fontutils-0.6/bzrto/main.h
  2581. *** fontutils-0.5/bzrto/main.h    Mon Aug 17 09:29:43 1992
  2582. --- fontutils-0.6/bzrto/main.h    Sun Oct 11 17:35:28 1992
  2583. ***************
  2584. *** 21,27 ****
  2585. --- 21,36 ----
  2586.   
  2587.   #include "encoding.h"
  2588. + #include "tfm.h"
  2589.   
  2590.   /* The encoding vector information for the input font.  */
  2591.   extern encoding_info_type encoding_info;
  2592. + /* Which characters to process.  */
  2593. + extern charcode_type starting_char;
  2594. + extern charcode_type ending_char;
  2595. + /* The global information from the main TFM font, or NULL if no such
  2596. +    font could be read.  */
  2597. + extern tfm_global_info_type *tfm_global_info;
  2598.   
  2599.   #endif /* not MAIN_H */
  2600. diff -Nrc2 fontutils-0.5/bzrto/metafont.c fontutils-0.6/bzrto/metafont.c
  2601. *** fontutils-0.5/bzrto/metafont.c    Thu Sep  3 07:36:55 1992
  2602. --- fontutils-0.6/bzrto/metafont.c    Mon Oct 19 16:39:01 1992
  2603. ***************
  2604. *** 20,24 ****
  2605.   
  2606.   #include "bzr.h"
  2607. ! #include "char.h"
  2608.   #include "font.h"
  2609.   #include "spline.h"
  2610. --- 20,25 ----
  2611.   
  2612.   #include "bzr.h"
  2613. ! #include "encoding.h"
  2614. ! #include "filename.h"
  2615.   #include "font.h"
  2616.   #include "spline.h"
  2617. ***************
  2618. *** 26,30 ****
  2619. --- 27,33 ----
  2620.   #include "vector.h"
  2621.   
  2622. + #include "char.h"
  2623.   #include "input-ccc.h"
  2624. + #include "main.h"
  2625.   #include "metafont.h"
  2626.   
  2627. ***************
  2628. *** 37,56 ****
  2629.   
  2630.   
  2631. - /* Whether or not a particular character has been written.  */
  2632. - static boolean mf_char_output_p[MAX_CHARCODE + 1];
  2633.   /* Macros for output to `mf_file'.  */
  2634. ! #define OUT1(str, arg)            fprintf (mf_file, str, arg)
  2635. ! #define OUT2(str, arg1, arg2)        fprintf (mf_file, str, arg1, arg2)
  2636. ! #define OUT3(str, arg1, arg2, arg3) fprintf (mf_file, str, arg1, arg2, arg3)
  2637. ! #define OUT4(str, arg1, arg2, arg3, arg4) \
  2638. !                                  fprintf (mf_file, str, arg1, arg2, arg3, arg4)
  2639. ! #define OUT_LINE(str)             OUT1 ("%s\n", str)
  2640. ! #define OUT_STRING(str)             OUT1 ("%s", str)
  2641. ! #define OUT_STATEMENT(str)         OUT1 ("%s;\n", str)
  2642. ! #define OUT_PT_SHARP_ASSIGNMENT(lhs, rhs)  OUT2 ("%s := %.3fpt#;\n", lhs, rhs)
  2643. ! #define OUT_U_ASSIGNMENT(lhs, rhs)  OUT2 ("%s := %.3fu;\n", lhs, rhs)
  2644.   
  2645.   #define OUT_ZASSIGNMENT(lhs, c, l, s, pt)                \
  2646. --- 40,52 ----
  2647.   
  2648.   
  2649.   /* Macros for output to `mf_file'.  */
  2650. ! #define OUT1(str, a)          fprintf (mf_file, str, a)
  2651. ! #define OUT2(str, a1, a2)      fprintf (mf_file, str, a1, a2)
  2652. ! #define OUT3(str, a1, a2, a3)      fprintf (mf_file, str, a1, a2, a3)
  2653. ! #define OUT4(str, a1, a2, a3, a4) fprintf (mf_file, str, a1, a2, a3, a4)
  2654. ! #define OUT_LINE(str)      OUT1 ("%s\n", str)
  2655. ! #define OUT_STRING(str)    OUT1 ("%s", str)
  2656. ! #define OUT_STATEMENT(str) OUT1 ("%s;\n", str)
  2657.   
  2658.   #define OUT_ZASSIGNMENT(lhs, c, l, s, pt)                \
  2659. ***************
  2660. *** 62,66 ****
  2661.   
  2662.   #define OUT_POINT(p) OUT2 ("(%.3fu,%.3fu)", p.x, p.y)
  2663. - #define OUT_CHAR_SUBR(c) OUT1 (INDENT "%s;\n", charcode_to_subr_name (c))
  2664.   
  2665.   /* How to indent.  */
  2666. --- 58,61 ----
  2667. ***************
  2668. *** 68,75 ****
  2669.   
  2670.   
  2671.   static void out_bb_char (real_bounding_box_type *,
  2672.                            real_coordinate_type *, bzr_char_type);
  2673.   static void out_move (real_coordinate_type *, real, real, boolean);
  2674. ! static void output_ligtable (char_type **);
  2675.   
  2676.   /* Start things off.  We want to write to a Metafont file, e.g.,
  2677. --- 63,77 ----
  2678.   
  2679.   
  2680. + static string charcode_to_subr_name (charcode_type);
  2681.   static void out_bb_char (real_bounding_box_type *,
  2682.                            real_coordinate_type *, bzr_char_type);
  2683.   static void out_move (real_coordinate_type *, real, real, boolean);
  2684. ! static void output_bzr_body (bzr_char_type);
  2685. ! static real_bounding_box_type output_ccc_body (ccc_type, char_type *[]);
  2686. ! static void output_char_title (charcode_type);
  2687. ! static void output_ligtable (list_type, char_type **);
  2688. ! static void output_subr_start (charcode_type code);
  2689. ! static tfm_char_type **read_tfm_files (list_type);
  2690. ! static void read_tfm_file (tfm_char_type *[], string);
  2691.   
  2692.   /* Start things off.  We want to write to a Metafont file, e.g.,
  2693. ***************
  2694. *** 78,82 ****
  2695.   void
  2696.   metafont_start_output (string output_name, bzr_preamble_type pre, 
  2697. !                tfm_global_info_type info)
  2698.   {
  2699.     unsigned this_param;
  2700. --- 80,84 ----
  2701.   void
  2702.   metafont_start_output (string output_name, bzr_preamble_type pre, 
  2703. !                tfm_global_info_type *info)
  2704.   {
  2705.     unsigned this_param;
  2706. ***************
  2707. *** 94,98 ****
  2708.     /* Output the size that our original data is based on.  The font can
  2709.        be generated at sizes different than this.  */
  2710. !   OUT_PT_SHARP_ASSIGNMENT ("true_design_size#", BZR_DESIGN_SIZE (pre));
  2711.     
  2712.     /* The real work is done in an auxiliary file.  */
  2713. --- 96,100 ----
  2714.     /* Output the size that our original data is based on.  The font can
  2715.        be generated at sizes different than this.  */
  2716. !   OUT1 ("true_design_size# := %.3fpt#;\n", BZR_DESIGN_SIZE (pre));
  2717.     
  2718.     /* The real work is done in an auxiliary file.  */
  2719. ***************
  2720. *** 99,118 ****
  2721.     OUT_STATEMENT ("input bzrsetup");
  2722.   
  2723. !   /* Output the fontwide information given in INFO.  */
  2724. !   OUT1 ("font_coding_scheme := \"%s\";\n", TFM_CODING_SCHEME (info));
  2725.     OUT1 ("font_identifier := \"%s\";\n", output_name);
  2726.   
  2727. !   for (this_param = 1; this_param <= TFM_FONTDIMEN_COUNT (info);
  2728. !        this_param++)
  2729. !     OUT2 ("fontdimen %u: %.3fpt# * u#;\n", this_param,
  2730. !           TFM_FONTDIMEN (info, this_param)); 
  2731.   }
  2732.   
  2733. ! /* Metafont doesn't allow numerals in identifiers, so we can't just use
  2734. !    the decimal character code to distinguish the subroutines.  Instead, we
  2735. !    use a base-16 representation where zero is `a', one is `b', ...,
  2736.      fifteen is `o'.  */
  2737.   
  2738. ! #define SUBR_NAME_PREFIX  "charsubr_"
  2739.   
  2740.   static string
  2741. --- 101,179 ----
  2742.     OUT_STATEMENT ("input bzrsetup");
  2743.   
  2744. !   /* Output the fontwide information given in the global `encoding_info'.  */
  2745. !   OUT1 ("font_coding_scheme := \"%s\";\n",
  2746. !         ENCODING_SCHEME_NAME (encoding_info));
  2747.     OUT1 ("font_identifier := \"%s\";\n", output_name);
  2748.   
  2749. !   if (info)
  2750. !     for (this_param = 1; this_param <= TFM_FONTDIMEN_COUNT (*info);
  2751. !          this_param++)
  2752. !       if (TFM_FONTDIMEN (*info, this_param) != 0.0)
  2753. !         OUT2 ("fontdimen %u: %.3fpt# * u#;\n", this_param,
  2754. !               TFM_FONTDIMEN (*info, this_param)); 
  2755. ! }
  2756. ! /* Used to output the character names as ``titles'', which Metafont
  2757. !    displays and puts on proofsheets in some circumstances.  */
  2758. ! static void
  2759. ! output_char_title (charcode_type code)
  2760. ! {
  2761. !   string title = ENCODING_CHAR_NAME (encoding_info, code);
  2762. !   
  2763. !   if (title == NULL)
  2764. !     title = concat ("character #", utoa (code));
  2765. !     
  2766. !   OUT1 (INDENT "\"%s\";\n", title);
  2767.   }
  2768.   
  2769. ! /* Output of subroutines.  The main part of the subroutine is done in
  2770. !    the same way as a character, it's just the adminstrative junk that's
  2771. !    different.  We have to remember some information in case this
  2772. !    subroutine later gets output as a character.  I'm not entirely sure
  2773. !    that we need it in all cases, but it seems cleaner to just always
  2774. !    save it.  */
  2775. ! void
  2776. ! metafont_output_bzr_subr (bzr_char_type c)
  2777. ! {
  2778. !   output_subr_start (CHARCODE (c));
  2779. !   output_bzr_body (c);
  2780. !   OUT_STATEMENT ("enddef");
  2781. ! }
  2782. ! void
  2783. ! metafont_output_ccc_subr (ccc_type c, charcode_type code, char_type *subrs[])
  2784. ! {
  2785. !   output_subr_start (code);
  2786. !   output_ccc_body (c, subrs);
  2787. !   OUT_STATEMENT ("enddef");
  2788. ! }
  2789. ! /* Output the common beginning of a subroutine.  The character name is a
  2790. !    Metafont ``title'' which gets output on proofsheets and sometimes on
  2791. !    the terminal.  */
  2792. ! static void
  2793. ! output_subr_start (charcode_type code)
  2794. ! {
  2795. !   OUT1 ("def %s = \n", charcode_to_subr_name (code));
  2796. !   output_char_title (code);
  2797. ! }
  2798. ! /* When we do need to output a subroutine, however, we have to choose a
  2799. !    name for it.  Since Metafont doesn't allow numerals in identifiers,
  2800. !    so we can't just use the decimal character code to distinguish the
  2801. !    subroutines.  Instead, we use the character name from the global
  2802. !    `encoding_info', or, if the encoding name is not strictly alphabetic
  2803. !    (e.g., `.notdef') a base-16 representation where zero is `a', ...,
  2804.      fifteen is `o'.  */
  2805.   
  2806. ! #define OUT_CHAR_SUBR(c) OUT1 (INDENT "%s;\n", charcode_to_subr_name (c))
  2807. ! #define SUBR_NAME_PREFIX "bzr_subr_"
  2808.   
  2809.   static string
  2810. ***************
  2811. *** 119,128 ****
  2812.   charcode_to_subr_name (charcode_type code)
  2813.   {
  2814. !   unsigned high = code >> 4;
  2815. !   unsigned low = code - (high << 4);
  2816.     
  2817. !   char alpha[3] = { high + 'a', low + 'a', 0 };
  2818.     
  2819. !   return concat (SUBR_NAME_PREFIX, alpha);
  2820.   }
  2821.   
  2822. --- 180,224 ----
  2823.   charcode_to_subr_name (charcode_type code)
  2824.   {
  2825. !   string subr_name;
  2826. !   string name = ENCODING_CHAR_NAME (encoding_info, code);
  2827. !   if (strspn (name, "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ")
  2828. !       != strlen (name))
  2829. !     {
  2830. !       unsigned high = code >> 4;
  2831. !       unsigned low = code - (high << 4);
  2832. !       char alpha[3] = { high + 'a', low + 'a', 0 };
  2833. !       subr_name = concat (SUBR_NAME_PREFIX, alpha);
  2834. !     }
  2835. !   else
  2836. !     subr_name = concat (SUBR_NAME_PREFIX, name);
  2837. !   
  2838. !   return subr_name;
  2839. ! }
  2840. ! /* Output of characters.  Eventually we should do something about
  2841. !    italic corrections.  Also, it might be better to use a symbolic name
  2842. !    for the character code instead of hardwiring an integer constant.
  2843. !    Then different encodings could be selected at Metafont-time.  If the
  2844. !    character is already as a subroutine, just output a call.  */
  2845. ! void
  2846. ! metafont_output_bzr_char (bzr_char_type c, char_type *subrs[])
  2847. ! {
  2848. !   unsigned code = CHARCODE (c);
  2849. !   
  2850. !   OUT4 ("\nbeginchar (%d, %.3fu#, %.3fu#, %.3fu#);\n", 
  2851. !         code, CHAR_SET_WIDTH (c), CHAR_MAX_ROW (c), CHAR_DEPTH (c));
  2852.     
  2853. !   if (subrs[code])
  2854. !     OUT_CHAR_SUBR (code);
  2855. !   else
  2856. !     {
  2857. !       output_char_title (code);
  2858. !       output_bzr_body (c);
  2859. !     }
  2860.     
  2861. !   OUT_STATEMENT ("endchar");
  2862.   }
  2863.   
  2864. ***************
  2865. *** 129,140 ****
  2866.   
  2867.   void
  2868. ! metafont_output_char_subr (bzr_char_type c)
  2869.   {
  2870.     unsigned this_list;
  2871. -   boolean was_output = false;
  2872. -   spline_list_array_type shape = BZR_SHAPE (c);
  2873.     charcode_type code = CHARCODE (c);
  2874. !   OUT1 ("def %s = \n", charcode_to_subr_name (code));
  2875.   
  2876.     /* Go through the list of splines once, assigning the control points
  2877. --- 225,257 ----
  2878.   
  2879.   void
  2880. ! metafont_output_ccc_char (ccc_type c, charcode_type code, char_type *subrs[])
  2881. ! {
  2882. !   real_bounding_box_type bb;
  2883. !   
  2884. !   if (subrs[code])
  2885. !     WARNING ("Sorry, CCC characters can't be subroutines yet");
  2886. !   else
  2887. !     {
  2888. !       OUT1 ("\nbegin_no_dimen_char (%d);\n", code);
  2889. !       output_char_title (code);
  2890. !       bb = output_ccc_body (c, subrs);
  2891. !       /* Set this character's dimensions: width, height, depth.  */
  2892. !       OUT3 (INDENT "set_char_dimens (%.3fu#, %.3fu#, %.3fu#);\n",
  2893. !             BB_WIDTH (bb), MAX_ROW (bb), -MIN_ROW (bb));
  2894. !       OUT_STATEMENT ("end_no_dimen_char");
  2895. !     }
  2896. ! }
  2897. ! /* Output the shape in the BZR character C.  */
  2898. ! static void
  2899. ! output_bzr_body (bzr_char_type c)
  2900.   {
  2901.     unsigned this_list;
  2902.     charcode_type code = CHARCODE (c);
  2903. !   spline_list_array_type shape = BZR_SHAPE (c);
  2904. !   boolean was_output = false;
  2905.   
  2906.     /* Go through the list of splines once, assigning the control points
  2907. ***************
  2908. *** 232,264 ****
  2909.           OUT3 (INDENT INDENT "%u\\%u\\%u,\n", code, this_list, this_spline);
  2910.       }
  2911.     if (was_output)
  2912.       OUT_STRING (");\n");
  2913. -   
  2914. -   OUT_STATEMENT ("enddef");
  2915.   }
  2916. - /* Output a character which only uses one subroutine.  */
  2917.   
  2918. - void
  2919. - metafont_output_bzr_char (char_type c)
  2920. - {
  2921. -   bzr_char_type bzr_char = *CHAR_BZR_INFO (c);
  2922. -   tfm_char_type tfm_char = *CHAR_TFM_INFO (c);
  2923. -   charcode_type code = CHARCODE (bzr_char);
  2924. -   
  2925. -   fprintf (mf_file, "\nbeginchar (%d, %.3fu#, %.3fu#, %.3fu#);\n", 
  2926. -            code, CHAR_SET_WIDTH (bzr_char), BZR_CHAR_MAX_ROW (bzr_char), 
  2927. -            CHAR_DEPTH (bzr_char));
  2928.   
  2929. !   if (TFM_ITALIC_CORRECTION (tfm_char) != 0)
  2930. !     OUT1 (INDENT "italcorr %.3fpt#;\n", TFM_ITALIC_CORRECTION (tfm_char));
  2931. !     
  2932. !   OUT_CHAR_SUBR (code);
  2933. !   OUT_STATEMENT ("endchar");
  2934. !   mf_char_output_p[code] = true;
  2935. ! }
  2936. ! /* Output a character which might use more than one subroutine.
  2937. !    Changes the TFM information for that character.  */
  2938.   
  2939.   #define OUT_HMOVE(h, a) out_move (¤t, h, 0.0, a)
  2940. --- 349,360 ----
  2941.           OUT3 (INDENT INDENT "%u\\%u\\%u,\n", code, this_list, this_spline);
  2942.       }
  2943.     if (was_output)
  2944.       OUT_STRING (");\n");
  2945.   }
  2946.   
  2947.   
  2948. ! /* Output the definition of CCC character CCC_CHAR.  All the subroutines
  2949. !    must be defined in SUBRS.  */
  2950.   
  2951.   #define OUT_HMOVE(h, a) out_move (¤t, h, 0.0, a)
  2952. ***************
  2953. *** 265,271 ****
  2954.   #define OUT_VMOVE(v, a) out_move (¤t, 0.0, v, a)
  2955.   
  2956. ! void
  2957. ! metafont_output_ccc_char (ccc_type ccc_char, char_type **chars,
  2958. !                           charcode_type ccc_code, real bzr_designsize)
  2959.   {
  2960.     unsigned this_cmd;
  2961. --- 361,366 ----
  2962.   #define OUT_VMOVE(v, a) out_move (¤t, 0.0, v, a)
  2963.   
  2964. ! static real_bounding_box_type
  2965. ! output_ccc_body (ccc_type ccc_char, char_type *subrs[])
  2966.   {
  2967.     unsigned this_cmd;
  2968. ***************
  2969. *** 274,279 ****
  2970.       = (real_bounding_box_type) { FLT_MAX, FLT_MIN, FLT_MAX, FLT_MIN };
  2971.   
  2972. -   fprintf (mf_file, "\nbegin_no_dimen_char (%d);\n", ccc_code);
  2973.     for (this_cmd = 0; this_cmd < LIST_SIZE (ccc_char); this_cmd++)
  2974.       { 
  2975. --- 369,372 ----
  2976. ***************
  2977. *** 284,297 ****
  2978.           case TR_SETCHAR:
  2979.             {
  2980. !             bzr_char_type bzr_char
  2981. !               = *CHAR_BZR_INFO (*chars[CCC_CHARCODE (cmd)]);
  2982. !             update_real_bounding_box (&bb, current);
  2983.   
  2984. !             OUT_HMOVE (CHAR_LSB (bzr_char), false);
  2985. !             out_bb_char (&bb, ¤t, bzr_char);
  2986. !             OUT_HMOVE (CHAR_RSB (bzr_char), false);
  2987. !             update_real_bounding_box (&bb, current);
  2988.             }
  2989.             break;
  2990. --- 377,401 ----
  2991.           case TR_SETCHAR:
  2992.             {
  2993. !             char_type subr = *subrs[CCC_CHARCODE (cmd)];
  2994.   
  2995. !             if (CHAR_CLASS (subr) == bzr_char_class)
  2996. !               {
  2997. !                 bzr_char_type bzr_char = *CHAR_BZR (subr);
  2998. !                 
  2999. !                 update_real_bounding_box (&bb, current);
  3000. !                 OUT_HMOVE (CHAR_LSB (bzr_char), false);
  3001. !                 out_bb_char (&bb, ¤t, bzr_char);
  3002. !                 OUT_HMOVE (CHAR_RSB (bzr_char), false);
  3003. !                 update_real_bounding_box (&bb, current);
  3004. !               }
  3005. !             else
  3006. !               /* We haven't implemented this yet since it doesn't seem
  3007. !                  all that necessary at the moment, and it would require
  3008. !                  figuring out a bounding box and possibly side bearings
  3009. !                  for CCC character -- certainly not impossible, but not
  3010. !                  trivial, either.  */
  3011. !               WARNING ("Sorry, I can't `setchar' a CCC char yet");
  3012.             }
  3013.             break;
  3014. ***************
  3015. *** 298,303 ****
  3016.   
  3017.           case TR_SETCHARBB:
  3018. !           out_bb_char (&bb, ¤t,
  3019. !                        *CHAR_BZR_INFO (*chars[CCC_CHARCODE (cmd)]));
  3020.             break;
  3021.   
  3022. --- 402,413 ----
  3023.   
  3024.           case TR_SETCHARBB:
  3025. !           {
  3026. !             char_type subr = *subrs[CCC_CHARCODE (cmd)];
  3027. !             if (CHAR_CLASS (subr) == bzr_char_class)
  3028. !               out_bb_char (&bb, ¤t, *CHAR_BZR (subr));
  3029. !             else
  3030. !               WARNING ("Sorry, I can't `setcharbb' a CCC char yet");
  3031. !           }
  3032.             break;
  3033.   
  3034. ***************
  3035. *** 311,328 ****
  3036.   
  3037.           default:
  3038. !           FATAL2 ("Bad command %d in CCC character %d", CCC_OPCODE (cmd),
  3039. !                   ccc_code);
  3040. !           break;
  3041.       }
  3042.       }
  3043. !    
  3044. !    /* Set this character's dimensions: width, height, depth.  */
  3045. !    
  3046. !   OUT3 (INDENT "set_char_dimens (%.3fu#, %.3fu#, %.3fu#);\n",
  3047. !         BB_WIDTH (bb), MAX_ROW (bb), -MIN_ROW (bb));
  3048. !   OUT_STATEMENT ("end_no_dimen_char");
  3049. !   mf_char_output_p[ccc_code] = true;
  3050. !   char_make_tfm (chars, ccc_code, bb);
  3051.   }
  3052.   
  3053. --- 421,429 ----
  3054.   
  3055.           default:
  3056. !           FATAL1 ("Bad command %d in CCC character", CCC_OPCODE (cmd));
  3057.       }
  3058.       }
  3059. !   
  3060. !   return bb;
  3061.   }
  3062.   
  3063. ***************
  3064. *** 356,360 ****
  3065.   {
  3066.     /* Update BB with the current point.  */
  3067. !   update_real_bounding_box (bb, VOFFSET_POINT (BZR_CHAR_MIN_ROW (bzr_char)));
  3068.   
  3069.     /* Output the call to the character.  */
  3070. --- 457,461 ----
  3071.   {
  3072.     /* Update BB with the current point.  */
  3073. !   update_real_bounding_box (bb, VOFFSET_POINT (CHAR_MIN_ROW (bzr_char)));
  3074.   
  3075.     /* Output the call to the character.  */
  3076. ***************
  3077. *** 362,378 ****
  3078.     
  3079.     /* Move by the width of the shape.  */
  3080. !   out_move (current, BZR_CHAR_BB_WIDTH (bzr_char), 0, false);
  3081.   
  3082.     /* Update the BB again with the new current point.  */
  3083. !   update_real_bounding_box (bb, VOFFSET_POINT (BZR_CHAR_MAX_ROW (bzr_char)));
  3084.   }
  3085.   
  3086. ! /* We use `bye' to finish off the Metafont output, instead of the
  3087. !    primitive `end', since that makes adding cleanup operations simpler.  */
  3088.   
  3089.   void
  3090. ! metafont_finish_output (char_type **chars)
  3091.   {
  3092. !   output_ligtable (chars);
  3093.     
  3094.     OUT_LINE ("\nbye.");
  3095. --- 463,480 ----
  3096.     
  3097.     /* Move by the width of the shape.  */
  3098. !   out_move (current, BB_WIDTH (CHAR_BB (bzr_char)), 0, false);
  3099.   
  3100.     /* Update the BB again with the new current point.  */
  3101. !   update_real_bounding_box (bb, VOFFSET_POINT (CHAR_MAX_ROW (bzr_char)));
  3102.   }
  3103.   
  3104. ! /* We use a macro `bye' to finish off the Metafont output, instead of the
  3105. !    primitive `end', for maximal flexibility.  (Although in practice it
  3106. !    makes no difference, since `end' can be redefined just like `bye'.)  */
  3107.   
  3108.   void
  3109. ! metafont_finish_output (list_type bzr_names, char_type **chars)
  3110.   {
  3111. !   output_ligtable (bzr_names, chars);
  3112.     
  3113.     OUT_LINE ("\nbye.");
  3114. ***************
  3115. *** 381,392 ****
  3116.   
  3117.   
  3118. ! /* True if didn't get output to `mf_file', or if the character
  3119. !    doesn't exist in the TFM file.  (The latter should only occur if the
  3120. !    TFM file being read doesn't match the bitmap file from which we
  3121. !    generated the BZR file .)  */
  3122. ! #define NO_CHAR_P(code)                         \
  3123. !   (!mf_char_output_p[code]                         \
  3124. !    || !TFM_CHAR_EXISTS (*(CHAR_TFM_INFO (*(chars[code])))))
  3125.   
  3126.   /* Start or continue the ligtable for the character CODE.  */
  3127. --- 483,489 ----
  3128.   
  3129.   
  3130. ! /* True if the character CODE exists in the array `tfm_chars'.  */
  3131. ! #define HAVE_CHAR_P(code) (tfm_chars[code] != NULL)
  3132.   
  3133.   /* Start or continue the ligtable for the character CODE.  */
  3134. ***************
  3135. *** 405,424 ****
  3136.   
  3137.   static void
  3138. ! output_ligtable (char_type **chars)
  3139.   {
  3140.     unsigned code;
  3141.     
  3142. !   for (code = 0; code <= MAX_CHARCODE; code++)
  3143.       {
  3144.         list_type kern_list, ligature_list;
  3145.         unsigned this_kern, this_lig;
  3146. !       tfm_char_type *c = CHAR_TFM_INFO (*(chars[code]));
  3147.         boolean output_something = false;
  3148.         
  3149. !       /* If this character didn't get output, or if we don't have TFM
  3150. !          information for it, don't do anything.  */
  3151. !       if (NO_CHAR_P (code))
  3152.           continue;
  3153. !       
  3154.         /* Output the kerns.  */
  3155.         kern_list = c->kern;
  3156. --- 502,523 ----
  3157.   
  3158.   static void
  3159. ! output_ligtable (list_type bzr_names, char_type **chars)
  3160.   {
  3161.     unsigned code;
  3162. +   tfm_char_type **tfm_chars = read_tfm_files (bzr_names);
  3163.     
  3164. !   for (code = starting_char; code <= ending_char; code++)
  3165.       {
  3166.         list_type kern_list, ligature_list;
  3167.         unsigned this_kern, this_lig;
  3168. !       tfm_char_type *c;
  3169.         boolean output_something = false;
  3170.         
  3171. !       /* If we don't have TFM information for CODE, don't do anything.  */
  3172. !       if (!HAVE_CHAR_P (code))
  3173.           continue;
  3174. !       c = tfm_chars[code];
  3175.         /* Output the kerns.  */
  3176.         kern_list = c->kern;
  3177. ***************
  3178. *** 427,435 ****
  3179.             tfm_kern_type *kern = LIST_ELT (kern_list, this_kern);
  3180.   
  3181. !           if (NO_CHAR_P (kern->character))
  3182. !             continue;
  3183. !           LIGTABLE_ENTRY (code);
  3184. !           OUT2 ("hex\"%x\" kern %.4fpt#", kern->character, kern->kern);
  3185.           }
  3186.         
  3187. --- 526,534 ----
  3188.             tfm_kern_type *kern = LIST_ELT (kern_list, this_kern);
  3189.   
  3190. !           if (HAVE_CHAR_P (kern->character))
  3191. !             {
  3192. !               LIGTABLE_ENTRY (code);
  3193. !               OUT2 ("hex\"%x\" kern %.3fpt#", kern->character, kern->kern);
  3194. !             }
  3195.           }
  3196.         
  3197. ***************
  3198. *** 440,448 ****
  3199.             tfm_ligature_type *lig = LIST_ELT (ligature_list, this_lig);
  3200.   
  3201. !           if (NO_CHAR_P (lig->character) || NO_CHAR_P (lig->ligature))
  3202. !             continue;
  3203. !       LIGTABLE_ENTRY (code);
  3204. !           OUT2 ("hex\"%x\" =: hex\"%x\"", lig->character, lig->ligature);
  3205.           }
  3206.   
  3207. --- 539,547 ----
  3208.             tfm_ligature_type *lig = LIST_ELT (ligature_list, this_lig);
  3209.   
  3210. !           if (HAVE_CHAR_P (lig->character) && HAVE_CHAR_P (lig->ligature))
  3211. !           {
  3212. !           LIGTABLE_ENTRY (code);
  3213. !             OUT2 ("hex\"%x\" =: hex\"%x\"", lig->character, lig->ligature);
  3214. !           }
  3215.           }
  3216.   
  3217. ***************
  3218. *** 449,452 ****
  3219. --- 548,611 ----
  3220.         if (output_something)
  3221.           OUT_LINE (";");
  3222. +     }
  3223. + }
  3224. + /* We want to retain kerning and ligature information from the original
  3225. +    TFM files, if such exist.  Our goal here is to read the TFM file
  3226. +    corresponding to each name in BZR_NAMES and return the union of all
  3227. +    the characters found as an array of `tfm_char_type's.  We do not
  3228. +    complain about nonexistent TFM files.  */
  3229. + static tfm_char_type **
  3230. + read_tfm_files (list_type bzr_names)
  3231. + {
  3232. +   unsigned c, name;
  3233. +   tfm_char_type **tfm_chars = XTALLOC (MAX_CHARCODE + 1, tfm_char_type *);
  3234. +   
  3235. +   /* Assume we'll find nothing.  */
  3236. +   for (c = 0; c <= MAX_CHARCODE; c++)
  3237. +     tfm_chars[c] = NULL;
  3238. +   /* Read all the files, updating the array as we go.  */
  3239. +   for (name = 0; name < LIST_SIZE (bzr_names); name++)
  3240. +     {
  3241. +       string *bzr_name = LIST_ELT (bzr_names, name);
  3242. +       
  3243. +       read_tfm_file (tfm_chars, *bzr_name);
  3244. +     }
  3245. +   return tfm_chars;
  3246. + }
  3247. + /* If the TFM file corresponding to BZR_NAME exists, read it and update
  3248. +    TFM_CHARS.  We do not overwrite existing TFM characters, since
  3249. +    earlier files should override later files.  (The first file is the
  3250. +    main input file.)  Arguably multiple characters should be a warning,
  3251. +    but I'm not sure.  */
  3252. + static void
  3253. + read_tfm_file (tfm_char_type *tfm_chars[], string bzr_name)
  3254. + {
  3255. +   string tfm_root = make_suffix (bzr_name, "tfm");
  3256. +   string tfm_name = find_tfm_filename (tfm_root);
  3257. +   if (tfm_name != NULL && tfm_open_input_file (tfm_name))
  3258. +     {
  3259. +       unsigned code;
  3260. +       tfm_char_type *file_chars = tfm_get_chars ();
  3261. +       
  3262. +       for (code = 0; code <= MAX_CHARCODE; code++)
  3263. +         {
  3264. +           if (tfm_chars[code] == NULL && TFM_CHAR_EXISTS (file_chars[code]))
  3265. +             {
  3266. +               tfm_chars[code] = XTALLOC1 (tfm_char_type);
  3267. +               *tfm_chars[code] = file_chars[code];
  3268. +             }
  3269. +         }
  3270. +       free (file_chars);
  3271. +       tfm_close_input_file ();
  3272.       }
  3273.   }
  3274. diff -Nrc2 fontutils-0.5/bzrto/metafont.h fontutils-0.6/bzrto/metafont.h
  3275. *** fontutils-0.5/bzrto/metafont.h    Mon Aug 17 15:18:14 1992
  3276. --- fontutils-0.6/bzrto/metafont.h    Mon Oct 19 16:39:01 1992
  3277. ***************
  3278. *** 28,43 ****
  3279.   /* This is called first.  */
  3280.   extern void metafont_start_output (string output_name, bzr_preamble_type, 
  3281. !                    tfm_global_info_type);
  3282.   
  3283. ! /* Then this is called for each character.  */
  3284. ! extern void metafont_output_char_subr (bzr_char_type);
  3285.   
  3286.   /* Then we call one or the other of these.  */
  3287. ! extern void metafont_output_bzr_char (char_type);
  3288. ! extern void metafont_output_ccc_char (ccc_type, char_type **,
  3289. !                       charcode_type, real);
  3290.   
  3291.   /* And finally this is called at the end.  */
  3292. ! extern void metafont_finish_output (char_type **);
  3293.   
  3294.   #endif /* not METAFONT_H */
  3295. --- 28,43 ----
  3296.   /* This is called first.  */
  3297.   extern void metafont_start_output (string output_name, bzr_preamble_type, 
  3298. !                    tfm_global_info_type *);
  3299.   
  3300. ! /* Then these are called for characters needed as subroutines.  */
  3301. ! extern void metafont_output_bzr_subr (bzr_char_type);
  3302. ! extern void metafont_output_ccc_subr (ccc_type, charcode_type, char_type *[]);
  3303.   
  3304.   /* Then we call one or the other of these.  */
  3305. ! extern void metafont_output_bzr_char (bzr_char_type, char_type *[]);
  3306. ! extern void metafont_output_ccc_char (ccc_type, charcode_type, char_type *[]);
  3307.   
  3308.   /* And finally this is called at the end.  */
  3309. ! extern void metafont_finish_output (list_type, char_type **);
  3310.   
  3311.   #endif /* not METAFONT_H */
  3312. diff -Nrc2 fontutils-0.5/bzrto/pstype1.c fontutils-0.6/bzrto/pstype1.c
  3313. *** fontutils-0.5/bzrto/pstype1.c    Mon Aug 31 15:43:04 1992
  3314. --- fontutils-0.6/bzrto/pstype1.c    Mon Oct 19 17:15:36 1992
  3315. ***************
  3316. *** 23,29 ****
  3317.   #include "bzr.h"
  3318.   #include "char.h"
  3319.   #include "hexify.h"
  3320.   #include "spline.h"
  3321. - #include "tfm.h"
  3322.   #include "varstring.h"
  3323.   #include "vector.h"
  3324. --- 23,29 ----
  3325.   #include "bzr.h"
  3326.   #include "char.h"
  3327. + #include "encoding.h"
  3328.   #include "hexify.h"
  3329.   #include "spline.h"
  3330.   #include "varstring.h"
  3331.   #include "vector.h"
  3332. ***************
  3333. *** 44,53 ****
  3334.   static real em_factor;
  3335.   
  3336. ! /* The interword space from the TFM file, in points.  */
  3337. ! static real tfm_space;
  3338.   
  3339. ! /* The UniqueID from the font info, or zero.  */
  3340. ! static unsigned unique_id;
  3341.   
  3342.   
  3343.   /* This should be used for outputting a string S on a line by itself.  */
  3344. --- 44,67 ----
  3345.   static real em_factor;
  3346.   
  3347. ! /* The interword space, in points.  */
  3348. ! static real interword_space;
  3349.   
  3350. ! /* Whether or not a particular character has been written.  We depend on
  3351. !    this being initialized to false by virtue of its storage class.  */
  3352. ! static boolean char_output_p[ENCODING_VECTOR_SIZE];
  3353. ! /* For each character code, tells the corresponding subroutine number;
  3354. !    assigned by `output_subr_start'.  */
  3355. ! static unsigned subr_number[MAX_CHARCODE + 1];
  3356.   
  3357. + /* As we read a character, we encode each command in the Type 1 scheme
  3358. +    and stick the result into a buffer.  (Because we need to output the
  3359. +    length of the entire charstring before we output the charstring
  3360. +    itself, we can't output as we go.)  */
  3361. + static variable_string charstring_buffer;
  3362. + /* Before encrypting, fill this and prepend onto above.  */
  3363. + static variable_string pre_charstring_buffer;
  3364.   
  3365.   /* This should be used for outputting a string S on a line by itself.  */
  3366. ***************
  3367. *** 64,99 ****
  3368.   #define OUT4(s, e1, e2, e3, e4)                        \
  3369.     do { fprintf (ps_file, s, e1, e2, e3, e4); } while (0)
  3370.   /* Type 1 opcodes.  */
  3371.   typedef unsigned char type1_opcode;
  3372.   
  3373. ! #define T1_CALLSUBR        10
  3374. ! #define T1_CLOSEPATH        9
  3375. ! #define T1_ENDCHAR        14
  3376. ! #define T1_HLINETO        6
  3377. ! #define T1_HMOVETO        22
  3378. ! #define T1_HSBW            13
  3379. ! #define T1_HVCURVETO        31
  3380. ! #define T1_RETURN        11
  3381. ! #define T1_RLINETO        5
  3382. ! #define T1_RMOVETO        21
  3383. ! #define T1_RRCURVETO        8
  3384.   #define T1_VHCURVETO    30
  3385. ! #define T1_VLINETO    7
  3386. ! #define T1_VMOVETO    4
  3387. ! #define PUT_END "|"
  3388. ! #define DEF_END "|-"
  3389. ! /* The first three positions in the Subrs array are reserved.  */
  3390. ! #define SUBRS_OFFSET 4
  3391. ! #define CHARCODE_TO_SUBRS_INDEX(c) ((c) + SUBRS_OFFSET)
  3392.   
  3393. ! #define OUT_CHAR_SUBR(c)                         \
  3394. !  do {                                    \
  3395. !       absolute_cs_number (CHARCODE_TO_SUBRS_INDEX (c), &charstring_buffer);\
  3396. !       cs_byte (T1_CALLSUBR, &charstring_buffer);            \
  3397. !     } while (0)
  3398.   
  3399.   static void begin_char (string);
  3400.   static void end_char (real, real);
  3401. --- 78,105 ----
  3402.   #define OUT4(s, e1, e2, e3, e4)                        \
  3403.     do { fprintf (ps_file, s, e1, e2, e3, e4); } while (0)
  3404.   /* Type 1 opcodes.  */
  3405.   typedef unsigned char type1_opcode;
  3406.   
  3407. ! #define T1_CALLSUBR    10
  3408. ! #define T1_CLOSEPATH     9
  3409. ! #define T1_ENDCHAR    14
  3410. ! #define T1_HLINETO     6
  3411. ! #define T1_HMOVETO    22
  3412. ! #define T1_HSBW        13
  3413. ! #define T1_HVCURVETO    31
  3414. ! #define T1_RETURN    11
  3415. ! #define T1_RLINETO     5
  3416. ! #define T1_RMOVETO    21
  3417. ! #define T1_RRCURVETO     8
  3418.   #define T1_VHCURVETO    30
  3419. ! #define T1_VLINETO     7
  3420. ! #define T1_VMOVETO     4
  3421.   
  3422. ! #define READONLY_PUT "|"
  3423. ! #define READONLY_DEF "|-"
  3424.   
  3425. + static void absolute_cs_number (int, variable_string *);
  3426.   static void begin_char (string);
  3427.   static void end_char (real, real);
  3428. ***************
  3429. *** 101,108 ****
  3430.   static variable_string cs_encrypt (variable_string);
  3431.   static void cs_number (real, variable_string *);
  3432. - static void absolute_cs_number (int, variable_string *);
  3433.   static void init_charstring_buffers (void);
  3434.   static void out_curveto (real_coordinate_type *, spline_type);
  3435.   static void out_lineto (real_coordinate_type *, real_coordinate_type);
  3436.   static void out_moveto (real_coordinate_type *, real_coordinate_type);
  3437.   static void out_point (real_coordinate_type *, real_coordinate_type);
  3438. --- 107,116 ----
  3439.   static variable_string cs_encrypt (variable_string);
  3440.   static void cs_number (real, variable_string *);
  3441.   static void init_charstring_buffers (void);
  3442. + static void out_bb_char
  3443. +   (real_bounding_box_type *, real_coordinate_type *, bzr_char_type);
  3444.   static void out_curveto (real_coordinate_type *, spline_type);
  3445.   static void out_lineto (real_coordinate_type *, real_coordinate_type);
  3446. + static void out_move (real_coordinate_type *, real, real, boolean);
  3447.   static void out_moveto (real_coordinate_type *, real_coordinate_type);
  3448.   static void out_point (real_coordinate_type *, real_coordinate_type);
  3449. ***************
  3450. *** 109,144 ****
  3451.   static void out_relative_cmd (real_coordinate_type *, real_coordinate_type,
  3452.                                 type1_opcode, type1_opcode, type1_opcode);
  3453.   static void output_charstring_buffers (string);
  3454. ! static void output_private_dict_1 (void);
  3455.   static void output_private_dict_2 (void);
  3456.   static int points_to_adobes (real);
  3457.   
  3458. ! /* As we read a character, we encode each command in the Type 1 scheme
  3459. !    and stick the result into a buffer.  (Because we need to output the
  3460. !    length of the entire charstring before we output the charstring
  3461. !    itself, we can't output as we go.)  */
  3462. ! static variable_string charstring_buffer;
  3463.   
  3464. ! /* Before encrypting, fill this and prepend onto above.  */
  3465. ! static variable_string pre_charstring_buffer;
  3466.   
  3467. ! /* This should be called before the others in this file.  It opens the
  3468. !    output file `OUTPUT_NAME.gsf', writes some preliminary boilerplate, the
  3469. !    font bounding box, and sets up to write the characters.  */
  3470.   
  3471.   void
  3472. ! pstype1_start_output (string font_name, string output_name,
  3473. !               bzr_preamble_type pre, bzr_postamble_type post, 
  3474. !                       string ps_fontname, tfm_global_info_type tfm_info)
  3475. ! {
  3476. !   /* Find general information about the font.  Pass in the filename
  3477. !      we were given.  */
  3478. !   ps_font_info_type ps_info = ps_init (font_name, ps_fontname, tfm_info);
  3479. !   /* Remember the natural interword space, so we can output it later, if
  3480. !      necessary.  Ditto for the UniqueID.  */
  3481. !   tfm_space = TFM_SAFE_FONTDIMEN (tfm_info, TFM_SPACE_PARAMETER, 0);
  3482. !   unique_id = ps_info.unique_id;
  3483.   
  3484.     /* If a Type 3 font is eexec-encrypted and in ASCII, its extension
  3485.        should be `pfa'.  If they are eexec-encrypted and binary, its
  3486. --- 117,158 ----
  3487.   static void out_relative_cmd (real_coordinate_type *, real_coordinate_type,
  3488.                                 type1_opcode, type1_opcode, type1_opcode);
  3489. + static void output_bzr_body (bzr_char_type);
  3490. + static real_bounding_box_type output_ccc_body (ccc_type, char_type **);
  3491. + static void output_char_finish (real, real, charcode_type);
  3492. + static boolean output_char_start (charcode_type);
  3493.   static void output_charstring_buffers (string);
  3494. ! static void output_private_dict_1 (unsigned);
  3495.   static void output_private_dict_2 (void);
  3496. + static void output_subr_end (void);
  3497. + static void output_subr_start (charcode_type);
  3498.   static int points_to_adobes (real);
  3499.   
  3500. ! /* Convert N, a number in printer's points, to the 1000-unit/em
  3501. !    coordinate system the Type 1 format requires.  (We call these units
  3502. !    ``adobes''.)  We've already computed the scaling factor `em_factor'
  3503. !    for this, since it depends only on the design size of the font.  */
  3504.   
  3505. ! static int
  3506. ! points_to_adobes (real n)
  3507. ! {
  3508. !   int n_in_adobes = ROUND (n * em_factor);
  3509. !   
  3510. !   return n_in_adobes;
  3511. ! }
  3512.   
  3513. ! /* This routine should be called before the others in this file.  It
  3514. !    opens the output file `OUTPUT_NAME.gsf', writes some preliminary
  3515. !    boilerplate, the font bounding box, and sets up to write the
  3516. !    characters.  */
  3517.   
  3518.   void
  3519. ! pstype1_start_output (string output_name,
  3520. !               bzr_preamble_type pre, bzr_postamble_type post)
  3521. ! {
  3522. !   ps_font_info_type ps_info = ps_set_font_info ();
  3523.   
  3524. +   /* Remember the natural interword space, so we can output it later.  */
  3525. +   interword_space = ps_info.interword_space;
  3526.     /* If a Type 3 font is eexec-encrypted and in ASCII, its extension
  3527.        should be `pfa'.  If they are eexec-encrypted and binary, its
  3528. ***************
  3529. *** 159,163 ****
  3530.        this font's size.  */
  3531.     OUT_LINE ("/FontMatrix [0.001 0 0 0.001 0 0] readonly def"); 
  3532. !   em_factor = 1000.0 / TFM_DESIGN_SIZE (tfm_info);
  3533.     
  3534.     /* Some interpreters refuse to handle a normal array,
  3535. --- 173,177 ----
  3536.        this font's size.  */
  3537.     OUT_LINE ("/FontMatrix [0.001 0 0 0.001 0 0] readonly def"); 
  3538. !   em_factor = 1000.0 / BZR_DESIGN_SIZE (pre);
  3539.     
  3540.     /* Some interpreters refuse to handle a normal array,
  3541. ***************
  3542. *** 172,204 ****
  3543.        we've read all the characters, so we can guess good values.  I hope
  3544.        this doesn't break any interpreters, but it probably will.  */
  3545. !   output_private_dict_1 ();
  3546. !   /* Start the character subroutine definitions.  */
  3547.     
  3548. !   /* Define Subrs as part of Private; also, we must make the procedures
  3549. !      in the Private dictionary visible because the CharStrings definitions
  3550. !      will use them.  */
  3551.     OUT_LINE ("Private begin");
  3552. !   OUT1 ("/Subrs %d array \n", MAX_CHARCODE + 1 + SUBRS_OFFSET);
  3553.   }
  3554.   void
  3555. ! pstype1_intermediate_output ()
  3556.   {
  3557. !   /* End the subroutine definitions and start the character definitions.
  3558. !      Aside from the characters in the input font, we always output
  3559. !      characters `.notdef' and `space'.  */
  3560. !      
  3561. !   OUT_LINE (DEF_END);
  3562. !   OUT1 ("/CharStrings %d dict begin\n", MAX_CHARCODE + 1);
  3563.   
  3564. !   begin_char (".notdef");
  3565. !   end_char (0, 0);
  3566.   }
  3567.   
  3568. ! /* Output the character C as a subroutine.  */
  3569.   
  3570.   void
  3571. ! pstype1_output_char_subr (bzr_char_type c)
  3572.   {
  3573.     unsigned this_list;
  3574. --- 186,372 ----
  3575.        we've read all the characters, so we can guess good values.  I hope
  3576.        this doesn't break any interpreters, but it probably will.  */
  3577. !   output_private_dict_1 (ps_info.unique_id);
  3578. ! }
  3579. ! /* Start the character subroutine definitions.  We need to make the
  3580. !    procedures in `Private' visible because the charstring definitions
  3581. !    use them -- i.e., the `-|', `-|', and `|' routines.  */
  3582.     
  3583. ! void
  3584. ! pstype1_start_subrs (unsigned subr_count)
  3585. ! {
  3586.     OUT_LINE ("Private begin");
  3587. !   OUT1 ("/Subrs %d array \n", subr_count);
  3588.   }
  3589. ! /* Output the BZR character C as a subroutine.  */
  3590.   void
  3591. ! pstype1_output_bzr_subr (bzr_char_type c)
  3592.   {
  3593. !   output_subr_start (CHARCODE (c));
  3594. !   output_bzr_body (c);
  3595. !   output_subr_end ();
  3596. ! }
  3597.   
  3598. ! /* And the same, for the CCC character C.  */
  3599. ! void
  3600. ! pstype1_output_ccc_subr (ccc_type c, charcode_type code, char_type *subrs[])
  3601. ! {
  3602. !   output_subr_start (code);
  3603. !   output_ccc_body (c, subrs);
  3604. !   output_subr_end ();
  3605. ! }
  3606. ! /* Output a call to the subroutine corresponding to the character code
  3607. !    CODE.  */
  3608. ! #define OUT_CHAR_SUBR(code)                         \
  3609. !  do {                                    \
  3610. !    absolute_cs_number (subr_number[code], &charstring_buffer);        \
  3611. !    cs_byte (T1_CALLSUBR, &charstring_buffer);                \
  3612. !  } while (0)
  3613. ! /* Output the common beginning of a subroutine.  We don't check if CODE
  3614. !    is in the encoding, since a character might well be used as a
  3615. !    subroutine but not be encoded.  */
  3616. ! static void
  3617. ! output_subr_start (charcode_type code)
  3618. ! {
  3619. !   static unsigned current_subr_number = 0;
  3620. !   
  3621. !   subr_number[code] = current_subr_number;
  3622. !   OUT1 ("dup %d ", current_subr_number++);
  3623. !   init_charstring_buffers ();
  3624. ! }
  3625. ! /* And the common ending.  */
  3626. ! static void
  3627. ! output_subr_end ()
  3628. ! {
  3629. !   cs_byte (T1_RETURN, &charstring_buffer);
  3630. !   output_charstring_buffers (READONLY_PUT);
  3631.   }
  3632.   
  3633. ! /* End the subroutine definitions and start the character definitions.
  3634. !    Aside from the characters in the input font, we always output
  3635. !    the two characters `.notdef' and `space' (this happens in
  3636. !    `pstype1_finish_output).  */
  3637. !      
  3638. ! void
  3639. ! pstype1_start_chars (unsigned char_count)
  3640. ! {
  3641. !   OUT_LINE (READONLY_DEF " % Subrs");
  3642. !   OUT1 ("/CharStrings %d dict begin\n", char_count + 2);
  3643. ! }
  3644. ! /* Output the BZR character C; if it is defined in SUBRS, just output a
  3645. !    call to the already-defined subroutine.  */
  3646. ! void
  3647. ! pstype1_output_bzr_char (bzr_char_type c, char_type *subrs[])
  3648. ! {
  3649. !   unsigned code = CHARCODE (c);
  3650. !   
  3651. !   if (output_char_start (code))
  3652. !     {
  3653. !       if (subrs[code])
  3654. !         OUT_CHAR_SUBR (code);
  3655. !       else
  3656. !         output_bzr_body (c);
  3657. !       
  3658. !       output_char_finish (CHAR_LSB (c), CHAR_SET_WIDTH (c), code);
  3659. !     }
  3660. ! }
  3661.   
  3662. + /* Output the CCC character C with character code CODE, and using the
  3663. +    character definitions in SUBRS.  */
  3664.   void
  3665. ! pstype1_output_ccc_char (ccc_type c, charcode_type code, char_type *subrs[])
  3666. ! {
  3667. !   if (output_char_start (code))
  3668. !     {
  3669. !       if (subrs[code])
  3670. !         WARNING ("Sorry, CCC characters can't be subroutines yet");
  3671. !       else
  3672. !         {
  3673. !           real_bounding_box_type bb = output_ccc_body (c, subrs);
  3674. !           output_char_finish (MIN_COL (bb), MAX_COL (bb), code);
  3675. !         }
  3676. !     }
  3677. ! }
  3678. ! /* Common beginning for characters.  */
  3679. ! static boolean
  3680. ! output_char_start (charcode_type code)
  3681. ! {
  3682. !   string charname = ps_encoding_name (code);
  3683. !   boolean ok = !STREQ (charname, ".notdef");
  3684. !   
  3685. !   if (ok)
  3686. !     begin_char (charname);
  3687. !   
  3688. !   return ok;
  3689. ! }
  3690. ! /* Begin a character definition, i.e., a definition in the CharStrings
  3691. !    dictionary.  We are given the character name, the left sidebearing,
  3692. !    and the set width.  The latter two are in printer's points.  We
  3693. !    always output an `hsbw' command -- our characters do not have y
  3694. !    sidebearings.  */
  3695. ! static void
  3696. ! begin_char (string name)
  3697. ! {
  3698. !   OUT1 ("/%s\t", name);
  3699. !   /* We cannot just output the bytes of the charstring as we go, because
  3700. !      we need to output the length of the charstring before the
  3701. !      charstring itself, so we can use readhexstring in the PostScript.  */
  3702. !   init_charstring_buffers ();
  3703. ! }
  3704. ! /* Common ending.  */
  3705. ! static void
  3706. ! output_char_finish (real lsb, real set_width, charcode_type code)
  3707. ! {
  3708. !   end_char (lsb, set_width);
  3709. !   char_output_p[code] = true;
  3710. ! }
  3711. ! /* End a character definition with the `endchar' command.  */
  3712. ! static void
  3713. ! end_char (real lsb, real set_width)
  3714. ! {
  3715. !   cs_number (lsb, &pre_charstring_buffer);
  3716. !   cs_number (set_width, &pre_charstring_buffer);
  3717. !   cs_byte (T1_HSBW, &pre_charstring_buffer);
  3718. !   cs_byte (T1_ENDCHAR, &charstring_buffer);
  3719. !   output_charstring_buffers (READONLY_DEF);
  3720. ! }
  3721. ! /* Output the splines in C.  */
  3722. ! static void
  3723. ! output_bzr_body (bzr_char_type c)
  3724.   {
  3725.     unsigned this_list;
  3726. ***************
  3727. *** 206,218 ****
  3728.     real_coordinate_type start = { 0.0, 0.0 };
  3729.     real_coordinate_type current = start;
  3730. -   charcode_type code = CHARCODE (c);
  3731. -   string charname = ps_encoding_name (code);
  3732. -   
  3733. -   if (STREQ (charname, ".notdef"))
  3734. -     return;
  3735. -     
  3736. -   /* Start the definition.  */
  3737. -   OUT1 ("dup %d ", CHARCODE_TO_SUBRS_INDEX (code));
  3738. -   init_charstring_buffers ();
  3739.   
  3740.     /* Go through the list of splines, outputting the
  3741. --- 374,377 ----
  3742. ***************
  3743. *** 242,397 ****
  3744.         cs_byte (T1_CLOSEPATH, &charstring_buffer);
  3745.       }
  3746. -   out_moveto (¤t, start);
  3747. -   cs_byte (T1_RETURN, &charstring_buffer);
  3748. -   output_charstring_buffers (PUT_END);
  3749. - }
  3750. - /* Output a character which only uses one subroutine.  */
  3751. - void
  3752. - pstype1_output_bzr_char (bzr_char_type c)
  3753. - {
  3754. -   charcode_type code = CHARCODE (c);
  3755. -   string charname = ps_encoding_name (code);
  3756.   
  3757. !   begin_char (charname);
  3758. !   OUT_CHAR_SUBR (code);
  3759. !   end_char (CHAR_LSB (c), CHAR_SET_WIDTH (c));
  3760. !   ps_char_output_p[CHARCODE (c)] = true;
  3761.   }
  3762. - /* Macros for pstype1_output_ccc_char: assume `cp' and `bb' are defined.  */ 
  3763. - /* Moves.  */
  3764.   
  3765. - #define OUT_MOVE(h, v, a)                        \
  3766. -   do                                    \
  3767. -     {                                    \
  3768. -       real_coordinate_type save_cp = cp;                \
  3769. -       real_coordinate_type rel_p = (real_coordinate_type){h, v};    \
  3770. -       out_moveto (&cp, Padd (cp, rel_p));                \
  3771. -       cp = save_cp;                            \
  3772. -     }                                    \
  3773. -   while (0)
  3774. -   
  3775. - #define OUT_HMOVE(h, a) OUT_MOVE (h, 0.0, a)
  3776. - #define OUT_VMOVE(v, a) OUT_MOVE (0.0, v, a)
  3777. - /* Output a(n absolute, if ABSOLUTE is true) move to relative (H, V),
  3778. -    updating the bounding box and the current point.  */
  3779. -    
  3780. - #define OUTPUT_MOVE(h, v, absolute)                    \
  3781. -   do                                    \
  3782. -     {                                    \
  3783. -       OUT_HMOVE (h, absolute);                        \
  3784. -       UPDATE_BB_MOVE (h, v);                        \
  3785. -       UPDATE_CP_MOVE (h, v);                        \
  3786. -     }                                    \
  3787. -   while (0);
  3788. - /* Update bounding box `bb' using BC's bounding box relative to `cp'.  */
  3789. - #define UPDATE_BB_CHAR(bc)                        \
  3790. -   do                                     \
  3791. -     {                                    \
  3792. -       update_real_bounding_box (&(bb),                     \
  3793. -            (real_coordinate_type) {cp.x + BZR_CHAR_MIN_COL (bc),    \
  3794. -                                    cp.y + BZR_CHAR_MIN_ROW (bc)});    \
  3795. -                                     \
  3796. -       update_real_bounding_box (&(bb),                     \
  3797. -            (real_coordinate_type) {cp.x + BZR_CHAR_MAX_COL (bc),    \
  3798. -                                    cp.y + BZR_CHAR_MAX_ROW (bc)});    \
  3799. -     }                                    \
  3800. -   while (0);
  3801. - /* Update bounding box `bb' according to a move H, V relative to `cp'.  */
  3802. - #define UPDATE_BB_MOVE(h, v)                         \
  3803. -   update_real_bounding_box (&(bb),                     \
  3804. -                     (real_coordinate_type) {cp.x + h, cp.y + v});
  3805. - /* Update the current point according to a move H, V.  */
  3806. - #define UPDATE_CP_MOVE(h, v)                         \
  3807. -   cp = Padd (cp, ((real_coordinate_type){(h), (v)}))
  3808. - /* Output a character with charcode C, updating the bounding box for it.  */
  3809. - #define OUTPUT_BB_CHAR(bc, c)                        \
  3810. -   do                                    \
  3811. -     {                                    \
  3812. -       OUT_CHAR_SUBR (c);                        \
  3813. -       UPDATE_BB_CHAR (bc);                        \
  3814. -       OUT_HMOVE (BZR_CHAR_BB_WIDTH (bc), false);            \
  3815. -       UPDATE_CP_MOVE (BZR_CHAR_BB_WIDTH (bc), 0);            \
  3816. -     }                                    \
  3817. -   while (0);
  3818.   
  3819.   
  3820. ! /* Output the composite character C.  */
  3821.   
  3822. ! void
  3823. ! pstype1_output_ccc_char (ccc_type ccc_char, char_type **chars,
  3824. !                          charcode_type ccc_code, real bzr_designsize)
  3825.   {
  3826. -   real ccc_char_lsb;
  3827.     unsigned this_cmd;
  3828. !   real_coordinate_type cp = (real_coordinate_type) { 0.0, 0.0 };
  3829.     real_bounding_box_type bb
  3830.       = (real_bounding_box_type) { FLT_MAX, FLT_MIN, FLT_MAX, FLT_MIN };
  3831. -   string charname = ps_encoding_name (ccc_code);
  3832.   
  3833. -   begin_char (charname);
  3834.     for (this_cmd = 0; this_cmd < LIST_SIZE (ccc_char); this_cmd++)
  3835.       { 
  3836. -       real move;
  3837. -       bzr_char_type *bzr_char;
  3838. -       charcode_type bzr_code;
  3839.         ccc_cmd_type cmd = *(ccc_cmd_type *) LIST_ELT (ccc_char, this_cmd);
  3840. -       int op_code = CCC_OPCODE (cmd);
  3841.         
  3842. !       switch (op_code)
  3843.           {
  3844.           case TR_SETCHAR:
  3845. !           bzr_code = CCC_CHARCODE (cmd);
  3846. !           bzr_char = CHAR_BZR_INFO (*(chars[bzr_code]));
  3847. !           ccc_char_lsb = CHAR_LSB (*bzr_char);
  3848. !           OUTPUT_MOVE ((real) CHAR_LSB (*bzr_char), 0, false);
  3849. !           OUTPUT_BB_CHAR (*bzr_char, bzr_code);
  3850. !           OUTPUT_MOVE ((real) CHAR_RSB (*bzr_char), 0, false);
  3851.             break;
  3852.   
  3853.           case TR_SETCHARBB:
  3854. !           bzr_code = CCC_CHARCODE (cmd);
  3855. !           bzr_char = CHAR_BZR_INFO (*(chars[bzr_code]));
  3856. !           ccc_char_lsb = 0;
  3857. !           OUTPUT_BB_CHAR (*bzr_char, bzr_code);
  3858.             break;
  3859.   
  3860.           case TR_HMOVE:
  3861. !           move = CCC_DIMEN_AMOUNT (cmd);
  3862. !           OUT_HMOVE (move, CCC_DIMEN_ABSOLUTE (cmd));
  3863. !           UPDATE_CP_MOVE (move, 0);
  3864.             break;
  3865.   
  3866.           case TR_VMOVE:
  3867. !           move = CCC_DIMEN_AMOUNT (cmd);
  3868. !           OUT_VMOVE (move, CCC_DIMEN_ABSOLUTE (cmd));
  3869. !           UPDATE_CP_MOVE (0, move);
  3870.             break;
  3871.   
  3872.           default:
  3873. !           FATAL2 ("bad command %d in CCC character %d", op_code, ccc_code);
  3874. !           break;
  3875.       }
  3876.       }
  3877. !   end_char (ccc_char_lsb, BB_WIDTH (bb));
  3878. !   ps_char_output_p[ccc_code] = true;
  3879.   
  3880. !   char_make_tfm (chars, ccc_code, bb);
  3881.   }
  3882.   
  3883. --- 401,524 ----
  3884.         cs_byte (T1_CLOSEPATH, &charstring_buffer);
  3885.       }
  3886.   
  3887. !   /* If we're outputting a subroutine, we want to wind up back at the
  3888. !      origin, I guess.  */
  3889. !   out_moveto (¤t, start);
  3890.   }
  3891.   
  3892.   
  3893. + /* Output the composite character C, with all subroutines defined in SUBRS.  */
  3894.   
  3895. ! #define OUT_HMOVE(h, a) out_move (¤t, h, 0.0, a)
  3896. ! #define OUT_VMOVE(v, a) out_move (¤t, 0.0, v, a)
  3897.   
  3898. ! static real_bounding_box_type
  3899. ! output_ccc_body (ccc_type ccc_char, char_type **subrs)
  3900.   {
  3901.     unsigned this_cmd;
  3902. !   real_coordinate_type current = (real_coordinate_type) { 0.0, 0.0 };
  3903.     real_bounding_box_type bb
  3904.       = (real_bounding_box_type) { FLT_MAX, FLT_MIN, FLT_MAX, FLT_MIN };
  3905.   
  3906.     for (this_cmd = 0; this_cmd < LIST_SIZE (ccc_char); this_cmd++)
  3907.       { 
  3908.         ccc_cmd_type cmd = *(ccc_cmd_type *) LIST_ELT (ccc_char, this_cmd);
  3909.         
  3910. !       switch (CCC_OPCODE (cmd))
  3911.           {
  3912.           case TR_SETCHAR:
  3913. !           {
  3914. !             char_type subr = *subrs[CCC_CHARCODE (cmd)];
  3915. !             if (CHAR_CLASS (subr) == bzr_char_class)
  3916. !               {
  3917. !                 bzr_char_type bzr_char = *CHAR_BZR (subr);
  3918. !                 
  3919. !                 update_real_bounding_box (&bb, current);
  3920. !                 OUT_HMOVE (CHAR_LSB (bzr_char), false);
  3921. !                 out_bb_char (&bb, ¤t, bzr_char);
  3922. !                 OUT_HMOVE (CHAR_RSB (bzr_char), false);
  3923. !                 update_real_bounding_box (&bb, current);
  3924. !               }
  3925. !             else
  3926. !               /* We haven't implemented this yet since it doesn't seem
  3927. !                  all that necessary at the moment, and it would require
  3928. !                  figuring out a bounding box and possibly side bearings
  3929. !                  for CCC character -- certainly not impossible, but not
  3930. !                  trivial, either.  */
  3931. !               WARNING ("Sorry, I can't `setchar' a CCC char yet");
  3932. !           }
  3933.             break;
  3934.   
  3935.           case TR_SETCHARBB:
  3936. !           {
  3937. !             char_type subr = *subrs[CCC_CHARCODE (cmd)];
  3938. !             if (CHAR_CLASS (subr) == bzr_char_class)
  3939. !               out_bb_char (&bb, ¤t, *CHAR_BZR (subr));
  3940. !             else
  3941. !               WARNING ("Sorry, I can't `setcharbb' a CCC char yet");
  3942. !           }
  3943.             break;
  3944.   
  3945.           case TR_HMOVE:
  3946. !           OUT_HMOVE (CCC_DIMEN_AMOUNT (cmd), CCC_DIMEN_ABSOLUTE (cmd));
  3947.             break;
  3948.   
  3949.           case TR_VMOVE:
  3950. !           OUT_VMOVE (CCC_DIMEN_AMOUNT (cmd), CCC_DIMEN_ABSOLUTE (cmd));
  3951.             break;
  3952.   
  3953.           default:
  3954. !           FATAL1 ("Bad command %d in CCC character", CCC_OPCODE (cmd));
  3955.       }
  3956.       }
  3957. !   
  3958. !   return bb;
  3959. ! }
  3960. ! /* Move by H horizontally and V vertically.  If ABSOLUTE is true, the
  3961. !    amount moved is supposed to be independent of the character size, but
  3962. !    we don't know how to implement that yet.  Update CURRENT.  */
  3963. ! static void
  3964. ! out_move (real_coordinate_type *current, real h, real v, boolean absolute)
  3965. ! {
  3966. !   real_coordinate_type new
  3967. !     = (real_coordinate_type) { current->x + h, current->y + v};
  3968. !   if (absolute)
  3969. !     WARNING2 ("Move [by (%.2f,%.2f)] in absolute units unimplemented", h, v);
  3970. !   out_moveto (current, new);
  3971. !   *current = new;
  3972. ! }
  3973.   
  3974. ! /* Output the character shape in BZR_CHAR, sans side bearings.  Update
  3975. !    CURRENT by the width of the shape, and update BB by the points before
  3976. !    and after the character.  We take into account the height of the
  3977. !    character when updating BB, even though we don't translate the
  3978. !    current point up there.  */
  3979. ! #define VOFFSET_POINT(voffset) \
  3980. !   ((real_coordinate_type) { current->x, current->y + (voffset) })
  3981. ! static void
  3982. ! out_bb_char (real_bounding_box_type *bb, real_coordinate_type *current,
  3983. !              bzr_char_type bzr_char)
  3984. ! {
  3985. !   /* Update BB with the current point.  */
  3986. !   update_real_bounding_box (bb, VOFFSET_POINT (CHAR_MIN_ROW (bzr_char)));
  3987. !   /* Output the call to the character.  */
  3988. !   OUT_CHAR_SUBR (CHARCODE (bzr_char));
  3989. !   
  3990. !   /* Move by the width of the shape.  */
  3991. !   out_move (current, BB_WIDTH (CHAR_BB (bzr_char)), 0, false);
  3992. !   /* Update the BB again with the new current point.  */
  3993. !   update_real_bounding_box (bb, VOFFSET_POINT (CHAR_MAX_ROW (bzr_char)));
  3994.   }
  3995.   
  3996. ***************
  3997. *** 494,498 ****
  3998.       }
  3999.     
  4000. !   /* Fall back.  */
  4001.     else
  4002.       {
  4003. --- 621,625 ----
  4004.       }
  4005.     
  4006. !   /* Fall back to general case.  */
  4007.     else
  4008.       {
  4009. ***************
  4010. *** 503,550 ****
  4011.       }
  4012.   }
  4013. - /* Begin a character definition, i.e., a definition in the CharStrings
  4014. -    dictionary.  We are given the character name, the left sidebearing,
  4015. -    and the set width.  The latter two are in printer's points.  We
  4016. -    always output an `hsbw' command -- our characters do not have y
  4017. -    sidebearings.  */
  4018. - static void
  4019. - begin_char (string name)
  4020. - {
  4021. -   OUT1 ("/%s ", name);
  4022. -   /* We cannot just output the bytes of the charstring as we go, because
  4023. -      we need to output the length of the charstring before the
  4024. -      charstring itself, so we can use readhexstring in the PostScript.  */
  4025. -   init_charstring_buffers ();
  4026. - }
  4027. - /* End a character definition with the `endchar' command.  */
  4028. - static void
  4029. - end_char (real lsb, real set_width)
  4030. - {
  4031. -   cs_number (lsb, &pre_charstring_buffer);
  4032. -   cs_number (set_width, &pre_charstring_buffer);
  4033. -   cs_byte (T1_HSBW, &pre_charstring_buffer);
  4034. -   cs_byte (T1_ENDCHAR, &charstring_buffer);
  4035. -   output_charstring_buffers (DEF_END);
  4036. - }
  4037. - /* Convert N, a number in printer's points, to the 1000-unit/em coordinate
  4038. -    system the Type 1 format requires.  (We call these units ``adobes''.)
  4039. -    We've already computed the scaling factor for this, since it depends
  4040. -    only on the design size of the font.  */
  4041. - static int
  4042. - points_to_adobes (real n)
  4043. - {
  4044. -   int n_in_adobes = ROUND (n * em_factor);
  4045. -   
  4046. -   return n_in_adobes;
  4047. - }
  4048.   
  4049.   /* Charstring operations.  */
  4050. --- 630,633 ----
  4051. ***************
  4052. *** 577,581 ****
  4053.     absolute_cs_number (n_in_adobes, buffer);
  4054.   }
  4055. !   
  4056.   static void
  4057.   absolute_cs_number (int n, variable_string *buffer)
  4058. --- 660,667 ----
  4059.     absolute_cs_number (n_in_adobes, buffer);
  4060.   }
  4061. ! /* See section 6.2 of the book Adobe Type 1 Font Format.  */
  4062.   static void
  4063.   absolute_cs_number (int n, variable_string *buffer)
  4064. ***************
  4065. *** 633,639 ****
  4066.   /* Output what we've collected in `pre_charstring_buffer' and
  4067.      `charstring_buffer'.  Because Type 1 BuildChar is only required to
  4068. !    handle encrypted charstrings, we must encrypt our encoded charstring.
  4069. !    END is xx.
  4070. !    */
  4071.   
  4072.   static void
  4073. --- 719,723 ----
  4074.   /* Output what we've collected in `pre_charstring_buffer' and
  4075.      `charstring_buffer'.  Because Type 1 BuildChar is only required to
  4076. !    handle encrypted charstrings, we must encrypt our encoded charstring.  */
  4077.   
  4078.   static void
  4079. ***************
  4080. *** 670,684 ****
  4081.     /* If the space character hasn't been output, do so (even if it won't
  4082.        be encoded).  */
  4083. !   if (space_encoding == -1 || !ps_char_output_p[space_encoding])
  4084.       {
  4085.         begin_char ("space");
  4086. !       end_char (0, tfm_space);
  4087.         if (space_encoding != -1)
  4088. !         ps_char_output_p[ps_encoding_number ("space")] = true;
  4089.       }
  4090.   
  4091.     /* Pop the Private and CharStrings dictionaries from the dictionary
  4092.        stack, then define the latter in the main font dict.  */
  4093. !   OUT_LINE ("currentdict end readonly");
  4094.     OUT_LINE ("end % Private");
  4095.     OUT_LINE ("def % CharStrings");
  4096. --- 754,772 ----
  4097.     /* If the space character hasn't been output, do so (even if it won't
  4098.        be encoded).  */
  4099. !   if (space_encoding == -1 || !char_output_p[space_encoding])
  4100.       {
  4101.         begin_char ("space");
  4102. !       end_char (0, interword_space);
  4103.         if (space_encoding != -1)
  4104. !         char_output_p[space_encoding] = true;
  4105.       }
  4106.   
  4107. +   /* Always output `.notdef'.  */
  4108. +   begin_char (".notdef");
  4109. +   end_char (0, 0);
  4110.     /* Pop the Private and CharStrings dictionaries from the dictionary
  4111.        stack, then define the latter in the main font dict.  */
  4112. !   OUT_LINE ("currentdict end readonly % CharStrings");
  4113.     OUT_LINE ("end % Private");
  4114.     OUT_LINE ("def % CharStrings");
  4115. ***************
  4116. *** 685,689 ****
  4117.   
  4118.     /* Two more elements go in the font dictionary.  */
  4119. !   ps_output_encoding (ps_file);
  4120.     output_private_dict_2 ();
  4121.   
  4122. --- 773,777 ----
  4123.   
  4124.     /* Two more elements go in the font dictionary.  */
  4125. !   ps_output_encoding (ps_file, char_output_p);
  4126.     output_private_dict_2 ();
  4127.   
  4128. ***************
  4129. *** 693,698 ****
  4130.     xfclose (ps_file, ps_filename);
  4131.   }
  4132.   /* The first part of the Private dictionary defines things that are
  4133.      independent of the character definitions.  */
  4134. --- 781,785 ----
  4135.     xfclose (ps_file, ps_filename);
  4136.   }
  4137.   /* The first part of the Private dictionary defines things that are
  4138.      independent of the character definitions.  */
  4139. ***************
  4140. *** 699,710 ****
  4141.   
  4142.   static void
  4143. ! output_private_dict_1 ()
  4144.   {
  4145. !   OUT_LINE ("/Private 8 dict begin");
  4146.     OUT_LINE ("  /MinFeature {16 16} def");
  4147.     OUT_LINE ("  /password 5839 def");
  4148.   
  4149. !   /* According to the spec, the only reason to set lenIV to 4 is to be
  4150. !      compatible with the interpreter in the original LaserWriter.  We
  4151.        don't care about that, so we may as well reduce the number of bytes
  4152.        wasted on encryption.  */
  4153. --- 786,797 ----
  4154.   
  4155.   static void
  4156. ! output_private_dict_1 (unsigned unique_id)
  4157.   {
  4158. !   OUT_LINE ("/Private 9 dict begin");
  4159.     OUT_LINE ("  /MinFeature {16 16} def");
  4160.     OUT_LINE ("  /password 5839 def");
  4161.   
  4162. !   /* According to the spec, the only reason to keep `lenIV' at 4 is to
  4163. !      be compatible with the interpreter in the original LaserWriter.  We
  4164.        don't care about that, so we may as well reduce the number of bytes
  4165.        wasted on encryption.  */
  4166. ***************
  4167. *** 712,716 ****
  4168.   
  4169.     if (unique_id)
  4170. !     OUT1   ("  /UniqueID %d def\n", unique_id);
  4171.   
  4172.     /* Here is how a character or a subroutine will get defined.  We
  4173. --- 799,803 ----
  4174.   
  4175.     if (unique_id)
  4176. !     OUT1 ("  /UniqueID %d def\n", unique_id);
  4177.   
  4178.     /* Here is how a character or a subroutine will get defined.  We
  4179. ***************
  4180. *** 722,730 ****
  4181.     OUT_LINE ("  /-| {string currentfile exch readhexstring pop} readonly def");
  4182.   
  4183. !   /* Once we have the string, we have to define the character.  */
  4184.     OUT_LINE ("  /|- {readonly def} readonly def");
  4185.   
  4186. !   /* Once we have the string, we have to define the subroutine.  */
  4187. !   OUT_LINE ("  /| {readonly put} readonly def");
  4188.     
  4189.     /* End defining the private dictionary.  */
  4190. --- 809,817 ----
  4191.     OUT_LINE ("  /-| {string currentfile exch readhexstring pop} readonly def");
  4192.   
  4193. !   /* Once we have the string, this procedure defines the character.  */
  4194.     OUT_LINE ("  /|- {readonly def} readonly def");
  4195.   
  4196. !   /* Likewise, for subroutines.  */
  4197. !   OUT_LINE ("  /|  {readonly put} readonly def");
  4198.     
  4199.     /* End defining the private dictionary.  */
  4200. ***************
  4201. *** 735,739 ****
  4202.   /* The second part of the Private dictionary defines the hinting
  4203.      information, which we know only after we've seen the characters.  Or
  4204. !    at least we will know it after we understand how to output hints.  */
  4205.   
  4206.   static void
  4207. --- 822,826 ----
  4208.   /* The second part of the Private dictionary defines the hinting
  4209.      information, which we know only after we've seen the characters.  Or
  4210. !    at least we might know it after we understand how to output hints.  */
  4211.   
  4212.   static void
  4213. diff -Nrc2 fontutils-0.5/bzrto/pstype1.h fontutils-0.6/bzrto/pstype1.h
  4214. *** fontutils-0.5/bzrto/pstype1.h    Mon Aug 17 14:59:11 1992
  4215. --- fontutils-0.6/bzrto/pstype1.h    Mon Oct 19 16:39:00 1992
  4216. ***************
  4217. *** 25,46 ****
  4218.   #include "input-ccc.h"
  4219.   #include "tfm.h"
  4220. - #include "types.h"
  4221.   
  4222.   /* This is called first.  */
  4223. ! extern void pstype1_start_output (string font_name, string output_name,
  4224. !                   bzr_preamble_type, bzr_postamble_type,
  4225. !                                   string ps_fontname, tfm_global_info_type);
  4226.   
  4227. ! /* Then this is called for each character.  */
  4228. ! extern void pstype1_output_char_subr (bzr_char_type);
  4229.   
  4230. ! /* Then we call this.  */
  4231. ! extern void pstype1_intermediate_output (void);
  4232.   
  4233.   /* Then we call one or the other of these.  */
  4234. ! extern void pstype1_output_bzr_char (bzr_char_type);
  4235. ! extern void pstype1_output_ccc_char (ccc_type ccc_char, char_type **chars,
  4236. !                      charcode_type ccc_code,
  4237. !                      real bzr_designsize);
  4238.   
  4239.   /* And finally this is called at the end.  */
  4240. --- 25,47 ----
  4241.   #include "input-ccc.h"
  4242.   #include "tfm.h"
  4243.   
  4244.   /* This is called first.  */
  4245. ! extern void pstype1_start_output (string output_name,
  4246. !                   bzr_preamble_type, bzr_postamble_type);
  4247. ! /* Then these are called for characters needed as subroutines.  */
  4248. ! extern void pstype1_output_bzr_subr (bzr_char_type);
  4249. ! extern void pstype1_output_ccc_subr (ccc_type, charcode_type, char_type *[]);
  4250.   
  4251. ! /* This starts the subroutines.  */
  4252. ! extern void pstype1_start_subrs (unsigned subr_count);
  4253.   
  4254. ! /* And this finishes the subroutines and starts the characters.  */
  4255. ! extern void pstype1_start_chars (unsigned char_count);
  4256.   
  4257.   /* Then we call one or the other of these.  */
  4258. ! extern void pstype1_output_bzr_char (bzr_char_type, char_type *[]);
  4259. ! extern void pstype1_output_ccc_char (ccc_type, charcode_type, char_type *[]);
  4260.   
  4261.   /* And finally this is called at the end.  */
  4262. diff -Nrc2 fontutils-0.5/bzrto/pstype3.c fontutils-0.6/bzrto/pstype3.c
  4263. *** fontutils-0.5/bzrto/pstype3.c    Sat Aug 15 13:39:01 1992
  4264. --- fontutils-0.6/bzrto/pstype3.c    Mon Oct 19 13:40:45 1992
  4265. ***************
  4266. *** 23,28 ****
  4267.   #include "bounding-box.h"
  4268.   #include "bzr.h"
  4269.   #include "spline.h"
  4270. - #include "tfm.h"
  4271.   
  4272.   #include "pstype3.h"
  4273. --- 23,28 ----
  4274.   #include "bounding-box.h"
  4275.   #include "bzr.h"
  4276. + #include "encoding.h"
  4277.   #include "spline.h"
  4278.   
  4279.   #include "pstype3.h"
  4280. ***************
  4281. *** 34,45 ****
  4282.   static string ps_filename;
  4283.   
  4284. ! /* The interword space from the TFM file, in points.  */
  4285. ! static real tfm_space;
  4286.   
  4287.   
  4288. - /* Subroutines.  */
  4289. - static void out_splines (spline_list_array_type);
  4290.   
  4291.   
  4292.   /* Output macros.  */
  4293. --- 34,46 ----
  4294.   static string ps_filename;
  4295.   
  4296. ! /* The interword space, in points.  */
  4297. ! static real interword_space;
  4298.   
  4299. + /* Whether or not a particular character has been written.  We depend on
  4300. +    this being initialized to false by virtue of its storage class.  */
  4301. + static boolean char_output_p[ENCODING_VECTOR_SIZE];
  4302.   
  4303.   
  4304. + static void out_splines (spline_list_array_type);
  4305.   
  4306.   /* Output macros.  */
  4307. ***************
  4308. *** 96,101 ****
  4309.       }                                    \
  4310.      while (0)
  4311.   
  4312.   /* This should be called before the others in this file.  It opens the
  4313. --- 97,100 ----
  4314. ***************
  4315. *** 111,124 ****
  4316.   
  4317.   void
  4318. ! pstype3_start_output (string font_name, string output_name,
  4319. !               bzr_preamble_type pre, bzr_postamble_type post,
  4320. !                       string ps_fontname, tfm_global_info_type tfm_info)
  4321.   {
  4322. !   /* Find general information about the font.  Pass in the filename
  4323. !      we were given.  */
  4324. !   ps_font_info_type ps_info = ps_init (font_name, ps_fontname, tfm_info);
  4325.   
  4326. !   /* I don't know of any real convention about what extension to give
  4327. !      Type 3 fonts, so: */
  4328.     ps_filename = extend_filename (output_name, "pf3");
  4329.     ps_file = xfopen (ps_filename, "w");
  4330. --- 110,120 ----
  4331.   
  4332.   void
  4333. ! pstype3_start_output (string output_name, 
  4334. !               bzr_preamble_type pre, bzr_postamble_type post)
  4335.   {
  4336. !   ps_font_info_type ps_info = ps_set_font_info ();
  4337.   
  4338. !   /* I don't know of any convention about what extension to give Type 3
  4339. !      fonts, so I use `pf3'.  */
  4340.     ps_filename = extend_filename (output_name, "pf3");
  4341.     ps_file = xfopen (ps_filename, "w");
  4342. ***************
  4343. *** 126,130 ****
  4344.     /* Remember the natural interword space, so we can output it later, if
  4345.        necessary.  */
  4346. !   tfm_space = TFM_FONTDIMEN (tfm_info, TFM_SPACE_PARAMETER);
  4347.   
  4348.     /* Output some identification.  */
  4349. --- 122,126 ----
  4350.     /* Remember the natural interword space, so we can output it later, if
  4351.        necessary.  */
  4352. !   interword_space = ps_info.interword_space;
  4353.   
  4354.     /* Output some identification.  */
  4355. ***************
  4356. *** 134,138 ****
  4357.     OUT_LINE ("/FontType 3 def");
  4358.     
  4359. !   /* xx should probably physically insert the BuildChar routine, as
  4360.        (run) doesn't work when the font is downloaded.  */
  4361.     OUT_LINE ("(" BUILD_CHAR_FILENAME ") run");
  4362. --- 130,134 ----
  4363.     OUT_LINE ("/FontType 3 def");
  4364.     
  4365. !   /* We should probably physically insert the BuildChar routine, as
  4366.        (run) doesn't work when the font is downloaded.  */
  4367.     OUT_LINE ("(" BUILD_CHAR_FILENAME ") run");
  4368. ***************
  4369. *** 150,159 ****
  4370.     OUT_LINE ("/.notdef [ 0 0 0 0 0 0 {} ] def");
  4371.   }
  4372.   
  4373.   /* This is called on each character to be output.  We set the global
  4374. !    `ps_char_output_p' at the given character code.  It then outputs a
  4375.      character description in the following format (which depends on the
  4376.      BuildChar routine):
  4377. --- 146,152 ----
  4378.     OUT_LINE ("/.notdef [ 0 0 0 0 0 0 {} ] def");
  4379.   }
  4380.   
  4381.   /* This is called on each character to be output.  We set the global
  4382. !    `char_output_p' for the given character code.  It then outputs a
  4383.      character description in the following format (which depends on the
  4384.      BuildChar routine):
  4385. ***************
  4386. *** 168,181 ****
  4387.   pstype3_output_char (bzr_char_type c)
  4388.   {
  4389. !   ps_char_output_p[CHARCODE (c)] = true;
  4390.   
  4391. !   OUT1 ("/%s ", ps_encoding_name (CHARCODE (c)));
  4392. !   OUT5 ("[ %.3f 0 %.3f %.3f %.3f %.3f {\n", CHAR_SET_WIDTH (c),
  4393. !               BZR_CHAR_MIN_COL (c), BZR_CHAR_MIN_ROW (c),
  4394. !               BZR_CHAR_MAX_COL (c), BZR_CHAR_MAX_ROW (c));
  4395.   
  4396. !   out_splines (BZR_SHAPE (c));
  4397.   
  4398. !   OUT_LINE ("  fill } ] def");
  4399.   }
  4400.   
  4401. --- 161,179 ----
  4402.   pstype3_output_char (bzr_char_type c)
  4403.   {
  4404. !   string charname = ps_encoding_name (CHARCODE (c));
  4405. !   
  4406. !   if (!STREQ (charname, ".notdef"))
  4407. !     {
  4408. !       char_output_p[CHARCODE (c)] = true;
  4409.   
  4410. !       OUT1 ("/%s ", charname);
  4411. !       OUT5 ("[ %.3f 0 %.3f %.3f %.3f %.3f {\n", CHAR_SET_WIDTH (c),
  4412. !                   CHAR_MIN_COL (c), CHAR_MIN_ROW (c),
  4413. !                   CHAR_MAX_COL (c), CHAR_MAX_ROW (c));
  4414.   
  4415. !       out_splines (BZR_SHAPE (c));
  4416.   
  4417. !       OUT_LINE ("  fill } ] def");
  4418. !     }
  4419.   }
  4420.   
  4421. ***************
  4422. *** 214,220 ****
  4423.       }
  4424.   }
  4425.   
  4426.   /* This finishes up the PostScript for the character descriptions and for
  4427. --- 212,215 ----
  4428. ***************
  4429. *** 228,236 ****
  4430.     /* If the space character hasn't been output, do so (even if it won't
  4431.        be encoded).  */
  4432. !   if (space_encoding == -1 || !ps_char_output_p[space_encoding])
  4433.       {
  4434. !       OUT1 ("/space [ %d 0 0 0 0 0 {} ] def\n", ROUND (tfm_space));
  4435.         if (space_encoding != -1)
  4436. !         ps_char_output_p[ps_encoding_number ("space")] = true;
  4437.       }
  4438.   
  4439. --- 223,231 ----
  4440.     /* If the space character hasn't been output, do so (even if it won't
  4441.        be encoded).  */
  4442. !   if (space_encoding == -1 || !char_output_p[space_encoding])
  4443.       {
  4444. !       OUT1 ("/space [ %d 0 0 0 0 0 {} ] def\n", ROUND (interword_space));
  4445.         if (space_encoding != -1)
  4446. !         char_output_p[space_encoding] = true;
  4447.       }
  4448.   
  4449. ***************
  4450. *** 239,243 ****
  4451.   
  4452.     /* Now that we've seen all the characters, we can output the encoding.  */
  4453. !   ps_output_encoding (ps_file);
  4454.   
  4455.     /* Define and discard the font.  */
  4456. --- 234,238 ----
  4457.   
  4458.     /* Now that we've seen all the characters, we can output the encoding.  */
  4459. !   ps_output_encoding (ps_file, char_output_p);
  4460.   
  4461.     /* Define and discard the font.  */
  4462. diff -Nrc2 fontutils-0.5/bzrto/pstype3.h fontutils-0.6/bzrto/pstype3.h
  4463. *** fontutils-0.5/bzrto/pstype3.h    Mon Apr 13 14:23:12 1992
  4464. --- fontutils-0.6/bzrto/pstype3.h    Mon Oct  5 18:12:41 1992
  4465. ***************
  4466. *** 26,32 ****
  4467.   
  4468.   /* This is called first.  */
  4469. ! extern void pstype3_start_output (string font_name, string output_name,
  4470. !                   bzr_preamble_type, bzr_postamble_type, 
  4471. !                                   string, tfm_global_info_type);
  4472.   
  4473.   /* Then this is called for each character.  */
  4474. --- 26,31 ----
  4475.   
  4476.   /* This is called first.  */
  4477. ! extern void pstype3_start_output (string output_name,
  4478. !                   bzr_preamble_type, bzr_postamble_type);
  4479.   
  4480.   /* Then this is called for each character.  */
  4481. diff -Nrc2 fontutils-0.5/bzrto/psutil.c fontutils-0.6/bzrto/psutil.c
  4482. *** fontutils-0.5/bzrto/psutil.c    Sun Aug 16 11:42:31 1992
  4483. --- fontutils-0.6/bzrto/psutil.c    Mon Oct 19 17:15:36 1992
  4484. ***************
  4485. *** 28,34 ****
  4486.   
  4487.   
  4488. ! /* Whether or not a particular character has been written.  We don't set
  4489. !    this, but we use it to figure out the encoding to output.  */
  4490. ! boolean ps_char_output_p[ENCODING_VECTOR_SIZE];
  4491.   
  4492.   
  4493. --- 28,34 ----
  4494.   
  4495.   
  4496. ! /* Information for the PostScript FontInfo dictionary, etc.
  4497. !    (-ps-font-info)  */
  4498. ! string ps_global_info = NULL;
  4499.   
  4500.   
  4501. ***************
  4502. *** 40,77 ****
  4503.   #define OUT2(s, e1, e2) do { fprintf (f, s, e1, e2); } while (0)
  4504.   
  4505.   static void out_notdef_loop (FILE *, charcode_type, charcode_type);
  4506.   
  4507. ! /* Return the information that goes in the FontInfo dictionary for the
  4508. !    font FONT_NAME, as well as a few other miscellaneous things.  This
  4509. !    uses TFM_INFO for some of the information, PS_FONT_NAME for others,
  4510. !    and guesses for the rest.  */
  4511. ! #define NO_PARAM_RET -1
  4512.   
  4513.   ps_font_info_type
  4514. ! ps_init (string font_name, string ps_font_name, tfm_global_info_type tfm_info)
  4515.   {
  4516.     ps_font_info_type ret;
  4517.   
  4518. !   /* Default the full font name to the font's filename.  */
  4519. !   ret.font_name = ps_font_name ? : font_name;
  4520.     
  4521. !   /* The family name would be `Times' for the font `Times-BoldItalic', 
  4522. !       but it's `Helvetica' for `Helvetica'.  (It should be `Lucida' for
  4523. !      `LucidaBright-Italic', but we don't handle that case.)  */
  4524. !   ret.family_name = strchr (ret.font_name, '-');
  4525. !   if (ret.family_name == NULL)
  4526. !     ret.family_name = ret.font_name;  /* E.g., `Helvetica'.  */
  4527. !   else
  4528. !     ret.family_name
  4529. !       = substring (ret.font_name, 0, ret.family_name - 1- ret.font_name);
  4530.   
  4531. !   /* If the font name contains `Bold', that's the weight.  Otherwise,
  4532. !      guess `Medium'.  (I don't know of any programs that actually care
  4533. !      about this.)  */
  4534. !   ret.weight = strstr (ret.font_name, "Bold") ? "Bold" : "Medium";
  4535.   
  4536.     /* We should be able to compute the italic angle by somehow looking at
  4537. --- 40,88 ----
  4538.   #define OUT2(s, e1, e2) do { fprintf (f, s, e1, e2); } while (0)
  4539.   
  4540. ! static string option_value (string, string);
  4541.   static void out_notdef_loop (FILE *, charcode_type, charcode_type);
  4542.   
  4543. ! /* Return the information that goes in the FontInfo dictionary, etc.  We
  4544. !    use the global variables `ps_global_info' and `tfm_global_info' to
  4545. !    determine the information.  Either or both might be null.  */
  4546.   
  4547.   ps_font_info_type
  4548. ! ps_set_font_info ()
  4549.   {
  4550.     ps_font_info_type ret;
  4551.   
  4552. !   /* The PostScript name of the font.  */
  4553. !   ret.font_name = option_value (ps_global_info, "FontName") ? : "unknown";
  4554.     
  4555. !   /* The typeface family which includes this font.  */
  4556. !   ret.family_name = option_value (ps_global_info, "FamilyName");
  4557. !   if (!ret.family_name)
  4558. !     { /* Since they didn't specify a family name, try to guess from the
  4559. !          font name.  The family name is `Times' for the font
  4560. !          `Times-BoldItalic', but it's `Helvetica' for `Helvetica'.  (It
  4561. !          should be `Lucida' for `LucidaBright-Italic', but we don't
  4562. !          handle that case.)  */
  4563. !       ret.family_name = strchr (ret.font_name, '-');
  4564. !       if (!ret.family_name)
  4565. !         ret.family_name = ret.font_name;  /* The `Helvetica' case.  */
  4566. !       else
  4567. !         ret.family_name
  4568. !           = substring (ret.font_name, 0, ret.family_name - 1 - ret.font_name);
  4569. !     }
  4570.   
  4571. !   ret.weight = option_value (ps_global_info, "Weight");
  4572. !   if (!ret.weight)
  4573. !     { /* Again, since they didn't specify a weight, try to guess from
  4574. !          the font name.  */
  4575. !       unsigned w;
  4576. !       string weights[]
  4577. !         = { "Black", "Book", "Bold", "Demi", "ExtraBold", "Light",
  4578. !             "Heavy", "Regular", "Semibold", "Ultra", NULL };
  4579. !       
  4580. !       for (w = 0; weights[w] != NULL && !strstr (ret.font_name, weights[w]);
  4581. !            w++)
  4582. !         ;
  4583. !       ret.weight = weights[w] ? : "Medium";
  4584. !     }
  4585.   
  4586.     /* We should be able to compute the italic angle by somehow looking at
  4587. ***************
  4588. *** 78,100 ****
  4589.        the characters.  bdftops.ps rotates the `I' and takes the angle
  4590.        that minimizes the width, for example.  */
  4591. !   ret.italic_angle = 0;
  4592.     
  4593.     /* Monospaced fonts have no stretch or shrink in their interword
  4594. !      space (or shouldn't), but they do have a nonzero interword space
  4595. !      (math fonts sometimes have all their interword space parameters set
  4596. !      to zero).  */
  4597. !   ret.monospace_p
  4598. !     = TFM_SAFE_FONTDIMEN (tfm_info, TFM_STRETCH_PARAMETER, -1) == 0.0
  4599. !       && TFM_SAFE_FONTDIMEN (tfm_info, TFM_SHRINK_PARAMETER, -1) == 0.0
  4600. !       && TFM_SAFE_FONTDIMEN (tfm_info, TFM_SPACE_PARAMETER, 0) > 0.0;
  4601.   
  4602.     /* What might be a good way to compute this one?  */
  4603. !   ret.underline_position = -100;
  4604.     
  4605. !   /* Here we can use the rule thickness from the TFM file, if it's set.
  4606. !      Otherwise, just guess.  (A better guess would be the dominant stem
  4607. !      width in the font.)  */
  4608. !   ret.underline_thickness
  4609. !     = TFM_SAFE_FONTDIMEN (tfm_info, TFM_DEFAULTRULETHICKNESS_PARAMETER, 50);
  4610.   
  4611.     /* What to do about the UniqueID's?  Actually, I'm not sure they
  4612. --- 89,146 ----
  4613.        the characters.  bdftops.ps rotates the `I' and takes the angle
  4614.        that minimizes the width, for example.  */
  4615. !   {
  4616. !     string angle_str = option_value (ps_global_info, "ItalicAngle");
  4617. !     ret.italic_angle = angle_str ? atof (angle_str) : 0;
  4618. !   }
  4619.     
  4620. +   /* The interword space must come from `tfm_global_info'.  Otherwise,
  4621. +      we just let it be zero.  */
  4622. +   ret.interword_space
  4623. +     = tfm_global_info
  4624. +       ? TFM_SAFE_FONTDIMEN (*tfm_global_info, TFM_SPACE_PARAMETER, 0.0)
  4625. +       : 0.0;
  4626.     /* Monospaced fonts have no stretch or shrink in their interword
  4627. !      space (or shouldn't), but they do have a nonzero interword space.
  4628. !      (Except TeX math fonts have all their interword space parameters
  4629. !      set to zero).  */
  4630. !   {
  4631. !     string monospace_str = option_value (ps_global_info, "isFixedPitch");
  4632. !     if (monospace_str)
  4633. !       ret.monospace_p = STREQ (monospace_str, "true"); 
  4634. !     else if (tfm_global_info)
  4635. !       ret.monospace_p
  4636. !         =    TFM_SAFE_FONTDIMEN (*tfm_global_info, TFM_STRETCH_PARAMETER, -1)
  4637. !              == 0.0
  4638. !           && TFM_SAFE_FONTDIMEN (*tfm_global_info, TFM_SHRINK_PARAMETER, -1)
  4639. !              == 0.0
  4640. !           && TFM_SAFE_FONTDIMEN (*tfm_global_info, TFM_SPACE_PARAMETER, 0)
  4641. !              > 0.0;
  4642. !     else
  4643. !       ret.monospace_p = false;
  4644. !   }
  4645.   
  4646.     /* What might be a good way to compute this one?  */
  4647. !   {
  4648. !     string under_str = option_value (ps_global_info, "UnderlinePosition");
  4649. !     ret.underline_position = under_str ? atof (under_str) : -100;
  4650. !   }
  4651.     
  4652. !   /* Here we use the rule thickness from the TFM file, if it's set.
  4653. !      Otherwise, we should guess the dominant stem width in the font, but
  4654. !      that's too much work for too little return.  */
  4655. !   {
  4656. ! #define DEFAULT_THICKNESS 50
  4657. !     string under_str = option_value (ps_global_info, "UnderlineThickness");
  4658. !     if (under_str)
  4659. !       ret.underline_thickness = atof (under_str);
  4660. !     else if (tfm_global_info)
  4661. !       ret.underline_thickness
  4662. !         = TFM_SAFE_FONTDIMEN (*tfm_global_info,
  4663. !                               TFM_DEFAULTRULETHICKNESS_PARAMETER,
  4664. !                               DEFAULT_THICKNESS);
  4665. !     else
  4666. !       ret.underline_thickness = DEFAULT_THICKNESS;
  4667. !   }
  4668.   
  4669.     /* What to do about the UniqueID's?  Actually, I'm not sure they
  4670. ***************
  4671. *** 102,112 ****
  4672.        fonts to get a UniqueID from them, which is semi-reasonable, but a
  4673.        lot of trouble.  We just omit them.  */
  4674. !   ret.unique_id = 0;
  4675.     
  4676.     /* If there is no version number in the TFM file, then just say it's
  4677.        version 0.  */
  4678. !   ret.version = dtoa (TFM_SAFE_FONTDIMEN (tfm_info, TFM_VERSION_PARAMETER, 0));
  4679.     return ret;
  4680.   }
  4681.   
  4682.   /* Output the common beginning (after the %! line) of a PostScript font
  4683. --- 148,225 ----
  4684.        fonts to get a UniqueID from them, which is semi-reasonable, but a
  4685.        lot of trouble.  We just omit them.  */
  4686. !   {
  4687. !     string unique_id_str = option_value (ps_global_info, "UniqueID");
  4688. !     ret.unique_id = unique_id_str ? atou (unique_id_str) : 0;
  4689. !     if (ret.unique_id >= 1 << 24)
  4690. !       {
  4691. !         WARNING1 ("%u: UniqueID >= 2**24; changing to zero", ret.unique_id);
  4692. !         ret.unique_id = 0;
  4693. !       }
  4694. !   }
  4695.     
  4696.     /* If there is no version number in the TFM file, then just say it's
  4697.        version 0.  */
  4698. !   {
  4699. !     ret.version = option_value (ps_global_info, "version");
  4700. !     if (!ret.version)
  4701. !       ret.version
  4702. !         = tfm_global_info
  4703. !           && TFM_FONTDIMEN_COUNT (*tfm_global_info) >= TFM_VERSION_PARAMETER
  4704. !           ? dtoa (TFM_FONTDIMEN (*tfm_global_info, TFM_VERSION_PARAMETER))
  4705. !           : "0";
  4706. !   }
  4707.     return ret;
  4708.   }
  4709. + /* Consider OPTION_STR as a list of <name>:<value> items separated by
  4710. +    commas; return the <value> (as a string) associated with NAME, or
  4711. +    NULL.  This could plausibly be put in `lib', but since we have one
  4712. +    place (the routine just above) where we need to set each of a given
  4713. +    set of names, as opposed to doing something with each specified
  4714. +    item, we just define it here.  */
  4715. + static string 
  4716. + option_value (string option_str, string name)
  4717. + {
  4718. +   string item_end;
  4719. +   string value = NULL;
  4720. +   string item_start = option_str;
  4721. +   if (option_str == NULL)
  4722. +     return NULL;
  4723. +     
  4724. +   do
  4725. +     {
  4726. +       string item, colon;
  4727. +       
  4728. +       item_end = strchr (item_start, ',');
  4729. +       item = item_end
  4730. +              ? substring (item_start, 0, item_end - 1 - item_start)
  4731. +              : item_start;
  4732. +       colon = strchr (item, ':');
  4733. +       
  4734. +       if (colon)
  4735. +         {
  4736. +           string item_name = substring (item, 0, colon - 1 - item);
  4737. +           
  4738. +           if (STREQ (item_name, name))
  4739. +             value = xstrdup (colon + 1);
  4740. +           free (item_name);
  4741. +         }
  4742. +       else
  4743. +         WARNING1 ("%s: Missing colon in option string", item);
  4744. +       
  4745. +       if (item != item_start)
  4746. +         free (item);
  4747. +       
  4748. +       item_start = item_end + 1;
  4749. +     }
  4750. +   while (item_end);
  4751. +   
  4752. +   return value;
  4753. + }
  4754.   
  4755.   /* Output the common beginning (after the %! line) of a PostScript font
  4756. ***************
  4757. *** 147,155 ****
  4758.   
  4759.     if (ps_info.unique_id)
  4760. !     OUT1 ("/UniqueID %d\n", ps_info.unique_id);
  4761.   }
  4762. -    
  4763.   
  4764.   /* Return the name corresponding to the number N in the current
  4765. --- 260,265 ----
  4766.   
  4767.     if (ps_info.unique_id)
  4768. !     OUT1 ("/UniqueID %d def\n", ps_info.unique_id);
  4769.   }
  4770.   
  4771.   /* Return the name corresponding to the number N in the current
  4772. ***************
  4773. *** 182,192 ****
  4774.   
  4775.   
  4776. ! /* Output the encoding vector to the file F, based on the variables
  4777. !    `ps_char_output_p' and `encoding'.  */
  4778. ! #define INIT_CODE  ENCODING_VECTOR_SIZE
  4779.   
  4780.   void
  4781. ! ps_output_encoding (FILE *f)
  4782.   {
  4783.     unsigned c;
  4784. --- 292,300 ----
  4785.   
  4786.   
  4787. ! /* Output the encoding vector to the file F, based on CHAR_OUTPUT_P and
  4788. !    the global `encoding'.  */
  4789.   
  4790.   void
  4791. ! ps_output_encoding (FILE *f, boolean char_output_p[])
  4792.   {
  4793.     unsigned c;
  4794. ***************
  4795. *** 193,197 ****
  4796.     int range_start = -1;
  4797.   
  4798. !   fprintf (f, "/Encoding %d array\n", ENCODING_VECTOR_SIZE);
  4799.   
  4800.     for (c = 0; c < ENCODING_VECTOR_SIZE; c++)
  4801. --- 301,306 ----
  4802.     int range_start = -1;
  4803.   
  4804. !   fprintf (f, "/Encoding %d array %% %s\n", ENCODING_VECTOR_SIZE,
  4805. !            ENCODING_SCHEME_NAME (encoding_info));
  4806.   
  4807.     for (c = 0; c < ENCODING_VECTOR_SIZE; c++)
  4808. ***************
  4809. *** 198,202 ****
  4810.       { /* Write sequences of .notdef's and characters we didn't output
  4811.            using a loop.  */
  4812. !       if (!ps_char_output_p[c]
  4813.         || STREQ (ENCODING_CHAR_NAME (encoding_info, c), ".notdef"))
  4814.       { /* Start or continue a loop.  */
  4815. --- 307,312 ----
  4816.       { /* Write sequences of .notdef's and characters we didn't output
  4817.            using a loop.  */
  4818. !       if (!char_output_p[c]
  4819. !           || ENCODING_CHAR_NAME (encoding_info, c) == NULL
  4820.         || STREQ (ENCODING_CHAR_NAME (encoding_info, c), ".notdef"))
  4821.       { /* Start or continue a loop.  */
  4822. ***************
  4823. *** 218,223 ****
  4824.       }
  4825.     
  4826. !   /* If the encoding ends with .notdef's, we'll be in the midst of a
  4827. !      loop. */
  4828.     if (range_start != -1)
  4829.       out_notdef_loop (f, range_start, c - 1);
  4830. --- 328,332 ----
  4831.       }
  4832.     
  4833. !   /* If the character 255 is not encoded, we'll be in the midst of a loop. */
  4834.     if (range_start != -1)
  4835.       out_notdef_loop (f, range_start, c - 1);
  4836. ***************
  4837. *** 228,233 ****
  4838.   
  4839.   
  4840. ! /* Output a loop to write .notdef's into the Encoding vector between
  4841. !    START and END.  */
  4842.   
  4843.   static void
  4844. --- 337,342 ----
  4845.   
  4846.   
  4847. ! /* Output a loop to put .notdef's into the encoding vector between START
  4848. !    and END.  Assume the `Encoding' array is the top of the stack.  */
  4849.   
  4850.   static void
  4851. ***************
  4852. *** 234,238 ****
  4853.   out_notdef_loop (FILE *f, charcode_type start, charcode_type end)
  4854.   {
  4855. !   /* Assume the Encoding array is the top of the operand stack.  */
  4856. !   OUT2 ("  %d 1 %d { 1 index exch /.notdef put } bind for\n", start, end);
  4857.   }
  4858. --- 343,349 ----
  4859.   out_notdef_loop (FILE *f, charcode_type start, charcode_type end)
  4860.   {
  4861. !   if (start == end)
  4862. !     OUT1 ("  dup %d /.notdef put\n", start);
  4863. !   else
  4864. !     OUT2 ("  %d 1 %d { 1 index exch /.notdef put } bind for\n", start, end);
  4865.   }
  4866. diff -Nrc2 fontutils-0.5/bzrto/psutil.h fontutils-0.6/bzrto/psutil.h
  4867. *** fontutils-0.5/bzrto/psutil.h    Tue Apr 14 08:30:38 1992
  4868. --- fontutils-0.6/bzrto/psutil.h    Mon Oct 19 13:27:04 1992
  4869. ***************
  4870. *** 31,34 ****
  4871. --- 31,35 ----
  4872.     string family_name;
  4873.     string font_name;
  4874. +   real interword_space;
  4875.     int italic_angle; /* In degrees.  */
  4876.     boolean monospace_p;
  4877. ***************
  4878. *** 40,48 ****
  4879.   
  4880.   
  4881. ! /* Return the information that goes in the FontInfo dictionary for the
  4882. !    font FONT_NAME, as well as a few other miscellanous things.  We
  4883. !    initialize the `ps_char_output_p' global.  */
  4884. ! extern ps_font_info_type ps_init (string font_name, string ps_fontname,
  4885. !                                   tfm_global_info_type);
  4886.   
  4887.   /* Output the starting boilerplate that is the same for Type 1 and Type
  4888. --- 41,47 ----
  4889.   
  4890.   
  4891. ! /* Return the information that goes in the FontInfo dictionary, as well
  4892. !    as a few other miscellanous things.  */
  4893. ! extern ps_font_info_type ps_set_font_info (void);
  4894.   
  4895.   /* Output the starting boilerplate that is the same for Type 1 and Type
  4896. ***************
  4897. *** 51,61 ****
  4898.                              string comment);
  4899.   
  4900. ! /* Output an encoding vector, using a global vector `ps_char_output_p'
  4901. !    (declared below) to tell which characters exist in the font.
  4902. !    `ps_init' must be called before this.  */
  4903. ! extern void ps_output_encoding (FILE *);
  4904.   
  4905. ! /* Return the name corresponding to the character code N in the current
  4906. !    encoding.  */
  4907.   extern string ps_encoding_name (charcode_type n);
  4908.   
  4909. --- 50,58 ----
  4910.                              string comment);
  4911.   
  4912. ! /* Output an encoding vector, using CHAR_OUTPUT_P to tell which
  4913. !    characters exist in the font.  */
  4914. ! extern void ps_output_encoding (FILE *, boolean char_output_p[]);
  4915.   
  4916. ! /* Return the name corresponding to character code N in `encoding_info'.  */
  4917.   extern string ps_encoding_name (charcode_type n);
  4918.   
  4919. ***************
  4920. *** 64,71 ****
  4921.   extern int ps_encoding_number (string name);
  4922.   
  4923. ! /* Says whether a particular character has been output.  Initialized by
  4924. !    `ps_init', and used by `ps_output_encoding', et al.  Defined in
  4925. !    psutil.c.  */
  4926. ! extern boolean ps_char_output_p[];
  4927.   
  4928.   #endif /* not PSUTIL_H */
  4929. --- 61,66 ----
  4930.   extern int ps_encoding_number (string name);
  4931.   
  4932. ! /* User option; see psutil.c.  */
  4933. ! extern string ps_global_info;
  4934.   
  4935.   #endif /* not PSUTIL_H */
  4936. diff -Nrc2 fontutils-0.5/bzrto/text.c fontutils-0.6/bzrto/text.c
  4937. *** fontutils-0.5/bzrto/text.c    Tue Sep  1 14:04:24 1992
  4938. --- fontutils-0.6/bzrto/text.c    Sun Oct 11 15:42:32 1992
  4939. ***************
  4940. *** 66,71 ****
  4941.     printf ("  (width \"%.3f\")\n", CHAR_SET_WIDTH (c));
  4942.     printf ("  (bb ");
  4943. !   OUT_NUM4 (BZR_CHAR_MIN_COL (c), BZR_CHAR_MAX_COL (c),
  4944. !             BZR_CHAR_MIN_ROW (c), BZR_CHAR_MAX_ROW (c));
  4945.     puts (")");
  4946.   
  4947. --- 66,71 ----
  4948.     printf ("  (width \"%.3f\")\n", CHAR_SET_WIDTH (c));
  4949.     printf ("  (bb ");
  4950. !   OUT_NUM4 (CHAR_MIN_COL (c), CHAR_MAX_COL (c),
  4951. !             CHAR_MIN_ROW (c), CHAR_MAX_ROW (c));
  4952.     puts (")");
  4953.   
  4954. diff -Nrc2 fontutils-0.5/bzrto/version.c fontutils-0.6/bzrto/version.c
  4955. *** fontutils-0.5/bzrto/version.c    Thu Sep  3 09:46:19 1992
  4956. --- fontutils-0.6/bzrto/version.c    Tue Oct 27 13:27:58 1992
  4957. ***************
  4958. *** 1 ****
  4959. ! char *version_string = "bzrto version 0.5";
  4960. --- 1 ----
  4961. ! char *version_string = "bzrto version 0.6";
  4962. diff -Nrc2 fontutils-0.5/charspace/ChangeLog fontutils-0.6/charspace/ChangeLog
  4963. *** fontutils-0.5/charspace/ChangeLog    Thu Sep  3 09:29:46 1992
  4964. --- fontutils-0.6/charspace/ChangeLog    Tue Oct 27 13:02:50 1992
  4965. ***************
  4966. *** 1,2 ****
  4967. --- 1,6 ----
  4968. + Tue Oct 27 13:01:50 1992  Karl Berry  (karl@cs.umb.edu)
  4969. +     * Version 0.6.
  4970.   Thu Sep  3 09:29:46 1992  Karl Berry  (karl@hayley)
  4971.   
  4972. diff -Nrc2 fontutils-0.5/charspace/version.c fontutils-0.6/charspace/version.c
  4973. *** fontutils-0.5/charspace/version.c    Thu Sep  3 09:46:19 1992
  4974. --- fontutils-0.6/charspace/version.c    Tue Oct 27 13:27:58 1992
  4975. ***************
  4976. *** 1 ****
  4977. ! char *version_string = "charspace version 0.5";
  4978. --- 1 ----
  4979. ! char *version_string = "charspace version 0.6";
  4980. diff -Nrc2 fontutils-0.5/configure fontutils-0.6/configure
  4981. *** fontutils-0.5/configure    Thu Sep  3 09:34:07 1992
  4982. --- fontutils-0.6/configure    Thu Oct 15 08:35:21 1992
  4983. ***************
  4984. *** 78,87 ****
  4985.   # Find the source files, if location was not specified.
  4986.   if test -z "$srcdir"; then
  4987. !   srcdirdefaulted=yes; srcdir=.
  4988. !   if test ! -r $unique_file; then srcdir=..; fi
  4989.   fi
  4990.   if test ! -r $srcdir/$unique_file; then
  4991.     if test x$srcdirdefaulted = xyes; then
  4992. !     echo "configure: Can not find sources in \`.' or \`..'." 1>&2
  4993.     else
  4994.       echo "configure: Can not find sources in \`${srcdir}'." 1>&2
  4995. --- 78,94 ----
  4996.   # Find the source files, if location was not specified.
  4997.   if test -z "$srcdir"; then
  4998. !   srcdirdefaulted=yes
  4999. !   # Try the directory containing this script, then `..'.
  5000. !   prog=$0
  5001. !   confdir=`echo $prog|sed 's%/[^/][^/]*$%%'`
  5002. !   test "X$confdir" = "X$prog" && confdir=.
  5003. !   srcdir=$confdir
  5004. !   if test ! -r $srcdir/$unique_file; then
  5005. !     srcdir=..
  5006. !   fi
  5007.   fi
  5008.   if test ! -r $srcdir/$unique_file; then
  5009.     if test x$srcdirdefaulted = xyes; then
  5010. !     echo "configure: Can not find sources in \`${confdir}' or \`..'." 1>&2
  5011.     else
  5012.       echo "configure: Can not find sources in \`${srcdir}'." 1>&2
  5013. ***************
  5014. *** 191,195 ****
  5015.   # Make sure to not get the incompatible SysV /etc/install and
  5016.   # /usr/sbin/install, which might be in PATH before a BSD-like install,
  5017. ! # or the SunOS /usr/etc/install directory.
  5018.   if test -z "$INSTALL"; then
  5019.     echo checking for install
  5020. --- 198,202 ----
  5021.   # Make sure to not get the incompatible SysV /etc/install and
  5022.   # /usr/sbin/install, which might be in PATH before a BSD-like install,
  5023. ! # or the SunOS /usr/etc/install directory, or the AIX /bin/install.
  5024.   if test -z "$INSTALL"; then
  5025.     echo checking for install
  5026. ***************
  5027. *** 201,208 ****
  5028.       *)
  5029.         if test -f $dir/install; then
  5030. !     INSTALL="$dir/install -c"
  5031. !     INSTALL_PROGRAM='$(INSTALL)'
  5032. !     INSTALL_DATA='$(INSTALL) -m 644'
  5033. !     break
  5034.         fi
  5035.         ;;
  5036. --- 208,219 ----
  5037.       *)
  5038.         if test -f $dir/install; then
  5039. !     if grep dspmsg $dir/install >/dev/null 2>&1; then
  5040. !       : AIX
  5041. !     else
  5042. !       INSTALL="$dir/install -c"
  5043. !       INSTALL_PROGRAM='$(INSTALL)'
  5044. !       INSTALL_DATA='$(INSTALL) -m 644'
  5045. !       break
  5046. !     fi
  5047.         fi
  5048.         ;;
  5049. ***************
  5050. *** 230,233 ****
  5051. --- 241,277 ----
  5052.   
  5053.   
  5054. + echo checking for AIX
  5055. + cat <<EOF > conftest.c
  5056. + $DEFS
  5057. + #ifdef _AIX
  5058. +   yes
  5059. + #endif
  5060. + EOF
  5061. + eval "$CPP conftest.c > conftest.out 2>&1"
  5062. + if egrep "yes" conftest.out >/dev/null 2>&1; then
  5063. +   DEFS="${DEFS}#define _ALL_SOURCE 1
  5064. + "
  5065. + fi
  5066. + rm -f conftest*
  5067. + echo checking for DYNIX/ptx libseq
  5068. + cat <<EOF > conftest.c
  5069. + $DEFS
  5070. + #if defined(_SEQUENT_)
  5071. +   yes
  5072. + #endif
  5073. + EOF
  5074. + eval "$CPP conftest.c > conftest.out 2>&1"
  5075. + if egrep "yes" conftest.out >/dev/null 2>&1; then
  5076. +   SEQUENT=1
  5077. + fi
  5078. + rm -f conftest*
  5079. + test -n "$SEQUENT" && test -f /usr/lib/libseq.a &&
  5080. +   LIBS="$LIBS -lseq"
  5081.   echo checking for POSIXized ISC
  5082.   if test -d /etc/conf/kconfig.d &&
  5083. ***************
  5084. *** 249,252 ****
  5085. --- 293,398 ----
  5086.   fi
  5087.   
  5088. + echo checking for minix/config.h
  5089. + cat <<EOF > conftest.c
  5090. + $DEFS
  5091. + #include <minix/config.h>
  5092. + EOF
  5093. + err=`eval "$CPP conftest.c 2>&1 >/dev/null"`
  5094. + if test -z "$err"; then
  5095. +   MINIX=1
  5096. + fi
  5097. + rm -f conftest*
  5098. + # The Minix shell can't assign to the same variable on the same line!
  5099. + if test -n "$MINIX"; then
  5100. +   DEFS="${DEFS}#define _POSIX_SOURCE 1
  5101. + "
  5102. +   DEFS="${DEFS}#define _POSIX_1_SOURCE 2
  5103. + "
  5104. +   DEFS="${DEFS}#define _MINIX 1
  5105. + "
  5106. + fi
  5107. + echo checking for directory library header
  5108. + echo checking for dirent.h
  5109. + cat <<EOF > conftest.c
  5110. + $DEFS
  5111. + #include <dirent.h>
  5112. + EOF
  5113. + err=`eval "$CPP conftest.c 2>&1 >/dev/null"`
  5114. + if test -z "$err"; then
  5115. +   DEFS="${DEFS}#define DIRENT 1
  5116. + " dirheader=dirent.h
  5117. + fi
  5118. + rm -f conftest*
  5119. + if test -z "$dirheader"; then
  5120. + echo checking for sys/ndir.h
  5121. + cat <<EOF > conftest.c
  5122. + $DEFS
  5123. + #include <sys/ndir.h>
  5124. + EOF
  5125. + err=`eval "$CPP conftest.c 2>&1 >/dev/null"`
  5126. + if test -z "$err"; then
  5127. +   DEFS="${DEFS}#define SYSNDIR 1
  5128. + " dirheader=sys/ndir.h
  5129. + fi
  5130. + rm -f conftest*
  5131. + fi
  5132. + if test -z "$dirheader"; then
  5133. + echo checking for sys/dir.h
  5134. + cat <<EOF > conftest.c
  5135. + $DEFS
  5136. + #include <sys/dir.h>
  5137. + EOF
  5138. + err=`eval "$CPP conftest.c 2>&1 >/dev/null"`
  5139. + if test -z "$err"; then
  5140. +   DEFS="${DEFS}#define SYSDIR 1
  5141. + " dirheader=sys/dir.h
  5142. + fi
  5143. + rm -f conftest*
  5144. + fi
  5145. + echo checking for closedir return value
  5146. + cat <<EOF > conftest.c
  5147. + #include <sys/types.h>
  5148. + #include <$dirheader>
  5149. + int closedir(); main() { exit(0); }
  5150. + EOF
  5151. + eval $compile
  5152. + if test -s conftest && (./conftest; exit) 2>/dev/null; then
  5153. +   :
  5154. + else
  5155. +   DEFS="${DEFS}#define VOID_CLOSEDIR 1
  5156. + "
  5157. + fi
  5158. + rm -f conftest*
  5159. + echo checking for Xenix
  5160. + cat <<EOF > conftest.c
  5161. + $DEFS
  5162. + #if defined(M_XENIX) && !defined(M_UNIX)
  5163. +   yes
  5164. + #endif
  5165. + EOF
  5166. + eval "$CPP conftest.c > conftest.out 2>&1"
  5167. + if egrep "yes" conftest.out >/dev/null 2>&1; then
  5168. +   XENIX=1
  5169. + fi
  5170. + rm -f conftest*
  5171. + if test -n "$XENIX"; then
  5172. +   DEFS="${DEFS}#define VOID_CLOSEDIR 1
  5173. + "
  5174. +   LIBS="$LIBS -lx"
  5175. +   case "$DEFS" in
  5176. +   *SYSNDIR*) ;;
  5177. +   *) LIBS="-ldir $LIBS" ;; # Make sure -ldir precedes any -lx.
  5178. +   esac
  5179. + fi
  5180.   
  5181.   echo checking for directory library header
  5182. ***************
  5183. *** 363,366 ****
  5184. --- 509,513 ----
  5185.   #include <stdarg.h>
  5186.   #include <string.h>
  5187. + #include <float.h>
  5188.   #include <limits.h>
  5189.   EOF
  5190. ***************
  5191. *** 416,419 ****
  5192. --- 563,568 ----
  5193.     elif test -r /usr/X11/include/Box.h
  5194.     then dir=/usr/X11/include
  5195. +   elif test -r /usr/X11R5/include/Box.h
  5196. +   then dir=/usr/X11R5/include
  5197.     fi
  5198.   
  5199. ***************
  5200. *** 436,439 ****
  5201. --- 585,590 ----
  5202.   elif test -r /usr/X11/lib/libXaw.a
  5203.   then dir1=/usr/X11/lib
  5204. + elif test -r /usr/X11R5/lib/libXaw.a
  5205. + then dir1=/usr/X11R5/lib
  5206.   fi
  5207.   dir2=""
  5208. ***************
  5209. *** 452,456 ****
  5210.       if test $dir != . && test -f $dir/gcc; then
  5211.         # Not all systems have dirname.
  5212. !       prefix=`echo $dir|sed 's,/[^/][^/]*$,,'`
  5213.         break
  5214.       fi
  5215. --- 603,607 ----
  5216.       if test $dir != . && test -f $dir/gcc; then
  5217.         # Not all systems have dirname.
  5218. !       prefix=`echo $dir|sed 's%/[^/][^/]*$%%'`
  5219.         break
  5220.       fi
  5221. ***************
  5222. *** 463,471 ****
  5223.   if test -n "$prefix"; then
  5224.     test -z "$exec_prefix" && exec_prefix='$(prefix)'
  5225. !   prsub="s,^prefix[     ]*=.*$,prefix = $prefix,"
  5226.   fi
  5227.   if test -n "$exec_prefix"; then
  5228.     prsub="$prsub
  5229. ! s,^exec_prefix[     ]*=.*$,exec_prefix = $exec_prefix,"
  5230.   fi
  5231.   
  5232. --- 614,622 ----
  5233.   if test -n "$prefix"; then
  5234.     test -z "$exec_prefix" && exec_prefix='$(prefix)'
  5235. !   prsub="s%^prefix[     ]*=.*$%prefix = $prefix%"
  5236.   fi
  5237.   if test -n "$exec_prefix"; then
  5238.     prsub="$prsub
  5239. ! s%^exec_prefix[     ]*=.*$%exec_prefix = $exec_prefix%"
  5240.   fi
  5241.   
  5242. ***************
  5243. *** 477,481 ****
  5244.   # Generated automatically by configure.
  5245.   # Run this file to recreate the current configuration.
  5246. ! # This directory was configured as follows:
  5247.   # $0 $*
  5248.   
  5249. --- 628,634 ----
  5250.   # Generated automatically by configure.
  5251.   # Run this file to recreate the current configuration.
  5252. ! # This directory was configured as follows,
  5253. ! # on host `(hostname || uname -n) 2>/dev/null`:
  5254. ! #
  5255.   # $0 $*
  5256.   
  5257. ***************
  5258. *** 485,489 ****
  5259.   esac
  5260.   
  5261. ! trap 'rm -f ./GNUmakefile include/c-auto.h; exit 1' 1 3 15
  5262.   CC='$CC'
  5263.   CPP='$CPP'
  5264. --- 638,642 ----
  5265.   esac
  5266.   
  5267. ! trap 'rm -f ./GNUmakefile doc/Makefile include/c-auto.h; exit 1' 1 3 15
  5268.   CC='$CC'
  5269.   CPP='$CPP'
  5270. ***************
  5271. *** 505,512 ****
  5272.   
  5273.   top_srcdir=$srcdir
  5274. ! for file in ./GNUmakefile; do
  5275.     srcdir=$top_srcdir
  5276.     # Remove last slash and all that follows it.  Not all systems have dirname.
  5277. !   dir=`echo $file|sed 's,/[^/][^/]*$,,'`
  5278.     if test "$dir" != "$file"; then
  5279.       test "$top_srcdir" != . && srcdir=$top_srcdir/$dir
  5280. --- 658,665 ----
  5281.   
  5282.   top_srcdir=$srcdir
  5283. ! for file in ./GNUmakefile doc/Makefile; do
  5284.     srcdir=$top_srcdir
  5285.     # Remove last slash and all that follows it.  Not all systems have dirname.
  5286. !   dir=`echo $file|sed 's%/[^/][^/]*$%%'`
  5287.     if test "$dir" != "$file"; then
  5288.       test "$top_srcdir" != . && srcdir=$top_srcdir/$dir
  5289. ***************
  5290. *** 518,532 ****
  5291.     sed -e "
  5292.   $prsub
  5293. ! s,@CC@,$CC,g
  5294. ! s,@CPP@,$CPP,g
  5295. ! s,@INSTALL@,$INSTALL,g
  5296. ! s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,g
  5297. ! s,@INSTALL_DATA@,$INSTALL_DATA,g
  5298. ! s,@RANLIB@,$RANLIB,g
  5299. ! s,@wlibs@,$wlibs,g
  5300. ! s,@xincludedir@,$xincludedir,g
  5301. ! s,@xlibdir@,$xlibdir,g
  5302. ! s,@LIBS@,$LIBS,g
  5303. ! s,@srcdir@,$srcdir,g
  5304.   " $top_srcdir/${file}.in >> $file
  5305.   done
  5306. --- 671,685 ----
  5307.     sed -e "
  5308.   $prsub
  5309. ! s%@CC@%$CC%g
  5310. ! s%@CPP@%$CPP%g
  5311. ! s%@INSTALL@%$INSTALL%g
  5312. ! s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
  5313. ! s%@INSTALL_DATA@%$INSTALL_DATA%g
  5314. ! s%@RANLIB@%$RANLIB%g
  5315. ! s%@wlibs@%$wlibs%g
  5316. ! s%@xincludedir@%$xincludedir%g
  5317. ! s%@xlibdir@%$xlibdir%g
  5318. ! s%@LIBS@%$LIBS%g
  5319. ! s%@srcdir@%$srcdir%g
  5320.   " $top_srcdir/${file}.in >> $file
  5321.   done
  5322. ***************
  5323. *** 545,548 ****
  5324. --- 698,702 ----
  5325.   filenum == 1 && $1 == "#define" \
  5326.   { defs[$2] = $3
  5327. +   defined[$2] = 1
  5328.     for (i = 4; i <= NF; i++)
  5329.       defs[$2] = defs[$2] " " $i
  5330. ***************
  5331. *** 550,554 ****
  5332.   /END_OF_DEFS/ { filenum = 2; next }
  5333.   filenum == 2 && $1 == "#define" && \
  5334. ! defs[$2] != "" {
  5335.     $3 = defs[$2]
  5336.     print; next
  5337. --- 704,708 ----
  5338.   /END_OF_DEFS/ { filenum = 2; next }
  5339.   filenum == 2 && $1 == "#define" && \
  5340. ! defined[$2] == 1 {
  5341.     $3 = defs[$2]
  5342.     print; next
  5343. ***************
  5344. *** 555,559 ****
  5345.   }
  5346.   filenum == 2 && $1 == "#undef" && \
  5347. ! defs[$2] != "" {
  5348.     $1 = "#define"
  5349.     $2 = $2 " " defs[$2]
  5350. --- 709,713 ----
  5351.   }
  5352.   filenum == 2 && $1 == "#undef" && \
  5353. ! defined[$2] == 1 {
  5354.     $1 = "#define"
  5355.     $2 = $2 " " defs[$2]
  5356. diff -Nrc2 fontutils-0.5/configure.in fontutils-0.6/configure.in
  5357. *** fontutils-0.5/configure.in    Wed Jul 22 08:50:53 1992
  5358. --- fontutils-0.6/configure.in    Mon Oct  5 10:29:32 1992
  5359. ***************
  5360. *** 18,23 ****
  5361. --- 18,27 ----
  5362.   AC_PROG_RANLIB
  5363.   
  5364. + AC_AIX
  5365. + AC_DYNIX_SEQ
  5366.   AC_ISC_POSIX
  5367.   AC_ISC_WLIBS
  5368. + AC_MINIX
  5369. + AC_XENIX_DIR
  5370.   
  5371.   AC_DIR_HEADER
  5372. ***************
  5373. *** 33,35 ****
  5374.   
  5375.   # This will generate `Makefile'(s), `config.status', and our header file.
  5376. ! AC_OUTPUT(./GNUmakefile)
  5377. --- 37,39 ----
  5378.   
  5379.   # This will generate `Makefile'(s), `config.status', and our header file.
  5380. ! AC_OUTPUT(./GNUmakefile doc/Makefile)
  5381. diff -Nrc2 fontutils-0.5/data/ChangeLog fontutils-0.6/data/ChangeLog
  5382. *** fontutils-0.5/data/ChangeLog    Thu Sep  3 09:29:53 1992
  5383. --- fontutils-0.6/data/ChangeLog    Wed Oct 28 16:08:15 1992
  5384. ***************
  5385. *** 1,2 ****
  5386. --- 1,32 ----
  5387. + Wed Oct 28 15:10:12 1992  Karl Berry  (karl@claude.cs.umb.edu)
  5388. +     * Vesion 0.6.
  5389. +     * defsprog.make (install): Make second arg a file, not a dir.
  5390. + Tue Oct 27 13:02:40 1992  Karl Berry  (karl@cs.umb.edu)
  5391. +     * defs.make (dist): Make .c files from .y source.
  5392. + Mon Oct 19 08:05:34 1992  Karl Berry  (karl@cs.umb.edu)
  5393. +     * ascii.enc: Remove trailing .notdef's.
  5394. +     * encoding.map (mflogo): New entry.
  5395. +         * mflogo.enc: New file.
  5396. + Sun Oct  4 11:31:42 1992  Karl Berry  (karl@cs.umb.edu)
  5397. +     * ggmr.{ifi,1200cmi}: Make links here so we distribute these files
  5398. +     (even though we can't use the image they go with for legal reasons).
  5399. + Tue Sep 15 08:40:11 1992  Karl Berry  (karl@hayley)
  5400. +         * defs.make (RANLIB): define as `@true', so it's silent.
  5401. + Fri Sep  4 08:42:42 1992  Karl Berry  (karl@hayley)
  5402. +         * defs.make (extraclean): new target.
  5403.   Thu Sep  3 09:29:53 1992  Karl Berry  (karl@hayley)
  5404.   
  5405. diff -Nrc2 fontutils-0.5/data/ascii.enc fontutils-0.6/data/ascii.enc
  5406. *** fontutils-0.5/data/ascii.enc    Fri Mar 20 14:59:47 1992
  5407. --- fontutils-0.6/data/ascii.enc    Mon Oct 19 08:07:58 1992
  5408. ***************
  5409. *** 127,257 ****
  5410.   braceright
  5411.   asciitilde
  5412. - .notdef
  5413. - .notdef
  5414. - .notdef
  5415. - .notdef
  5416. - .notdef
  5417. - .notdef
  5418. - .notdef
  5419. - .notdef
  5420. - .notdef
  5421. - .notdef
  5422. - .notdef
  5423. - .notdef
  5424. - .notdef
  5425. - .notdef
  5426. - .notdef
  5427. - .notdef
  5428. - .notdef
  5429. - .notdef
  5430. - .notdef
  5431. - .notdef
  5432. - .notdef
  5433. - .notdef
  5434. - .notdef
  5435. - .notdef
  5436. - .notdef
  5437. - .notdef
  5438. - .notdef
  5439. - .notdef
  5440. - .notdef
  5441. - .notdef
  5442. - .notdef
  5443. - .notdef
  5444. - .notdef
  5445. - .notdef
  5446. - .notdef
  5447. - .notdef
  5448. - .notdef
  5449. - .notdef
  5450. - .notdef
  5451. - .notdef
  5452. - .notdef
  5453. - .notdef
  5454. - .notdef
  5455. - .notdef
  5456. - .notdef
  5457. - .notdef
  5458. - .notdef
  5459. - .notdef
  5460. - .notdef
  5461. - .notdef
  5462. - .notdef
  5463. - .notdef
  5464. - .notdef
  5465. - .notdef
  5466. - .notdef
  5467. - .notdef
  5468. - .notdef
  5469. - .notdef
  5470. - .notdef
  5471. - .notdef
  5472. - .notdef
  5473. - .notdef
  5474. - .notdef
  5475. - .notdef
  5476. - .notdef
  5477. - .notdef
  5478. - .notdef
  5479. - .notdef
  5480. - .notdef
  5481. - .notdef
  5482. - .notdef
  5483. - .notdef
  5484. - .notdef
  5485. - .notdef
  5486. - .notdef
  5487. - .notdef
  5488. - .notdef
  5489. - .notdef
  5490. - .notdef
  5491. - .notdef
  5492. - .notdef
  5493. - .notdef
  5494. - .notdef
  5495. - .notdef
  5496. - .notdef
  5497. - .notdef
  5498. - .notdef
  5499. - .notdef
  5500. - .notdef
  5501. - .notdef
  5502. - .notdef
  5503. - .notdef
  5504. - .notdef
  5505. - .notdef
  5506. - .notdef
  5507. - .notdef
  5508. - .notdef
  5509. - .notdef
  5510. - .notdef
  5511. - .notdef
  5512. - .notdef
  5513. - .notdef
  5514. - .notdef
  5515. - .notdef
  5516. - .notdef
  5517. - .notdef
  5518. - .notdef
  5519. - .notdef
  5520. - .notdef
  5521. - .notdef
  5522. - .notdef
  5523. - .notdef
  5524. - .notdef
  5525. - .notdef
  5526. - .notdef
  5527. - .notdef
  5528. - .notdef
  5529. - .notdef
  5530. - .notdef
  5531. - .notdef
  5532. - .notdef
  5533. - .notdef
  5534. - .notdef
  5535. - .notdef
  5536. - .notdef
  5537. - .notdef
  5538. - .notdef
  5539. - .notdef
  5540. - .notdef
  5541. --- 127,128 ----
  5542. diff -Nrc2 fontutils-0.5/data/defs.make fontutils-0.6/data/defs.make
  5543. *** fontutils-0.5/data/defs.make    Mon Aug 31 09:45:54 1992
  5544. --- fontutils-0.6/data/defs.make    Tue Oct 27 13:26:06 1992
  5545. ***************
  5546. *** 29,33 ****
  5547.   LDFLAGS = $(XLDFLAGS)
  5548.   LIBS = -lm
  5549. ! RANLIB = true
  5550.   srcdir = .
  5551.   
  5552. --- 29,33 ----
  5553.   LDFLAGS = $(XLDFLAGS)
  5554.   LIBS = -lm
  5555. ! RANLIB = @true
  5556.   srcdir = .
  5557.   
  5558. ***************
  5559. *** 117,120 ****
  5560. --- 117,121 ----
  5561.       mkdir $(distdir)
  5562.       ln ChangeLog GNUmakefile M.depend README $(distdir)
  5563. +     if test -n "$(y)"; then $(MAKE) $(y).c; fi
  5564.       find \( -name \*.c -o -name \*.h \) -exec ln '{}' $(distdir)/'{}' \;
  5565.   .PHONY: dist
  5566. ***************
  5567. *** 134,139 ****
  5568.   
  5569.   distclean:: clean
  5570. ! # Remove all files that would not be in a distribution.
  5571.   .PHONY: distclean
  5572.   
  5573.   realclean:: distclean
  5574. --- 135,146 ----
  5575.   
  5576.   distclean:: clean
  5577. ! # Delete all files that users would normally create from compilation and
  5578. ! # installation. 
  5579.   .PHONY: distclean
  5580. + extraclean:: distclean
  5581. + # Delete anything likely to be found in the source directory
  5582. + # that shouldn't be in the distribution.
  5583. +     rm -f *.tfm *gf *pk *.bzr *~ *\#* patch* *.orig *.rej
  5584.   
  5585.   realclean:: distclean
  5586. diff -Nrc2 fontutils-0.5/data/defsprog.make fontutils-0.6/data/defsprog.make
  5587. *** fontutils-0.5/data/defsprog.make    Wed Sep  2 17:31:07 1992
  5588. --- fontutils-0.6/data/defsprog.make    Wed Oct 28 16:08:24 1992
  5589. ***************
  5590. *** 21,25 ****
  5591.   
  5592.   install:: $(program)
  5593. !     $(INSTALL_PROGRAM) $(program) $(bindir)
  5594.   
  5595.   # Make sure all the libraries this program needs are built.
  5596. --- 21,25 ----
  5597.   
  5598.   install:: $(program)
  5599. !     $(INSTALL_PROGRAM) $(program) $(bindir)/$(program)
  5600.   
  5601.   # Make sure all the libraries this program needs are built.
  5602. diff -Nrc2 fontutils-0.5/data/encoding.map fontutils-0.6/data/encoding.map
  5603. *** fontutils-0.5/data/encoding.map    Tue Jul 28 14:53:25 1992
  5604. --- fontutils-0.6/data/encoding.map    Mon Oct 19 08:07:58 1992
  5605. ***************
  5606. *** 9,12 ****
  5607. --- 9,13 ----
  5608.   gnulatin    GNU Latin text
  5609.   gnulcomp     GNU Latin text complement
  5610. + mflogo        AEFMNOT only
  5611.   psymbol     PostScript Symbol
  5612.   texlatin    Extended TeX Latin
  5613. diff -Nrc2 fontutils-0.5/data/ggmr.1200cmi fontutils-0.6/data/ggmr.1200cmi
  5614. *** fontutils-0.5/data/ggmr.1200cmi    Wed Sep  2 15:26:25 1992
  5615. --- fontutils-0.6/data/ggmr.1200cmi    Sun Oct  4 11:31:40 1992
  5616. ***************
  5617. *** 1,3 ****
  5618. ! % Charspace input for the main Garamond letters.
  5619.   
  5620.   codingscheme "GNU Latin text"
  5621. --- 1,3 ----
  5622. ! % Charspace input for page 42/Atlas of Typeforms Garamond roman.
  5623.   
  5624.   codingscheme "GNU Latin text"
  5625. diff -Nrc2 fontutils-0.5/data/ggmr.ifi fontutils-0.6/data/ggmr.ifi
  5626. *** fontutils-0.5/data/ggmr.ifi    Tue Aug 18 14:03:43 1992
  5627. --- fontutils-0.6/data/ggmr.ifi    Sun Oct  4 11:31:40 1992
  5628. ***************
  5629. *** 1,3 ****
  5630. ! % Info for Monotype Garamond roman 30 pt, page 42 of An Atlas of Typeforms.
  5631.   A 3 % to -1
  5632.   B 2 % to -1
  5633. --- 1,13 ----
  5634. ! % Garamond roman -- basic characters.
  5635. ! % Source: Atlas of Typeforms, page 42.
  5636. ! % Original design size is 30pt, but that looks too small to us.
  5637. ! % 
  5638. ! %   -designsize=26
  5639. ! %   -baselines=121,130,120
  5640. ! % 
  5641. ! % Actually, we can't use this image, because this is a Monotype font,
  5642. ! % and Monotype is a British company, and Britain has a retroactive type
  5643. ! % protection law.  (See the `Legal issues' section of the manual.)
  5644. ! % 
  5645.   A 3 % to -1
  5646.   B 2 % to -1
  5647. diff -Nrc2 fontutils-0.5/data/mflogo.enc fontutils-0.6/data/mflogo.enc
  5648. *** fontutils-0.5/data/mflogo.enc
  5649. --- fontutils-0.6/data/mflogo.enc    Mon Oct 19 08:07:58 1992
  5650. ***************
  5651. *** 0 ****
  5652. --- 1,87 ----
  5653. + % Encoding for the Metafont logo fonts.
  5654. + AEFMNOT only
  5655. + .notdef
  5656. + .notdef
  5657. + .notdef
  5658. + .notdef
  5659. + .notdef
  5660. + .notdef
  5661. + .notdef
  5662. + .notdef
  5663. + .notdef
  5664. + .notdef
  5665. + .notdef
  5666. + .notdef
  5667. + .notdef
  5668. + .notdef
  5669. + .notdef
  5670. + .notdef
  5671. + .notdef
  5672. + .notdef
  5673. + .notdef
  5674. + .notdef
  5675. + .notdef
  5676. + .notdef
  5677. + .notdef
  5678. + .notdef
  5679. + .notdef
  5680. + .notdef
  5681. + .notdef
  5682. + .notdef
  5683. + .notdef
  5684. + .notdef
  5685. + .notdef
  5686. + .notdef
  5687. + .notdef
  5688. + .notdef
  5689. + .notdef
  5690. + .notdef
  5691. + .notdef
  5692. + .notdef
  5693. + .notdef
  5694. + .notdef
  5695. + .notdef
  5696. + .notdef
  5697. + .notdef
  5698. + .notdef
  5699. + .notdef
  5700. + .notdef
  5701. + .notdef
  5702. + .notdef
  5703. + .notdef
  5704. + .notdef
  5705. + .notdef
  5706. + .notdef
  5707. + .notdef
  5708. + .notdef
  5709. + .notdef
  5710. + .notdef
  5711. + .notdef
  5712. + .notdef
  5713. + .notdef
  5714. + .notdef
  5715. + .notdef
  5716. + .notdef
  5717. + .notdef
  5718. + .notdef
  5719. + .notdef
  5720. + A
  5721. + .notdef
  5722. + .notdef
  5723. + .notdef
  5724. + E
  5725. + F
  5726. + .notdef
  5727. + .notdef
  5728. + .notdef
  5729. + .notdef
  5730. + .notdef
  5731. + .notdef
  5732. + M
  5733. + N
  5734. + O
  5735. + .notdef
  5736. + .notdef
  5737. + .notdef
  5738. + .notdef
  5739. + T
  5740. diff -Nrc2 fontutils-0.5/doc/Makefile.in fontutils-0.6/doc/Makefile.in
  5741. *** fontutils-0.5/doc/Makefile.in
  5742. --- fontutils-0.6/doc/Makefile.in    Wed Oct 28 16:10:29 1992
  5743. ***************
  5744. *** 0 ****
  5745. --- 1,92 ----
  5746. + # Makefile for the various bits of documentation.
  5747. + #
  5748. + # Copyright (C) 1992 Free Software Foundation, Inc.
  5749. + #
  5750. + # This program is free software; you can redistribute it and/or modify
  5751. + # it under the terms of the GNU General Public License as published by
  5752. + # the Free Software Foundation; either version 1, or (at your option)
  5753. + # any later version.
  5754. + #
  5755. + # This program is distributed in the hope that it will be useful,
  5756. + # but WITHOUT ANY WARRANTY; without even the implied warranty of
  5757. + # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  5758. + # GNU General Public License for more details.
  5759. + #
  5760. + # You should have received a copy of the GNU General Public License
  5761. + # along with this program; if not, write to the Free Software
  5762. + # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  5763. + # For `install'.
  5764. + prefix = /usr/local
  5765. + infodir = $(prefix)/info
  5766. + INSTALL = @INSTALL@
  5767. + INSTALL_DATA = @INSTALL_DATA@
  5768. + MAKEINFO = makeinfo
  5769. + SHELL = /bin/sh
  5770. + TEX = tex
  5771. + TEXINDEX = texindex
  5772. + default: fontu.info
  5773. + all: INSTALL fontu.dvi
  5774. + fontu.dvi: fontu.cps
  5775. +     $(TEX) fontu.texi
  5776. + fontu.cps: fontu.cp
  5777. +     $(TEXINDEX) fontu.??
  5778. + fontu.cp: *.texi
  5779. +     $(TEX) fontu.texi
  5780. + fontu.info: *.texi
  5781. +     $(MAKEINFO) fontu.texi
  5782. + install: fontu.info
  5783. +     for i in fontu.info*; do $(INSTALL_DATA) $$i $(infodir); done
  5784. + update:
  5785. +     emacs -batch -l update.el
  5786. + # We don't automatically generate dependencies.
  5787. + depend:
  5788. + # Separate the installation instructions into a separate file, for the
  5789. + # benefit of people who don't want to look at the info file.
  5790. + INSTALL: fontu.info
  5791. +     sed -n '/Node: Installation/,/Good luck./p' fontu.info-1 \
  5792. +           | grep -v  > $@
  5793. + # Prevent GNU make 3 from overflowing arg limit on system V.
  5794. + .NOEXPORT:
  5795. + # `make dist' should only be called from the top-level Makefile, as it
  5796. + # depends on $(version), $(top_distdir), and $(dir).
  5797. + # 
  5798. + distdir = ../$(top_distdir)/$(dir)
  5799. + distfiles = Makefile.in update.el *.texi
  5800. + dist::
  5801. +     mkdir $(distdir)
  5802. +     ln Makefile $(distfiles) $(distdir)
  5803. +     cp -p $(plain)/texinfo.tex $(distdir)
  5804. + #
  5805. + # Have to add the version number and date before making the Info file.
  5806. +     (cd $(distdir); \
  5807. +          add-version $(version) fontu.texi intro.texi; \
  5808. +          add-date fontu.texi; \
  5809. +       $(MAKE) INSTALL fontu.cps distclean)
  5810. +     mv $(distdir)/INSTALL ../$(top_distdir)/INSTALL
  5811. + clean mostlyclean:
  5812. +     rm -f fontu.?? *.dvi *.log *.toc
  5813. + distclean: clean
  5814. +     rm -f Makefile
  5815. +     for f in fontu.??s; do if test ! -s $$f; then rm -f $$f; fi; done
  5816. + extraclean: distclean
  5817. +     rm -f *~ \#* patch* *.orig *.rej *.bak *.ckp core a.out
  5818. + realclean: distclean
  5819. +     rm -f *.info* fontu.??? INSTALL
  5820. diff -Nrc2 fontutils-0.5/doc/bugs.texi fontutils-0.6/doc/bugs.texi
  5821. *** fontutils-0.5/doc/bugs.texi    Thu Sep  3 09:28:54 1992
  5822. --- fontutils-0.6/doc/bugs.texi    Mon Oct 12 10:06:49 1992
  5823. ***************
  5824. *** 6,11 ****
  5825.   @chapter Bugs
  5826.   
  5827. ! @cindex bugs, reporting
  5828.   
  5829.   Your bug reports are essential in making these programs reliable.
  5830.   
  5831. --- 6,13 ----
  5832.   @chapter Bugs
  5833.   
  5834. ! (This chapter is adapted from the analogous one in the GCC manual,
  5835. ! written by Richard Stallman.)
  5836.   
  5837. + @cindex bug reports, purpose of
  5838.   Your bug reports are essential in making these programs reliable.
  5839.   
  5840. ***************
  5841. *** 22,28 ****
  5842.   suggestions for improvements, no matter how small.
  5843.   
  5844. ! To enable us to fix the bug, you should include all the following.  If
  5845. ! the bug was in installation, as opposed to in actually running one of
  5846. ! the programs, the last two items are irrelevant.
  5847.   
  5848.   @itemize @bullet
  5849. --- 24,125 ----
  5850.   suggestions for improvements, no matter how small.
  5851.   
  5852. ! In order for a bug report to serve its purpose, you must include the
  5853. ! information that makes for fixing the bug, as described below.
  5854. ! Thanks (in advance)!
  5855. ! @menu
  5856. ! * Bug criteria::                Have you found a bug?
  5857. ! * Bug reporting::               How to effectively report a bug.
  5858. ! @end menu
  5859. ! @node Bug criteria, Bug reporting,  , Bugs
  5860. ! @section Bug criteria
  5861. ! @cindex criteria for bugs
  5862. ! @cindex bugs, criteria for
  5863. ! If you are not sure whether you have found a bug, here are some
  5864. ! guidelines:
  5865. ! @itemize @bullet
  5866. ! @item
  5867. ! @cindex fatal signals
  5868. ! If a program gets a fatal signal, for any input whatsoever, that
  5869. ! is a bug.  Reliable programs never crash.
  5870. ! @item
  5871. ! @cindex invalid output fonts
  5872. ! @cindex bad output fonts
  5873. ! @cindex validity of fonts, checking
  5874. ! @cindex fatal errors and invalid output fonts
  5875. ! @pindex gftype@r{, checking validity font}
  5876. ! @pindex tftopl@r{, checking validity font}
  5877. ! If a program produces an invalid font, for any input whatsoever, that is
  5878. ! a bug---unless the program reported a fatal error that forced it to quit
  5879. ! prematurely.  For example, if Metafont gives errors reading the output
  5880. ! of @code{bzrto -mf}, that is a bug.  You can run the @TeX{} utility
  5881. ! programs GFtype and TFtoPL to check the validity of a GF or TFM file.
  5882. ! @item
  5883. ! @cindex error messages, spurious
  5884. ! @cindex spurious error messages
  5885. ! If a program gives an error message for valid input, that is a bug.
  5886. ! Similarly, if a program gives a fatal error when it could continue
  5887. ! processing, that is a bug.  It is sometimes hard to tell if these
  5888. ! conditions obtain; you must use your best judgement.
  5889. ! @item
  5890. ! @cindex error messages, missing
  5891. ! If a program does not give an error message for invalid input, that is a bug.
  5892. ! @end itemize
  5893. ! @node Bug reporting,  , Bug criteria, Bugs
  5894. ! @section Bug reporting
  5895. ! @cindex bugs, reporting
  5896. ! @cindex compilation bugs, reporting
  5897. ! @cindex installation bugs, reporting
  5898. ! The purpose of a bug report is to enable someone to
  5899. ! fix the bug if it is not known.  It isn't important what happens if the
  5900. ! bug is already known.  Therefore, always write your bug reports on the
  5901. ! assumption that the bug is not known.
  5902. ! Sometimes people give a few sketchy facts and ask, ``Does this ring a
  5903. ! bell?'' or ``Should this be happening?''  This cannot help us fix a bug,
  5904. ! so it is basically useless.  We can only respond by asking for the
  5905. ! details below, so we can investigate.  You might as well expedite
  5906. ! matters by sending them to begin with.
  5907. ! Try to make your bug report self-contained.  If we ask you for more
  5908. ! information, it is best if you include all the original information in
  5909. ! your response, as well as the new information.  We might have discarded
  5910. ! the previous message, or even if we haven't, it takes us time to search
  5911. ! for it.  Similarly, if you've reported bugs before, it is still best to
  5912. ! send all the information; we can't possibly remember what environment
  5913. ! everyone uses!
  5914. ! @menu
  5915. ! * Necessary information::       What you need to send.
  5916. ! * Unnecessary information::     What you don't need to send.
  5917. ! * Documentation bugs::          Report the bugs in the manual, too.
  5918. ! @end menu
  5919. ! @node Necessary information, Unnecessary information,  , Bug reporting
  5920. ! @subsection Necessary information
  5921. ! To enable us to fix a bug, please include all the information below.  If
  5922. ! the bug was in compilation or installation, as opposed to in actually
  5923. ! running one of the programs, the last two items are irrelevant.  But in
  5924. ! that case, please also make sure it is not a known problem before
  5925. ! reporting it.  @xref{Problems}.
  5926. ! You should include all of the following in your bug report:
  5927.   
  5928.   @itemize @bullet
  5929. ***************
  5930. *** 29,33 ****
  5931.   
  5932.   @item
  5933. ! The version of the font utilities.  You can get this from the top-level
  5934.   files @file{ChangeLog} or @file{GNUmakefile.in}, or from the
  5935.   @samp{-version} option which all the programs have.
  5936. --- 126,130 ----
  5937.   
  5938.   @item
  5939. ! The version number of the program.  You can get this from the top-level
  5940.   files @file{ChangeLog} or @file{GNUmakefile.in}, or from the
  5941.   @samp{-version} option which all the programs have.
  5942. ***************
  5943. *** 38,42 ****
  5944.   
  5945.   @item
  5946. ! A description of the bug.
  5947.   
  5948.   @item
  5949. --- 135,140 ----
  5950.   
  5951.   @item
  5952. ! A description of the bug.  For example, ``The program gets a fatal
  5953. ! signal,'' or ``The baselines in the generated font are too high.''
  5954.   
  5955.   @item
  5956. ***************
  5957. *** 58,78 ****
  5958.   But if you don't want to take the time to break up the font, please send
  5959.   in the bug report anyway (with the entire font).  We much prefer that to
  5960. ! you not reporting the bug at all.
  5961.   
  5962.   @end itemize
  5963.   
  5964. ! @cindex compilation bugs, reporting
  5965. ! @cindex installation bugs, reporting
  5966. ! If the bug is in compilation or installation, please make sure it is not
  5967. ! a known problem before reporting it.  @xref{Problems}.
  5968.   
  5969.   @cindex manual bugs, reporting
  5970.   @cindex documentation bugs, reporting
  5971.   It is just as important to report bugs in the documentation as in the
  5972.   programs.  If you want to do something using these programs, and reading
  5973. ! the manual doesn't tell you how to do it, that is probably a bug.  In
  5974. ! fact, the best way to report it is something like: ``I want to do
  5975. ! @var{x}; I looked in the manual in sections @var{a}, @var{b}, and
  5976. ! @var{c}, but they only explained part of how to do @var{x}.''
  5977.   
  5978.   If your bug report makes it clear that you've actually made an attempt
  5979. --- 156,245 ----
  5980.   But if you don't want to take the time to break up the font, please send
  5981.   in the bug report anyway (with the entire font).  We much prefer that to
  5982. ! you not reporting the bug at all!
  5983.   
  5984.   @end itemize
  5985.   
  5986. ! In other words, we need enough information so that we can run the
  5987. ! offending program under the debugger, so we can find out what's
  5988. ! happening.  Without all the command-line arguments, or the input file in
  5989. ! question, we cannot do this.  Since you must have found the bug by
  5990. ! running the program with a particular set of options and on a particular
  5991. ! input file, you already have this information; all you need to do is
  5992. ! send it!
  5993. ! @node Unnecessary information, Documentation bugs, Necessary information, Bug reporting
  5994. ! @subsection Unnecessary information
  5995. ! Here are some things that are not necessary to include in a bug report.
  5996. ! @itemize @bullet
  5997. ! @item
  5998. ! @cindex envelope of bugs
  5999. ! @cindex bugs, envelope of
  6000. ! A description of the envelope of the bug.
  6001. ! Often people who encounter a bug spend a lot of time investigating which
  6002. ! changes to the input file or command-line options will make the bug go
  6003. ! away and which changes will not affect it.
  6004. ! This is often time consuming and not very useful, because the way we
  6005. ! will find the bug is by running a single example under the debugger with
  6006. ! breakpoints, not by pure deduction from a series of examples.  You might
  6007. ! as well save your time for something else.
  6008. ! @item
  6009. ! @cindex patches for bugs
  6010. ! @cindex bugs, sending patches for
  6011. ! @cindex sending patches for bugs
  6012. ! A patch for the bug.
  6013. ! A patch for the bug is useful if it is a good one.  But don't omit the
  6014. ! necessary information, such as the test case, on the assumption that a
  6015. ! patch is all we need.  We might see problems with your patch and decide
  6016. ! to fix the problem another way, or we might not understand the patch at
  6017. ! all.  Without an example, we won't be able to verify that the bug is
  6018. ! fixed.
  6019. ! Also, if we can't understand what bug you are trying to fix, or why your
  6020. ! patch should be an improvement, we won't install it.  A test case will
  6021. ! help us to understand.
  6022.   
  6023. + @xref{Sending Patches, , Sending Patches for GNU CC, gcc, GCC Manual},
  6024. + for more details on the best way to write changes.
  6025. + @item
  6026. + @cindex bugs, sending backtraces for
  6027. + @cindex backtraces, sending for bugs
  6028. + Sometimes people send just a backtrace, but that is not useful by
  6029. + itself.  It is usually the values of local or global variables which
  6030. + matter, sometimes very far away from the location where you noticed the
  6031. + bug.  We need to be able to run the debugger ourselves to investigate.
  6032. + @item
  6033. + @cindex bugs, guesses about cause
  6034. + @cindex guesses about bugs
  6035. + A guess about what the bug is or what it depends on.
  6036. + Such guesses are not useful, and often wrong.  It is impossible to guess
  6037. + correctly without using the debugger to find the facts, so you might as
  6038. + well save your imagination for other things!
  6039. + @end itemize
  6040. + @node Documentation bugs,  , Unnecessary information, Bug reporting
  6041. + @subsection Documentation bugs
  6042.   @cindex manual bugs, reporting
  6043.   @cindex documentation bugs, reporting
  6044.   It is just as important to report bugs in the documentation as in the
  6045.   programs.  If you want to do something using these programs, and reading
  6046. ! the manual doesn't tell you how, that is probably a bug.  In fact, the
  6047. ! best way to report it is something like: ``I want to do @var{x}; I
  6048. ! looked in the manual in sections @var{a} and @var{b}, but they didn't
  6049. ! explain it.''
  6050.   
  6051.   If your bug report makes it clear that you've actually made an attempt
  6052. ***************
  6053. *** 79,82 ****
  6054.   to find the answers using the manual, we will be much more likely to
  6055.   take action (since we won't have to search the manual ourselves).
  6056. - Thanks (in advance)!
  6057. --- 246,247 ----
  6058. diff -Nrc2 fontutils-0.5/doc/bzredit.texi fontutils-0.6/doc/bzredit.texi
  6059. *** fontutils-0.5/doc/bzredit.texi    Wed Sep  2 17:17:14 1992
  6060. --- fontutils-0.6/doc/bzredit.texi    Mon Oct  5 10:02:21 1992
  6061. ***************
  6062. *** 167,174 ****
  6063.   @enumerate
  6064.   
  6065.   @findex bpl-quit
  6066.   @cindex quitting @code{bpl-mode}
  6067.   @cindex leaving @code{bpl-mode}
  6068. ! @item
  6069.   @code{bpl-quit} (@kbd{C-c q} and @kbd{C-c C-q}), which kills the
  6070.   Ghostscript subprocess and then removes the BPL buffer from the screen.
  6071. --- 167,176 ----
  6072.   @enumerate
  6073.   
  6074. + @item
  6075.   @findex bpl-quit
  6076.   @cindex quitting @code{bpl-mode}
  6077.   @cindex leaving @code{bpl-mode}
  6078. ! @kindex C-c q
  6079. ! @kindex C-c C-q
  6080.   @code{bpl-quit} (@kbd{C-c q} and @kbd{C-c C-q}), which kills the
  6081.   Ghostscript subprocess and then removes the BPL buffer from the screen.
  6082. ***************
  6083. *** 176,182 ****
  6084.   left for you to do by hand.
  6085.   
  6086.   @findex bpl-erasepage
  6087.   @findex erasepage
  6088. ! @item
  6089.   @code{bpl-erasepage} (@kbd{C-c e} and @kbd{C-c C-e}), which sends an
  6090.   @code{erasepage} command to Ghostscript, thus erasing whatever is
  6091. --- 178,186 ----
  6092.   left for you to do by hand.
  6093.   
  6094. + @item
  6095.   @findex bpl-erasepage
  6096.   @findex erasepage
  6097. ! @kindex C-c e
  6098. ! @kindex C-c C-e
  6099.   @code{bpl-erasepage} (@kbd{C-c e} and @kbd{C-c C-e}), which sends an
  6100.   @code{erasepage} command to Ghostscript, thus erasing whatever is
  6101. ***************
  6102. *** 183,191 ****
  6103.   currently displayed.
  6104.   
  6105.   @findex bpl-show-char
  6106.   @cindex showing edited characters
  6107.   @cindex displaying edited characters
  6108. ! @item
  6109. ! @code{bpl-show-char} (@kbd{C-c e} and @kbd{C-c C-c}), which sends to
  6110.   Ghostscript a PostScript translation of the character that point is in.
  6111.   
  6112. --- 187,197 ----
  6113.   currently displayed.
  6114.   
  6115. + @item
  6116.   @findex bpl-show-char
  6117.   @cindex showing edited characters
  6118.   @cindex displaying edited characters
  6119. ! @kindex C-c c
  6120. ! @kindex C-c C-C
  6121. ! @code{bpl-show-char} (@kbd{C-c c} and @kbd{C-c C-c}), which sends to
  6122.   Ghostscript a PostScript translation of the character that point is in.
  6123.   
  6124. diff -Nrc2 fontutils-0.5/doc/bzrto.texi fontutils-0.6/doc/bzrto.texi
  6125. *** fontutils-0.5/doc/bzrto.texi    Thu Sep  3 15:26:25 1992
  6126. --- fontutils-0.6/doc/bzrto.texi    Tue Oct 20 10:04:22 1992
  6127. ***************
  6128. *** 51,64 ****
  6129.   @cindex BZR files, converting to Metafont
  6130.   
  6131.   Metafont is a language for specifying graphic shapes, particularly
  6132.   characters in a font of a type, as well as the name of the program which
  6133.   interprets the language.  It is commonly used to generate fonts for
  6134. ! @TeX{}-related software (@TeX{} and Metafont were developed more-or-less
  6135. ! simultaneously by Donald Knuth during the years 1977--1985).
  6136. ! @xref{Archives}, for how to obtain the Metafont program.
  6137.   
  6138.   @opindex -metafont
  6139.   BZRto generates a Metafont font @file{@var{foo}.mf} from the input file
  6140. ! @file{@var{foo}.bzr} if you specify the @samp{-metafont} option, as in:
  6141.   
  6142.   @example
  6143. --- 51,66 ----
  6144.   @cindex BZR files, converting to Metafont
  6145.   
  6146. + @cindex Knuth, Donald E.
  6147.   Metafont is a language for specifying graphic shapes, particularly
  6148.   characters in a font of a type, as well as the name of the program which
  6149.   interprets the language.  It is commonly used to generate fonts for
  6150. ! @TeX{} and related software (@TeX{} and Metafont were developed
  6151. ! more-or-less simultaneously by Donald Knuth during the years
  6152. ! 1977--1985).  @xref{Archives}, for how to obtain the Metafont program.
  6153.   
  6154.   @opindex -metafont
  6155.   BZRto generates a Metafont font @file{@var{foo}.mf} from the input file
  6156. ! @file{@var{foo}10.bzr} (the @samp{10} being the design size of the
  6157. ! input) if you specify the @samp{-metafont} option, as in:
  6158.   
  6159.   @example
  6160. ***************
  6161. *** 83,89 ****
  6162.   The assignment to @code{mode} tells Metafont the name of your output
  6163.   device.  @code{localfont} should be a synonym for some real output
  6164. ! device, as defined when Metafont was installed; the GF file will be
  6165. ! named @file{@var{foo}.@var{dpi}gf}, where @var{dpi} is the resolution of
  6166. ! the @code{localfont} device.
  6167.   
  6168.   Given the TFM and GF file, you can now use the font in @TeX{}.
  6169. --- 85,91 ----
  6170.   The assignment to @code{mode} tells Metafont the name of your output
  6171.   device.  @code{localfont} should be a synonym for some real output
  6172. ! device, defined when Metafont was installed.  The GF file will be named
  6173. ! @file{@var{foo}.@var{dpi}gf}, where @var{dpi} is the resolution of the
  6174. ! @code{localfont} device.
  6175.   
  6176.   Given the TFM and GF file, you can now use the font in @TeX{}.
  6177. ***************
  6178. *** 91,95 ****
  6179.   @menu
  6180.   * Metafont output at any size::  Making larger or smaller fonts.
  6181. ! * Proofing with Metafont::     Metafont can help with debugging fonts.
  6182.   @end menu
  6183.   
  6184. --- 93,97 ----
  6185.   @menu
  6186.   * Metafont output at any size::  Making larger or smaller fonts.
  6187. ! * Proofing with Metafont::      Metafont can help with debugging fonts.
  6188.   @end menu
  6189.   
  6190. ***************
  6191. *** 131,135 ****
  6192.   By default, @code{mag} is 1.0.  You can also assign to both @code{mag}
  6193.   and @code{designsize}.  For example, if you set @code{designsize} to 5
  6194. ! and @code{mag} to 4, the output will be a font at a size of 20@dmn{pt}.
  6195.   
  6196.   @cindex nonlinear scaling
  6197. --- 133,137 ----
  6198.   By default, @code{mag} is 1.0.  You can also assign to both @code{mag}
  6199.   and @code{designsize}.  For example, if you set @code{designsize} to 5
  6200. ! and @code{mag} to 4, the output will be a 20@dmn{pt} font.
  6201.   
  6202.   @cindex nonlinear scaling
  6203. ***************
  6204. *** 157,163 ****
  6205.   enough to be able to make out small details.  This blowing-up process is
  6206.   called @dfn{proofing}.  Metafont works together with GFtoDVI, another
  6207. ! program created as part of the @TeX{} project, to make this fairly easy
  6208. ! to accomplish.
  6209.   
  6210.   You can make two kinds of proofs with Metafont: @dfn{gray proofs} and
  6211.   @dfn{smoke proofs}.  Metafont calls the former @code{proof} mode, and
  6212. --- 159,166 ----
  6213.   enough to be able to make out small details.  This blowing-up process is
  6214.   called @dfn{proofing}.  Metafont works together with GFtoDVI, another
  6215. ! program created as part of the @TeX{} project, to do this.
  6216.   
  6217. + @cindex gray proofs
  6218. + @cindex smoke proofs
  6219.   You can make two kinds of proofs with Metafont: @dfn{gray proofs} and
  6220.   @dfn{smoke proofs}.  Metafont calls the former @code{proof} mode, and
  6221. ***************
  6222. *** 170,173 ****
  6223. --- 173,177 ----
  6224.   @end example
  6225.   
  6226. + @findex nodisplays
  6227.   @noindent (See the preceding sections for general information on running
  6228.   Metafont.)  In @code{proof} or @code{smoke} mode, by default Metafont
  6229. ***************
  6230. *** 184,188 ****
  6231.   resolution is chosen so that the @code{designsize} of the font fills
  6232.   @code{proof_size} inches; by default, @code{proof_size} is 7, which
  6233. ! works well both for letter-size and A4 paper.
  6234.   
  6235.   @vindex proof_resolution
  6236. --- 188,192 ----
  6237.   resolution is chosen so that the @code{designsize} of the font fills
  6238.   @code{proof_size} inches; by default, @code{proof_size} is 7, which
  6239. ! works well enough for both letter-size and A4 paper.
  6240.   
  6241.   @vindex proof_resolution
  6242. ***************
  6243. *** 191,195 ****
  6244.   300 by default.
  6245.   
  6246. ! @flindex bzrsetup.mf
  6247.   You can change the values of @code{proof_size} and
  6248.   @code{proof_resolution} on the command line; the actual calculation is
  6249. --- 195,199 ----
  6250.   300 by default.
  6251.   
  6252. ! @flindex bzrsetup.mf@r{, computing proof values}
  6253.   You can change the values of @code{proof_size} and
  6254.   @code{proof_resolution} on the command line; the actual calculation is
  6255. ***************
  6256. *** 198,208 ****
  6257.   After running Metafont, you will have a GF file, e.g.,
  6258.   @file{@var{foo}.2602gf}.  You can then make a DVI file you can preview
  6259. ! or print with: @samp{gftodvi @var{foo}.2602gf}; this creates
  6260. ! @file{@var{foo}.dvi}.  In the DVI output from GFtoDVI, each character in
  6261. ! the font has its own page.  Some additional information is also present,
  6262. ! as follows:
  6263.   
  6264.   @cindex gray fonts
  6265. ! @cindex gray proofs
  6266.   In @code{proof} mode, the character shapes are printed in a ``gray''
  6267.   font, and the starting and ending points of each spline (or line) in the
  6268. --- 202,216 ----
  6269.   After running Metafont, you will have a GF file, e.g.,
  6270.   @file{@var{foo}.2602gf}.  You can then make a DVI file you can preview
  6271. ! or print with:
  6272. ! @example
  6273. ! gftodvi @var{foo}.2602gf
  6274. ! @end example
  6275. ! @noindent This creates @file{@var{foo}.dvi}.  In the DVI output from
  6276. ! GFtoDVI, each character in the font has its own page.  Some additional
  6277. ! information is also present, as follows:
  6278.   
  6279.   @cindex gray fonts
  6280. ! @cindex control points of splines, seeing
  6281. ! @cindex endpoints of splines, seeings
  6282.   In @code{proof} mode, the character shapes are printed in a ``gray''
  6283.   font, and the starting and ending points of each spline (or line) in the
  6284. ***************
  6285. *** 213,224 ****
  6286.   the right defining where it appears.
  6287.   
  6288. ! @cindex smoke proofs
  6289.   In @code{smoke} mode, the character shapes are printed in black; if you
  6290. ! put the output on a wall and stand back, you can get a decent idea of
  6291. ! how the font is coming along.  The character is also shown at its true
  6292. ! size off to the right (assuming you made the font at the true-size
  6293.   resolution, of course).
  6294.   
  6295.   @opindex -overflow-label-offset
  6296.   You may find that the extra information to the right of the character
  6297.   (``overflow equations'' in @code{proof} mode; the true-size character in
  6298. --- 221,235 ----
  6299.   the right defining where it appears.
  6300.   
  6301. ! @cindex Wall, The
  6302.   In @code{smoke} mode, the character shapes are printed in black; if you
  6303. ! put the output on the wall and stand back, you can get an idea of how
  6304. ! the font is coming along.  The character is also shown at its true size
  6305. ! off to the right (assuming you have made the font at the true-size
  6306.   resolution, of course).
  6307.   
  6308.   @opindex -overflow-label-offset
  6309. + @cindex losing proof information
  6310. + @cindex proof information, losing
  6311. + @cindex overflow equations, losing
  6312.   You may find that the extra information to the right of the character
  6313.   (``overflow equations'' in @code{proof} mode; the true-size character in
  6314. ***************
  6315. *** 239,244 ****
  6316.   @cindex BZR files, converting to Type 1
  6317.   
  6318. ! The Type 1 font format is the most common representation for PostScript
  6319. ! fonts, invented by Adobe Systems, Inc.  Adobe first published its
  6320.   specification in the book @cite{Adobe Type 1 Font Format} in 1990.  It
  6321.   defines a limited set of operations; general PostScript programs cannot
  6322. --- 250,255 ----
  6323.   @cindex BZR files, converting to Type 1
  6324.   
  6325. ! The Type 1 font format, invented by Adobe Systems, Inc., is the most
  6326. ! common representation for PostScript fonts.  Adobe first published its
  6327.   specification in the book @cite{Adobe Type 1 Font Format} in 1990.  It
  6328.   defines a limited set of operations; general PostScript programs cannot
  6329. ***************
  6330. *** 245,253 ****
  6331.   be represented as Type 1 fonts.  It also defines hints---ways of
  6332.   improving characters' appearances at low resolution and/or small small
  6333. ! sizes---which cannot be represented in PostScript itself.
  6334.   
  6335.   @opindex -pstype1
  6336.   BZRto generates a Type 1 font @file{@var{foo}.gsf} from the input file
  6337. ! @file{@var{foo}.bzr} if you specify the @samp{-pstype1} option, as in:
  6338.   
  6339.   @example
  6340. --- 256,265 ----
  6341.   be represented as Type 1 fonts.  It also defines hints---ways of
  6342.   improving characters' appearances at low resolution and/or small small
  6343. ! sizes---which cannot be represented in PostScript proper.
  6344.   
  6345.   @opindex -pstype1
  6346.   BZRto generates a Type 1 font @file{@var{foo}.gsf} from the input file
  6347. ! @file{@var{foo}10.bzr} (the @samp{10} being the design size of the
  6348. ! input) if you specify the @samp{-pstype1} option, as in:
  6349.   
  6350.   @example
  6351. ***************
  6352. *** 256,260 ****
  6353.   
  6354.   The file @file{@var{foo}.gsf} consists only of plain text (it's not
  6355. ! really ``human-readable'', since Type 1 format requires some encryption
  6356.   of the character outlines).
  6357.   
  6358. --- 268,272 ----
  6359.   
  6360.   The file @file{@var{foo}.gsf} consists only of plain text (it's not
  6361. ! really ``human-readable'', since Type 1 format requires encryption
  6362.   of the character outlines).
  6363.   
  6364. ***************
  6365. *** 262,267 ****
  6366.   @cindex Type 1 fonts, encryption of
  6367.   @cindex unencrypted Type 1 fonts
  6368. ! Although Type 1 format allows for encryption of the entire font, it does
  6369. ! not insist on it, and naturally BZRto does not do so.  Some deficient
  6370.   PostScript interpreters do not recognize unencrypted fonts; but
  6371.   Ghostscript, the GNU quasi-PostScript interpreter, has no trouble.  We
  6372. --- 274,279 ----
  6373.   @cindex Type 1 fonts, encryption of
  6374.   @cindex unencrypted Type 1 fonts
  6375. ! Although Type 1 format also allows for encryption of the entire font,
  6376. ! this is not required, and BZRto does not do it.  Some deficient
  6377.   PostScript interpreters do not recognize unencrypted fonts; but
  6378.   Ghostscript, the GNU quasi-PostScript interpreter, has no trouble.  We
  6379. ***************
  6380. *** 279,286 ****
  6381.   
  6382.   Type 3 PostScript fonts are not defined in a singular format, as are
  6383. ! Type 1 or Metafont fonts (see the previous sections).  Rather, they are
  6384. ! general PostScript programs which happen to meet the PostScript
  6385. ! language's (liberal) requirements for being a font.  They can therefore
  6386. ! be used with any PostScript interpreter.
  6387.   
  6388.   @opindex -pstype3
  6389. --- 291,298 ----
  6390.   
  6391.   Type 3 PostScript fonts are not defined in a singular format, as are
  6392. ! Type 1 fonts (see the previous section).  Rather, they are general
  6393. ! PostScript programs which happen to meet the PostScript language's
  6394. ! (liberal) requirements for being a font.  They can therefore be used
  6395. ! with any PostScript interpreter.
  6396.   
  6397.   @opindex -pstype3
  6398. ***************
  6399. *** 293,296 ****
  6400. --- 305,309 ----
  6401.   @end example
  6402.   
  6403. + @cindex PF3 abbreviation
  6404.   We do not know of any conventional extension for Type 3 fonts; we made
  6405.   up @file{pf3} to stand for ``PostScript font Type 3''.
  6406. ***************
  6407. *** 299,303 ****
  6408.   The most important part of a Type 3 font is the @code{BuildChar}
  6409.   routine, which does the actual rendering from the character program.
  6410. ! Unlike Type 1 fonts, each Type 3 font must supply its own
  6411.   @code{BuildChar} routine.
  6412.   
  6413. --- 312,317 ----
  6414.   The most important part of a Type 3 font is the @code{BuildChar}
  6415.   routine, which does the actual rendering from the character program.
  6416. ! Unlike Type 1 fonts, whose @code{BuildChar} routine is built into the
  6417. ! PostScript interpreter, each Type 3 font supplies its own
  6418.   @code{BuildChar} routine.
  6419.   
  6420. ***************
  6421. *** 308,316 ****
  6422.   directory).  They use the PostScript @code{run} command to read that
  6423.   file; so if you want to download one to a printer (which naturally will
  6424. ! not have access to that file), you must replace the @code{run} command
  6425. ! with the contents of the file.  For PostScript interpreters which run on
  6426. ! a host computer, such as Ghostscript, you have to install
  6427. ! @file{bzrbuildch.PS} in a directory where it will be found, but you need
  6428. ! not modify the fonts.
  6429.   
  6430.   
  6431. --- 322,330 ----
  6432.   directory).  They use the PostScript @code{run} command to read that
  6433.   file; so if you want to download one to a printer (which naturally will
  6434. ! not have access to the file on your computer), you must replace the
  6435. ! @code{run} command with the contents of the file.  For PostScript
  6436. ! interpreters which run on a host computer, such as Ghostscript, you have
  6437. ! to install @file{bzrbuildch.PS} in a directory where it will be found,
  6438. ! but you need not modify the fonts.
  6439.   
  6440.   
  6441. ***************
  6442. *** 416,419 ****
  6443. --- 430,434 ----
  6444.   
  6445.   @item bbheight ( @var{name} )
  6446. + @vindex bbheight @r{CCC dimension}
  6447.   The height exclusive of blank space above or below the shape of the
  6448.   character @var{name} if it exists.
  6449. ***************
  6450. *** 420,428 ****
  6451.   
  6452.   @item bbwidth ( @var{name} )
  6453.   The width exclusive of side bearings of the character @var{name} if it
  6454.   exists.
  6455.   
  6456. - @vindex capheight @r{CCC dimension}
  6457.   @item capheight 
  6458.   The height of the capital letters, e.g., @samp{H}.  See @samp{xheight}
  6459.   for how this is determined.
  6460. --- 435,444 ----
  6461.   
  6462.   @item bbwidth ( @var{name} )
  6463. + @vindex bbwidth @r{CCC dimension}
  6464.   The width exclusive of side bearings of the character @var{name} if it
  6465.   exists.
  6466.   
  6467.   @item capheight 
  6468. + @vindex capheight @r{CCC dimension}
  6469.   The height of the capital letters, e.g., @samp{H}.  See @samp{xheight}
  6470.   for how this is determined.
  6471. ***************
  6472. *** 429,442 ****
  6473.   
  6474.   @item depth ( @var{name} )
  6475. ! The TFM depth of the character @var{name}.
  6476.              
  6477.   @item designsize 
  6478. ! The design size of the main input font, as stored in the TFM file.
  6479.   
  6480.   @item em
  6481.   The quad width of the font.  This value is determined analogously to
  6482. ! @samp{xheight}, above.
  6483.              
  6484.   @item fontdepth 
  6485.   The maximum depth any character in the font descends below the baseline.
  6486.   Again, this is determined analogously to @samp{xheight}.
  6487. --- 445,462 ----
  6488.   
  6489.   @item depth ( @var{name} )
  6490. ! @vindex depth @r{CCC dimension}
  6491. ! The depth of the character @var{name}.
  6492.              
  6493.   @item designsize 
  6494. ! @vindex designsize @r{CCC dimension}
  6495. ! The design size of the main input BZR font.
  6496.   
  6497.   @item em
  6498. + @vindex em @r{CCC dimension}
  6499.   The quad width of the font.  This value is determined analogously to
  6500. ! @samp{xheight}, below.
  6501.              
  6502.   @item fontdepth 
  6503. + @vindex fontdepth @r{CCC dimension}
  6504.   The maximum depth any character in the font descends below the baseline.
  6505.   Again, this is determined analogously to @samp{xheight}.
  6506. ***************
  6507. *** 443,450 ****
  6508.   
  6509.   @item height ( @var{name} ) 
  6510. ! The TFM height of the character @var{name}.
  6511.   
  6512. - @vindex pt @r{CCC dimension}
  6513.   @item pt 
  6514.   Printer's points; 72.27@dmn{pt} = 1@dmn{in}.  Since dimensions specified
  6515.   in points are absolute distances, they do not scale when the font size
  6516. --- 463,471 ----
  6517.   
  6518.   @item height ( @var{name} ) 
  6519. ! @vindex height @r{CCC dimension}
  6520. ! The height of the character @var{name}.
  6521.   
  6522.   @item pt 
  6523. + @vindex pt @r{CCC dimension}
  6524.   Printer's points; 72.27@dmn{pt} = 1@dmn{in}.  Since dimensions specified
  6525.   in points are absolute distances, they do not scale when the font size
  6526. ***************
  6527. *** 452,463 ****
  6528.   
  6529.   @item width ( @var{name} ) 
  6530. ! The TFM width of the character @var{name}.
  6531.   
  6532. - @vindex xheight @r{CCC dimension}
  6533.   @item xheight 
  6534. ! The x-height of the main input font.  If the TFM file defines this, its
  6535. ! value is used; otherwise, the height of a suitable character (e.g.,
  6536. ! @samp{x}) is used if one exists; otherwise, it's zero.  BZRto treats the
  6537. ! other font-related units of measure in the same way.
  6538.   
  6539.   @end table
  6540. --- 473,486 ----
  6541.   
  6542.   @item width ( @var{name} ) 
  6543. ! @vindex width @r{CCC dimension}
  6544. ! The set width of the character @var{name}.
  6545.   
  6546.   @item xheight 
  6547. ! @vindex xheight @r{CCC dimension}
  6548. ! The x-height of the main input font.  If a TFM file corresponding to the
  6549. ! main BZR file exists and defines this, that value is used; otherwise, the
  6550. ! height of a suitable character (e.g., @samp{x}) is used if one exists;
  6551. ! otherwise, it's zero.  BZRto treats the other font-related units of
  6552. ! measure in the same way.
  6553.   
  6554.   @end table
  6555. ***************
  6556. *** 481,484 ****
  6557. --- 504,508 ----
  6558.   @table @samp
  6559.   
  6560. + @item -concat @var{bzr-name1}, @var{bzr-name2}, @dots{}
  6561.   @opindex -concat
  6562.   @cindex concatenating outline fonts
  6563. ***************
  6564. *** 486,498 ****
  6565.   @cindex outline fonts, concatenating
  6566.   @cindex font concatenation
  6567. - @item -concat @var{bzr-name1}, @var{bzr-name2}, @dots{}
  6568.   Concatenate the main input file with the given @var{bzr-name}s; if a
  6569.   character code exists in more than one of the BZR files, it's the first
  6570. ! occurrence that counts.  You must have a TFM file for each
  6571. ! @var{bzr-name}.  The BZR files can have any design size; the output is
  6572. ! normalized to the size of the main input file.
  6573.   
  6574. - @opindex -ccc-file
  6575.   @item -ccc-file @var{filename}
  6576.   Read the CCC file @var{filename} (if @var{filename} has a suffix) or
  6577.   @file{@var{filename}.ccc} (if it doesn't).  Default is to use
  6578. --- 510,520 ----
  6579.   @cindex outline fonts, concatenating
  6580.   @cindex font concatenation
  6581.   Concatenate the main input file with the given @var{bzr-name}s; if a
  6582.   character code exists in more than one of the BZR files, it's the first
  6583. ! occurrence that counts.  The BZR files can have any design size; the
  6584. ! output is normalized to the size of the main input file.
  6585.   
  6586.   @item -ccc-file @var{filename}
  6587. + @opindex -ccc-file
  6588.   Read the CCC file @var{filename} (if @var{filename} has a suffix) or
  6589.   @file{@var{filename}.ccc} (if it doesn't).  Default is to use
  6590. ***************
  6591. *** 500,506 ****
  6592.   the file @file{@var{font-name}.ccc}, it does not complain.
  6593.   
  6594.   @opindex -encoding
  6595.   @cindex encoding of input fonts
  6596. - @item -encoding @var{filename}
  6597.   Specify the encoding file for the input font, so character names in the
  6598.   CCC files can be matched to character codes.  If @var{filename} has no
  6599. --- 522,528 ----
  6600.   the file @file{@var{font-name}.ccc}, it does not complain.
  6601.   
  6602. + @item -encoding @var{filename}
  6603.   @opindex -encoding
  6604.   @cindex encoding of input fonts
  6605.   Specify the encoding file for the input font, so character names in the
  6606.   CCC files can be matched to character codes.  If @var{filename} has no
  6607. ***************
  6608. *** 507,539 ****
  6609.   suffix, use @file{@var{filename}.enc}, otherwise just @var{filename}.
  6610.   The default is to guess the encoding from the @samp{codingscheme} string
  6611. ! in the TFM file.
  6612.   
  6613. - @opindex -fontname
  6614. - @item -fontname @var{string}
  6615. - the full name of the output font, e.g.,
  6616. - `Times-BoldItalic'; default is the @var{font-name}.
  6617. - @opindex -help
  6618.   @item -help
  6619.   Print a usage message.  @xref{Common options}.
  6620.   
  6621. - @opindex -metafont
  6622.   @item -metafont
  6623.   Translate the input to a Metafont program; write to
  6624.   @file{@var{font-name}.mf}.  @xref{Metafont and BZRto}.
  6625.   
  6626. - @opindex -mf
  6627.   @item -mf
  6628. ! Synonym for @samp{-mf}.
  6629.   
  6630.   @opindex -oblique-angle
  6631.   @cindex slanted fonts, making
  6632.   @cindex oblique fonts, making
  6633. - @item -oblique-angle @var{angle-in-degrees}
  6634.   Angle in degrees from the vertical by which to slant the shapes; default
  6635.   is zero.
  6636.   
  6637. - @opindex -output-file
  6638.   @item -output-file @var{filename}
  6639.   Output to @var{filename} (if it has a suffix) or to
  6640.   @file{@var{filename}.@var{font-format}} (if it doesn't), where
  6641. --- 529,556 ----
  6642.   suffix, use @file{@var{filename}.enc}, otherwise just @var{filename}.
  6643.   The default is to guess the encoding from the @samp{codingscheme} string
  6644. ! in a TFM file corresponding to the main input file, if such exists.
  6645.   
  6646.   @item -help
  6647. + @opindex -help
  6648.   Print a usage message.  @xref{Common options}.
  6649.   
  6650.   @item -metafont
  6651. + @opindex -metafont
  6652.   Translate the input to a Metafont program; write to
  6653.   @file{@var{font-name}.mf}.  @xref{Metafont and BZRto}.
  6654.   
  6655.   @item -mf
  6656. ! @opindex -mf
  6657. ! Synonym for @samp{-metafont}.
  6658.   
  6659. + @item -oblique-angle @var{angle-in-degrees}
  6660.   @opindex -oblique-angle
  6661.   @cindex slanted fonts, making
  6662.   @cindex oblique fonts, making
  6663.   Angle in degrees from the vertical by which to slant the shapes; default
  6664.   is zero.
  6665.   
  6666.   @item -output-file @var{filename}
  6667. + @opindex -output-file
  6668.   Output to @var{filename} (if it has a suffix) or to
  6669.   @file{@var{filename}.@var{font-format}} (if it doesn't), where
  6670. ***************
  6671. *** 544,573 ****
  6672.   input filename of @file{cmr10} becomes @file{cmr}.
  6673.   
  6674. ! @opindex -pstype1
  6675.   @item -pstype1
  6676.   Translate the input to (unencrypted) PostScript Type 1 font format;
  6677.   write to @file{@var{font-name}.gsf}.  @xref{Type 1 and BZRto}.
  6678.   
  6679. - @opindex -pstype3
  6680.   @item -pstype3
  6681.   Translate the input to PostScript Type 3 font format; write to
  6682.   @file{@var{font-name}.pf3}.  @xref{Type 3 and BZRto}.
  6683.   
  6684. - @opindex -range
  6685.   @item -range @var{char1}-@var{char2}
  6686.   Only process characters between the character codes @var{char1} and
  6687.   @var{char2}, inclusive.
  6688.   
  6689. - @opindex -text
  6690.   @item -text
  6691.   Translate the font to a BPL file, i.e., human-readable text; write to
  6692.   standard output.  @xref{BPL files}.
  6693.   
  6694. - @opindex -verbose
  6695.   @item -verbose
  6696. ! Output progress reports.
  6697.   
  6698. - @opindex -version
  6699.   @item -version
  6700.   Print the version number.
  6701.   
  6702. --- 561,661 ----
  6703.   input filename of @file{cmr10} becomes @file{cmr}.
  6704.   
  6705. ! @item -ps-font-info @var{name1}:@var{value1},@dots{}
  6706. ! @opindex -ps-font-info
  6707. ! @vindex FontInfo
  6708. ! Assign each @var{value} to the corresponding @var{name} when outputting
  6709. ! a PostScript font (either Type 1 or Type 3).  Case is significant in
  6710. ! both the @var{name}s and @var{value}s.  You can specify the following:
  6711. ! @table @samp
  6712. ! @item FontName:@var{string}
  6713. ! @vindex FontName @r{in PostScript fonts}
  6714. ! @vindex unknown @r{font name}
  6715. ! The full PostScript name of the font; e.g., @code{Times-BoldItalic}.
  6716. ! The default is @code{unknown}.
  6717. ! @item FamilyName:@var{string}
  6718. ! @vindex FamilyName @r{in PostScript fonts}
  6719. ! The name of the typeface family to which this font belongs; e.g.,
  6720. ! @code{Times}.  The default is to use @code{FontName} up to the first
  6721. ! @samp{-}.
  6722. ! @item Weight:@var{string}
  6723. ! @vindex Weight @r{in PostScript fonts}
  6724. ! The typographic weight of the font, e.g., @code{Bold}.  If
  6725. ! @code{FontName} contains one of the strings @samp{Black}, @samp{Book},
  6726. ! @samp{Bold}, @samp{Demi}, @samp{ExtraBold}, @samp{Light}, @samp{Heavy},
  6727. ! @samp{Regular}, @samp{Semibold}, or @samp{Ultra}, that is the
  6728. ! weight.  Otherwise, BZRto uses @samp{Medium}.
  6729. ! @item ItalicAngle:@var{real}
  6730. ! @vindex ItalicAngle @r{in PostScript fonts}
  6731. ! The angle in degrees by which the font slopes to the right from the
  6732. ! vertical.  Default is zero.  Typical slanted or italic fonts have values
  6733. ! between 10--20.
  6734. ! @item isFixedPitch:@code{true} @r{or} @code{false}
  6735. ! @vindex isFixedPitch @r{in PostScript fonts}
  6736. ! @cindex monospaced PostScript fonts
  6737. ! Whether or not this font is monospaced.  If a TFM file corresponding to
  6738. ! the main BZR file exists, and specifies a zero interword stretch and
  6739. ! shrink, and a nonzero interword space, the default is @code{true}.
  6740. ! Otherwise, it's @code{false}.
  6741. ! @item UnderlinePosition:@var{real}
  6742. ! @vindex UnderlinePosition @r{in PostScript fonts}
  6743. ! Distance from the baseline for positioning underlines, in units of the
  6744. ! character coordinate system.  Default is @math{-100}.
  6745. ! @item UnderlineThickness:@var{real}
  6746. ! @vindex UnderlineThickness @r{in PostScript fonts}
  6747. ! Thickness of underlines.  Default is 50.
  6748. ! @item UniqueID:@var{non-negative integer}
  6749. ! @vindex UniqueID @r{in PostScript fonts}
  6750. ! An integer in the range 0 to 16777215 (2^24 - 1) uniquely identifying
  6751. ! this font.  The default is zero, meaning (for our purposes) not to
  6752. ! output any @code{UniqueID}.  This avoids unlikely-but-possible conflicts
  6753. ! with existing fonts.
  6754. ! @item version:@var{string}
  6755. ! @vindex version @r{in PostScript fonts}
  6756. ! Identification for the particular version of this font.  If a TFM file
  6757. ! corresponding to the main BZR file exists, and specifies a version
  6758. ! number, that is the default; otherwise, there is none.
  6759. ! @end table
  6760. ! @noindent All values except @code{FontName} and @code{UniqueID} go in
  6761. ! the @code{FontInfo} dictionary.
  6762.   @item -pstype1
  6763. + @opindex -pstype1
  6764.   Translate the input to (unencrypted) PostScript Type 1 font format;
  6765.   write to @file{@var{font-name}.gsf}.  @xref{Type 1 and BZRto}.
  6766.   
  6767.   @item -pstype3
  6768. + @opindex -pstype3
  6769.   Translate the input to PostScript Type 3 font format; write to
  6770.   @file{@var{font-name}.pf3}.  @xref{Type 3 and BZRto}.
  6771.   
  6772.   @item -range @var{char1}-@var{char2}
  6773. + @opindex -range
  6774.   Only process characters between the character codes @var{char1} and
  6775.   @var{char2}, inclusive.
  6776.   
  6777.   @item -text
  6778. + @opindex -text
  6779.   Translate the font to a BPL file, i.e., human-readable text; write to
  6780.   standard output.  @xref{BPL files}.
  6781.   
  6782.   @item -verbose
  6783. ! @opindex -verbose
  6784. ! Output progress reports to standard output, unless @samp{-text} is
  6785. ! specified, in which case output to standard error.
  6786.   
  6787.   @item -version
  6788. + @opindex -version
  6789.   Print the version number.
  6790.   
  6791. diff -Nrc2 fontutils-0.5/doc/charspace.texi fontutils-0.6/doc/charspace.texi
  6792. *** fontutils-0.5/doc/charspace.texi    Wed Sep  2 17:17:16 1992
  6793. --- fontutils-0.6/doc/charspace.texi    Tue Oct 20 10:04:22 1992
  6794. ***************
  6795. *** 300,304 ****
  6796.   @cindex numeral widths
  6797.   @vindex numeral-width @r{variable in @file{common.cmi}}
  6798. ! @flindex common.cmi, @r{numerals in}
  6799.   For example, in most fonts, the numerals all have the same width, to
  6800.   ease typesetting of columns of them in tables.  Thus, @file{common.cmi}
  6801. --- 300,304 ----
  6802.   @cindex numeral widths
  6803.   @vindex numeral-width @r{variable in @file{common.cmi}}
  6804. ! @flindex common.cmi@r{, numerals in}
  6805.   For example, in most fonts, the numerals all have the same width, to
  6806.   ease typesetting of columns of them in tables.  Thus, @file{common.cmi}
  6807. ***************
  6808. *** 519,529 ****
  6809.   varies according to the type design: a narrow, spiky typeface will
  6810.   have a small interword space relative to a wide, regular one.
  6811.   
  6812.   @vindex stretch @r{fontdimen}
  6813.   @item stretch @r{(3)}
  6814. ! The @code{stretch} parameter defines the interword stretch of the
  6815. ! font.  This is typically about one-half of the @code{space} parameter.
  6816. ! @TeX{} is reluctant to increase interword spacing beyond the width
  6817. ! @math{@code{space} + @code{stretch}}.
  6818.   
  6819.   @vindex shrink @r{fontdimen}
  6820. --- 519,531 ----
  6821.   varies according to the type design: a narrow, spiky typeface will
  6822.   have a small interword space relative to a wide, regular one.
  6823. + Exception: in math fonts, the interword space is zero.
  6824.   
  6825.   @vindex stretch @r{fontdimen}
  6826.   @item stretch @r{(3)}
  6827. ! The @code{stretch} parameter defines the interword stretch of the font.
  6828. ! This is typically about one-half of the @code{space} parameter.  @TeX{}
  6829. ! is reluctant to increase interword spacing beyond the width
  6830. ! @math{@code{space} + @code{stretch}}.  In monospaced fonts, the stretch
  6831. ! is typically zero.
  6832.   
  6833.   @vindex shrink @r{fontdimen}
  6834. ***************
  6835. *** 532,536 ****
  6836.   This is typically about one-third of the @code{space} parameter.  @TeX{}
  6837.   does not decrease interword spacing beyond the width @math{@code{space}
  6838. ! - @code{shrink}}.
  6839.   
  6840.   @vindex xheight @r{fontdimen}
  6841. --- 534,538 ----
  6842.   This is typically about one-third of the @code{space} parameter.  @TeX{}
  6843.   does not decrease interword spacing beyond the width @math{@code{space}
  6844. ! - @code{shrink}}.  In monospaced fonts, the shrink is typically zero.
  6845.   
  6846.   @vindex xheight @r{fontdimen}
  6847. ***************
  6848. *** 551,555 ****
  6849.   @item quad @r{(6)}
  6850.   The @code{quad} fontdimen defines the value of the @code{em} dimension
  6851. ! in @TeX{}.  This is often the same as the design size of the font, but,
  6852.   as usual, that's not an absolute requirement.
  6853.   
  6854. --- 553,557 ----
  6855.   @item quad @r{(6)}
  6856.   The @code{quad} fontdimen defines the value of the @code{em} dimension
  6857. ! in @TeX{}.  This is often the same as the design size of the font, but
  6858.   as usual, that's not an absolute requirement.
  6859.   
  6860. diff -Nrc2 fontutils-0.5/doc/enhance.texi fontutils-0.6/doc/enhance.texi
  6861. *** fontutils-0.5/doc/enhance.texi    Thu Sep  3 14:18:21 1992
  6862. --- fontutils-0.6/doc/enhance.texi    Mon Oct 19 17:30:21 1992
  6863. ***************
  6864. *** 142,150 ****
  6865.   unclear how far back the law extends, but Times Roman, designed in the
  6866.   late 1920's and 1930's by Stanley Morison and cut by Victor Lardent for
  6867. ! the Monotype Corporation is probably covered.  (Except that Monotype has
  6868. ! gone out of business---but probably its creditors would still pursue
  6869. ! it.)  This does not mean GNU cannot have a Times Roman; it just means we
  6870. ! cannot start with an English version.  (The law does not forbid
  6871. ! importing copies of English typefaces.)
  6872.   
  6873.   @cindex France, font design protection law
  6874. --- 142,148 ----
  6875.   unclear how far back the law extends, but Times Roman, designed in the
  6876.   late 1920's and 1930's by Stanley Morison and cut by Victor Lardent for
  6877. ! Monotype is probably covered.  This does not mean GNU cannot have a
  6878. ! Times Roman; it just means we cannot start with an English version, as
  6879. ! the law does not forbid importing foreign versions of English typefaces.
  6880.   
  6881.   @cindex France, font design protection law
  6882. ***************
  6883. *** 154,159 ****
  6884.   The Romain du Roi typeface designed by Philippe Grandjean in 1702 for
  6885.   the French royal family is protected, and perhaps other such ``royal''
  6886. ! designs.   Since GNU would not want these anyway, it is not
  6887. ! affected.
  6888.   
  6889.   @end table
  6890. --- 152,157 ----
  6891.   The Romain du Roi typeface designed by Philippe Grandjean in 1702 for
  6892.   the French royal family is protected, and perhaps other such ``royal''
  6893. ! designs.  Since these are not widely used anyway, it's not important
  6894. ! that GNU provide them.
  6895.   
  6896.   @end table
  6897. ***************
  6898. *** 188,205 ****
  6899.   @item BZRto
  6900.   @itemize @bullet
  6901. - @cindex TrueType
  6902.   @item
  6903.   Output more font formats, e.g., TrueType.
  6904.   @item
  6905.   Output hints for Metafont and Type 1 fonts.
  6906. - @vindex FontInfo
  6907.   @item
  6908.   Make better guesses for the @code{FontInfo} information.
  6909. - @cindex obliquing
  6910.   @item
  6911.   Handle obliquing fonts by changing the transform matrix in the output,
  6912.   instead of changing the numbers in the splines.
  6913.   @item
  6914.   Do nonlinear scaling.
  6915.   @end itemize
  6916.   
  6917. --- 186,211 ----
  6918.   @item BZRto
  6919.   @itemize @bullet
  6920.   @item
  6921. + @cindex TrueType
  6922.   Output more font formats, e.g., TrueType.
  6923.   @item
  6924.   Output hints for Metafont and Type 1 fonts.
  6925.   @item
  6926. + @vindex FontInfo
  6927.   Make better guesses for the @code{FontInfo} information.
  6928.   @item
  6929. + @cindex obliquing
  6930.   Handle obliquing fonts by changing the transform matrix in the output,
  6931.   instead of changing the numbers in the splines.
  6932.   @item
  6933. + @cindex nonlinear scaling
  6934. + @cindex scaling, nonlinear
  6935. + @cindex anamorphic scaling
  6936. + @cindex optical scaling
  6937.   Do nonlinear scaling.
  6938. + @item
  6939. + @cindex italic corrections
  6940. + Handle italic corrections in the Metafont output somehow.  Probably have
  6941. + to do the same in Charspace.
  6942.   @end itemize
  6943.   
  6944. ***************
  6945. *** 206,214 ****
  6946.   @item Fontconvert
  6947.   @itemize @bullet
  6948. - @cindex virtual fonts
  6949.   @item
  6950.   Output virtual fonts as an option, instead of another bitmap font.
  6951. - @cindex encodings, translating between
  6952.   @item
  6953.   Allow specifying entire input encodings and output encodings (the
  6954.   same @file{.enc} files that the other programs read).
  6955. --- 212,220 ----
  6956.   @item Fontconvert
  6957.   @itemize @bullet
  6958.   @item
  6959. + @cindex virtual fonts
  6960.   Output virtual fonts as an option, instead of another bitmap font.
  6961.   @item
  6962. + @cindex encodings, translating between
  6963.   Allow specifying entire input encodings and output encodings (the
  6964.   same @file{.enc} files that the other programs read).
  6965. ***************
  6966. *** 226,237 ****
  6967.   @item GSrenderfont
  6968.   @itemize @bullet
  6969.   @cindex size of characters, maximum
  6970.   @cindex limit on character size
  6971. - @item
  6972.   Allow for characters larger than 1 inch square in the original font.
  6973.   @cindex slanted fonts
  6974.   @cindex extended fonts
  6975.   @cindex small caps
  6976. - @item
  6977.   Implement slanting, extending, and small caps, a la Dvips.
  6978.   @end itemize
  6979. --- 232,243 ----
  6980.   @item GSrenderfont
  6981.   @itemize @bullet
  6982. + @item
  6983.   @cindex size of characters, maximum
  6984.   @cindex limit on character size
  6985.   Allow for characters larger than 1 inch square in the original font.
  6986. + @item
  6987.   @cindex slanted fonts
  6988.   @cindex extended fonts
  6989.   @cindex small caps
  6990.   Implement slanting, extending, and small caps, a la Dvips.
  6991.   @end itemize
  6992. ***************
  6993. *** 239,248 ****
  6994.   @item Imageto
  6995.   @itemize @bullet
  6996. - @cindex Tiff
  6997.   @item
  6998.   Recognize more image formats, e.g., Tiff.
  6999.   @cindex splitting characters
  7000.   @cindex characters, splitting
  7001. - @item
  7002.   Perhaps the @samp{-column-split} option in Fontconvert should be
  7003.   removed, and the equivalent information specified in the IFI file.
  7004. --- 245,254 ----
  7005.   @item Imageto
  7006.   @itemize @bullet
  7007.   @item
  7008. + @cindex Tiff
  7009.   Recognize more image formats, e.g., Tiff.
  7010. + @item
  7011.   @cindex splitting characters
  7012.   @cindex characters, splitting
  7013.   Perhaps the @samp{-column-split} option in Fontconvert should be
  7014.   removed, and the equivalent information specified in the IFI file.
  7015. ***************
  7016. *** 254,261 ****
  7017.   Perhaps combine with Imageto.
  7018.   @item
  7019.   Implement a good rotation algorithm, perhaps as described in: ``A Fast
  7020.   Algorithm for General Raster Rotation'', by Alan Paeth, @cite{Graphics
  7021. ! Interface '86}, pages 77--81.  We'd be interested in hearing of
  7022. ! alternatives, especially for the case of 90 degree rotation only.
  7023.   @end itemize
  7024.   
  7025. --- 260,271 ----
  7026.   Perhaps combine with Imageto.
  7027.   @item
  7028. + @pindex pnmrotate
  7029. + @cindex rotation algorithm
  7030.   Implement a good rotation algorithm, perhaps as described in: ``A Fast
  7031.   Algorithm for General Raster Rotation'', by Alan Paeth, @cite{Graphics
  7032. ! Interface '86}, pages 77--81.  (We'd be interested in hearing of
  7033. ! optimized alternatives for the case of 90 degree rotation only).  The
  7034. ! program @code{pnmrotate}, which mentions that article, in the PBMplus
  7035. ! distribution could perhaps be adapted.
  7036.   @end itemize
  7037.   
  7038. ***************
  7039. *** 265,275 ****
  7040.   Extend the encoding files to allow defining math attributes, probably by
  7041.   rewriting the parsing routines as a Bison grammar.
  7042.   @findex string_to_bitmap
  7043.   @flindex font.c
  7044. ! @item
  7045.   Write a variant of @code{string_to_bitmap} (in @file{font.c}) which
  7046.   understands kerns and ligatures.
  7047. - @cindex BDF format
  7048.   @item
  7049.   Add support for BDF or other bitmap formats.  Unrelated utility programs
  7050.   now exist for handling the X11 BDF format (specifically, Bdf2gf and
  7051. --- 275,288 ----
  7052.   Extend the encoding files to allow defining math attributes, probably by
  7053.   rewriting the parsing routines as a Bison grammar.
  7054. + @item
  7055.   @findex string_to_bitmap
  7056.   @flindex font.c
  7057. ! @cindex typesetting kerns and ligatures
  7058. ! @cindex kerns, typesetting
  7059. ! @cindex ligatures, typesetting
  7060.   Write a variant of @code{string_to_bitmap} (in @file{font.c}) which
  7061.   understands kerns and ligatures.
  7062.   @item
  7063. + @cindex BDF format
  7064.   Add support for BDF or other bitmap formats.  Unrelated utility programs
  7065.   now exist for handling the X11 BDF format (specifically, Bdf2gf and
  7066. ***************
  7067. *** 423,428 ****
  7068.   options}, for more information on option parsing.
  7069.   
  7070. ! @pindex configure
  7071. ! @flindex include/c-auto.h, @r{creation of}
  7072.   The @file{configure} script used to determine system dependencies is
  7073.   generated by GNU Autoconf from @file{configure.in}.  When
  7074. --- 436,441 ----
  7075.   options}, for more information on option parsing.
  7076.   
  7077. ! @pindex configure@r{, creation of}
  7078. ! @flindex include/c-auto.h@r{, creation of}
  7079.   The @file{configure} script used to determine system dependencies is
  7080.   generated by GNU Autoconf from @file{configure.in}.  When
  7081. diff -Nrc2 fontutils-0.5/doc/fontcvt.texi fontutils-0.6/doc/fontcvt.texi
  7082. *** fontutils-0.5/doc/fontcvt.texi    Wed Sep  2 17:17:16 1992
  7083. --- fontutils-0.6/doc/fontcvt.texi    Fri Oct 23 15:23:07 1992
  7084. ***************
  7085. *** 149,162 ****
  7086.   fonts.
  7087.   
  7088. - @opindex -space
  7089. - @cindex space character, adding
  7090. - @item -space [@var{charspec}]
  7091. - If Fontconvert is writing a GF file, output at position @var{charspec}
  7092. - an entirely blank character, with the width of the interword space in
  7093. - the TFM file for the main input font.  If you specify just
  7094. - @samp{-space}, without @var{charspec}, the default is 32.  If
  7095. - Fontconvert cannot find a TFM file for the main input font, it complains
  7096. - and does not output the character.
  7097.   @opindex -column-split
  7098.   @cindex splitting characters
  7099. --- 149,152 ----
  7100. ***************
  7101. *** 383,389 ****
  7102.   Print a usage message.  @xref{Common options}.
  7103.   
  7104.   @opindex -output-file
  7105.   @cindex output file, naming
  7106. - @item -output-file @var{filename}
  7107.   If @var{filename} has a suffix and if only one output file is to be
  7108.   written, write to @var{filename}.  If @var{filename} has a suffix and
  7109. --- 373,379 ----
  7110.   Print a usage message.  @xref{Common options}.
  7111.   
  7112. + @item -output-file @var{filename}
  7113.   @opindex -output-file
  7114.   @cindex output file, naming
  7115.   If @var{filename} has a suffix and if only one output file is to be
  7116.   written, write to @var{filename}.  If @var{filename} has a suffix and
  7117. ***************
  7118. *** 398,407 ****
  7119.   By default, use the name of the main input font for @var{filename}.
  7120.   
  7121. - @opindex -verbose
  7122.   @item -verbose
  7123.   Output progress reports.
  7124.   
  7125. - @opindex -version
  7126.   @item -version
  7127.   Print the version number.
  7128.   
  7129. --- 388,397 ----
  7130.   By default, use the name of the main input font for @var{filename}.
  7131.   
  7132.   @item -verbose
  7133. + @opindex -verbose
  7134.   Output progress reports.
  7135.   
  7136.   @item -version
  7137. + @opindex -version
  7138.   Print the version number.
  7139.   
  7140. diff -Nrc2 fontutils-0.5/doc/fontu.texi fontutils-0.6/doc/fontu.texi
  7141. *** fontutils-0.5/doc/fontu.texi    Thu Sep  3 15:26:25 1992
  7142. --- fontutils-0.6/doc/fontu.texi    Tue Oct 27 13:27:08 1992
  7143. ***************
  7144. *** 18,21 ****
  7145. --- 18,22 ----
  7146.   @syncodeindex fl cp
  7147.   @syncodeindex fn cp
  7148. + @syncodeindex ky cp
  7149.   @syncodeindex op cp
  7150.   @syncodeindex pg cp
  7151. ***************
  7152. *** 52,57 ****
  7153.   into another language, under the above conditions for modified versions,
  7154.   except that the sections entitled ``Freedom'' and ``GNU General Public
  7155. ! License'' may be included in a translation approved by the author
  7156. ! instead of in the original English.
  7157.   @end ifinfo
  7158.   
  7159. --- 53,58 ----
  7160.   into another language, under the above conditions for modified versions,
  7161.   except that the sections entitled ``Freedom'' and ``GNU General Public
  7162. ! License'' may be included in a translation approved by the Free Software
  7163. ! Foundation instead of in the original English.
  7164.   @end ifinfo
  7165.   
  7166. ***************
  7167. *** 60,68 ****
  7168.   
  7169.   @title Font utilities
  7170. ! @subtitle for version 0.5
  7171. ! @subtitle September 1992
  7172.   @author Karl Berry
  7173.   @author with Kathryn A. Hargreaves
  7174.   @page
  7175.   @vskip 0pt plus 1filll
  7176.   Copyright @copyright{} 1992 Free Software Foundation.
  7177. --- 61,71 ----
  7178.   
  7179.   @title Font utilities
  7180. ! @subtitle for version 0.6
  7181. ! @subtitle October 1992
  7182.   @author Karl Berry
  7183.   @author with Kathryn A. Hargreaves
  7184.   @page
  7185.   @vskip 0pt plus 1filll
  7186.   Copyright @copyright{} 1992 Free Software Foundation.
  7187. ***************
  7188. *** 83,87 ****
  7189.   except that the sections entitled ``Regain your programming freedom''
  7190.   and ``GNU General Public License'' may be included in a translation
  7191. ! approved by the author instead of in the original English.
  7192.   
  7193.   @end titlepage
  7194. --- 86,90 ----
  7195.   except that the sections entitled ``Regain your programming freedom''
  7196.   and ``GNU General Public License'' may be included in a translation
  7197. ! approved by the Free Software Foundation instead of in the original English.
  7198.   
  7199.   @end titlepage
  7200. ***************
  7201. *** 90,97 ****
  7202.   @ifinfo
  7203.   @node Top, Introduction, (dir), (dir)
  7204.   
  7205.   This manual documents how to install and run the GNU font utilities.  It
  7206. ! corresponds to version 0.5 (released in
  7207. ! September 1992).
  7208.   
  7209.   The introduction briefly describes the purpose and philosophy of the
  7210. --- 93,101 ----
  7211.   @ifinfo
  7212.   @node Top, Introduction, (dir), (dir)
  7213. + @top Introduction
  7214.   
  7215.   This manual documents how to install and run the GNU font utilities.  It
  7216. ! corresponds to version 0.6 (released in
  7217. ! October 1992).
  7218.   
  7219.   The introduction briefly describes the purpose and philosophy of the
  7220. ***************
  7221. *** 106,110 ****
  7222.   @menu
  7223.   * Introduction::                A brief introduction.
  7224. ! * Installation::                How to install the font utilities.
  7225.   * Overview::                    Commonalities to the programs,
  7226.                     a roadmap to how they fit together,
  7227. --- 110,114 ----
  7228.   @menu
  7229.   * Introduction::                A brief introduction.
  7230. ! * Installation::                How to compile and install the font utilities.
  7231.   * Overview::                    Commonalities to the programs,
  7232.                     a roadmap to how they fit together,
  7233. ***************
  7234. *** 127,133 ****
  7235.   * Index::                       General index.
  7236.   
  7237.    --- The Detailed Node Listing ---
  7238.   
  7239. --- 131,134 ----
  7240. ***************
  7241. *** 167,170 ****
  7242. --- 168,182 ----
  7243.   * Numeric character codes::     Decimal, octal, hex, or ASCII.
  7244.   
  7245. + Bugs
  7246. + * Bug criteria::                Have you found a bug?
  7247. + * Bug reporting::               How to effectively report a bug.
  7248. + Bug reporting
  7249. + * Necessary information::       What you need to send.
  7250. + * Unnecessary information::     What you don't need to send.
  7251. + * Documentation bugs::          Report the bugs in the manual, too.
  7252.   File formats
  7253.   
  7254. ***************
  7255. *** 190,193 ****
  7256. --- 202,206 ----
  7257.   * Viewing an image::            Seeing what's in an image.
  7258.   * Image to font conversion::    Extracting a font.
  7259. + * Dirty images::                Handling scanning artifacts or other noise.
  7260.   
  7261.   IMGrotate
  7262. diff -Nrc2 fontutils-0.5/doc/gsrenderf.texi fontutils-0.6/doc/gsrenderf.texi
  7263. *** fontutils-0.5/doc/gsrenderf.texi    Wed Sep  2 17:17:14 1992
  7264. --- fontutils-0.6/doc/gsrenderf.texi    Sat Oct 24 05:19:05 1992
  7265. ***************
  7266. *** 27,30 ****
  7267. --- 27,35 ----
  7268.   the extra step after running @TeX{} can be quite inconvenient.
  7269.   
  7270. + @pindex ps2pk
  7271. + An alternative to using GSrenderfont is the standalone C program
  7272. + @code{ps2pk}.  It does the same job: rasterizing PostScript fonts.  It
  7273. + is available by ftp from @samp{ftp.urc.tue.nl}.
  7274.   @flindex gsrenderfont/main.c
  7275.   @cindex GSrenderfont, prerequisites for
  7276. ***************
  7277. *** 36,44 ****
  7278.   @pindex wc
  7279.   @cindex Imageto, used by GSrenderfont
  7280. - @cindex Fontconvert, used by GSrenderfont
  7281.   Besides Ghostscript, GSrenderfont uses @code{gawk} (GNU Awk), the
  7282.   standard Unix utilities @code{tail} and @code{wc}, the standard @TeX{}
  7283. ! utility @code{gftopk}, other programs from this distribution (Imageto
  7284. ! and Fontconvert), and one small program written expressly for it,
  7285.   @code{bbcount}.  Since this last is of doubtful value for anything but
  7286.   GSrenderfont, it is not documented here.  See @file{gsrenderfont/main.c}
  7287. --- 41,48 ----
  7288.   @pindex wc
  7289.   @cindex Imageto, used by GSrenderfont
  7290.   Besides Ghostscript, GSrenderfont uses @code{gawk} (GNU Awk), the
  7291.   standard Unix utilities @code{tail} and @code{wc}, the standard @TeX{}
  7292. ! utility @code{gftopk}, another programs from this distribution
  7293. ! (Imageto), and one small program written expressly for it,
  7294.   @code{bbcount}.  Since this last is of doubtful value for anything but
  7295.   GSrenderfont, it is not documented here.  See @file{gsrenderfont/main.c}
  7296. ***************
  7297. *** 78,90 ****
  7298.   @cindex names of fonts in GSrenderfont
  7299.   
  7300. ! GSrenderfont needs two font names to do its job: the PostScript name,
  7301. ! e.g., @samp{Times-Roman}, and the (output) filename, e.g., @file{ptmr}.
  7302.   
  7303.   @opindex -font
  7304. ! You can explicitly specify the first with the @samp{-font} option, and
  7305. ! the second with a non-option argument.  If you specify both, as in
  7306.   
  7307.   @example
  7308. ! gsrenderfont -font=Times-Roman ptmr
  7309.   @end example
  7310.   
  7311. --- 82,103 ----
  7312.   @cindex names of fonts in GSrenderfont
  7313.   
  7314. ! @cindex PostScript font names, as filenames
  7315. ! GSrenderfont needs at least two font names to do its job: the PostScript
  7316. ! name, e.g., @samp{Times-Roman}, and the output filename, e.g.,
  7317. ! @file{ptmr}.  (The PostScript font name cannot also be used as the
  7318. ! filename because of its length.  At best, the result would be unwieldy,
  7319. ! and at worst, invalid because of operating system restrictions.)
  7320. ! If the font is not known to Ghostscript (i.e., in its @file{Fontmap}
  7321. ! @flindex Fontmap
  7322. ! file), then an input filename is also needed.
  7323.   
  7324.   @opindex -font
  7325. ! @opindex -output-file
  7326. ! You can explicitly specify the first with the @samp{-font} option, the
  7327. ! second with the @samp{-output-file} option, and the third with a
  7328. ! non-option argument.  If you specify them all, as in
  7329.   
  7330.   @example
  7331. ! gsrenderfont -font=Myfont -out=test myfont.ps
  7332.   @end example
  7333.   
  7334. ***************
  7335. *** 96,106 ****
  7336.   @cindex mapping file for PostScript fonts
  7337.   @cindex PostScript fonts, mapping file for
  7338. ! But if you specify only one, GSrenderfont tries to guess the other using
  7339. ! a @dfn{mapping file}.  On each line of this file the first
  7340. ! (whitespace-delimited) word is the filename (possibly preceded by an
  7341. ! @samp{r}; see @ref{Top, , Introduction, fontname, Filenames for fonts},
  7342. ! for why), the second word is the PostScript font name, and any remaining
  7343. ! stuff is ignored.  Unlike the other data files, GSrenderfont does not
  7344. ! use path searching to find this file; it just uses the default:
  7345.   
  7346.   @example
  7347. --- 109,120 ----
  7348.   @cindex mapping file for PostScript fonts
  7349.   @cindex PostScript fonts, mapping file for
  7350. ! But if you specify only the font name or the input filename,
  7351. ! GSrenderfont tries to guess the other using a @dfn{mapping file}.  On
  7352. ! each line of this file the first (whitespace-delimited) @dfn{word} is
  7353. ! the filename (possibly preceded by an @samp{r}; @pxref{Top, ,
  7354. ! Introduction, fontname, Filenames for fonts}, for why), the second word
  7355. ! is the PostScript font name, and any remaining stuff is ignored.  Unlike
  7356. ! the other data files, GSrenderfont does not use path searching to find
  7357. ! this file; it just uses the default:
  7358.   
  7359.   @example
  7360. ***************
  7361. *** 108,118 ****
  7362.   @end example
  7363.   
  7364. ! @noindent 
  7365.   unless you specify a different file with the @samp{-map} option.  The
  7366. ! reason for this is that the default @file{psfonts.map} should contain
  7367. ! all the PostScript fonts in use at your site.
  7368.   
  7369. ! GSrenderfont complains and gives up if you don't specify either the
  7370. ! PostScript font name or the output filename.
  7371.   
  7372.   
  7373. --- 122,135 ----
  7374.   @end example
  7375.   
  7376. ! @noindent
  7377.   unless you specify a different file with the @samp{-map} option.  The
  7378. ! reason for this is that @file{psfonts.map} should contain all the
  7379. ! PostScript fonts in use at your site.
  7380. ! GSrenderfont complains and gives up if you specify neither the
  7381. ! PostScript font name nor the input filename.  It also gives up if it
  7382. ! can't determine the filename from the PostScript name or vice versa.
  7383.   
  7384. ! The default for the output filename is the input filename.
  7385.   
  7386.   
  7387. ***************
  7388. *** 128,132 ****
  7389.   For convenience, GSrenderfont allows you to independently specify the
  7390.   point size and the resolution of the output font: the @samp{-point-size}
  7391. ! option, as an integer in printer's points, and the latter with
  7392.   @samp{-dpi} in pixels per inch.  The defaults are 10@dmn{pt} and
  7393.   300@dmn{dpi}.
  7394. --- 145,149 ----
  7395.   For convenience, GSrenderfont allows you to independently specify the
  7396.   point size and the resolution of the output font: the @samp{-point-size}
  7397. ! option, as an integer in points, and the latter with
  7398.   @samp{-dpi} in pixels per inch.  The defaults are 10@dmn{pt} and
  7399.   300@dmn{dpi}.
  7400. ***************
  7401. *** 154,160 ****
  7402.   
  7403.   You specify the encoding for the new bitmap font with the
  7404. ! @samp{-encoding} option; the default is @samp{dvips}.  GSrenderfont
  7405. ! reads the same encoding files the other programs do; @xref{Encoding
  7406. ! files}.
  7407.   
  7408.   As with all other data files in the other programs, GSrenderfont
  7409. --- 171,177 ----
  7410.   
  7411.   You specify the encoding for the new bitmap font with the
  7412. ! @samp{-encoding} option; the default is to use the encoding of the input
  7413. ! font.  GSrenderfont reads the same encoding files as the other programs.
  7414. ! @xref{Encoding files}.
  7415.   
  7416.   As with all other data files in the other programs, GSrenderfont
  7417. ***************
  7418. *** 210,216 ****
  7419.   @end example
  7420.   
  7421.   @opindex -point-size
  7422.   @item -point-size @var{unsigned}
  7423. ! Render the output at @var{unsigned} printer's points; default is 10.
  7424.   
  7425.   @opindex -verbose
  7426. --- 227,238 ----
  7427.   @end example
  7428.   
  7429. + @item -output-file @var{filename}
  7430. + @opindex -output-file
  7431. + @cindex output file, naming
  7432. + Use @file{@var{filename}.@var{dpi}pk} for the final PK output.
  7433.   @opindex -point-size
  7434.   @item -point-size @var{unsigned}
  7435. ! Render the output at @var{unsigned} points; default is 10.
  7436.   
  7437.   @opindex -verbose
  7438. diff -Nrc2 fontutils-0.5/doc/imageto.texi fontutils-0.6/doc/imageto.texi
  7439. *** fontutils-0.5/doc/imageto.texi    Wed Sep  2 17:17:17 1992
  7440. --- fontutils-0.6/doc/imageto.texi    Sat Oct 24 05:19:05 1992
  7441. ***************
  7442. *** 35,45 ****
  7443.   @cindex usage of Imageto
  7444.   
  7445. ! Usually there are two steps to extracting a usable font from an image
  7446. ! file.  First, looking at the image, so you can see what you've got.
  7447. ! Second, preparing the IFI file describing the image contents: the
  7448. ! character codes to output, a baseline adjustment, and how many pieces
  7449. ! there are in each character.  Each step requires running Imageto; the
  7450. ! first time with either the @samp{-strips} or @samp{-epsf} option, the
  7451. ! second time with neither.
  7452.   
  7453.   @cindex scanlines, definition of
  7454. --- 35,45 ----
  7455.   @cindex usage of Imageto
  7456.   
  7457. ! Usually there are two prerequisites to extracting a usable font from an
  7458. ! image file.  First, looking at the image, so you can see what you've
  7459. ! got.  Second, preparing the IFI file describing the contents of the
  7460. ! image: the character codes to output, any baseline adjustment (as for,
  7461. ! e.g., @samp{j}), and how many pieces each character has.  Each
  7462. ! is a separate invocation of Imageto; the first time with either the
  7463. ! @samp{-strips} or @samp{-epsf} option, the second time with neither.
  7464.   
  7465.   @cindex scanlines, definition of
  7466. ***************
  7467. *** 47,63 ****
  7468.   @cindex bounding boxes in Imageto
  7469.   In the second step, Imageto considers the input image as a series of
  7470. ! image rows.  Each @dfn{image row} consists of all the scanlines between
  7471.   a nonblank scanline and the next entirely blank scanline.  (A
  7472.   @dfn{scanline} is a single horizontal row of pixels in the image.)
  7473.   Within each image row, Imageto looks top-to-bottom, left-to-right, for
  7474. ! @dfn{bounding boxes}: closed contours, i.e., an area around whose edge
  7475. ! you can move a pencil without lifting it.
  7476.   
  7477.   For example, in the following image Imageto would find two image rows,
  7478.   the first from scanlines 1 to scanline 7, the second consisting of only
  7479.   scanline 10.  There are six bounding boxes in the first image row, only
  7480. ! one in the second.  (This example shows some typical problems in scanned
  7481. ! images: the baseline of the @samp{m} is not aligned with those of the
  7482. ! @samp{i}, @samp{j}, and @samp{l}; a meaningless black line is present.)
  7483.   
  7484.   @example
  7485. --- 47,66 ----
  7486.   @cindex bounding boxes in Imageto
  7487.   In the second step, Imageto considers the input image as a series of
  7488. ! @dfn{image rows}.  Each image row consists of all the scanlines between
  7489.   a nonblank scanline and the next entirely blank scanline.  (A
  7490.   @dfn{scanline} is a single horizontal row of pixels in the image.)
  7491.   Within each image row, Imageto looks top-to-bottom, left-to-right, for
  7492. ! @dfn{bounding boxes}: closed contours, i.e., an area whose edge
  7493. ! you can trace with a pencil without lifting it.
  7494.   
  7495. + @cindex type specimen image, example of
  7496. + @cindex problems in scanned images, example
  7497.   For example, in the following image Imageto would find two image rows,
  7498.   the first from scanlines 1 to scanline 7, the second consisting of only
  7499.   scanline 10.  There are six bounding boxes in the first image row, only
  7500. ! one in the second.  (This example also shows some typical problems in
  7501. ! scanned images: the baseline of the @samp{m} is not aligned with those
  7502. ! of the @samp{i}, @samp{j}, and @samp{l}; a meaningless black line is
  7503. ! present; the @samp{i} and @samp{j} overlap.)
  7504.   
  7505.   @example
  7506. ***************
  7507. *** 64,74 ****
  7508.     01234567890123456789
  7509.    0
  7510. !  1         x
  7511. !  2 x   x   x
  7512. !  3         x
  7513. !  4 x   x   x   xxxxx
  7514. !  5 x   x   x   x x x
  7515. !  6     x       x x x
  7516. !  7   xx
  7517.    8
  7518.    9
  7519. --- 67,77 ----
  7520.     01234567890123456789
  7521.    0
  7522. !  1       x
  7523. !  2 x x   x
  7524. !  3       x
  7525. !  4 x x   x   xxxxx
  7526. !  5 x x   x   x x x
  7527. !  6   x       x x x
  7528. !  7 xx
  7529.    8
  7530.    9
  7531. ***************
  7532. *** 79,82 ****
  7533. --- 82,86 ----
  7534.   * Viewing an image::            Seeing what's in an image.
  7535.   * Image to font conversion::    Extracting a font.
  7536. + * Dirty images::                Handling scanning artifacts or other noise.
  7537.   @end menu
  7538.   
  7539. ***************
  7540. *** 92,100 ****
  7541.   @cindex image file, viewing
  7542.   @cindex viewing image files
  7543. ! Normally, the first step in extracting a font from an image is to see
  7544. ! exactly what is in the image.  Naturally, this is unnecessary if you
  7545. ! know exactly what your image file contains.
  7546.   
  7547.   @opindex -epsf
  7548.   The simplest way to get a look at the image file, if you have
  7549.   Ghostscript or some other suitable PostScript interpreter, is to convert
  7550. --- 96,105 ----
  7551.   @cindex image file, viewing
  7552.   @cindex viewing image files
  7553. ! Typically, the first step in extracting a font from an image is to see
  7554. ! exactly what is in the image.  (Clearly, this is unnecessary if you
  7555. ! already know what your image file contains.)
  7556.   
  7557.   @opindex -epsf
  7558. + @cindex Ghostscript, using to look at images
  7559.   The simplest way to get a look at the image file, if you have
  7560.   Ghostscript or some other suitable PostScript interpreter, is to convert
  7561. ***************
  7562. *** 106,110 ****
  7563.   @end example
  7564.   
  7565. ! Here we are reading an input file @file{ggmr.img}; the output is
  7566.   @file{ggmr.eps}.  You can then view the EPS file with
  7567.   
  7568. --- 111,115 ----
  7569.   @end example
  7570.   
  7571. ! Here we read an input file @file{ggmr.img}; the output is
  7572.   @file{ggmr.eps}.  You can then view the EPS file with
  7573.   
  7574. ***************
  7575. *** 116,120 ****
  7576.   
  7577.   @opindex -strips
  7578. ! If you don't have either a suitable PostScript interpreter or enough
  7579.   disk space to store the EPS file (it uses approximately twice as much
  7580.   disk space as the original image), the above won't work.  Instead, to
  7581. --- 121,125 ----
  7582.   
  7583.   @opindex -strips
  7584. ! If you don't have both a suitable PostScript interpreter and enough
  7585.   disk space to store the EPS file (it uses approximately twice as much
  7586.   disk space as the original image), the above won't work.  Instead, to
  7587. ***************
  7588. *** 127,131 ****
  7589.   The output of this will be @file{ggmrsp.1200gf} (our image having a
  7590.   resolution of 1200 dpi).  Although the GF font cannot be conveniently
  7591. ! viewed directly, you can use @TeX{} to look at it, as follows:
  7592.   
  7593.   @flindex strips.tex
  7594. --- 132,137 ----
  7595.   The output of this will be @file{ggmrsp.1200gf} (our image having a
  7596.   resolution of 1200 dpi).  Although the GF font cannot be conveniently
  7597. ! viewed directly, you can use @TeX{} and your favorite DVI processor to
  7598. ! look at it, as follows:
  7599.   
  7600.   @flindex strips.tex
  7601. ***************
  7602. *** 142,146 ****
  7603.   
  7604.   
  7605. ! @node Image to font conversion,  , Viewing an image, Imageto usage
  7606.   @subsection Image to font conversion
  7607.   
  7608. --- 148,152 ----
  7609.   
  7610.   
  7611. ! @node Image to font conversion, Dirty images, Viewing an image, Imageto usage
  7612.   @subsection Image to font conversion
  7613.   
  7614. ***************
  7615. *** 162,211 ****
  7616.   @itemize @bullet
  7617.   
  7618.   @cindex design size in image
  7619.   @opindex -designsize
  7620. - @item
  7621.   The @emph{design size}, which you specify with the @samp{-designsize}
  7622.   option.  The default is 10@dmn{pt}.  Even if you know the true design
  7623. ! size of the original scanned image, you may not wish to change it.  For
  7624. ! example, although our originals were 30@dmn{pt}, that resulted in the
  7625. ! 10@dmn{pt} size being too small to our (20th-century) eyes.  So we
  7626. ! specified a design size of 26@dmn{pt}.
  7627.   
  7628.   @cindex baselines in image
  7629.   @opindex -baselines
  7630.   @opindex -print-guidelines
  7631. - @item
  7632.   The @emph{baselines}, which you specify with the @samp{-baselines}
  7633. ! option.  You can specify the baseline for each image row (the top
  7634. ! scanline of each image row is numbered zero).  You can make an
  7635. ! adjustment for individual characters in the IFI files, but you save
  7636. ! yourself at least some of this hassle by specifying a general baseline
  7637. ! for each row.
  7638.   
  7639.   For instance, in the example image in @ref{Imageto usage}, it would be
  7640. ! best to specify @samp{-baselines=4,0}.  (The @samp{4} is scanline #5 in
  7641. ! that image.)
  7642. ! You can see what baseline is chosen for each character with the
  7643. ! @samp{-print-guidelines} option.
  7644. ! @cindex clean threshold in image
  7645. ! @cindex blotches in image
  7646. ! @cindex spots in image
  7647. ! @cindex dirt
  7648. ! @cindex overlapping characters
  7649. ! @opindex -clean-threshold
  7650. ! @opindex -print-clean-info
  7651. ! @item
  7652. ! The @dfn{clean threshold}, which you specify with the
  7653. ! @samp{-clean-threshold} option.  Scanned images often have (sometimes
  7654. ! numerous) dark blotches from dirt or miscues in the original printing.
  7655. ! To omit the blotches from the output font, you can specify
  7656. ! @code{.notdef} for the character code in the IFI file.  You can also set
  7657. ! the clean threshold; bounding boxes which enclose a higher percentage
  7658. ! black than this are omitted from the output automatically.
  7659.   
  7660. ! You can see the percentage of black in each bounding box which is
  7661. ! considered for cleaning with the @samp{-print-clean-info} option.
  7662.   
  7663.   @end itemize
  7664. --- 168,210 ----
  7665.   @itemize @bullet
  7666.   
  7667. + @item
  7668.   @cindex design size in image
  7669.   @opindex -designsize
  7670.   The @emph{design size}, which you specify with the @samp{-designsize}
  7671.   option.  The default is 10@dmn{pt}.  Even if you know the true design
  7672. ! size of the original scanned image, you may wish to change it.  For
  7673. ! example, some of our original specimens were stated to be 30@dmn{pt},
  7674. ! but that resulted in the 10@dmn{pt} size being too small to our
  7675. ! (20th-century) eyes.  So we specified a design size of 26@dmn{pt}.
  7676.   
  7677. + @item
  7678.   @cindex baselines in image
  7679.   @opindex -baselines
  7680.   @opindex -print-guidelines
  7681.   The @emph{baselines}, which you specify with the @samp{-baselines}
  7682. ! option.  You can specify the baseline for each image row (the bottom
  7683. ! scanline of each image row is numbered zero, with coordinates increasing
  7684. ! upward).  You can make an adjustment for individual characters in the
  7685. ! IFI files, but you save yourself at least some of this hassle by
  7686. ! specifying a general baseline for each row.
  7687.   
  7688.   For instance, in the example image in @ref{Imageto usage}, it would be
  7689. ! best to specify @samp{-baselines=2,0}.  The @samp{2} is scanline #5 in
  7690. ! that image.  The @samp{0} is an arbitrary value for scanline #10, which
  7691. ! we will ignore via the IFI file (@pxref{IFI files}).
  7692. ! @opindex -print-guidelines @r{example}
  7693. ! For each character written, the @samp{-print-guidelines} option produces
  7694. ! output on the terminal that looks like:
  7695. ! @example
  7696. ! 75 (K) 5/315
  7697. ! @end example
  7698.   
  7699. ! @noindent This means that character code 75, whose name in
  7700. ! the encoding file is @samp{K}, has its bottom row at row 5, and its top
  7701. ! row at row 315; i.e., the character has five blank rows above the
  7702. ! origin.  This is almost certainly wrong (the letter `K' should sit on
  7703. ! the typesetting baseline), so we would want to adjust it downwards to 0
  7704. ! via the individual character adjustment (@pxref{IFI files}).
  7705.   
  7706.   @end itemize
  7707. ***************
  7708. *** 214,219 ****
  7709.   
  7710.   @example
  7711. ! imageto -verbose -baselines=327,338,342 -clean-threshold=23 \
  7712. !   -designsize=26 ggmr
  7713.   @end example
  7714.   
  7715. --- 213,217 ----
  7716.   
  7717.   @example
  7718. ! imageto -baselines=121,130,120 -designsize=26 ggmr
  7719.   @end example
  7720.   
  7721. ***************
  7722. *** 221,224 ****
  7723. --- 219,286 ----
  7724.   
  7725.   
  7726. + @node Dirty images,  , Image to font conversion, Imageto usage
  7727. + @subsection Dirty images
  7728. + @cindex sex
  7729. + @cindex dirty images
  7730. + @cindex noisy images
  7731. + @cindex spots
  7732. + @cindex clean images, not having
  7733. + @cindex scanning artifacts
  7734. + @cindex artifacts, of scanning
  7735. + Your image may not be completely ``clean'', i.e., the scanning process
  7736. + may have introduced artifacts: black lines at the edge of the paper;
  7737. + blotches where the original had a speck of dirt or ink; broken lines
  7738. + where the image had a continuous line.  To get a correct output font,
  7739. + you must correct these problems.
  7740. + @cindex blotches in image, ignoring
  7741. + @vindex .notdef@r{, removing blotches with}
  7742. + To remove blotches, you can simply put @code{.notdef} in the appropriate
  7743. + place in the IFI file.  You can find the ``appropriate place'' when you
  7744. + look at the output font; some character will be nothing but a (possibly
  7745. + tiny) speck, and all the characters following will be in the wrong
  7746. + position.
  7747. + @opindex -print-clean-info @r{example}
  7748. + @cindex bounding boxes, assigned to characters
  7749. + @cindex characters, bounding boxes assigned
  7750. + The @samp{-print-clean-info} option might also help you to
  7751. + diagnose which bounding boxes are being assigned to which characters,
  7752. + when you are in doubt.  Here is an example of its output:
  7753. + @example
  7754. + [Cleaning 149x383 bitmap:
  7755. +   checking (0,99)-(10,152) ... clearing.
  7756. +   checking (0,203)-(35,263) ... clearing.
  7757. +   checking (0,99)-(130,382) ... keeping.
  7758. +   checking (113,0)-(149,37) ... keeping.
  7759. + 106]
  7760. + @end example
  7761. + @noindent The final @samp{106} is the character code output (ASCII
  7762. + @samp{j}).  The size of the overall bitmap which contains the `j' is 149
  7763. + pixels wide and 383 pixels high.  The bitmap contained four bounding
  7764. + boxes, the last two of which belonged to the `j' and were kept, and the
  7765. + first two from the adjacent character (`i') and were erased.  (As shown
  7766. + in the example image above, the tail of the `j' often overlaps the `i'
  7767. + in type specimens.)
  7768. + If the image has blobs you have not removed with @code{.notdef}, you
  7769. + will see a small bounding box in this output.  The numbers shown are in
  7770. + ``bitmap coordinates'': (0,0) is the upper left-hand pixel of the
  7771. + bitmap.
  7772. + @cindex baselines and blotches
  7773. + @opindex -baselines @r{and blotches}
  7774. + If a blotch appears outside of the row of characters, Imageto will
  7775. + consider it to be its own (very small) image row.  If you are using
  7776. + @samp{-baselines}, you must specify an arbitrary value corresponding to
  7777. + the blotch, even though the bounding box in the image will be ignored.
  7778. + See the section above for an example.
  7779.   @node IFI files, Invoking Imageto, Imageto usage, Imageto
  7780.   @section IFI files
  7781. ***************
  7782. *** 227,240 ****
  7783.   @cindex image font information files
  7784.   
  7785. ! @dfn{Image font information} (IFI) files are text files which describe
  7786. ! the contents of an image file.  You yourself must create it; as we will
  7787. ! see, the information it contains usually cannot be determined
  7788.   automatically.
  7789.   
  7790.   If your image file is named @file{@var{foo}.img} (or
  7791.   @file{@var{foo}.pbm}), it is customary to name the corresponding IFI
  7792.   file @file{@var{foo}.ifi}.  That is what Imageto looks for by default.
  7793. ! If you name it something else, you must use the @samp{-info-filename}
  7794. ! option to tell Imageto the IFI filename.
  7795.   
  7796.   Imageto does not look for an IFI file if either the @samp{-strips} or
  7797. --- 289,304 ----
  7798.   @cindex image font information files
  7799.   
  7800. ! An @dfn{image font information} (IFI) file is a text file which
  7801. ! describes the contents of an image file.  You yourself must create it;
  7802. ! as we will see, the information it contains usually cannot be determined
  7803.   automatically.
  7804.   
  7805. + @cindex IFI files, naming
  7806. + @cindex naming IFI files
  7807.   If your image file is named @file{@var{foo}.img} (or
  7808.   @file{@var{foo}.pbm}), it is customary to name the corresponding IFI
  7809.   file @file{@var{foo}.ifi}.  That is what Imageto looks for by default.
  7810. ! If you name it something else, you must specify the name with the
  7811. ! @samp{-ifi-file} option.
  7812.   
  7813.   Imageto does not look for an IFI file if either the @samp{-strips} or
  7814. ***************
  7815. *** 242,250 ****
  7816.   
  7817.   @cindex characters, defining in IFI files
  7818. ! Each nonblank non-comment line in the IFI file represents a
  7819. ! ``character'' in the image (i.e., a sequence of bounding boxes), and the
  7820. ! corresponding character in the output font.  @xref{Common file syntax},
  7821. ! for a description of syntax elements common to all data files processed
  7822. ! by these programs, including comments.
  7823.   
  7824.   @cindex entries in IFI files
  7825. --- 306,314 ----
  7826.   
  7827.   @cindex characters, defining in IFI files
  7828. ! Each nonblank non-comment line in the IFI file represents a a sequence
  7829. ! of bounding boxes in the image, and a corresponding character in the
  7830. ! output font.  @xref{Common file syntax}, for a description of syntax
  7831. ! elements common to all data files processed by these programs, including
  7832. ! comments.
  7833.   
  7834.   @cindex entries in IFI files
  7835. ***************
  7836. *** 251,257 ****
  7837.   Each line has one to five @dfn{entries}, separated by spaces and/or
  7838.   tabs.  If a line contains fewer than five entries, suitable defaults (as
  7839. ! described below) are taken for the missing trailing entries.  (You
  7840. ! cannot supply a value for entry #3, say, without also supplying values
  7841. ! for entries #1 and #2.)
  7842.   
  7843.   Here is the meaning of each entry, in order:
  7844. --- 315,321 ----
  7845.   Each line has one to five @dfn{entries}, separated by spaces and/or
  7846.   tabs.  If a line contains fewer than five entries, suitable defaults (as
  7847. ! described below) are taken for the missing trailing entries.  (It is
  7848. ! impossible to supply a value for entry #3, say, without also supplying
  7849. ! values for entries #1 and #2.)
  7850.   
  7851.   Here is the meaning of each entry, in order:
  7852. ***************
  7853. *** 259,290 ****
  7854.   @enumerate
  7855.   
  7856. - @cindex character name in IFI files
  7857.   @item
  7858. ! The character name of the output character.  If the character name is
  7859. ! @code{.notdef}, Imageto throws away the corresponding bounding boxes.
  7860. ! Otherwise, Imageto outputs the bounding boxes as a character, assigning
  7861. ! it the character code of the name as defined in the encoding vector
  7862. ! (@pxref{Invoking Imageto}).  If the character name is not specified in
  7863. ! the encoding, Imageto also throws away the bounding boxes, as if it were
  7864. ! @code{.notedef}.  @xref{Encoding files}, for general information on
  7865. ! encoding files.
  7866.   
  7867.   @cindex baseline in IFI files
  7868.   @cindex baseline adjustment
  7869.   @cindex adjustment, to baseline
  7870. - @item
  7871.   An adjustment to the baseline of the output character, as a (possibly
  7872. ! signed) decimal number.  By default, the baseline is taken to be the
  7873. ! bottom scanline of the image row, but a different scanline can be
  7874. ! specified with the @samp{-baselines} option.  The number you specify
  7875. ! here is subtracted from that default, to get the scanline number of the
  7876. ! baseline for this character.  Thus, a positive adjustment moves the
  7877. ! baseline up, a negative one down.  The default adjustment is zero.
  7878.   
  7879.   @cindex bounding box count in IFI files
  7880.   @cindex alternating bounding boxes
  7881.   @cindex mixed-up characters in image
  7882. ! @cindex out-of-order character in image
  7883. ! @item
  7884.   The number of bounding boxes which comprise this character, as a decimal
  7885.   number.  The default is one.  If this number is negative, it indicates
  7886. --- 323,354 ----
  7887.   @enumerate
  7888.   
  7889.   @item
  7890. ! @cindex character name in IFI files
  7891. ! The character name of the output character.  Usually, Imageto outputs
  7892. ! the bounding boxes from the image as a character in the output font,
  7893. ! assigning it the character code of the name as defined in the encoding
  7894. ! vector (@pxref{Invoking Imageto}).  However, if the character name is
  7895. ! @code{.notdef}, or if the character name is not specified in the
  7896. ! encoding, Imageto just throws away the bounding boxes.  @xref{Encoding
  7897. ! files}, for general information on encoding files.
  7898.   
  7899. + @item
  7900.   @cindex baseline in IFI files
  7901.   @cindex baseline adjustment
  7902.   @cindex adjustment, to baseline
  7903.   An adjustment to the baseline of the output character, as a (possibly
  7904. ! signed) decimal number.  The default baseline is either the bottom
  7905. ! scanline of the image row, or the value you specified with the
  7906. ! @samp{-baselines} option.  The number given here, in the IFI file, is
  7907. ! subtracted from that default.  Thus, a positive adjustment moves the
  7908. ! baseline up (i.e., moves the character down relative to the typesetting
  7909. ! baseline), a negative one down.  The default adjustment is zero.
  7910.   
  7911. + @item
  7912.   @cindex bounding box count in IFI files
  7913.   @cindex alternating bounding boxes
  7914.   @cindex mixed-up characters in image
  7915. ! @cindex out-of-order characters in image
  7916. ! @cindex characters, out-of-order in image
  7917.   The number of bounding boxes which comprise this character, as a decimal
  7918.   number.  The default is one.  If this number is negative, it indicates
  7919. ***************
  7920. *** 297,307 ****
  7921.   @code{-2}.
  7922.   
  7923.   @cindex side bearings in IFI files
  7924.   @cindex left side bearing in IFI files
  7925. ! @item
  7926. ! The left side bearing (lsb).  Most type specimens we've seen
  7927. ! unfortunately don't include side bearing information, but if you happen
  7928. ! to have such, you can give it here.  (GSrenderfont
  7929. ! (@pxref{GSrenderfont}) uses this feature).  The default is zero.
  7930.   
  7931.   You can run Charspace (@pxref{Charspace}) to add side bearings to a font
  7932. --- 361,371 ----
  7933.   @code{-2}.
  7934.   
  7935. + @item
  7936.   @cindex side bearings in IFI files
  7937.   @cindex left side bearing in IFI files
  7938. ! The left side bearing (lsb).  Most type specimens unfortunately don't
  7939. ! include side bearing information, but if you happen to have such, you
  7940. ! can give it here.  (GSrenderfont (@pxref{GSrenderfont}) uses this
  7941. ! feature).  The default is zero.
  7942.   
  7943.   You can run Charspace (@pxref{Charspace}) to add side bearings to a font
  7944. ***************
  7945. *** 344,350 ****
  7946.   @table @samp
  7947.   
  7948.   @opindex -baselines
  7949.   @cindex baselines in image
  7950. - @item -baselines @var{scanline1},@var{scanline2},@dots{}
  7951.   Define the baselines for each image row.  The default baseline for the
  7952.   characters in the first image row is taken to be @var{scanline1}, etc.
  7953. --- 408,414 ----
  7954.   @table @samp
  7955.   
  7956. + @item -baselines @var{scanline1},@var{scanline2},@dots{}
  7957.   @opindex -baselines
  7958.   @cindex baselines in image
  7959.   Define the baselines for each image row.  The default baseline for the
  7960.   characters in the first image row is taken to be @var{scanline1}, etc.
  7961. ***************
  7962. *** 352,388 ****
  7963.   image row is numbered zero.
  7964.   
  7965. ! @opindex -clean-threshold
  7966. ! @item -clean-threshold @var{percent}
  7967. ! If a bounding box encloses a larger percentage of black pixels than
  7968. ! @var{percent}, it is omitted from the output; default is 60.
  7969.   @opindex -designsize
  7970.   @cindex design size, specifying
  7971.   @cindex fontsize
  7972. - @item -designsize @var{real}
  7973.   Set the design size of the output font to @var{real}; default is 10.0.
  7974.   
  7975. - @opindex -dpi
  7976.   @item -dpi @var{unsigned}
  7977.   The resolution of the input image, in pixels per inch (required for PBM
  7978.   input).  @xref{Common options}.
  7979.   
  7980. - @opindex -encoding
  7981.   @item -encoding @var{enc-file}
  7982.   The encoding file to read for the mapping between character names and
  7983.   character codes.  @xref{Encoding files}.  If @var{enc-file} has no
  7984. ! suffix, @samp{.enc} is appended.  Default is @file{ascii}.
  7985.   
  7986. - @opindex -epsf
  7987.   @item -epsf
  7988.   Write the image to @file{@var{image-name}.eps} as an Encapsulated
  7989.   PostScript file.
  7990.   
  7991. - @opindex -help
  7992.   @item -help
  7993.   Print a usage message.  @xref{Common options}.
  7994.   
  7995. ! @opindex -info-file
  7996. ! @item -info-file @var{filename}
  7997.   Set the name of the IFI file to @var{filename} (if @var{filename} has an
  7998.   extension) or @file{@var{filename}.ifi} (if it doesn't).  The default is
  7999. --- 416,448 ----
  8000.   image row is numbered zero.
  8001.   
  8002. ! @item -designsize @var{real}
  8003.   @opindex -designsize
  8004.   @cindex design size, specifying
  8005.   @cindex fontsize
  8006.   Set the design size of the output font to @var{real}; default is 10.0.
  8007.   
  8008.   @item -dpi @var{unsigned}
  8009. + @opindex -dpi
  8010.   The resolution of the input image, in pixels per inch (required for PBM
  8011.   input).  @xref{Common options}.
  8012.   
  8013.   @item -encoding @var{enc-file}
  8014. + @opindex -encoding
  8015.   The encoding file to read for the mapping between character names and
  8016.   character codes.  @xref{Encoding files}.  If @var{enc-file} has no
  8017. ! suffix, @samp{.enc} is appended.  Default is to assign successive
  8018. ! character codes to the character names in the IFI file.
  8019.   
  8020.   @item -epsf
  8021. + @opindex -epsf
  8022.   Write the image to @file{@var{image-name}.eps} as an Encapsulated
  8023.   PostScript file.
  8024.   
  8025.   @item -help
  8026. + @opindex -help
  8027.   Print a usage message.  @xref{Common options}.
  8028.   
  8029. ! @opindex -ifi-file
  8030. ! @itemx -ifi-file @var{filename}
  8031.   Set the name of the IFI file to @var{filename} (if @var{filename} has an
  8032.   extension) or @file{@var{filename}.ifi} (if it doesn't).  The default is
  8033. ***************
  8034. *** 389,394 ****
  8035.   @file{@var{image-name}.ifi}.
  8036.   
  8037. - @opindex -input-format
  8038.   @item -input-format @var{format}
  8039.   Specify the format of the input image; @var{format} must be
  8040.   one of @samp{pbm} or @samp{img}.  The default is taken from
  8041. --- 449,454 ----
  8042.   @file{@var{image-name}.ifi}.
  8043.   
  8044.   @item -input-format @var{format}
  8045. + @opindex -input-format
  8046.   Specify the format of the input image; @var{format} must be
  8047.   one of @samp{pbm} or @samp{img}.  The default is taken from
  8048. ***************
  8049. *** 395,406 ****
  8050.   @var{image-name}, if possible.
  8051.   
  8052. - @opindex -nchars
  8053.   @item -nchars @var{unsigned}
  8054.   Only write the first @var{unsigned} (approximately) characters from the
  8055.   image to the output font; default is all the characters.
  8056.   
  8057.   @opindex -output-file
  8058.   @cindex output file, naming
  8059. - @item -output-file @var{filename}
  8060.   Write to @var{filename} if @var{filename} has a suffix.  If it doesn't,
  8061.   then if writing strips, write to @var{filename}sp.@var{dpi}gf; else
  8062. --- 455,466 ----
  8063.   @var{image-name}, if possible.
  8064.   
  8065.   @item -nchars @var{unsigned}
  8066. + @opindex -nchars
  8067.   Only write the first @var{unsigned} (approximately) characters from the
  8068.   image to the output font; default is all the characters.
  8069.   
  8070. + @item -output-file @var{filename}
  8071.   @opindex -output-file
  8072.   @cindex output file, naming
  8073.   Write to @var{filename} if @var{filename} has a suffix.  If it doesn't,
  8074.   then if writing strips, write to @var{filename}sp.@var{dpi}gf; else
  8075. ***************
  8076. *** 408,435 ****
  8077.   `@var{image-name} @var{designsize}' for @var{filename}.
  8078.   
  8079. - @opindex -print-clean-info
  8080.   @item -print-clean-info
  8081. ! Print the percentage black and the sizes of each bounding box considered
  8082. ! for cleaning.
  8083.   
  8084. - @opindex -print-guidelines
  8085.   @item -print-guidelines
  8086.   Print the numbers of the top and bottom scanlines for each
  8087. ! character.  This implies @samp{verbose}.
  8088.   
  8089. - @opindex -range
  8090.   @item -range @var{char1}-@var{char2}
  8091.   Only output characters with codes between @var{char1} and @var{char2},
  8092.   inclusive.  (@xref{Common options}, and @ref{Specifying character codes}.)
  8093.   
  8094. - @opindex -strips
  8095.   @item -strips
  8096.   Take a constant number of scanlines from the image as each character in
  8097.   the output font, instead of using an IFI file to analyze the image.
  8098.   
  8099.   @cindex scanlines, tracing
  8100.   @cindex image, converting to ASCII
  8101.   @opindex -trace-scanlines
  8102. - @item -trace-scanlines
  8103.   Show every scanline as we read it as plain text, using @samp{*} and
  8104.   space characters.  This is still another way to view the image
  8105. --- 468,497 ----
  8106.   `@var{image-name} @var{designsize}' for @var{filename}.
  8107.   
  8108.   @item -print-clean-info
  8109. ! @opindex -print-clean-info
  8110. ! Print the size of each bounding box considered for removal, and the size
  8111. ! of the containing bitmaps.  This option implies @samp{-verbose}.
  8112. ! @xref{Dirty images}, for a full explanation of its output.
  8113.   
  8114.   @item -print-guidelines
  8115. + @opindex -print-guidelines
  8116.   Print the numbers of the top and bottom scanlines for each
  8117. ! character.  This implies @samp{verbose}.  @xref{Image to font
  8118. ! conversion}, for a full explanation of its output.
  8119.   
  8120.   @item -range @var{char1}-@var{char2}
  8121. + @opindex -range
  8122.   Only output characters with codes between @var{char1} and @var{char2},
  8123.   inclusive.  (@xref{Common options}, and @ref{Specifying character codes}.)
  8124.   
  8125.   @item -strips
  8126. + @opindex -strips
  8127.   Take a constant number of scanlines from the image as each character in
  8128.   the output font, instead of using an IFI file to analyze the image.
  8129.   
  8130. + @item -trace-scanlines
  8131.   @cindex scanlines, tracing
  8132.   @cindex image, converting to ASCII
  8133.   @opindex -trace-scanlines
  8134.   Show every scanline as we read it as plain text, using @samp{*} and
  8135.   space characters.  This is still another way to view the image
  8136. ***************
  8137. *** 440,449 ****
  8138.   the resulting file in Emacs.  This option is primarily for debugging.
  8139.   
  8140. - @opindex -verbose
  8141.   @item -verbose
  8142. ! Output progress reports.  @xref{Common options}.
  8143.   
  8144. - @opindex -version
  8145.   @item -version
  8146.   Print the version number.  @xref{Common options}.
  8147.   
  8148. --- 502,516 ----
  8149.   the resulting file in Emacs.  This option is primarily for debugging.
  8150.   
  8151.   @item -verbose
  8152. ! @opindex -verbose
  8153. ! @kindex . @r{in Imageto verbose output}
  8154. ! @kindex + @r{in Imageto verbose output}
  8155. ! Output progress reports.  @xref{Common options}.  Specifically, a
  8156. ! @samp{.} is output for every 100 scanlines read, a @samp{+} is
  8157. ! output when an image row does not end on a character boundary, and the
  8158. ! character code is output inside brackets.
  8159.   
  8160.   @item -version
  8161. + @opindex -version
  8162.   Print the version number.  @xref{Common options}.
  8163.   
  8164. diff -Nrc2 fontutils-0.5/doc/install.texi fontutils-0.6/doc/install.texi
  8165. *** fontutils-0.5/doc/install.texi    Thu Sep  3 08:29:43 1992
  8166. --- fontutils-0.6/doc/install.texi    Sun Oct 18 12:57:38 1992
  8167. ***************
  8168. *** 21,26 ****
  8169.   for options and other information about the @code{configure} script.
  8170.   
  8171. ! @flindex GNUmakefile, @r{editing}
  8172. ! @flindex include/c-auto.h, @r{editing}
  8173.   @cindex search paths, defining default
  8174.   @item
  8175. --- 21,26 ----
  8176.   for options and other information about the @code{configure} script.
  8177.   
  8178. ! @flindex GNUmakefile@r{, editing}
  8179. ! @flindex include/c-auto.h@r{, editing}
  8180.   @cindex search paths, defining default
  8181.   @item
  8182. ***************
  8183. *** 31,36 ****
  8184.   Run GNU make.  For example, if it's installed as @file{make}, just type
  8185.   @samp{make} in the top-level directory.  If all goes well, this will
  8186. ! compile all the programs.  @xref{Problems}, for known warnings and other
  8187. ! trouble during compilation.
  8188.   
  8189.   @item
  8190. --- 31,35 ----
  8191.   Run GNU make.  For example, if it's installed as @file{make}, just type
  8192.   @samp{make} in the top-level directory.  If all goes well, this will
  8193. ! compile all the programs.
  8194.   
  8195.   @item
  8196. ***************
  8197. *** 425,430 ****
  8198.   or use a newer version of GCC.
  8199.   
  8200. ! @flindex math.h, @r{wrong}
  8201. ! @findex fmod, @r{wrong prototype for}
  8202.   @cindex Interactive Unix
  8203.   @item
  8204. --- 424,429 ----
  8205.   or use a newer version of GCC.
  8206.   
  8207. ! @flindex math.h@r{, wrong}
  8208. ! @findex fmod@r{, wrong prototype for}
  8209.   @cindex Interactive Unix
  8210.   @item
  8211. diff -Nrc2 fontutils-0.5/doc/intro.texi fontutils-0.6/doc/intro.texi
  8212. *** fontutils-0.5/doc/intro.texi    Thu Sep  3 09:45:31 1992
  8213. --- fontutils-0.6/doc/intro.texi    Tue Oct 27 13:27:07 1992
  8214. ***************
  8215. *** 8,12 ****
  8216.   @cindex introduction
  8217.   
  8218. ! This manual corresponds to version 0.5 of the GNU font
  8219.   utilities.
  8220.   
  8221. --- 8,12 ----
  8222.   @cindex introduction
  8223.   
  8224. ! This manual corresponds to version 0.6 of the GNU font
  8225.   utilities.
  8226.   
  8227. diff -Nrc2 fontutils-0.5/doc/overview.texi fontutils-0.6/doc/overview.texi
  8228. *** fontutils-0.5/doc/overview.texi    Wed Sep  2 17:35:13 1992
  8229. --- fontutils-0.6/doc/overview.texi    Mon Oct  5 10:12:32 1992
  8230. ***************
  8231. *** 259,264 ****
  8232.   @end example
  8233.   
  8234. - @flindex ggmr.ifi
  8235.   @item
  8236.   Next, we created the file @file{ggmr.ifi} (distributed in the
  8237.   @file{data} directory), listing the characters in the order they
  8238. --- 259,264 ----
  8239.   @end example
  8240.   
  8241.   @item
  8242. + @flindex ggmr.ifi
  8243.   Next, we created the file @file{ggmr.ifi} (distributed in the
  8244.   @file{data} directory), listing the characters in the order they
  8245. ***************
  8246. *** 265,271 ****
  8247.   appeared in the image, guessing at baseline offsets and (if necessary)
  8248.   including bounding box counts.  Then we ran Imageto again, this time to
  8249. ! get information about the baselines and black blotches in the image.
  8250.   @example
  8251. ! imageto -print-guidelines -print-clean-info ggmr.img
  8252.   @end example
  8253.   
  8254. --- 265,273 ----
  8255.   appeared in the image, guessing at baseline offsets and (if necessary)
  8256.   including bounding box counts.  Then we ran Imageto again, this time to
  8257. ! get information about the baselines and spurious blotches in the image.
  8258. ! We use the @samp{-encoding} option since some of the characters in the
  8259. ! image are not in the default @code{ASCII} encoding.
  8260.   @example
  8261. ! imageto -print-guidelines -print-clean-info -encoding=gnulatin ggmr.img
  8262.   @end example
  8263.   
  8264. ***************
  8265. *** 272,280 ****
  8266.   @item
  8267.   Based on the information gleaned from that run, we decided on the final
  8268. ! baselines and clean threshold, and extracted the font (@pxref{Image to
  8269. ! font conversion}).  (In truth, this took several iterations.)  The
  8270. ! design size of the original image was stated in the book to be 30@dmn{pt}.
  8271.   @example
  8272. ! imageto -verbose -baselines=327,338,342 -clean-threshold=23 \
  8273.     -designsize=30 -encoding=gnulatin ggmr.img
  8274.   @end example
  8275. --- 274,285 ----
  8276.   @item
  8277.   Based on the information gleaned from that run, we decided on the final
  8278. ! baselines, adjusted the bounding box counts for broken-up characters,
  8279. ! and extracted the font (@pxref{Image to font conversion}).  (In truth,
  8280. ! this took several iterations.)  The design size of the original image
  8281. ! was stated in the book to be 30@dmn{pt}.  We noticed several
  8282. ! blotches in the image we needed to ignore, and so we added
  8283. ! @code{.notdef} lines to @file{ggmr.ifi} as appropriate.
  8284.   @example
  8285. ! imageto -verbose -baselines=121,130,120 \
  8286.     -designsize=30 -encoding=gnulatin ggmr.img
  8287.   @end example
  8288. ***************
  8289. *** 450,462 ****
  8290.   @table @samp
  8291.   
  8292.   @opindex -help
  8293.   @cindex help, online
  8294. - @item -help
  8295.   Prints a usage message listing all available options on standard error.
  8296.   The program exits after doing so.
  8297.   
  8298.   @opindex -log
  8299.   @cindex log file
  8300. - @item -log
  8301.   Write information about everything the program is doing to the file
  8302.   @file{@var{foo}.log}, where @var{foo} is the root part of the main input
  8303. --- 455,467 ----
  8304.   @table @samp
  8305.   
  8306. + @item -help
  8307.   @opindex -help
  8308.   @cindex help, online
  8309.   Prints a usage message listing all available options on standard error.
  8310.   The program exits after doing so.
  8311.   
  8312. + @item -log
  8313.   @opindex -log
  8314.   @cindex log file
  8315.   Write information about everything the program is doing to the file
  8316.   @file{@var{foo}.log}, where @var{foo} is the root part of the main input
  8317. ***************
  8318. *** 463,466 ****
  8319. --- 468,472 ----
  8320.   file.
  8321.   
  8322. + @item -verbose
  8323.   @opindex -verbose
  8324.   @cindex verbose output
  8325. ***************
  8326. *** 467,477 ****
  8327.   @cindex progress reports
  8328.   @cindex status reports
  8329. ! @item -verbose
  8330.   Prints brief status reports as the program runs, typically the character
  8331. ! code of each character as it is processed.
  8332.   
  8333.   @opindex -version
  8334.   @cindex version number, finding
  8335. - @item -version
  8336.   Prints the version number of the program on standard output.  If a main
  8337.   input file is supplied, processing continues; otherwise, the program
  8338. --- 473,486 ----
  8339.   @cindex progress reports
  8340.   @cindex status reports
  8341. ! @cindex standard output, used for verbose output
  8342. ! @cindex file used for verbose output
  8343.   Prints brief status reports as the program runs, typically the character
  8344. ! code of each character as it is processed.  This usually goes to
  8345. ! standard output; but if the program is outputting other information
  8346. ! there, it goes to standard error.
  8347.   
  8348. + @item -version
  8349.   @opindex -version
  8350.   @cindex version number, finding
  8351.   Prints the version number of the program on standard output.  If a main
  8352.   input file is supplied, processing continues; otherwise, the program
  8353. ***************
  8354. *** 485,492 ****
  8355.   @table @samp
  8356.   
  8357.   @cindex dpi, specifying explicitly
  8358.   @cindex resolution, specifying explicitly
  8359.   @opindex -dpi
  8360. - @item -dpi @var{dpi}
  8361.   Look for the main input font at a resolution of @var{dpi} pixels per
  8362.   inch.  The default is to infer the information from the main input
  8363. --- 494,501 ----
  8364.   @table @samp
  8365.   
  8366. + @item -dpi @var{dpi}
  8367.   @cindex dpi, specifying explicitly
  8368.   @cindex resolution, specifying explicitly
  8369.   @opindex -dpi
  8370.   Look for the main input font at a resolution of @var{dpi} pixels per
  8371.   inch.  The default is to infer the information from the main input
  8372. ***************
  8373. *** 493,498 ****
  8374.   filename (@pxref{Main input file}).
  8375.   
  8376. - @opindex -output-file
  8377.   @item -output-file @var{fname}
  8378.   Write the main output of the program to @var{fname}.  If @var{fname} has
  8379.   a suffix, it is used unchanged; otherwise, it is extended with some
  8380. --- 502,507 ----
  8381.   filename (@pxref{Main input file}).
  8382.   
  8383.   @item -output-file @var{fname}
  8384. + @opindex -output-file
  8385.   Write the main output of the program to @var{fname}.  If @var{fname} has
  8386.   a suffix, it is used unchanged; otherwise, it is extended with some
  8387. ***************
  8388. *** 501,506 ****
  8389.   the current directory.
  8390.   
  8391. - @opindex -range
  8392.   @item -range @code{@var{start}-@var{end}}
  8393.   Only look at the characters between the character codes @var{start} and
  8394.   @var{end}, inclusive.  The default is to look at all characters in the
  8395. --- 510,515 ----
  8396.   the current directory.
  8397.   
  8398.   @item -range @code{@var{start}-@var{end}}
  8399. + @opindex -range
  8400.   Only look at the characters between the character codes @var{start} and
  8401.   @var{end}, inclusive.  The default is to look at all characters in the
  8402. diff -Nrc2 fontutils-0.5/doc/texinfo.tex fontutils-0.6/doc/texinfo.tex
  8403. *** fontutils-0.5/doc/texinfo.tex    Thu Sep  3 14:01:37 1992
  8404. --- fontutils-0.6/doc/texinfo.tex    Wed Oct 14 10:38:39 1992
  8405. ***************
  8406. *** 23,27 ****
  8407.   %what you give them.   Help stamp out software-hoarding!
  8408.   
  8409. ! \def\texinfoversion{2.81/K}
  8410.   \message{Loading texinfo package [Version \texinfoversion]:}
  8411.   \message{}
  8412. --- 23,27 ----
  8413.   %what you give them.   Help stamp out software-hoarding!
  8414.   
  8415. ! \def\texinfoversion{2.87/K}
  8416.   \message{Loading texinfo package [Version \texinfoversion]:}
  8417.   \message{}
  8418. ***************
  8419. *** 301,308 ****
  8420.   \def\@{{\tt \char '100}}
  8421.   
  8422. ! % Define @` and @' to be the same as ` and '
  8423. ! % but suppressing ligatures.
  8424. ! \def\`{{`}}
  8425. ! \def\'{{'}}
  8426.   
  8427.   % Used to generate quoted braces.
  8428. --- 301,310 ----
  8429.   \def\@{{\tt \char '100}}
  8430.   
  8431. ! % This is turned off because it was never documented
  8432. ! % and you can use @w{...} around a quote to suppress ligatures.
  8433. ! %% Define @` and @' to be the same as ` and '
  8434. ! %% but suppressing ligatures.
  8435. ! %\def\`{{`}}
  8436. ! %\def\'{{'}}
  8437.   
  8438.   % Used to generate quoted braces.
  8439. ***************
  8440. *** 341,353 ****
  8441.     \fi
  8442.     %
  8443. !   % If we don't do the \strut ... \nointerlineskip, we wind up with a
  8444. !   % box with a large depth, and hence get (typically) \lineskip leading
  8445. !   % (1pt), instead of the usual interline space (\baselineskip).  See
  8446. !   % p.82 of the TeXbook.
  8447.     \def\Egroup{%
  8448. -     \strut            % Put in the normal leading.
  8449.       \egroup           % End the \vtop.
  8450.       \endgroup         % End the \group.
  8451. -     \nointerlineskip  % We inserted our own leading.
  8452.     }%
  8453.     %
  8454. --- 343,354 ----
  8455.     \fi
  8456.     %
  8457. !   % The \vtop we start below produces a box with large depth; thus, TeX
  8458. !   % puts \baselineskip glue before it, and (when the next line of text
  8459. !   % is done) \lineskip glue after it.  (See p.82 of the TeXbook.)  But
  8460. !   % the next line of text also gets us \parskip glue.  Final result:
  8461. !   % space below is slightly more than space above.
  8462.     \def\Egroup{%
  8463.       \egroup           % End the \vtop.
  8464.       \endgroup         % End the \group.
  8465.     }%
  8466.     %
  8467. ***************
  8468. *** 508,517 ****
  8469.   }
  8470.   
  8471. ! \def\ignore{\begingroup\ignoresections
  8472. ! % Make sure that spaces turn into tokens that match what \ignorexxx wants.
  8473. ! \catcode32=10
  8474. ! \ignorexxx}
  8475. ! \long\def\ignorexxx #1\end ignore{\endgroup\ignorespaces}
  8476.   
  8477.   \def\direntry{\begingroup\direntryxxx}
  8478.   \long\def\direntryxxx #1\end direntry{\endgroup\ignorespaces}
  8479. --- 509,540 ----
  8480.   }
  8481.   
  8482. ! % Ignore @ignore ... @end ignore.
  8483. ! % 
  8484. ! \def\ignore{\doignore{ignore}}
  8485. ! % We ignore @ifinfo text.
  8486. ! % 
  8487. ! \def\ifinfo{\doignore{ifinfo}}
  8488. ! % Ignore text until a line `@end #1'.
  8489. ! % 
  8490. ! \def\doignore#1{\begingroup
  8491. !   % Don't complain about control sequences we have declared \outer.
  8492. !   \ignoresections
  8493. !   %
  8494. !   % Define a command to swallow text until we reach `@end #1'.
  8495. !   \long\def\doignoretext##1\end #1{\enddoignore}%
  8496. !   %
  8497. !   % Make sure that spaces turn into tokens that match what \doignoretext wants.
  8498. !   \catcode32 = 10
  8499. !   %
  8500. !   % And now expand that command.
  8501. !   \doignoretext
  8502. ! }
  8503.   
  8504. + % What we do to finish off ignored text.
  8505. + % 
  8506. + \def\enddoignore{\endgroup\ignorespaces}%
  8507.   \def\direntry{\begingroup\direntryxxx}
  8508.   \long\def\direntryxxx #1\end direntry{\endgroup\ignorespaces}
  8509. ***************
  8510. *** 526,531 ****
  8511.   \temp}
  8512.   \def\Eifset{}
  8513. ! \def\ifsetfail{\begingroup\ignoresections\ifsetfailxxx}
  8514. ! \long\def\ifsetfailxxx #1\end ifset{\endgroup\ignorespaces}
  8515.   
  8516.   \def\ifclear{\begingroup\ignoresections\parsearg\ifclearxxx}
  8517. --- 549,553 ----
  8518.   \temp}
  8519.   \def\Eifset{}
  8520. ! \def\ifsetfail{\doignore{ifset}}
  8521.   
  8522.   \def\ifclear{\begingroup\ignoresections\parsearg\ifclearxxx}
  8523. ***************
  8524. *** 536,541 ****
  8525.   \temp}
  8526.   \def\Eifclear{}
  8527. ! \def\ifclearfail{\begingroup\ignoresections\ifclearfailxxx}
  8528. ! \long\def\ifclearfailxxx #1\end ifclear{\endgroup\ignorespaces}
  8529.   
  8530.   % @set foo
  8531. --- 558,562 ----
  8532.   \temp}
  8533.   \def\Eifclear{}
  8534. ! \def\ifclearfail{\doignore{ifclear}}
  8535.   
  8536.   % @set foo
  8537. ***************
  8538. *** 566,571 ****
  8539.   \def\iftex{}
  8540.   \def\Eiftex{}
  8541. - \def\ifinfo{\begingroup\ignoresections\ifinfoxxx}
  8542. - \long\def\ifinfoxxx #1\end ifinfo{\endgroup\ignorespaces}
  8543.   
  8544.   \long\def\menu #1\end menu{}
  8545. --- 587,590 ----
  8546. ***************
  8547. *** 585,588 ****
  8548. --- 604,611 ----
  8549.   \def\math#1{\implicitmath #1\implicitmath}
  8550.   
  8551. + % @bullet and @minus need the same treatment as @math, just above.
  8552. + \def\bullet{\implicitmath\ptexbullet\implicitmath}
  8553. + \def\minus{\implicitmath-\implicitmath}
  8554.   \def\node{\ENVcheck\parsearg\nodezzz}
  8555.   \def\nodezzz#1{\nodexxx [#1,]}
  8556. ***************
  8557. *** 1221,1227 ****
  8558.   \let\item=\itemizeitem}
  8559.   
  8560. - \def\bullet{$\ptexbullet$}
  8561. - \def\minus{$-$}
  8562.   % Set sfcode to normal for the chars that usually have another value.
  8563.   % These are `.?!:;,'
  8564. --- 1244,1247 ----
  8565. ***************
  8566. *** 1621,1627 ****
  8567.   \line{\secbf#1\hfill}\kern 2pt\penalty10000}}
  8568.   
  8569.   \def\entry #1#2{\begingroup
  8570. !   \parfillskip=0in \parskip=0in \parindent=0in
  8571.     %
  8572.     % Do not prefer a separate line ending with a hyphen to fewer lines.
  8573.     \finalhyphendemerits = 0
  8574. --- 1641,1660 ----
  8575.   \line{\secbf#1\hfill}\kern 2pt\penalty10000}}
  8576.   
  8577. + % This typesets a paragraph consisting of #1, dot leaders, and then #2
  8578. + % flush to the right margin.  It is used for index and table of contents
  8579. + % entries.  The paragraph is indented by \leftskip.
  8580. + % 
  8581.   \def\entry #1#2{\begingroup
  8582. !   %
  8583. !   % Start a new paragraph if necessary, so our assignments below can't
  8584. !   % affect previous text.
  8585. !   \par
  8586. !   %
  8587. !   % Do not fill out the last line with white space.
  8588. !   \parfillskip = 0in
  8589.     %
  8590. +   % No extra space above this paragraph.
  8591. +   \parskip = 0in
  8592. +   %
  8593.     % Do not prefer a separate line ending with a hyphen to fewer lines.
  8594.     \finalhyphendemerits = 0
  8595. ***************
  8596. *** 1861,1865 ****
  8597.   \outer\def\unnumbered{\parsearg\unnumberedzzz}
  8598.   \def\unnumberedzzz #1{\seccheck{unnumbered}%
  8599. ! \secno=0 \subsecno=0 \subsubsecno=0 \message{(#1)}
  8600.   \unnumbchapmacro {#1}%
  8601.   \gdef\thischapter{#1}\gdef\thissection{#1}%
  8602. --- 1894,1911 ----
  8603.   \outer\def\unnumbered{\parsearg\unnumberedzzz}
  8604.   \def\unnumberedzzz #1{\seccheck{unnumbered}%
  8605. ! \secno=0 \subsecno=0 \subsubsecno=0
  8606. ! %
  8607. ! % This used to be simply \message{#1}, but TeX fully expands the
  8608. ! % argument to \message.  Therefore, if #1 contained @-commands, TeX
  8609. ! % expanded them.  For example, in `@unnumbered The @cite{Book}', TeX
  8610. ! % expanded @cite (which turns out to cause errors because \cite is meant
  8611. ! % to be executed, not expanded).  
  8612. ! % 
  8613. ! % Anyway, we don't want the fully-expanded definition of @cite to appear
  8614. ! % as a result of the \message, we just want `@cite' itself.  We use
  8615. ! % \the<toks register> to achieve this: TeX expands \the<toks> only once,
  8616. ! % simply yielding the contents of the <toks register>.
  8617. ! \toks0 = {#1}\message{(\the\toks0)}%
  8618. ! %
  8619.   \unnumbchapmacro {#1}%
  8620.   \gdef\thischapter{#1}\gdef\thissection{#1}%
  8621. ***************
  8622. *** 2231,2237 ****
  8623.   % See comments in \dochapentry re vbox and related settings
  8624.   \def\shortchapentry#1#2#3{%
  8625. !    \vbox{\hyphenpenalty=10000\tolerance=5000
  8626. !     \parindent=0pt\strut\raggedright
  8627. !     {\shortchaplabel{#2}\labelspace #1}\dotfill\doshortpageno{#3}}%
  8628.   }
  8629.   
  8630. --- 2277,2281 ----
  8631.   % See comments in \dochapentry re vbox and related settings
  8632.   \def\shortchapentry#1#2#3{%
  8633. !   \tocentry{\shortchaplabel{#2}\labelspace #1}{\doshortpageno{#3}}%
  8634.   }
  8635.   
  8636. ***************
  8637. *** 2259,2267 ****
  8638.   
  8639.   \def\unnumbchapentry#1#2{\dochapentry{#1}{#2}}
  8640. ! \def\shortunnumberedentry#1#2{%
  8641. !    \vbox{\hyphenpenalty=10000\tolerance=5000
  8642. !     \parindent=0pt\strut\raggedright
  8643. !     #1\dotfill\doshortpageno{#2}}%
  8644. ! }
  8645.   
  8646.   % Sections.
  8647. --- 2303,2307 ----
  8648.   
  8649.   \def\unnumbchapentry#1#2{\dochapentry{#1}{#2}}
  8650. ! \def\shortunnumberedentry#1#2{\tocentry{#1}{\doshortpageno{#2}}}
  8651.   
  8652.   % Sections.
  8653. ***************
  8654. *** 2289,2326 ****
  8655.   \def\dochapentry#1#2{%
  8656.      \penalty-300 \vskip\baselineskip
  8657. !    % This \vbox (and similar ones in dosecentry etc.) used to be a
  8658. !    % \line; changed to permit linebreaks for long headings.  See
  8659. !    % comments above \majorheading.  Here we also use \strut to
  8660. !    % keep the top end of the vbox from jamming up against the previous
  8661. !    % entry in the table of contents.
  8662. !    \vbox{\chapentryfonts
  8663. !      \hyphenpenalty=10000\tolerance=5000 % this line and next introduced
  8664. !      \parindent=0pt\strut\raggedright    % with \line -> \vbox change
  8665. !      #1\dotfill
  8666. !      \dopageno{#2}}%
  8667.      \nobreak\vskip .25\baselineskip
  8668.   }
  8669.   
  8670. ! \def\dosecentry#1#2{%
  8671. !    \vbox{\secentryfonts \leftskip=\tocindent
  8672. !     \hyphenpenalty=10000\tolerance=5000
  8673. !     \parindent=0pt\strut\raggedright #1\dotfill
  8674. !     \dopageno{#2}}%
  8675. ! }
  8676. ! \def\dosubsecentry#1#2{%
  8677. !    \vbox{\subsecentryfonts \leftskip=2\tocindent
  8678. !     \hyphenpenalty=10000\tolerance=5000
  8679. !     \parindent=0pt\strut\raggedright #1\dotfill
  8680. !     \dopageno{#2}}%
  8681. ! }
  8682. ! \def\dosubsubsecentry#1#2{%
  8683. !    \vbox{\subsubsecentryfonts \leftskip=3\tocindent
  8684. !     \hyphenpenalty=10000\tolerance=5000
  8685. !     \parindent=0pt\strut\raggedright #1\dotfill
  8686. !     \dopageno{#2}}%
  8687. ! }
  8688.   
  8689.   % Space between chapter (or whatever) number and the title.
  8690.   \def\labelspace{\hskip1em \relax}
  8691. --- 2329,2364 ----
  8692.   \def\dochapentry#1#2{%
  8693.      \penalty-300 \vskip\baselineskip
  8694. !    \begingroup
  8695. !      \chapentryfonts
  8696. !      \tocentry{#1}{\dopageno{#2}}%
  8697. !    \endgroup
  8698.      \nobreak\vskip .25\baselineskip
  8699.   }
  8700.   
  8701. ! \def\dosecentry#1#2{\begingroup
  8702. !   \secentryfonts \leftskip=\tocindent
  8703. !   \tocentry{#1}{\dopageno{#2}}%
  8704. ! \endgroup}
  8705.   
  8706. + \def\dosubsecentry#1#2{\begingroup
  8707. +   \subsecentryfonts \leftskip=2\tocindent
  8708. +   \tocentry{#1}{\dopageno{#2}}%
  8709. + \endgroup}
  8710. + \def\dosubsubsecentry#1#2{\begingroup
  8711. +   \subsubsecentryfonts \leftskip=3\tocindent
  8712. +   \tocentry{#1}{\dopageno{#2}}%
  8713. + \endgroup}
  8714. + % Final typesetting of a toc entry; we use the same \entry macro as for
  8715. + % the index entries, but we want to suppress hyphenation here.  (We
  8716. + % can't do that in the \entry macro, since index entries might consist
  8717. + % of hyphenated-identifiers-that-do-not-fit-on-a-line-and-nothing-else.)
  8718. + % 
  8719. + \def\tocentry#1#2{\begingroup
  8720. +   \hyphenpenalty = 10000
  8721. +   \entry{#1}{#2}%
  8722. + \endgroup}
  8723.   % Space between chapter (or whatever) number and the title.
  8724.   \def\labelspace{\hskip1em \relax}
  8725. ***************
  8726. *** 2812,2815 ****
  8727. --- 2850,2888 ----
  8728.   \begingroup\obeylines\spacesplit{#3{#4}}}
  8729.   
  8730. + % This is the same as all the others except for the last line.  We need
  8731. + % to parse the arguments differently for @deftp, since the ``attributes''
  8732. + % there are optional.
  8733. + % 
  8734. + \def\deftpparsebody #1#2#3#4 {\begingroup\inENV %
  8735. + \medbreak %
  8736. + % Define the end token that this defining construct specifies
  8737. + % so that it will exit this group.
  8738. + \def#1{\endgraf\endgroup\medbreak}%
  8739. + \def#2##1 {\begingroup\obeylines\spacesplit{#3{##1}}}%
  8740. + \parindent=0in
  8741. + \advance\leftskip by \defbodyindent \advance \rightskip by \defbodyindent
  8742. + \exdentamount=\defbodyindent
  8743. + \begingroup\obeylines\parsetpheaderline{#3{#4}}}
  8744. + {\obeylines %
  8745. +   % Parse the type name and any attributes (field names, etc.).
  8746. +   % #1 is the beginning of the macro call that will produce the output,
  8747. +   %   i.e., \deftpheader{CLASS}; this is passed from \deftpparsebody.
  8748. +   % #2 is the type name, e.g., `struct termios'.
  8749. +   % #3 is the (possibly empty) attribute list.
  8750. +   % 
  8751. +   \gdef\parsetpheaderline#1#2#3^^M{%
  8752. +     \endgroup % Started in \deftpparsebody.
  8753. +     %
  8754. +     % If the attribute list is in fact empty, there will be no space after
  8755. +     % #2; so we can't put a space in our TeX parameter list.  But if it
  8756. +     % isn't empty, then #3 will begin with an unwanted space.
  8757. +     \def\theargs{\ignorespaces #3}%
  8758. +     %
  8759. +     % Call the macro to produce the output.
  8760. +     #1{#2}\theargs %
  8761. +   }%
  8762. + }
  8763.   \def\defopvarparsebody #1#2#3#4#5 {\begingroup\inENV %
  8764.   \medbreak %
  8765. ***************
  8766. *** 3069,3073 ****
  8767.   % @deftp Class window height width ...
  8768.   
  8769. ! \def\deftp{\defvrparsebody\Edeftp\deftpx\deftpheader}
  8770.   
  8771.   \def\deftpheader #1#2#3{\doind {tp}{\code{#2}}%
  8772. --- 3142,3146 ----
  8773.   % @deftp Class window height width ...
  8774.   
  8775. ! \def\deftp{\deftpparsebody\Edeftp\deftpx\deftpheader}
  8776.   
  8777.   \def\deftpheader #1#2#3{\doind {tp}{\code{#2}}%
  8778. ***************
  8779. *** 3317,3320 ****
  8780. --- 3390,3447 ----
  8781.   }%end \catcode `\@=11
  8782.   
  8783. + % Set the baselineskip to #1, and the lineskip and strut size
  8784. + % correspondingly.  There is no deep meaning behind these magic numbers
  8785. + % used as factors; they just match (closely enough) what Knuth defined.
  8786. + % 
  8787. + \def\lineskipfactor{.1}
  8788. + \def\strutheightpercent{.71}
  8789. + \def\strutdepthpercent{.29}
  8790. + %
  8791. + \def\setleading#1{%
  8792. +   \baselineskip = #1\relax
  8793. +   \normalbaselineskip = \baselineskip
  8794. +   \lineskip = \lineskipfactor\baselineskip
  8795. +   \setbox\strutbox =\hbox{%
  8796. +     \vrule width0pt height\strutheightpercent\baselineskip
  8797. +                     depth \strutdepthpercent \baselineskip
  8798. +   }%
  8799. + }
  8800. + % @| inserts a changebar to the left of the current line.  It should
  8801. + % surround any changed text.  This approach does *not* work if the
  8802. + % change spans more than two lines of output.  To handle that, we would
  8803. + % have adopt a much more difficult approach (putting marks into the main
  8804. + % vertical list for the beginning and end of each change).
  8805. + % 
  8806. + \def\|{%
  8807. +   % \vadjust can only be used in horizontal mode.
  8808. +   \leavevmode
  8809. +   %
  8810. +   % Append this vertical mode material after the current line in the output.
  8811. +   \vadjust{%
  8812. +     % We want to insert a rule with the height and depth of the current
  8813. +     % leading; that is exactly what \strutbox is supposed to record.
  8814. +     \vskip-\baselineskip
  8815. +     %
  8816. +     % \vadjust-items are inserted at the left edge of the type.  So
  8817. +     % the \llap here moves out into the left-hand margin.
  8818. +     \llap{%
  8819. +       %
  8820. +       % For a thicker or thinner bar, change the `1pt'.
  8821. +       \vrule height\baselineskip width1pt
  8822. +       %
  8823. +       % This is the space between the bar and the text.
  8824. +       \hskip 12pt
  8825. +     }%
  8826. +   }%
  8827. + }
  8828. + % For a final copy, take out the rectangles
  8829. + % that mark overfull boxes (in case you have decided
  8830. + % that the text looks ok even though it passes the margin).
  8831. + % 
  8832. + \def\finalout{\overfullrule=0pt}
  8833.   % End of control word definitions.
  8834.   
  8835. ***************
  8836. *** 3336,3340 ****
  8837.   \parindent = \defaultparindent
  8838.   \parskip 3pt plus2pt minus2pt
  8839. ! \baselineskip 13pt
  8840.   \advance\topskip by 1.2cm
  8841.   
  8842. --- 3463,3467 ----
  8843.   \parindent = \defaultparindent
  8844.   \parskip 3pt plus2pt minus2pt
  8845. ! \setleading{13pt}
  8846.   \advance\topskip by 1.2cm
  8847.   
  8848. ***************
  8849. *** 3365,3369 ****
  8850.   
  8851.   \global\lispnarrowing = 0.3in
  8852. ! \global\baselineskip 12pt
  8853.   \advance\topskip by -1cm
  8854.   \global\parskip 3pt plus 1pt
  8855. --- 3492,3496 ----
  8856.   
  8857.   \global\lispnarrowing = 0.3in
  8858. ! \setleading{12pt}
  8859.   \advance\topskip by -1cm
  8860.   \global\parskip 3pt plus 1pt
  8861. ***************
  8862. *** 3386,3390 ****
  8863.   \global\tolerance=700
  8864.   \global\hfuzz=1pt
  8865. ! \global\baselineskip=12pt
  8866.   \global\parskip 15pt plus 1pt
  8867.   
  8868. --- 3513,3517 ----
  8869.   \global\tolerance=700
  8870.   \global\hfuzz=1pt
  8871. ! \setleading{12pt}
  8872.   \global\parskip 15pt plus 1pt
  8873.   
  8874. ***************
  8875. *** 3401,3409 ****
  8876.   \global\pageheight=\vsize
  8877.   }
  8878. - %% For a final copy, take out the rectangles
  8879. - %% that mark overfull boxes (in case you have decided
  8880. - %% that the text looks ok even though it passes the margin).
  8881. - \def\finalout{\overfullrule=0pt}
  8882.   
  8883.   % Define macros to output various characters with catcode for normal text.
  8884. --- 3528,3531 ----
  8885. diff -Nrc2 fontutils-0.5/fontconvert/.gdbinit fontutils-0.6/fontconvert/.gdbinit
  8886. *** fontutils-0.5/fontconvert/.gdbinit    Mon Aug 24 15:35:27 1992
  8887. --- fontutils-0.6/fontconvert/.gdbinit    Fri Oct 23 12:10:33 1992
  8888. ***************
  8889. *** 116,120 ****
  8890.   #      -fontdimens space:11.5  ../ourfonts/ggmr26b
  8891.   
  8892. - #set args -range a-a -space=32 ../gsrenderfont/phvr.300 -gf -out phvr.300gf
  8893.   #set args -tfm -verbose ../ourfonts/bodoni/gbdrsp.1200
  8894.   #set args -verbose -tfm ../imageto/slashsp.1200
  8895. --- 116,119 ----
  8896. ***************
  8897. *** 152,160 ****
  8898.   
  8899.   # Get adobe's characters and set designsize (as with ring above) for for them.
  8900. ! set args -verbose -tfm -gf -dpi 1200 -encoding gnulatin \
  8901. !   -omit "`cat /w/ourfonts/garamond/r/adobe/adobe.omt`" \
  8902. !   -designsize 12.413793103 \
  8903. !   -output-file   /w/ourfonts/garamond/r/adobe/adobe \
  8904. !   /w/ourfonts/garamond/r/adobe/adobe10
  8905.   
  8906. ! set args -random=5 -random-threshold=.5 -gf -tfm cmr10  -output-file=r
  8907. --- 151,159 ----
  8908.   
  8909.   # Get adobe's characters and set designsize (as with ring above) for for them.
  8910. ! #set args -verbose -tfm -gf -dpi 1200 -encoding gnulatin \
  8911. ! #  -omit "`cat /w/ourfonts/garamond/r/adobe/adobe.omt`" \
  8912. ! #  -designsize 12.413793103 \
  8913. ! #  -output-file   /w/ourfonts/garamond/r/adobe/adobe \
  8914. ! #  /w/ourfonts/garamond/r/adobe/adobe10
  8915.   
  8916. ! set args -verbose -tfm ../gsrenderfont/cmr.300
  8917. diff -Nrc2 fontutils-0.5/fontconvert/ChangeLog fontutils-0.6/fontconvert/ChangeLog
  8918. *** fontutils-0.5/fontconvert/ChangeLog    Thu Sep  3 09:30:31 1992
  8919. --- fontutils-0.6/fontconvert/ChangeLog    Tue Oct 27 13:02:50 1992
  8920. ***************
  8921. *** 1,2 ****
  8922. --- 1,43 ----
  8923. + Tue Oct 27 13:01:55 1992  Karl Berry  (karl@cs.umb.edu)
  8924. +     * Version 0.6.
  8925. + Fri Oct 23 14:15:22 1992  Karl Berry  (karl@cs.umb.edu)
  8926. +     * main.c (main): Remove the -space option.
  8927. +         * output-gf.c (gf_finish_output): And remove the code that
  8928. +           implemented it.
  8929. +         (space_char): And this global.
  8930. +         * output-gf.h (space_char): And the decl.
  8931. + Tue Oct 20 11:54:55 1992  Karl Berry  (karl@cs.umb.edu)
  8932. +     * main.c (main): Change the reporting so the space or newline
  8933. +     comes before the character, not after.
  8934. +     * main.c (main): Don't remove the suffix when making the output
  8935. +     filename, as we already did; pass the input name to
  8936. +     `gf_start_output', not the full bitmap filename.
  8937. + Mon Oct  5 10:12:03 1992  Karl Berry  (karl@cs.umb.edu)
  8938. +     * main.c (read_command_line): If -text is given, set `report_file'
  8939. +     to stderr.
  8940. + Sun Oct  4 14:03:53 1992  Karl Berry  (karl@cs.umb.edu)
  8941. +     * output-tfm.c (tfm_start_output): Report the TFM filename if we
  8942. +     are reading one.
  8943. +     * main.c (main): Report the full pathname of the font, not just
  8944. +     what the user gave us.
  8945. +     * main.c (main): Call `tfm_finish_output' before `gf_finish_output'.
  8946. + Tue Sep 22 16:30:25 1992  Karl Berry  (karl@cs.umb.edu)
  8947. +         * output-gf.c (gf_finish_output): output a newline after the space
  8948. +           char's code.
  8949.   Thu Sep  3 09:30:31 1992  Karl Berry  (karl@hayley)
  8950.   
  8951. diff -Nrc2 fontutils-0.5/fontconvert/M.depend fontutils-0.6/fontconvert/M.depend
  8952. *** fontutils-0.5/fontconvert/M.depend    Wed Sep  2 17:20:46 1992
  8953. --- fontutils-0.6/fontconvert/M.depend    Sun Oct 25 14:16:00 1992
  8954. ***************
  8955. *** 26,31 ****
  8956.     .././include/c-seek.h .././include/c-proto.h .././include/global.h .././include/lib.h \
  8957.     .././include/types.h .././include/filename.h random.h .././include/bitmap.h \
  8958. !   .././include/bounding-box.h .././include/tfm.h .././include/fix-num.h .././include/list.h \
  8959. !   filter.h main.h .././include/font.h output-tfm.h 
  8960.   random.o : random.c .././include/config.h .././include/c-auto.h .././include/c-std.h \
  8961.     .././include/c-memstr.h .././include/c-errno.h .././include/c-minmax.h .././include/c-limits.h \
  8962. --- 26,31 ----
  8963.     .././include/c-seek.h .././include/c-proto.h .././include/global.h .././include/lib.h \
  8964.     .././include/types.h .././include/filename.h random.h .././include/bitmap.h \
  8965. !   .././include/bounding-box.h .././include/report.h .././include/tfm.h .././include/fix-num.h \
  8966. !   .././include/list.h filter.h main.h .././include/font.h output-tfm.h 
  8967.   random.o : random.c .././include/config.h .././include/c-auto.h .././include/c-std.h \
  8968.     .././include/c-memstr.h .././include/c-errno.h .././include/c-minmax.h .././include/c-limits.h \
  8969. diff -Nrc2 fontutils-0.5/fontconvert/main.c fontutils-0.6/fontconvert/main.c
  8970. *** fontutils-0.5/fontconvert/main.c    Sun Aug 23 14:38:30 1992
  8971. --- fontutils-0.6/fontconvert/main.c    Fri Oct 23 14:16:05 1992
  8972. ***************
  8973. *** 135,141 ****
  8974.   
  8975.     /* If no output name was specified on the command line, use the root
  8976. !      part of the input name.  */
  8977.     if (output_name == NULL)
  8978. !     output_name = remove_suffix (basename (font_name));
  8979.   
  8980.     if (wants_gf && wants_tfm && find_suffix (output_name) != NULL)
  8981. --- 135,142 ----
  8982.   
  8983.     /* If no output name was specified on the command line, use the root
  8984. !      part of the input name.  We've already removed the suffix in
  8985. !      `read_command_line'.  */
  8986.     if (output_name == NULL)
  8987. !     output_name = basename (font_name);
  8988.   
  8989.     if (wants_gf && wants_tfm && find_suffix (output_name) != NULL)
  8990. ***************
  8991. *** 150,154 ****
  8992.       epsf_start_output (output_name);
  8993.     if (wants_gf)
  8994. !     gf_start_output (BITMAP_FONT_FILENAME (f), output_name, dpi,
  8995.                        BITMAP_FONT_COMMENT (f)); 
  8996.     if (wants_tfm)
  8997. --- 151,155 ----
  8998.       epsf_start_output (output_name);
  8999.     if (wants_gf)
  9000. !     gf_start_output (font_name, output_name, dpi,
  9001.                        BITMAP_FONT_COMMENT (f)); 
  9002.     if (wants_tfm)
  9003. ***************
  9004. *** 173,177 ****
  9005.           tfm_start_font (font_name);
  9006.           
  9007. !       REPORT1 ("(%s\n", font_name);
  9008.         
  9009.         /* The main loop: convert each character.  */
  9010. --- 174,178 ----
  9011.           tfm_start_font (font_name);
  9012.           
  9013. !       REPORT1 ("(%s", BITMAP_FONT_FILENAME (f));
  9014.         
  9015.         /* The main loop: convert each character.  */
  9016. ***************
  9017. *** 182,186 ****
  9018.             if (c == NULL) continue;
  9019.   
  9020. !           REPORT1 ("[%u", code);
  9021.   
  9022.             if (omit[code])
  9023. --- 183,187 ----
  9024.             if (c == NULL) continue;
  9025.   
  9026. !           REPORT2 ("%c[%u", ++char_count % 8 ? ' ' : '\n', code);
  9027.   
  9028.             if (omit[code])
  9029. ***************
  9030. *** 196,200 ****
  9031.               }
  9032.   
  9033. !           REPORT1 ("]%c", ++char_count % 8 ? ' ' : '\n');
  9034.           }
  9035.   
  9036. --- 197,201 ----
  9037.               }
  9038.   
  9039. !           REPORT ("]");
  9040.           }
  9041.   
  9042. ***************
  9043. *** 205,213 ****
  9044.     if (wants_epsf)
  9045.       epsf_finish_output ();
  9046. !   if (wants_gf)
  9047. !     gf_finish_output (design_size, atof (dpi));
  9048.     if (wants_tfm)
  9049.       tfm_finish_output ();
  9050.   
  9051.     return 0;
  9052.   }
  9053. --- 206,219 ----
  9054.     if (wants_epsf)
  9055.       epsf_finish_output ();
  9056. !   /* We must finish the TFM output before GF, because `gf_finish_output'
  9057. !      might want to open a TFM file -- and we can only have one TFM file
  9058. !      open at a time.  (Because we haven't rewritten the TFM library.)  */
  9059.     if (wants_tfm)
  9060.       tfm_finish_output ();
  9061.   
  9062. +   if (wants_gf)
  9063. +     gf_finish_output (design_size, atof (dpi));
  9064.     return 0;
  9065.   }
  9066. ***************
  9067. *** 413,419 ****
  9068.   remap <char1>:<char2>,<char1>:<char2>,...: for each pair, make the input
  9069.     character with code <char1> have code <char2> in the output.
  9070. - space [<char>]: if writing a GF file, output a character the width of the
  9071. -   interword space from the TFM file at position <char>.  The default for
  9072. -   <char> is 32.
  9073.   text: output the font to stdout as plain text, using `*'s and ` 's.
  9074.   tfm: write a TFM file to `<font_name>.tfm'.
  9075. --- 419,422 ----
  9076. ***************
  9077. *** 457,461 ****
  9078.           { "range",        1, 0, 0 },
  9079.           { "remap",        1, 0, 0 },
  9080. -         { "space",        2, 0, 0 },
  9081.           { "text",        0, (int *) &wants_text, 1 },
  9082.           { "tfm",        0, (int *) &wants_tfm, 1 },
  9083. --- 460,463 ----
  9084. ***************
  9085. *** 544,550 ****
  9086.           scan_remap_list (optarg);
  9087.   
  9088. !       else if (ARGUMENT_IS ("space"))
  9089. !         space_char = optarg ? xparse_charspec (optarg, encoding_info) : 32;
  9090. !         
  9091.         else if (ARGUMENT_IS ("tfm-header"))
  9092.           tfm_header = optarg;
  9093. --- 546,552 ----
  9094.           scan_remap_list (optarg);
  9095.   
  9096. !       else if (ARGUMENT_IS ("text"))
  9097. !         report_file = stderr;
  9098.         else if (ARGUMENT_IS ("tfm-header"))
  9099.           tfm_header = optarg;
  9100. ***************
  9101. *** 558,563 ****
  9102.     FINISH_COMMAND_LINE ();
  9103.   }
  9104.   /* The string S specifies baseline adjustments for individual
  9105.      characters: `<charcode>:<adjustment>,...'.  We set the element
  9106. --- 560,564 ----
  9107.     FINISH_COMMAND_LINE ();
  9108.   }
  9109.   /* The string S specifies baseline adjustments for individual
  9110.      characters: `<charcode>:<adjustment>,...'.  We set the element
  9111. diff -Nrc2 fontutils-0.5/fontconvert/output-gf.c fontutils-0.6/fontconvert/output-gf.c
  9112. *** fontutils-0.5/fontconvert/output-gf.c    Fri Jun  5 14:41:02 1992
  9113. --- fontutils-0.6/fontconvert/output-gf.c    Fri Oct 23 14:16:05 1992
  9114. ***************
  9115. *** 25,32 ****
  9116.   #include "output-gf.h"
  9117.   
  9118. - /* If not -1, specifies the charcode at which to output an invisible
  9119. -    char the width of an interword space.  (-space) */
  9120. - int space_char = -1;
  9121.   /* The basename of the input file.  */
  9122.   static string input_basename;
  9123. --- 25,28 ----
  9124. ***************
  9125. *** 77,82 ****
  9126.   }
  9127.   
  9128. ! /* Write the space character, if desired, and then the postamble and
  9129. !    close the file.  */
  9130.   
  9131.   void
  9132. --- 73,78 ----
  9133.   }
  9134.   
  9135. ! /* Write the postamble and close the file.  */
  9136.   
  9137.   void
  9138. ***************
  9139. *** 83,110 ****
  9140.   gf_finish_output (real design_size, real dpi)
  9141.   {
  9142. -   if (space_char != -1)
  9143. -     {
  9144. -       string tfm_name = find_tfm_filename (input_basename);
  9145. -       
  9146. -       if (tfm_name != NULL && tfm_open_input_file (tfm_name))
  9147. -         {
  9148. -           char_info_type c;
  9149. -           real space_width = tfm_get_interword_space ();
  9150. -           
  9151. -           tfm_close_input_file ();
  9152. -           
  9153. -           CHARCODE (c) = space_char;
  9154. -           BITMAP_WIDTH (CHAR_BITMAP (c)) = 0;
  9155. -           BITMAP_HEIGHT (CHAR_BITMAP (c)) = 0;
  9156. -           CHAR_BB (c) = ((bounding_box_type) { 0, 0, 0, 0 });
  9157. -           CHAR_SET_WIDTH (c) = POINTS_TO_PIXELS (space_width, dpi);
  9158. -           CHAR_TFM_WIDTH (c) = real_to_fix (space_width / design_size);
  9159. -           REPORT1 ("[%d]", space_char);
  9160. -           gf_output_char (c, 1.0);
  9161. -         }
  9162. -       else
  9163. -         WARNING ("I can't output a space character without a TFM file");
  9164. -     }
  9165. -     
  9166.     gf_put_postamble (real_to_fix (design_size), dpi, dpi);
  9167.     gf_close_output_file ();
  9168. --- 79,82 ----
  9169. diff -Nrc2 fontutils-0.5/fontconvert/output-gf.h fontutils-0.6/fontconvert/output-gf.h
  9170. *** fontutils-0.5/fontconvert/output-gf.h    Wed Apr  8 15:17:00 1992
  9171. --- fontutils-0.6/fontconvert/output-gf.h    Fri Oct 23 14:16:05 1992
  9172. ***************
  9173. *** 23,29 ****
  9174.   #include "font.h"
  9175.   
  9176. - /* See output-gf.c.  */
  9177. - extern int space_char;
  9178.   /* Initialize GF output, output a character, and finish it up.  */
  9179.   extern void gf_start_output
  9180. --- 23,26 ----
  9181. diff -Nrc2 fontutils-0.5/fontconvert/output-tfm.c fontutils-0.6/fontconvert/output-tfm.c
  9182. *** fontutils-0.5/fontconvert/output-tfm.c    Sun Jun 14 08:50:18 1992
  9183. --- fontutils-0.6/fontconvert/output-tfm.c    Sun Oct  4 14:41:45 1992
  9184. ***************
  9185. *** 21,24 ****
  9186. --- 21,25 ----
  9187.   #include "filename.h"
  9188.   #include "random.h"
  9189. + #include "report.h"
  9190.   #include "tfm.h"
  9191.   
  9192. ***************
  9193. *** 99,102 ****
  9194. --- 100,105 ----
  9195.         have_file_info = true;
  9196.   
  9197. +       REPORT1 ("Reading %s.\n", input_tfm_name);
  9198. +       
  9199.         /* Never carry along the checksum.  */
  9200.         TFM_CHECKSUM (tfm_info) = 0;
  9201. diff -Nrc2 fontutils-0.5/fontconvert/version.c fontutils-0.6/fontconvert/version.c
  9202. *** fontutils-0.5/fontconvert/version.c    Thu Sep  3 09:46:20 1992
  9203. --- fontutils-0.6/fontconvert/version.c    Tue Oct 27 13:27:59 1992
  9204. ***************
  9205. *** 1 ****
  9206. ! char *version_string = "fontconvert version 0.5";
  9207. --- 1 ----
  9208. ! char *version_string = "fontconvert version 0.6";
  9209. diff -Nrc2 fontutils-0.5/gf/ChangeLog fontutils-0.6/gf/ChangeLog
  9210. *** fontutils-0.5/gf/ChangeLog    Thu Sep  3 09:30:43 1992
  9211. --- fontutils-0.6/gf/ChangeLog    Tue Oct 27 13:02:51 1992
  9212. ***************
  9213. *** 1,2 ****
  9214. --- 1,11 ----
  9215. + Tue Oct 27 12:56:09 1992  Karl Berry  (karl@cs.umb.edu)
  9216. +     * Version 0.6.
  9217. + Mon Sep 21 13:20:29 1992  Karl Berry  (karl@cs.umb.edu)
  9218. +         * gf_output.c (start_put_char): don't claim we are part of the
  9219. +           nonexistent put_gf_char in the warning.
  9220.   Thu Sep  3 09:30:43 1992  Karl Berry  (karl@hayley)
  9221.   
  9222. diff -Nrc2 fontutils-0.5/gf/gf_output.c fontutils-0.6/gf/gf_output.c
  9223. *** fontutils-0.5/gf/gf_output.c    Sat Jun  6 10:05:21 1992
  9224. --- fontutils-0.6/gf/gf_output.c    Mon Sep 21 13:23:23 1992
  9225. ***************
  9226. *** 224,228 ****
  9227.     if (this_char_loc->char_pointer != NULL_BYTE_PTR)
  9228.       {
  9229. !       WARNING1 ("put_gf_char: Character %u already output", charcode);
  9230.         return;
  9231.       }
  9232. --- 224,228 ----
  9233.     if (this_char_loc->char_pointer != NULL_BYTE_PTR)
  9234.       {
  9235. !       WARNING1 ("gf_put_char: Character %u already output", charcode);
  9236.         return;
  9237.       }
  9238. diff -Nrc2 fontutils-0.5/gsrenderfont/.gdbinit fontutils-0.6/gsrenderfont/.gdbinit
  9239. *** fontutils-0.5/gsrenderfont/.gdbinit    Wed Apr 15 08:23:54 1992
  9240. --- fontutils-0.6/gsrenderfont/.gdbinit    Fri Oct 23 15:03:58 1992
  9241. ***************
  9242. *** 7,9 ****
  9243.   end
  9244.   
  9245. ! set args -verbose pncri
  9246. --- 7,9 ----
  9247.   end
  9248.   
  9249. ! set args -verbose -trace psyr>/tmp/out
  9250. diff -Nrc2 fontutils-0.5/gsrenderfont/ChangeLog fontutils-0.6/gsrenderfont/ChangeLog
  9251. *** fontutils-0.5/gsrenderfont/ChangeLog    Thu Sep  3 15:34:26 1992
  9252. --- fontutils-0.6/gsrenderfont/ChangeLog    Tue Oct 27 13:02:50 1992
  9253. ***************
  9254. *** 1,2 ****
  9255. --- 1,143 ----
  9256. + Tue Oct 27 13:01:59 1992  Karl Berry  (karl@cs.umb.edu)
  9257. +     * Version 0.6.
  9258. + Sat Oct 24 05:03:22 1992  Karl Berry  (karl@cs.umb.edu)
  9259. +     * gsrf.in: Don't give -encoding to imageto if the user didn't give
  9260. +     us an encoding.
  9261. + Fri Oct 23 07:30:20 1992  Karl Berry  (karl@cs.umb.edu)
  9262. +     * writefont.PS (find-encoding): New routine.
  9263. +     * gsrf.in: Pass a sentinel to use the input encoding by default.
  9264. +     * gsrf.in: Take only the first occurrence in the map file.
  9265. +     * GNUmakefile (extraclean): Remove all the temp files we might create.
  9266. +     * input-pbm.c (pbm_get_block): Go back to finding the first
  9267. +     all-white row after the block.  Will I ever learn?  We are now
  9268. +     almost entirely back to the original code, except that we only
  9269. +     skip at most BLANK_COUNT white rows.  If I had just fixed that bug
  9270. +     in the first place, I would have been done three days ago.
  9271. +     * writefont.PS (set-char-variables): We can output /space now.
  9272. +         (output-space-char, number-buffer): Delete.
  9273. +         * gsrf.in: Don't do the fontconvert -space stuff.
  9274. +     * input-pbm.c (pbm_get_block): Don't read the blank rows into the
  9275. +     bitmap we return.
  9276. +     * writefont.PS (compute-max-char-dimens): Round char-height when
  9277. +     moving, so the character doesn't get out of its block.
  9278. +     * input-pbm.c (get_row): Go back to stdout for the scanline trace.
  9279. +     * input-pbm.c (pbm_get_block): Rewrite to read a constant number
  9280. +     of scanlines.
  9281. +     * main.c: Doc fix.
  9282. + Thu Oct 22 14:49:08 1992  Karl Berry  (karl@cs.umb.edu)
  9283. +     * writefont.PS (compute-max-char-dimens): convert
  9284. +     max-char-tall-in-pixels to an integer after computing it.
  9285. +     * input-pbm.c (get_row): Output scanline trace to stderr.
  9286. +     * main.c (main): Handle extensions as we do in other programs.
  9287. +     * writefont.PS: Use `incr' where appropriate (forgot we had it!).
  9288. +     * writefont.PS (encoding-chars-present-3): Set the current point
  9289. +     before trying to render anything.
  9290. +     * writefont.PS (type3-setfont): Copy the dictionary before calling
  9291. +     definefont.
  9292. +     * writefont.PS (encoding-chars-present-3): Pass the character code
  9293. +     to be rendered, not the character name.
  9294. + Wed Oct 21 08:40:02 1992  Karl Berry  (karl@cs.umb.edu)
  9295. +     * writefont.PS (type3-render-p, type3-setfont,
  9296. +     encoding-chars-present{,-[13]}): New routines.
  9297. +         (reencode-font): Set the new encoding to only those characters
  9298. +         which are actually present in the font, as far as we can tell.
  9299. + Tue Oct 20 10:12:44 1992  Karl Berry  (karl@cs.umb.edu)
  9300. +     * GNUmakefile (install): Make second arg a directory, not a file.
  9301. +     * writefont.PS (set-font): Don't define `font-charstrings', since
  9302. +     not all fonts have it.
  9303. +     * writefont.PS (concat-strings): Use Ghostscript's predefined
  9304. +     concatstrings instead.
  9305. +     * gsrf.in (-output-file): New option.
  9306. +         (filename): Rename to `output_file'; default to new variable
  9307. +         `input_file'; pass it to Ghostscript.
  9308. +         * writefont.PS (font-basename): Rename to `output-filename'.
  9309. +         (input-filename): New argument to program.
  9310. +         (reencode-file): Read input-filename if the fontname is unknown to GS.
  9311. +     * gsrf.in: Specify ./<filename> to gftopk.
  9312. +     * gsrf.in: Specify the .pbm extension explicitly to imageto, in
  9313. +     case the filename has a `.' in it.
  9314. +     * main.c (main): Output to standard output if no output file is
  9315. +     specified.
  9316. +         (read_command_line): Output the version info to stderr.
  9317. +         * gsrf.in: Redirect output from bbcount.
  9318. +     * gsrf.in: Require both a filename and a fontname to be present,
  9319. +     and give appropriate error messages.
  9320. +     * gsrf.in: Echo the invocation of Ghostscript if we are verbose.
  9321. + Sat Oct 17 08:36:45 1992  Karl Berry  (karl@cs.umb.edu)
  9322. +     * writefont.PS (set-font): Do `setfont' after `scalefont'.
  9323. +     * writefont.PS (reencode-font): Test for the various keys we don't
  9324. +     copy properly -- we were dup'ing the truth value.
  9325. + Sun Oct 11 15:14:27 1992  Karl Berry  (karl@cs.umb.edu)
  9326. +     * writefont.PS (set-font): Use findfont scalefont instead of
  9327. +     selectfont, in case Ghostscript wasn't installed with level 2 features.
  9328. + Sun Oct  4 09:42:25 1992  Karl Berry  (karl@cs.umb.edu)
  9329. +     * writefont.PS (baseline-adjustment): Negate the depth.
  9330. +     * gsrf.in: Remove a PK file so fontconvert will always read the
  9331. +     newly-output GF file.
  9332. +     * gsrf.in: Don't pass -clean-threshold to imageto, since it's no
  9333. +     longer an option.
  9334. +     * main.c (main): `bounding_box_list_type' is now `bb_list_type'.
  9335. + Tue Sep 22 14:50:47 1992  Karl Berry  (karl@cs.umb.edu)
  9336. +         * gsrf.in: specify -clean-threshold=100, so we don't throw away
  9337. +           parts of our characters.
  9338. + Mon Sep 21 13:00:57 1992  Karl Berry  (karl@cs.umb.edu)
  9339. +         * gsrf.in: use -eq, not =, to see if we should make a space character.
  9340. +         * gsrf.in: if verbose, do not specify -q to gs.
  9341. + Mon Sep 14 09:30:16 1992  Karl Berry  (karl@hayley)
  9342. +         * GNUmakefile (gsrenderfont): make readonly.
  9343. +         * GNUmakefile (check): depend on bbcount.
  9344.   Thu Sep  3 09:30:47 1992  Karl Berry  (karl@hayley)
  9345.   
  9346. diff -Nrc2 fontutils-0.5/gsrenderfont/GNUmakefile fontutils-0.6/gsrenderfont/GNUmakefile
  9347. *** fontutils-0.5/gsrenderfont/GNUmakefile    Thu Sep  3 15:34:26 1992
  9348. --- fontutils-0.6/gsrenderfont/GNUmakefile    Sat Oct 24 04:54:39 1992
  9349. ***************
  9350. *** 30,40 ****
  9351.   
  9352.   gsrenderfont: gsrf.in
  9353.       sed -e "s,replace-with-lib-path,$(default_lib_path)," $< > $@
  9354.       chmod +x $@
  9355.   
  9356.   install::
  9357. !     $(INSTALL_PROGRAM) gsrenderfont $(bindir)
  9358. !     $(INSTALL_DATA) fixifibb.awk $(fu_datadir)
  9359. !     $(INSTALL_DATA) writefont.PS $(fu_datadir)
  9360.   
  9361.   dist::
  9362. --- 30,42 ----
  9363.   
  9364.   gsrenderfont: gsrf.in
  9365. +     rm -f $@
  9366.       sed -e "s,replace-with-lib-path,$(default_lib_path)," $< > $@
  9367. +     chmod a-w $@
  9368.       chmod +x $@
  9369.   
  9370.   install::
  9371. !     $(INSTALL_PROGRAM) gsrenderfont $(bindir)/gsrenderfont
  9372. !     $(INSTALL_DATA) fixifibb.awk $(fu_datadir)/fixifibb.awk
  9373. !     $(INSTALL_DATA) writefont.PS $(fu_datadir)/writefont.PS
  9374.   
  9375.   dist::
  9376. ***************
  9377. *** 43,49 ****
  9378.   include M.depend
  9379.   
  9380. ! check: gsrenderfont
  9381. !     gsrenderfont -verbose -version -font Times-Roman
  9382.   
  9383.   distclean::
  9384.       rm -f gsrenderfont
  9385. --- 45,56 ----
  9386.   include M.depend
  9387.   
  9388. ! check: gsrenderfont bbcount
  9389. !     rm -f Style.tfm Style.300*
  9390. !     gsrenderfont -verbose -version Style.ps -font=Style
  9391. !     fontconvert -tfm ./Style.300
  9392.   
  9393.   distclean::
  9394.       rm -f gsrenderfont
  9395. + extraclean::
  9396. +     rm -f *.xifi *.bfi *.pbm *.bbs *.pl *.ifi
  9397. diff -Nrc2 fontutils-0.5/gsrenderfont/M.depend fontutils-0.6/gsrenderfont/M.depend
  9398. *** fontutils-0.5/gsrenderfont/M.depend    Wed Sep  2 17:20:48 1992
  9399. --- fontutils-0.6/gsrenderfont/M.depend    Sun Oct 25 14:16:02 1992
  9400. ***************
  9401. *** 7,12 ****
  9402.     .././include/c-memstr.h .././include/c-errno.h .././include/c-minmax.h .././include/c-limits.h \
  9403.     .././include/c-seek.h .././include/c-proto.h .././include/global.h .././include/lib.h \
  9404. !   .././include/types.h .././include/bb-outline.h .././include/bitmap.h .././include/bounding-box.h \
  9405. !   .././include/cmdline.h .././include/filename.h .././include/getopt.h .././include/report.h \
  9406. !   input-pbm.h 
  9407.   version.o : version.c 
  9408. --- 7,12 ----
  9409.     .././include/c-memstr.h .././include/c-errno.h .././include/c-minmax.h .././include/c-limits.h \
  9410.     .././include/c-seek.h .././include/c-proto.h .././include/global.h .././include/lib.h \
  9411. !   .././include/types.h .././include/bb-outline.h .././include/bb-list.h .././include/bounding-box.h \
  9412. !   .././include/bitmap.h .././include/cmdline.h .././include/filename.h .././include/getopt.h \
  9413. !   .././include/report.h input-pbm.h 
  9414.   version.o : version.c 
  9415. diff -Nrc2 fontutils-0.5/gsrenderfont/gsrf.in fontutils-0.6/gsrenderfont/gsrf.in
  9416. *** fontutils-0.5/gsrenderfont/gsrf.in    Thu Sep  3 09:46:18 1992
  9417. --- fontutils-0.6/gsrenderfont/gsrf.in    Tue Oct 27 13:27:57 1992
  9418. ***************
  9419. *** 2,9 ****
  9420.   # 
  9421.   # Shell script to invoke Ghostscript on a font, create an image, and
  9422. ! # then run imagetofont to get a bitmap font.  (Can then run
  9423. ! # fontconvert to get a tfm.)
  9424.   
  9425. ! version=0.5
  9426.   
  9427.   # Set defaults.
  9428. --- 2,9 ----
  9429.   # 
  9430.   # Shell script to invoke Ghostscript on a font, create an image, and
  9431. ! # then run imagetofont to get a bitmap font.  (You can then run
  9432. ! # fontconvert to get a tfm if desired.)
  9433.   
  9434. ! version=0.6
  9435.   
  9436.   # Set defaults.
  9437. ***************
  9438. *** 10,14 ****
  9439.   resolution=300
  9440.   point_size=10
  9441. ! encoding=dvips
  9442.   map_file=/usr/local/lib/tex/dvips/psfonts.map
  9443.   
  9444. --- 10,14 ----
  9445.   resolution=300
  9446.   point_size=10
  9447. ! encoding=
  9448.   map_file=/usr/local/lib/tex/dvips/psfonts.map
  9449.   
  9450. ***************
  9451. *** 81,84 ****
  9452. --- 81,99 ----
  9453.       ;;
  9454.   
  9455. +   -output-file=* | -output-fil=* | -output-fi=* | -output-f=* | -output-=* \
  9456. +   | -output=* | -output=* | -outpu=* | -outp=* | -out=* | -ou=* | -o=* \
  9457. +   | --output-file=* | --output-fil=* | --output-fi=* | --output-f=* \
  9458. +   | --output-=* | --output=* | --output=* | --outpu=* | --outp=* \
  9459. +   | --out=* | --ou=* | --o=* )
  9460. +     output_file=`echo $1 | sed 's/[-a-z_]*=//'`
  9461. +     ;;
  9462. +   -output-file | -output-fil | -output-fi | -output-f | -output- \
  9463. +   | -output | -output | -outpu | -outp | -out | -ou | -o \
  9464. +   | --output-file | --output-fil | --output-fi | --output-f | --output- \
  9465. +   | --output | --output | --outpu | --outp | --out | --ou | --o)
  9466. +     shift
  9467. +     output_file=$1
  9468. +     ;;
  9469.     -point-size=* | -point-siz=* | -point-si=* | -point-s=* | -point-=* \
  9470.     | -point=* | -poin=* | -poi=* | -po=* | -p=* \
  9471. ***************
  9472. *** 115,122 ****
  9473.       ;;
  9474.   
  9475. !   *)   if test -z "$filename"
  9476. !        then filename=$1
  9477.          else
  9478. !          echo "Too many filenames.  Use -help for more information."
  9479.            exit 1
  9480.          fi
  9481. --- 130,138 ----
  9482.       ;;
  9483.   
  9484. !   *)   if test -z "$input_file"
  9485. !        then input_file=$1
  9486.          else
  9487. !          echo "Too many filenames ($1 was the second)."
  9488. !          echo "Use -help for more information."
  9489.            exit 1
  9490.          fi
  9491. ***************
  9492. *** 126,131 ****
  9493.   done
  9494.   
  9495. ! # If they just wanted the version number, exit.
  9496. ! if test -z "$filename" && test -z "$fontname" && test -n "$printed_version"
  9497.   then exit 0
  9498.   fi
  9499. --- 142,146 ----
  9500.   done
  9501.   
  9502. ! if test -z "$input_file" && test -z "$fontname" && test -n "$printed_version"
  9503.   then exit 0
  9504.   fi
  9505. ***************
  9506. *** 135,148 ****
  9507.   # r<filename> <fontname> <stuff we ignore>
  9508.   # 
  9509. ! # The filename has an `r' in front because it specifies the raw fonts,
  9510. ! # not the virtual ones.
  9511.   if test -r $map_file
  9512.   then
  9513. !   if test -n "$filename" && test -z "$fontname"
  9514. !   then fontname=`awk "/^r?$filename[     ]/"'{print $2}' $map_file`
  9515. !   elif test -z "$filename" -a -n "$fontname"
  9516.     then
  9517. !     filename=`awk "/[     ]$fontname[     ]*"'$/ {print $1}' $map_file \
  9518. !       | sed -e 's/^rp/p/'`
  9519.     fi
  9520.   fi
  9521. --- 150,163 ----
  9522.   # r<filename> <fontname> <stuff we ignore>
  9523.   # 
  9524. ! # The filename might have an `r' in front to specify a raw fonts, not
  9525. ! # the virtual one (for the user).
  9526.   if test -r $map_file
  9527.   then
  9528. !   if test -n "$input_file" && test -z "$fontname"
  9529. !   then fontname=`awk "/^r?$input_file[     ]/"'{print $2; exit}' $map_file`
  9530. !   elif test -z "$input_file" && test -n "$fontname"
  9531.     then
  9532. !     filename=`awk "/[     ]$fontname[     ]*"'$/ {print $1; exit}' $map_file \
  9533. !       | sed -e 's/^r?p/p/'`
  9534.     fi
  9535.   fi
  9536. ***************
  9537. *** 149,159 ****
  9538.   
  9539.   # We need both a filename and a fontname to do anything.
  9540. ! if test -z "$filename" && test -z "$fontname"
  9541.   then
  9542. !   echo "Either a fontname (e.g., Times-Roman) or a filename (e.g., phvr)"
  9543. !   echo "is needed.  Use -help for more information."
  9544.     exit 1
  9545.   fi
  9546.   
  9547.   # We need the lib path for encoding files.
  9548.   if test -n "$FONTUTIL_LIB"
  9549. --- 164,198 ----
  9550.   
  9551.   # We need both a filename and a fontname to do anything.
  9552. ! if test -z "$input_file"
  9553. ! then
  9554. !   if test -z "$fontname"
  9555. !   then
  9556. !     # Didn't have either one.
  9557. !     echo "Either a fontname (e.g., Times-Roman) or a filename (e.g., ptmr)"
  9558. !     echo "is needed.  Use -help for more information."
  9559. !     exit 1
  9560. !   else
  9561. !     # Had a fontname, but no filename.
  9562. !     echo "I couldn't find the filename corresponding to the font $fontname."
  9563. !     echo "Please specify it."
  9564. !     exit 1
  9565. !   fi
  9566. ! elif test -z "$fontname"
  9567.   then
  9568. !   # Had a filename, but no fontname.
  9569. !   echo "I couldn't find the font corresponding to the file \`$input_file'."
  9570. !   echo "Please specify it with -font."
  9571.     exit 1
  9572.   fi
  9573.   
  9574. + # If we have no output file, use the input file (but strip off `.ps' or
  9575. + # other such extensions).
  9576. + # 
  9577. + if test -z "$output_file"
  9578. + then output_file=`basename $input_file \
  9579. +   | sed -e 's/\.ps$//'  -e 's/\.pf3$//' -e 's/\.gsf$//' \
  9580. +         -e 's/\.pfa$//' -e 's/\.pfb$//'`
  9581. + fi
  9582.   # We need the lib path for encoding files.
  9583.   if test -n "$FONTUTIL_LIB"
  9584. ***************
  9585. *** 162,176 ****
  9586.   fi
  9587.   
  9588. ! # Run Ghostscript.  For example:
  9589. ! # gsnd -I../data -- writefont.PS dvips 300 10 phvr Helvetica
  9590. ! gsnd -I$lib_path -- writefont.PS \
  9591. !   $encoding $resolution $point_size $filename $fontname || exit 1
  9592.   
  9593.   # Count the bounding boxes in each character.
  9594. ! bbcount $verbose $filename || exit 1
  9595.   
  9596.   # Insert the bounding box counts into the IFI file.
  9597. ! AWKPATH=$lib_path gawk -f fixifibb.awk -vbbsfile=$filename.bbs \
  9598. !                     <$filename.xifi >$filename.ifi \
  9599.                     || exit 1
  9600.   
  9601. --- 201,231 ----
  9602.   fi
  9603.   
  9604. ! # If the encoding file wasn't specified, use a sentinel to get the
  9605. ! # one from the input font.  We include a / in the name so it's highly
  9606. ! # unlikely to ever be a reasonable encoding name itself.
  9607. ! # 
  9608. ! if test -z "$encoding"
  9609. ! then gs_encoding=/encoding-from-input
  9610. ! else gs_encoding=$encoding
  9611. ! fi
  9612. ! # Let Ghostscript give us its normal messages if we are verbose.
  9613. ! # 
  9614. ! if test -z "$verbose"
  9615. ! then quiet="-q"
  9616. ! fi
  9617. ! # We don't use gsnd because that always uses -q.
  9618. ! # 
  9619. ! gs -DNODISPLAY $quiet -I$lib_path -- writefont.PS \
  9620. !   $gs_encoding $resolution $point_size $output_file $input_file $fontname \
  9621. ! || exit 1
  9622.   
  9623.   # Count the bounding boxes in each character.
  9624. ! bbcount $verbose $output_file > $output_file.bbs || exit 1
  9625.   
  9626.   # Insert the bounding box counts into the IFI file.
  9627. ! AWKPATH=$lib_path gawk -f fixifibb.awk -vbbsfile=$output_file.bbs \
  9628. !                     <$output_file.xifi >$output_file.ifi \
  9629.                     || exit 1
  9630.   
  9631. ***************
  9632. *** 182,205 ****
  9633.   final_resolution=`expr $resolution \* $point_size / 10`
  9634.   
  9635. ! # Make a font out of the image.
  9636. ! imageto $verbose -encoding=$encoding -input-format=pbm \
  9637. !   -dpi=$resolution $filename -o=$filename.${final_resolution}gf || exit 1
  9638. ! # Add the space character if necessary.
  9639. ! if test "`wc -l<$filename.bfi`" = 3
  9640. ! then
  9641. !   spacechar="`tail -1 $filename.bfi`"
  9642. !   fontconvert -space=$spacechar -gf $filename.${final_resolution}gf \
  9643. !     -out=x$filename.${final_resolution}gf
  9644. !   mv x$filename.${final_resolution}gf $filename.${final_resolution}gf
  9645.   fi
  9646.   
  9647. ! # PK files are smaller than GF files, and hold the same information.
  9648.   if test -n "$verbose"
  9649.   then verbose=-v
  9650.   fi
  9651. ! gftopk $verbose $filename.${final_resolution}gf || exit 1
  9652.   
  9653. ! rm -f $filename.${final_resolution}gf
  9654. ! rm -f $filename.bbs $filename.xifi $filename.pbm
  9655. ! rm -f $filename.bfi $filename.ifi
  9656. --- 237,259 ----
  9657.   final_resolution=`expr $resolution \* $point_size / 10`
  9658.   
  9659. ! # Make a font out of the image; do not throw away any bounding boxes,
  9660. ! # there's no noise in this image.
  9661. ! # 
  9662. ! if test -n "$encoding"
  9663. ! then encoding="-encoding=$encoding"
  9664.   fi
  9665.   
  9666. ! imageto $verbose $encoding -dpi=$resolution \
  9667. !   $output_file.pbm -o=$output_file.${final_resolution}gf || exit 1
  9668. ! # PK files are smaller than GF files, and hold the same information, so
  9669. ! # convert to PK form and throw the GF file away.
  9670. ! # 
  9671.   if test -n "$verbose"
  9672.   then verbose=-v
  9673.   fi
  9674. ! gftopk $verbose ./$output_file.${final_resolution}gf || exit 1
  9675.   
  9676. ! rm -f $output_file.${final_resolution}gf
  9677. ! rm -f $output_file.bbs $output_file.xifi $output_file.pbm
  9678. ! rm -f $output_file.bfi $output_file.ifi
  9679. diff -Nrc2 fontutils-0.5/gsrenderfont/input-pbm.c fontutils-0.6/gsrenderfont/input-pbm.c
  9680. *** fontutils-0.5/gsrenderfont/input-pbm.c    Tue Apr 21 07:49:06 1992
  9681. --- fontutils-0.6/gsrenderfont/input-pbm.c    Fri Oct 23 15:07:45 1992
  9682. ***************
  9683. *** 56,67 ****
  9684.     pbm_input_file = NULL;
  9685.   }
  9686.   
  9687. ! /* Read a block HEIGHT scanlines high from the image.  The last few
  9688. !    scanlines must all be blank (we don't bother to return them).  If
  9689. !    they aren't, then a rounding error has caused Ghostscript to give us
  9690. !    fewer lines than expected.  Just return a short block, and save that
  9691. !    line for next time.  */
  9692.   
  9693.   /* The constant here must match that in writefont.PS's calculation of
  9694. --- 56,66 ----
  9695.     pbm_input_file = NULL;
  9696.   }
  9697.   
  9698. ! /* Read a block exactly HEIGHT scanlines high from the image.  The last
  9699. !    few scanlines must all be blank (we don't bother to return them).  If
  9700. !    they aren't, then something is wrong.  A rounding error has caused
  9701. !    Ghostscript to give us fewer lines than expected.  Just return a
  9702. !    short block, and save the first nonblank line (we don't read past the
  9703. !    first) for next time.  */
  9704.   
  9705.   /* The constant here must match that in writefont.PS's calculation of
  9706. ***************
  9707. *** 72,83 ****
  9708.   pbm_get_block (unsigned height)
  9709.   {
  9710. -   static boolean at_eof = false;
  9711. -   static int image_format;
  9712. -   static int image_height;
  9713.     static int image_width = -1;
  9714.     static one_byte *saved_scanline = NULL;
  9715.     int c;
  9716. !   one_byte *block, *row;
  9717. !   unsigned block_height;
  9718.     bitmap_type *b = XTALLOC1 (bitmap_type);
  9719.   
  9720. --- 71,83 ----
  9721.   pbm_get_block (unsigned height)
  9722.   {
  9723.     static int image_width = -1;
  9724.     static one_byte *saved_scanline = NULL;
  9725. +   static one_byte *blank_row;
  9726. +   static int image_format;
  9727. +   static int image_height;
  9728.     int c;
  9729. !   one_byte *row;
  9730. !   one_byte *block;
  9731. !   unsigned block_height, blank;
  9732.     bitmap_type *b = XTALLOC1 (bitmap_type);
  9733.   
  9734. ***************
  9735. *** 84,105 ****
  9736.     /* Initialize the PBM info if necessary.  */
  9737.     if (image_width == -1)
  9738. -     pbm_readpbminit (pbm_input_file, &image_width, &image_height,
  9739. -                      &image_format);
  9740. -   if (at_eof)
  9741. -     return NULL;
  9742. -     
  9743. -   /* If we have a saved scanline, let that start us off.  */
  9744. -   if (saved_scanline)
  9745. -     {
  9746. -       block = saved_scanline;
  9747. -       block_height = 1;
  9748. -     }
  9749. -   else
  9750.       {
  9751. !       block = NULL;
  9752. !       block_height = 0;
  9753.       }
  9754.   
  9755.     /* Attach rows until we get to an all-white row that is after row #
  9756.        `height - BLANK_COUNT'.  */
  9757. --- 84,98 ----
  9758.     /* Initialize the PBM info if necessary.  */
  9759.     if (image_width == -1)
  9760.       {
  9761. !       pbm_readpbminit (pbm_input_file, &image_width, &image_height,
  9762. !                        &image_format);
  9763. !       blank_row = xmalloc (image_width);
  9764.       }
  9765.   
  9766. +   /* If we have a saved scanline, let that start us off.  */
  9767. +   block = saved_scanline;
  9768. +   block_height = !!block;
  9769.     /* Attach rows until we get to an all-white row that is after row #
  9770.        `height - BLANK_COUNT'.  */
  9771. ***************
  9772. *** 106,109 ****
  9773. --- 99,110 ----
  9774.     do
  9775.       {
  9776. +       /* If we're at the end of the file, quit.  Presumably there was
  9777. +          one last blank row at the end or something.  If something was
  9778. +          seriously wrong, it'll manifest itself later.  */
  9779. +       c = getc (pbm_input_file);
  9780. +       if (c == EOF)
  9781. +         return NULL;
  9782. +       ungetc (c, pbm_input_file);
  9783.         block_height++;
  9784.         block = xrealloc (block, block_height * image_width);
  9785. ***************
  9786. *** 111,145 ****
  9787.         get_row (row, image_width, image_format);
  9788.       }
  9789. !   while (!(block_height > height - BLANK_COUNT
  9790. !            && memchr (row, BLACK, image_width) == NULL));
  9791.   
  9792. !   /* Skip more all-blank rows.  We can keep using `row' as our buffer,
  9793. !      since it just points to the all-blank row we found; we won't be
  9794. !      including it in the bitmap we return.  We might hit the end of the
  9795. !      image here, in which case we just stop.  */
  9796. !   do
  9797.       {
  9798.         c = getc (pbm_input_file);
  9799. !       at_eof = c == EOF;
  9800.   
  9801. !       if (!at_eof)
  9802. !         {
  9803. !           ungetc (c, pbm_input_file);
  9804. !           get_row (row, image_width, image_format);
  9805. !         }
  9806.       }
  9807. !   while (!at_eof && memchr (row, BLACK, image_width) == NULL);
  9808. !   
  9809. !   /* If we are not at eof, save the nonblank row we found to start us
  9810. !      off next time.  */
  9811. !   if (!at_eof)
  9812.       {
  9813.         saved_scanline = xmalloc (image_width);
  9814. !       memcpy (saved_scanline, row, image_width);
  9815.       }
  9816.     /* Fill in the bitmap to return.  */
  9817.     BITMAP_WIDTH (*b) = image_width;
  9818. !   BITMAP_HEIGHT (*b) = block_height - 1;
  9819.     BITMAP_BITS (*b) = block;
  9820.   
  9821. --- 112,147 ----
  9822.         get_row (row, image_width, image_format);
  9823.       }
  9824. !   while (block_height <= height - BLANK_COUNT
  9825. !          || memchr (row, BLACK, image_width));
  9826.   
  9827. !   /* Skip the next BLANK_COUNT rows (they had better be blank).  We can
  9828. !      keep using `row' as our buffer, since it just points to the
  9829. !      all-blank row we found; we won't be including it in the bitmap we
  9830. !      return.  We might hit the end of the image here, in which case we
  9831. !      just stop.  */
  9832. !   for (blank = 1; blank < BLANK_COUNT; blank++)
  9833.       {
  9834.         c = getc (pbm_input_file);
  9835. !       if (c == EOF)
  9836. !         break;
  9837. !         
  9838. !       ungetc (c, pbm_input_file);
  9839. !       get_row (blank_row, image_width, image_format);
  9840.   
  9841. !       if (memchr (blank_row, BLACK, image_width) != NULL)
  9842. !         break;
  9843.       }
  9844. !   if (blank == BLANK_COUNT)
  9845. !     saved_scanline = NULL;
  9846. !   else
  9847.       {
  9848.         saved_scanline = xmalloc (image_width);
  9849. !       memcpy (saved_scanline, blank_row, image_width);
  9850.       }
  9851. !   
  9852.     /* Fill in the bitmap to return.  */
  9853.     BITMAP_WIDTH (*b) = image_width;
  9854. !   BITMAP_HEIGHT (*b) = block_height;
  9855.     BITMAP_BITS (*b) = block;
  9856.   
  9857. diff -Nrc2 fontutils-0.5/gsrenderfont/main.c fontutils-0.6/gsrenderfont/main.c
  9858. *** fontutils-0.5/gsrenderfont/main.c    Fri Jun  5 09:20:26 1992
  9859. --- fontutils-0.6/gsrenderfont/main.c    Fri Oct 23 07:09:46 1992
  9860. ***************
  9861. *** 57,61 ****
  9862.      Ghostscript.  So this program reads an image, counts the bounding
  9863.      boxes in each character, and writes another file with the bounding
  9864. !    box counts.  */
  9865.   
  9866.   #define PROGRAM_NAME "bbcount"
  9867. --- 57,66 ----
  9868.      Ghostscript.  So this program reads an image, counts the bounding
  9869.      boxes in each character, and writes another file with the bounding
  9870. !    box counts.
  9871. !    
  9872. !    We assume that all characters occupy the same number of scanlines; we
  9873. !    simply read that constant number for each character.  We can't put
  9874. !    other marks in the image to avoid this assumption, since then Imageto
  9875. !    will have to contend with t.  */
  9876.   
  9877.   #define PROGRAM_NAME "bbcount"
  9878. ***************
  9879. *** 70,96 ****
  9880.     string font_name = read_command_line (argc, argv);
  9881.     
  9882. !   /* Since we have to read two input files, we just throw away any
  9883. !      extension they give us.  This doesn't support filenames like
  9884. !      `a.b.pbm'.  */
  9885. !   string font_basename = basename (font_name);
  9886. !   if (font_basename != font_name)
  9887. !     WARNING2 ("%s: Ignoring extension on `%s'", PROGRAM_NAME, font_name);
  9888.   
  9889.     /* Open the image input file.  */
  9890. !   pbm_open_input_file (concat (font_basename, ".pbm"));
  9891.     
  9892.     /* Read the information about that image file.  */
  9893. !   bfi = read_bfi_file (concat (font_basename, ".bfi"));
  9894.   
  9895.     if (output_name == NULL)
  9896. !     output_name = font_basename;
  9897. !   output_name =  extend_filename (output_name, "bbs");
  9898.                       
  9899. -   bbs_file = xfopen (output_name, "w");
  9900.     while ((b = pbm_get_block (bfi.char_height)) != NULL)
  9901.       {
  9902. !       bounding_box_list_type boxes = find_outline_bbs (*b, false, 0, 0);
  9903.         fprintf (bbs_file, "%d\n", BB_LIST_LENGTH (boxes));
  9904.         
  9905. --- 75,102 ----
  9906.     string font_name = read_command_line (argc, argv);
  9907.     
  9908. !   /* We have to read two input files, but they might have given us a
  9909. !      suffix on the PBM file, so we have to remove it for the BFI.  This
  9910. !      doesn't support filenames like `a.b.pbm'.  */
  9911.   
  9912.     /* Open the image input file.  */
  9913. !   pbm_open_input_file (extend_filename (font_name, "pbm"));
  9914.     
  9915.     /* Read the information about that image file.  */
  9916. !   bfi = read_bfi_file (make_suffix (font_name, "bfi"));
  9917.   
  9918.     if (output_name == NULL)
  9919. !     {
  9920. !       bbs_file = stdout;
  9921. !       report_file = stderr;
  9922. !     }
  9923. !   else
  9924. !     {
  9925. !       output_name =  make_suffix (output_name, "bbs");
  9926. !       bbs_file = xfopen (output_name, "w");
  9927. !     }
  9928.                       
  9929.     while ((b = pbm_get_block (bfi.char_height)) != NULL)
  9930.       {
  9931. !       bb_list_type boxes = find_outline_bbs (*b, false, 0, 0);
  9932.         fprintf (bbs_file, "%d\n", BB_LIST_LENGTH (boxes));
  9933.         
  9934. ***************
  9935. *** 139,145 ****
  9936.   "help: print this message.
  9937.   output-file <filename>: write to <filename>.bbs if <filename> has no
  9938. !   suffix, and to <filename> if it has.  Default is the concatenation of
  9939. !   <font_name> with the size removed (e.g., for `cmr10' it would be `cmr')
  9940. !   and `.bbs'.
  9941.   trace-scanlines: show every scanline as we read it.
  9942.   verbose: output progress reports to stderr.
  9943. --- 145,149 ----
  9944.   "help: print this message.
  9945.   output-file <filename>: write to <filename>.bbs if <filename> has no
  9946. !   suffix, and to <filename> if it has.  Default is standard output.
  9947.   trace-scanlines: show every scanline as we read it.
  9948.   verbose: output progress reports to stderr.
  9949. ***************
  9950. *** 183,187 ****
  9951.         
  9952.         else if (ARGUMENT_IS ("version"))
  9953. !         printf ("%s.\n", version_string);
  9954.   
  9955.         /* Else it was a flag; getopt has already done the assignment.  */
  9956. --- 187,191 ----
  9957.         
  9958.         else if (ARGUMENT_IS ("version"))
  9959. !         fprintf (stderr, "%s.\n", version_string);
  9960.   
  9961.         /* Else it was a flag; getopt has already done the assignment.  */
  9962. diff -Nrc2 fontutils-0.5/gsrenderfont/version.c fontutils-0.6/gsrenderfont/version.c
  9963. *** fontutils-0.5/gsrenderfont/version.c    Thu Sep  3 09:46:20 1992
  9964. --- fontutils-0.6/gsrenderfont/version.c    Tue Oct 27 13:27:59 1992
  9965. ***************
  9966. *** 1 ****
  9967. ! char *version_string = "bbcount version 0.5";
  9968. --- 1 ----
  9969. ! char *version_string = "bbcount version 0.6";
  9970. diff -Nrc2 fontutils-0.5/gsrenderfont/writefont.PS fontutils-0.6/gsrenderfont/writefont.PS
  9971. *** fontutils-0.5/gsrenderfont/writefont.PS    Fri Aug 21 16:15:19 1992
  9972. --- fontutils-0.6/gsrenderfont/writefont.PS    Sat Oct 24 05:00:24 1992
  9973. ***************
  9974. *** 17,23 ****
  9975.   % Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  9976.   
  9977. ! % Make a local environment.
  9978. ! % 
  9979. ! 100 dict begin
  9980.   
  9981.   /verbose false def
  9982. --- 17,21 ----
  9983.   % Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  9984.   
  9985. ! 100 dict begin % our local environment
  9986.   
  9987.   /verbose false def
  9988. ***************
  9989. *** 47,66 ****
  9990.   
  9991.   
  9992. - % Leaves the concatenation of two string arguments on the stack.
  9993. - % 
  9994. - /concat-strings
  9995. - {
  9996. -   /string-2 exch def
  9997. -   /string-1 exch def    
  9998. -   /after-string-1 string-1 length def
  9999. -   /answer-string-length string-1 length string-2 length add def
  10000. -   /answer-string answer-string-length string def
  10001. -   string-1 answer-string copy pop
  10002. -   answer-string after-string-1 string-2 putinterval
  10003. -   answer-string
  10004. - }
  10005. - bdef
  10006.   % DICT pdict prints all the components in the dictionary in a
  10007.   % human-readable way.
  10008. --- 45,48 ----
  10009. ***************
  10010. *** 82,86 ****
  10011.   
  10012.   % Use the real definition of points, not PostScript's.
  10013. ! /points-per-inch 72.27 def
  10014.   /inches-per-point 1 points-per-inch div def
  10015.   
  10016. --- 64,68 ----
  10017.   
  10018.   % Use the real definition of points, not PostScript's.
  10019. ! /points-per-inch 72 def
  10020.   /inches-per-point 1 points-per-inch div def
  10021.   
  10022. ***************
  10023. *** 90,116 ****
  10024.   /points {points-per-pixel mul} bdef    % Use on stuff expressed in pixels.
  10025.   /pixels {pixels-per-point mul} bdef    % Use on stuff expressed in points.
  10026.   
  10027. ! % Set the font to `gs-fontname', with encoding `output-encoding'.
  10028. ! % We cannot rely on the encoding vector only for whether the font defines a
  10029. ! % certain character; we must also look in the CharStrings.  (The
  10030. ! % Ghostscript fonts are all StandardEncoding, yet not all characters are
  10031. ! % defined.)  Unfortunately, this makes this program only work with Type
  10032. ! % 1 fonts (or Type 3 fonts which store the character definitions in a
  10033. ! % dictionary named `CharStrings').
  10034.   % 
  10035.   /set-font
  10036.   {
  10037. !   gs-fontname cvlit /newfont output-encoding reencode-font
  10038. !   /newfont point-size cvi selectfont
  10039.     /font-encoding currentfont /Encoding get def
  10040. -   /font-charstrings currentfont /CharStrings get def
  10041.   }
  10042.   bdef
  10043.   
  10044. ! % /OLD-FONTNAME /NEW-FONTNAME NEW-ENCODING defines the font NEW-FONTNAME
  10045. ! % to be just like OLD-FONTNAME except that the encoding is NEW-ENCODING.
  10046. ! % Based on the Cookbook encoding vector examples.
  10047.   % 
  10048.   /reencode-font
  10049. --- 72,103 ----
  10050.   /points {points-per-pixel mul} bdef    % Use on stuff expressed in pixels.
  10051.   /pixels {pixels-per-point mul} bdef    % Use on stuff expressed in points.
  10052.   
  10053. ! % Make a new font whose PostScript name is `/newfont', which is the same
  10054. ! % as the font with name `gs-fontname' (read from file `input-filename'
  10055. ! % if necessary) except it has encoding `output-encoding'.
  10056.   % 
  10057. + % Set the currentfont to /newfont scaled to `point-size'.
  10058. + % 
  10059.   /set-font
  10060.   {
  10061. !   % Make the new font /newfont.
  10062. !   input-filename gs-fontname cvlit /newfont output-encoding reencode-font
  10063. !   % Make it the current font (at the requested size).
  10064. !   /newfont findfont point-size cvi scalefont setfont
  10065. !   % Define the global `font-encoding' for future use.
  10066.     /font-encoding currentfont /Encoding get def
  10067.   }
  10068.   bdef
  10069.   
  10070. ! % (OLD-FILENAME) /OLD-FONTNAME /NEW-FONTNAME NEW-ENCODING reencode-font
  10071. ! % defines the font NEW-FONTNAME to be like OLD-FONTNAME except that the
  10072. ! % encoding is NEW-ENCODING.  Based on the Cookbook encoding examples.
  10073. ! % 
  10074. ! % We read OLD-FILENAME if /OLD-FONTNAME is unknown to Ghostscript.  We
  10075. ! % determine this by looking at the dictionary `Fontmap' that Ghostscript
  10076. ! % defines when it starts up.
  10077.   % 
  10078.   /reencode-font
  10079. ***************
  10080. *** 118,149 ****
  10081.     /new-encoding exch def
  10082.     /new-fontname exch def
  10083. !   
  10084. !   /old-fontdict exch findfont def
  10085.     /new-fontdict old-fontdict maxlength dict def
  10086. !   
  10087. !   % Copy all the elements except FID and Encoding.
  10088.     old-fontdict
  10089.       {
  10090.         exch % now have key at top the stack
  10091. !       dup /FID ne  dup /Encoding ne  dup /FontName ne  and and
  10092. !         { exch new-fontdict 3 1 roll put }
  10093.           { pop pop}
  10094.         ifelse
  10095.       }
  10096.     forall
  10097. !   
  10098. !   % Install the new Encoding and FontName.
  10099. !   new-fontdict /Encoding new-encoding put
  10100. !   new-fontdict /FontName new-fontname put
  10101.     
  10102.     % Define the font.
  10103.     new-fontname new-fontdict definefont pop
  10104.   }
  10105.   bdef
  10106.   
  10107.   
  10108.   
  10109.   
  10110. ! % FILENAME parse-encoding-file tries to read the encoding file
  10111.   % `FILENAME.enc'.  If the file can't be found, we quit.  Otherwise, we
  10112.   % parse it into an encoding vector and return that on the stack.
  10113. --- 105,333 ----
  10114.     /new-encoding exch def
  10115.     /new-fontname exch def
  10116. !   /old-fontname exch def
  10117. !   /old-filename exch def
  10118. !   % If OLD-FONTNAME is not in `Fontmap', read OLD-FILENAME.
  10119. !   Fontmap old-fontname cvn known  not
  10120. !     { (Reading `) old-filename concatstrings ('...) concatstrings vreport
  10121. !       old-filename run
  10122. !       % If reading OLD-FILENAME didn't define OLD-FONTNAME, complain.
  10123. !       FontDirectory old-fontname cvn known  not
  10124. !         { (Reading `) =only
  10125. !           old-filename =only
  10126. !           (' didn't define the font `) =only
  10127. !           old-fontname =only
  10128. !           ('!) =
  10129. !           quit
  10130. !         }
  10131. !       if
  10132. !     }
  10133. !   if
  10134. !   % Get the old font, and make the dictionary that will be the new font.
  10135. !   /old-fontdict old-fontname findfont def
  10136.     /new-fontdict old-fontdict maxlength dict def
  10137. !   % Copy all the elements except `FID', `Encoding', and `FontName'.
  10138.     old-fontdict
  10139.       {
  10140.         exch % now have key at top the stack
  10141. !       dup /FID eq  1 index /Encoding eq  2 index /FontName eq  or or
  10142.           { pop pop}
  10143. +         { exch new-fontdict 3 1 roll put }
  10144.         ifelse
  10145.       }
  10146.     forall
  10147. !   % But if NEW-ENCODING is this sentinel value, we copy the existing
  10148. !   % encoding vector.
  10149. !   % 
  10150. !   new-encoding (/encoding-from-input) eq
  10151. !     {
  10152. !       /new-encoding old-fontdict /Encoding get 256 array copy def
  10153. !     }
  10154. !   if
  10155.     
  10156. +   % Get another encoding array, this one a subset of NEW-ENCODING, which
  10157. +   % contains only those characters that are actually present in the font
  10158. +   % -- sometimes the encoding vectors lie.
  10159. +   % 
  10160. +   new-fontdict new-encoding encoding-chars-present
  10161. +   /ok-encoding exch def
  10162. +   % Install the new Encoding and FontName.  The 10-character limit on
  10163. +   % the FontName is not serious, since we are the ones who specify it
  10164. +   % (in fact, new-fontname is the name `/newfont').
  10165. +   new-fontdict /Encoding ok-encoding put
  10166. +   new-fontdict /FontName new-fontname 10 string cvs put
  10167.     % Define the font.
  10168.     new-fontname new-fontdict definefont pop
  10169.   }
  10170. + bdef % reencode-font
  10171. + % FONT-DICT ENCODING encoding-chars-present => NEW-ENCODING returns an
  10172. + % encoding vector contain all and only those characters which are
  10173. + % present in both the font represented by FONT-DICT (which lacks an
  10174. + % Encoding entry) and ENCODING.
  10175. + % 
  10176. + % We have to use different algorithms for Type 1 and Type 3 fonts.
  10177. + % 
  10178. + /encoding-chars-present
  10179. + {
  10180. +   /font-type 2 index /FontType get def
  10181. +   
  10182. +   font-type 1 eq
  10183. +     { encoding-chars-present-1 }
  10184. +     { encoding-chars-present-3 }
  10185. +   ifelse
  10186. + }
  10187. + bdef % encoding-chars-present
  10188. + % (See encoding-chars-present).  For Type 1 fonts, we can just look in
  10189. + % the CharStrings entry (which is required) of FONT-DICT.
  10190. + % 
  10191. + /encoding-chars-present-1
  10192. + {
  10193. +   /orig-encoding exch def
  10194. +   /font-dict exch def
  10195. +   
  10196. +   /font-charstrings font-dict /CharStrings get def
  10197. +   
  10198. +   /new-encoding 256 array def
  10199. +   /charcode 0 def
  10200. +   
  10201. +   % For each element in the old vector, see if it's in `CharStrings'.
  10202. +     orig-encoding
  10203. +     {   font-charstrings 1 index known
  10204. +         { new-encoding charcode 3 -1 roll put }
  10205. +         { new-encoding charcode /.notdef put  pop }
  10206. +       ifelse
  10207. +       /charcode incr
  10208. +     }
  10209. +   forall
  10210. +   
  10211. +   % Return the new vector.
  10212. +   new-encoding
  10213. + }
  10214. + bdef
  10215. + % (See encoding-chars-present).  For Type 3 fonts, the character
  10216. + % definitions might be in a dictionary named anything at all.  Heck,
  10217. + % there might not even be a dictionary.  So the best I can think of is
  10218. + % to try to render each character; if it succeeds, we'll say it's
  10219. + % present, and if it fails, we'll omit it.
  10220. + % 
  10221. + % We change the current font to be the one specified by FONT-DICT.
  10222. + % (Since we're going to change fonts again right after we return,
  10223. + % there's no point in saving and restoring.)
  10224. + % 
  10225. + /encoding-chars-present-3
  10226. + {
  10227. +   /orig-encoding exch def
  10228. +   /font-dict exch def
  10229. +   
  10230. +   /new-encoding 256 array def
  10231. +   
  10232. +   % Set up the current font.
  10233. +   font-dict orig-encoding type3-setfont
  10234. +   
  10235. +   % Have to have a current point for `show' to work.
  10236. +   % 
  10237. +   0 0 moveto
  10238. +   
  10239. +   % For each element in the old vector, see if we can render it.
  10240. +   0 1 255
  10241. +     { dup type3-render-p
  10242. +         % Push the name we will put in the new vector.
  10243. +         { orig-encoding 1 index  get }
  10244. +         { /.notdef }
  10245. +       ifelse
  10246. +       % Now have charcode and charname on the stack.
  10247. +       new-encoding 3 1 roll put
  10248. +     }
  10249. +   for
  10250. +   
  10251. +   % Return the new vector.
  10252. +   new-encoding
  10253. + }
  10254.   bdef
  10255.   
  10256.   
  10257. + % FONT-DICT ENCODING type3-setfont sets the current font to be the one
  10258. + % represented by FONT-DICT.  We have to set up the encoding vector and
  10259. + % do the definefont ourselves.
  10260. + % 
  10261. + /type3-setfont
  10262. + {
  10263. +   /test-encoding exch def
  10264. +   /font-dict exch def
  10265. +   
  10266. +   % Use our new encoding in the test font.
  10267. +   font-dict /Encoding test-encoding put
  10268. +   
  10269. +   % Have to copy the dictionary explicitly, else it will become readonly
  10270. +   % and we won't be able to change the encoding for real later.
  10271. +   % 
  10272. +   font-dict dup maxlength dict copy
  10273. +   /type3-testfont exch definefont setfont
  10274. + }
  10275. + bdef
  10276. + % CHARCODE type3-render-p => bool returns true if rendering CHARCODE
  10277. + % does not produce an error.  We assume the current font is set to the
  10278. + % right thing.
  10279. + % 
  10280. + /type3-render-p
  10281. + {
  10282. +   /char exch def
  10283. +   put-char-in-buffer
  10284.   
  10285. +   % If the BuildChar fails, make sure no junk is left on the operand or
  10286. +   % dictionary stacks.
  10287. +   countdictstack
  10288. +   mark
  10289. +   
  10290. +   % Render the character
  10291. +   { char-buffer show } stopped not
  10292. +   
  10293. +   % Since we need to clear the operand stack, we have to save the
  10294. +   % result.  But since we're going to clear the dictionary stack also,
  10295. +   % we have to explicitly use our dictionary.
  10296. +   envGSRF /ok 3 -1 roll put
  10297. +   
  10298. +   cleartomark
  10299. +     {
  10300. +       dup countdictstack eq { exit } if
  10301. +       end
  10302. +     }
  10303. +   loop
  10304. +   pop % The original `countdictstack' value.
  10305. +   
  10306. +   % Return whether or not we succeeded.
  10307. +   ok
  10308. + }
  10309. + bdef
  10310.   
  10311. ! % ENCODING-NAME find-encoding ENCODING reads the encoding file
  10312. ! % `ENCODING-NAME.enc' unless ENCODING-NAME is a sentinel value, in which
  10313. ! % case we just return it.
  10314. ! % 
  10315. ! /find-encoding
  10316. ! {
  10317. !   dup (/encoding-from-input) eq not
  10318. !     { parse-encoding-file }
  10319. !   if
  10320. ! }
  10321. ! bdef
  10322. ! % (FILENAME) parse-encoding-file tries to read the encoding file
  10323.   % `FILENAME.enc'.  If the file can't be found, we quit.  Otherwise, we
  10324.   % parse it into an encoding vector and return that on the stack.
  10325. ***************
  10326. *** 159,163 ****
  10327.     
  10328.     % Ignore the coding scheme (assumption here that the .enc file does
  10329. !   % not have zero or one non-blank non-comment lines):
  10330.     encoding-line pop
  10331.   
  10332. --- 343,348 ----
  10333.     
  10334.     % Ignore the coding scheme (assumption here that the .enc file does
  10335. !   % not have zero or one non-blank non-comment lines, i.e., is empty or
  10336. !   % just a comment):
  10337.     encoding-line pop
  10338.   
  10339. ***************
  10340. *** 176,181 ****
  10341.         put
  10342.         
  10343. !       % Increment /charcode.
  10344. !       /charcode charcode 1 add def
  10345.       }
  10346.     loop
  10347. --- 361,366 ----
  10348.         put
  10349.         
  10350. !       % We're on the next character code.
  10351. !       /charcode incr
  10352.       }
  10353.     loop
  10354. ***************
  10355. *** 201,205 ****
  10356.   /open-encoding-file
  10357.   {
  10358. !   (.enc) concat-strings
  10359.     findlibfile
  10360.       { exch pop /encodingfile exch def }
  10361. --- 386,390 ----
  10362.   /open-encoding-file
  10363.   {
  10364. !   (.enc) concatstrings
  10365.     findlibfile
  10366.       { exch pop /encodingfile exch def }
  10367. ***************
  10368. *** 214,217 ****
  10369. --- 399,404 ----
  10370.   % returns the first token on the line (i.e., a name).
  10371.   % 
  10372. + % Sorry about this hard limit, but I don't want to program variable
  10373. + % strings in PostScript.
  10374.   /line-buffer 1000 string def
  10375.   
  10376. ***************
  10377. *** 232,239 ****
  10378.     loop
  10379.   }
  10380. ! bdef
  10381.   
  10382.   % Expects a character code on the stack.  Sets /char to that integer,
  10383. --- 419,423 ----
  10384.     loop
  10385.   }
  10386. ! bdef % encoding-line
  10387.   
  10388.   % Expects a character code on the stack.  Sets /char to that integer,
  10389. ***************
  10390. *** 245,279 ****
  10391.      /char exch def
  10392.      /char-name font-encoding char get def
  10393. -    % All-blank characters like space wreak havoc with the bbcount and
  10394. -    % imagetofont algorithms, so don't output those.
  10395. -    /char-in-font
  10396. -      char-name /.notdef ne
  10397. -      char-name /space ne
  10398. -      and
  10399. -      font-charstrings char-name known
  10400. -      and
  10401. -    def
  10402. - }
  10403. - bdef
  10404.   
  10405. ! % Since we ignored space characters in `set-char-variables' (just
  10406. ! % above), here is a routine to write the space's charcode to a file.
  10407. ! % We are passed the file on the stack.
  10408. ! % 
  10409. ! /number-buffer 20 string def
  10410. ! %
  10411. ! /output-space-char
  10412. ! {
  10413. !   0 1 255 { dup font-encoding exch get /space eq { exit } { pop } ifelse } for
  10414. !   dup type (integertype) eq % It's an integer if we found it, a space if not.
  10415. !     { number-buffer cvs
  10416. !       1 index exch % get the file
  10417. !       writestring
  10418. !       (\n) writestring
  10419. !     }
  10420. !   if
  10421.   }
  10422. ! bdef % output-space-char
  10423.   
  10424.   
  10425. --- 429,437 ----
  10426.      /char exch def
  10427.      /char-name font-encoding char get def
  10428.   
  10429. !    % There's no point in outputting .notdef.
  10430. !    /char-in-font  char-name /.notdef ne  def
  10431.   }
  10432. ! bdef
  10433.   
  10434.   
  10435. ***************
  10436. *** 296,299 ****
  10437. --- 454,458 ----
  10438.       newpath
  10439.       0 0 moveto
  10440.       char-buffer true charpath      
  10441.       flattenpath
  10442. ***************
  10443. *** 320,345 ****
  10444.     grestore
  10445.   }
  10446. ! bdef
  10447. ! % Expects a label string.
  10448. ! % 
  10449. ! /print-char-dimensions
  10450. ! {
  10451. !   /label exch def
  10452. !   verbose 
  10453. !     {() = label =
  10454. !      char-buffer (char: ) =only = 
  10455. !      char-height (char-height: ) =only =
  10456. !      char-depth (char-depth: ) =only =
  10457. !      char-tall (char-tall: ) =only =
  10458. !      char-stringwidth (char-stringwidth: ) =only =
  10459. !      char-width (char-width: ) =only =
  10460. !      char-left-sidebearing (char-left-sidebearing: ) =only =
  10461. !      char-right-sidebearing (char-right-sidebearing: ) =only =
  10462. !      flush
  10463. !     }
  10464. !   if
  10465. ! }
  10466. ! bdef % print-char-dimensions
  10467.   
  10468.   % If the char is defined in the font, show it on on a line by itself, ni
  10469. --- 479,483 ----
  10470.     grestore
  10471.   }
  10472. ! bdef % find-char-dimensions-in-pixels
  10473.   
  10474.   % If the char is defined in the font, show it on on a line by itself, ni
  10475. ***************
  10476. *** 355,359 ****
  10477.         put-char-in-buffer
  10478.         find-char-dimensions-in-pixels
  10479. !       %%char-name print-char-dimensions
  10480.   
  10481.         % If the lsb is negative, the character protrudes to the left of
  10482. --- 493,497 ----
  10483.         put-char-in-buffer
  10484.         find-char-dimensions-in-pixels
  10485. !       %%char-name print-char-dimensions %%
  10486.   
  10487.         % If the lsb is negative, the character protrudes to the left of
  10488. ***************
  10489. *** 362,366 ****
  10490.             char-left-sidebearing 0 lt { char-left-sidebearing neg } { 0 } ifelse
  10491.           points
  10492. !         char-height points neg
  10493.         rmoveto
  10494.   
  10495. --- 500,504 ----
  10496.             char-left-sidebearing 0 lt { char-left-sidebearing neg } { 0 } ifelse
  10497.           points
  10498. !         char-height ceiling points neg
  10499.         rmoveto
  10500.   
  10501. ***************
  10502. *** 373,377 ****
  10503.         % Leave enough blank rows to fill up the max-char-tall-in-pixels
  10504.         % space.  This will always be more than the descender.
  10505. !       0  max-char-tall-in-pixels char-height sub points neg  rmoveto
  10506.       }
  10507.     if
  10508. --- 511,515 ----
  10509.         % Leave enough blank rows to fill up the max-char-tall-in-pixels
  10510.         % space.  This will always be more than the descender.
  10511. !       0  max-char-tall-in-pixels char-height ceiling sub points neg  rmoveto
  10512.       }
  10513.     if
  10514. ***************
  10515. *** 378,381 ****
  10516. --- 516,541 ----
  10517.   }
  10518.   bdef % show-char
  10519. + % Expects a label string.
  10520. + % 
  10521. + /print-char-dimensions
  10522. + {
  10523. +   /label exch def
  10524. +   verbose 
  10525. +     {() = label =
  10526. +      char-buffer (char: ) =only = 
  10527. +      char-height (char-height: ) =only =
  10528. +      char-depth (char-depth: ) =only =
  10529. +      char-tall (char-tall: ) =only =
  10530. +      char-stringwidth (char-stringwidth: ) =only =
  10531. +      char-width (char-width: ) =only =
  10532. +      char-left-sidebearing (char-left-sidebearing: ) =only =
  10533. +      char-right-sidebearing (char-right-sidebearing: ) =only =
  10534. +      flush
  10535. +     }
  10536. +   if
  10537. + }
  10538. + bdef % print-char-dimensions
  10539.   
  10540.   % IFI stuff.
  10541. ***************
  10542. *** 396,400 ****
  10543.   /baseline-adjustment
  10544.   {
  10545. !   char-depth round cvi 1 sub output-buffer cvs
  10546.   }
  10547.   bdef
  10548. --- 556,560 ----
  10549.   /baseline-adjustment
  10550.   {
  10551. !   char-depth round cvi 1 sub neg output-buffer cvs
  10552.   }
  10553.   bdef
  10554. ***************
  10555. *** 414,420 ****
  10556.   {
  10557.     char-left-sidebearing round output-buffer cvs
  10558. !   ( ) concat-strings
  10559.     char-right-sidebearing round output-buffer cvs 
  10560. !   concat-strings
  10561.   }
  10562.   bdef
  10563. --- 574,580 ----
  10564.   {
  10565.     char-left-sidebearing round output-buffer cvs
  10566. !   ( ) concatstrings
  10567.     char-right-sidebearing round output-buffer cvs 
  10568. !   concatstrings
  10569.   }
  10570.   bdef
  10571. ***************
  10572. *** 501,514 ****
  10573.           {
  10574.             /extant-char-count incr
  10575. !           
  10576.             put-char-in-buffer
  10577.             find-char-dimensions-in-pixels
  10578. !           
  10579.             % The set width might be smaller than the bounding box if we
  10580.             % have negative side bearings.
  10581.             char-stringwidth char-width max
  10582. !           /max-char-width-in-pixels exch  max=
  10583.             
  10584. !           /max-char-tall-in-pixels char-tall max=
  10585.           }
  10586.         if
  10587. --- 661,677 ----
  10588.           {
  10589.             /extant-char-count incr
  10590.             put-char-in-buffer
  10591.             find-char-dimensions-in-pixels
  10592.             % The set width might be smaller than the bounding box if we
  10593.             % have negative side bearings.
  10594.             char-stringwidth char-width max
  10595. !           /max-char-width-in-pixels exch max=
  10596.             
  10597. !           % Accents (for example) might have a positive depth, and thus
  10598. !           % the height will be less than the height + depth, and what we
  10599. !           % want is the largest y coordinate.
  10600. !           /max-char-tall-in-pixels char-tall char-height max max=
  10601.           }
  10602.         if
  10603. ***************
  10604. *** 516,522 ****
  10605.     for
  10606.   
  10607. !   % We also want to have at least a couple blank rows between each character.
  10608. !   % The constant here is also used in bbcount's pbm-reading routines.
  10609. !   /max-char-tall-in-pixels max-char-tall-in-pixels 4 add ceiling def
  10610.     
  10611.     verbose
  10612. --- 679,687 ----
  10613.     for
  10614.   
  10615. !   % We also want to have some blank rows between characters.  The
  10616. !   % constant here is also used in bbcount's pbm-reading routines.
  10617. !   /max-char-tall-in-pixels
  10618. !     max-char-tall-in-pixels ceiling  4 add  cvi
  10619. !   def
  10620.     
  10621.     verbose
  10622. ***************
  10623. *** 564,569 ****
  10624.   }
  10625.   bdef % compute-final-device-dimens
  10626.   
  10627.   % make-gsfont, the main program.
  10628. --- 729,732 ----
  10629. ***************
  10630. *** 570,578 ****
  10631.   
  10632.   % Arguments:
  10633. ! %   gs-fontname (e.g., Times-Roman---no slash in front)
  10634. ! %   font-basename (e.g., phvr -- to get hvr.pbm and hvr.ifi)
  10635. ! %   point-size
  10636. ! %   pixels-per-inch (e.g., 300 -- can't have nonsquare pixels)
  10637. ! %   output-encoding-filename (e.g., textext -- to find the .enc file)
  10638.   % 
  10639.   /make-gsfont
  10640. --- 733,744 ----
  10641.   
  10642.   % Arguments:
  10643. ! %   gs-fontname        (e.g., Times-Roman -- no slash in front)
  10644. ! %   input-filename    (e.g., ptmr -- unused if the font is in Fontmap)
  10645. ! %   output-filename    (e.g., ptmr -- to get ptmr.pbm and ptmr.ifi)
  10646. ! %   point-size        (e.g., 10 -- in PostScript points)
  10647. ! %   pixels-per-inch    (e.g., 300 -- can't have nonsquare pixels)
  10648. ! %   encoding-filename    (e.g., textext -- to find .enc file)
  10649. ! % 
  10650. ! % (Except `encoding-filename' might be a sentinel value, not a filename.)
  10651.   % 
  10652.   /make-gsfont
  10653. ***************
  10654. *** 579,597 ****
  10655.   {
  10656.     /gs-fontname exch def
  10657. !   /font-basename exch def
  10658.     /point-size exch cvi def
  10659.     /pixels-per-inch exch cvi def
  10660. !   /output-encoding-filename exch def
  10661.   
  10662. !   % Look for the file `output-encoding-name.enc' and parse it,
  10663.     % returning an encoding dictionary.
  10664.     % 
  10665. !     (Parsing encoding file ) output-encoding-filename concat-strings
  10666. !     (.enc...) concat-strings
  10667.     vreport
  10668. !   /output-encoding output-encoding-filename parse-encoding-file def
  10669.   
  10670. !   % Now that we know the encoding, we can make the font we're going to
  10671. !   % render the current font.
  10672.     % 
  10673.     (Reencoding and setting font...) vreport
  10674. --- 745,764 ----
  10675.   {
  10676.     /gs-fontname exch def
  10677. !   /input-filename exch def
  10678. !   /output-filename exch def
  10679.     /point-size exch cvi def
  10680.     /pixels-per-inch exch cvi def
  10681. !   /encoding-filename exch def
  10682.   
  10683. !   % Look for the file `encoding-filename.enc' and parse it,
  10684.     % returning an encoding dictionary.
  10685.     % 
  10686. !     (Using encoding `) encoding-filename concatstrings
  10687. !     (' for output...) concatstrings
  10688.     vreport
  10689. !   /output-encoding encoding-filename find-encoding def
  10690.   
  10691. !   % Now that we know the output encoding, we can make the font we're
  10692. !   % going to render the current font.
  10693.     % 
  10694.     (Reencoding and setting font...) vreport
  10695. ***************
  10696. *** 622,626 ****
  10697.   
  10698.     (Writing PBM file...) vreport
  10699. !   /pbm-filename font-basename (.pbm) concat-strings def
  10700.     /pbm-file pbm-filename (w) file def
  10701.     pbm-file currentdevice writeppmfile
  10702. --- 789,793 ----
  10703.   
  10704.     (Writing PBM file...) vreport
  10705. !   /pbm-filename output-filename (.pbm) concatstrings def
  10706.     /pbm-file pbm-filename (w) file def
  10707.     pbm-file currentdevice writeppmfile
  10708. ***************
  10709. *** 628,632 ****
  10710.   
  10711.     (Writing BFI file...) vreport
  10712. !   /bfi-filename font-basename (.bfi) concat-strings def
  10713.     /bfi-file bfi-filename (w) file def
  10714.     bfi-file extant-char-count output-buffer cvs writestring
  10715. --- 795,799 ----
  10716.   
  10717.     (Writing BFI file...) vreport
  10718. !   /bfi-filename output-filename (.bfi) concatstrings def
  10719.     /bfi-file bfi-filename (w) file def
  10720.     bfi-file extant-char-count output-buffer cvs writestring
  10721. ***************
  10722. *** 634,642 ****
  10723.     bfi-file max-char-tall-in-pixels output-buffer cvs writestring
  10724.     bfi-file (\n) writestring
  10725. -   bfi-file output-space-char
  10726.     bfi-file closefile
  10727.     
  10728.     (Writing XIFI file...) vreport
  10729. !   /ifi-filename font-basename (.xifi) concat-strings def
  10730.     /ifi-file ifi-filename (w) file def
  10731.     0 1 255 { output-char-info } for
  10732. --- 801,808 ----
  10733.     bfi-file max-char-tall-in-pixels output-buffer cvs writestring
  10734.     bfi-file (\n) writestring
  10735.     bfi-file closefile
  10736.     
  10737.     (Writing XIFI file...) vreport
  10738. !   /ifi-filename output-filename (.xifi) concatstrings def
  10739.     /ifi-file ifi-filename (w) file def
  10740.     0 1 255 { output-char-info } for
  10741. diff -Nrc2 fontutils-0.5/imageto/.gdbinit fontutils-0.6/imageto/.gdbinit
  10742. *** fontutils-0.5/imageto/.gdbinit    Sun Aug 16 17:55:30 1992
  10743. --- fontutils-0.6/imageto/.gdbinit    Fri Oct 23 10:24:08 1992
  10744. ***************
  10745. *** 109,110 ****
  10746. --- 109,116 ----
  10747.   #  ../ourfonts/garamond/r/percent/perc.img
  10748.   
  10749. + # finding out about bb info with atlas (20 Sep 92)
  10750. + #set args -verbose -print-guidelines -print-clean-info -nchars=26 \
  10751. + #-baselines=121 \
  10752. + #-info=$garamond/atlas/first -encoding=gnulatin $garamond/atlas/ggmr.img
  10753. + set args -verbose ../gsrenderfont/cmr.pbm -dpi=300 -enc=dvips
  10754. diff -Nrc2 fontutils-0.5/imageto/ChangeLog fontutils-0.6/imageto/ChangeLog
  10755. *** fontutils-0.5/imageto/ChangeLog    Thu Sep  3 09:30:54 1992
  10756. --- fontutils-0.6/imageto/ChangeLog    Tue Oct 27 13:02:50 1992
  10757. ***************
  10758. *** 1,2 ****
  10759. --- 1,118 ----
  10760. + Tue Oct 27 13:02:04 1992  Karl Berry  (karl@cs.umb.edu)
  10761. +     * Version 0.6.
  10762. + Sat Oct 24 05:13:02 1992  Karl Berry  (karl@cs.umb.edu)
  10763. +     * ifi.c (read_ifi_file): Just do successive character codes if we
  10764. +     don't have an encoding file.
  10765. +         * main.c (USAGE): Change doc.
  10766. + Fri Oct 23 10:43:46 1992  Karl Berry  (karl@cs.umb.edu)
  10767. +     * out-chars.c (output_chars): Free the bounding box list we construct.
  10768. +     * out-chars.c (output_chars): If the IFI struct says no bounding
  10769. +     boxes, don't read any of the bitmap, and reconsider the current bb.
  10770. + Tue Oct 20 17:17:26 1992  Karl Berry  (karl@cs.umb.edu)
  10771. +     * GNUmakefile (install): Make the second arg a file, not a directory.
  10772. + Fri Oct 16 15:40:53 1992  Karl Berry  (karl@cs.umb.edu)
  10773. +     * out-epsf.c: Doc fix.
  10774. + Mon Oct  5 09:31:30 1992  Karl Berry  (karl@cs.umb.edu)
  10775. +     * main.c (read_command_line): Make -print-clean-info imply -verbose.
  10776. +         (main): Remove now-redundant test for `print_clean_info'.
  10777. +     * out-chars.c (write_image_chars): Only report "+" if we have to
  10778. +     keep reading vertically, not horizontally.
  10779. +         (do_image_line): Remove the report from here.
  10780. + Sun Oct  4 08:59:55 1992  Karl Berry  (karl@cs.umb.edu)
  10781. +     * out-chars.c (write_image_chars): Don't keep adding to
  10782. +     `row_height' for appended image rows, just assign.
  10783. +     * main.c (main): Test for zero resolution here.
  10784. +         (set_input_format): Not here.
  10785. +     * out-chars.c (clean_threshold): Remove.
  10786. +         * out-chars.h: Likewise.
  10787. +         * main.c (USAGE, read_command_line): And here.
  10788. +     * out-chars.c (bb_equal_p): New fn.
  10789. +     * out-chars.c (offset_bb_list): Function moved here from bb-outline.c.
  10790. +     * out-chars.c (clean_bitmap): Rewrite to take a list of known
  10791. +     boxes, and remove those that aren't in the list.
  10792. +         (output_chars): Only call `clean_bitmap' once, after we've
  10793. +         combined everything.
  10794. +         (image_to_bitmap_bbs): New fn.
  10795. + Sat Oct  3 13:54:39 1992  Karl Berry  (karl@cs.umb.edu)
  10796. +     * out-chars.c (write_image_chars): Don't abort if the image ends
  10797. +     prematurely, just give a warning and return.
  10798. +     * out-chars.c (OUTPUT_CHAR_P): New macro.
  10799. +         (output_chars): Use it, instead of repeating the same expr several
  10800. +         times.
  10801. + Fri Oct  2 16:14:03 1992  Karl Berry  (karl@cs.umb.edu)
  10802. +     * out-chars.[ch]: New files constructed from main.[ch].
  10803. +         * main.c: Include out-chars.h.
  10804. +     * extract.c (REPORT_SCANLINE): use REPORT.
  10805. +     * main.c (-info-filename): remove this option.
  10806. +     * {epsf,strips}.[ch]: Rename to out-*.
  10807. +     * GNUmakefile (c_and_h): Likewise.
  10808. +     * ifi.[ch]: New files constructed from image-char.[ch] and main.c.
  10809. +         * main.c: include ifi.h.
  10810. +         (extract_chars): Change call to read_ifi_file.
  10811. +         * GNUmakefile (c_and_h): add `ifi', remove `image-char'.
  10812. + Mon Sep 28 11:11:59 1992  Karl Berry  (karl@cs.umb.edu)
  10813. +     * main.c: change `fprintf (stderr's to use REPORT*.
  10814. +     * main.c (clean_bitmap): print the size of the bounding box being
  10815. +     cleaned, not that of the enclosing character.  (halvers@sol.crd.ge.com)
  10816. + Tue Sep 22 13:01:54 1992  Karl Berry  (karl@cs.umb.edu)
  10817. +         * main.c (read_ifi_file): call make_suffix to make the default IFI
  10818. +           filename, instead of appending to the root.
  10819. +         (input_rootname): remove.
  10820. +         (main): don't assign to input_rootname; just set output_name to
  10821. +           the fn call.
  10822. +         (input_name): new static.
  10823. +         * main.c (clean_bitmap): if clean_threshold is 1.0, do nothing;
  10824. +           else only clean if the gray value is > threshold, not >=.
  10825. +         * main.c: make diagnostic messages consistent.
  10826. +         * main.c (do_image_line): set `bb_offset' to just the width
  10827. +           of the previous bb, since we're already incorporating the
  10828. +           interbb whitespace in the second bb.
  10829. + Mon Sep 21 10:32:07 1992  Karl Berry  (karl@cs.umb.edu)
  10830. +         * main.c (read_command_line): new option -ifi-file, a synonym for
  10831. +           -info-file.
  10832. +         (USAGE): document it.
  10833. +         * main.c (set_input_format): don't call strcmp on NULL if the
  10834. +           input filename lacks an extension.
  10835.   Thu Sep  3 09:30:54 1992  Karl Berry  (karl@hayley)
  10836.   
  10837. diff -Nrc2 fontutils-0.5/imageto/GNUmakefile fontutils-0.6/imageto/GNUmakefile
  10838. *** fontutils-0.5/imageto/GNUmakefile    Sat Aug 29 16:14:02 1992
  10839. --- fontutils-0.6/imageto/GNUmakefile    Tue Oct 20 17:17:53 1992
  10840. ***************
  10841. *** 19,23 ****
  10842.   program = imageto
  10843.   
  10844. ! c_and_h = bitmap2 epsf extract image-char input-img input-pbm main strips
  10845.   h_only = image-header
  10846.   c_only = version
  10847. --- 19,24 ----
  10848.   program = imageto
  10849.   
  10850. ! c_and_h = bitmap2 extract ifi input-img input-pbm main \
  10851. !           out-chars out-epsf out-strips
  10852.   h_only = image-header
  10853.   c_only = version
  10854. ***************
  10855. *** 32,36 ****
  10856.   
  10857.   install::
  10858. !     $(INSTALL_DATA) strips.tex $(texinputdir)
  10859.   
  10860.   include M.depend
  10861. --- 33,37 ----
  10862.   
  10863.   install::
  10864. !     $(INSTALL_DATA) strips.tex $(texinputdir)/strips.tex
  10865.   
  10866.   include M.depend
  10867. diff -Nrc2 fontutils-0.5/imageto/M.depend fontutils-0.6/imageto/M.depend
  10868. *** fontutils-0.5/imageto/M.depend    Wed Sep  2 17:20:53 1992
  10869. --- fontutils-0.6/imageto/M.depend    Sun Oct 25 14:16:07 1992
  10870. ***************
  10871. *** 3,20 ****
  10872.     .././include/c-seek.h .././include/c-proto.h .././include/global.h .././include/lib.h \
  10873.     .././include/types.h .././include/bitmap.h .././include/bounding-box.h bitmap2.h 
  10874. - epsf.o : epsf.c .././include/config.h .././include/c-auto.h .././include/c-std.h \
  10875. -   .././include/c-memstr.h .././include/c-errno.h .././include/c-minmax.h .././include/c-limits.h \
  10876. -   .././include/c-seek.h .././include/c-proto.h .././include/global.h .././include/lib.h \
  10877. -   .././include/types.h .././include/hexify.h .././include/report.h epsf.h image-header.h \
  10878. -   main.h 
  10879.   extract.o : extract.c .././include/config.h .././include/c-auto.h .././include/c-std.h \
  10880.     .././include/c-memstr.h .././include/c-errno.h .././include/c-minmax.h .././include/c-limits.h \
  10881.     .././include/c-seek.h .././include/c-proto.h .././include/global.h .././include/lib.h \
  10882. !   .././include/types.h .././include/bitmap.h .././include/bounding-box.h bitmap2.h \
  10883. !   extract.h main.h image-header.h input-img.h input-pbm.h 
  10884. ! image-char.o : image-char.c .././include/config.h .././include/c-auto.h .././include/c-std.h \
  10885.     .././include/c-memstr.h .././include/c-errno.h .././include/c-minmax.h .././include/c-limits.h \
  10886.     .././include/c-seek.h .././include/c-proto.h .././include/global.h .././include/lib.h \
  10887. !   .././include/types.h image-char.h 
  10888.   input-img.o : input-img.c .././include/config.h .././include/c-auto.h .././include/c-std.h \
  10889.     .././include/c-memstr.h .././include/c-errno.h .././include/c-minmax.h .././include/c-limits.h \
  10890. --- 3,17 ----
  10891.     .././include/c-seek.h .././include/c-proto.h .././include/global.h .././include/lib.h \
  10892.     .././include/types.h .././include/bitmap.h .././include/bounding-box.h bitmap2.h 
  10893.   extract.o : extract.c .././include/config.h .././include/c-auto.h .././include/c-std.h \
  10894.     .././include/c-memstr.h .././include/c-errno.h .././include/c-minmax.h .././include/c-limits.h \
  10895.     .././include/c-seek.h .././include/c-proto.h .././include/global.h .././include/lib.h \
  10896. !   .././include/types.h .././include/bitmap.h .././include/bounding-box.h .././include/report.h \
  10897. !   bitmap2.h extract.h main.h image-header.h input-img.h input-pbm.h 
  10898. ! ifi.o : ifi.c .././include/config.h .././include/c-auto.h .././include/c-std.h \
  10899.     .././include/c-memstr.h .././include/c-errno.h .././include/c-minmax.h .././include/c-limits.h \
  10900.     .././include/c-seek.h .././include/c-proto.h .././include/global.h .././include/lib.h \
  10901. !   .././include/types.h .././include/encoding.h .././include/font.h .././include/bitmap.h \
  10902. !   .././include/bounding-box.h .././include/tfm.h .././include/fix-num.h .././include/list.h \
  10903. !   .././include/libfile.h ifi.h main.h image-header.h 
  10904.   input-img.o : input-img.c .././include/config.h .././include/c-auto.h .././include/c-std.h \
  10905.     .././include/c-memstr.h .././include/c-errno.h .././include/c-minmax.h .././include/c-limits.h \
  10906. ***************
  10907. *** 30,39 ****
  10908.     .././include/c-seek.h .././include/c-proto.h .././include/global.h .././include/lib.h \
  10909.     .././include/types.h .././include/cmdline.h .././include/filename.h .././include/getopt.h \
  10910. !   .././include/gf.h .././include/bitmap.h .././include/bounding-box.h .././include/font.h \
  10911. !   .././include/tfm.h .././include/fix-num.h .././include/list.h .././include/libfile.h \
  10912. !   .././include/report.h .././include/bb-outline.h bitmap2.h .././include/encoding.h \
  10913. !   epsf.h image-header.h extract.h image-char.h input-img.h input-pbm.h main.h \
  10914. !   strips.h 
  10915. ! strips.o : strips.c .././include/config.h .././include/c-auto.h .././include/c-std.h \
  10916.     .././include/c-memstr.h .././include/c-errno.h .././include/c-minmax.h .././include/c-limits.h \
  10917.     .././include/c-seek.h .././include/c-proto.h .././include/global.h .././include/lib.h \
  10918. --- 27,47 ----
  10919.     .././include/c-seek.h .././include/c-proto.h .././include/global.h .././include/lib.h \
  10920.     .././include/types.h .././include/cmdline.h .././include/filename.h .././include/getopt.h \
  10921. !   .././include/encoding.h .././include/font.h .././include/bitmap.h .././include/bounding-box.h \
  10922. !   .././include/tfm.h .././include/fix-num.h .././include/list.h .././include/gf.h \
  10923. !   .././include/report.h ifi.h image-header.h input-img.h input-pbm.h main.h out-chars.h \
  10924. !   out-epsf.h out-strips.h 
  10925. ! out-chars.o : out-chars.c .././include/config.h .././include/c-auto.h .././include/c-std.h \
  10926. !   .././include/c-memstr.h .././include/c-errno.h .././include/c-minmax.h .././include/c-limits.h \
  10927. !   .././include/c-seek.h .././include/c-proto.h .././include/global.h .././include/lib.h \
  10928. !   .././include/types.h .././include/bb-outline.h .././include/bb-list.h .././include/bounding-box.h \
  10929. !   .././include/bitmap.h .././include/gf.h .././include/font.h .././include/tfm.h \
  10930. !   .././include/fix-num.h .././include/list.h .././include/report.h bitmap2.h extract.h \
  10931. !   ifi.h image-header.h main.h out-strips.h 
  10932. ! out-epsf.o : out-epsf.c .././include/config.h .././include/c-auto.h .././include/c-std.h \
  10933. !   .././include/c-memstr.h .././include/c-errno.h .././include/c-minmax.h .././include/c-limits.h \
  10934. !   .././include/c-seek.h .././include/c-proto.h .././include/global.h .././include/lib.h \
  10935. !   .././include/types.h .././include/hexify.h .././include/report.h main.h image-header.h \
  10936. !   out-epsf.h 
  10937. ! out-strips.o : out-strips.c .././include/config.h .././include/c-auto.h .././include/c-std.h \
  10938.     .././include/c-memstr.h .././include/c-errno.h .././include/c-minmax.h .././include/c-limits.h \
  10939.     .././include/c-seek.h .././include/c-proto.h .././include/global.h .././include/lib.h \
  10940. ***************
  10941. *** 40,43 ****
  10942.     .././include/types.h .././include/gf.h .././include/bitmap.h .././include/bounding-box.h \
  10943.     .././include/font.h .././include/tfm.h .././include/fix-num.h .././include/list.h \
  10944. !   .././include/report.h input-img.h image-header.h input-pbm.h main.h strips.h 
  10945.   version.o : version.c 
  10946. --- 48,51 ----
  10947.     .././include/types.h .././include/gf.h .././include/bitmap.h .././include/bounding-box.h \
  10948.     .././include/font.h .././include/tfm.h .././include/fix-num.h .././include/list.h \
  10949. !   .././include/report.h main.h image-header.h out-strips.h 
  10950.   version.o : version.c 
  10951. diff -Nrc2 fontutils-0.5/imageto/bitmap2.c fontutils-0.6/imageto/bitmap2.c
  10952. *** fontutils-0.5/imageto/bitmap2.c    Mon Jun 15 07:57:07 1992
  10953. --- fontutils-0.6/imageto/bitmap2.c    Tue Sep 22 12:48:44 1992
  10954. ***************
  10955. *** 41,45 ****
  10956.     DIMENSIONS_HEIGHT (new_dimens) = BITMAP_HEIGHT (b2);
  10957.     new = new_bitmap (new_dimens);
  10958. !   
  10959.     for (row = 0; row < BITMAP_HEIGHT (b2); row++)
  10960.       {
  10961. --- 41,46 ----
  10962.     DIMENSIONS_HEIGHT (new_dimens) = BITMAP_HEIGHT (b2);
  10963.     new = new_bitmap (new_dimens);
  10964. !   /* Choice of `b2' or `b1' here is arbitrary, of course.  */
  10965.     for (row = 0; row < BITMAP_HEIGHT (b2); row++)
  10966.       {
  10967. diff -Nrc2 fontutils-0.5/imageto/extract.c fontutils-0.6/imageto/extract.c
  10968. *** fontutils-0.5/imageto/extract.c    Sat Jun 20 15:19:19 1992
  10969. --- fontutils-0.6/imageto/extract.c    Fri Oct  2 17:03:40 1992
  10970. ***************
  10971. *** 23,26 ****
  10972. --- 23,27 ----
  10973.   #include "bitmap.h"
  10974.   #include "bounding-box.h"
  10975. + #include "report.h"
  10976.   
  10977.   #include "bitmap2.h"
  10978. ***************
  10979. *** 132,141 ****
  10980.      some kind of status report.  */
  10981.   
  10982. ! #define REPORT_SCANLINE()                        \
  10983. !   if (verbose && ++scanline_count % 100 == 0)                \
  10984. !     {                                    \
  10985. !       putc ('.', stderr);                        \
  10986. !       fflush (stderr);                            \
  10987. !     }
  10988.   
  10989.   /* Read scanlines of width WIDTH from the image file until we get one
  10990. --- 133,137 ----
  10991.      some kind of status report.  */
  10992.   
  10993. ! #define REPORT_SCANLINE() if (++scanline_count % 100 == 0) REPORT (".")
  10994.   
  10995.   /* Read scanlines of width WIDTH from the image file until we get one
  10996. ***************
  10997. *** 199,203 ****
  10998.           { /* Perhaps doubling is the wrong thing to do here, as it may
  10999.                waste quite a bit of memory.  But it's simple.  */
  11000. !           rows_allocated <<= 1;
  11001.             image = xrealloc (image, rows_allocated * width);
  11002.       }
  11003. --- 195,199 ----
  11004.           { /* Perhaps doubling is the wrong thing to do here, as it may
  11005.                waste quite a bit of memory.  But it's simple.  */
  11006. !           rows_allocated += 100 /* ;<<= 1*/;
  11007.             image = xrealloc (image, rows_allocated * width);
  11008.       }
  11009. diff -Nrc2 fontutils-0.5/imageto/ifi.c fontutils-0.6/imageto/ifi.c
  11010. *** fontutils-0.5/imageto/ifi.c
  11011. --- fontutils-0.6/imageto/ifi.c    Sat Oct 24 05:14:04 1992
  11012. ***************
  11013. *** 0 ****
  11014. --- 1,197 ----
  11015. + /* ifi.c: read an IFI file.  */
  11016. + #include "config.h"
  11017. + #include "encoding.h"
  11018. + #include "libfile.h"
  11019. + #include "ifi.h"
  11020. + #include "main.h"
  11021. + /* The name of the encoding file specified by the user, and the
  11022. +    structure we parse it into.  (-encoding)  */
  11023. + string encoding_name = NULL;
  11024. + /* The name of the IFI file.  (-ifi-file)  */
  11025. + string ifi_filename = NULL;
  11026. + static void append_image_char (image_char_list_type *l, image_char_type c);
  11027. + static image_char_list_type new_image_char_list (void);
  11028. + /* Read the IFI file `ifi_filename' (or construct the IFI filename from
  11029. +    `input_name'), which gives us information about the image we are
  11030. +    going to read.
  11031. +    
  11032. +    See the documentation for full details and examples of IFI files.
  11033. +    Here we just sketch the bare bones.
  11034. +    
  11035. +    Each (non-blank, non-comment) line in this file represents a
  11036. +    ``character'' in the image, and has one to five entries, separated by
  11037. +    spaces and/or tabs.  Comments start with `%' and continue to the end
  11038. +    of the line.
  11039. +    
  11040. +    The first entry represents the character code.  See the documentation
  11041. +    for the various forms of charcodes.  We also allow `.notdef', meaning
  11042. +    the ``character'' should not be output in the font.  
  11043. +    
  11044. +    The second entry, if it exists, is an adjustment to the
  11045. +    baseline.  We move the baseline down for negative numbers, and up
  11046. +    for positive ones.  Default is zero.
  11047. +    
  11048. +    The third entry, if it exists, is the number of bounding boxes that
  11049. +    comprise this character.  If it is negative, the bounding boxes
  11050. +    are not consecutive in the image; instead, they alternate with
  11051. +    bounding boxes for some other character.
  11052. +    
  11053. +    The fourth and fifth entries, if they exist, are the left and right
  11054. +    side bearings, respectively.  */
  11055. +    
  11056. + image_char_list_type
  11057. + read_ifi_file (unsigned *total_count)
  11058. + {
  11059. +   string line;
  11060. +   int bb_count;
  11061. +   encoding_info_type *encoding_info;
  11062. +   int n = 0;
  11063. +   image_char_list_type image_char_list = new_image_char_list ();
  11064. +   
  11065. +   if (encoding_name)
  11066. +     {
  11067. +       encoding_info = XTALLOC1 (encoding_info_type);
  11068. +       *encoding_info = read_encoding_file (encoding_name);
  11069. +     }
  11070. +   else  
  11071. +     encoding_info = NULL;
  11072. +     
  11073. +   if (!ifi_filename)
  11074. +     ifi_filename = make_suffix (input_name, "ifi");
  11075. +   libfile_start (ifi_filename, "ifi");
  11076. +   *total_count = 0;
  11077. +   while ((line = libfile_line ()) != NULL)
  11078. +     {
  11079. +       image_char_type c;
  11080. +       string baseline_adjust_str, bb_count_str, charname;
  11081. +       string lsb_str, rsb_str;
  11082. +       string save_line = line; /* So we can free it.  */
  11083. +       
  11084. +       /* The character name.  */
  11085. +       charname = strtok (line, " \t");
  11086. +       
  11087. +       /* `libfile_line' should never return an empty line.  */
  11088. +       assert (charname != NULL);
  11089. +       
  11090. +       if (STREQ (charname, ".notdef"))
  11091. +         IMAGE_CHAR_OMIT (c) = true;
  11092. +       else
  11093. +         {
  11094. +           if (encoding_info)
  11095. +             n = encoding_number (*encoding_info, charname);
  11096. +           else
  11097. +             n++;
  11098. +           
  11099. +           if (n == -1)
  11100. +             {
  11101. +               LIBFILE_WARN2 ("Character `%s' undefined in encoding %s",
  11102. +                         charname, ENCODING_SCHEME_NAME (*encoding_info));
  11103. +               IMAGE_CHAR_OMIT (c) = true;
  11104. +         }
  11105. +           else
  11106. +             {
  11107. +               IMAGE_CHARCODE (c) = n;
  11108. +               IMAGE_CHARNAME (c) = xstrdup (charname);
  11109. +               IMAGE_CHAR_OMIT (c) = false;
  11110. +         }
  11111. +         }
  11112. +       /* The baseline adjustment.  */
  11113. +       baseline_adjust_str = strtok (NULL, " \t");
  11114. +       IMAGE_CHAR_BASELINE_ADJUST (c)
  11115. +         = baseline_adjust_str == NULL ? 0 : atoi (baseline_adjust_str);
  11116. +       
  11117. +       /* The bounding box count.  */
  11118. +       bb_count_str = strtok (NULL, " \t");
  11119. +       bb_count = bb_count_str == NULL ? 1 : atoi (bb_count_str);
  11120. +       
  11121. +       if (bb_count < 0)
  11122. +         {
  11123. +           IMAGE_CHAR_BB_COUNT (c) = -bb_count;
  11124. +           IMAGE_CHAR_BB_ALTERNATING (c) = true;
  11125. +         }
  11126. +       else
  11127. +         {
  11128. +           IMAGE_CHAR_BB_COUNT (c) = bb_count;
  11129. +           IMAGE_CHAR_BB_ALTERNATING (c) = false;
  11130. +         }
  11131. +       /* The left side bearing.  */
  11132. +       lsb_str = strtok (NULL, " \t");
  11133. +       IMAGE_CHAR_LSB (c) = lsb_str == NULL ? 0 : atoi (lsb_str);
  11134. +       
  11135. +       /* The right side bearing.  */
  11136. +       rsb_str = strtok (NULL, " \t");
  11137. +       IMAGE_CHAR_RSB (c) = rsb_str == NULL ? 0 : atoi (rsb_str);
  11138. +       
  11139. +       *total_count += IMAGE_CHAR_BB_COUNT (c);
  11140. +       append_image_char (&image_char_list, c);
  11141. +       free (save_line);
  11142. +     }
  11143. +   
  11144. +   libfile_close ();
  11145. +   if (encoding_info)
  11146. +     free (encoding_info);
  11147. +   
  11148. +   return image_char_list;
  11149. + }
  11150. + /* Return an initialized, empty list.  */
  11151. + static image_char_list_type
  11152. + new_image_char_list ()
  11153. + {
  11154. +   image_char_list_type l;
  11155. +   
  11156. +   IMAGE_CHAR_LIST_LENGTH (l) = 0;
  11157. +   IMAGE_CHAR_LIST_DATA (l) = NULL;
  11158. +   
  11159. +   return l;
  11160. + }
  11161. + /* Append the character C to the list L.  */
  11162. + void
  11163. + append_image_char (image_char_list_type *l, image_char_type c)
  11164. + {
  11165. +   IMAGE_CHAR_LIST_LENGTH (*l)++;
  11166. +   IMAGE_CHAR_LIST_DATA (*l)
  11167. +     = xrealloc (IMAGE_CHAR_LIST_DATA (*l),
  11168. +                   IMAGE_CHAR_LIST_LENGTH (*l) * sizeof (image_char_type));
  11169. +   IMAGE_CHAR (*l, IMAGE_CHAR_LIST_LENGTH (*l) - 1) = c;
  11170. + }
  11171. + /* Return false if the box BOX_COUNT boxes beyond FIRST_CHAR in LIST
  11172. +    is in the middle of a character, true otherwise.  To do this, we
  11173. +    add up all the box counts for characters starting at FIRST_CHAR,
  11174. +    until we see where we land.  */
  11175. + boolean
  11176. + box_at_char_boundary_p (image_char_list_type list, unsigned first_char,
  11177. +                         unsigned box_count)
  11178. + {
  11179. +   unsigned count = 0;
  11180. +   
  11181. +   while (count < box_count && first_char < IMAGE_CHAR_LIST_LENGTH (list))
  11182. +     {
  11183. +       image_char_type c = IMAGE_CHAR (list, first_char);
  11184. +       count += IMAGE_CHAR_BB_COUNT (c);
  11185. +       first_char++;
  11186. +     }
  11187. +     
  11188. +   return count == box_count;
  11189. + }
  11190. diff -Nrc2 fontutils-0.5/imageto/ifi.h fontutils-0.6/imageto/ifi.h
  11191. *** fontutils-0.5/imageto/ifi.h
  11192. --- fontutils-0.6/imageto/ifi.h    Fri Oct  2 17:13:40 1992
  11193. ***************
  11194. *** 0 ****
  11195. --- 1,91 ----
  11196. + /* ifi.h: information about the characters in the image.
  11197. + Copyright (C) 1992 Free Software Foundation, Inc.
  11198. + This program is free software; you can redistribute it and/or modify
  11199. + it under the terms of the GNU General Public License as published by
  11200. + the Free Software Foundation; either version 2, or (at your option)
  11201. + any later version.
  11202. + This program is distributed in the hope that it will be useful,
  11203. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  11204. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  11205. + GNU General Public License for more details.
  11206. + You should have received a copy of the GNU General Public License
  11207. + along with this program; if not, write to the Free Software
  11208. + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
  11209. + #ifndef IFI_H
  11210. + #define IFI_H
  11211. + #include "types.h"
  11212. + /* See ifi.c.  */
  11213. + extern string encoding_name, ifi_filename;
  11214. + /* A single character in the image.  */
  11215. + typedef struct 
  11216. + {
  11217. +   charcode_type charcode;
  11218. +   string charname;
  11219. +   boolean omit;
  11220. +   int baseline_adjust;
  11221. +   unsigned bb_count;
  11222. +   boolean alternating;
  11223. +   int lsb, rsb;
  11224. + } image_char_type;
  11225. + /* The character code.  This is garbage if `omit' is true.  */
  11226. + #define IMAGE_CHARCODE(c) ((c).charcode)
  11227. + /* The character name.  */
  11228. + #define IMAGE_CHARNAME(c) ((c).charname)
  11229. + /* Says whether this character should be output.  */
  11230. + #define IMAGE_CHAR_OMIT(c) ((c).omit)
  11231. + /* How far the baseline should be moved from the row's baseline.  */
  11232. + #define IMAGE_CHAR_BASELINE_ADJUST(c) ((c).baseline_adjust)
  11233. + /* How many bounding boxes comprise this character.  */
  11234. + #define IMAGE_CHAR_BB_COUNT(c) ((c).bb_count)
  11235. + /* Says whether the bounding boxes in this character are consecutive
  11236. +    (the usual case) or alternate.  */
  11237. + #define IMAGE_CHAR_BB_ALTERNATING(c) ((c).alternating)
  11238. + /* The side bearings.  */
  11239. + #define IMAGE_CHAR_LSB(c) ((c).lsb)
  11240. + #define IMAGE_CHAR_RSB(c) ((c).rsb)
  11241. + /* A list of the above.  */
  11242. + typedef struct
  11243. + {
  11244. +   image_char_type *data;
  11245. +   unsigned length;
  11246. + } image_char_list_type;
  11247. + /* The Nth element of the list L.  */
  11248. + #define IMAGE_CHAR(l, n) ((l).data[n])
  11249. + /* The list as a whole.  */
  11250. + #define IMAGE_CHAR_LIST_DATA(l) ((l).data)
  11251. + /* The length of the list.  */
  11252. + #define IMAGE_CHAR_LIST_LENGTH(l) ((l).length)
  11253. + /* Read the IFI file IFI_FILENAME. Return the total number of characters
  11254. +    read in TOTAL_COUNT.  */
  11255. + extern image_char_list_type read_ifi_file (unsigned *total_count);
  11256. + /* Return false if the box BOX_COUNT boxes beyond FIRST_CHAR in LIST
  11257. +    is in the middle of a character, true otherwise.  */
  11258. + extern boolean box_at_char_boundary_p
  11259. +   (image_char_list_type list, unsigned first_char, unsigned box_count);
  11260. + #endif /* not IFI_H */
  11261. diff -Nrc2 fontutils-0.5/imageto/main.c fontutils-0.6/imageto/main.c
  11262. *** fontutils-0.5/imageto/main.c    Fri Aug 21 16:14:20 1992
  11263. --- fontutils-0.6/imageto/main.c    Sat Oct 24 05:14:04 1992
  11264. ***************
  11265. *** 20,36 ****
  11266.   
  11267.   #include <ctype.h>
  11268.   #define CMDLINE_NO_DPI /* It's not in the input filename.  */
  11269.   #include "cmdline.h"
  11270.   #include "getopt.h"
  11271.   #include "gf.h"
  11272. - #include "libfile.h"
  11273.   #include "report.h"
  11274.   
  11275. ! #include "bb-outline.h"
  11276. ! #include "bitmap2.h"
  11277. ! #include "encoding.h"
  11278. ! #include "epsf.h"
  11279. ! #include "extract.h"
  11280. ! #include "image-char.h"
  11281.   #include "image-header.h"
  11282.   #include "input-img.h"
  11283. --- 20,32 ----
  11284.   
  11285.   #include <ctype.h>
  11286.   #define CMDLINE_NO_DPI /* It's not in the input filename.  */
  11287.   #include "cmdline.h"
  11288. + #include "encoding.h" /* For `DEFAULT_ENCODING'.  */
  11289.   #include "getopt.h"
  11290.   #include "gf.h"
  11291.   #include "report.h"
  11292.   
  11293. ! #include "ifi.h" /* For `encoding_name'.  */
  11294.   #include "image-header.h"
  11295.   #include "input-img.h"
  11296. ***************
  11297. *** 37,52 ****
  11298.   #include "input-pbm.h"
  11299.   #include "main.h"
  11300. ! #include "strips.h"
  11301. ! /* For temporary debugging.  */
  11302. ! boolean debug;
  11303.   
  11304. - /* The design size of the font we're creating.  (-designsize)  */
  11305. - real design_size = 10.0;
  11306.   
  11307. ! /* The name of the encoding file specified by the user, and the
  11308. !    structure we parse it into.  (-encoding)  */
  11309. ! static string encoding_name = NULL;
  11310.   
  11311.   /* Pointers to functions based on input format.  (-input-format)  */
  11312. --- 33,43 ----
  11313.   #include "input-pbm.h"
  11314.   #include "main.h"
  11315. ! #include "out-chars.h"
  11316. ! #include "out-epsf.h"
  11317. ! #include "out-strips.h"
  11318.   
  11319.   
  11320. ! /* General information about the image.  Set by the input routines.  */
  11321. ! image_header_type image_header;
  11322.   
  11323.   /* Pointers to functions based on input format.  (-input-format)  */
  11324. ***************
  11325. *** 56,88 ****
  11326.   boolean (*image_get_scanline) (one_byte *) = NULL;
  11327.   
  11328.   /* Show every scanline on the terminal as we read it?  (-trace-scanlines) */
  11329.   boolean trace_scanlines = false;
  11330. - /* General information about the image.  */
  11331. - image_header_type image_header;
  11332.   
  11333.   /* Private variables.  */
  11334.   
  11335. ! /* A list of the image rows on which the baselines occur.  The end of
  11336. !    the list is marked with an element -1.  (-baselines)  */
  11337. ! static int *baseline_list = NULL;
  11338. ! /* If a bounding box encloses more black (as a percentage) than this, it
  11339. !    is cleared.  (-clean-threshold)  */
  11340. ! static real clean_threshold = .6;
  11341. ! /* If set, write an EPSF file.  (-epsf)  */
  11342. ! static boolean do_epsf = false;
  11343. ! /* If set, prints diagnostics about which boxes are and aren't cleaned. 
  11344. !    (-print-clean-info)  */ 
  11345. ! static boolean print_clean_info = false;
  11346. ! /* The name of the IFI file.  (-info-file)  */
  11347. ! static string info_filename = NULL;
  11348. ! /* The non-extension and non-directory part of the filename for the
  11349. !    input image.  */
  11350. ! static string input_rootname;
  11351.   
  11352.   /* The suffix for the image file.  */
  11353. --- 47,60 ----
  11354.   boolean (*image_get_scanline) (one_byte *) = NULL;
  11355.   
  11356. + /* The filename for the input image.  */
  11357. + string input_name;
  11358.   /* Show every scanline on the terminal as we read it?  (-trace-scanlines) */
  11359.   boolean trace_scanlines = false;
  11360.   
  11361.   /* Private variables.  */
  11362.   
  11363. ! /* The design size of the font we're creating.  (-designsize)  */
  11364. ! static real design_size = 10.0;
  11365.   
  11366.   /* The suffix for the image file.  */
  11367. ***************
  11368. *** 89,100 ****
  11369.   static string input_extension;
  11370.   
  11371. ! /* How many character reports fit on a line.  */
  11372. ! static unsigned nchars_per_line;
  11373. ! /* Find about this many characters in the image, then stop.  This is
  11374. !    useful only for testing, because converting the entire image takes a long
  11375. !    time.  So we might in truth output a few more characters than
  11376. !    specified here.  (-nchars)  */
  11377. ! static unsigned nchars_wanted = MAX_CHARCODE + 1;
  11378.   
  11379.   /* The name of the file we're going to write.  (-output-file) */
  11380. --- 61,66 ----
  11381.   static string input_extension;
  11382.   
  11383. ! /* If set, write an EPSF file.  (-epsf)  */
  11384. ! static boolean output_epsf = false;
  11385.   
  11386.   /* The name of the file we're going to write.  (-output-file) */
  11387. ***************
  11388. *** 101,119 ****
  11389.   static string output_name;
  11390.   
  11391. - /* Says whether to print the row numbers of each character as we go, 
  11392. -    so that the user can decide how to adjust jumping baselines. 
  11393. -    (-print-guidelines)  */
  11394. - static boolean print_guidelines = false;
  11395. - /* Says which characters we should process.  This is independent of the
  11396. -    ordering in the font file.  (-range) */
  11397. - static int starting_char = 0;
  11398. - static int ending_char = MAX_CHARCODE;
  11399. - /* Where the baseline of the current row is in the image.  The first row
  11400. -    is #1, and so on.  We start over at row 1 at each image row.*/
  11401. - static unsigned row_baseline;
  11402. - static unsigned row_height;
  11403.   /* If set, make each ``character'' a (more or less) constant number of
  11404.      scanlines.  (-strips) */
  11405. --- 67,70 ----
  11406. ***************
  11407. *** 120,136 ****
  11408.   static boolean do_strips = false;
  11409.   
  11410. - /* How many boxes total the character take up.  */
  11411. - static unsigned total_boxes_expected;
  11412.   
  11413. - static gf_char_type bitmap_to_gf_char
  11414. -   (bitmap_type, real, bounding_box_type, image_char_type);
  11415. - static void clean_bitmap (bitmap_type *, int, int);
  11416. - static boolean do_image_line
  11417. -   (bitmap_type, unsigned *, unsigned *, real, image_char_list_type);
  11418. - static void extract_chars (image_header_type);
  11419. - static image_char_list_type read_ifi_file (unsigned *);
  11420. - static unsigned output_chars
  11421. -   (bounding_box_list_type, bitmap_type, real, image_char_list_type, unsigned);
  11422.   static string read_command_line (int, string[]);
  11423.   static void set_img_input_format (void);
  11424. --- 71,75 ----
  11425. ***************
  11426. *** 139,144 ****
  11427.   
  11428.   /* We have three different strategies for processing the image:
  11429. !      1) (-strips) takes a constant number of scanlines as each character,
  11430. !      2)  (normal) analyze the image and write out the ``true'' characters,
  11431.        3)   (-epsf) write out the image as an Encapsulated PostScript file.
  11432.      
  11433. --- 78,83 ----
  11434.   
  11435.   /* We have three different strategies for processing the image:
  11436. !      1)  (normal) analyze the image and write out the ``true'' characters,
  11437. !      2) (-strips) takes a constant number of scanlines as each character,
  11438.        3)   (-epsf) write out the image as an Encapsulated PostScript file.
  11439.      
  11440. ***************
  11441. *** 157,165 ****
  11442.   main (int argc, string argv[])
  11443.   {
  11444. !   string input_name = read_command_line (argc, argv);
  11445. !   boolean writing_gf = !do_epsf;
  11446. !   
  11447. !   set_input_format (input_name);
  11448.     
  11449.     /* Open the main input file.  */
  11450.     (*image_open_input_file) (extend_filename (input_name, input_extension));
  11451. --- 96,115 ----
  11452.   main (int argc, string argv[])
  11453.   {
  11454. !   boolean writing_gf;
  11455. !   input_name = read_command_line (argc, argv);
  11456. !   writing_gf = !output_epsf;
  11457.     
  11458. +   set_input_format (input_name);  
  11459. +   /* If the input format is PBM, then they must also tell us the dpi.  */
  11460. +   if (image_open_input_file == pbm_open_input_file 
  11461. +       && image_header.hres == 0)
  11462. +     {
  11463. +       fprintf (stderr, "If you use PBM format, you must supply the dpi.\n");
  11464. +       fprintf (stderr, "For more information, use ``-help''.\n");
  11465. +       exit (1);
  11466. +     }
  11467.     /* Open the main input file.  */
  11468.     (*image_open_input_file) (extend_filename (input_name, input_extension));
  11469. ***************
  11470. *** 169,178 ****
  11471.     (*image_get_header) ();
  11472.   
  11473. -   /* We might use this in `read_ifi_file', so always set it.  */
  11474. -   input_rootname = remove_suffix (basename (input_name));
  11475.     /* If the user didn't give an output name, use the input name.  */
  11476.     if (output_name == NULL)
  11477. !     output_name = input_rootname;
  11478.     
  11479.     /* If they didn't give an output name with a suffix, use ours.  */
  11480. --- 119,125 ----
  11481.     (*image_get_header) ();
  11482.   
  11483.     /* If the user didn't give an output name, use the input name.  */
  11484.     if (output_name == NULL)
  11485. !     output_name = remove_suffix (basename (input_name));
  11486.     
  11487.     /* If they didn't give an output name with a suffix, use ours.  */
  11488. ***************
  11489. *** 187,191 ****
  11490.             output_name = concat5 (output_name, suffix, ".", dpi, "gf");
  11491.       }
  11492. !       else if (do_epsf)
  11493.           output_name = concat (output_name, ".eps");
  11494.         else
  11495. --- 134,138 ----
  11496.             output_name = concat5 (output_name, suffix, ".", dpi, "gf");
  11497.       }
  11498. !       else if (output_epsf)
  11499.           output_name = concat (output_name, ".eps");
  11500.         else
  11501. ***************
  11502. *** 209,221 ****
  11503.            the TFM file get too big.  */
  11504.         design_size = 100.0;
  11505. !       write_chars_as_strips (image_header);
  11506.       }
  11507. !   else if (do_epsf)
  11508.       write_epsf (output_name, image_header);
  11509.     else
  11510. !     extract_chars (image_header);
  11511.   
  11512.     /* Clean up.  */
  11513. !   if (verbose || print_clean_info)
  11514.       REPORT ("\n");
  11515.   
  11516. --- 156,168 ----
  11517.            the TFM file get too big.  */
  11518.         design_size = 100.0;
  11519. !       write_chars_as_strips (image_header, design_size);
  11520.       }
  11521. !   else if (output_epsf)
  11522.       write_epsf (output_name, image_header);
  11523.     else
  11524. !     write_image_chars (image_header, design_size);
  11525.   
  11526.     /* Clean up.  */
  11527. !   if (verbose)
  11528.       REPORT ("\n");
  11529.   
  11530. ***************
  11531. *** 234,802 ****
  11532.   }
  11533.   
  11534. - /* Analyze the input image, outputting the characters we find.  */
  11535. - static void
  11536. - extract_chars (image_header_type image_header)
  11537. - {
  11538. -   bitmap_type *image_bitmap;
  11539. -   unsigned nchars_done = 0;
  11540. -   /* Read the image information.  This tells us to which character
  11541. -        each bounding box belongs, among other things.  */
  11542. -   image_char_list_type image_char_list
  11543. -     = read_ifi_file (&total_boxes_expected);
  11544. -   /* Since we report (a lot) more information when `print_guidelines' is true,
  11545. -      we can fit fewer characters per line.  */
  11546. -   nchars_per_line = print_guidelines ? 1 : 11;
  11547. -   /* The main loop also (and more commonly) exits when we've read the
  11548. -      entire image.  */ 
  11549. -   while (nchars_done < nchars_wanted)
  11550. -     {
  11551. -       unsigned *transitions;
  11552. -       /* Read one line of characters in the image.  After this,
  11553. -          `image_bitmap' is, for example, `a...z', with blank columns at
  11554. -          the left and right.  Whatever is in the original image.  */
  11555. -       image_bitmap
  11556. -         = some_black_to_all_white_row (image_header.width, &transitions);
  11557. -       if (image_bitmap == NULL)
  11558. -         break; /* We've read the whole image file.  */
  11559. -       if (baseline_list == NULL || *baseline_list == -1)
  11560. -         {
  11561. -          if (baseline_list != NULL)
  11562. -             WARNING ("imageto: Not enough baselines specified");
  11563. -           row_baseline = 0;
  11564. -         }
  11565. -       else
  11566. -         row_baseline = *baseline_list++;
  11567. -       row_height = BITMAP_HEIGHT (*image_bitmap);
  11568. -       /* If `do_image_line' fails, we're supposed to read the next
  11569. -          row in the image, and put it below the current line.  For
  11570. -          example, if a line has only an `!' on it, we will only get
  11571. -          the stem on the first call to `some_black_to_all_white_row'.  
  11572. -          We want to get the dot in there, too.  */
  11573. -       while (!do_image_line (*image_bitmap, transitions, &nchars_done,
  11574. -                              (real) image_header.hres, image_char_list))
  11575. -         {
  11576. -           bitmap_type *revised
  11577. -             = append_next_image_row (*image_bitmap, image_header.width,
  11578. -                                      &transitions);
  11579. -           if (revised == NULL)
  11580. -             FATAL ("imageto: Image ended in the midst of a character");
  11581. -           free_bitmap (image_bitmap);
  11582. -           image_bitmap = revised;
  11583. -           if (baseline_list == NULL)
  11584. -             row_baseline = 0;
  11585. -      row_height += BITMAP_HEIGHT (*image_bitmap);
  11586. -         }
  11587. -       free_bitmap (image_bitmap);
  11588. -     }
  11589. - }
  11590. - /* Analyze and output all of the bitmap IMAGE, which is one line of type
  11591. -    in the original.  The resolution of the image is H_RESOLUTION, and
  11592. -    we've read NCHARS characters so far.  We use IMAGE_CHAR_LIST and the
  11593. -    transition vector TRANSITIONS, which has in it how IMAGE breaks into
  11594. -    characters.
  11595. -    
  11596. -    We return false if we need to be given another image row.  */
  11597. - #define NEXT_TRANSITION()  ({                        \
  11598. -   if (*transitions == BITMAP_WIDTH (image) + 1)                \
  11599. -     {                                    \
  11600. -       WARNING ("do_image_line: Expected more transitions");        \
  11601. -       break;                                \
  11602. -     }                                    \
  11603. -   *transitions++;                            \
  11604. - })
  11605. - static boolean
  11606. - do_image_line (bitmap_type image, unsigned *transitions, unsigned *nchars, 
  11607. -                real h_resolution, image_char_list_type image_char_list)
  11608. - {
  11609. -   static unsigned box_count = 0;
  11610. -   bounding_box_type bb;
  11611. -   MIN_ROW (bb) = 0;
  11612. -   MAX_ROW (bb) = BITMAP_HEIGHT (image) - 1;
  11613. -   
  11614. -   /* `nchars_wanted' is an option to the program, defined at the top.  */
  11615. -   while (*nchars < nchars_wanted && *transitions != BITMAP_WIDTH (image) + 1)
  11616. -     {
  11617. -       int bb_offset = 0;
  11618. -       unsigned original_box_count = box_count;
  11619. -       bounding_box_list_type boxes = init_bounding_box_list ();
  11620. -       bitmap_type *char_bitmap = XTALLOC1 (bitmap_type);
  11621. -       bitmap_type *temp_bitmap = XTALLOC1 (bitmap_type);
  11622. -       /* The first element of TRANSITIONS is white-to-black.
  11623. -          Thereafter, they alternate.  */
  11624. -       MIN_COL (bb) = NEXT_TRANSITION ();
  11625. -       MAX_COL (bb) = NEXT_TRANSITION ();
  11626. -       
  11627. -       /* After this, `char_bitmap' might be just an `a' (with blank
  11628. -          rows above and below, because `a' has neither a descender nor
  11629. -          an ascender), then `b', and so on.  In many specimens, some
  11630. -          characters overlap; for example, we might get `ij' as one
  11631. -          bitmap, instead of `i' and then `j'.  */
  11632. -       *char_bitmap = extract_subbitmap (image, bb);
  11633. -       *temp_bitmap = copy_bitmap (*char_bitmap);
  11634. -       while (true)
  11635. -         {
  11636. -           bounding_box_list_type temp_boxes;
  11637. -           bounding_box_type previous_bb;
  11638. -           /* If we've read all the bounding boxes expected, we're done.  */
  11639. -           if (box_count == total_boxes_expected)
  11640. -             break;
  11641. -           /* If we've read more than we expected to, we're in trouble.  */
  11642. -           if (box_count > total_boxes_expected)
  11643. -             {
  11644. -               WARNING2 ("do_image_line: Read box #%u but expected only %u",
  11645. -                         box_count, total_boxes_expected);
  11646. -               /* No point in giving this message more than once.  */
  11647. -               total_boxes_expected = INT_MAX;
  11648. -             }
  11649. -           /* Find bounding boxes around all the shapes in `char_bitmap'.
  11650. -              Continuing the `ij' example, this would result in four
  11651. -              bounding boxes (one for each dot, one for the dotless `i',
  11652. -              and one for the dotless `j').  */
  11653. -           temp_boxes = find_outline_bbs (*temp_bitmap, false, 0, 0);
  11654. -           /* The subimages we've created all start at column zero.  But
  11655. -              we want to put the images side-by-side, instead of
  11656. -              overlaying them.  So we change the bounding box numbers.  */
  11657. -           offset_bounding_box_list (&temp_boxes, bb_offset);
  11658. -           box_count += BB_LIST_LENGTH (temp_boxes);
  11659. -           append_bounding_box_list (&boxes, temp_boxes);
  11660. -           /* See if the white column was in the middle of a character.  */
  11661. -           if (box_at_char_boundary_p (image_char_list, *nchars,
  11662. -                                       box_count - original_box_count))
  11663. -             break;
  11664. -           /* It was.  We have to read more (horizontally) of the image,
  11665. -              if we have it.  If we don't, return false, so our caller
  11666. -              can read more (vertically). */
  11667. -       free_bitmap (temp_bitmap);
  11668. -       if (*transitions == BITMAP_WIDTH (image) + 1)
  11669. -             { /* Forget that we've seen this before.  */
  11670. -               box_count = original_box_count;
  11671. -               return false;
  11672. -             }
  11673. -       previous_bb = bb;
  11674. -       MIN_COL (bb) = NEXT_TRANSITION ();
  11675. -           MAX_COL (bb) = NEXT_TRANSITION ();
  11676. -       bb_offset = MIN_COL (bb) - MAX_COL (previous_bb);
  11677. -       /* Leave in the white space between the character parts.  */
  11678. -       MIN_COL (bb) = MAX_COL (previous_bb);
  11679. -           
  11680. -           *temp_bitmap = extract_subbitmap (image, bb);
  11681. -           REPORT ("+");
  11682. -           if (temp_bitmap == NULL)
  11683. -             {
  11684. -               WARNING1 ("imageto: Expected more bounding boxes for `%d'",
  11685. -                        IMAGE_CHARCODE (IMAGE_CHAR (image_char_list, *nchars)));
  11686. -               break;
  11687. -             }
  11688. -           /* The boxes `temp_bitmap' should be just to the right of the
  11689. -              bitmap we've accumulated in `char_bitmap'.  */
  11690. -           bb_offset += BITMAP_WIDTH (*char_bitmap);
  11691. -       /* When this happens, it usually means that the IFI file
  11692. -              didn't specify enough bounding boxes for some character,
  11693. -              and so things are out of sync.  */
  11694. -           if (BITMAP_HEIGHT (*char_bitmap) != BITMAP_HEIGHT (*temp_bitmap))
  11695. -             {
  11696. -               WARNING ("imageto: Line ended inside a character");
  11697. -               break;
  11698. -             }
  11699. -           bitmap_concat (char_bitmap, *temp_bitmap);
  11700. -         }  /* while (true)  */
  11701. -         
  11702. -       free_bitmap (temp_bitmap);
  11703. -       /* Convert the bits inside those bounding boxes into one (if not
  11704. -         overlapping with another) or more (if overlapping) characters
  11705. -     in the GF font.  */
  11706. -       *nchars += output_chars (boxes, *char_bitmap, h_resolution,
  11707. -                                image_char_list, *nchars);
  11708. -       free_bitmap (char_bitmap);
  11709. -       free_bounding_box_list (&boxes);
  11710. -     }
  11711. -   
  11712. -   return true;
  11713. - }
  11714. - /* This macro figures out how the previous and next bounding boxes
  11715. -    overlap the current bounding box, which we assume is `BB_LIST_ELT
  11716. -    (boxes, this_box)'.  The variables we assign to, `left_edge' and
  11717. -    `right_edge', must be already declared.  We have to put the numbers
  11718. -    in the coordinate system of the bitmap of the single character we're
  11719. -    working on, instead of the coordinate system the bounding boxes
  11720. -    numbers are in, which is the group of characters we were sent.  */
  11721. - #define SET_EDGES(bb)                            \
  11722. -   left_edge                                \
  11723. -     = this_box == 0                            \
  11724. -       ? 0                                \
  11725. -       : MAX_COL (BB_LIST_ELT (boxes, this_box - 1)) - MIN_COL (bb);    \
  11726. -   right_edge                                \
  11727. -     = this_box == BB_LIST_LENGTH (boxes) - 1                \
  11728. -       ? BB_WIDTH (bb)                            \
  11729. -       : MIN_COL (BB_LIST_ELT (boxes, this_box + 1)) - MIN_COL (bb);
  11730. - /* For each bounding box in the list BOXES, extract from IMAGE_BITMAP
  11731. -    and turn the resulting bitmap into a single character in the font. 
  11732. -    The information in IMAGE_CHAR_LIST maps bounding boxes to character codes;
  11733. -    consecutive bounding boxes may belong to the same character.  For
  11734. -    example, `i' will appear twice, once for the dot and once for the
  11735. -    stem.  We assume that all the bounding boxes for a given character
  11736. -    will appear in IMAGE_BITMAP.
  11737. -    
  11738. -    We return the number of characters (not bounding boxes) found,
  11739. -    including characters that were omitted.  */
  11740. - static unsigned
  11741. - output_chars (bounding_box_list_type boxes, bitmap_type image_bitmap, 
  11742. -           real h_resolution, image_char_list_type image_char_list,
  11743. -               unsigned current_char)
  11744. - {  
  11745. -   static unsigned char_count = 0;
  11746. -   int left_edge, right_edge;
  11747. -   unsigned this_box;
  11748. -   boolean done[BB_LIST_LENGTH (boxes)];
  11749. -   unsigned number_written = 0;
  11750. -   
  11751. -   for (this_box = 0; this_box < BB_LIST_LENGTH (boxes); this_box++)
  11752. -     done[this_box] = false;
  11753. -   for (this_box = 0; this_box < BB_LIST_LENGTH (boxes); this_box++)
  11754. -     {
  11755. -       bounding_box_type bb;
  11756. -       bitmap_type bitmap;
  11757. -       image_char_type c;
  11758. -       one_byte charcode;
  11759. -       gf_char_type gf_char;
  11760. -       
  11761. -       /* `done[this_box]' will be set if we get to a bounding box that
  11762. -          has already been combined with a previous one, because of
  11763. -          an alternating combination.  Since we never go backwards, we
  11764. -          don't bother to set `done' for every box we look at.  */
  11765. -       if (done[this_box])
  11766. -         continue;
  11767. -         
  11768. -       bb = BB_LIST_ELT (boxes, this_box);
  11769. -       c = IMAGE_CHAR (image_char_list, current_char++);
  11770. -       charcode = IMAGE_CHARCODE (c);
  11771. -       
  11772. -       if (charcode >= starting_char && charcode <= ending_char
  11773. -           && !IMAGE_CHAR_OMIT (c))
  11774. -         {
  11775. -           bitmap = extract_subbitmap (image_bitmap, bb);
  11776. -           
  11777. -           /* Remove extraneous blobs and such.  We have to do this when
  11778. -              we first have the bitmap, before anything has been combined.
  11779. -          Otherwise, the dot on the `i', for example, would get
  11780. -              cleaned away.  */
  11781. -           SET_EDGES (bb);
  11782. -           clean_bitmap (&bitmap, left_edge, right_edge);
  11783. -         }
  11784. -       while (IMAGE_CHAR_BB_COUNT (c)-- > 1)
  11785. -         {
  11786. -           unsigned combine_box;
  11787. -           
  11788. -           if (IMAGE_CHAR_BB_ALTERNATING (c))
  11789. -             {
  11790. -               /* Don't increment `this_box', since it is incremented at
  11791. -                  the end of the loop, and the next box is part of
  11792. -                  another character.  */
  11793. -               combine_box = this_box + 2;
  11794. -               /* Don't look at the second box again in the outer loop:  */
  11795. -               done[combine_box] = true;
  11796. -             }
  11797. -           else
  11798. -             combine_box = ++this_box;
  11799. -           if (combine_box >= BB_LIST_LENGTH (boxes))
  11800. -             {
  11801. -               WARNING1 ("output_chars: Not enough outlines for char %u",
  11802. -                         (unsigned) charcode);
  11803. -               break;
  11804. -             }
  11805. -           if (charcode >= starting_char && charcode <= ending_char
  11806. -               && !IMAGE_CHAR_OMIT (c))
  11807. -             {
  11808. -               /* Get the shape to combine with `bitmap'.  */
  11809. -               bounding_box_type next_bb = BB_LIST_ELT (boxes, combine_box);
  11810. -               bitmap_type next_bitmap
  11811. -                 = extract_subbitmap (image_bitmap, next_bb);
  11812. -               SET_EDGES (bb);
  11813. -               clean_bitmap (&bitmap, left_edge, right_edge);
  11814. -               combine_images (&bitmap, next_bitmap, &bb, next_bb);
  11815. -               free_bitmap (&next_bitmap);
  11816. -             }
  11817. -         }
  11818. -       
  11819. -       if (charcode >= starting_char && charcode <= ending_char
  11820. -           && !IMAGE_CHAR_OMIT (c))
  11821. -         {
  11822. -           REPORT ("[");
  11823. -           gf_char = bitmap_to_gf_char (bitmap, h_resolution, bb, c);
  11824. -           gf_put_char (gf_char);
  11825. -           REPORT ("]");
  11826. -           /* This and the GF character's bitmap are the same, so we only
  11827. -              need to free one of the two.  */
  11828. -           free_bitmap (&bitmap);
  11829. -         }
  11830. -       else
  11831. -         REPORT ("x"); /* We're ignoring this character.  */
  11832. -       REPORT1 ("%c", ++char_count % nchars_per_line ? ' ' : '\n');
  11833. -       number_written++;
  11834. -     }
  11835. -   
  11836. -   return number_written;
  11837. - }              
  11838. - #define BB_TO_CARTESIAN(x)                         \
  11839. -   (row_height - 1 - (x) - row_baseline                     \
  11840. -    - IMAGE_CHAR_BASELINE_ADJUST (image_char))
  11841. - /* Derive the information necessary to output the font character from
  11842. -    the bitmap B, and return it.  The resolution of the bitmap is given in
  11843. -    pixels per inch as H_RESOLUTION.  The bounding box BB encloses the
  11844. -    character in the image coordinates.  We use BB, plus the global
  11845. -    `baseline', to determine the positioning of the GF character.  */
  11846. - static gf_char_type
  11847. - bitmap_to_gf_char (bitmap_type b, real h_resolution,
  11848. -                    bounding_box_type bb, image_char_type image_char)
  11849. - {
  11850. -   gf_char_type gf_char;
  11851. -   real width_in_points;
  11852. -   charcode_type charcode = IMAGE_CHARCODE (image_char);
  11853. -   bounding_box_type cartesian_bb;  
  11854. -   
  11855. -   MIN_ROW (cartesian_bb) = BB_TO_CARTESIAN (MAX_ROW (bb));
  11856. -   MAX_ROW (cartesian_bb) = BB_TO_CARTESIAN (MIN_ROW (bb));
  11857. -   
  11858. -   REPORT1 ("%u", charcode);
  11859. -   
  11860. -   GF_CHARCODE (gf_char) = charcode;
  11861. -   GF_BITMAP (gf_char) = b;
  11862. -   GF_CHAR_MIN_COL (gf_char) = IMAGE_CHAR_LSB (image_char);
  11863. -   GF_CHAR_MAX_COL (gf_char) = GF_CHAR_MIN_COL (gf_char) + BITMAP_WIDTH (b);
  11864. -   GF_CHAR_MIN_ROW (gf_char) = MIN_ROW (cartesian_bb);
  11865. -   GF_CHAR_MAX_ROW (gf_char) = MAX_ROW (cartesian_bb);
  11866. -   GF_H_ESCAPEMENT (gf_char) = (GF_CHAR_MAX_COL (gf_char)
  11867. -                                + IMAGE_CHAR_RSB (image_char));
  11868. -   width_in_points = GF_H_ESCAPEMENT (gf_char) * POINTS_PER_INCH / h_resolution;
  11869. -   GF_TFM_WIDTH (gf_char) = real_to_fix (width_in_points / design_size);
  11870. -   if (print_guidelines)
  11871. -     fprintf (stderr, " (%s) %d/%d",  IMAGE_CHARNAME (image_char),
  11872. -          MIN_ROW (cartesian_bb), MAX_ROW (cartesian_bb));
  11873. -   return gf_char;
  11874. - }
  11875. - /* Find the bounding boxes of all outlines inside B.  For each of them
  11876. -    that are sufficiently black, white them out.  In the type specimens,
  11877. -    many characters overlap their neighbors by just a few pixels.  When
  11878. -    we extract the pixels inside the bounding box of the `d', say, a few
  11879. -    pixels of the `e' may creep in on the right.  We want to get rid of
  11880. -    those.  Other junk might show up due to dark spots on the page, and
  11881. -    we want to get rid of those, too.  Hence the test for ``sufficiently
  11882. -    black''.  */
  11883. - static void
  11884. - clean_bitmap (bitmap_type *b, int left, int right)
  11885. - {
  11886. -   unsigned this_box;
  11887. -   bounding_box_list_type boxes 
  11888. -     = find_outline_bbs (*b, false, left, right);
  11889. -   
  11890. -   for (this_box = 0; this_box < BB_LIST_LENGTH (boxes); this_box++)
  11891. -     {
  11892. -       bounding_box_type bb = BB_LIST_ELT (boxes, this_box);
  11893. -       
  11894. -       /* If the bounding box encloses the entire character, we don't
  11895. -           have to bother checking how black it is.  */
  11896. -           
  11897. -       if (!(BB_WIDTH (bb) == BITMAP_WIDTH (*b)
  11898. -             && BB_HEIGHT (bb) == BITMAP_HEIGHT (*b)))
  11899. -         {
  11900. -           real average_gray;
  11901. -           unsigned this_row, this_col;
  11902. -           unsigned black_count = 0;
  11903. -           unsigned total_pixels = BB_WIDTH (bb) * BB_HEIGHT (bb);
  11904. -           
  11905. -           for (this_row = MIN_ROW (bb); this_row <= MAX_ROW (bb); this_row++)
  11906. -             for (this_col = MIN_COL (bb); this_col < MAX_COL (bb); this_col++)
  11907. -               {
  11908. -                 if (BITMAP_PIXEL (*b, this_row, this_col) == BLACK)
  11909. -                   black_count++;
  11910. -               }
  11911. -           average_gray = (real) black_count / total_pixels;
  11912. -           if (print_clean_info)
  11913. -             fprintf (stderr, "\nCleaning %ux%u:", BITMAP_WIDTH (*b),
  11914. -                      BITMAP_HEIGHT (*b)); 
  11915. -       if (average_gray >= clean_threshold)
  11916. -             {
  11917. -               if (print_clean_info)
  11918. -                 fprintf (stderr, " clearing %.2f. ", average_gray);
  11919. -               for (this_row = MIN_ROW (bb); this_row <= MAX_ROW (bb);
  11920. -                    this_row++)
  11921. -                 for (this_col = MIN_COL (bb); this_col < MAX_COL (bb);
  11922. -                      this_col++)
  11923. -                   BITMAP_PIXEL (*b, this_row, this_col) = WHITE;
  11924. -             }
  11925. -           else if (print_clean_info)
  11926. -             fprintf (stderr, " omitting %.2f. ", average_gray);
  11927. -         }
  11928. -     }
  11929. - }
  11930. - /* Read an IFI file, which gives us some information about the
  11931. -    image we are going to read.  If `info_filename' is set (which the
  11932. -    user can do), use that for the name; otherwise, construct it from the
  11933. -    font name.
  11934. -    
  11935. -    See the documentation for full details and examples of IFI files.
  11936. -    Here we just sketch the bare bones.
  11937. -    
  11938. -    Each (non-blank, non-comment) line in this file represents a
  11939. -    ``character'' in the image, and has one to five entries, separated by
  11940. -    spaces and/or tabs.  Comments start with `%' and continue to the end
  11941. -    of the line.
  11942. -    
  11943. -    The first entry represents the character code.  See the documentation
  11944. -    for the various forms of charcodes.  We also allow `.notdef', meaning
  11945. -    the ``character'' should not be output in the font.  
  11946. -    
  11947. -    The second entry, if it exists, is an adjustment to the
  11948. -    baseline.  We move the baseline down for negative numbers, and up
  11949. -    for positive ones.  Default is zero.
  11950. -    
  11951. -    The third entry, if it exists, is the number of bounding boxes that
  11952. -    comprise this character.  If it is negative, the bounding boxes
  11953. -    are not consecutive in the image; instead, they alternate with
  11954. -    bounding boxes for some other character.
  11955. -    
  11956. -    The fourth and fifth entries, if they exist, are the left and right
  11957. -    side bearings, respectively.  */
  11958. -    
  11959. - static image_char_list_type
  11960. - read_ifi_file (unsigned *total_count)
  11961. - {
  11962. -   string line;
  11963. -   int bb_count;
  11964. -   image_char_list_type image_char_list = new_image_char_list ();
  11965. -   encoding_info_type encoding_info 
  11966. -     = read_encoding_file (encoding_name ? : DEFAULT_ENCODING);
  11967. -   
  11968. -   libfile_start (info_filename ? : input_rootname, "ifi");
  11969. -   *total_count = 0;
  11970. -   while ((line = libfile_line ()) != NULL)
  11971. -     {
  11972. -       image_char_type c;
  11973. -       string baseline_adjust_str, bb_count_str, charname;
  11974. -       string lsb_str, rsb_str;
  11975. -       string save_line = line; /* So we can free it.  */
  11976. -       
  11977. -       /* The character name.  */
  11978. -       charname = strtok (line, " \t");
  11979. -       
  11980. -       /* `libfile_line' should never return an empty line.  */
  11981. -       assert (charname != NULL);
  11982. -       
  11983. -       if (STREQ (charname, ".notdef"))
  11984. -         IMAGE_CHAR_OMIT (c) = true;
  11985. -       else
  11986. -         {
  11987. -           int n = encoding_number (encoding_info, charname);
  11988. -           
  11989. -           if (n == -1)
  11990. -             {
  11991. -               WARNING2 ("Character `%s' undefined in encoding %s",
  11992. -                         charname, ENCODING_SCHEME_NAME (encoding_info));
  11993. -               IMAGE_CHAR_OMIT (c) = true;
  11994. -         }
  11995. -           else
  11996. -             {
  11997. -               IMAGE_CHARCODE (c) = n;
  11998. -               IMAGE_CHARNAME (c) = xstrdup (charname);
  11999. -               IMAGE_CHAR_OMIT (c) = false;
  12000. -         }
  12001. -         }
  12002. -       /* The baseline adjustment.  */
  12003. -       baseline_adjust_str = strtok (NULL, " \t");
  12004. -       IMAGE_CHAR_BASELINE_ADJUST (c)
  12005. -         = baseline_adjust_str == NULL ? 0 : atoi (baseline_adjust_str);
  12006. -       
  12007. -       /* The bounding box count.  */
  12008. -       bb_count_str = strtok (NULL, " \t");
  12009. -       bb_count = bb_count_str == NULL ? 1 : atoi (bb_count_str);
  12010. -       
  12011. -       if (bb_count < 0)
  12012. -         {
  12013. -           IMAGE_CHAR_BB_COUNT (c) = -bb_count;
  12014. -           IMAGE_CHAR_BB_ALTERNATING (c) = true;
  12015. -         }
  12016. -       else
  12017. -         {
  12018. -           IMAGE_CHAR_BB_COUNT (c) = bb_count;
  12019. -           IMAGE_CHAR_BB_ALTERNATING (c) = false;
  12020. -         }
  12021. -       /* The left side bearing.  */
  12022. -       lsb_str = strtok (NULL, " \t");
  12023. -       IMAGE_CHAR_LSB (c) = lsb_str == NULL ? 0 : atoi (lsb_str);
  12024. -       
  12025. -       /* The right side bearing.  */
  12026. -       rsb_str = strtok (NULL, " \t");
  12027. -       IMAGE_CHAR_RSB (c) = rsb_str == NULL ? 0 : atoi (rsb_str);
  12028. -       
  12029. -       *total_count += IMAGE_CHAR_BB_COUNT (c);
  12030. -       append_image_char (&image_char_list, c);
  12031. -       free (save_line);
  12032. -     }
  12033. -   
  12034. -   libfile_close ();
  12035. -   return image_char_list;
  12036. - }
  12037.   /* We are semi-clever about printing this, for the sake of huge images.  */
  12038.   
  12039. --- 181,184 ----
  12040. ***************
  12041. *** 845,858 ****
  12042.   "baselines <row1>,<row2>,...: define the baselines for each image row.
  12043.     The baseline of the first image row is taken to be scanline <row1>, etc.
  12044. - clean-threshold <percent>: if a bounding box encloses more black than
  12045. -   this, it is cleared; default is 60.
  12046.   designsize <real>: set the designsize of the font to <real>; default is 10.0.
  12047.   dpi <unsigned>: resolution (required for pbm input).
  12048.   encoding <filename>: read ligature and other encoding information
  12049. !   from `<filename>.enc'; the default is " DEFAULT_ENCODING ".
  12050.   epsf: write the image as an Encapsulated PostScript file, instead of a
  12051.     bitmap font.
  12052.   help: print this message.
  12053. ! info-file <filename>: use <filename>.ifi (if <filename doesn't have a
  12054.     suffix; otherwise use <filename>) for the IFI filename; default is
  12055.     `<font_name>.ifi'.
  12056. --- 227,238 ----
  12057.   "baselines <row1>,<row2>,...: define the baselines for each image row.
  12058.     The baseline of the first image row is taken to be scanline <row1>, etc.
  12059.   designsize <real>: set the designsize of the font to <real>; default is 10.0.
  12060.   dpi <unsigned>: resolution (required for pbm input).
  12061.   encoding <filename>: read ligature and other encoding information
  12062. !   from `<filename>.enc'; the default is to assign successive character codes.
  12063.   epsf: write the image as an Encapsulated PostScript file, instead of a
  12064.     bitmap font.
  12065.   help: print this message.
  12066. ! ifi-file <filename>: use <filename>.ifi (if <filename doesn't have a
  12067.     suffix; otherwise use <filename>) for the IFI filename; default is
  12068.     `<font_name>.ifi'.
  12069. ***************
  12070. *** 866,872 ****
  12071.     use <font_name> for <filename>.
  12072.   print-clean-info: print gray values for the bounding boxes that are
  12073. !   considered for cleaning.
  12074.   print-guidelines: print the numbers of the top and bottom rows (in that
  12075. !   order) of each character.  This implies `verbose'.
  12076.   range <char1>-<char2>: only process characters between <char1> and
  12077.     <char2>, inclusive. 
  12078. --- 246,252 ----
  12079.     use <font_name> for <filename>.
  12080.   print-clean-info: print gray values for the bounding boxes that are
  12081. !   considered for cleaning.  This implies `-verbose'.
  12082.   print-guidelines: print the numbers of the top and bottom rows (in that
  12083. !   order) of each character.  This implies `-verbose'.
  12084.   range <char1>-<char2>: only process characters between <char1> and
  12085.     <char2>, inclusive. 
  12086. ***************
  12087. *** 874,878 ****
  12088.     instead of using an IFI file to analyze the image.
  12089.   trace-scanlines: show every scanline as we read it.
  12090. ! verbose: output progress reports to stderr.
  12091.   version: print the version number of this program.
  12092.   "
  12093. --- 254,258 ----
  12094.     instead of using an IFI file to analyze the image.
  12095.   trace-scanlines: show every scanline as we read it.
  12096. ! verbose: output progress reports.
  12097.   version: print the version number of this program.
  12098.   "
  12099. ***************
  12100. *** 886,896 ****
  12101.     struct option long_options[]
  12102.       = { { "baselines",        1, 0, 0 },
  12103. -         { "clean-threshold",    1, 0, 0 },
  12104.           { "designsize",        1, 0, 0 },
  12105.           { "encoding",        1, 0, 0 },
  12106. !         { "epsf",        0, (int *) &do_epsf, 1 },
  12107.           { "help",               0, 0, 0 },
  12108.       { "dpi",        1, 0, 0 },
  12109. !         { "info-file",        1, 0, 0 },
  12110.           { "nchars",        1, 0, 0 },
  12111.           { "input-format",    1, 0, 0 },
  12112. --- 266,275 ----
  12113.     struct option long_options[]
  12114.       = { { "baselines",        1, 0, 0 },
  12115.           { "designsize",        1, 0, 0 },
  12116.           { "encoding",        1, 0, 0 },
  12117. !         { "epsf",        0, (int *) &output_epsf, 1 },
  12118.           { "help",               0, 0, 0 },
  12119.       { "dpi",        1, 0, 0 },
  12120. !         { "ifi-file",        1, 0, 0 },
  12121.           { "nchars",        1, 0, 0 },
  12122.           { "input-format",    1, 0, 0 },
  12123. ***************
  12124. *** 919,925 ****
  12125.         if (ARGUMENT_IS ("baselines"))
  12126.           baseline_list = scan_unsigned_list (optarg);
  12127. -         
  12128. -       else if (ARGUMENT_IS ("clean-threshold"))
  12129. -         clean_threshold = GET_PERCENT (optarg);
  12130.         
  12131.         else if (ARGUMENT_IS ("designsize"))
  12132. --- 298,301 ----
  12133. ***************
  12134. *** 942,947 ****
  12135.           }
  12136.   
  12137. !       else if (ARGUMENT_IS ("info-file"))
  12138. !         info_filename = optarg;
  12139.   
  12140.         else if (ARGUMENT_IS ("input-format"))
  12141. --- 318,323 ----
  12142.           }
  12143.   
  12144. !       else if (ARGUMENT_IS ("ifi-file"))
  12145. !         ifi_filename = optarg;
  12146.   
  12147.         else if (ARGUMENT_IS ("input-format"))
  12148. ***************
  12149. *** 962,966 ****
  12150.           output_name = optarg;
  12151.   
  12152. !       else if (ARGUMENT_IS ("print-guidelines"))
  12153.           verbose = true;
  12154.   
  12155. --- 338,343 ----
  12156.           output_name = optarg;
  12157.   
  12158. !       else if (ARGUMENT_IS ("print-clean-info")
  12159. !                || ARGUMENT_IS ("print-guidelines"))
  12160.           verbose = true;
  12161.   
  12162. ***************
  12163. *** 974,979 ****
  12164.       }
  12165.     
  12166. !   if (do_strips && do_epsf)
  12167. !     FATAL ("Sorry, -strips and -epsf are mutually exclusive");
  12168.   
  12169.     FINISH_COMMAND_LINE ();
  12170. --- 351,356 ----
  12171.       }
  12172.     
  12173. !   if (do_strips && output_epsf)
  12174. !     FATAL ("imageto: Sorry, -strips and -epsf are mutually exclusive");
  12175.   
  12176.     FINISH_COMMAND_LINE ();
  12177. ***************
  12178. *** 994,998 ****
  12179.   
  12180.     /* Try to guess based on FILENAME.  */
  12181. !   input_extension = find_suffix (filename);
  12182.   
  12183.     if (STREQ (input_extension, "img"))
  12184. --- 371,375 ----
  12185.   
  12186.     /* Try to guess based on FILENAME.  */
  12187. !   input_extension = find_suffix (filename) ? : "";
  12188.   
  12189.     if (STREQ (input_extension, "img"))
  12190. ***************
  12191. *** 1006,1018 ****
  12192.         fprintf (stderr, "You must supply an input format.\n");
  12193.         fprintf (stderr, "(I can't guess from the filename `%s'.)\n", filename);
  12194. -       fprintf (stderr, "For more information, use ``-help''.\n");
  12195. -       exit (1);
  12196. -     }
  12197. -   /* If the input format is PBM, then they must also tell us the dpi.  */
  12198. -   if (image_open_input_file == pbm_open_input_file 
  12199. -       && image_header.hres == 0)
  12200. -     {
  12201. -       fprintf (stderr, "If you use PBM format, you must supply the dpi.\n");
  12202.         fprintf (stderr, "For more information, use ``-help''.\n");
  12203.         exit (1);
  12204. --- 383,386 ----
  12205. diff -Nrc2 fontutils-0.5/imageto/main.h fontutils-0.6/imageto/main.h
  12206. *** fontutils-0.5/imageto/main.h    Mon Jun 15 07:57:07 1992
  12207. --- fontutils-0.6/imageto/main.h    Fri Oct  2 17:13:10 1992
  12208. ***************
  12209. *** 25,31 ****
  12210.   
  12211.   /* See main.c for explanations of these globals.  */
  12212. ! extern real design_size;
  12213. ! extern boolean trace_scanlines, verbose, debug;
  12214.   extern image_header_type image_header;
  12215.   
  12216.   /* Generic routines to manipulate the image.  */
  12217. --- 25,31 ----
  12218.   
  12219.   /* See main.c for explanations of these globals.  */
  12220. ! extern boolean trace_scanlines;
  12221.   extern image_header_type image_header;
  12222. + extern string input_name;
  12223.   
  12224.   /* Generic routines to manipulate the image.  */
  12225. diff -Nrc2 fontutils-0.5/imageto/out-chars.c fontutils-0.6/imageto/out-chars.c
  12226. *** fontutils-0.5/imageto/out-chars.c
  12227. --- fontutils-0.6/imageto/out-chars.c    Fri Oct 23 11:13:31 1992
  12228. ***************
  12229. *** 0 ****
  12230. --- 1,604 ----
  12231. + /* out-chars.c: try to extract the real characters from the image.
  12232. + Copyright (C) 1992 Free Software Foundation, Inc.
  12233. + This program is free software; you can redistribute it and/or modify
  12234. + it under the terms of the GNU General Public License as published by
  12235. + the Free Software Foundation; either version 2, or (at your option)
  12236. + any later version.
  12237. + This program is distributed in the hope that it will be useful,
  12238. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  12239. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12240. + GNU General Public License for more details.
  12241. + You should have received a copy of the GNU General Public License
  12242. + along with this program; if not, write to the Free Software
  12243. + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
  12244. + #include "config.h"
  12245. + #include "bb-outline.h"
  12246. + #include "gf.h"
  12247. + #include "report.h"
  12248. + #include "bitmap2.h"
  12249. + #include "extract.h"
  12250. + #include "ifi.h"
  12251. + #include "image-header.h"
  12252. + #include "main.h"
  12253. + #include "out-strips.h"
  12254. + /* A list of the image rows on which the baselines occur.  The end of
  12255. +    the list is marked with an element -1.  (-baselines)  */
  12256. + int *baseline_list = NULL;
  12257. + /* Find about this many characters in the image, then stop.  This is
  12258. +    useful only for testing, because converting the entire image takes a long
  12259. +    time.  So we might in truth output a few more characters than
  12260. +    specified here.  (-nchars)  */
  12261. + unsigned nchars_wanted = MAX_CHARCODE + 1;
  12262. + /* If set, prints diagnostics about which boxes are and aren't cleaned. 
  12263. +    (-print-clean-info)  */ 
  12264. + boolean print_clean_info = false;
  12265. + /* Says whether to print the row numbers of each character as we go, 
  12266. +    so that the user can decide how to adjust jumping baselines. 
  12267. +    (-print-guidelines)  */
  12268. + boolean print_guidelines = false;
  12269. + /* Says which characters to output.  This is independent of the
  12270. +    ordering in the font file.  (-range) */
  12271. + int starting_char = 0;
  12272. + int ending_char = MAX_CHARCODE;
  12273. + /* The design size of the font we're creating.  */
  12274. + static real design_size;
  12275. + /* Where the baseline of the current row is in the image.  The first row
  12276. +    is #1, and so on.  We start over at row 1 at each image row.*/
  12277. + static unsigned row_baseline;
  12278. + static unsigned row_height;
  12279. + /* How many boxes total the characters take up.  */
  12280. + static unsigned total_boxes_expected;
  12281. + static boolean bb_equal_p (bounding_box_type, bounding_box_type);
  12282. + static gf_char_type bitmap_to_gf_char
  12283. +   (bitmap_type, real, bounding_box_type, image_char_type);
  12284. + static void clean_bitmap (bitmap_type *, bb_list_type);
  12285. + static boolean do_image_line
  12286. +   (bitmap_type, unsigned *, unsigned *, real, image_char_list_type);
  12287. + static void image_to_bitmap_bbs (bb_list_type *);
  12288. + extern void offset_bb_list (bb_list_type *l, int offset);
  12289. + static unsigned output_chars
  12290. +   (bb_list_type, bitmap_type, real, image_char_list_type, unsigned);
  12291. + /* Analyze the input image, outputting the characters we find.  */
  12292. + void
  12293. + write_image_chars (image_header_type image_header, real ds)
  12294. + {
  12295. +   bitmap_type *image_bitmap;
  12296. +   unsigned nchars_done = 0;
  12297. +   /* Read the image information.  This tells us to which character
  12298. +        each bounding box belongs, among other things.  */
  12299. +   image_char_list_type image_char_list = read_ifi_file (&total_boxes_expected);
  12300. +   /* Remember this so we don't need to pass it through all the
  12301. +      intervening routines to the low-level output.  */
  12302. +   design_size = ds;
  12303. +   
  12304. +   /* The main loop also (and more commonly) exits when we've read the
  12305. +      entire image.  */ 
  12306. +   while (nchars_done < nchars_wanted)
  12307. +     {
  12308. +       unsigned *transitions;
  12309. +       /* Read one line of characters in the image.  After this,
  12310. +          `image_bitmap' is, for example, `a...z', with blank columns at
  12311. +          the left and right.  Whatever is in the original image.  */
  12312. +       image_bitmap
  12313. +         = some_black_to_all_white_row (image_header.width, &transitions);
  12314. +       if (image_bitmap == NULL)
  12315. +         break; /* We've read the whole image file.  */
  12316. +       if (baseline_list == NULL || *baseline_list == -1)
  12317. +         {
  12318. +          if (baseline_list != NULL)
  12319. +             WARNING ("imageto: Not enough baselines specified");
  12320. +           row_baseline = 0;
  12321. +         }
  12322. +       else
  12323. +         row_baseline = *baseline_list++;
  12324. +       row_height = BITMAP_HEIGHT (*image_bitmap);
  12325. +       /* If `do_image_line' fails, we're supposed to read the next
  12326. +          row in the image, and put it below the current line.  For
  12327. +          example, if a line has only an `!' on it, we will only get
  12328. +          the stem on the first call to `some_black_to_all_white_row'.  
  12329. +          We want to get the dot in there, too.  */
  12330. +       while (!do_image_line (*image_bitmap, transitions, &nchars_done,
  12331. +                              (real) image_header.hres, image_char_list))
  12332. +         {
  12333. +           bitmap_type *revised
  12334. +             = append_next_image_row (*image_bitmap, image_header.width,
  12335. +                                      &transitions);
  12336. +           if (revised == NULL)
  12337. +             {
  12338. +               WARNING ("imageto: Image ended in the midst of a character");
  12339. +               break;
  12340. +             }
  12341. +           /* Tell the user the image row didn't end on a character.  */
  12342. +           REPORT ("+");
  12343. +           free_bitmap (image_bitmap);
  12344. +           image_bitmap = revised;
  12345. +           if (baseline_list == NULL)
  12346. +             row_baseline = 0;
  12347. +      row_height = BITMAP_HEIGHT (*image_bitmap);
  12348. +         }
  12349. +       free_bitmap (image_bitmap);
  12350. +     }
  12351. + }
  12352. + /* Analyze and output all of the bitmap IMAGE, which is one line of type
  12353. +    in the original.  The resolution of the image is H_RESOLUTION, and
  12354. +    we've read NCHARS characters so far.  We use IMAGE_CHAR_LIST and the
  12355. +    transition vector TRANSITIONS, which has in it how IMAGE breaks into
  12356. +    characters.
  12357. +    
  12358. +    We return false if we need to be given another image row.  */
  12359. + #define NEXT_TRANSITION()  ({                        \
  12360. +   if (*transitions == BITMAP_WIDTH (image) + 1)                \
  12361. +     {                                    \
  12362. +       WARNING ("imageto: Expected more transitions");            \
  12363. +       break;                                \
  12364. +     }                                    \
  12365. +   *transitions++;                            \
  12366. + })
  12367. + static boolean
  12368. + do_image_line (bitmap_type image, unsigned *transitions, unsigned *nchars, 
  12369. +                real h_resolution, image_char_list_type image_char_list)
  12370. + {
  12371. +   static unsigned box_count = 0;
  12372. +   bounding_box_type bb;
  12373. +   
  12374. +   /* We always use the entire image line vertically.  */
  12375. +   MIN_ROW (bb) = 0;
  12376. +   MAX_ROW (bb) = BITMAP_HEIGHT (image) - 1;
  12377. +   
  12378. +   /* `nchars_wanted' is an option to the program, defined at the top.  */
  12379. +   while (*nchars < nchars_wanted && *transitions != BITMAP_WIDTH (image) + 1)
  12380. +     {
  12381. +       int bb_offset = 0;
  12382. +       unsigned original_box_count = box_count;
  12383. +       bb_list_type boxes = bb_list_init ();
  12384. +       bitmap_type *char_bitmap = XTALLOC1 (bitmap_type);
  12385. +       bitmap_type *temp_bitmap = XTALLOC1 (bitmap_type);
  12386. +       /* The first element of TRANSITIONS is white-to-black.
  12387. +          Thereafter, they alternate.  */
  12388. +       MIN_COL (bb) = NEXT_TRANSITION ();
  12389. +       MAX_COL (bb) = NEXT_TRANSITION ();
  12390. +       
  12391. +       /* After this, `char_bitmap' might be just an `a' (with blank
  12392. +          rows above and below, because `a' has neither a descender nor
  12393. +          an ascender), then `b', and so on.  In many specimens, some
  12394. +          characters overlap; for example, we might get `ij' as one
  12395. +          bitmap, instead of `i' and then `j'.  */
  12396. +       *char_bitmap = extract_subbitmap (image, bb);
  12397. +       *temp_bitmap = copy_bitmap (*char_bitmap);
  12398. +       while (true)
  12399. +         {
  12400. +           bb_list_type temp_boxes;
  12401. +           bounding_box_type previous_bb;
  12402. +           /* If we've read all the bounding boxes expected, we're done.  */
  12403. +           if (box_count == total_boxes_expected)
  12404. +             break;
  12405. +           /* If we've read more than we expected to, we're in trouble.  */
  12406. +           if (box_count > total_boxes_expected)
  12407. +             {
  12408. +               WARNING2 ("imageto: Read box #%u but expected only %u",
  12409. +                         box_count, total_boxes_expected);
  12410. +               /* No point in giving this message more than once.  */
  12411. +               total_boxes_expected = INT_MAX;
  12412. +             }
  12413. +           /* Find bounding boxes around all the shapes in `char_bitmap'.
  12414. +              Continuing the `ij' example, this would result in four
  12415. +              bounding boxes (one for each dot, one for the dotless `i',
  12416. +              and one for the dotless `j').  */
  12417. +           temp_boxes = find_outline_bbs (*temp_bitmap, false, 0, 0);
  12418. +           /* The subimages we've created all start at column zero.  But
  12419. +              we want to put the images side-by-side, instead of
  12420. +              overlaying them.  So we change the bounding box numbers.  */
  12421. +           offset_bb_list (&temp_boxes, bb_offset);
  12422. +           box_count += BB_LIST_LENGTH (temp_boxes);
  12423. +           bb_list_splice (&boxes, temp_boxes);
  12424. +           /* If the white column was at the end of a character, exit the
  12425. +              loop to output what we've got..  */
  12426. +           if (box_at_char_boundary_p (image_char_list, *nchars,
  12427. +                                       box_count - original_box_count))
  12428. +             break;
  12429. +           /* If we're at the end of the image row, tell our caller that
  12430. +              we had to quit in the middle of a character.  */
  12431. +       if (*transitions == BITMAP_WIDTH (image) + 1)
  12432. +             { /* Forget that we've seen this before.  */
  12433. +               box_count = original_box_count;
  12434. +               return false;
  12435. +             }
  12436. +       previous_bb = bb;
  12437. +       MIN_COL (bb) = NEXT_TRANSITION ();
  12438. +           MAX_COL (bb) = NEXT_TRANSITION ();
  12439. +           
  12440. +       /* Leave in the white space between the character parts.  */
  12441. +       MIN_COL (bb) = MAX_COL (previous_bb);
  12442. +           
  12443. +       free_bitmap (temp_bitmap);
  12444. +           *temp_bitmap = extract_subbitmap (image, bb);
  12445. +           if (temp_bitmap == NULL)
  12446. +             {
  12447. +               WARNING1 ("imageto: Expected more bounding boxes for `%d'",
  12448. +                        IMAGE_CHARCODE (IMAGE_CHAR (image_char_list, *nchars)));
  12449. +               break;
  12450. +             }
  12451. +           /* The boxes `temp_bitmap' should be just to the right of the
  12452. +              bitmap we've accumulated in `char_bitmap'.  This happens
  12453. +              above, next time through the loop.  */
  12454. +           bb_offset = BITMAP_WIDTH (*char_bitmap);
  12455. +       /* When this happens, it usually means that the IFI file
  12456. +              didn't specify enough bounding boxes for some character,
  12457. +              and so things are out of sync.  */
  12458. +           if (BITMAP_HEIGHT (*char_bitmap) != BITMAP_HEIGHT (*temp_bitmap))
  12459. +             {
  12460. +               WARNING ("imageto: Line ended inside a character");
  12461. +               break;
  12462. +             }
  12463. +           bitmap_concat (char_bitmap, *temp_bitmap);
  12464. +         }  /* while (true) */
  12465. +         
  12466. +       free_bitmap (temp_bitmap);
  12467. +       /* Convert the bits inside those bounding boxes into one (if not
  12468. +          overlapping with another) or more (if overlapping) characters
  12469. +      in the GF font.  */
  12470. +       *nchars += output_chars (boxes, *char_bitmap, h_resolution,
  12471. +                                image_char_list, *nchars);
  12472. +       free_bitmap (char_bitmap);
  12473. +       bb_list_free (&boxes);
  12474. +     }
  12475. +   
  12476. +   return true;
  12477. + }
  12478. + /* Move all the elements in BB_LIST to the right by OFFSET.  */
  12479. + void
  12480. + offset_bb_list (bb_list_type *bb_list, int offset)
  12481. + {
  12482. +   unsigned this_bb;
  12483. +   
  12484. +   for (this_bb = 0; this_bb < BB_LIST_LENGTH (*bb_list); this_bb++)
  12485. +     {
  12486. +       bounding_box_type *bb = &BB_LIST_ELT (*bb_list, this_bb);
  12487. +       MIN_COL (*bb) += offset;
  12488. +       MAX_COL (*bb) += offset;
  12489. +     }
  12490. + }
  12491. + /* Return true if BB1 and BB2 are equal.  */
  12492. + static boolean
  12493. + bb_equal_p (bounding_box_type bb1, bounding_box_type bb2)
  12494. + {
  12495. +   return
  12496. +     MIN_COL (bb1) == MIN_COL (bb2)
  12497. +     && MIN_ROW (bb1) == MIN_ROW (bb2)
  12498. +     && MAX_COL (bb1) == MAX_COL (bb2)
  12499. +     && MAX_ROW (bb1) == MAX_ROW (bb2);
  12500. + }
  12501. + /* For each bounding box in the list BOXES, extract from IMAGE_BITMAP
  12502. +    and turn the resulting bitmap into a single character in the font. 
  12503. +    The information in IMAGE_CHAR_LIST maps bounding boxes to character codes;
  12504. +    consecutive bounding boxes may belong to the same character.  For
  12505. +    example, `i' will appear twice, once for the dot and once for the
  12506. +    stem.  We assume that all the bounding boxes for a given character
  12507. +    will appear in IMAGE_BITMAP.
  12508. +    
  12509. +    We return the number of characters (not bounding boxes) found,
  12510. +    including characters that were omitted.  */
  12511. + /* Predicate to tell us if we want to actually write the character.  */
  12512. + #define OUTPUT_CHAR_P(code, image_char)                    \
  12513. +   ((code) >= starting_char && (code) <= ending_char            \
  12514. +    && !IMAGE_CHAR_OMIT (image_char))
  12515. + static unsigned
  12516. + output_chars (bb_list_type boxes, bitmap_type image_bitmap, 
  12517. +           real h_resolution, image_char_list_type image_char_list,
  12518. +               unsigned current_char)
  12519. + {  
  12520. +   static unsigned char_count = 0;
  12521. +   int this_box; /* Because we might have to subtract when it's zero.  */
  12522. +   boolean done[BB_LIST_LENGTH (boxes)];
  12523. +   /* Since we report (a lot) more information when `print_guidelines' is
  12524. +      true, we can fit fewer characters per line.  */
  12525. +   unsigned nchars_per_line = print_guidelines ? 1 : 11;
  12526. +   unsigned nchars_written = 0;
  12527. +   
  12528. +   for (this_box = 0; this_box < BB_LIST_LENGTH (boxes); this_box++)
  12529. +     done[this_box] = false;
  12530. +   for (this_box = 0; this_box < BB_LIST_LENGTH (boxes); this_box++)
  12531. +     {
  12532. +       bounding_box_type bb;
  12533. +       bitmap_type bitmap;
  12534. +       image_char_type c;
  12535. +       charcode_type charcode;
  12536. +       bb_list_type bb_list = bb_list_init ();
  12537. +       
  12538. +       /* `done[this_box]' will be set if we get to a bounding box that
  12539. +          has already been combined with a previous one, because of
  12540. +          an alternating combination.  Since we never go backwards, we
  12541. +          don't bother to set `done' for every box we look at.  */
  12542. +       if (done[this_box])
  12543. +         continue;
  12544. +         
  12545. +       c = IMAGE_CHAR (image_char_list, current_char++);
  12546. +       charcode = IMAGE_CHARCODE (c);
  12547. +       
  12548. +       REPORT ("[");
  12549. +       /* Only bother to collect the character image if we're going to
  12550. +          output it; otherwise, it just wastes a lot of time and space.  */
  12551. +       if (OUTPUT_CHAR_P (charcode, c))
  12552. +         { /* A character consisting of zero bounding boxes is invisible;
  12553. +              e.g., a space.  We don't want to read any of the bitmap for
  12554. +              such a thing.  */
  12555. +           if (IMAGE_CHAR_BB_COUNT (c) == 0)
  12556. +             {
  12557. +               BITMAP_HEIGHT (bitmap) = 0;
  12558. +               BITMAP_WIDTH (bitmap) = 0;
  12559. +               BITMAP_BITS (bitmap) = NULL;
  12560. +               bb = (bounding_box_type) { 0, 0, 0, 0 };
  12561. +               
  12562. +               /* Since we're not eating up any bounding boxes,
  12563. +                  reconsider the current one.  */
  12564. +               this_box--;
  12565. +             }
  12566. +           else
  12567. +             {
  12568. +               bb = BB_LIST_ELT (boxes, this_box);
  12569. +               bitmap = extract_subbitmap (image_bitmap, bb);
  12570. +               bb_list_append (&bb_list, bb);
  12571. +             }
  12572. +         }
  12573. +       while (IMAGE_CHAR_BB_COUNT (c)-- > 1)
  12574. +         {
  12575. +           unsigned combine_box;
  12576. +           
  12577. +           if (IMAGE_CHAR_BB_ALTERNATING (c))
  12578. +             {
  12579. +               /* Don't increment `this_box', since it is incremented at
  12580. +                  the end of the loop, and the next box is part of
  12581. +                  another character.  */
  12582. +               combine_box = this_box + 2;
  12583. +               /* Don't look at the second box again in the outer loop.  */
  12584. +               done[combine_box] = true;
  12585. +             }
  12586. +           else
  12587. +             combine_box = ++this_box;
  12588. +           if (combine_box >= BB_LIST_LENGTH (boxes))
  12589. +             {
  12590. +               WARNING1 ("imageto: Not enough outlines for char %u",
  12591. +                         (unsigned) charcode);
  12592. +               break;
  12593. +             }
  12594. +           if (OUTPUT_CHAR_P (charcode, c))
  12595. +             {
  12596. +               /* Get the shape to combine with `bitmap'.  */
  12597. +               bounding_box_type next_bb = BB_LIST_ELT (boxes, combine_box);
  12598. +               bitmap_type next_bitmap
  12599. +                 = extract_subbitmap (image_bitmap, next_bb);
  12600. +               bb_list_append (&bb_list, next_bb);
  12601. +               combine_images (&bitmap, next_bitmap, &bb, next_bb);
  12602. +               free_bitmap (&next_bitmap);
  12603. +             }
  12604. +         }
  12605. +       
  12606. +       if (OUTPUT_CHAR_P (charcode, c))
  12607. +         {
  12608. +           gf_char_type gf_char;
  12609. +           
  12610. +           if (BITMAP_BITS (bitmap) != NULL)
  12611. +             clean_bitmap (&bitmap, bb_list);
  12612. +           gf_char = bitmap_to_gf_char (bitmap, h_resolution, bb, c);
  12613. +           gf_put_char (gf_char);
  12614. +           /* This and the GF character's bitmap are the same, so we only
  12615. +              need to free one of the two.  */
  12616. +           if (BITMAP_BITS (bitmap) != NULL)
  12617. +             free_bitmap (&bitmap);
  12618. +         }
  12619. +       else
  12620. +         REPORT ("x"); /* We're ignoring this character.  */
  12621. +       REPORT1 ("]%c", ++char_count % nchars_per_line ? ' ' : '\n');
  12622. +       nchars_written++;
  12623. +       
  12624. +       bb_list_free (&bb_list);
  12625. +     }
  12626. +   
  12627. +   return nchars_written;
  12628. + }
  12629. + /* Remove bits of adjacent characters that may have crept into B because
  12630. +    of overlapping characters in the original image.  KNOWN_BOXES lists
  12631. +    all the known parts of B; if we find other bounding boxes in B, we
  12632. +    remove them.  */
  12633. + static void
  12634. + clean_bitmap (bitmap_type *b, bb_list_type known_boxes)
  12635. + {
  12636. +   unsigned test;
  12637. +   bb_list_type test_boxes = find_outline_bbs (*b, false, BITMAP_WIDTH (*b), 0);
  12638. +   if (print_clean_info)
  12639. +     REPORT2 ("Cleaning %ux%u bitmap:\n",
  12640. +              BITMAP_WIDTH (*b), BITMAP_HEIGHT (*b));
  12641. +   /* Convert KNOWN_BOXES to the same coordinates as `test_boxes'.  */
  12642. +   image_to_bitmap_bbs (&known_boxes);
  12643. +   
  12644. +   for (test = 0; test < BB_LIST_LENGTH (test_boxes); test++)
  12645. +     {
  12646. +       unsigned known;
  12647. +       unsigned known_length = BB_LIST_LENGTH (known_boxes);
  12648. +       bounding_box_type test_bb = BB_LIST_ELT (test_boxes, test);
  12649. +       if (print_clean_info)
  12650. +         REPORT4 ("  checking (%d,%d)-(%d,%d) ... ",
  12651. +                  MIN_COL (test_bb), MIN_ROW (test_bb),
  12652. +                  MAX_COL (test_bb), MAX_ROW (test_bb));
  12653. +       
  12654. +       /* If we want to keep `test_bb', it will be one of the elements of
  12655. +          BB_LIST.  Otherwise, it is a piece of an adjacent character,
  12656. +          and we should erase it.  */
  12657. +       for (known = 0; known < known_length && !bb_equal_p (test_bb,
  12658. +                                              BB_LIST_ELT (known_boxes, known));
  12659. +            known++)
  12660. +         ;
  12661. +       
  12662. +       if (known == known_length)
  12663. +         {
  12664. +           unsigned r;
  12665. +           int test_bb_width = BB_WIDTH (test_bb);
  12666. +           
  12667. +           assert (test_bb_width > 0);
  12668. +           
  12669. +           if (print_clean_info)
  12670. +             REPORT ("clearing.\n");
  12671. +           for (r = MIN_ROW (test_bb); r <= MAX_ROW (test_bb); r++)
  12672. +             {
  12673. +               one_byte *row = BITMAP_ROW (*b, r);
  12674. +               memset (row + MIN_COL (test_bb), 0, test_bb_width);
  12675. +             }
  12676. +         }
  12677. +       else if (print_clean_info)
  12678. +         REPORT ("keeping.\n");
  12679. +     }
  12680. + }
  12681. + /* Translate the elements of BOXES to the origin, i.e., shift each down
  12682. +    by the minimum row and column.  We use this in `clean_bitmap' to
  12683. +    change bounding boxes in the coordinates of the entire image to the
  12684. +    coordinates of the single character we are cleaning.  */
  12685. + static void
  12686. + image_to_bitmap_bbs (bb_list_type *boxes)
  12687. + {
  12688. +   unsigned b;
  12689. +   unsigned min_col = UINT_MAX;
  12690. +   unsigned min_row = UINT_MAX;
  12691. +   
  12692. +   /* First find the minimum row and column of all the bb's in BOXES.  */
  12693. +   for (b = 0; b < BB_LIST_LENGTH (*boxes); b++)
  12694. +     {
  12695. +       bounding_box_type bb = BB_LIST_ELT (*boxes, b);
  12696. +       
  12697. +       assert (MIN_COL (bb) >= 0 && MIN_ROW (bb) >= 0);
  12698. +       
  12699. +       MIN_EQUALS (min_col, MIN_COL (bb));
  12700. +       MIN_EQUALS (min_row, MIN_ROW (bb));
  12701. +     }
  12702. +   /* Now translate all the bb's by those minimums.  */
  12703. +   for (b = 0; b < BB_LIST_LENGTH (*boxes); b++)
  12704. +     {
  12705. +       bounding_box_type *bb = &BB_LIST_ELT (*boxes, b);
  12706. +       
  12707. +       MIN_COL (*bb) -= min_col;
  12708. +       MAX_COL (*bb) -= min_col;
  12709. +       MIN_ROW (*bb) -= min_row;
  12710. +       MAX_ROW (*bb) -= min_row;
  12711. +     }
  12712. + }
  12713. + /* Derive the information necessary to output the font character from
  12714. +    the bitmap B, and return it.  The resolution of the bitmap is given
  12715. +    in pixels per inch as H_RESOLUTION.  The bounding box BB encloses the
  12716. +    character in the image coordinates.  We use BB and the static
  12717. +    variables `row_baseline' and `row_height' to determine the
  12718. +    positioning of the GF character.  */
  12719. + #define BB_TO_CARTESIAN(x)                         \
  12720. +   (row_height - 1 - (x) - row_baseline                     \
  12721. +    - IMAGE_CHAR_BASELINE_ADJUST (image_char))
  12722. + static gf_char_type
  12723. + bitmap_to_gf_char (bitmap_type b, real h_resolution,
  12724. +                    bounding_box_type bb, image_char_type image_char)
  12725. + {
  12726. +   gf_char_type gf_char;
  12727. +   real width_in_points;
  12728. +   bounding_box_type cartesian_bb;  
  12729. +   charcode_type charcode = IMAGE_CHARCODE (image_char);
  12730. +   
  12731. +   MIN_ROW (cartesian_bb) = BB_TO_CARTESIAN (MAX_ROW (bb));
  12732. +   MAX_ROW (cartesian_bb) = BB_TO_CARTESIAN (MIN_ROW (bb));
  12733. +   
  12734. +   REPORT1 ("%u", charcode);
  12735. +   
  12736. +   GF_CHARCODE (gf_char) = charcode;
  12737. +   GF_BITMAP (gf_char) = b;
  12738. +   GF_CHAR_MIN_COL (gf_char) = IMAGE_CHAR_LSB (image_char);
  12739. +   GF_CHAR_MAX_COL (gf_char) = GF_CHAR_MIN_COL (gf_char) + BITMAP_WIDTH (b);
  12740. +   GF_CHAR_MIN_ROW (gf_char) = MIN_ROW (cartesian_bb);
  12741. +   GF_CHAR_MAX_ROW (gf_char) = MAX_ROW (cartesian_bb);
  12742. +   GF_H_ESCAPEMENT (gf_char) = (GF_CHAR_MAX_COL (gf_char)
  12743. +                                + IMAGE_CHAR_RSB (image_char));
  12744. +   width_in_points = GF_H_ESCAPEMENT (gf_char) * POINTS_PER_INCH / h_resolution;
  12745. +   GF_TFM_WIDTH (gf_char) = real_to_fix (width_in_points / design_size);
  12746. +   if (print_guidelines)
  12747. +     REPORT3 (" (%s) %d/%d",  IMAGE_CHARNAME (image_char),
  12748. +          MIN_ROW (cartesian_bb), MAX_ROW (cartesian_bb));
  12749. +   return gf_char;
  12750. + }
  12751. diff -Nrc2 fontutils-0.5/imageto/out-chars.h fontutils-0.6/imageto/out-chars.h
  12752. *** fontutils-0.5/imageto/out-chars.h
  12753. --- fontutils-0.6/imageto/out-chars.h    Sun Oct  4 11:15:39 1992
  12754. ***************
  12755. *** 0 ****
  12756. --- 1,34 ----
  12757. + /* out-chars.h: extract the characters from the image.
  12758. + Copyright (C) 1992 Free Software Foundation, Inc.
  12759. + This program is free software; you can redistribute it and/or modify
  12760. + it under the terms of the GNU General Public License as published by
  12761. + the Free Software Foundation; either version 2, or (at your option)
  12762. + any later version.
  12763. + This program is distributed in the hope that it will be useful,
  12764. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  12765. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12766. + GNU General Public License for more details.
  12767. + You should have received a copy of the GNU General Public License
  12768. + along with this program; if not, write to the Free Software
  12769. + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
  12770. + #ifndef OUT_CHARS_H
  12771. + #define OUT_CHARS_H
  12772. + #include "image-header.h"
  12773. + /* See out-chars.c.  */
  12774. + extern int *baseline_list;
  12775. + extern boolean print_clean_info, print_guidelines;
  12776. + extern unsigned nchars_wanted;
  12777. + extern int starting_char, ending_char;
  12778. + extern void write_image_chars (image_header_type, real design_size);
  12779. + #endif /* not OUT_CHARS_H */
  12780. diff -Nrc2 fontutils-0.5/imageto/out-epsf.c fontutils-0.6/imageto/out-epsf.c
  12781. *** fontutils-0.5/imageto/out-epsf.c
  12782. --- fontutils-0.6/imageto/out-epsf.c    Fri Oct 16 15:46:50 1992
  12783. ***************
  12784. *** 0 ****
  12785. --- 1,170 ----
  12786. + /* out-epsf.c: output the whole image as an EPS file.
  12787. + Copyright (C) 1992 Free Software Foundation, Inc.
  12788. + This program is free software; you can redistribute it and/or modify
  12789. + it under the terms of the GNU General Public License as published by
  12790. + the Free Software Foundation; either version 2, or (at your option)
  12791. + any later version.
  12792. + This program is distributed in the hope that it will be useful,
  12793. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  12794. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12795. + GNU General Public License for more details.
  12796. + You should have received a copy of the GNU General Public License
  12797. + along with this program; if not, write to the Free Software
  12798. + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
  12799. + #include "config.h"
  12800. + #include "hexify.h"
  12801. + #include "report.h"
  12802. + #include "main.h"
  12803. + #include "out-epsf.h"
  12804. + extern string version_string;
  12805. + static void pack_scanline (one_byte *, unsigned);
  12806. + /* Convert a number in pixels to big points, which are Adobe's units.
  12807. +    (72 big points to the inch.)  */
  12808. + #define PIXELS_TO_BP(v, dpi) (72 * (v) / (dpi))
  12809. + /* Abbreviations for output to `eps_file'.  */
  12810. + #define OUT_STRING(s) fprintf (eps_file, "%s", s)
  12811. + #define OUT_SIMPLE(s) fprintf (eps_file, "%%%%%s\n", s)
  12812. + #define OUT_COMMENT(s, v) fprintf (eps_file, "%%%%%s: %s\n", s, v)
  12813. + #define OUT1(s, v1) fprintf (eps_file, s, v1)
  12814. + #define OUT2(s, v1, v2) fprintf (eps_file, s, v1, v2)
  12815. + #define OUT3(s, v1, v2, v3) fprintf (eps_file, s, v1, v2, v3)
  12816. + /* Write an Encapsulated PostScript file corresponding to the image.  */
  12817. + void
  12818. + write_epsf (string output_name, image_header_type image_header)
  12819. + {
  12820. +   /* Just black & white, or do we have grayscale?  */
  12821. +   boolean monochrome_p = image_header.depth == 1;
  12822. +   
  12823. +   /* Just for convenience.  */
  12824. +   unsigned width = image_header.width;
  12825. +   unsigned height = image_header.height;
  12826. +   
  12827. +   /* We pack the image tightly if it's monochrome.  */
  12828. +   unsigned width_used = monochrome_p ? width / 8 + !!(width % 8) : width;
  12829. +   /* Buffer into which we'll read the image data.  */
  12830. +   unsigned scanline_count = 0;
  12831. +   one_byte *scanline = xmalloc (width);
  12832. +   
  12833. +   /* Open the output file OUTPUT_NAME.  */
  12834. +   FILE *eps_file = xfopen (output_name, "w");
  12835. +   OUT_STRING ("%!PS-Adobe-3.0 EPSF-3.0\n");
  12836. +   OUT2 ("%%%%BoundingBox: 0 0 %u %u\n", width, height);
  12837. +   OUT_COMMENT ("Creator", version_string);
  12838. +   OUT_COMMENT ("Title", output_name);
  12839. +   OUT_COMMENT ("CreationDate", now ());
  12840. +   OUT_COMMENT ("DocumentData", "Clean7Bit");
  12841. +   OUT_SIMPLE ("EndComments");
  12842. +   
  12843. +   /* We map the image to the unit square for image(mask) and scale the
  12844. +      coordinate system to get back to the original size.  I can't grasp
  12845. +      how to use the matrix argument to image(mask) to avoid the scaling,
  12846. +      but I'm sure it's possible. */
  12847. +   OUT2 ("gsave\n  %u %u scale\n", width, height);
  12848. +   
  12849. +   /* We need a buffer to hold the string chunks as we read them.  It
  12850. +      can't be of arbitrary size: it must be an exact multiple of the
  12851. +      total number of data characters.  Otherwise, we will read past the
  12852. +      end of the data.  */
  12853. +   OUT1 ("/image-buffer %u string def\n", width_used);
  12854. +   
  12855. +   /* If we are monochrome, we use the `imagemask' operator; else `image'.  */
  12856. +   OUT2 ("  %u %u", width, height);
  12857. +   if (monochrome_p)
  12858. +     OUT_STRING (" true"); /* The `invert' argument.  */
  12859. +   else
  12860. +     OUT1 (" %u", image_header.depth); /* bits/sample */
  12861. +   
  12862. +   OUT3 (" [%u 0 0 -%u 0 %u]\n", width, height, height);
  12863. +   OUT_STRING ("{currentfile image-buffer readhexstring pop}\n");
  12864. +   OUT1 ("%s\n", monochrome_p ? "imagemask" : "image");
  12865. +   
  12866. +   /* Read the image.  */
  12867. +   while ((*image_get_scanline) (scanline))
  12868. +     {
  12869. +       string h;
  12870. +       unsigned loc;
  12871. +       scanline_count++;
  12872. +       if (scanline_count % 10 == 0)
  12873. +         REPORT1 (".%s", scanline_count % 790 == 0 ? "\n" : "");
  12874. +       
  12875. +       /* Monochrome images are output with eight samples/byte; grayscale
  12876. +          images are output with one sample/byte.  */
  12877. +       if (monochrome_p)
  12878. +         pack_scanline (scanline, width);
  12879. +       /* Convert binary to ASCII hexadecimal.  */
  12880. +       h = hexify (scanline, width_used);
  12881. +       /* Adobe says lines in EPS files should be no more than 255
  12882. +          characters.  How silly.  */
  12883. +       for (loc = 1; loc <= 2 * width_used; loc++)
  12884. +         {
  12885. +           putc (h[loc - 1], eps_file);
  12886. +           if (loc % 255 == 0)
  12887. +             putc ('\n', eps_file);
  12888. +     }
  12889. +       
  12890. +       free (h);
  12891. +       putc ('\n', eps_file);
  12892. +     }
  12893. +   
  12894. +   /* Restore the ctm.  */
  12895. +   OUT_STRING ("grestore\n");
  12896. +   if (scanline_count != image_header.height)
  12897. +     WARNING2 ("Expected %u scanlines, read %u", image_header.height,
  12898. +               scanline_count); 
  12899. +   
  12900. +   OUT_SIMPLE ("TRAILER");
  12901. +   OUT_SIMPLE ("EOF");
  12902. + }
  12903. + /* Change the one bit/byte representation (call each byte a `cell') of
  12904. +    LENGTH bits in DATA to be eight bits/byte.  Pad the last byte with
  12905. +    zero.  We don't change those bytes beyond the end of packed portion,
  12906. +    thus assuming they are not looked at.  */
  12907. + static void
  12908. + pack_scanline (one_byte *data, unsigned length)
  12909. + {
  12910. +   unsigned cell; /* Which bit in the original data we're on.  */
  12911. +   unsigned packing_loc = 0; /* Which byte we're currently packing.  */
  12912. +   unsigned packing_bit = 8; /* How much to shift.  */
  12913. +   
  12914. +   /* The very first cell has to be treated specially, because we must
  12915. +      initialize it with itself shifted left (if we're going to use data
  12916. +      in place, that is.)  */
  12917. +   data[0] <<= 7;
  12918. +   
  12919. +   for (cell = 0; cell < length; cell++)
  12920. +     {
  12921. +       packing_bit--;
  12922. +       data[packing_loc] |= data[cell] << packing_bit;
  12923. +       if (packing_bit == 0)
  12924. +         {
  12925. +           packing_bit = 8;
  12926. +           packing_loc++;
  12927. +           
  12928. +           /* After the first byte, we can just clear the byte at
  12929. +              `packing_loc', since `cell' has already moved beyond it.  */
  12930. +           data[packing_loc] = 0;
  12931. +     }
  12932. +     }
  12933. + }
  12934. diff -Nrc2 fontutils-0.5/imageto/out-epsf.h fontutils-0.6/imageto/out-epsf.h
  12935. *** fontutils-0.5/imageto/out-epsf.h
  12936. --- fontutils-0.6/imageto/out-epsf.h    Fri Oct  2 16:26:23 1992
  12937. ***************
  12938. *** 0 ****
  12939. --- 1,28 ----
  12940. + /* out-epsf.h: output the whole image as an EPS file.
  12941. + Copyright (C) 1992 Free Software Foundation, Inc.
  12942. + This program is free software; you can redistribute it and/or modify
  12943. + it under the terms of the GNU General Public License as published by
  12944. + the Free Software Foundation; either version 2, or (at your option)
  12945. + any later version.
  12946. + This program is distributed in the hope that it will be useful,
  12947. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  12948. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12949. + GNU General Public License for more details.
  12950. + You should have received a copy of the GNU General Public License
  12951. + along with this program; if not, write to the Free Software
  12952. + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
  12953. + #ifndef OUT_EPSF_H
  12954. + #define OUT_EPSF_H
  12955. + #include "image-header.h"
  12956. + /* Output an EPS file for the image with header H to OUTPUT_NAME.  */
  12957. + extern void write_epsf (string output_name, image_header_type h);
  12958. + #endif /* not OUT_EPSF_H */
  12959. diff -Nrc2 fontutils-0.5/imageto/out-strips.c fontutils-0.6/imageto/out-strips.c
  12960. *** fontutils-0.5/imageto/out-strips.c
  12961. --- fontutils-0.6/imageto/out-strips.c    Fri Oct  2 17:08:42 1992
  12962. ***************
  12963. *** 0 ****
  12964. --- 1,94 ----
  12965. + /* out-strips.c: cut the entire image into strips.
  12966. + Copyright (C) 1992 Free Software Foundation, Inc.
  12967. + This program is free software; you can redistribute it and/or modify
  12968. + it under the terms of the GNU General Public License as published by
  12969. + the Free Software Foundation; either version 2, or (at your option)
  12970. + any later version.
  12971. + This program is distributed in the hope that it will be useful,
  12972. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  12973. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12974. + GNU General Public License for more details.
  12975. + You should have received a copy of the GNU General Public License
  12976. + along with this program; if not, write to the Free Software
  12977. + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
  12978. + #include "config.h"
  12979. + #include "gf.h"
  12980. + #include "report.h"
  12981. + #include "main.h"
  12982. + #include "out-strips.h"
  12983. + /* Output a ``font'' in which each ``character'' is a constant number of
  12984. +    scanlines from the image.  This might use less than resources than
  12985. +    the giant PostScript file that -epsf outputs.
  12986. +    
  12987. +    We only output the GF characters here; we assume the postamble and
  12988. +    preamble are written by the caller.  */
  12989. + void
  12990. + write_chars_as_strips (image_header_type image_header, real design_size)
  12991. + {
  12992. +   dimensions_type char_dimens;
  12993. +   gf_char_type gf_char;
  12994. +   unsigned gf_row;
  12995. +   unsigned lines_per_char;
  12996. +   one_byte *scanline;
  12997. +   real width_in_points;
  12998. +   boolean first_char = true;
  12999. +   unsigned scanline_count = 0;
  13000. +   /* Set up for the first character.  We divide the image into 256 parts,
  13001. +      each of which will turn into one ``character''.  */
  13002. +   lines_per_char = image_header.height / 256 + 1;
  13003. +   GF_CHARCODE (gf_char) = 0;
  13004. +   DIMENSIONS_WIDTH (char_dimens) = image_header.width;
  13005. +   DIMENSIONS_HEIGHT (char_dimens) = lines_per_char;
  13006. +   GF_BITMAP (gf_char) = new_bitmap (char_dimens);
  13007. +   GF_CHAR_MIN_COL (gf_char) = GF_CHAR_MIN_ROW (gf_char) = 0;
  13008. +   GF_CHAR_MAX_COL (gf_char) = DIMENSIONS_WIDTH (char_dimens);
  13009. +   GF_CHAR_MAX_ROW (gf_char) = DIMENSIONS_HEIGHT (char_dimens) - 1;
  13010. +   
  13011. +   /* We aren't going to have any side bearings.  */
  13012. +   GF_H_ESCAPEMENT (gf_char) = DIMENSIONS_WIDTH (char_dimens);
  13013. +   width_in_points = DIMENSIONS_WIDTH (char_dimens) * POINTS_PER_INCH
  13014. +                     / (real) image_header.hres;
  13015. +   GF_TFM_WIDTH (gf_char) = real_to_fix (width_in_points / design_size);
  13016. +   
  13017. +   
  13018. +   /* Read the image.  */
  13019. +   while (true)
  13020. +     {
  13021. +       if (scanline_count % lines_per_char == 0)
  13022. +         {
  13023. +           /* We get here when scanline_count == 0, and we haven't read
  13024. +              anything, so we can't write anything.  */
  13025. +           if (!first_char)
  13026. +             {
  13027. +               gf_put_char (gf_char);
  13028. +               REPORT2 ("[%u]%c", GF_CHARCODE (gf_char),
  13029. +                                 (GF_CHARCODE (gf_char) + 1) % 13 ? ' ' : '\n');
  13030. +               GF_CHARCODE (gf_char)++;
  13031. +             }
  13032. +           else
  13033. +             first_char = false;
  13034. +           gf_row = 0;
  13035. +         }
  13036. +       scanline = BITMAP_BITS (GF_BITMAP (gf_char))
  13037. +                  + gf_row * DIMENSIONS_WIDTH (char_dimens); 
  13038. +       if (!(*image_get_scanline) (scanline)) break;
  13039. +       scanline_count++;
  13040. +       gf_row++;
  13041. +     }
  13042. +   
  13043. +   if (scanline_count != image_header.height)
  13044. +     WARNING2 ("Expected %u scanlines, read %u", image_header.height,
  13045. +               scanline_count); 
  13046. + }
  13047. diff -Nrc2 fontutils-0.5/imageto/out-strips.h fontutils-0.6/imageto/out-strips.h
  13048. *** fontutils-0.5/imageto/out-strips.h
  13049. --- fontutils-0.6/imageto/out-strips.h    Fri Oct  2 17:08:42 1992
  13050. ***************
  13051. *** 0 ****
  13052. --- 1,27 ----
  13053. + /* out-strips.h: cut the image into strips.
  13054. + Copyright (C) 1992 Free Software Foundation, Inc.
  13055. + This program is free software; you can redistribute it and/or modify
  13056. + it under the terms of the GNU General Public License as published by
  13057. + the Free Software Foundation; either version 2, or (at your option)
  13058. + any later version.
  13059. + This program is distributed in the hope that it will be useful,
  13060. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  13061. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13062. + GNU General Public License for more details.
  13063. + You should have received a copy of the GNU General Public License
  13064. + along with this program; if not, write to the Free Software
  13065. + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
  13066. + #ifndef OUT_STRIPS_H
  13067. + #define OUT_STRIPS_H
  13068. + #include "image-header.h"
  13069. + extern void write_chars_as_strips (image_header_type, real design_size);
  13070. + #endif /* not OUT_STRIPS_H */
  13071. diff -Nrc2 fontutils-0.5/imageto/version.c fontutils-0.6/imageto/version.c
  13072. *** fontutils-0.5/imageto/version.c    Thu Sep  3 09:46:20 1992
  13073. --- fontutils-0.6/imageto/version.c    Tue Oct 27 13:27:59 1992
  13074. ***************
  13075. *** 1 ****
  13076. ! char *version_string = "imageto version 0.5";
  13077. --- 1 ----
  13078. ! char *version_string = "imageto version 0.6";
  13079. diff -Nrc2 fontutils-0.5/imgrotate/.gdbinit fontutils-0.6/imgrotate/.gdbinit
  13080. *** fontutils-0.5/imgrotate/.gdbinit    Fri Aug 14 12:07:45 1992
  13081. --- fontutils-0.6/imgrotate/.gdbinit    Fri Oct  2 14:23:30 1992
  13082. ***************
  13083. *** 16,19 ****
  13084.   #set args -verbose -flip  -output-file ../ourfonts/garamond/img/tsch.img \
  13085.   #  ../ourfonts/garamond/img/180/tsch
  13086. ! set args -verbose -flip -output-file ../ourfonts/garamond/r/percent/rperc.img \
  13087. !   ../ourfonts/garamond/r/percent/perc
  13088. --- 16,24 ----
  13089.   #set args -verbose -flip  -output-file ../ourfonts/garamond/img/tsch.img \
  13090.   #  ../ourfonts/garamond/img/180/tsch
  13091. ! #set args -verbose -flip -output-file ../ourfonts/garamond/r/percent/rperc.img \
  13092. ! #  ../ourfonts/garamond/r/percent/perc
  13093. ! #set args -verbose -rotate $ourfonts/bodoni/gbdb.gmi
  13094. ! #set args -verbose -flip -output-file ../ourfonts/garamond/r/section/sect.gmi \
  13095. ! #  ../ourfonts/garamond/r/section/sect
  13096. ! set args -verbose -flip -output-file ../ourfonts/garamond/rq/vswash/vswsh.img \
  13097. !   ../ourfonts/garamond/rq/vswash/vswsh
  13098. diff -Nrc2 fontutils-0.5/imgrotate/ChangeLog fontutils-0.6/imgrotate/ChangeLog
  13099. *** fontutils-0.5/imgrotate/ChangeLog    Thu Sep  3 09:30:58 1992
  13100. --- fontutils-0.6/imgrotate/ChangeLog    Tue Oct 27 13:02:50 1992
  13101. ***************
  13102. *** 1,2 ****
  13103. --- 1,10 ----
  13104. + Tue Oct 27 13:02:09 1992  Karl Berry  (karl@cs.umb.edu)
  13105. +     * Version 0.6.
  13106. + Fri Oct 16 08:41:36 1992  Karl Berry  (karl@cs.umb.edu)
  13107. +     * main.c (USAGE): Doc fix.
  13108.   Thu Sep  3 09:30:58 1992  Karl Berry  (karl@hayley)
  13109.   
  13110. diff -Nrc2 fontutils-0.5/imgrotate/main.c fontutils-0.6/imgrotate/main.c
  13111. *** fontutils-0.5/imgrotate/main.c    Fri Jun  5 09:20:25 1992
  13112. --- fontutils-0.6/imgrotate/main.c    Fri Oct 16 09:54:31 1992
  13113. ***************
  13114. *** 266,274 ****
  13115.   "flip: rotate the image 180 degrees.
  13116.   help: print this message.
  13117. ! output-file <filename>: write the output to <filename> if <filname> has
  13118. !    a suffix, otherwise write to <filename>.img; the default is the input
  13119. !    filename, if the input file directory is different from the execution
  13120. !    directory, or the input filename prepended with `x', if the
  13121. !    directories are the same.
  13122.   rotate-clockwise: rotate the image 90 degrees clockwise.
  13123.   verbose: output progress reports to stdout.
  13124. --- 266,272 ----
  13125.   "flip: rotate the image 180 degrees.
  13126.   help: print this message.
  13127. ! output-file <filename>: write the output to <filename>, extended with
  13128. !    `.img' if <filename> does not have a suffix.  The default is the input
  13129. !    filename, prepended with `x' if that would overwrite the input file.
  13130.   rotate-clockwise: rotate the image 90 degrees clockwise.
  13131.   verbose: output progress reports to stdout.
  13132. diff -Nrc2 fontutils-0.5/imgrotate/version.c fontutils-0.6/imgrotate/version.c
  13133. *** fontutils-0.5/imgrotate/version.c    Thu Sep  3 09:46:21 1992
  13134. --- fontutils-0.6/imgrotate/version.c    Tue Oct 27 13:28:00 1992
  13135. ***************
  13136. *** 1 ****
  13137. ! char *version_string = "imgrotate version 0.5";
  13138. --- 1 ----
  13139. ! char *version_string = "imgrotate version 0.6";
  13140. diff -Nrc2 fontutils-0.5/include/ChangeLog fontutils-0.6/include/ChangeLog
  13141. *** fontutils-0.5/include/ChangeLog    Thu Sep  3 09:31:02 1992
  13142. --- fontutils-0.6/include/ChangeLog    Tue Oct 27 13:02:50 1992
  13143. ***************
  13144. *** 1,2 ****
  13145. --- 1,55 ----
  13146. + Tue Oct 27 13:02:44 1992  Karl Berry  (karl@cs.umb.edu)
  13147. +     * Version 0.6.
  13148. + Sun Oct 25 06:27:11 1992  Karl Berry  (karl@cs.umb.edu)
  13149. +     * getopt.h: New version.
  13150. + Sat Oct 17 19:36:59 1992  Karl Berry  (karl@cs.umb.edu)
  13151. +     * c-memstr.h (bcmp, bcopy, bzero): Only #define if they are not
  13152. +     already #define'd.
  13153. + Tue Oct  6 09:04:23 1992  Karl Berry  (karl@cs.umb.edu)
  13154. +     * bzr.h (BZR_CHAR_BB, etc.): Remove, as the CHAR_... macros work fine.
  13155. +     * tfm.h (TFM_SAFE_FONTDIMEN): Fully parenthesize.
  13156. + Mon Oct  5 10:06:28 1992  Karl Berry  (karl@cs.umb.edu)
  13157. +     * report.h (report_file): New variable.
  13158. +         (REPORT*): Use it.
  13159. + Sun Oct  4 09:03:07 1992  Karl Berry  (karl@cs.umb.edu)
  13160. +     * font.h (CHAR_HEIGHT): Just return the max row, don't add one for
  13161. +     the baseline.  Why did we want to do this?
  13162. +     * lib.h: Doc fix.
  13163. +     * bb-list.h: New file, taken from bb-outline.h; rename
  13164. +     `bounding_box_list' to prefix `bb_list'.
  13165. + Fri Oct  2 17:01:25 1992  Karl Berry  (karl@cs.umb.edu)
  13166. +     * report.h (REPORT): Use fputs instead of fprintf.
  13167. +     * logreport.h (LOG): Likewise.
  13168. + Tue Sep 15 08:38:19 1992  Karl Berry  (karl@hayley)
  13169. +         * pbmplus.h: include config.h, and remove the old sysv/bsd
  13170. +           configuration stuff.
  13171. + Tue Sep  8 17:05:33 1992  Karl Berry  (karl@hayley)
  13172. +         * c-auto.h.in (_MINIX, _{ALL,POSIX,POSIX_1}_SOURCE): add #undef's
  13173. +           for configure to define.
  13174. + Sun Sep  6 16:54:48 1992  Karl Berry  (karl@hayley)
  13175. +         * global.h (MAX_INT_LENGTH): increase to 21, for 64-bit numbers.
  13176.   Thu Sep  3 09:31:02 1992  Karl Berry  (karl@hayley)
  13177.   
  13178. diff -Nrc2 fontutils-0.5/include/bb-list.h fontutils-0.6/include/bb-list.h
  13179. *** fontutils-0.5/include/bb-list.h
  13180. --- fontutils-0.6/include/bb-list.h    Sun Oct  4 09:25:11 1992
  13181. ***************
  13182. *** 0 ****
  13183. --- 1,53 ----
  13184. + /* bb-list.h: bounding box lists.
  13185. + Copyright (C) 1992 Free Software Foundation, Inc.
  13186. + This program is free software; you can redistribute it and/or modify
  13187. + it under the terms of the GNU General Public License as published by
  13188. + the Free Software Foundation; either version 2, or (at your option)
  13189. + any later version.
  13190. + This program is distributed in the hope that it will be useful,
  13191. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  13192. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13193. + GNU General Public License for more details.
  13194. + You should have received a copy of the GNU General Public License
  13195. + along with this program; if not, write to the Free Software
  13196. + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
  13197. + #ifndef BB_LIST_H
  13198. + #define BB_LIST_H
  13199. + #include "bounding-box.h"
  13200. + typedef struct
  13201. + {
  13202. +   bounding_box_type *data;
  13203. +   unsigned length;
  13204. + } bb_list_type;
  13205. + /* The length of the list.  */
  13206. + #define BB_LIST_LENGTH(bb_l) ((bb_l).length)
  13207. + /* The array of elements as a whole.  */
  13208. + #define BB_LIST_DATA(bb_l) ((bb_l).data)
  13209. + /* The Nth element in the list.  */
  13210. + #define BB_LIST_ELT(bb_l, n) BB_LIST_DATA (bb_l)[n]
  13211. + /* Initialize a list.  */
  13212. + extern bb_list_type bb_list_init (void);
  13213. + /* Append BB to L.  */
  13214. + extern void bb_list_append (bb_list_type *l, bounding_box_type bb);
  13215. + /* Splice the elements in list B2 onto B1, changing B1.  */
  13216. + extern void bb_list_splice (bb_list_type *B1, bb_list_type B2);
  13217. + /* Free the memory in a list.  */
  13218. + extern void bb_list_free (bb_list_type *);
  13219. + #endif /* not BB_LIST_H */
  13220. diff -Nrc2 fontutils-0.5/include/bb-outline.h fontutils-0.6/include/bb-outline.h
  13221. *** fontutils-0.5/include/bb-outline.h    Tue Jun  2 18:07:46 1992
  13222. --- fontutils-0.6/include/bb-outline.h    Sun Oct  4 09:25:11 1992
  13223. ***************
  13224. *** 20,23 ****
  13225. --- 20,24 ----
  13226.   #define BB_OUTLINE_H
  13227.   
  13228. + #include "bb-list.h"
  13229.   #include "bitmap.h"
  13230.   #include "types.h"
  13231. ***************
  13232. *** 24,44 ****
  13233.   
  13234.   
  13235. - /* This is a list of bounding boxes enclosing outlines.  */
  13236. - typedef struct
  13237. - {
  13238. -   bounding_box_type *data;
  13239. -   unsigned length;
  13240. - } bounding_box_list_type;
  13241. - /* The length of the list.  */
  13242. - #define BB_LIST_LENGTH(bb_l)  ((bb_l).length)
  13243. - /* The array of elements as a whole.  */
  13244. - #define BB_LIST_DATA(bb_l)  ((bb_l).data)
  13245. - /* The Nth element in the list.  */
  13246. - #define BB_LIST_ELT(bb_l, n)  ((bb_l).data[n])
  13247.   /* Find the bounding boxes around the outlines in the bitmap B.  If ALL is
  13248.      true, we find the bounding boxes around all the outlines, including
  13249. --- 25,28 ----
  13250. ***************
  13251. *** 47,64 ****
  13252.      box.  We don't look in any of the columns from LEFT to RIGHT,
  13253.      left-inclusive.  */
  13254. ! extern bounding_box_list_type
  13255.     find_outline_bbs (bitmap_type b, boolean all, int left, int right);
  13256. - /* Initialize a list.  */
  13257. - extern bounding_box_list_type init_bounding_box_list (void);
  13258. - /* Move all the elements in L to the right by OFFSET.  */
  13259. - extern void offset_bounding_box_list (bounding_box_list_type *l, int offset);
  13260. - /* Append the elements in list B2 to B1, changing B1.  */
  13261. - extern void append_bounding_box_list (bounding_box_list_type *B1,
  13262. -                                       bounding_box_list_type B2);
  13263. - /* Free the memory in a list.  */
  13264. - extern void free_bounding_box_list (bounding_box_list_type *);
  13265.   
  13266.   #endif /* not BB_OUTLINE_H */
  13267. --- 31,36 ----
  13268.      box.  We don't look in any of the columns from LEFT to RIGHT,
  13269.      left-inclusive.  */
  13270. ! extern bb_list_type
  13271.     find_outline_bbs (bitmap_type b, boolean all, int left, int right);
  13272.   
  13273.   #endif /* not BB_OUTLINE_H */
  13274. diff -Nrc2 fontutils-0.5/include/bzr.h fontutils-0.6/include/bzr.h
  13275. *** fontutils-0.5/include/bzr.h    Mon Aug 31 20:05:12 1992
  13276. --- fontutils-0.6/include/bzr.h    Sun Oct 18 17:06:59 1992
  13277. ***************
  13278. *** 1,3 ****
  13279. --- 1,5 ----
  13280.   /* bzr.h: manipulate Bezier-format font files.  See ../bzr/README
  13281.      for the precise definition of the file format.
  13282.   
  13283. ***************
  13284. *** 81,91 ****
  13285.   /* The character bounding box is not guaranteed to be the tightest
  13286.      possible, but it should be close.  The values are in points.  The
  13287. !    CHAR_HEIGHT, CHAR_DEPTH, CHAR_LSB, and CHAR_RSB macros work.  */
  13288. ! #define BZR_CHAR_BB(c) ((c).bb)
  13289. ! #define BZR_CHAR_MIN_COL(c) MIN_COL (BZR_CHAR_BB (c))
  13290. ! #define BZR_CHAR_MAX_COL(c) MAX_COL (BZR_CHAR_BB (c))
  13291. ! #define BZR_CHAR_MIN_ROW(c) MIN_ROW (BZR_CHAR_BB (c))
  13292. ! #define BZR_CHAR_MAX_ROW(c) MAX_ROW (BZR_CHAR_BB (c))
  13293. ! #define BZR_CHAR_BB_WIDTH(c) BB_WIDTH (BZR_CHAR_BB (c))
  13294.   
  13295.   /* The shape is given as a list of lists of lines and cubic splines.
  13296. --- 83,88 ----
  13297.   /* The character bounding box is not guaranteed to be the tightest
  13298.      possible, but it should be close.  The values are in points.  The
  13299. !    CHAR_HEIGHT, CHAR_DEPTH, CHAR_SET_WIDTH, CHAR_BB, and related macros
  13300. !    in `font.h' all work.  */
  13301.   
  13302.   /* The shape is given as a list of lists of lines and cubic splines.
  13303. diff -Nrc2 fontutils-0.5/include/c-auto.h.in fontutils-0.6/include/c-auto.h.in
  13304. *** fontutils-0.5/include/c-auto.h.in    Thu Apr 23 07:42:23 1992
  13305. --- fontutils-0.6/include/c-auto.h.in    Tue Sep  8 17:08:35 1992
  13306. ***************
  13307. *** 1,4 ****
  13308. --- 1,10 ----
  13309.   /* c-auto.h.in: template for c-auto.h.  */
  13310.   
  13311. + /* These are needed on some Unix variants to get POSIX facilities.  */
  13312. + #undef _ALL_SOURCE
  13313. + #undef _MINIX
  13314. + #undef _POSIX_SOURCE
  13315. + #undef _POSIX_1_SOURCE
  13316.   /* Define if your system has <dirent.h>.  */
  13317.   #undef DIRENT
  13318. diff -Nrc2 fontutils-0.5/include/c-memstr.h fontutils-0.6/include/c-memstr.h
  13319. *** fontutils-0.5/include/c-memstr.h    Wed Jul 22 08:50:54 1992
  13320. --- fontutils-0.6/include/c-memstr.h    Sat Oct 17 19:37:23 1992
  13321. ***************
  13322. *** 28,34 ****
  13323. --- 28,40 ----
  13324.   #define index strchr
  13325.   #define rindex strrchr
  13326. + #ifndef bcmp
  13327.   #define bcmp(s1, s2, len) memcmp ((s1), (s2), (len))
  13328. + #endif
  13329. + #ifndef bcopy
  13330.   #define bcopy(from, to, len) memcpy ((to), (from), (len))
  13331. + #endif
  13332. + #ifndef bzero
  13333.   #define bzero(s, len) memset ((s), 0, (len))
  13334. + #endif
  13335.   #else
  13336.   #include <strings.h>
  13337. diff -Nrc2 fontutils-0.5/include/font.h fontutils-0.6/include/font.h
  13338. *** fontutils-0.5/include/font.h    Sun Jun 14 15:15:17 1992
  13339. --- fontutils-0.6/include/font.h    Sun Oct  4 14:24:59 1992
  13340. ***************
  13341. *** 149,155 ****
  13342.   
  13343.   
  13344. ! /* The height of a character is how far it extends above the baseline,
  13345. !    including the row of pixels on the baseline.  */
  13346. ! #define CHAR_HEIGHT(c) (CHAR_MAX_ROW (c) >= 0 ? CHAR_MAX_ROW (c) + 1 : 0)
  13347.   
  13348.   /* The depth is far it extends below the baseline (but as a positive
  13349. --- 149,154 ----
  13350.   
  13351.   
  13352. ! /* The height of a character is how far it extends above the baseline.  */
  13353. ! #define CHAR_HEIGHT(c) (CHAR_MAX_ROW (c) >= 0 ? CHAR_MAX_ROW (c) : 0)
  13354.   
  13355.   /* The depth is far it extends below the baseline (but as a positive
  13356. diff -Nrc2 fontutils-0.5/include/getopt.h fontutils-0.6/include/getopt.h
  13357. *** fontutils-0.5/include/getopt.h    Wed Aug 19 14:47:22 1992
  13358. --- fontutils-0.6/include/getopt.h    Wed Oct 21 11:43:35 1992
  13359. ***************
  13360. *** 87,99 ****
  13361.   /* Names for the values of the `has_arg' field of `struct option'.  */
  13362.   
  13363. ! enum _argtype
  13364. ! {
  13365. !   no_argument,
  13366. !   required_argument,
  13367. !   optional_argument
  13368. ! };
  13369.   
  13370.   #if __STDC__
  13371.   extern int getopt (int argc, char *const *argv, const char *shortopts);
  13372.   extern int getopt_long (int argc, char *const *argv, const char *shortopts,
  13373.                   const struct option *longopts, int *longind);
  13374. --- 87,103 ----
  13375.   /* Names for the values of the `has_arg' field of `struct option'.  */
  13376.   
  13377. ! #define    no_argument        0
  13378. ! #define required_argument    1
  13379. ! #define optional_argument    2
  13380.   
  13381.   #if __STDC__
  13382. + #if defined(__GNU_LIBRARY__)
  13383. + /* Many other libraries have conflicting prototypes for getopt, with
  13384. +    differences in the consts, in stdlib.h.  To avoid compilation
  13385. +    errors, only prototype getopt for the GNU C library.  */
  13386.   extern int getopt (int argc, char *const *argv, const char *shortopts);
  13387. + #else /* not __GNU_LIBRARY__ */
  13388. + extern int getopt ();
  13389. + #endif /* not __GNU_LIBRARY__ */
  13390.   extern int getopt_long (int argc, char *const *argv, const char *shortopts,
  13391.                   const struct option *longopts, int *longind);
  13392. diff -Nrc2 fontutils-0.5/include/global.h fontutils-0.6/include/global.h
  13393. *** fontutils-0.5/include/global.h    Fri Jun 26 16:48:54 1992
  13394. --- fontutils-0.6/include/global.h    Sun Sep  6 16:59:09 1992
  13395. ***************
  13396. *** 61,67 ****
  13397.   /* Define useful abbreviations.  */
  13398.   
  13399. ! /* This is the maximum number of numerals that result when a 32-bit
  13400. !    integer is converted to a string, plus one for a trailing null.  */
  13401. ! #define MAX_INT_LENGTH  11
  13402.   
  13403.   /* Printer's points, as defined by TeX (and good typesetters everywhere).  */
  13404. --- 61,68 ----
  13405.   /* Define useful abbreviations.  */
  13406.   
  13407. ! /* This is the maximum number of numerals that result when a 64-bit
  13408. !    integer is converted to a string, plus one for a trailing null byte,
  13409. !    plus one for a sign.  */
  13410. ! #define MAX_INT_LENGTH 21
  13411.   
  13412.   /* Printer's points, as defined by TeX (and good typesetters everywhere).  */
  13413. diff -Nrc2 fontutils-0.5/include/lib.h fontutils-0.6/include/lib.h
  13414. *** fontutils-0.5/include/lib.h    Wed Apr 29 15:47:05 1992
  13415. --- fontutils-0.6/include/lib.h    Sun Oct  4 09:25:12 1992
  13416. ***************
  13417. *** 67,71 ****
  13418.   extern address xcalloc P2H(unsigned nelem, unsigned elsize);
  13419.   
  13420. ! /* (Re)Allocate N items of type T using malloc, or fail.  */
  13421.   #define XTALLOC(n, t) (t *) xmalloc ((n) * sizeof (t))
  13422.   #define XTALLOC1(t) XTALLOC (1, t)
  13423. --- 67,71 ----
  13424.   extern address xcalloc P2H(unsigned nelem, unsigned elsize);
  13425.   
  13426. ! /* (Re)Allocate N items of type T using xmalloc/xrealloc.  */
  13427.   #define XTALLOC(n, t) (t *) xmalloc ((n) * sizeof (t))
  13428.   #define XTALLOC1(t) XTALLOC (1, t)
  13429. diff -Nrc2 fontutils-0.5/include/logreport.h fontutils-0.6/include/logreport.h
  13430. *** fontutils-0.5/include/logreport.h    Mon Jun  1 15:47:29 1992
  13431. --- fontutils-0.6/include/logreport.h    Fri Oct  2 17:02:50 1992
  13432. ***************
  13433. *** 35,39 ****
  13434.   
  13435.   #define LOG(s)                                \
  13436. !   do { if (logging) fprintf (log_file, s); } while (0)
  13437.   #define LOG1(s, e)                            \
  13438.     do { if (logging) fprintf (log_file, s, e); } while (0)
  13439. --- 35,39 ----
  13440.   
  13441.   #define LOG(s)                                \
  13442. !   do { if (logging) fputs (s, log_file); } while (0)
  13443.   #define LOG1(s, e)                            \
  13444.     do { if (logging) fprintf (log_file, s, e); } while (0)
  13445. diff -Nrc2 fontutils-0.5/include/pbmplus.h fontutils-0.6/include/pbmplus.h
  13446. *** fontutils-0.5/include/pbmplus.h    Sat Mar  7 10:05:36 1992
  13447. --- fontutils-0.6/include/pbmplus.h    Tue Sep 15 08:37:54 1992
  13448. ***************
  13449. *** 9,12 ****
  13450. --- 9,14 ----
  13451.   ** documentation.  This software is provided "as is" without express or
  13452.   ** implied warranty.
  13453. +    Configuration options modified for GNU --karl.
  13454.   */
  13455.   
  13456. ***************
  13457. *** 18,21 ****
  13458. --- 20,27 ----
  13459.   #include <stdio.h>
  13460.   
  13461. + #include "config.h"
  13462. + #if 0 /* karl */
  13463.   #if ! ( defined(BSD) || defined(SYSV) || defined(MSDOS))
  13464.   /* CONFIGURE: If your system is >= 4.2BSD, set the BSD option; if you're a
  13465. ***************
  13466. *** 28,31 ****
  13467. --- 34,38 ----
  13468.   /* #define MSDOS */
  13469.   #endif
  13470. + #endif
  13471.   
  13472.   /* CONFIGURE: If you want to enable writing "raw" files, set this option.
  13473. ***************
  13474. *** 87,90 ****
  13475. --- 94,98 ----
  13476.   /* #define DEBUG */
  13477.   
  13478. + #if 0 /* karl */
  13479.   #ifdef SYSV
  13480.   #include <string.h>
  13481. ***************
  13482. *** 99,102 ****
  13483. --- 107,111 ----
  13484.   #include <strings.h>
  13485.   #endif /*SYSV*/
  13486. + #endif /* 0 */
  13487.   
  13488.   /* CONFIGURE: On some systems, malloc.h doesn't declare these, so we have
  13489. diff -Nrc2 fontutils-0.5/include/report.h fontutils-0.6/include/report.h
  13490. *** fontutils-0.5/include/report.h    Fri Mar 27 14:55:09 1992
  13491. --- fontutils-0.6/include/report.h    Mon Oct  5 10:12:32 1992
  13492. ***************
  13493. *** 24,27 ****
  13494. --- 24,30 ----
  13495.   
  13496.   
  13497. + /* The file we write information to.  */
  13498. + extern FILE *report_file;
  13499.   /* Only print anything if this is true.  */
  13500.   extern boolean verbose;
  13501. ***************
  13502. *** 29,50 ****
  13503.   
  13504.   #define REPORT(s)                            \
  13505. !   do if (verbose) { fprintf (stderr, s); fflush (stderr); }        \
  13506.     while (0)
  13507.   
  13508.   #define REPORT1(s, e)                            \
  13509. !   do if (verbose) { fprintf (stderr, s, e); fflush (stderr); }        \
  13510.     while (0)
  13511.   
  13512.   #define REPORT2(s, e1, e2)                        \
  13513. !   do if (verbose) { fprintf (stderr, s, e1, e2); fflush (stderr); }    \
  13514.     while (0)
  13515.   
  13516.   #define REPORT3(s, e1, e2, e3)                        \
  13517. !   do if (verbose) { fprintf (stderr, s, e1, e2, e3); fflush (stderr); }    \
  13518.     while (0)
  13519.   
  13520.   #define REPORT4(s, e1, e2, e3, e4)                    \
  13521. !   do if (verbose) { fprintf (stderr, s, e1, e2, e3, e4);        \
  13522. !             fflush (stderr); }                     \
  13523.     while (0)
  13524.   
  13525. --- 32,55 ----
  13526.   
  13527.   #define REPORT(s)                            \
  13528. !   do if (verbose) { fputs (s, report_file); fflush (report_file); }    \
  13529.     while (0)
  13530.   
  13531.   #define REPORT1(s, e)                            \
  13532. !   do if (verbose) { fprintf (report_file, s, e); fflush (report_file); }\
  13533.     while (0)
  13534.   
  13535.   #define REPORT2(s, e1, e2)                        \
  13536. !   do if (verbose) { fprintf (report_file, s, e1, e2);            \
  13537. !                     fflush (report_file); }                \
  13538.     while (0)
  13539.   
  13540.   #define REPORT3(s, e1, e2, e3)                        \
  13541. !   do if (verbose) { fprintf (report_file, s, e1, e2, e3);        \
  13542. !                     fflush (report_file); }                \
  13543.     while (0)
  13544.   
  13545.   #define REPORT4(s, e1, e2, e3, e4)                    \
  13546. !   do if (verbose) { fprintf (report_file, s, e1, e2, e3, e4);        \
  13547. !             fflush (report_file); }                 \
  13548.     while (0)
  13549.   
  13550. diff -Nrc2 fontutils-0.5/include/tfm.h fontutils-0.6/include/tfm.h
  13551. *** fontutils-0.5/include/tfm.h    Tue Jul  7 16:43:56 1992
  13552. --- fontutils-0.6/include/tfm.h    Tue Oct  6 11:21:16 1992
  13553. ***************
  13554. *** 105,109 ****
  13555.   #define TFM_SAFE_FONTDIMEN(info, number, ret)                \
  13556.     ((number) - 1 < TFM_FONTDIMEN_COUNT (info)                 \
  13557. !    ? TFM_FONTDIMEN (info, number) : ret)
  13558.   
  13559.   /* Define symbolic names for the numbers of the parameters we
  13560. --- 105,109 ----
  13561.   #define TFM_SAFE_FONTDIMEN(info, number, ret)                \
  13562.     ((number) - 1 < TFM_FONTDIMEN_COUNT (info)                 \
  13563. !    ? TFM_FONTDIMEN (info, number) : (ret))
  13564.   
  13565.   /* Define symbolic names for the numbers of the parameters we
  13566. diff -Nrc2 fontutils-0.5/lib/ChangeLog fontutils-0.6/lib/ChangeLog
  13567. *** fontutils-0.5/lib/ChangeLog    Thu Sep  3 09:31:06 1992
  13568. --- fontutils-0.6/lib/ChangeLog    Tue Oct 27 13:02:51 1992
  13569. ***************
  13570. *** 1,2 ****
  13571. --- 1,45 ----
  13572. + Tue Oct 27 12:56:15 1992  Karl Berry  (karl@cs.umb.edu)
  13573. +     * Version 0.6.
  13574. + Sun Oct 25 06:26:42 1992  Karl Berry  (karl@cs.umb.edu)
  13575. +     * getopt.c: New version.
  13576. + Thu Oct 22 17:58:12 1992  Karl Berry  (karl@cs.umb.edu)
  13577. +     * make-suffix.c: Doc fix.
  13578. + Tue Oct 20 11:57:57 1992  Karl Berry  (karl@cs.umb.edu)
  13579. +     * filename.c (find_{gf,pk,tfm}_filename): Just concatenate the
  13580. +     suffix onto the main font name, don't replace a suffix.
  13581. + Mon Oct  5 10:07:59 1992  Karl Berry  (karl@cs.umb.edu)
  13582. +     * report.c (report_file): New variable.
  13583. + Sun Oct  4 09:13:24 1992  Karl Berry  (karl@cs.umb.edu)
  13584. +     * bb-list.c: New file, from bb-outline.c.
  13585. +         * GNUmakefile (c_only): Add it.
  13586. +         * bb-outline.c: Change calls and decls for new improved names.
  13587. + Sat Oct  3 16:58:38 1992  Karl Berry  (karl@cs.umb.edu)
  13588. +     * bb-outline.c: Doc fix.
  13589. + Tue Sep 22 12:46:49 1992  Karl Berry  (karl@cs.umb.edu)
  13590. +         * malloc.c (realloc): abort if we can't malloc enough memory to do
  13591. +           the realloc.
  13592. +         * bitmap.c (bb_ensure_bounds): new routine.
  13593. +         (extract_subbitmap): call it.
  13594. + Mon Sep 21 12:00:35 1992  Karl Berry  (karl@cs.umb.edu)
  13595. +         * malloc.c: define NO_NEW_HANDLER.
  13596.   Thu Sep  3 09:31:06 1992  Karl Berry  (karl@hayley)
  13597.   
  13598. diff -Nrc2 fontutils-0.5/lib/GNUmakefile fontutils-0.6/lib/GNUmakefile
  13599. *** fontutils-0.5/lib/GNUmakefile    Fri Jun 26 16:54:36 1992
  13600. --- fontutils-0.6/lib/GNUmakefile    Sun Oct  4 09:25:11 1992
  13601. ***************
  13602. *** 25,31 ****
  13603.   # The headers are in the `include' directory, so don't use `c_and_h' for
  13604.   # anything.
  13605. ! c_only = $(malloc) atou basename bb-outline bitmap bounding-box charcode\
  13606. ! charspec cmdline concat concat3 concat4 concat5 dir-p dlsym edge    \
  13607. ! encoding extend-fname float-ok fmod file-input file-output file-p    \
  13608.   filename find-suffix fix-num font getopt getopt1 hexify integer-ok    \
  13609.   libfile line list logreport make-prefix make-suffix math now numtoa    \
  13610. --- 25,31 ----
  13611.   # The headers are in the `include' directory, so don't use `c_and_h' for
  13612.   # anything.
  13613. ! c_only = $(malloc) atou basename bb-list bb-outline bitmap bounding-box    \
  13614. ! charcode charspec cmdline concat concat3 concat4 concat5 dir-p dlsym    \
  13615. ! edge encoding extend-fname float-ok fmod file-input file-output file-p    \
  13616.   filename find-suffix fix-num font getopt getopt1 hexify integer-ok    \
  13617.   libfile line list logreport make-prefix make-suffix math now numtoa    \
  13618. diff -Nrc2 fontutils-0.5/lib/M.depend fontutils-0.6/lib/M.depend
  13619. *** fontutils-0.5/lib/M.depend    Wed Sep  2 17:20:08 1992
  13620. --- fontutils-0.6/lib/M.depend    Sun Oct 25 14:15:27 1992
  13621. ***************
  13622. *** 8,16 ****
  13623.     .././include/c-seek.h .././include/c-proto.h .././include/global.h .././include/lib.h \
  13624.     .././include/types.h 
  13625.   bb-outline.o : bb-outline.c .././include/config.h .././include/c-auto.h .././include/c-std.h \
  13626.     .././include/c-memstr.h .././include/c-errno.h .././include/c-minmax.h .././include/c-limits.h \
  13627.     .././include/c-seek.h .././include/c-proto.h .././include/global.h .././include/lib.h \
  13628. !   .././include/types.h .././include/bb-outline.h .././include/bitmap.h .././include/bounding-box.h \
  13629. !   .././include/edge.h 
  13630.   bitmap.o : bitmap.c .././include/config.h .././include/c-auto.h .././include/c-std.h \
  13631.     .././include/c-memstr.h .././include/c-errno.h .././include/c-minmax.h .././include/c-limits.h \
  13632. --- 8,20 ----
  13633.     .././include/c-seek.h .././include/c-proto.h .././include/global.h .././include/lib.h \
  13634.     .././include/types.h 
  13635. + bb-list.o : bb-list.c .././include/config.h .././include/c-auto.h .././include/c-std.h \
  13636. +   .././include/c-memstr.h .././include/c-errno.h .././include/c-minmax.h .././include/c-limits.h \
  13637. +   .././include/c-seek.h .././include/c-proto.h .././include/global.h .././include/lib.h \
  13638. +   .././include/types.h .././include/bb-list.h .././include/bounding-box.h 
  13639.   bb-outline.o : bb-outline.c .././include/config.h .././include/c-auto.h .././include/c-std.h \
  13640.     .././include/c-memstr.h .././include/c-errno.h .././include/c-minmax.h .././include/c-limits.h \
  13641.     .././include/c-seek.h .././include/c-proto.h .././include/global.h .././include/lib.h \
  13642. !   .././include/types.h .././include/bb-outline.h .././include/bb-list.h .././include/bounding-box.h \
  13643. !   .././include/bitmap.h .././include/edge.h 
  13644.   bitmap.o : bitmap.c .././include/config.h .././include/c-auto.h .././include/c-std.h \
  13645.     .././include/c-memstr.h .././include/c-errno.h .././include/c-minmax.h .././include/c-limits.h \
  13646. diff -Nrc2 fontutils-0.5/lib/bb-list.c fontutils-0.6/lib/bb-list.c
  13647. *** fontutils-0.5/lib/bb-list.c
  13648. --- fontutils-0.6/lib/bb-list.c    Sun Oct  4 09:34:43 1992
  13649. ***************
  13650. *** 0 ****
  13651. --- 1,76 ----
  13652. + /* bb-list.c: operations on bounding box lists.
  13653. + Copyright (C) 1992 Free Software Foundation, Inc.
  13654. + This program is free software; you can redistribute it and/or modify
  13655. + it under the terms of the GNU General Public License as published by
  13656. + the Free Software Foundation; either version 2, or (at your option)
  13657. + any later version.
  13658. + This program is distributed in the hope that it will be useful,
  13659. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  13660. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13661. + GNU General Public License for more details.
  13662. + You should have received a copy of the GNU General Public License
  13663. + along with this program; if not, write to the Free Software
  13664. + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
  13665. + #include "config.h"
  13666. + #include "bb-list.h"
  13667. + /* This routine returns an initialized empty list.  */
  13668. + bb_list_type
  13669. + bb_list_init ()
  13670. + {
  13671. +   bb_list_type bb_list;
  13672. +   
  13673. +   BB_LIST_LENGTH (bb_list) = 0;
  13674. +   BB_LIST_DATA (bb_list) = NULL;
  13675. +   
  13676. +   return bb_list;
  13677. + }
  13678. + /* Append BB to BB_LIST.  */
  13679. + void
  13680. + bb_list_append (bb_list_type *bb_list, bounding_box_type bb)
  13681. + {
  13682. +   BB_LIST_LENGTH (*bb_list)++;
  13683. +   XRETALLOC (BB_LIST_DATA (*bb_list), BB_LIST_LENGTH (*bb_list),
  13684. +              bounding_box_type);
  13685. +   BB_LIST_ELT (*bb_list, BB_LIST_LENGTH (*bb_list) - 1) = bb;
  13686. + }
  13687. + /* Append the elements in the list B2 onto the end of B1.  */
  13688. + void
  13689. + bb_list_splice (bb_list_type *b1, bb_list_type b2)
  13690. + {
  13691. +   unsigned new_length;
  13692. +   unsigned this_bb;
  13693. +   if (BB_LIST_LENGTH (b2) == 0)
  13694. +     return;
  13695. +     
  13696. +   assert (b1 != NULL);
  13697. +   
  13698. +   new_length = BB_LIST_LENGTH (*b1) + BB_LIST_LENGTH (b2);
  13699. +   XRETALLOC (BB_LIST_DATA (*b1), new_length, bounding_box_type);
  13700. +   
  13701. +   for (this_bb = 0; this_bb < BB_LIST_LENGTH (b2); this_bb++)
  13702. +     BB_LIST_ELT (*b1, BB_LIST_LENGTH (*b1)++) = BB_LIST_ELT (b2, this_bb);
  13703. + }
  13704. + /* Free the memory in a list.  */
  13705. + void
  13706. + bb_list_free (bb_list_type *bb_list)
  13707. + {
  13708. +   if (BB_LIST_DATA (*bb_list) != NULL)
  13709. +     safe_free ((address *) &BB_LIST_DATA (*bb_list));
  13710. + }
  13711. diff -Nrc2 fontutils-0.5/lib/bb-outline.c fontutils-0.6/lib/bb-outline.c
  13712. *** fontutils-0.5/lib/bb-outline.c    Sun Jun 21 14:42:02 1992
  13713. --- fontutils-0.6/lib/bb-outline.c    Sun Oct  4 09:34:43 1992
  13714. ***************
  13715. *** 20,31 ****
  13716.   
  13717.   #include "bb-outline.h"
  13718. - #include "bitmap.h"
  13719. - #include "bounding-box.h"
  13720.   #include "edge.h"
  13721.   
  13722.   
  13723. ! static bounding_box_type find_one_bb (bitmap_type, edge_type,
  13724. !                                       unsigned, unsigned, bitmap_type *);
  13725. ! static void append_bb (bounding_box_list_type *, bounding_box_type);
  13726.   
  13727.   /* A character is made up of a list of one or more outlines.  Here, we
  13728. --- 20,28 ----
  13729.   
  13730.   #include "bb-outline.h"
  13731.   #include "edge.h"
  13732.   
  13733.   
  13734. ! static bounding_box_type find_one_bb
  13735. !   (bitmap_type, edge_type, unsigned, unsigned, bitmap_type *);
  13736.   
  13737.   /* A character is made up of a list of one or more outlines.  Here, we
  13738. ***************
  13739. *** 35,43 ****
  13740.      the starting place for one outline.  We get the bounding boxes of the
  13741.      outlines, and put them in a list to return.  We don't look at pixels
  13742. !    that are at or after the column LEFT_MARK and before RIGHT_MARK.  If
  13743.      FIND_INNER is false, we return only outside outlines; otherwise, we
  13744.      return both inside and outside.  */
  13745.   
  13746. ! bounding_box_list_type
  13747.   find_outline_bbs (bitmap_type b, boolean find_inner,
  13748.                     int left_mark, int right_mark)
  13749. --- 32,40 ----
  13750.      the starting place for one outline.  We get the bounding boxes of the
  13751.      outlines, and put them in a list to return.  We don't look at pixels
  13752. !    that are at or after the column LEFT_MARK or before RIGHT_MARK.  If
  13753.      FIND_INNER is false, we return only outside outlines; otherwise, we
  13754.      return both inside and outside.  */
  13755.   
  13756. ! bb_list_type
  13757.   find_outline_bbs (bitmap_type b, boolean find_inner,
  13758.                     int left_mark, int right_mark)
  13759. ***************
  13760. *** 44,48 ****
  13761.   {
  13762.     unsigned row, col;
  13763. !   bounding_box_list_type bb_list = init_bounding_box_list ();
  13764.     bitmap_type marked = new_bitmap (BITMAP_DIMENSIONS (b));
  13765.   
  13766. --- 41,45 ----
  13767.   {
  13768.     unsigned row, col;
  13769. !   bb_list_type bb_list = bb_list_init ();
  13770.     bitmap_type marked = new_bitmap (BITMAP_DIMENSIONS (b));
  13771.   
  13772. ***************
  13773. *** 70,74 ****
  13774.             /* If edge != START_EDGE, it's on an inner bounding box.  */
  13775.             if (find_inner || edge == START_EDGE)
  13776. !                 append_bb (&bb_list, bb);
  13777.           }
  13778.           }
  13779. --- 67,78 ----
  13780.             /* If edge != START_EDGE, it's on an inner bounding box.  */
  13781.             if (find_inner || edge == START_EDGE)
  13782. !                 {
  13783. !                   /* The numbers in BB as it comes in refer to pixels;
  13784. !                      we have to change the maximum row so that it refers
  13785. !                      to the edge beyond the last pixel.  */
  13786. !                   MAX_COL (bb)++;
  13787. !                   bb_list_append (&bb_list, bb);
  13788. !                 }
  13789.           }
  13790.           }
  13791. ***************
  13792. *** 77,82 ****
  13793.     return bb_list;
  13794.   }
  13795.   /* Here we find one of a character's outlines.  We're passed the
  13796.      position (ORIGINAL_ROW and ORIGINAL_COL) of a starting pixel and one
  13797. --- 81,85 ----
  13798.     return bb_list;
  13799.   }
  13800.   /* Here we find one of a character's outlines.  We're passed the
  13801.      position (ORIGINAL_ROW and ORIGINAL_COL) of a starting pixel and one
  13802. ***************
  13803. *** 107,189 ****
  13804.   
  13805.     return bb;
  13806. - }
  13807. - /* Make all bounding boxes be OFFSET to the right.  */
  13808. - void
  13809. - offset_bounding_box_list (bounding_box_list_type *bb_list, int offset)
  13810. - {
  13811. -   unsigned this_bb;
  13812. -   
  13813. -   for (this_bb = 0; this_bb < BB_LIST_LENGTH (*bb_list); this_bb++)
  13814. -     {
  13815. -       bounding_box_type *bb = &BB_LIST_ELT (*bb_list, this_bb);
  13816. -       MIN_COL (*bb) += offset;
  13817. -       MAX_COL (*bb) += offset;
  13818. -     }
  13819. - }
  13820. - /* Append a bounding box to the list.  This is called when we have
  13821. -    completed an entire pixel outline.  The numbers in BB as it comes in
  13822. -    refer to pixels; we have to change the maximum row so that it refers
  13823. -    to the edge beyond the last pixel.  */
  13824. - static void
  13825. - append_bb (bounding_box_list_type *bb_list, bounding_box_type bb)
  13826. - {
  13827. -   BB_LIST_LENGTH (*bb_list)++;
  13828. -   BB_LIST_DATA (*bb_list)
  13829. -     = xrealloc (BB_LIST_DATA (*bb_list),
  13830. -                  BB_LIST_LENGTH (*bb_list) * sizeof (bounding_box_type));
  13831. -   MAX_COL (bb)++;
  13832. -   BB_LIST_ELT (*bb_list, BB_LIST_LENGTH (*bb_list) - 1) = bb;
  13833. - }
  13834. - /* This routine returns an initialized empty list.  */
  13835. - bounding_box_list_type
  13836. - init_bounding_box_list ()
  13837. - {
  13838. -   bounding_box_list_type bb_list;
  13839. -   
  13840. -   BB_LIST_LENGTH (bb_list) = 0;
  13841. -   BB_LIST_DATA (bb_list) = NULL;
  13842. -   
  13843. -   return bb_list;
  13844. - }
  13845. - /* Put the elements in the list B2 onto the end of B1.  B2 is not
  13846. -    changed.  */
  13847. - void
  13848. - append_bounding_box_list (bounding_box_list_type *b1,
  13849. -                           bounding_box_list_type b2)
  13850. - {
  13851. -   unsigned new_length;
  13852. -   unsigned this_bb;
  13853. -   assert (b1 != NULL);
  13854. -   
  13855. -   if (BB_LIST_LENGTH (b2) == 0)
  13856. -     return;
  13857. -     
  13858. -   new_length = BB_LIST_LENGTH (*b1) + BB_LIST_LENGTH (b2);
  13859. -   BB_LIST_DATA (*b1)
  13860. -     = xrealloc (BB_LIST_DATA (*b1), new_length * sizeof (bounding_box_type));
  13861. -   
  13862. -   for (this_bb = 0; this_bb < BB_LIST_LENGTH (b2); this_bb++)
  13863. -     BB_LIST_ELT (*b1, BB_LIST_LENGTH (*b1)++) = BB_LIST_ELT (b2, this_bb);
  13864. - }
  13865. - /* Here is a routine that frees the memory in a bounding box list.  */
  13866. - void
  13867. - free_bounding_box_list (bounding_box_list_type *bb_list)
  13868. - {
  13869. -   if (BB_LIST_DATA (*bb_list) != NULL)
  13870. -     safe_free ((address *) &BB_LIST_DATA (*bb_list));
  13871.   }
  13872. --- 110,112 ----
  13873. diff -Nrc2 fontutils-0.5/lib/bitmap.c fontutils-0.6/lib/bitmap.c
  13874. *** fontutils-0.5/lib/bitmap.c    Sun Jun 21 14:42:02 1992
  13875. --- fontutils-0.6/lib/bitmap.c    Tue Sep 22 13:19:17 1992
  13876. ***************
  13877. *** 22,26 ****
  13878.   #include "bounding-box.h"
  13879.   
  13880.   
  13881.   /* Make sure the bitmap is entirely white to begin with.  */
  13882. --- 22,26 ----
  13883.   #include "bounding-box.h"
  13884.   
  13885. ! static void bb_ensure_bounds (bounding_box_type *, bitmap_type, string);
  13886.   
  13887.   /* Make sure the bitmap is entirely white to begin with.  */
  13888. ***************
  13889. *** 72,78 ****
  13890.   
  13891.   /* Return the part of the bitmap SOURCE enclosed by the bounding box BB.
  13892. !    BB is interpreted in the bitmap's coordinates; for example, if
  13893. !    MIN_ROW (BB) == 10, the subimage will start in the tenth row from the
  13894. !    top of SOURCE.  */
  13895.   
  13896.   bitmap_type
  13897. --- 72,78 ----
  13898.   
  13899.   /* Return the part of the bitmap SOURCE enclosed by the bounding box BB.
  13900. !    BB is interpreted in bitmap coordinates, with y increasing downwards;
  13901. !    for example, if MIN_ROW (BB) == 10, the subimage will start in the
  13902. !    tenth row from the top of SOURCE.  */
  13903.   
  13904.   bitmap_type
  13905. ***************
  13906. *** 80,98 ****
  13907.   {
  13908.     unsigned this_row;
  13909. !   bitmap_type answer = new_bitmap (bb_to_dimensions (bb));
  13910.     BITMAP_BITS (source) += MIN_ROW (bb) * BITMAP_WIDTH (source) + MIN_COL (bb);
  13911.     
  13912.     for (this_row = MIN_ROW (bb); this_row <= MAX_ROW (bb); this_row++)
  13913.       {
  13914. !       one_byte *answer_row = BITMAP_ROW (answer, this_row - MIN_ROW (bb));
  13915.   
  13916. !       memcpy (answer_row, BITMAP_BITS (source), BITMAP_WIDTH (answer));
  13917.         BITMAP_BITS (source) += BITMAP_WIDTH (source);
  13918.       }
  13919.   
  13920. !   return answer;
  13921.   }
  13922.   
  13923.   
  13924.   
  13925.   /* The bounding boxes that we make in this routine are unlike the
  13926. --- 80,135 ----
  13927.   {
  13928.     unsigned this_row;
  13929. !   bitmap_type sub = new_bitmap (bb_to_dimensions (bb));
  13930. !   
  13931. !   /* Move to the bit at which we want to start copying.  */
  13932.     BITMAP_BITS (source) += MIN_ROW (bb) * BITMAP_WIDTH (source) + MIN_COL (bb);
  13933.     
  13934. +   bb_ensure_bounds (&bb, source, "extract_subbitmap");
  13935.     for (this_row = MIN_ROW (bb); this_row <= MAX_ROW (bb); this_row++)
  13936.       {
  13937. !       one_byte *target = BITMAP_ROW (sub, this_row - MIN_ROW (bb));
  13938.   
  13939. !       memcpy (target, BITMAP_BITS (source), BITMAP_WIDTH (sub));
  13940.         BITMAP_BITS (source) += BITMAP_WIDTH (source);
  13941.       }
  13942.   
  13943. !   return sub;
  13944.   }
  13945.   
  13946.   
  13947. + /* If any of the elements of BB (taken to be in bitmap coordinates) are
  13948. +    outside the bounds of the bitmap SOURCE, give a warning (using NAME)
  13949. +    and update them.  */
  13950. + static void
  13951. + bb_ensure_bounds (bounding_box_type *bb, bitmap_type source, string name)
  13952. + {
  13953. +   if (MIN_COL (*bb) < 0)
  13954. +     {
  13955. +       WARNING2 ("%s: min col=%d outside source image", name, MIN_COL (*bb));
  13956. +       MIN_COL (*bb) = 0;
  13957. +     }
  13958. +   if (MIN_ROW (*bb) < 0)
  13959. +     {
  13960. +       WARNING2 ("%s: min row=%d outside source image", name, MIN_ROW (*bb));
  13961. +       MIN_COL (*bb) = 0;
  13962. +     }
  13963. +   /* See comments at `get_character_bitmap' in gf_input.c for why the
  13964. +      width and height are treated asymetrically.  */
  13965. +   if (MAX_COL (*bb) > BITMAP_WIDTH (source))
  13966. +     {
  13967. +       WARNING2 ("%s: max col=%d outside source image", name, MAX_COL (*bb));
  13968. +       MAX_COL (*bb) = BITMAP_WIDTH (source) - 1;
  13969. +     }
  13970. +   if (MAX_ROW (*bb) >= BITMAP_HEIGHT (source))
  13971. +     {
  13972. +       WARNING2 ("%s: max row=%d outside source image", name, MAX_ROW (*bb));
  13973. +       MAX_COL (*bb) = BITMAP_HEIGHT (source) - 1;
  13974. +     }
  13975. + }
  13976.   
  13977.   /* The bounding boxes that we make in this routine are unlike the
  13978. ***************
  13979. *** 194,199 ****
  13980.     return vector;
  13981.   }
  13982.   
  13983.   /* Print a part of the bitmap in human-readable form.  */
  13984. --- 231,234 ----
  13985. diff -Nrc2 fontutils-0.5/lib/filename.c fontutils-0.6/lib/filename.c
  13986. *** fontutils-0.5/lib/filename.c    Fri Apr 10 16:51:11 1992
  13987. --- fontutils-0.6/lib/filename.c    Tue Oct 20 12:00:57 1992
  13988. ***************
  13989. *** 33,39 ****
  13990.     static string *dirs = NULL;
  13991.     string pk_var, pk_name, name;
  13992. !   char suffix[MAX_INT_LENGTH + 3];
  13993.   
  13994. !   sprintf (suffix, "%dpk", dpi);
  13995.   
  13996.     pk_var = getenv ("PKFONTS") ? "PKFONTS"
  13997. --- 33,39 ----
  13998.     static string *dirs = NULL;
  13999.     string pk_var, pk_name, name;
  14000. !   char suffix[MAX_INT_LENGTH + sizeof ".pk"];
  14001.   
  14002. !   sprintf (suffix, ".%dpk", dpi);
  14003.   
  14004.     pk_var = getenv ("PKFONTS") ? "PKFONTS"
  14005. ***************
  14006. *** 43,47 ****
  14007.       dirs = initialize_path_list (pk_var, DEFAULT_PK_PATH);
  14008.   
  14009. !   name = make_suffix (font_name, suffix);
  14010.     pk_name = find_path_filename (name, dirs);
  14011.   
  14012. --- 43,47 ----
  14013.       dirs = initialize_path_list (pk_var, DEFAULT_PK_PATH);
  14014.   
  14015. !   name = concat (font_name, suffix);
  14016.     pk_name = find_path_filename (name, dirs);
  14017.   
  14018. ***************
  14019. *** 60,66 ****
  14020.     static string *dirs = NULL;
  14021.     string gf_var, gf_name, name;
  14022. !   char suffix[MAX_INT_LENGTH + 3];
  14023.   
  14024. !   sprintf (suffix, "%dgf", dpi);
  14025.   
  14026.     gf_var = getenv ("GFFONTS") ? "GFFONTS" : "TEXFONTS";
  14027. --- 60,66 ----
  14028.     static string *dirs = NULL;
  14029.     string gf_var, gf_name, name;
  14030. !   char suffix[MAX_INT_LENGTH + sizeof ".pk"];
  14031.   
  14032. !   sprintf (suffix, ".%dgf", dpi);
  14033.   
  14034.     gf_var = getenv ("GFFONTS") ? "GFFONTS" : "TEXFONTS";
  14035. ***************
  14036. *** 69,73 ****
  14037.       dirs = initialize_path_list (gf_var, DEFAULT_GF_PATH);
  14038.   
  14039. !   name = make_suffix (font_name, suffix);
  14040.     gf_name = find_path_filename (name, dirs);
  14041.   
  14042. --- 69,73 ----
  14043.       dirs = initialize_path_list (gf_var, DEFAULT_GF_PATH);
  14044.   
  14045. !   name = concat (font_name, suffix);
  14046.     gf_name = find_path_filename (name, dirs);
  14047.   
  14048. ***************
  14049. *** 90,94 ****
  14050.       dirs = initialize_path_list ("TEXFONTS", DEFAULT_TFM_PATH);
  14051.   
  14052. !   name = make_suffix (font_name, "tfm");
  14053.     tfm_name = find_path_filename (name, dirs);
  14054.   
  14055. --- 90,94 ----
  14056.       dirs = initialize_path_list ("TEXFONTS", DEFAULT_TFM_PATH);
  14057.   
  14058. !   name = concat (font_name, ".tfm");
  14059.     tfm_name = find_path_filename (name, dirs);
  14060.   
  14061. diff -Nrc2 fontutils-0.5/lib/getopt.c fontutils-0.6/lib/getopt.c
  14062. *** fontutils-0.5/lib/getopt.c    Wed Aug 26 18:35:59 1992
  14063. --- fontutils-0.6/lib/getopt.c    Wed Oct 21 11:43:35 1992
  14064. ***************
  14065. *** 37,44 ****
  14066.   #include <stdio.h>
  14067.   
  14068. - #if defined(USG) || defined(STDC_HEADERS) || defined(__GNU_LIBRARY__)
  14069. - #include <string.h>
  14070. - #endif
  14071.   /* This needs to come after some library #include
  14072.      to get __GNU_LIBRARY__ defined.  */
  14073. --- 37,40 ----
  14074. ***************
  14075. *** 148,151 ****
  14076. --- 144,151 ----
  14077.   
  14078.   #ifdef    __GNU_LIBRARY__
  14079. + /* We want to avoid inclusion of string.h with non-GNU libraries
  14080. +    because there are many ways it can cause trouble.
  14081. +    On some systems, it contains special magic macros that don't work
  14082. +    in GCC.  */
  14083.   #include <string.h>
  14084.   #define    my_index    strchr
  14085. diff -Nrc2 fontutils-0.5/lib/make-suffix.c fontutils-0.6/lib/make-suffix.c
  14086. *** fontutils-0.5/lib/make-suffix.c    Fri Apr 10 16:51:11 1992
  14087. --- fontutils-0.6/lib/make-suffix.c    Thu Oct 22 17:58:11 1992
  14088. ***************
  14089. *** 1,3 ****
  14090. ! /* make-suffix.c: construct a suffix.
  14091.   
  14092.   Copyright (C) 1992 Free Software Foundation, Inc.
  14093. --- 1,3 ----
  14094. ! /* make-suffix.c: unconditionally change the suffix on a string.
  14095.   
  14096.   Copyright (C) 1992 Free Software Foundation, Inc.
  14097. diff -Nrc2 fontutils-0.5/lib/malloc.c fontutils-0.6/lib/malloc.c
  14098. *** fontutils-0.5/lib/malloc.c    Fri May 15 09:03:26 1992
  14099. --- fontutils-0.6/lib/malloc.c    Tue Sep 22 16:29:09 1992
  14100. ***************
  14101. *** 749,753 ****
  14102.   
  14103.   /*  who to call when sbrk returns failure */
  14104.   #ifndef NO_NEW_HANDLER
  14105.   typedef volatile void (*vfp)();
  14106. --- 749,753 ----
  14107.   
  14108.   /*  who to call when sbrk returns failure */
  14109. ! #define NO_NEW_HANDLER /* We need nothing fancy --karl */
  14110.   #ifndef NO_NEW_HANDLER
  14111.   typedef volatile void (*vfp)();
  14112. ***************
  14113. *** 1097,1100 ****
  14114. --- 1097,1105 ----
  14115.         set_inuse(p);    /* don't let malloc consolidate us yet! */
  14116.         newmem = malloc(nb);
  14117. +       if (newmem == NULL)
  14118. +         {
  14119. +           fprintf (stderr, "realloc: malloc of %u bytes failed.\n", nb);
  14120. +           abort ();
  14121. +         }
  14122.         bcopy(mem, newmem, oldsize - SIZE_SZ);
  14123.         free(mem);
  14124. diff -Nrc2 fontutils-0.5/lib/report.c fontutils-0.6/lib/report.c
  14125. *** fontutils-0.5/lib/report.c    Fri Mar 27 14:50:44 1992
  14126. --- fontutils-0.6/lib/report.c    Mon Oct  5 10:12:33 1992
  14127. ***************
  14128. *** 22,23 ****
  14129. --- 22,27 ----
  14130.   /* Says whether to output short progress reports as we run.  (-verbose)  */ 
  14131.   boolean verbose = false;
  14132. + /* Where to output the reports.  If a particular program uses standard
  14133. +    output for real output, this gets changed to `stderr'.  */
  14134. + FILE *report_file = stdout;
  14135. diff -Nrc2 fontutils-0.5/limn/.gdbinit fontutils-0.6/limn/.gdbinit
  14136. *** fontutils-0.5/limn/.gdbinit    Tue Jul 28 09:50:19 1992
  14137. --- fontutils-0.6/limn/.gdbinit    Mon Oct  5 12:26:16 1992
  14138. ***************
  14139. *** 36,40 ****
  14140.   #-subdivide-threshold=.1 \
  14141.   #-range=\'-\' \
  14142. ! #-do-display -display-stop \
  14143.   #
  14144.   #set args -verbose -log chab30 \
  14145. --- 36,40 ----
  14146.   #-subdivide-threshold=.1 \
  14147.   #-range=\'-\' \
  14148. ! #-do-display  \
  14149.   #
  14150.   #set args -verbose -log chab30 \
  14151. ***************
  14152. *** 43,65 ****
  14153.   #-filter-surround=4 \
  14154.   #-range=%-%
  14155. ! #-do-display -display-stop \
  14156.   
  14157. ! # set args -verbose -do-display -display-stop trap -dpi=72270
  14158.   
  14159. - #oen36 +corner-surround=15 +tangent-surround=15 \
  14160. - # error-threshold=3.0 +filter-iterations=4 +corner-always-threshold=50
  14161.   
  14162. - # helvR24 +range A-Z +corner-surround=1 +dpi=120 
  14163.   # +dpi 1200 +line-threshold 16.0
  14164.   # +corner-surround 16 +error-threshold 35.0 +reparameterize-threshold 60.0 \
  14165.   
  14166. - #set args -verbose -log -dpi=1200 tmi72 \
  14167. - #set args -verbose -log cmr10.300 \
  14168. - #  -do-display -display-stop\
  14169. - #  -range=.-.
  14170. - #  -range=\(-,
  14171.   # The subdivide parameters make the stem of the t flow more nicely into
  14172.   # the tip.
  14173. --- 43,54 ----
  14174.   #-filter-surround=4 \
  14175.   #-range=%-%
  14176. ! #-do-display  \
  14177.   
  14178. ! # set args -verbose -do-display  trap -dpi=72270
  14179.   
  14180.   
  14181.   # +dpi 1200 +line-threshold 16.0
  14182.   # +corner-surround 16 +error-threshold 35.0 +reparameterize-threshold 60.0 \
  14183.   
  14184.   # The subdivide parameters make the stem of the t flow more nicely into
  14185.   # the tip.
  14186. ***************
  14187. *** 80,89 ****
  14188.   #  -output-file ggmr26D
  14189.   ## -range=a-z \
  14190. ! ##  -do-display -display-stop \
  14191.   ##  -log \
  14192.   
  14193. - #set args -verbose ligtest
  14194. - #set args -verbose cdr10
  14195.   # Get Y from ring for sizing.
  14196.   #set args -verbose -output-file ../ourfonts/garamond/r/ring/Y-R \
  14197. --- 69,75 ----
  14198.   #  -output-file ggmr26D
  14199.   ## -range=a-z \
  14200. ! ##  -do-display  \
  14201.   ##  -log \
  14202.   
  14203.   # Get Y from ring for sizing.
  14204.   #set args -verbose -output-file ../ourfonts/garamond/r/ring/Y-R \
  14205. ***************
  14206. *** 99,101 ****
  14207.     ../ourfonts/garamond/r/ring/ring-r
  14208.   
  14209. ! set args -verbose kgtA.746
  14210. --- 85,87 ----
  14211.     ../ourfonts/garamond/r/ring/ring-r
  14212.   
  14213. ! set args -verbose -log ggsbi10.1200 -range=37-37
  14214. diff -Nrc2 fontutils-0.5/limn/ChangeLog fontutils-0.6/limn/ChangeLog
  14215. *** fontutils-0.5/limn/ChangeLog    Thu Sep  3 09:31:10 1992
  14216. --- fontutils-0.6/limn/ChangeLog    Tue Oct 27 13:02:50 1992
  14217. ***************
  14218. *** 1,2 ****
  14219. --- 1,23 ----
  14220. + Tue Oct 27 13:02:14 1992  Karl Berry  (karl@cs.umb.edu)
  14221. +     * Version 0.6.
  14222. + Sun Oct 25 14:22:34 1992  Karl Berry  (karl@cs.umb.edu)
  14223. +     * output-bzr.c (bzr_output_char): No longer have BZR_CHAR_... macros.
  14224. + Mon Oct  5 11:58:20 1992  Karl Berry  (karl@cs.umb.edu)
  14225. +     * curve.c (print_curve): New param `print_t' to say whether to
  14226. +     print t values.
  14227. +         * curve.h: Change decl.
  14228. +         * fit.c: Change calls.
  14229. +     * xserver.c: Doc fix.
  14230. + Sun Sep  6 16:46:27 1992  Karl Berry  (karl@hayley)
  14231. +         * display.c (x_output_char): call getchar, not scanf.
  14232.   Thu Sep  3 09:31:10 1992  Karl Berry  (karl@hayley)
  14233.   
  14234. diff -Nrc2 fontutils-0.5/limn/curve.c fontutils-0.6/limn/curve.c
  14235. *** fontutils-0.5/limn/curve.c    Sun Mar 29 19:10:32 1992
  14236. --- fontutils-0.6/limn/curve.c    Mon Oct  5 12:25:32 1992
  14237. ***************
  14238. *** 100,105 ****
  14239.     /* The t value does not need to be set.  */
  14240.   }
  14241.   
  14242.   /* Show the pixels of the curve online.  */
  14243. --- 100,103 ----
  14244. ***************
  14245. *** 124,129 ****
  14246.   #define NUM_TO_PRINT 3
  14247.   
  14248.   void
  14249. ! log_curve (curve_type curve)
  14250.   {
  14251.     unsigned this_point;
  14252. --- 122,136 ----
  14253.   #define NUM_TO_PRINT 3
  14254.   
  14255. + #define LOG_CURVE_POINT(c, p, print_t)                    \
  14256. +   do                                    \
  14257. +     {                                    \
  14258. +       LOG2 ("(%.3f,%.3f)", CURVE_POINT (c, p).x, CURVE_POINT (c, p).y);    \
  14259. +       if (print_t)                            \
  14260. +         LOG1 ("/%.2f", CURVE_T (c, p));                    \
  14261. +     }                                    \
  14262. +   while (0)
  14263.   void
  14264. ! log_curve (curve_type curve, boolean print_t)
  14265.   {
  14266.     unsigned this_point;
  14267. ***************
  14268. *** 145,150 ****
  14269.     LOG ("  ");
  14270.     
  14271. !   /* If the whole curve is short enough, don't print it with ellipses,
  14272. !      etc.  */
  14273.     if (CURVE_LENGTH (curve) <= NUM_TO_PRINT * 2)
  14274.       {
  14275. --- 152,156 ----
  14276.     LOG ("  ");
  14277.     
  14278. !   /* If the curve is short enough, don't use ellipses.  */
  14279.     if (CURVE_LENGTH (curve) <= NUM_TO_PRINT * 2)
  14280.       {
  14281. ***************
  14282. *** 151,157 ****
  14283.         for (this_point = 0; this_point < CURVE_LENGTH (curve); this_point++)
  14284.           {
  14285. !           LOG3 ("(%.3f,%.3f)/%.3f, ", CURVE_POINT (curve, this_point).x,
  14286. !                 CURVE_POINT (curve, this_point).y,
  14287. !                 CURVE_T (curve, this_point));
  14288.             if (this_point != CURVE_LENGTH (curve) - 1
  14289.                 && (this_point + 1) % NUM_TO_PRINT == 0)
  14290. --- 157,163 ----
  14291.         for (this_point = 0; this_point < CURVE_LENGTH (curve); this_point++)
  14292.           {
  14293. !           LOG_CURVE_POINT (curve, this_point, print_t);
  14294. !           LOG (" ");
  14295.             if (this_point != CURVE_LENGTH (curve) - 1
  14296.                 && (this_point + 1) % NUM_TO_PRINT == 0)
  14297. ***************
  14298. *** 164,169 ****
  14299.              this_point < NUM_TO_PRINT && this_point < CURVE_LENGTH (curve);
  14300.              this_point++)
  14301. !         LOG3 ("(%.3f,%.3f)/%.3f, ", CURVE_POINT (curve, this_point).x,
  14302. !               CURVE_POINT (curve, this_point).y, CURVE_T (curve, this_point));
  14303.   
  14304.         LOG ("...\n   ...");
  14305. --- 170,177 ----
  14306.              this_point < NUM_TO_PRINT && this_point < CURVE_LENGTH (curve);
  14307.              this_point++)
  14308. !         {
  14309. !           LOG_CURVE_POINT (curve, this_point, print_t);
  14310. !           LOG (" ");
  14311. !         }
  14312.   
  14313.         LOG ("...\n   ...");
  14314. ***************
  14315. *** 172,177 ****
  14316.              this_point < CURVE_LENGTH (curve);
  14317.              this_point++)
  14318. !         LOG3 (", (%.3f,%.3f)/%.2f", CURVE_POINT (curve, this_point).x,
  14319. !               CURVE_POINT (curve, this_point).y, CURVE_T (curve, this_point));
  14320.       }
  14321.   
  14322. --- 180,187 ----
  14323.              this_point < CURVE_LENGTH (curve);
  14324.              this_point++)
  14325. !         {
  14326. !           LOG (" ");
  14327. !           LOG_CURVE_POINT (curve, this_point, print_t);
  14328. !         }
  14329.       }
  14330.   
  14331. ***************
  14332. *** 202,213 ****
  14333.   
  14334.     LOG (" ");
  14335.     for (this_point = 0; this_point < CURVE_LENGTH (curve); this_point++)
  14336. !     LOG3 (" (%.3f,%.3f)/%.2f", CURVE_POINT (curve, this_point).x,
  14337. !       CURVE_POINT (curve, this_point).y, CURVE_T (curve, this_point));
  14338.   
  14339.     LOG (".\n");
  14340.   }
  14341.   
  14342.   /* Return an initialized but empty curve list.  */
  14343. --- 212,224 ----
  14344.   
  14345.     LOG (" ");
  14346.     for (this_point = 0; this_point < CURVE_LENGTH (curve); this_point++)
  14347. !     {
  14348. !       LOG (" ");
  14349. !       LOG_CURVE_POINT (curve, this_point, true);
  14350. !     }
  14351.   
  14352.     LOG (".\n");
  14353.   }
  14354.   
  14355.   /* Return an initialized but empty curve list.  */
  14356. ***************
  14357. *** 250,255 ****
  14358.     curve_list->data[curve_list->length - 1] = curve;
  14359.   }
  14360.   
  14361.   /* Return an initialized but empty curve list array.  */
  14362. --- 261,264 ----
  14363. diff -Nrc2 fontutils-0.5/limn/curve.h fontutils-0.6/limn/curve.h
  14364. *** fontutils-0.5/limn/curve.h    Tue Jul 21 16:09:42 1992
  14365. --- fontutils-0.6/limn/curve.h    Mon Oct  5 12:22:03 1992
  14366. ***************
  14367. *** 106,110 ****
  14368.   /* Write some or all, respectively, of the curve C in human-readable
  14369.      form to the log file, if logging is enabled.  */
  14370. ! extern void log_curve (curve_type c);
  14371.   extern void log_entire_curve (curve_type c);
  14372.   
  14373. --- 106,110 ----
  14374.   /* Write some or all, respectively, of the curve C in human-readable
  14375.      form to the log file, if logging is enabled.  */
  14376. ! extern void log_curve (curve_type c, boolean print_t);
  14377.   extern void log_entire_curve (curve_type c);
  14378.   
  14379. diff -Nrc2 fontutils-0.5/limn/display.c fontutils-0.6/limn/display.c
  14380. *** fontutils-0.5/limn/display.c    Mon Jul 27 15:54:04 1992
  14381. --- fontutils-0.6/limn/display.c    Sun Sep  6 16:53:02 1992
  14382. ***************
  14383. *** 481,486 ****
  14384.     if (!display_continue)
  14385.       {
  14386. -       char dummy;
  14387. -       
  14388.         send_event (server_window, foserver_update_pixmap_atom, pixmap);
  14389.         XSync (display, False);
  14390. --- 481,484 ----
  14391. ***************
  14392. *** 488,492 ****
  14393.         if (verbose) putchar ('\n');
  14394.         printf ("RET to continue: " );
  14395. !       scanf ("%c", &dummy);
  14396.       }
  14397.   }
  14398. --- 486,490 ----
  14399.         if (verbose) putchar ('\n');
  14400.         printf ("RET to continue: " );
  14401. !       (void) getchar ();
  14402.       }
  14403.   }
  14404. diff -Nrc2 fontutils-0.5/limn/fit.c fontutils-0.6/limn/fit.c
  14405. *** fontutils-0.5/limn/fit.c    Mon Jul 27 15:54:04 1992
  14406. --- fontutils-0.6/limn/fit.c    Mon Oct  5 12:22:03 1992
  14407. ***************
  14408. *** 235,239 ****
  14409.     /* We filter all the curves in CURVE_LIST at once; otherwise, we would
  14410.        look at an unfiltered curve when computing tangents.  */
  14411. !   LOG ("\nFiltering curves (t values may be garbage):\n");
  14412.     for (this_curve = 0; this_curve < curve_list.length; this_curve++)
  14413.       {
  14414. --- 235,239 ----
  14415.     /* We filter all the curves in CURVE_LIST at once; otherwise, we would
  14416.        look at an unfiltered curve when computing tangents.  */
  14417. !   LOG ("\nFiltering curves:\n");
  14418.     for (this_curve = 0; this_curve < curve_list.length; this_curve++)
  14419.       {
  14420. ***************
  14421. *** 930,934 ****
  14422.       }
  14423.   
  14424. !   log_curve (curve);
  14425.     display_curve (curve);
  14426.   }
  14427. --- 930,934 ----
  14428.       }
  14429.   
  14430. !   log_curve (curve, false);
  14431.     display_curve (curve);
  14432.   }
  14433. ***************
  14434. *** 1383,1387 ****
  14435.       }
  14436.     LOG ("  reparameterized curve:\n   ");
  14437. !   log_curve (curve);
  14438.   
  14439.     return true;
  14440. --- 1383,1387 ----
  14441.       }
  14442.     LOG ("  reparameterized curve:\n   ");
  14443. !   log_curve (curve, true);
  14444.   
  14445.     return true;
  14446. diff -Nrc2 fontutils-0.5/limn/output-bzr.c fontutils-0.6/limn/output-bzr.c
  14447. *** fontutils-0.5/limn/output-bzr.c    Wed Apr 15 15:42:34 1992
  14448. --- fontutils-0.6/limn/output-bzr.c    Sun Oct 25 14:22:46 1992
  14449. ***************
  14450. *** 70,77 ****
  14451.     CHAR_SET_WIDTH (bzr_char) = PIXELS_TO_POINTS (CHAR_SET_WIDTH (c), dpi_real);
  14452.   
  14453. !   BZR_CHAR_MIN_COL (bzr_char) = PIXELS_TO_POINTS (CHAR_MIN_COL (c), dpi_real);
  14454. !   BZR_CHAR_MAX_COL (bzr_char) = PIXELS_TO_POINTS (CHAR_MAX_COL (c), dpi_real);
  14455. !   BZR_CHAR_MIN_ROW (bzr_char) = PIXELS_TO_POINTS (CHAR_MIN_ROW (c), dpi_real);
  14456. !   BZR_CHAR_MAX_ROW (bzr_char) = PIXELS_TO_POINTS (CHAR_MAX_ROW (c), dpi_real);
  14457.   
  14458.     /* We have to change all the values in the spline list to be in
  14459. --- 70,77 ----
  14460.     CHAR_SET_WIDTH (bzr_char) = PIXELS_TO_POINTS (CHAR_SET_WIDTH (c), dpi_real);
  14461.   
  14462. !   CHAR_MIN_COL (bzr_char) = PIXELS_TO_POINTS (CHAR_MIN_COL (c), dpi_real);
  14463. !   CHAR_MAX_COL (bzr_char) = PIXELS_TO_POINTS (CHAR_MAX_COL (c), dpi_real);
  14464. !   CHAR_MIN_ROW (bzr_char) = PIXELS_TO_POINTS (CHAR_MIN_ROW (c), dpi_real);
  14465. !   CHAR_MAX_ROW (bzr_char) = PIXELS_TO_POINTS (CHAR_MAX_ROW (c), dpi_real);
  14466.   
  14467.     /* We have to change all the values in the spline list to be in
  14468. diff -Nrc2 fontutils-0.5/limn/version.c fontutils-0.6/limn/version.c
  14469. *** fontutils-0.5/limn/version.c    Thu Sep  3 09:46:21 1992
  14470. --- fontutils-0.6/limn/version.c    Tue Oct 27 13:28:00 1992
  14471. ***************
  14472. *** 1 ****
  14473. ! char *version_string = "limn version 0.5";
  14474. --- 1 ----
  14475. ! char *version_string = "limn version 0.6";
  14476. diff -Nrc2 fontutils-0.5/limn/xserver.c fontutils-0.6/limn/xserver.c
  14477. *** fontutils-0.5/limn/xserver.c    Fri Jun  5 09:20:27 1992
  14478. --- fontutils-0.6/limn/xserver.c    Mon Oct  5 12:29:33 1992
  14479. ***************
  14480. *** 26,31 ****
  14481.   
  14482.   #include "xserver.h"
  14483.   
  14484.   /* For the resource database.  */
  14485. --- 26,29 ----
  14486. ***************
  14487. *** 55,60 ****
  14488.     long l[5];
  14489.   } message_data_type;
  14490.   
  14491.   static void dispatch_message (Atom, message_data_type);
  14492. --- 53,56 ----
  14493. ***************
  14494. *** 62,67 ****
  14495.   static void foserver_update_pixmap (Pixmap);
  14496.   static void message_handler (Widget, XEvent *, String *, Cardinal *);
  14497.   
  14498.   void
  14499. --- 58,61 ----
  14500. ***************
  14501. *** 70,74 ****
  14502.   {
  14503.     unsigned window_size;
  14504. !   string identity; /* This will be the contents of the identity_atom */
  14505.   #else /* not STANDALONE_SERVER */
  14506.   start_server (unsigned window_size, string identity)
  14507. --- 64,68 ----
  14508.   {
  14509.     unsigned window_size;
  14510. !   string identity; /* This will be the contents of `identity_atom'.  */
  14511.   #else /* not STANDALONE_SERVER */
  14512.   start_server (unsigned window_size, string identity)
  14513. ***************
  14514. *** 183,188 ****
  14515.       WARNING1 ("foserver: Unknown message `%s'", XGetAtomName (display, a));
  14516.   }
  14517.   /* Shut down.  */
  14518.   
  14519. --- 177,181 ----
  14520.       WARNING1 ("foserver: Unknown message `%s'", XGetAtomName (display, a));
  14521.   }
  14522.   /* Shut down.  */
  14523.   
  14524. diff -Nrc2 fontutils-0.5/pbm/ChangeLog fontutils-0.6/pbm/ChangeLog
  14525. *** fontutils-0.5/pbm/ChangeLog    Thu Sep  3 09:31:14 1992
  14526. --- fontutils-0.6/pbm/ChangeLog    Tue Oct 27 13:02:51 1992
  14527. ***************
  14528. *** 1,2 ****
  14529. --- 1,11 ----
  14530. + Tue Oct 27 12:56:21 1992  Karl Berry  (karl@cs.umb.edu)
  14531. +     * Version 0.6.
  14532. + Tue Sep 15 08:39:17 1992  Karl Berry  (karl@hayley)
  14533. +         * libpbm1.c (malloc, free, exit): don't declare these, rely on
  14534. +           config.h.
  14535.   Thu Sep  3 09:31:14 1992  Karl Berry  (karl@hayley)
  14536.   
  14537. diff -Nrc2 fontutils-0.5/pbm/M.depend fontutils-0.6/pbm/M.depend
  14538. *** fontutils-0.5/pbm/M.depend    Wed Sep  2 17:20:10 1992
  14539. --- fontutils-0.6/pbm/M.depend    Sun Oct 25 14:15:30 1992
  14540. ***************
  14541. *** 1,3 ****
  14542. ! libpbm1.o : libpbm1.c .././include/pbm.h .././include/pbmplus.h libpbm.h 
  14543. ! libpbm2.o : libpbm2.c .././include/pbmplus.h .././include/pbm.h libpbm.h 
  14544. ! libpbm4.o : libpbm4.c .././include/pbm.h .././include/pbmplus.h libpbm.h 
  14545. --- 1,12 ----
  14546. ! libpbm1.o : libpbm1.c .././include/pbm.h .././include/pbmplus.h .././include/config.h \
  14547. !   .././include/c-auto.h .././include/c-std.h .././include/c-memstr.h .././include/c-errno.h \
  14548. !   .././include/c-minmax.h .././include/c-limits.h .././include/c-seek.h .././include/c-proto.h \
  14549. !   .././include/global.h .././include/lib.h .././include/types.h libpbm.h 
  14550. ! libpbm2.o : libpbm2.c .././include/pbmplus.h .././include/config.h .././include/c-auto.h \
  14551. !   .././include/c-std.h .././include/c-memstr.h .././include/c-errno.h .././include/c-minmax.h \
  14552. !   .././include/c-limits.h .././include/c-seek.h .././include/c-proto.h .././include/global.h \
  14553. !   .././include/lib.h .././include/types.h .././include/pbm.h libpbm.h 
  14554. ! libpbm4.o : libpbm4.c .././include/pbm.h .././include/pbmplus.h .././include/config.h \
  14555. !   .././include/c-auto.h .././include/c-std.h .././include/c-memstr.h .././include/c-errno.h \
  14556. !   .././include/c-minmax.h .././include/c-limits.h .././include/c-seek.h .././include/c-proto.h \
  14557. !   .././include/global.h .././include/lib.h .././include/types.h libpbm.h 
  14558. diff -Nrc2 fontutils-0.5/pbm/libpbm1.c fontutils-0.6/pbm/libpbm1.c
  14559. *** fontutils-0.5/pbm/libpbm1.c    Sat Mar  7 10:02:01 1992
  14560. --- fontutils-0.6/pbm/libpbm1.c    Tue Sep 15 08:39:31 1992
  14561. ***************
  14562. *** 10,14 ****
  14563.   ** implied warranty.
  14564.   **
  14565. ! ** Minor changes to avoid compiler warnings --karl, 22 July 1991.
  14566.   */
  14567.   
  14568. --- 10,14 ----
  14569.   ** implied warranty.
  14570.   **
  14571. ! ** Minor configuration changes for GNU --karl.
  14572.   */
  14573.   
  14574. ***************
  14575. *** 16,22 ****
  14576. --- 16,25 ----
  14577.   #include "libpbm.h"
  14578.   #include <varargs.h>
  14579. + #if 0 /* karl */
  14580.   extern char *malloc ();
  14581.   extern void free ();
  14582.   extern void exit ();
  14583. + #endif
  14584.   
  14585.   /* Variable-sized arrays. */
  14586. diff -Nrc2 fontutils-0.5/pbm/pbmascii.c fontutils-0.6/pbm/pbmascii.c
  14587. *** fontutils-0.5/pbm/pbmascii.c    Fri Jun  5 09:20:27 1992
  14588. --- fontutils-0.6/pbm/pbmascii.c    Fri Oct 23 07:14:42 1992
  14589. ***************
  14590. *** 9,13 ****
  14591.     int width, height, format;
  14592.     unsigned row;
  14593. !   char *image_row;
  14594.     
  14595.     pbm_readpbminit (stdin, &width, &height, &format);
  14596. --- 9,13 ----
  14597.     int width, height, format;
  14598.     unsigned row;
  14599. !   unsigned char *image_row;
  14600.     
  14601.     pbm_readpbminit (stdin, &width, &height, &format);
  14602. ***************
  14603. *** 33,37 ****
  14604.   /*
  14605.   Local variables:
  14606. ! compile-command: "gcc -o pbmascii pbmascii.c pbm.a -lcposix"
  14607.   End:
  14608.   */
  14609. --- 33,37 ----
  14610.   /*
  14611.   Local variables:
  14612. ! compile-command: "gcc -g -posix -o pbmascii pbmascii.c pbm.a"
  14613.   End:
  14614.   */
  14615. diff -Nrc2 fontutils-0.5/pk/ChangeLog fontutils-0.6/pk/ChangeLog
  14616. *** fontutils-0.5/pk/ChangeLog    Thu Sep  3 09:31:18 1992
  14617. --- fontutils-0.6/pk/ChangeLog    Tue Oct 27 13:02:51 1992
  14618. ***************
  14619. *** 1,2 ****
  14620. --- 1,6 ----
  14621. + Tue Oct 27 12:56:27 1992  Karl Berry  (karl@cs.umb.edu)
  14622. +     * Version 0.6.
  14623.   Thu Sep  3 09:31:18 1992  Karl Berry  (karl@hayley)
  14624.   
  14625. diff -Nrc2 fontutils-0.5/tfm/ChangeLog fontutils-0.6/tfm/ChangeLog
  14626. *** fontutils-0.5/tfm/ChangeLog    Thu Sep  3 09:31:23 1992
  14627. --- fontutils-0.6/tfm/ChangeLog    Tue Oct 27 13:02:51 1992
  14628. ***************
  14629. *** 1,2 ****
  14630. --- 1,11 ----
  14631. + Tue Oct 27 12:56:39 1992  Karl Berry  (karl@cs.umb.edu)
  14632. +     * Version 0.6.
  14633. + Mon Oct 19 08:11:44 1992  Karl Berry  (karl@cs.umb.edu)
  14634. +     * tfm_input.c (tfm_get_chars): Return the newly malloced array,
  14635. +     not the static variable.
  14636.   Thu Sep  3 09:31:23 1992  Karl Berry  (karl@hayley)
  14637.   
  14638. diff -Nrc2 fontutils-0.5/tfm/tfm_input.c fontutils-0.6/tfm/tfm_input.c
  14639. *** fontutils-0.5/tfm/tfm_input.c    Tue Jul  7 16:45:52 1992
  14640. --- fontutils-0.6/tfm/tfm_input.c    Mon Oct 19 08:13:02 1992
  14641. ***************
  14642. *** 305,309 ****
  14643.          this_char <= global_info->last_charcode;
  14644.          this_char++)
  14645. !     /* This fills in the `tfm_chars' global.  */
  14646.       (void) tfm_get_char (this_char);
  14647.   
  14648. --- 305,309 ----
  14649.          this_char <= global_info->last_charcode;
  14650.          this_char++)
  14651. !     /* This fills in the `tfm_char_table' global.  */
  14652.       (void) tfm_get_char (this_char);
  14653.   
  14654. ***************
  14655. *** 311,319 ****
  14656.     tfm_chars = XTALLOC (TFM_SIZE, tfm_char_type);
  14657.     memcpy (tfm_chars, tfm_char_table, sizeof (tfm_char_table));
  14658. !   return tfm_char_table;
  14659.   }
  14660.   
  14661.   
  14662. ! /* Read the character CODE.  If the character doesn't exist, return NULL.  */
  14663.   
  14664.   tfm_char_type *
  14665. --- 311,321 ----
  14666.     tfm_chars = XTALLOC (TFM_SIZE, tfm_char_type);
  14667.     memcpy (tfm_chars, tfm_char_table, sizeof (tfm_char_table));
  14668. !   return tfm_chars;
  14669.   }
  14670.   
  14671.   
  14672. ! /* Read the character CODE.  If the character doesn't exist, return
  14673. !    NULL.  If it does, save the information in `tfm_char_table', as well
  14674. !    as returning it.  */
  14675.   
  14676.   tfm_char_type *
  14677. diff -Nrc2 fontutils-0.5/widgets/ChangeLog fontutils-0.6/widgets/ChangeLog
  14678. *** fontutils-0.5/widgets/ChangeLog    Thu Sep  3 09:31:30 1992
  14679. --- fontutils-0.6/widgets/ChangeLog    Tue Oct 27 13:02:51 1992
  14680. ***************
  14681. *** 1,2 ****
  14682. --- 1,6 ----
  14683. + Tue Oct 27 12:56:45 1992  Karl Berry  (karl@cs.umb.edu)
  14684. +     * Version 0.6.
  14685.   Thu Sep  3 09:31:30 1992  Karl Berry  (karl@hayley)
  14686.   
  14687. diff -Nrc2 fontutils-0.5/xbfe/ChangeLog fontutils-0.6/xbfe/ChangeLog
  14688. *** fontutils-0.5/xbfe/ChangeLog    Thu Sep  3 09:31:33 1992
  14689. --- fontutils-0.6/xbfe/ChangeLog    Tue Oct 27 13:02:50 1992
  14690. ***************
  14691. *** 1,2 ****
  14692. --- 1,6 ----
  14693. + Tue Oct 27 13:02:23 1992  Karl Berry  (karl@cs.umb.edu)
  14694. +     * Version 0.6.
  14695.   Thu Sep  3 09:31:33 1992  Karl Berry  (karl@hayley)
  14696.   
  14697. diff -Nrc2 fontutils-0.5/xbfe/version.c fontutils-0.6/xbfe/version.c
  14698. *** fontutils-0.5/xbfe/version.c    Thu Sep  3 09:46:21 1992
  14699. --- fontutils-0.6/xbfe/version.c    Tue Oct 27 13:28:00 1992
  14700. ***************
  14701. *** 1 ****
  14702. ! char *version_string = "xbfe version 0.5";
  14703. --- 1 ----
  14704. ! char *version_string = "xbfe version 0.6";
  14705.