On Fri, 10 Apr 2009, Allin Cottrell wrote:
On Fri, 10 Apr 2009, Paul Jones wrote:
> Hi, I'm running Linux, Debian unstable, and I am getting an error
> message everytime I try to display a time series plot in gretl.
>
> The error is:
>
> "Could not find/open font when opening font "arial", using internal
> non-scalable font"
Could you tell us, what version of gretl, and what version of
gnuplot?
Never mind; problem diagnosed, I think. I just checked on my home
machine running Ubuntu 8.04, forcing gretl to use the
Ubuntu-installed gnuplot (I generally use gnuplot 4.3). I presume
the Debian version you're on displays the same brokenness as
Ubuntu; here's the story:
When gnuplot < 4.3 makes a PNG file, it relies on a library called
libgd. Now libgd is pretty crap at handling fonts: it has a
archaic hard-wired font path, and so far as I can tell
Debian/Ubuntu has not patched libgd so that it can find fonts on a
Debian type system "out of the box". (This merits a bug report.)
Anyway, unless you can get a new gnuplot that uses pango and cairo
instead of libgd, the workaround is to
export GDFONTPATH=<whatever>
where <whatever> might be, say,
/usr/share/fonts/truetype/ttf-bitstream-vera
possibly with other directories appended, separated by colons.
Or, if you a recent version of gretl, you could do
export GDFONTPATH=/usr/share/gretl/fonts
One other thing: you may be in a "catch-22" with regard to
resetting the graph font (i.e. can't reset it without getting a
valid graph to click on, to get the graph editor). In that case,
open ~/.gretl2rc in a text editor and look for the line,
Png_font = ...
On the right of the '=' type the name of a known good font, in
GDFONTPATH, which might be Vera:
Png_font = Vera
Then you should be good to go.
Allin Cottrell