home *** CD-ROM | disk | FTP | other *** search
/ PC World 2004 March / PCWorld_2004-03_cd.bin / Software / topware / paintshop / psp810entr.exe / Data1.cab / readme.txt < prev    next >
Encoding:
Text File  |  2003-10-02  |  4.0 KB  |  88 lines

  1. Jasc PostScript Interpreter resource access directory
  2.  
  3. This directory defines the mappings from the postscript operators
  4. 'findresource', 'resourcestatus', 'findfont' and 'resourceforall'
  5. to actual external resources.
  6.  
  7. For a complete understanding of PostScript resources and resource
  8. management, read section 3.9 of the PostScript Language Reference
  9. Manual (The Red Book) ISBN: 0-201-37922-8. 
  10.  
  11. The file 'resource.map' is the primary mapping file.  Except
  12. for resource categories 'Font' and 'FontSet', each line of the
  13. file equates to an external resource instance (lines that begin
  14. with '%' are comments). The first column of each line is the resource
  15. category.  Depending on the category, optional columns exist
  16. to define an instance of that category.  Categories 'Font' and
  17. 'FontSet' have one additional column, the name of another file
  18. which defines instances of those categories.
  19.  
  20. --------------------------------------------------------------------
  21. Adding Fonts:
  22. --------------
  23.  
  24. Currently fonts can be added several ways. Individual font directories are
  25. register in the resource.map file using the 'Folder' keyword:
  26. Folder <Category> <directory>
  27.  
  28. For example the fonts folder is registered by the following line:
  29. Folder    /Font    fonts
  30.  
  31. Font directories can also be registered by using the builtin postscript
  32. operator '_addfontpath'.  For example, the system font directory can be
  33. register to the interpreter using the following postscript code:
  34. '_tmpstring _sysfontpath {_addfontpath} if' (This is currently done
  35. in the 'prolog.ps' file to make the system fonts available to
  36. postscript applications)
  37.  
  38. Fontsets (category FontSet)
  39. ----------------------------
  40.  
  41. Font sets are files containing one or more fonts in 'cff' or type 2
  42. format (see Adobe documents 5176.CFF.pdf and 5177.Type2.pdf
  43. for additional information on this font type). Instances of
  44. this category are read and all fonts in a set become individually
  45. loadable font instances.  For example, say I have a font set containing
  46. 14 fonts in a file called 'myfontset.cff' . To make these fonts available
  47. to the postscript interpreter, add a line with two columns to the file 'fontset.map'.
  48. The first column of that line is the filename "fontset.cff" and
  49. the second line is the name of the fontset, for example "MyFonts"
  50. such that the postscript fragment: '/MyFonts /FontSet findresource'
  51. will cause that file to be loaded and all fonts would become instances
  52. of the Font category.
  53.  
  54. --------------------------------------------------------------------
  55. Instances of Generic resources, including categories of type
  56. 'Category', 'CMap', 'CIDFont', 'ProcSet', 'Encoding', 'Form',
  57. 'Pattern', 'ColorSpace', 'Halftone', 'ColorRendering' are
  58. defined the following way:
  59.  
  60. Following the category name (column 1) are 2 or 3 more columns.
  61. The second column is the resource instance name.  The third
  62. column is the name of the file to execute to instantiate the resource
  63. and finally, an optional fourth column exists which is a string
  64. of postscript executed before the file is executed.  Note that
  65. an implicit 'true setglobal' is executed before the file is executed.
  66. If you wish a resource to be instantiated in local vm, place an
  67. explicit 'false setglobal' at the head of your implementation
  68. file.
  69.  
  70. For example, I have the following line in the resource.map file:
  71. Halftone  Default defht.ps
  72.  
  73. Postscript then executes the following code fragment:
  74. '/Default /Halftone findresource'
  75.  
  76. The interpreter finds the line in 'resource.map' whose category
  77. (column 1) is 'Halftone' and name (column 2) is 'Default' and
  78. executes the file 'defht.ps' (column 3) to produce the halftone
  79. instance dictionary.
  80.  
  81. resource.map  -> Main resource mapping file
  82. catimpl.ps    -> Category resource implementation file
  83. crd.ps        -> Default Color Rendering Dictionary
  84. getenc.ps     -> Procedure to get internal encoding and define as resource
  85. prolog.ps     -> Standard distribution prolog file
  86. unisym.dat    -> Binary symbol table to map postscript glyph
  87.                  names to unicode values
  88.