On 2010-10-03 15:46+0200 Arjen Markus wrote:

> Hello Hazen, Alan, all,
>
> I have just built and tested PLplot in a very old environment (Windows XP 
> with MSVC 6.0 as the C compiler) and I had to correct the wingcc.c file for 
> lack of SetWindowLongPtr() and GetWindowLongPtr() in that set-up.
>
> While this worked, I did get some weird results with
> pllegend():
>
> - The background is not exactly the background of the plot
> - The second page of example x26 is mangled.

Hi Arjen:

Thanks for your tests.  The first page of 26 is fine; the pllegend API
allows you to apply a background to the legend which I have done in
example 4 and example 26.  The second page is "fine" as well in the
sense it is consistent with the bad results for xwin here which is
completely unaware of unicode.  So count your test result in the
"good" column for this release.

I mentioned the example 26 issue (extra large legend background) you
see with all device drivers in the recent pllegend discussion. The
horizontal space for the annotated strings is calculated internally by
plstrl, but that routine currently has no idea about utf-8 (what the
Russian strings of page 2 are written in) and thus grossly
overestimates the space involved because it assumes every utf-8 byte
is a (Hershey) character.  The solution is to convert utf8 to UCS4
(like all other string input routines do), and for unicode aware
drivers (e.g, svg, qt, cairo, and wingcc) have a variation on the normal
(unicode) text processing that allows the driver to calculate how much
length that UCS4 string will require to be rendered without actually
doing that rendering.  That improvement should make the legend size
exact for the unicode case, and more reasonable for the Hershey case.

Another issue with your wingcc results is it uses the plfreetype
method of rendering unicode that depends directly on the freetype
library. That is available for Windows as part of the Windows GTK+
package, but it appears from the example 26 results that you have not
downloaded that package so wingcc has fallen back to using Hershey
fonts instead (which give a blank for all unicode characters just like
you get for xwin).

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
__________________________

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to