On 2007-06-04 21:17-0400 Hazen Babcock wrote:

>
> On Jun 3, 2007, at 7:30 PM, Alan W. Irwin wrote:
>
>> I have only done the most superficial tests of the built results, but I
>> immediately noticed two issues on Linux beyond what you mentioned.
>> 
>> (1) the 'ldd -r cairo.so' test showed the
>> following problems:
>> 
>> undefined symbol: cairo_ps_surface_create       (./cairo.so)
>> undefined symbol: cairo_pdf_surface_create      (./cairo.so)
>> undefined symbol: cairo_svg_surface_create      (./cairo.so)
>> 
>> It's fairly urgent to solve these problems since it excludes any testing 
>> of
>> the pscairo, pdfcairo, or svgcairo devices on Linux.
>
> Maybe this is because I have Cairo v1.2.6 and debian testing is v1.2.4? 
> According the cairo docs these functions have been in the library since 1.2.

Hi Hazen:

I am reviving this thread because I got some bad news today about libLASi
(the library used by the psttf device).  It has no support for font hinting.
What that means is letters are misaligned relative to the pixel grid of the
display device causing letters to have inconsistent shapes if antialiasing
is turned off or letters having a "muddy" appearance with antialiasing
turned on.  A lot of users don't mind such issues so psttf is still going to
be useful for them, but for my needs I prefer the hinting of characters to
be done correctly so this evening I started evaluating the pscairo
alternative for making postscript plots.

I built libcairo-1.4.10 for myself since that oldstable Debian did not even
have libcairo.  19 of 124 tests failed as a result of "make check".  I think
that is an expected result since the libcairo developers probably do not
have access to such an old set of system libraries for testing purposes (and
probably wouldn't want to support such old versions in any case).  I didn't
see anything wrong in the failed tests that seemed relevant to postscript so
I forged ahead.

I used the latest pango stack that I had also built for myself on that
machine.  For the PLplot build, I built all pango-related devices except for
the memory one (which I don't know how to test).  All seemed well in the
build after I removed the duplicates from the X11_INCLUDE_DIR list (see
latest commit) that were occurring at least on my Linux system.

Now for some issues I discovered with the pscairo results.

(1) The bounding box is not correct. (I believe that is a known issue which
you plan to fix.)

(2) At least for single pages I planned to get around the bounding box issue
using

-dev pscairo -o - | ps2eps -l -q --ignoreBB > filename.eps.

but stdout (at least when invoked by "-o -" which is the PLplot standard for
specifying stdout) does not work.  In fact, if you try it with -dev pscairo
you will simply get output to the filename "-".  (Files with that name are
tough to get rid of unless you remember the special construct "rm -- -".)

I can get around this stdout issue for now by the following clumsy construct
to fix the bounding box

-dev pscairo -o temp.ps ; cat temp.ps |ps2eps -l -q --ignoreBB > filename; \
rm -f temp.ps

(3) There are still minor 3D plot labelling problems.  For example, if you
look at example 8 the y-axis labels (and possibly the z-axis labels) are
oriented properly (Hazen, thanks for fixing that issue!), but they have a
size that is too large.  To see this I suggest you visually compare with the
same plot generated with -dev psc.

Now for the good news about pscairo hinting.  It's perfect!  Without
antialiasing turned on in gv, the letters have consistent shapes because
they are consistently aligned with the display device pixel grid.  And once
you turn on antialiasing the result looks exceptionally clean and clear.

Of course you pay for the much cleaner looking pscairo results by somewhat
longer plot generation times (e.g., 0.456s versus 0.359s for psttfc) and
somewhat larger (e.g., 64K versus 48K for psttfc) compressed postscript file
sizes. (These speed/size comparisons between pscairo and psttfc were done
for one of my 3D research plots that calls plsurf3dl with options MAG_COLOR
| BASE_CONT | SURF_CONT.) The relatively modest speed loss and size gain for
pscairo aren't that important for my research plots, and I really like the
look of the well-hinted text label results that you get with this device.
Thus, I am really happy pscairo exists and my thanks to Hazen for making
this possible.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________

Linux-powered Science
__________________________

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to