PROBLEMS 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417
  1. These release notes list minor problems with the GNU libplot graphics
  2. library, and with the sample command-line utilities `graph', `plot',
  3. `tek2plot', `plotfont', and `pic2plot', which are built on it. We classify
  4. them as problems rather than bugs.
  5. Most of them are due to idiosyncrasies of (or bugs in) the display devices
  6. and application software that libplot must produce output for.
  7. See also the file ./COMPAT, for some changes in this release that are
  8. relevant to the below problems.
  9. ======================================================================
  10. The libplot SVG driver and `graph -T svg'
  11. -----------------------------------------
  12. The SVG specification is to some extent a moving target; consult the W3
  13. Consortium's Web pages on SVG ( http://www.w3.org/Graphics/SVG ) for more
  14. information. In this release, the SVG produced by libplot's SVG driver
  15. complies with the SVG 1.1 specification.
  16. However, as of this writing, some SVG viewers fail to implement crucial
  17. parts of the specification (especially, those dealing with text). So, the
  18. following sorts of problem may be encountered when viewing SVG output.
  19. 1. The font used for a text string may not be the one you have selected.
  20. libplot's SVG driver attempts to give the SVG viewer enough information to
  21. select an appropriate font. For example, `graph -T svg' by default uses a
  22. Helvetica font. Its SVG output contains the font specification
  23. font-family:'Helvetica',sans-serif;
  24. Similarly, if a Times-Bold font is to be used, the SVG output contains the
  25. font specification
  26. font-family:Times-Bold,'Times Roman',serif; font-weight:bold
  27. In all cases, both the font's family name and its Postscript name, if
  28. different, will be supplied in the SVG output. In nearly all cases, a
  29. `generic name' such as `serif' will be supplied too. However, some SVG
  30. viewers have been observed to fail to retrieve a matching font, or any font
  31. at all (!), even when they are helped out in this way.
  32. One workaround for this problem is to use a builtin Hershey (stroked) font,
  33. such as HersheySerif or HersheySans. (For more information on this, see
  34. the file ./COMPAT.) Type `graph -Tsvg --help-fonts' to get a complete list
  35. of fonts available to you, when producing SVG output.
  36. 2. If you switch fonts in the middle of a text string, the substrings may
  37. not line up properly. If this occurs, it is because your SVG viewer is
  38. using fonts whose metrics are different from what libplot's SVG driver
  39. expects. SVG supports the creation of compound (multi-font) text strings,
  40. via <tspan>..</tspan> constructs. However, libplot's SVG driver does not
  41. currently use these constructs. Support for them may be added to later
  42. releases of the driver.
  43. Again, the fix is to use one of the builtin Hershey fonts, such as
  44. HersheySerif.
  45. ----------------------------------------------------------------------
  46. The libplot X driver and `graph -T X'
  47. -------------------------------------
  48. 1. The Symbol and ZapfDingbats fonts distributed with some X Window System
  49. displays, such as recent releases of XFree86, are incorrectly encoded. In
  50. consequence, text strings that contain Greek characters or mathematical
  51. symbols may not be displayed correctly.
  52. To check the encoding of the Symbol font, do both
  53. plotfont -T X Symbol
  54. plotfont -T ps Symbol | gv -
  55. to display respectively the layout of the Symbol font in your X display,
  56. and the standard Postscript symbol font build into the `gv' application.
  57. (To see the latter, you could alternatively send the output of
  58. `plotfont -T ps Symbol' to a Postscript printer.) If the two character
  59. tables look different, complain to the people who supplied your X Window
  60. System software.
  61. ----------------------------------------------------------------------
  62. The libplot PS driver and `graph -T ps'
  63. ---------------------------------------
  64. 1. There are a lot of buggy Postscript interpreters out there. If you
  65. switch fonts in the middle of drawing a label with `graph -T ps', or when
  66. drawing a multi-font string with libplot's PS driver, and the sub-strings
  67. don't match up properly when you view the result, it may very well be the
  68. fault of your interpreter. Even for the 35 standard Postscript fonts, some
  69. vendors don't agree with Adobe as to the width of the printable `8-bit'
  70. (non-ASCII) characters. Sun SparcPrinters in particular have been observed
  71. to space such characters incorrectly.
  72. 2. It has been reported that the freeware `bbfig' program, which is
  73. sometimes used for computing the bounding boxes of Postscript files, does
  74. not necessarily compute the correct bounding box when it is applied to the
  75. output of libplot's PS driver; for example, to a graph produced by
  76. `graph -T ps'.
  77. The bug here is in bbfig, not in libplot. You should never need to run
  78. `bbfig' on Postscript files produced by this package, since they already
  79. contain accurate bounding boxes.
  80. 3. As seen by the idraw drawing editor, a Postscript file produced by
  81. `graph -T ps' or libplot's PS driver will have its colors quantized. Both
  82. pen color and fill color will be quantized.
  83. These quantizations are due to limitations of idraw. Line widths will be
  84. quantized too, since the width of a line in idraw must be an integer number
  85. of printer's points.
  86. No such quantizations will take place if the Postscript file is viewed with
  87. a Postscript interpreter such as Ghostscript, sent directly to a printer,
  88. or included in another document.
  89. 4. If you use the Postscript Plotter support in libplot/libplotter to draw
  90. a self-intersecting filled path, and you specify that the `nonzero winding
  91. number rule' should be employed to determine which regions are inside and
  92. which are outside the path, the resulting Postscript file will look all
  93. right when previewed or printed. But if you use `idraw' to view it
  94. or edit it, the other rule (the `odd winding number rule') will be used.
  95. The problem is due to `idraw', which does not currently understand the
  96. nonzero winding number rule.
  97. 5. [Relevant only if configuration used the --enable-lj-fonts option.]
  98. If you use `idraw' to edit a Postscript file prepared with `graph -T ps'
  99. or libplot's PS driver that contains text in the Wingdings font, some of
  100. the Wingdings characters will be incorrectly interchanged.
  101. This problem is due to idraw, which does not know that Wingdings is not an
  102. ISO-Latin-1 font. The fix is to use a text editor to remove the line
  103. /Tidbits reencodeISO def
  104. from the edited Postscript file. (The plotting utilities refer to
  105. Wingdings internally as `Tidbits'.)
  106. ----------------------------------------------------------------------
  107. The libplot CGM driver and `graph -T cgm'
  108. ----------------------------------------
  109. 1. There are many older CGM viewers and interpreters, such as the free but
  110. unsupported(?) RALCGM and GPLOT viewers, and the CGM import filter used by
  111. Microsoft Office, that can only handle version 1 CGM files. To produce
  112. output for such CGM viewers and interpreters, you should set the
  113. environment variable (i.e., libplot parameter) CGM_MAX_VERSION to "1".
  114. The default is to use version 3. (Versions are more or less upward
  115. compatible, so any version-1 CGM file is effectively also a version-3 file,
  116. but not vice versa.) However, no free (open-source) version-3 CGM viewer
  117. is currently available. A high-quality browser plug-in for version-3 CGM
  118. files, without source, is available from http://www.sysdev.com .
  119. You should be aware that version 1 was much less powerful than later
  120. versions, such as version 3. In particular, font handling was not good.
  121. Any text string in a CGM file produced by libplot is accompanied by an
  122. `extent box' which the string is automatically adjusted to fit, by any CGM
  123. viewer or interpreter. That is the case for all versions of the CGM
  124. format, including version 1. Unfortunately, in version 1, what it meant
  125. for the string to `fit' was not properly specified. Another problem with
  126. version 1 format was that there was no way of specifying font properties,
  127. such as oblique-vs.-upright, boldface-vs.-regular, etc. So when a font is
  128. unavailable, the substituted font is often inappropriate.
  129. When producing a version-1 CGM file with the plotting utilities or libplot,
  130. Hershey fonts may be the best fonts to use. Any text string in a Hershey
  131. font is drawn into a CGM output file not as a CGM text string, but as a
  132. collection of polygonal lines, which should be rendered acceptably. To use
  133. a Hershey font, you could specify the `-F HersheySerif' option, for
  134. example, when you run `graph -T cgm'.
  135. 2. If a binary-encoded CGM output file produced by libplot's CGM driver
  136. contains any single text string that is longer than about 2000 characters,
  137. the RALCGM viewer will not be able to parse the CGM file correctly. In
  138. fact, RALCGM may crash. The problem is in RALCGM, not in libplot. This
  139. bug is not a major problem, since such extraordinarily long text strings
  140. almost never occur.
  141. 3. If a CGM output file produced by libplot's CGM driver contains any text
  142. string for which the font size is effectively zero, the RALCGM viewer will
  143. not be able to display the CGM file correctly. In fact, RALCGM may crash.
  144. You can verify this by doing
  145. echo 0 0 1 1 2 0 | \
  146. CGM_MAX_VERSION=1 graph -T cgm --font-size 0.000000001 | ralcgm -dx
  147. When you attempt to view the output file, you will probably get a
  148. segmentation fault. But the bug is in RALCGM, not in libplot.
  149. 4. There are some commercial viewers and interpreters which are advertised
  150. as able to handle version-3 CGM files, but which in fact cannot do so. The
  151. CGM import filter used by Adobe Illustrator (as of version 7.0, at least)
  152. is in this category. It does not recognize the so-called custom line
  153. styles (i.e., dashing patterns) that version-3 CGM files may include. In
  154. fact, if it sees a definition of a custom line style in a CGM file that it
  155. is importing, it may stop functioning or crash! Fortunately, CGM files
  156. produced by `graph -T cgm' use only CGM's default line styles; not custom
  157. ones. `pic2plot -T cgm' and the libplot functions `linedash()' and
  158. `flinedash()' do generate custom line styles.
  159. Actually, even if CGM_MAX_VERSION is set equal to "1", so that custom CGM
  160. line styles are not used, there is still a problem with importing CGM files
  161. into Illustrator. When it imports a CGM file, of whatever version,
  162. Illustrator-7.0 maps all default CGM line styles to "solid". That is,
  163. dotted lines, dashed lines, etc., all appear as solid lines. So the output
  164. of `graph -T cgm -m 0', `graph -T cgm -m 1', `graph -T cgm -m 2', etc.,
  165. will look alike. There seems to be no way around this.
  166. Since Illustrator's CGM import filter is so buggy, it is recommended that
  167. when generating a graphics file for import into Illustrator, rather than
  168. generating a CGM file, you use the `-T ai' option to generate Illustrator's
  169. native format. Whether this is necessary for the most recent versions of
  170. Illustrator (8.0 and 9.0) has not been checked.
  171. 5. As noted, some CGM viewers provide only partial support for the modern
  172. version-3 CGM file format. When dealing with such a viewer, it may be
  173. useful for you to know which CGM primitives are output by libplot's CGM
  174. driver. A list appears in the file libplot/README-cgm. If you have full
  175. documentation on the CGM primitives supported by your viewer, the list
  176. should help you decide whether it is necessary to reduce the CGM version
  177. number from 3 to 2, or to 1.
  178. ----------------------------------------------------------------------
  179. The libplot xfig driver and `graph -T fig'
  180. ----------------------------------------
  181. 1. At least in some versions of xfig release 3.2, the `fig2dev' program
  182. that `xfig' uses to export figures in Postscript format has a bug. It
  183. incorrectly transforms minus signs to hyphens, and hyphens to en-dashes.
  184. For example, if you do `plotfont -Tfig --box Helvetica' and
  185. `plotfont -Tfig --box -2 Helvetica' to produce character maps of the two
  186. halves of the Helvetica font, and then use xfig 3.2 to export the two
  187. character maps in Postscript format, you will notice that in the exported
  188. character maps, the minus sign and hyphen do not fit properly within their
  189. boxes. That is because they have been replaced by a hyphen and an en-dash,
  190. respectively.
  191. This is a problem with `fig2dev', not libplot. If you encounter this
  192. problem, a possible workaround is to change, with a text editor, the string
  193. "8#255 /endash" in the exported PS file to "8#255 /hyphen 8#055 /minus".
  194. The problem has been reported to the xfig maintainer, and may now have been
  195. fixed.
  196. 2. xfig supports rotation and uniform scaling of the 35 standard Postscript
  197. fonts, but not non-uniform scaling or shearing. So libplot's xfig driver
  198. automatically replaces anisotropically transformed Postscript fonts by a
  199. default Hershey font (HersheySerif). Hershey fonts may always be
  200. anisotropically transformed.
  201. This affects `graph -T fig', `plotfont -T fig', etc., and in general the
  202. output of libplot's xfig driver, if you specify a rectangular (rather than
  203. square) viewport. For example, if you do
  204. echo 0 0 1 1 2 0 | graph -T fig --page-size letter,xsize=8in,ysize=4in
  205. then in the .fig file which is written to standard output, the usual
  206. Helvetica font for graph labels will be replaced by HersheySerif. You will
  207. get a warning message about that.
  208. ----------------------------------------------------------------------
  209. libplot's PCL 5 and HP-GL/2 drivers, and `graph -T pcl' and `graph -T hpgl'
  210. -----------------------------------------------------------------------
  211. The following remarks apply when producing either PCL 5 or HP-GL/2 output.
  212. That's because PCL 5 output produced by libplot and the plotting utilities
  213. is really HP-GL/2 output, preceded by an escape sequence that switches the
  214. printer into HP-GL/2 mode. (It's followed by an escape sequence that
  215. switches the printer back to PCL 5 mode.)
  216. 1. The default treatment of colors in PCL 5 and HP-GL/2 output is not
  217. optimal, because the basic HP-GL/2 drawing model is not very powerful.
  218. HP-GL/2 supports a set of seven `logical pens', whose colors are black,
  219. red, green, yellow, blue, magenta, and cyan. Any line or curve can be
  220. drawn by any of the pens, and any region bounded by a curve can be filled,
  221. to any specified intensity (quantized in units of 10% or so) by any pen
  222. color. And that's just about it: in the basic drawing model, those are the
  223. only pen colors and fill colors that can be produced.
  224. The situation is even worse than it sounds, because when PCL 5 or HP-GL/2
  225. output is directed to a monochrome display device such as an HP LaserJet,
  226. every pen (even the yellow pen) is drawn as black!
  227. Fortunately, color PCL 5 and HP-GL/2 devices, such as color LaserJets and
  228. DesignJet plotters, support an enhanced drawing model. They can assign
  229. arbitrary colors to the logical pens. When producing PCL 5 or HP-GL/2
  230. output for such devices, you should set the environment variable
  231. PCL_ASSIGN_COLORS (or HPGL_ASSIGN_COLORS, as the case may be) to "yes".
  232. That will significantly improve the rendering of colored plots.
  233. 2. Internally, the LaserJet 4L and 5L use a number for the Wingdings font
  234. that is different from the number used by other LaserJets. (That's because
  235. they use an Intellifont version of the font, rather than a TrueType
  236. version.) So if any PCL 5 output that uses the Wingdings font is sent to a
  237. 4L or a 5L from `graph -T pcl' or any other of the plotting utilities, it
  238. won't print correctly.
  239. If you need to work around this problem, you can search for the number
  240. `31402' in the file libplot/g_fontd2.c, change it to `6826', and recompile.
  241. PCL 5 output will then use the typeface ID that is appropriate for the 4L
  242. and 5L.
  243. A less drastic remedy is to do a search-and-replace on the PCL 5 output
  244. with a text editor, replacing each occurrence of the string "31402" by
  245. "6826".
  246. The above advice probably applies to the LaserJet 6L as well as the 4L and
  247. 5L, but that hasn't been checked.
  248. 3. There are some small errors in the positioning of text strings when
  249. producing PCL 5 or HP-GL/2 output that uses the Symbol font. For example,
  250. if you do `plotfont -Tpcl --box Symbol > symbol.pcl' to get a PCL 5 file
  251. that is a character map of the Symbol font, you will notice that in the
  252. character map, some of the characters do not quite line up with their boxes.
  253. This problem is due to problems in HP's documentation. HP has released
  254. useful information on its 45 LaserJet fonts. (This includes font metrics,
  255. etc.; see ./INSTALL.fonts.) However, their information on the Symbol font
  256. appears to be incorrect. As a consequence, horizontal positioning of text
  257. strings in the Symbol font is slightly in error. This problem does not
  258. affect the 44 other LaserJet fonts.
  259. ----------------------------------------------------------------------
  260. libplot's ReGIS driver and `graph -T regis'
  261. -------------------------------------------
  262. `graph -T regis' (along with libplot's ReGIS driver, which it uses)
  263. currently contains incomplete support for the filling of regions. If the
  264. region to be filled extends beyond the edge of the ReGIS display, ideally
  265. it should be clipped, then filled. At present, filling is not performed at
  266. all (since the clipping code has not yet been written).
  267. In normal operation, this problem should not affect the output of `graph -T
  268. regis' at all. But it is really a bug, not just a problem.
  269. `graph -T regis' also does not support the 35 standard Postscript fonts;
  270. the Hershey fonts must be used instead. (The default font is HersheySerif
  271. rather than Helvetica.) The fact that the ZapfDingbats font is not
  272. supported means that `graph -T regis' does not support marker symbols
  273. greater than or equal to 32, or more accurately it does not select them
  274. from the font (ZapfDingbats) that one would expect.
  275. ----------------------------------------------------------------------
  276. libplot's Tektronix driver and `graph -T tek'
  277. ---------------------------------------------
  278. `graph -T tek' (along with libplot's Tektronix driver, which it uses) does
  279. not support the filling of regions, so the -q option does not work; also,
  280. multiplotting, which normally `blanks out' regions by filling them with
  281. white, may result in messy-looking plots. `graph -T tek' also does not
  282. support the 35 standard Postscript fonts; the Hershey fonts must be used
  283. instead. (The default font is HersheySerif rather than Helvetica.) The
  284. fact that the ZapfDingbats font is not supported means that `graph -T tek'
  285. does not support marker symbols greater than or equal to 32, or more
  286. accurately it does not select them from the font (ZapfDingbats) that one
  287. would expect.
  288. Filling of regions is not supported because Tektronix storage tubes did not
  289. support filling, for obvious reasons. The Tektronix emulator in the MS-DOS
  290. version of kermit apparently supports a restricted sort of region filling,
  291. but there are currently no plans to extend libplot's Tektronix driver to
  292. use it.
  293. The 35 Postscript fonts could in principle be supported by libplot's
  294. Tektronix driver, if Type 1 or TrueType rasterizer code were added to
  295. libplot. There are plans for doing this. But most people are interested
  296. in using such a driver to produce bitmaps for the Web, not in using it to
  297. draw Type 1 or TrueType fonts on Tek displays. (The phrase "bolting a V-8
  298. onto a Model T" comes to mind.)
  299. In `graph -T tek' the `--line-width' and `--frame-line-width' options also
  300. do not work, since the Tektronix driver does not support lines with other
  301. than a default width (it also does not support the setting of `cap mode'
  302. and `join mode' for polylines).
  303. A final comment. The Tektronix emulator in xterm(1) has a curious feature
  304. (bug?) that no one seems to have commented on. When any line of type other
  305. than "solid" (i.e. "dotted", "dotdashed", "shortdashed", "longdashed") is
  306. drawn, the pattern of illuminated and non-illuminated pixels along the line
  307. is the opposite of what one would expect. So "dotted" lines (obtained
  308. e.g. with the "-m 2" option to graph) look more like dashed lines. This
  309. bug, if that's what it is, is easily fixed by changing the xterm source code.
  310. ======================================================================
  311. Problems with thick lines drawn with libplot
  312. --------------------------------------------
  313. A `line segment' is conceptually a rectangle (usually rather thin). But if
  314. the affine transformation from user coordinates to device coordinates is
  315. not a uniform expansion or contraction, most such rectangles should ideally
  316. be sheared into parallelograms in the device frame. However, most display
  317. devices cannot display sheared line segments: their `lines', no matter how
  318. thick, are always drawn as rectangles.
  319. X Windows does not support sheared thick lines. Nor do the xfig or idraw
  320. drawing editors, or the HP-GL and HP-GL/2 languages. However, the
  321. Postscript and SVG file formats do support them.
  322. As a consequence, libplot's PS and SVG drivers are currently the only ones
  323. that display sheared thick lines correctly. The problem is evident only
  324. for unusually thick lines, of course.
  325. A related problem is that a constant-width polyline (polygonal line) drawn
  326. in the user frame should, ideally, be drawn in the device frame in an
  327. unusual way: the thickness of each line segment should depend on direction.
  328. I.e., some segments of a device-frame polyline should be thicker than
  329. others. This too is supported only by libplot's PS and SVG drivers.