From: Alan W. I. <ir...@be...> - 2004-05-18 05:16:32
|
On 2004-05-17 22:12-0500 Maurice LeBrun wrote: > Alan W. Irwin writes: > > ... > > To summarize my recent experience, Hershey fonts are not acceptable for the > > png device because they look pretty awful for that inherently low-resolution > > device (typically 800x600 pixels). So that is why libfreetype support for > > -dev png is so important. My recent experience with that shows there is > > tremendous potential there for -dev png users (and in fact users of any > > device once the required simple code changes are made for each device > > driver) since there are so many excellent free fonts that are available via > > libfreetype. Nevertheless, there is also scope for improvement in the way > > the libfreetype fonts are organized for PLplot (see ToDo item above), and we > > also have to find and fix the current 156 character limit bug. > > I don't know how straightforward this would be to implement, but it would sure > be nice if the hershey font specification e.g. #gD for capital Greek Delta (to > use the recent example) could be seamlessly mapped onto the appropriate > character in the alternate font set. Could handle sub/super scripts in a > compatible way too, shifting position & size appropriately before printing > char. This would make it fantastically simpler for the end user to switch > between different fonts. I agree. However, I believe greek letters tend to be in the same positions as for the Hershey fonts so that may not be a problem (at least for some fonts). At least this was the case (e.g., #gD just worked) for the publically inaccessble truetype font file that Andrew Roach gave to me as a stopgap measure so I could get my papers out. Also, for Arial.ttf the default MS core font corresponding to plfont(1), subscripting (and presumably superscripting although I haven't tried it) works fine, and I also presume it will work fine for plfont(2), plfont(3), and plfont(4), corresponding by default on Unix/Linux systems to the MS core fonts "Times_New_Roman.ttf", "Times_New_Roman_Italic.ttf", "Comic_Sans_MS.ttf". The real ordering problem is for symbols. We just have an embarrassment of riches for freely accessible type 1 postscript fonts and truetype fonts, and I expect the symbols for the various fonts don't come in any standard order. We likely will just have to live with that situation, and use some variant of x07c.c to find out what position corresponds to what symbol for a given font. Currently my variant of x07c.c uses "#g\xNN" (where NN is hexadecimal) syntax to explore the first 156 symbols of any font. Once the current 156 limit is overcome the #g method will only work up to the first 256 symbols in the font. Thus, eventually, I want to make sure the "#(NNNN)" method (where NNNN is decimal) will work as well. Currently the "#(NNNN)" method of producing symbols corresponding to arbitrary positions in the font table only works for Hershey fonts. 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 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 __________________________ |