On 2010-06-29 20:38+0100 Steve Schwartz wrote:

> Is is just me, or have others noticed that plot symbol 17, which is
> supposed to be a filled circle, is a small square using the
> unicode-based drivers (at least qt and cairo which are the ones I have)
> but are stroke-filled circles using Hershey drivers (xwin, tk, etc.
> including setting plsc->dev_hrshsym = 1 for the qt and cairo drivers)?

Thanks for bringing this issue to our attention.  It's sharp-eyed users
like you that help to push the quality of PLplot results.

Here is how I investigated this issue.  First I ran

examples/c/x06c -dev qtwidget

and expanded the window by repeatedly moving the window down and to the left
by dragging with alt+left mouse and then grabbing the upper right corner to
expand what is left on the screen.  The result was example 6
has a nicely filled circle on my system, and I bet if you go through
that exact same exercise you will verify that on your system (see further
explanation below why you should get filled circles in certain cases
like example 6).

If I uncomment the diagnostic output in line 154 of plsym.c, then

plploin code, sym = 17, 143

is obtained for the initial compact Hershey indexing case, and

plploin code, sym = 17, 850

is obtained for the subsequent 4 extended Hershey font indexing cases.

In fonts/plhershey-unicode.csv we have the lines

0x2219,143,1
0x2219,850,0

So both 143 and 850 Hershey index correspond with Unicode
0x2219 for device drivers like qt and cairo which use unicode fonts.

If you look that up with the (highly recommended!) gucharmap application,
0x2219 corresponds to the bullet operator.  The glyph displayed by gucharmap
by default for that index is also round for my system fonts.  To see that
without question, make the gucharmap text size large by increasing the
number in the right-most command box (right next to the italic toggle
switch).  I was using the generic Sans fonts (just like qt and cairo do)
which resolved on my system to finding the bullet glyph in the DejaVu Sans
fonts.  (You can tell the exact font used for rendering with gucharmap by
right clicking on the glyph.) I also got the same glyph for the italic case,
but for the bold case (generated by toggling the bold switch) it came out
square! For the generic Serif fonts (which resolved to DejaVu Serif) the
result was a filled circle regardless of italic or bold toggles.

So, my guess is your test was using bold Sans fonts (if you system fonts
were similar to mine) for your simple test code, but example 6 does not have
bold which is why I predicted above you will see a round symbol in that
case (assuming your system fonts are similar to mine).

Anyhow, regardless of what fonts are installed on the system, the important
issue here is gucharmap shows that some of the unicode index 0x2219
positions in some modern fonts have a filled square glyph rather than a
filled circle (which seems reasonable because some people like square
bullets rather than round ones in text lists).  So clearly, 0x2219 is a poor
choice for unicode glyphs corresponding to Hershey "ascii" index 17 or
Hershey indices 143 (compact) and 850 (extended).

The gucharmap GUI has cross references in the character details (did I say
this is a highly recommended app?) which lead me to the "bullet" glyph
(0x2022, as opposed to 0x2219 for the "bullet operator" glyph).  All fonts
appear to have round glyphs for the bullet on my system, and furthermore,
the alias for bullet (using the character details) is "black small circle"
which is what we want those Hershey symbols to correspond to.

So I have made the consistent change from 0x2219 to 0x2022 in 
fonts/plhershey-unicode.csv (revision 11083).  Please try that, and
let me know if it fixes the issue that you found.

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 Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to