Projects.htm 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <html>
  3. <head>
  4. <title>Ghostscript projects</title>
  5. <!-- $Id: Projects.htm,v 1.33.2.2 2002/02/01 05:31:25 raph Exp $ -->
  6. <link rel="stylesheet" type="text/css" href="gs.css" title="Ghostscript Style">
  7. </head>
  8. <body>
  9. <!-- [1.0 begin visible header] ============================================ -->
  10. <!-- [1.1 begin headline] ================================================== -->
  11. <h1>Ghostscript projects seeking developers</h1>
  12. <!-- [1.1 end headline] ==================================================== -->
  13. <!-- [1.2 begin table of contents] ========================================= -->
  14. <h2>Table of contents</h2>
  15. <ul>
  16. <li><a href="#Platforms">Platforms</a>
  17. <li><a href="#Driver_architecture">Driver architecture</a>
  18. <li><a href="#Specific_drivers">Specific drivers</a>
  19. <li><a href="#Graphics_functionality">Graphics functionality</a>
  20. <li><a href="#Performance">Performance</a>
  21. <li><a href="#Other_functionality">Other functionality</a>
  22. <li><a href="#Other_implementation">Implementation improvements</a>
  23. </ul>
  24. <!-- [1.2 end table of contents] =========================================== -->
  25. <!-- [1.3 begin hint] ====================================================== -->
  26. <p>For other information, see the <a href="Readme.htm">Ghostscript
  27. overview</a>.
  28. <!-- [1.3 end hint] ======================================================== -->
  29. <hr>
  30. <!-- [1.0 end visible header] ============================================== -->
  31. <!-- [2.0 begin contents] ================================================== -->
  32. <p>
  33. There are many projects that would improve Ghostscript and that we would
  34. like to do, but for which we don't have enough resources. If you would like
  35. to take responsibility for any of these projects, please <a
  36. href="mailto:raph@artofcode.com">contact us</a>. Additional comments on
  37. implementation approaches or project goals are in <I>italic type like
  38. this</I>.
  39. <h2><a name="Platforms"></a>Additional platforms</h2>
  40. <h3>DOS, Windows and OS/2 builds using gcc.</h3>
  41. <p>
  42. We would like Ghostscript to work with the free <b><tt>emx/gcc</tt></b> and
  43. <b><tt>rsx</tt></b> libraries, to provide an alternative DOS, Windows
  44. 95/98/NT, and OS/2 implementation that requires no proprietary, commercial
  45. compilers. We think Ghostscript's existing OS/2 makefile already includes
  46. most of what is needed. If someone is willing to do the work, we will be
  47. happy to include this in our list of supported platforms and to distribute
  48. the makefiles.
  49. <h3>Windows driver using Ghostscript as a language monitor.</h3>
  50. <p>
  51. MS Windows has a "language monitor" capability which would allow Ghostscript
  52. to be invoked seamlessly to process input files in any language Ghostscript
  53. could handle (currently PostScript and PDF) and for any printer for which
  54. Ghostscript had a driver. Doing this properly would require integrating
  55. Ghostscript with Windows' "Add Printer" dialog, and would also require
  56. creating a PPD for Ghostscript. <I>Russell Lang's RedMon program provides
  57. some, but not all, of this capability.</I>
  58. <h3>Netscape browser plug-in.</h3>
  59. <p>
  60. Currently, Ghostscript can work as a "helper application" for the Netscape
  61. browser, but not as a plug-in; the latter would integrate it more closely
  62. with the browser. We aren't sure what doing this would involve; we've also
  63. heard by rumor that it's already been done.
  64. <h3>Ghostscript as an Active-X COM Object.</h3>
  65. <p>
  66. In order to integrate Ghostscript into XMetaL and other applications it
  67. would be convenient for Ghostscript to be distributed as a COM object
  68. along with the current gswin32.exe, gswin32c.exe and gsdll32.dll files.
  69. <hr>
  70. <h2><a name="Driver_architecture"></a>Driver Architecture</h2>
  71. <h3>Improved multi-threaded rendering support.</h3>
  72. <p>
  73. Currently, drivers can be written so that converting PostScript to a list of
  74. graphical objects can run in one thread, and rasterizing the objects can run
  75. in another thread. However, drivers must be written specially if they are
  76. going to do this. We would like to change the architecture so that any
  77. driver can work this way. We would also like to support dual-threaded
  78. operation for drivers that produce high-level output, such as the PDF
  79. writer. <I>Doing this would require separating banding from
  80. the multithreaded logic. Also, currently each thread has its own allocation
  81. pool: this is unnecessary in the normal case, since Ghostscript now supports
  82. properly locked access to the C heap, but embedded systems still need to use
  83. a fixed-size area for the rasterizing thread. With a locked, shared
  84. allocator, the rasterizing thread could use the full set of band list
  85. functions; with a fixed-size area and a separate allocator, only a subset is
  86. available, as is the case now for dual-threaded drivers.
  87. </I>
  88. <h3>Dynamic run-time loadable devices.</h3>
  89. <p>
  90. Currently, drivers must be linked into the executable. We would like to be
  91. able to load drivers dynamically. Doing this requires defining a
  92. platform-independent API (presumably extending the current gp_* APIs) that
  93. would work at least on Linux, vendor Unix, MS Windows, and Macintosh. Unix
  94. systems should include Sun, HP, AIX, IRIX, DEC; Linux ELF and a.out formats
  95. should both be supported. <I>Consider the Netscape plug-in
  96. architecture.</I>
  97. <h3>Moving 'setpagedevice' into C.</h3>
  98. <p>
  99. The PostScript 'setpagedevice' function implements matching of media and
  100. page size requests to available media, page orientation, and paper handling
  101. (duplex, etc.) Currently it is implemented in PostScript code, which means
  102. it is not available for use with other input languages. (It is available
  103. for PDF, which Ghostscript implements on top of PostScript, but not for the
  104. not-yet-freely-available PCL interpreters that use the Ghostscript library,
  105. or for possible future SVG or similar interpreters). We would like to move
  106. this function into C. <I>The device driver will be required to
  107. send page parameters up to PostScript to be stored in a resource. To be
  108. included in this project are handling policy implementations in the device
  109. drivers. DeferredMediaSelection should also be implemented.</I>
  110. <h3>Adding 'tee' for output to multiple devices.</h3>
  111. <p>
  112. In a few cases, it would be desirable to provide a 'tee' capability for
  113. drivers: specifically, for generating small, low-resolution 'thumbnail'
  114. images concurrently with other output. <I>Probably the
  115. simplest way to do this is to generate a band list and then process it
  116. twice. This is not completely trivial, since the band list does include
  117. device resolution information and scaling would be required for some
  118. constructs.</I>
  119. <h3><b><tt>OutputDevice</tt></b> resource category</h3>
  120. <p>
  121. Each available output device should provide an instance of the
  122. <b><tt>OutputDevice</tt></b> resource category, which gives the available
  123. page sizes, resolutions, media classes, process color models, and other
  124. information about the device. <I>This would replace the current
  125. non-standard use of a 4-element <b><tt>PageSize</tt></b> in the
  126. <b><tt>InputAttributes</tt></b> entry of the page device dictionary.</I>
  127. <h3>Removing the limit on the length of OutputFile.</h3>
  128. <p>
  129. Currently, the maximum length of the <b><tt>OutputFile</tt></b> parameter is
  130. a compile-time constant, <b><tt>gp_file_name_sizeof</tt></b>. This is
  131. appropriate for ordinary file names, since this constant is the platform's
  132. limit on the length of a file name. However, if <b><tt>OutputFile</tt></b>
  133. is a pipe, the length should not be limited in this way. <I>This is
  134. probably a small project: it requires allocating the file name dynamically,
  135. and freeing it in the finalization routine that gets called when a driver
  136. instance is freed.</I>.
  137. <h2><a name="Specific_drivers"></a>Specific drivers</h2>
  138. <h3>PrintGear and PPA output drivers.</h3>
  139. <p>
  140. We would like to provide (Adobe) PrintGear and (H-P) PPA output drivers for
  141. Ghostscript, but the specifications for these protocols are not published.
  142. If you can provide them to us without violating any agreements, please let
  143. us know. (Some work has already been done on reverse-engineering these
  144. protocols, but we don't have references to it.)
  145. <h3>Improve 'pswrite' up to the level of 'pdfwrite'.</h3>
  146. <p>
  147. We would like to improve the high-level PostScript-writing
  148. <b><tt>pswrite</tt></b> driver to bring it up to parity with the PDF-writing
  149. driver (including the many improvements in the latter being implemented in
  150. Ghostscript 7.xx). Specifically, we want it to write text as text rather
  151. than bitmaps, and to consistently write images in their original high-level
  152. form. <I>We have already started to factor out code that
  153. should be common to these two drivers, specifically for writing embedded
  154. fonts and compressed data streams.</I>
  155. <p>
  156. There is one small part of this project that would be especially valuable
  157. and could be done independently (although it might have to be partly or
  158. entirely redone later): compressing images. Currently the driver only
  159. compresses character bitmaps, and doesn't compress other images at all.
  160. <I>It should use the <b><tt>CCITTFaxEncode</tt></b> filter for 1-bit-deep
  161. images, and plane-separated <b><tt>LZWEncode</tt></b> compression for color
  162. images, using the <b><tt>miGIF</tt></b> algorithms that are believed to be
  163. free of the Welch patent for the latter. When generating LL3 PS, the
  164. <b><tt>Flate</tt></b> compression will work better than miGIF. It may be
  165. worth trying several methods on each image and use the one that works best.</I>
  166. <h3>High level graphics and text for PCL 5 and PCL XL drivers.</h3>
  167. <p>
  168. Currently, the PCL 5 drivers produce only bitmaps; the PCL XL driver
  169. produces high-level graphics and sometimes high-level images, but low-level
  170. text. We would like to improve these drivers to produce higher-level,
  171. smaller output. <I>This was a very low-priority project; it has become more
  172. important now that H-P's laser printers are shipping with less memory.</I>
  173. <h3>Improved high level GDI driver for Windows.</h3>
  174. <p>
  175. We would like a "GDI driver" for MS Windows that would implement more
  176. higher-level constructs (specifically for text). <I> The
  177. <b><tt>mswin</tt></b> and <b><tt>mswinprn</tt></b> drivers both do some of
  178. this. Some of the the 'xfont' support code for MS Windows should be useful.
  179. We were frustrated in the past because the GDI calls for getting font sizes
  180. and metrics consistently returned incorrect information and provided no way
  181. to get the correct information; perhaps this has been fixed in 32-bit
  182. Windows. We believe that H-P, Russell Lang, and perhaps others are working
  183. in this area, but we can always use more help.</I>
  184. <h3>PDF thumbnail generation.</h3>
  185. <p>
  186. The PDF writer needs to be able to generate thumbnails (small previews). We
  187. might do this through the 'tee' capability mentioned above. However, we
  188. currently prefer the idea of implementing a completely separate program to
  189. add thumbnails to an arbitrary, existing PDF file: this would allow
  190. Ghostscript to add thumbnails to PDF files generated by other programs.
  191. <I>Much of the code needed to do this has already been written
  192. for Ghostscript's PDF linearizer: see
  193. <b><tt>lib/pdfwrite.ps</tt></b>. A user has implemented this as well,
  194. using a separate program that calls Ghostscript: see
  195. <a href="http://www.uni-giessen.de/~g029/eurotex99/oberdiek/">
  196. http://www.uni-giessen.de/~g029/eurotex99/oberdiek/</a>.
  197. </I>
  198. <h3>Consolidate inkjet drivers into a single family.</h3>
  199. <p>
  200. In addition to factoring out the error diffusion code as described below, we
  201. would like to see another attempt at reducing the enormous volume of code
  202. for color inkjet drivers. There are three sets of drivers (gdevcdj.c,
  203. gdevstc.c, gdevupd.c) with much overlapping functionality. The latter two
  204. driver families make good attempts at factoring out things like head
  205. geometry and canned control strings, but we think this problem deserves
  206. another pass, especially in the hope of consolidating these drivers into a
  207. single family.
  208. <h3>Download glyph bitmaps (with glyph decaching notification).</h3>
  209. <p>
  210. See below under "Notification for glyph decaching."
  211. <h3>Preserve compression when writing PDF images.</h3>
  212. <p>
  213. Currently, all images are decompressed by the interpreter before being
  214. passed to the graphics library; the PDF writer may then compress them again.
  215. Ordinarily, this only slows things down a little, but in the case of
  216. DCT-encoded images that are being DCT-encoded in the output, image
  217. degradation may occur. Ideally, the implementation should be smart enough
  218. to not decode and re-encode the image. However, making this work properly
  219. is difficult. <I>This would probably involve extending the library APIs for
  220. images so that they could pass a stream, possibly including filters, instead
  221. of the (fully decoded) data rows.</I>
  222. <hr>
  223. <h2><a name="Graphics_functionality"></a>Graphics functionality</h2>
  224. <h3>Support for 64-bit colors on 64-bit platforms.</h3>
  225. <p>
  226. Currently, the library supports a maximum of 32 bits of data per pixel; we
  227. would like to raise this limit to 64 bits on systems where the 'long' data
  228. type is 64 bits wide. <I>The <b><tt>gx_color_index</tt></b>
  229. type is already defined as 'long', but there are many places where the type
  230. <b><tt>bits32</tt></b> is used for pixel values; there is a 32-bit
  231. stored-image "device", but there is no 64-bit device; a few algorithms and
  232. tables have knowledge of the 32-bit width built into them, only because the
  233. C preprocessor doesn't have any kind of loop or repetition
  234. capability.</I>
  235. <h3>In-RIP trapping.</h3>
  236. <p>
  237. The PostScript specification includes an option for the interpreter to
  238. implement trapping (adjustments of object boundaries to prevent visual
  239. anomalies caused by slight misregistration of different ink layers): we
  240. would like to implement this. <I>This is a complex and
  241. difficult area; even many Adobe RIPs don't do it.</I>
  242. <h3>Hook FreeType TrueType library into graphics library.</h3>
  243. <p>
  244. We would like to provide an option for good integration of the FreeType font
  245. rasterizer into Ghostscript, since the FreeType code is better than
  246. Ghostscript's current rasterizers. We understand that some users in Japan
  247. have done this already, but we don't know if this is a good starting point
  248. (the only documentation is in Japanese). <I>Their work uses
  249. Ghostscript's 'xfont' interface, which is how Ghostscript interfaces to
  250. platform facilities such as the X and MS Windows font capabilities. This is
  251. a device-level interface and not the best place to do this: we would rather
  252. have the graphics library interface to FreeType directly.</I>
  253. <h3>ICC profile support for output.</h3>
  254. <p>
  255. Ghostscript 7.00 and later supports ICCBased color spaces of PDF
  256. using the icclib package from
  257. <a href="http://web.access.net.au/argyll/color.html ">
  258. http://web.access.net.au/argyll/color.html</a>
  259. but there is no facility to use ICC output (printer) profiles that
  260. may be embedded in the PDF. Also it would be useful for PostScript
  261. to be able to directly use a specific Intent from ICC profile to
  262. convert output colors (as CRD's are now used).
  263. <I>The primary difficulty is that the graphics library and PostScript
  264. always use CIE XYZ as the connection space, but ICC profiles may
  265. use CIELAB as the connection space, requiring conversion for use
  266. with the graphics library. </I>
  267. <h3>Making halftones into "objects" and adding new types.</h3>
  268. <p>
  269. Currently, knowledge of the specific data formats and algorithms for
  270. halftoning permeates too many places in the library. We would like
  271. halftoning to be more "object oriented" (using virtual procedures) so that
  272. we could support other halftoning methods such as direct use of threshold
  273. arrays, or the double-rectangle approach added in newer PostScript versions.
  274. <I>Threshold arrays take much less space than the current
  275. representation, generally at the expense of longer rendering time for
  276. black-and-white images; double-rectangle representation would give us a
  277. better implementation of AccurateScreens. We might want store both
  278. threshold arrays and the current representation.</I>
  279. <h3>Factor out error diffusion routines, integrate ETS.</h3>
  280. <p>
  281. Currently, several different inkjet drivers implement their own, very
  282. similar but slightly differing error diffusion methods. This has caused
  283. severe code bloat as well as tempting future driver writers to contribute to
  284. it further. We want to factor out error diffusion into a common set of
  285. facilities that drivers can use. <I>We would like to design
  286. these facilities so that they can easily interface to the Even-Toned
  287. Screening algorithms from artofcode (Raph Levien), to the extent that these
  288. will be Open Source.</I>
  289. <h3>Improve, or generalize, linearization for stochastic threshold
  290. data.</h3>
  291. <p>
  292. The Ghostscript distribution includes a stochastic threshold array. This
  293. array has some gamma correction built into it, which works well for some
  294. output devices and not for others. We would like to provide a version of
  295. this array without (or with less) gamma correction. <I>We have
  296. original data available from which this could be done fairly easily.</I>
  297. <h3>Change sampled functions to use new interpreted functions.</h3>
  298. <p>
  299. The PostScript language defines many functions relevant to graphics
  300. rendering as being implemented by arbitrary PostScript procedures: transfer
  301. (gamma correction), black generation, undercolor removal, several stages of
  302. CIE color space and rendering, and color mapping for Separation and DeviceN
  303. spaces. Since the graphics library can't call PostScript procedures,
  304. Ghostscript currently samples these procedures at a fixed number of points
  305. and interpolates linearly between the samples. As of Ghostscript 6.20, the
  306. library can interpret a restricted subset of PostScript procedures directly
  307. (basically those that only use arithmetic and comparisons: no loops,
  308. sub-procedures, or data structures). Changing the rendering functions to
  309. use this approach when possible would greatly improve output quality when
  310. the functions are very non-linear (which we have actually seen in practice).
  311. <I>This should only be done if the function is, in fact,
  312. severely non-linear, since interpreting the function definition will almost
  313. always be much slower than interpolating in the table.</I>
  314. <h3>Add optional cubic interpolation to RenderTable and other table
  315. lookup.</h3>
  316. <p>
  317. Currently, if a CIE rendering dictionary uses a lookup table for the final
  318. step, Ghostscript always interpolates linearly between the entries. Cubic
  319. interpolation should be supported as an option. A cubic interpolation
  320. option is also needed for general table-lookup Functions.
  321. <h3>Add better (SVG-like) alpha channel and compositing to library.</h3>
  322. <p>
  323. Ghostscript has partial support for alpha channel and for alpha and RasterOp
  324. compositing. There is some architectural support for general compositing,
  325. but it postdates the RasterOp implementation, and most of the RasterOp code
  326. doesn't use it. We expect that the more extensive compositing and alpha
  327. capabilities of SVG will find their way into PDF (and probably PostScript as
  328. well) in the course of 2000 and 2001, and we will need to implement them.
  329. <hr>
  330. <h2><a name="Performance"></a>Performance</h2>
  331. <h3>Change band list logic to defer halftoning until rendering.</h3>
  332. <p>
  333. Currently, when Ghostscript uses a band list, it does halftoning before
  334. banding. It should do halftoning after banding: this produces smaller band
  335. lists and shifts more work to the rasterizer (which is good because the
  336. rasterizer can be multi-threaded internally for higher performance on
  337. multiprocessors: see the next topic.)
  338. <h3>Reduce redundant data for smoothed banded images.</h3>
  339. <p>
  340. When smoothed ("interpolated") images are written in the band list, extra
  341. rows must be written above and below each band in order to provide the data
  342. for interpolation. Currently, the number of such rows is computed very
  343. conservatively; instead, the final interpolation algorithm should be
  344. consulted to provide the correct value. <i>This is a small task.</i>
  345. <h3>Multi-threaded rasterizing</h3>
  346. <p>
  347. For high-resolution devices, rasterization dominates execution time. On
  348. multiprocessor systems, Ghostscript can do tasks in parallel:
  349. <ul>
  350. <li>Rasterize multiple bands simultaneously;
  351. <li>Rasterize multiple color planes of a single band simultaneously (if a
  352. planar representation is being used);
  353. <li>For some computation-intensive tasks like smoothing images or filling
  354. large regions, partition the task (possibly buffering more data to allow
  355. larger-grain partitioning) and execute several partitions simultaneously.
  356. </ul>
  357. <p>
  358. We would want these facilities implemented so that no conditional
  359. compilation was involved: on uniprocessor systems, the locking API would
  360. simply have a vacuous implementation.
  361. <h3>Notification for glyph decaching.</h3>
  362. <p>
  363. Currently, drivers can't do a very good job of downloading rendered
  364. character bitmaps to the device they manage, because they can't find out
  365. when a bitmap is being deleted from Ghostscript's cache and therefore will
  366. never be referenced again. Here is a sketch of how we would add this
  367. capability to the graphics library:
  368. <ul>
  369. <li>The driver would implement the <b><tt>text_begin</tt></b> call, simply
  370. to get access to a <b><tt>gs_imager_state</tt></b> that references the
  371. rendered character cache. (The driver could always simply call the default
  372. implementation of <b><tt>text_begin</tt></b>.)
  373. <li>In the <b><tt>text_begin</tt></b> procedure, the driver would call
  374. <blockquote><pre>
  375. gs_glyph_decache_register(imager_state, notify_proc, proc_data)
  376. </pre></blockquote>
  377. <p>
  378. where <b><tt>proc_data</tt></b> was, or pointed to a structure that
  379. included, a pointer to the driver.
  380. <li><b><tt>gs_glyph_decache_register</tt></b> would use the general
  381. notification mechanism defined in <b><tt>gsnotify.h</tt></b> to call
  382. <blockquote><pre>
  383. notify_proc(proc_data, pchar_data)
  384. </pre></blockquote>
  385. <p>
  386. whenever a bitmap was removed from the character cache.
  387. <b><tt>pchar_data</tt></b> would point to some identification of the
  388. character; perhaps just the bitmap ID, but possibly a
  389. <b><tt>gx_cached_bits_common</tt></b> or even a <b><tt>cached_char</tt></b>.
  390. <li>The <b><tt>char_cache</tt></b> structure would be need an additional
  391. member, a <b><tt>gs_notify_list_t</tt></b>. It would also need to add
  392. finalization so that when it was freed, it would notify and unregister all
  393. clients, using <b><tt>gs_notify_all(list, NULL)</tt></b> and then
  394. <b><tt>gs_notify_release</tt></b>.
  395. </ul>
  396. <p>
  397. <I>This facility was requested by the Display Ghostscript project, but it
  398. could also be used to improve the output of the PCL XL driver and possibly
  399. the X and PCL5 drivers.</I>
  400. <hr>
  401. <h2><a name="Other_functionality"></a>Other functionality</h2>
  402. <h3>OpenStep (Display PostScript + NeXT) extensions to Ghostscript.</h3>
  403. <p>
  404. There is a project to create a GNU implementation of the OPENStep API, which
  405. involves extending Ghostscript to provide the full functionality of Adobe's
  406. Display PostScript system with some of the NeXT extensions. For more
  407. information, please contact Net-Community &lt;<a
  408. href="mailto:scottc@net-community.com">scottc@net-community.com</a>&gt;.
  409. <h3>Job Server implementation.</h3>
  410. <p>
  411. For full Adobe PostScript compatibility, Ghostscript needs a real "job
  412. server" to encapsulate the execution of PostScript files.
  413. <I>See the section on "Job Execution Environment" in the PostScript
  414. Language Reference Manual for details.</I>
  415. <h3>SVG (XML Structured Vector Graphics) interpreter.</h3>
  416. <p>
  417. Ghostscript could be adapted with some work to read SVG. This would be an
  418. interesting and challenging project because SVG's graphics model would
  419. require extending the library (see above). <I>If SVG turns out to be an
  420. important standard, it is important that there be a good free implementation
  421. of it.</I>
  422. <h3><b><tt>%font%</tt></b> and other IODevices.</h3>
  423. <p>
  424. Currently, the <b><tt>%font%</tt></b> IODevice is not implemented. We would
  425. like to see this implemented using a general framework for implementing
  426. IODevices (%xxxx%) entirely in PostScript, in an "object oriented" manner
  427. very similiar to the way Resource categories are implemented. An IODevice
  428. would be implemented as a dictionary with the following keys, whose values
  429. would be procedures that implemented the corresponding operation:
  430. <blockquote><pre>
  431. /File
  432. /DeleteFile
  433. /RenameFile
  434. /Status
  435. /FileNameForAll
  436. /GetDevParams
  437. /PutDevParams
  438. </pre></blockquote>
  439. <p>
  440. There would only be global IODevices, no local ones; the dictionary keeping
  441. track of them would be stored in global VM.
  442. <p>
  443. <I>This is an obscure feature that matters only because some PostScript code
  444. uses <b><tt>filenameforall</tt></b> with this IODevice, rather than
  445. <b><tt>filenameforall</tt></b> with the <b><tt>/Font</tt></b> Resource
  446. category, to enumerate available fonts.</I>
  447. <h3>Repairing damaged or EOL-converted PDF files.</h3>
  448. <p>
  449. Adobe Acrobat Reader can scan a PDF file that has had its end-of-lines
  450. converted by careless users transferring the file across operating systems
  451. as text rather than binary across, and reconstruct the cross-reference table
  452. which the PDF interpreter requires. This only works if the file has no
  453. binary data in it, which with PDF 1.3 is rarely the case. However, users
  454. occasionally receive PDF files that have been damaged in this way, and it
  455. might be useful to have a program that can repair them. <I>We think this
  456. should probably be done as a separate program, possibly in PostScript,
  457. similar to Ghostscript's PDF linearizer.</I>
  458. <h2><a name="Other_implementation"></a>Implementation improvements</h2>
  459. <h3>Fully re-entrant code.</h3>
  460. <p>
  461. Currently, neither the PostScript interpreter nor the graphics library is
  462. fully re-entrant (no writable globals). Making them fully re-entrant would
  463. make Ghostscript usable in multi-threaded environments, and more easily
  464. usable in embedded environments. Note that this is necessary, but far from
  465. sufficient, for Ghostscript to allow simultaneous execution of a single
  466. Ghostscript interpreter instance by multiple threads: that is probably
  467. permanently out of the question. <I>Almost all drivers, including all of
  468. the drivers in devs.mak which are maintained as part of the main Ghostscript
  469. code, are already fully re-entrant; making the remaining ones re-entrant
  470. should really be up to the driver author.</I>
  471. <h3>Ghostscript has no %ram% device.</h3>
  472. The %ram% device is documented in PS Supplement 3010 and 3011 dated August 30, 1999.
  473. This is probably not a major impediment to portability, but it would be handy.
  474. <p><I>
  475. On Unix, the suggested implementation would be to create a subdirectory
  476. of the temporary directory (usually /tmp), with the name chosen and the
  477. directory created in such a way as to avoid /tmp races and similar
  478. problems. Ghostscript should delete the subdirectory when it exits.
  479. </I>
  480. <!-- [2.0 end contents] ==================================================== -->
  481. <!-- [3.0 begin visible trailer] =========================================== -->
  482. <hr>
  483. <p>
  484. <small>Copyright &copy; 2000 Aladdin Enterprises. All rights
  485. reserved.</small>
  486. <p>
  487. <small>This file is part of AFPL Ghostscript. See the
  488. <a href="Public.htm">Aladdin Free Public License</a> (the "License") for
  489. full details of the terms of using, copying, modifying, and redistributing
  490. AFPL Ghostscript.</small>
  491. <p>
  492. <small>Ghostscript version 7.04, 31 January 2002
  493. <!-- [3.0 end visible trailer] ============================================= -->
  494. </body>
  495. </html>