[cairo] [PATCH]A cairo-ps-surface.c issue for modern finicky versions of ghostscript

Alan W. Irwin irwin at beluga.phys.uvic.ca
Sat Dec 1 21:23:33 PST 2007


Hi Adrian:

Thanks for working so hard to replicate the problem and also thanks for your
explanation of how the various kinds of fonts get embedded.

That leads to another question.  Why doesn't the (patched) PostScript
backend give consistent results for pscairo and pngcairo (and xcairo) for
example 24? At least for the fonts I have installed on my Debian testing
system, the Korean peace word is blank for pscairo (and pdfcairo) and
one-tenth size for pngcairo and xcairo.  From your explanation I now assume
the small size is due to having a bitmapped Korean font installed somewhere
on my Debian testing system that fontconfig finds as a last desperate try to
find something that vaguely works, but why don't we see that small result
for postscript (and pdf)?  Or is this an artifact of the minimalist approach
I took to applying your patches?

More below.

On 2007-12-02 14:24+1030 Adrian Johnson wrote:

> Is there an automated way to check the PLplot test results?

Yes, with some limitations.

You can automatically generate the results with, e.g.,

# IF I use specially built pango stack rather than system version...
export LD_LIBRARY_PATH=/home/software/pango_stack/install/lib64
export PKG_CONFIG_PATH=/home/software/pango_stack/install/lib64/pkgconfig

cmake --options...
make
ctest --tests-regex 'cairo'

and then semiautomatically look at them with

cd test
alias gv='gv --noquiet --orientation=landscape --scale=-1'
for PSCAIRO in *.pscairo; do gv $PSCAIRO; done

We also have something similar we can do in the installed examples directory,
with some extra convenience and flexibility.

make install
cd $prefix/share/plplot5.8.0/examples
# to build the examples:
make
# to generate comprehensive test results
./plplot-test --front-end=c --device=pscairo
./plplot-test --front-end=c --device=pngcairo

for PSCAIRO in *.pscairo; do gv $PSCAIRO; done
for PNGCAIRO in *.pngcairo*; do display $PNGAIRO; done

# To run individual examples...

c/x24c -dev pngcairo -o test.png 
c/x24c -dev xcairo

Floating point results from various platforms (or even from the same
compiler for different optimization options) have different rounding errors
which then propagate into the PostScript results so we have never had a
completely automatic way of testing.  Apparently there are sloppy diff
routines now that will account for rounding errors so we could switch to
something like that, but frankly the above is not too bad so we have not yet
made the effort to completely automate.

Thanks again, for your most helpful comments.

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
__________________________


More information about the cairo mailing list