===============================
G N U P L O T
Version 4.3 patchlevel 0
last modified March 2008
System: Linux 2.6.9-55.0.9.ELsmp
===============================
gnuplot> show fontpath
fontpath is
system fontpath is "/usr/X11R6/lib/X11/fonts/Type1" "/usr/lib/
X11/fonts!"
gnuplot> set fontpath "/usr/X11R6/lib/X11/fonts/Type1:/usr/lib/X11/
fonts!:./"
gnuplot> show fontpath
fontpath is "/usr/X11R6/lib/X11/fonts/Type1" "/usr/lib/X11/
fonts!" "./"
system fontpath is "/usr/X11R6/lib/X11/fonts/Type1" "/usr/lib/
X11/fonts!"
gnuplot> load "fontfile.dem"
This file demonstrates how to use postscript type 1 font
files with gnuplot.
Please note that this demo runs only on postscript terminal,
because fontfile inclusion is only supported by this terminal.
In addition, this demo needs two font files which are not
included in the gnuplot distribution.
On systems with ghostscript they should be found automatically.
If not, they can be downloaded from the net:
http://sourceforge.net/projects/gs-fonts/
Please put the files "p052003l.pfb" and "p052023l.pfb"
somewhere they are found, e.g. into the working directory.
Hit return to continue
Font file 'p052003l.pfb' contains the font 'URWPalladioL-Roma'.
Location:
p052003l.pfb
gnuplot> set terminal postscript enhanced linewidth 2 'Times-Roman'
22 fontfile 'p052003l.pfb' fontfile 'p052023l.pfb'
^
"fontfile.dem", line 27: extraneous argument in set terminal
postscript
=========================================================
So, as shown above, I am getting this error message even when trying
to run the "fontfile.dem" file. I also tried the
"stringvar.dem" (specifically with the "stringvar.5.png" output):
============================================
gnuplot> load "plot-stringvar5.tex"
gdImageStringFT: Could not find/open font while printing string J with
font WingDings
============================================
I cannot understand why gnuplot cannot find the font files (if this is
what causes the error). The path is defined, and I do have these files
("p052003l.pfb" and "p052023l.pfb" for the first case) and ("b5wd.ttf"
for the second one) in my working directory as well as in my "/usr/lib/
X11/fonts/" one.
Any idea of what I am doing wrong?
Thanks.
OK.
>gnuplot> load "fontfile.dem"
>Font file 'p052003l.pfb' contains the font 'URWPalladioL-Roma'.
>Location:
> p052003l.pfb
>
>gnuplot> set terminal postscript enhanced linewidth 2 'Times-Roman'
>22 fontfile 'p052003l.pfb' fontfile 'p052023l.pfb'
> ^
> "fontfile.dem", line 27: extraneous argument in set terminal postscript
That does seem to be a bug.
It must be a recent one. Version 4.2.3 is working OK on this demo.
... OK, found it.
Fixed in CVS.
As a temporary work-around, you could add a dummy parameter following each
occurance of `fontfile <foo>`. E.g.:
set term post enh lw 2 'Times-Roman' 22 fontfile 'foo' DUMMY fontfile 'baz' DUMMY
thanks for the bug report
>So, as shown above, I am getting this error message even when trying
>to run the "fontfile.dem" file. I also tried the
>"stringvar.dem" (specifically with the "stringvar.5.png" output):
>
>============================================
>gnuplot> load "plot-stringvar5.tex"
>gdImageStringFT: Could not find/open font while printing string J with
>font WingDings
That error message is from libgd, which uses a totally different
font mechanism from PostScript. Gnuplot can search for the PostScript fonts
by itself, using the paths defined in "set fontpath". But the libgd
library pulls its font search path from the environmental variable GDFONTPATH,
independent of anything gnuplot does.
>I cannot understand why gnuplot cannot find the font files (if this is
>what causes the error). The path is defined, and I do have these files
>("p052003l.pfb" and "p052023l.pfb" for the first case) and ("b5wd.ttf"
>for the second one) in my working directory as well as in my "/usr/lib/
>X11/fonts/" one.
>Any idea of what I am doing wrong?
The first error is a gnuplot bug.
The second error I think is either a failure to set GDFONTPATH or else a
case where the font is truly missing. wingding.ttf is a Windows font,
and you may well not have it on a linux machine.
--
Ethan A Merritt