|
From: Ethan M. <merritt@u.washington.edu> - 2009-04-12 23:38:28
|
On Sunday 12 April 2009, Allin Cottrell wrote: > On Sun, 12 Apr 2009, snvv wrote: > > Problem: > > When I try to create a graph it fails > > > > Operating System: > > Operating System Debian sid > > gretl ver. 1.8.0 > > gnuplot ver 4.2 patchlevel 5 ... > > > > gnuplot: using libgd png driver > > stderr: 'Could not find/open font when opening font "arial", using > > internal non-scalable font > > ' ... > > Additional comments > > The first line of the created gnuplot file is: > > > > set term png truecolor small size 680,400 > > This is primarily a bug with the libgd installation, which can't > find the arial font. I wouldn't call that a libgd installation problem. Gnuplot needs to try some default truetype font; it happens to use Arial because that is very common. The error message is telling you that either (a) you don't have Arial installed at all and should pick a different defaultfont (environmental variable GNUPLOT_DEFAULT_GDFONT) or (b) you do have Arial installed but in a directory that is not part of the font search path (environmental variable GDFONTPATH). libgd can be correctly installed, but still you need to specify where your fonts are located. > However, I think there's a case for saying > there's a minor gnuplot bug here: given the terminal setting > quoted above, why is gnuplot giving the error message about arial? > Isn't "small" a directive to use the libgd internal font? There was a long thread arguing this point on the usenet group recently. People have old scripts that use the keyword "small". When run with a modern gnuplot that supports scalable fonts, (i.e. anything since the version 4.0) what should happen by default? My perspective is that over the years there were many queries/complaints about enhanced text or text rotation not working in PNG, caused by a failure to specify a scalable font. This was solved by having gd.trm try to find a scalable font by default, using a couple of common font names. Yes, this makes it harder to explicitly request a built-in non-scalable font, but the recent usenet query was honestly the first time I've ever seen such a request. > (Off topic here, but gretl -- a third party caller of gnuplot -- > is getting confused by that error message; it doesn't expect it > because previous gnuplot versions didn't emit it.) I don't think there has ever been an expectation that error messages will not change. Some of them are emitted by one of the support libraries, not by the gnuplot code per se. -- Ethan Merritt (on the road) |