|
From: snvv <sn...@gm...> - 2009-04-12 21:29:03
|
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 Error message: get_gretl_charset: using UTF-8 Read datafile /usr/share/gretl/data/misc/anscombe.gdt periodicity: 1, maxobs: 11, observations range: 1-11 gnuplot: using libgd png driver stderr: 'Could not find/open font when opening font "arial", using internal non-scalable font ' gretl_errmsg: 'Could not find/open font when opening font "arial", using internal non-scalable font ' Failed command: 'gnuplot "/home/snvv101/.gretl/gpttmp.VJWFZ6"' Additional comments The first line of the created gnuplot file is: set term png truecolor small size 680,400 ############################### If I remove that line then I can produce the graph in gnuplot. Obviously gretl does not accept set term png but either terminal gnuplot> set term png Terminal type set to 'png' Could not find/open font when opening font "arial", using internal non-scalable font Options are 'nocrop medium ' gnuplot> gnuplot> set terminal png Terminal type set to 'png' Could not find/open font when opening font "arial", using internal non-scalable font Options are 'nocrop medium ' Is it possible to configure gnuplot to accept set term png truecolor small size 680,400? Please note that Arial font exists in my system. I have read somewhere that may the follow command solve the problem export GDFONTPATH="/usr/share/fonts/truetype/thryomanes/" gnuplot> set term png font thryb___ 12 I tried them witout success. Thank you snvv -- View this message in context: http://www.nabble.com/gnuplot-4.2-fails-to-run-gretl-files-tp23003097p23003097.html Sent from the Gnuplot - Dev mailing list archive at Nabble.com. |
|
From: Allin C. <cot...@wf...> - 2009-04-12 23:20:46
|
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. 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? (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.) Allin Cottrell |
|
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) |
|
From: Allin C. <cot...@wf...> - 2009-04-13 00:07:31
|
On Sun, 12 Apr 2009, Ethan Merritt wrote: > 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. I mean that if a distribution is packaging libgd, they should either patch it to look for fonts in the right place for that distribution or set the appropriate environment variable, rather than installing a semi-functional library. Lots of people on Debian and Debian-derived Linux variants run into the issue of gnuplot being unable to respect a TrueType font setting when using the libgd png driver. IMO this should work "out of box". Third-party programs such as gretl have to try to work around this problem, but the work-arounds are error-prone. Personally I would be very pleased to see the cairo-based png driver in an official gnuplot release. It has no problem with fonts since it relies on fontconfig rather than an idiosyncratic hard-wired font path. Allin Cottrell |
|
From: snvv101 <sn...@gm...> - 2009-04-13 22:23:57
|
On Monday 13 April 2009 02:41:42 Ethan Merritt wrote: > 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. Hello, Some more findings... What i did: export GDFONTPATH="/usr/share/fonts/truetype/msttcorefonts" gnuplot> set term png font arial 12 gnuplot> set term png font arial 12 Terminal type set to 'png' Options are 'nocrop font arial 12 ' When I try to create a graph gretl gives: Could not find/open font when opening font "arial", using internal non- scalable font Then I run gretl from command line to get more error messages and here is what I have: gnuplot: using libgd png driver stderr: 'Could not find/open font when opening font "arial", using internal non-scalable font ' gretl_errmsg: 'Could not find/open font when opening font "arial", using internal non-scalable font ' Failed command: 'gnuplot "/home/snvv101/.gretl/gpttmp.hIR18b"' Finally, I do believe this should be a libgd problem? Any suggestion is welcome. Thank you. snvv |
|
From: Allin C. <cot...@wf...> - 2009-04-13 22:36:49
|
On Tue, 14 Apr 2009, snvv101 wrote: > Some more findings... > > What i did: > export GDFONTPATH="/usr/share/fonts/truetype/msttcorefonts" > gnuplot> set term png font arial 12 > > gnuplot> set term png font arial 12 > Terminal type set to 'png' > Options are 'nocrop font arial 12 ' > > When I try to create a graph gretl gives: > Could not find/open font when opening font "arial", using internal non- > scalable font Ensure that GDFONTPATH is in the environment when gretl is started up -- that can't be the case, or you wouldn't get that libgd error message. Allin Cottrell |
|
From: Ethan M. <merritt@u.washington.edu> - 2009-04-13 22:36:19
|
> Hello, > Some more findings... > > What i did: > export GDFONTPATH="/usr/share/fonts/truetype/msttcorefonts" > gnuplot> set term png font arial 12 > > gnuplot> set term png font arial 12 > Terminal type set to 'png' > Options are 'nocrop font arial 12 ' OK, so it works fine in gnuplot. That seems to indicate that both gnuplot and libgd are working fine. > When I try to create a graph gretl gives: > Could not find/open font when opening font "arial", using internal non- > scalable font Which suggests that gretl is running in a different environment and therefore doesn't see your GDFONTPATH. > Then I run gretl from command line to get more error messages and here is what > I have: > gnuplot: using libgd png driver > stderr: 'Could not find/open font when opening font "arial", using internal > non-scalable font > ' > gretl_errmsg: 'Could not find/open font when opening font "arial", using > internal non-scalable font > ' > Failed command: 'gnuplot "/home/snvv101/.gretl/gpttmp.hIR18b"' > > Finally, I do believe this should be a libgd problem? I don't think so. Your first test demonstrates that libgd is able to find the font correctly. Does gretl maybe scrub its environment on entry? > Any suggestion is welcome. > > Thank you. > snvv -- Ethan A Merritt |
|
From: Allin C. <cot...@wf...> - 2009-04-13 22:40:04
|
On Mon, 13 Apr 2009, Ethan Merritt quoted: > > Could not find/open font when opening font "arial", using internal non- > > scalable font > > Which suggests that gretl is running in a different environment > and therefore doesn't see your GDFONTPATH. Yes, must be. > > Then I run gretl from command line to get more error messages and here is what > > I have: > > gnuplot: using libgd png driver > > stderr: 'Could not find/open font when opening font "arial", using internal > > non-scalable font > > ' > > gretl_errmsg: 'Could not find/open font when opening font "arial", using > > internal non-scalable font > > ' > > Failed command: 'gnuplot "/home/snvv101/.gretl/gpttmp.hIR18b"' > > > > Finally, I do believe this should be a libgd problem? > > I don't think so. Your first test demonstrates that libgd is able to > find the font correctly. Does gretl maybe scrub its environment on entry? No, gretl respects the environment as it finds it. Allin Cottrell |
|
From: snvv101 <sn...@gm...> - 2009-04-13 22:47:05
|
On Tuesday 14 April 2009 01:36:12 Ethan Merritt wrote: > Which suggests that gretl is running in a different environment > and therefore doesn't see your GDFONTPATH. I am not sure what do you mean by this and thus I can not test the issue. |