On 2008-12-10 23:45-0800 Alan W. Irwin wrote:

> On 2008-12-10 15:32-0700 Doug Hunt wrote:
>> I'm having trouble getting my hands around example 23--I can't get any of the
>> 'c' examples to give correct comparison output except 'xwin'.  I get some
>> bogus or missing characters for all other driver types.  Do you have any
>> hints as to how to which 'c' example you use for comparison and how
>> to get it to work correctly?  My plplot installation may be missing
>> something required to get all the character sets to work.
>
> fontconfig is essential for managing Linux fonts
> in an intelligent way so make sure that package is installed.

Hi Doug:

That was a horribly incomplete and misleading answer written in haste so let
me try again.  There are four different font systems on PLplot.

(1) Hershey fonts.  These are the historical fonts used by PLplot, but they
have only a limited number of glyphs and generally look ugly on pixel
devices so any device that has access to better fonts tends to only use
these as a backup.  However, Hershey fonts tend to be the most reliable
since they are internal to PLplot and have no external dependencies. -dev
xwin is one device which uses only Hershey fonts which is why it worked for
you.

(2) Adobe Type 1 fonts.  These are used by default for -dev psc and
therefore all the comparisons we do with ctest.  So the answer to how to get
-dev psc to work properly is to install Adobe Type 1 fonts on your system or
some clone of them.  On Debian, the package name is gsfonts and it describes
itself this way:

   Fonts for the Ghostscript interpreter(s) These are free look-alike fonts
   of the Adobe PostScript fonts. Recommended for all flavors of Ghostscript
   (gs-gpl, gs-afpl and gs-esp).

Type 1 fonts look really nice, but they have a major downside which is such
fonts can effectively address only 255 glyph possibilities so the glyph
coverage in gsfonts is just barely adequate for English language and
mathematical symbols.  Type 1 glyph-finding is really simple so that is done
directly without relying on fontconfig.  So I am pretty sure any -dev psc
font trouble you had was because gsfonts (or some other equivalent font
package that supplies the standard Adobe fonts) was not installed.

(3) TrueType fonts accessed via our plfreetype interface to libfreetype. The
prototypical devices which use this method are the png, jpeg, and gif
devices associated with libgd. TrueType fonts look great and also can have
very large numbers (potentially up to 2^31) glyphs in them.  So they are
ideal for PLplot.  However, the current status is that plfreetype does not
use fontconfig to handle all the large number of font possibilites so we are
stuck with a really clumsy method of specifying fonts by directory and file
name (see
http://plplot.sourceforge.net/docbook-manual/plplot-html-5.9.0/characters.html
for details).  If you could not get -dev png to work properly, you probably
had some problem with configuring the file names and directory locations to
be consistent with where TrueType fonts are installed on your system.  It's
also possible you are missing TrueType fonts altogether.  On Debian the name
of a package that provides many TrueType fonts is ttf-freefont.  It
describes itself as follows:

   A set of free high-quality TrueType fonts covering the UCS character set.
   These fonts are similar to the (in)famous Helvetica, Times and Courier
   fonts.

(4) TrueType fonts accessed via fontconfig.  The prototypical devices which
use this method are the cairo devices (via libpango and libcairo which use
libfreetype and fontconfig) and also psttf (via libLASi, libpango, and
libcairo which use libfreetype and fontconfig). Specifying fonts for these
devices is really simple.  Our code specifies a generic font type (e.g.,
"sans") and fontconfig figures out the rest depending on what TrueType fonts
have been installed on the user's system.  Assuming you have an equivalent
to ttf-freefont installed, if you could not get any of the cairo devices
(e.g., -dev pscairo) to work then you probably have a problem with libpango,
libcairo, and/or fontconfig).  A similar situation holds for -dev psttf
except that libLASi is also thrown into the mix of possible non-working
external dependencies.

Hope this overview helps you to get the various PLplot font systems to work
properly on your system.  It's well worth it to take some trouble with this
since the results you can obtain look spectacular compared to what PLplot
results looked like a couple of years ago with just Hershey fonts.

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
__________________________

------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to