From: calder@uluru.stanford.edu (Paul Calder)
Subject: Another Doc bug fix
Date: 16 May 91

David Rich uncovered a bug that triggered a core dump when printing
some documents.  The bug is tickled if these three conditions are met.

1. You are printing a document that contains an Idraw drawing that
   contains text.

2. You set the property '*idraw_font_metrics' to 'off'.

3. You have no PostScript font metrics files installed at your site.

This patch is archived as 'pub/3.0-fixes/fix8'.

============
    This patch assumes that fix6 has already been applied.
    Apply with ``patch -p -N < fix8'' at the top of the source tree.

*** iv/src/bin/doc/IdrawImage.c.beta+fix6  Thu Apr 11 23:21:20 1991
--- iv/src/bin/doc/IdrawImage.c            Thu May 16 12:01:21 1991
***************
*** 202,219 ****
          if (font == nil) {
            World* w = World::current();
              font = new FontInfo;
-             boolean screen_font_exists = Font::exists(w, buffer);
              if (_idraw_font_metrics) {
!                 if (screen_font_exists) {
                      font->_font = new Font(buffer);
                  } else {
                      font->_font = w->font();
                  }
              } else {
!                 if (screen_font_exists) {
                      font->_font = new PSFont(psname, pointsize, buffer, 1.0);
                  } else {
!                     font->_font = new PSFont(psname, pointsize, "fixed", 1.0);
                  }
              }
              font->_font->ref();
--- 202,218 ----
          if (font == nil) {
            World* w = World::current();
              font = new FontInfo;
              if (_idraw_font_metrics) {
!                 if (Font::exists(w, buffer)) {
                      font->_font = new Font(buffer);
                  } else {
                      font->_font = w->font();
                  }
              } else {
!                 if (PSFont::exists(psname)) {
                      font->_font = new PSFont(psname, pointsize, buffer, 1.0);
                  } else {
!                     font->_font = w->font();
                  }
              }
              font->_font->ref();
