From: Alan W. I. <ir...@be...> - 2004-05-16 17:15:21
|
For the -dev png plots I am preparing for publication, I have been attempting to use the TrueType fonts that are available with the png device and the -drvopt text,smooth option. Normal characters that are on the line, superscripted, or subscripted in either 2D and 3D plots seems to work. The only trouble I am having is with special symbols and Greek letters. Andrew (Roach), how do you specify the gradient sign with TrueType fonts? With Hershey fonts I use #(2266) (as indicated with the correspondence between numbers and symbols in example 7). I have the same question for capital Greek Delta (which for Hershey fonts is specified with #gD). When I try #gD with TrueType fonts, it just seems to make a short vertical mark, and there is also the following error message *** PLPLOT ERROR *** plscol0: Invalid RGB color: 252, 250, 256, aborting operation *** PLPLOT ERROR *** plscol0: Invalid RGB color: 256, 252, 252, aborting operation A related question is how do you find out what the correspondence is between the #(nnnn) notation and particular symbols? Examples 6 and 7 are supposed to do that, but it appears with -dev png -drvopt text,smooth option that only the outer labels for the tables are printed with TrueType, but the symbols within the tables are still done with the Hershey fonts. Andrew, can you fix this? System Details: Debian stable. CVS version of PLplot. Currently I am using the default TrueType fonts, which if you look at the plfreetype.c code are static char *default_font_names[]={"Arial.ttf","Times_New_Roman.ttf", "Times_New_Roman_Italic.ttf","Comic_Sans_MS.ttf","Arial.ttf"}; Here are the TrueType fonts (these are the downloadable core MS fonts) available on my system: ls /usr/share/fonts/truetype/ Andale_Mono.ttf Impact.ttf Arial.ttf Times_New_Roman.ttf Arial_Black.ttf Times_New_Roman_Bold.ttf Arial_Bold.ttf Times_New_Roman_Bold_Italic.ttf Arial_Bold_Italic.ttf Times_New_Roman_Italic.ttf Arial_Italic.ttf Trebuchet_MS.ttf Comic_Sans_MS.ttf Trebuchet_MS_Bold.ttf Comic_Sans_MS_Bold.ttf Trebuchet_MS_Bold_Italic.ttf Courier_New.ttf Trebuchet_MS_Italic.ttf Courier_New_Bold.ttf Verdana.ttf Courier_New_Bold_Italic.ttf Verdana_Bold.ttf Courier_New_Italic.ttf Verdana_Bold_Italic.ttf Georgia.ttf Verdana_Italic.ttf Georgia_Bold.ttf Webdings.ttf Georgia_Bold_Italic.ttf ms-fonts Georgia_Italic.ttf I can change the environment variables, PLPLOT_NORMAL_FONT, PLPLOT_ROMAN_FONT, PLPLOT_ITALIC_FONT, PLPLOT_SCRIPT_FONT, and PLPLOT_SYMBOL_FONT to point to any of these, but in order to properly explore the font options, the tabulated symbols in examples 6 and 7 have to be generated with TrueType fonts when those are specified by the user using the -dev png -drvopt text,smooth options. Andrew, if the modifications to examples 6 and 7 will take some discussion and time, and meanwhile you know the specific answer to how to specify the gradient symbol and Greek letters, please let me know since the gradient symbol and Greek letters will take care of my immediate publication needs for a while. 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 __________________________ |