home *** CD-ROM | disk | FTP | other *** search
/ OpenStep 3.3J / os33j.iso / NextLibrary / Fonts / Kanji / FS / FSInit
Encoding:
Text File  |  1993-04-29  |  1.4 KB  |  54 lines

  1. %
  2. % FSInit
  3. %
  4. % Version: 3.1J
  5. % Copyright (c) 1990, 1991, 1992, 1993 Canon Inc. and NeXT Inc. All rights reserved.
  6.  
  7. currentshared true setshared
  8. shareddict begin
  9.  
  10. /nil where {pop}{ /nil null def } ifelse
  11. /_@notdefchar (-) def
  12. /_@notdefchararray % EUC based undefine codes
  13.     [ () () <a2a3> (-) (-) (--) () () () () () () () () () () () ]
  14. def
  15. /_@original_handleerror //errordict /handleerror get def
  16.  
  17. /show {
  18.   { show } stopped {
  19.     $error /errorname get /rangecheck eq {
  20. %     (%%[Warning: rangecheck; OffendingCommand: show ]%%\n) print flush
  21.       count 0 ne {
  22.         dup type /stringtype eq {
  23.           rootfont setfont
  24.           dup length 1 sub 0 exch getinterval show     % for 2byte encoding only
  25.           //_@notdefchararray currentfont /FMapType 2 copy known
  26.           {get get}{pop pop pop //_@notdefchar } ifelse show
  27.         }{
  28.           //_@original_handleerror exec
  29.         } ifelse
  30.       }{
  31.         //_@original_handleerror exec
  32.       } ifelse
  33.     }{
  34.       //_@original_handleerror exec
  35.     } ifelse
  36.   } if
  37. } bind def
  38.  
  39. currentdict /_@notdefchar undef
  40. currentdict /_@notdefchararray undef
  41. currentdict /_@original_handleerror undef
  42.  
  43. % As an optimization, do findencoding in advance on frequently used encodings.
  44. /EUCEncoding findencoding pop
  45.  
  46. % PGFInit must be run before any new font
  47. /PGFInit /Sys execresfile
  48. /PGFKeys /Sys execresfile
  49.  
  50. (/NextLibrary/Fonts/Kanji/FS/FSInit_Hook.ps) {run} 128 string filenameforall
  51.  
  52. end % shareddict
  53. setshared
  54.