From: Alan W. I. <ir...@be...> - 2005-02-23 21:57:54
|
On 2005-02-23 16:34-0400 Thomas J. Duck wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hi Alan, Rafael, > > When you try x06 with the ps driver, the results are quite different > (see http://aolab.phys.dal.ca/~tomduck/temp/x06.pdf). You will see > that many of the symbols are missing. Can you confirm this problem? > For reference, I am running a Debian (unstable) system. Yes, that is the expected behaviour for our postscript driver. The problem is that type 1 fonts only have a maximum of 255 possibilities, and somebody at Adobe was anal-retentive and didn't even use all those possibilities for their Symbol font. So with such a small limit on the number of possibilities, Greek and Math symbols are featured for the type 1 symbol font and to get access to symbols for ordinary letters or numbers you must use a non-Symbol font. (See the results of gfontview to confirm this). This limitation with type 1 fonts is the reason I am strongly suggesting you concentrate on truetype fonts (which tend to have both math symbols and ordinary symbols if you check out the results of gucharmap) for your gnome canvas driver. Rafael has a long-term solution in mind to make truetype fonts also available for our postscript device. But meanwhile, the type 1 symbol font does deliver sufficient math symbols to be useful (see my recent example plots). The trick is to get back out of the symbol font immediately so you can have access to ordinary letters and numbers. The way I implemented this was in the plplot core. The following grep command finds all those instances: software@chickadee> grep -i 'symbol font' *.c plcore.c: /* momentarily switch to symbol font. */ plcore.c: /* momentarily switch to symbol font. */ plcore.c: /* momentarily switch to symbol font. */ plsym.c: /* Temporary Symbol font for every character. */ So whenever you use plpoin (as in Example 6), plsym (as in example 7), or whenever you specify a Hershey or unicode escape code (#(nnn) or #[nnn]) in the middle of a string, the font is momentarily changed to symbol in the core of PLplot. That works because usually when you do call plpoin, plsym, or specify a Hershey or unicode escape code you _do_ want a special symbol that is best rendered by a symbol font. I am not particularly keen on this compromise, however, since the "symbol" font for truetype is usually the same as the serif font, and you may not want sans instead (or bold or oblique variations) for your special symbols, and the way the font switch is set up now, the user has essentially no control over the fonts used for special symbols at run time. One elegant way to deliver the required quick symbol font switches for type 1 fonts without doing the same (unnecessary switch to symbol font) for truetype fonts is to put an additional mark in the highest-order byte of the FCI saying this FCI should only be paid attention to for the type 1 case. I have no time to programme that for now. Are there any volunteers? Alan __________________________ Alan W. Irwin email: ir...@be... phone: 250-727-2902 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 (lbproject.sf.net). __________________________ Linux-powered Science __________________________ |