home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / lang / postscri / 6121 < prev    next >
Encoding:
Text File  |  1992-12-29  |  2.3 KB  |  67 lines

  1. Newsgroups: comp.lang.postscript
  2. Path: sparky!uunet!spool.mu.edu!umn.edu!umeecs!quip.eecs.umich.edu!plph
  3. From: plph@quip.eecs.umich.edu (MarkMontague)
  4. Subject: Printer fonts - help
  5. Message-ID: <1992Dec30.033715.1541@zip.eecs.umich.edu>
  6. Sender: news@zip.eecs.umich.edu (Mr. News)
  7. Organization: University of Michigan EECS Dept., Ann Arbor, MI
  8. Date: Wed, 30 Dec 1992 03:37:15 GMT
  9. Lines: 56
  10.  
  11.  
  12. I am posting the following for David Frenkiel.  Please respond to him
  13. via email.
  14.  
  15. Mark Montague
  16. plph@caen.engin.umich.edu
  17.  
  18. -----------------------------------------------------------------------------
  19.  
  20. From: dfl@math.tau.ac.il (David Frenkiel)
  21. Organization: School of Math & CS - Tel Aviv University , Tel Aviv , ISRAEL.
  22.  
  23. < please post this for me under the subject header "Printer fonts - help" >
  24.  
  25. Hi
  26.  
  27. I need to find out whether or not a postscript printer has a certain
  28. font.  In case it doesn't, I use a bitmap version of the font.
  29. Currently, I use a method I saw in the FAQ, which searches for the
  30. font in the FontDirectory, and defines a symbol to be equal either to
  31. the font, or to its bitmap version, according to the result of this
  32. search.  There are two problems with this method:
  33.  
  34. 1. It does not work for printers with disks.
  35. 2. Ghostview and ghostscript always fail on FontDirectory searches, so
  36.    I get the default "ugly" font.
  37.  
  38. If anyone knows how I can accomplish this in a different way, which
  39. bypasses these two problems, I'd appreciate an email response.  
  40. I work on a system with a print spooler, so the printer can't
  41. talk back to me.  Enclosed are the definitions I currently use.
  42.  
  43. %% condfind uses one argument and returns true if it is a known font 
  44. /condfind { dup FontDirectory exch known } def;
  45. %% altfind uses three arguments, and defines the middle one to be
  46. %% either the top argument, if it is a known font, else the bottom one.
  47. /altfind { condfind {def} {pop exch def } ifelse } def 
  48.  
  49. and after downloading a bitmap font called, e.g., bitmap100, which
  50. represents Symbol-Bold
  51.  
  52. /bitmap100 /font100 /Symbol-Bold altfind
  53. font100 findfont ......
  54.  
  55.  
  56.         Thanx
  57.  
  58.             David
  59.  
  60. --
  61. +-------------------------------------------------------+
  62. |   The white zone is 4 loading and unloading only.     |
  63. | If you want to load or unload, go to the white zone.  |
  64. +-------------------------------------------------------+
  65.      
  66.  
  67.