I would like to use SVG format to produce a PLplot logo, but the svgcairo
device (in fact all cairo devices because this appears to be a libcairo
issue or libcairo backend issue) have some issues with antialiasing of
filled surfaces that produce some ugly looking artifacts on those surfaces,
in e.g., example 8 results.

So until those libcairo issues are fixed, svgcairo is ruled out for
producing an SVG logo and the svg device driver is the alternative I am
currently looking at.

Motivated by my desire to make an SVG logo for PLplot and also motivated by
the general idea that SVG is a really nice format for us, I (with some help
from Hazen) have been fixing the "easy" issues for -dev svg including
implementing alpha channel transparency, making the results validate at
http://validator.w3.org/, implementing familying, applying a scaling factor
to coordinates (which improved both the internal PLplot calculational
accuracy for this device used in determining line-hiding for example 18, and
also greatly improved the smoothness of the displayed results), and
adjusting the vertical text placement.  I am now done with these "easy"
fixes so I wanted to discover any remaining issues for -dev svg by looking
at the ctest -R 'svg$' results (more than 120 different pages) from our 30
standard examples.

It turns out you have to be careful of the svg viewer you use for such
evaluations. For example, the imagemagick display application has x origin
problems for svg text.  "display" renders svg by using the librsvg library.
I found the librsvg stand-alone viewer called rsvg-view also has exactly the
same bug (as expected) so I intend to send in a bug-report about it to kill
two birds with one stone. In general, the firefox and konqueror browsers
handle svg text positions properly, but one issue to watch out for with them
(see below) is how they handle exotic glyphs.

I used firefox to evaluate all the standard example pages, and followed up
with the svgviewer application (the standalone equivalent of konqueror's
method of viewing SVG results) when there was any issue visible and
sometimes also with "display" for exotic font issues (see below).

In general, our svg results look really good with firefox, and I believe
-dev svg produces everything I need to generate a good-looking SVG PLplot
logo using PLplot itself, but there are still some outstanding issues that I
noticed when looking at the complete set of examples.  I mark the ones
listed below that I am investigating further using "(AWI)".  The one that is
caused by an issue in another library is marked by "(Nobody)". Finally, the
ones marked "(*)" are too difficult for me so they are up for grabs for some
eager volunteer to show off his device driver skills. :-)

(*) Example 3: the text does not rotate accurately around this polar plot.
For example, the center of the text rotation seems offset from the center of
the plot.  The first page of Example 28 also appears to show this problem. I
assume these issues are caused by some text offset issue that has not been
taken care of properly in the svg device driver when doing rotational
transformations of text.

(AWI) Example 6: some of the horizontal rules are missing.  Strangely, the
seemingly equivalent horizontal rules in Example 7 are fine.

(*) Examples 9 and 21: clipping not implemented yet as illustrated by the
first page of these examples.

(*) Example 10 (and presumably others) Text does not rotate at all with the
-ori option.  (You have to run the installed examples to check out the
results from that option.) Again, this is some sort of
rotation/transformation issue, but it looks like at least in this case the
rotational information doesn't get to the text at all.  This may well be
related to the example 3 issue above.

(*) Example 15: cross-hatching not implemented yet as illustrated by both
pages.

(AWI) Example 20: empty pages 2,5,7,and 10 have an xml screwup that is
probably related to the familying logic.

(AWI) Example 21: first four figures (out of 6 on the second page) display
and then get blanked.  The last two figures on the page display and do not
get blanked.  The third page of this example (and also example 1) seem to
have a similar setup (multiple subpages per page), but no such issues.

(AWI) Example 23: pages 12-16 have an xml screwup (at least </g> and </svg>
are missing at end of file) that is probably related to the familying logic.

(Nobody) Example 24: exotic font handling for firefox and konqueror are not
nearly as sophisticated as the fontconfig font handling that is used by
libcairo.  The result is the exotic glyphs of this example are not found
(even though installed on the system). Interestingly, despite the X origin
problems of the ImageMagick "display" application, it renders all the CTL
language glyphs in our Peace flag properly.  That's quite a relief since it
means our approach of not worrying about any CTL issues and letting the
subsequent viewer application worry about it is correct.  I assume librsvg
(and therefore "display") does all the CTL stuff right by interrogating the
font for the information that it needs. Konqueror and firefox may well do
the same, but we won't know about that until they start having more
sophisticated font handling so that exotic glyphs can be found.  I intend to
put in a bug report about that issue for both of them.

In sum, the current svg device logic already produces superb-looking results
for the vast majority of our examples, and I think those superb results will
be generated for the logo that I have in mind as well. However, there are a
number of minor general issues I am still working on. Also, there is a text
rotation bug that needs to be addressed, and clipping and cross-hatching
still have to be implemented.  If somebody will tackle those three issues,
we will end up with an SVG device that produces superb-looking results for
all circumstances.

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 the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to