On 2005-01-21 11:53-0000 Andrew Ross wrote:
> On Thu, Jan 20, 2005 at 08:12:03PM -0800, Alan Irwin wrote:
>> Due to time constraints I have only done the 23rd example in python and not
>> C (or the other languages)....
> These are now looking good. I have added C++ bindings for the plgfci
> and plsfci functions. I have also implemented example 23 in C and C++.
> Results are identical to the python version Alan sent round (at least
> the postscript driver). Java is next on my list.
Thanks, Andrew! It's great to see my efforts on example 23 being extended
to other languages so rapidly this way. (BTW, CVS HEAD is currently broken
because your infrastructure changes for x23c.c and x23.cc have been
committed, but you must have forgotten to commit the x23c.c and x23.cc files
themselves. The temporary workaround is to copy some other example to
x23c.c and x23.cc as placeholders, but I am sure that won't be necessary for
much longer now that I have drawn your attention to the oversight.)
>> Andrew (Ross), if you look at the arrows section of these results, it might
>> give you some interesting ideas for example 22. (You could change the
>> example code to check whether unicode fonts are enabled, and if so use a
>> nice arrow from these fonts.) Even the test.ps results have some arrows that
>> might be suitable, and, of course, there are lots of arrow symbols for the
>> TrueType fonts.
> I'll have a think about this. It might produce nicer results. I'm just a
> little worried about the problems of scaling and positioning arrows so
> the results are consistent with the old method.
I agree you want almost perfect consistency in position and angle with the
current method of generating the arrow since that already produces quite
attractive results for example 22 (aside from issues such as anti-aliasing
that the font approach solves). If Rafael has solved the misalignment
problems for TrueType fonts (and so far the results are looking quite good),
then you should be able to rotate an arrow around its centre using plptex
without the center of the arrow moving in the slightest. Haven't tried that
test myself, but if it succeeds with the current postscript Type 1 symbol
font, the TrueType fonts (with Rafael's patches), and Hershey fonts, then I
think it should be straightforward to get good agreement in position and
angle between your current arrows and Type 1 and TrueType based ones (and
even the Hershey font arrow). BTW, I have just committed a tweak for
plhershey-unicode.csv so the right arrow can be obtained consistently from
all fonts using Hershey code #(732).
That leaves the size issue. I just checked with gucharmap, and FreeMono
should be avoided for size calibrations since its right arrow (UCS4 =
0x2192) is less than half the size of the right arrow for most of the other
fonts including FreeSans and FreeSerif. But I think if you pick either of
the latter 2 for size calibration, most other right arrows will be
reasonably consistent in size including Type 1 Symbol. Then with your size
calibration built into the code, most users will be satisfied with the arrow
size from most fonts they choose. However, if the user picks FreeMono or
some other TrueType font with strange arrow size, they will see the results,
and if they don't like them they can shift to one of the other fonts (or use
plschr to control the size).
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 Yorick front-end to PLplot (yplot.sf.net); the
Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project