From: Jon <dev...@gm...> - 2015-04-16 16:19:45
|
Dear All users, I have been frustrated by this issue for a long time. For the png terminal I checked on my local linux environment always gives the same font size no matter what size I request. Any idea on how to fix it? If further information or sample script is needed, please let me know. Thanks, Sincerely, Jon |
From: BBands <bb...@gm...> - 2015-04-16 18:23:12
|
On Linux with gnuplot 5.0: set term png set label "test" font 'arial, 24' set output "test.png" plot sin(x) set output Produces a png file of a sine wave with a large "test" in the center for me. All the test features of the test plot work for me in png too. Devs: Should we have some different font sizes in the test function? John On Thu, Apr 16, 2015 at 9:19 AM, Jon <dev...@gm...> wrote: > Dear All users, > > I have been frustrated by this issue for a long time. For the png terminal > I checked on my local linux environment always gives the same font size no > matter what size I request. Any idea on how to fix it? If further > information or sample script is needed, please let me know. > |
From: Jon <dev...@gm...> - 2015-04-16 20:51:36
|
I tried to run your script and gnuplot returns gdImageStringFT: Could not find/open font while printing string test with font arial any idea? This is tested on gnuplot 4.2.6. I also tried on gnuplot 5.0 which directly says png terminal not recognized. Many thanks! On Thu, Apr 16, 2015 at 1:23 PM, BBands <bb...@gm...> wrote: > On Linux with gnuplot 5.0: > > set term png > set label "test" font 'arial, 24' > set output "test.png" > plot sin(x) > set output > > Produces a png file of a sine wave with a large "test" in the center for > me. All the test features of the test plot work for me in png too. > > Devs: Should we have some different font sizes in the test function? > > John > > > On Thu, Apr 16, 2015 at 9:19 AM, Jon <dev...@gm...> wrote: > >> Dear All users, >> >> I have been frustrated by this issue for a long time. For the png terminal >> I checked on my local linux environment always gives the same font size no >> matter what size I request. Any idea on how to fix it? If further >> information or sample script is needed, please let me know. >> > > |
From: Ethan M. <eam...@gm...> - 2015-04-16 21:18:39
|
I do not know why/how your system is [mis]configured so that it does not find fonts by default, but you can use the environmental variable GDFONTPATH to give libgd a new list of directories to use for font lookup. Of course it will only find fonts that are actually present in those directories. |
From: Jon <dev...@gm...> - 2015-04-16 22:05:25
|
could you please give me your configure file relevant to gnuplot? What I am using are copied from online as export GDFONTPATH=/usr/share/fonts/liberation export GNUPLOT_DEFAULT_GDFONT=LiberationSans-Regular which does exist under the specific directory but obviously not perfect. How to check whether these are compatible with my current version of gnuplot? Thanks, On Thu, Apr 16, 2015 at 4:18 PM, Ethan Merritt <eam...@gm...> wrote: > I do not know why/how your system is [mis]configured so that it does > not find fonts by default, but you can use the environmental variable > GDFONTPATH to give libgd a new list of directories to use for font > lookup. Of course it will only find fonts that are actually present > in those directories. > |
From: Ethan M. <eam...@gm...> - 2015-04-16 23:11:30
|
On Thu, Apr 16, 2015 at 3:05 PM, Jon <dev...@gm...> wrote: > could you please give me your configure file relevant to gnuplot? > > What I am using are copied from online as > > export GDFONTPATH=/usr/share/fonts/liberation > export GNUPLOT_DEFAULT_GDFONT=LiberationSans-Regular > > which does exist under the specific directory but obviously not perfect. How > to check whether these are compatible with my current version of gnuplot? > > Thanks, > > > > On Thu, Apr 16, 2015 at 4:18 PM, Ethan Merritt <eam...@gm...> wrote: >> >> I do not know why/how your system is [mis]configured so that it does >> not find fonts by default, but you can use the environmental variable >> GDFONTPATH to give libgd a new list of directories to use for font >> lookup. Of course it will only find fonts that are actually present >> in those directories. I don't think the gnuplot version is relevant here. The only thing that matters is libgd. I think that all versions of libgd will accept a font by path and filename (as you show in your export commands above). libgd versions newer than (I think) 2.0.35 will also accept a font specified by its face name, in which case the system fontconfig utility is used to search for it. In either case gnuplot just passes through the requested font name and size to libgd; it doesn't do any font management by itself. It is in principle possible to have a copy of libgd that doesn't support TrueType or OpenType fonts, but I haven't seen such a thing since last century. This is tested at the time gnuplot is configured and the result is indicated by defining (or not) the symbol HAVE_GD_TTF in file config.h. You can also check this from inside gnuplot by typing "show version long" and looking for the string "+GD_TTF". |
From: Jon <dev...@gm...> - 2015-04-17 00:01:07
|
Thank you very much for your information. But I cannot catch the main idea there. I am not familiar with libgd or fontconfig at all. Could you please give a more detailed explanation and guide me more closely? I showed version long and it returned the following, maybe it helps you to identify the issue for me. G N U P L O T Version 4.2 patchlevel 6 last modified Sep 2009 System: Linux 2.6.32-220.el6.x86_64 Copyright (C) 1986 - 1993, 1998, 2004, 2007 - 2009 Thomas Williams, Colin Kelley and many others Type `help` to access the on-line reference manual. The gnuplot FAQ is available from http://www.gnuplot.info/faq/ Send bug reports and suggestions to < http://sourceforge.net/projects/gnuplot> Compile options: -READLINE +LIBREADLINE +HISTORY +BACKWARDS_COMPATIBILITY +BINARY_DATA +GD_PNG +GD_JPEG +GD_TTF +GD_GIF +ANIMATION -NOCWDRC +X11 +X11_POLYGON +MULTIBYTE +USE_MOUSE +HIDDEN3D_QUADTREE +DATASTRINGS +HISTOGRAMS +OBJECTS +STRINGVARS +MACROS +IMAGE DRIVER_DIR = "/usr/libexec/gnuplot/4.2" GNUPLOT_PS_DIR = "/usr/share/gnuplot/4.2/PostScript" HELPFILE = "/usr/share/gnuplot/4.2/gnuplot.gih" On Thu, Apr 16, 2015 at 6:11 PM, Ethan Merritt <eam...@gm...> wrote: > On Thu, Apr 16, 2015 at 3:05 PM, Jon <dev...@gm...> wrote: > > could you please give me your configure file relevant to gnuplot? > > > > What I am using are copied from online as > > > > export GDFONTPATH=/usr/share/fonts/liberation > > export GNUPLOT_DEFAULT_GDFONT=LiberationSans-Regular > > > > which does exist under the specific directory but obviously not perfect. > How > > to check whether these are compatible with my current version of gnuplot? > > > > Thanks, > > > > > > > > On Thu, Apr 16, 2015 at 4:18 PM, Ethan Merritt <eam...@gm...> > wrote: > >> > >> I do not know why/how your system is [mis]configured so that it does > >> not find fonts by default, but you can use the environmental variable > >> GDFONTPATH to give libgd a new list of directories to use for font > >> lookup. Of course it will only find fonts that are actually present > >> in those directories. > > I don't think the gnuplot version is relevant here. The only thing > that matters is libgd. > > I think that all versions of libgd will accept a font by path and > filename (as you show in your export commands above). libgd versions > newer than (I think) 2.0.35 will also accept a font specified by its > face name, in which case the system fontconfig utility is used to > search for it. In either case gnuplot just passes through the > requested font name and size to libgd; it doesn't do any font > management by itself. > > It is in principle possible to have a copy of libgd that doesn't > support TrueType or OpenType fonts, but I haven't seen such a thing > since last century. This is tested at the time gnuplot is configured > and the result is indicated by defining (or not) the symbol > HAVE_GD_TTF in file config.h. You can also check this from inside > gnuplot by typing "show version long" and looking for the string > "+GD_TTF". > |
From: BBands <bb...@gm...> - 2015-04-17 00:23:10
|
There is quite a bit of info on gd here: http://www.boutell.com/gd/manual2.0.33.html Many have moved on from gd for png support, so help may be hard to come by. Here is a snippet from the 4.6 release note: The 4.6 source code supports three primary cross-platform output modes in addition to several platform-specific modes. 1) Cairo/pango/wxWidgets These terminals were introduced in version 4.4 and are now the most stable and full-featured option. This set of terminals includes - pngcairo, pdfcairo, epscairo, and cairolatex for output to a file - wxt for interactive display This is the default configuration, but requires prior installation of libcairo, libpango, libcairo, libwxgtk, and related support libraries To disable these terminals: ./configure --disable-wxt --without-cairo 2) Qt The new qt terminal supports interactive display with menu-driven output to png, svg or pdf. Requires libqt version >= 4.5 ./configure --enable-qt John On Thu, Apr 16, 2015 at 5:01 PM, Jon <dev...@gm...> wrote: > Thank you very much for your information. But I cannot catch the main idea > there. I am not familiar with libgd or fontconfig at all. Could you please > give a more detailed explanation and guide me more closely? I showed > version long and it returned the following, maybe it helps you to identify > the issue for me. > > G N U P L O T > Version 4.2 patchlevel 6 > last modified Sep 2009 > System: Linux 2.6.32-220.el6.x86_64 > > Copyright (C) 1986 - 1993, 1998, 2004, 2007 - 2009 > Thomas Williams, Colin Kelley and many others > > Type `help` to access the on-line reference manual. > The gnuplot FAQ is available from http://www.gnuplot.info/faq/ > > Send bug reports and suggestions to < > http://sourceforge.net/projects/gnuplot> > > Compile options: > -READLINE +LIBREADLINE +HISTORY +BACKWARDS_COMPATIBILITY +BINARY_DATA > +GD_PNG +GD_JPEG +GD_TTF +GD_GIF +ANIMATION > -NOCWDRC +X11 +X11_POLYGON +MULTIBYTE +USE_MOUSE +HIDDEN3D_QUADTREE > +DATASTRINGS +HISTOGRAMS +OBJECTS +STRINGVARS +MACROS +IMAGE > > DRIVER_DIR = "/usr/libexec/gnuplot/4.2" > GNUPLOT_PS_DIR = "/usr/share/gnuplot/4.2/PostScript" > HELPFILE = "/usr/share/gnuplot/4.2/gnuplot.gih" > |
From: Ethan A M. <eam...@gm...> - 2015-04-17 01:57:57
|
On Thursday, 16 April 2015 07:01:00 PM Jon wrote: > Thank you very much for your information. But I cannot catch the main idea > there. I am not familiar with libgd or fontconfig at all. Could you please > give a more detailed explanation and guide me more closely? I showed > version long and it returned the following, maybe it helps you to identify > the issue for me. > > G N U P L O T > Version 4.2 patchlevel 6 > last modified Sep 2009 > System: Linux 2.6.32-220.el6.x86_64 Many versions out of date, but nevertheless it should work properly. > Compile options: > -READLINE +LIBREADLINE +HISTORY +BACKWARDS_COMPATIBILITY +BINARY_DATA > +GD_PNG +GD_JPEG +GD_TTF +GD_GIF +ANIMATION ^^^^^^^^ Yes, your copy of gnuplot does link to a libgd that support TrueType fonts. > -NOCWDRC +X11 +X11_POLYGON +MULTIBYTE +USE_MOUSE +HIDDEN3D_QUADTREE > +DATASTRINGS +HISTOGRAMS +OBJECTS +STRINGVARS +MACROS +IMAGE Sorry, I can't help you beyond this. It looks to me that there is nothing wrong with your gnuplot, and the problem must lie elsewhere. As a final test, I suggest you copy some well-known *.ttf font into your current directly and test again using that font. For example: $ cp /somewhere/arial.ttf . $ gnuplot gnuplot> set term png enhanced font "./arial.ttf" gnuplot> set title "{/=24 Big Title}" gnuplot> set output "426.png" gnuplot> plot x gnuplot> quit $ display 426.png I just tested that here using an old copy of gnuplot_4.2.6 and it works for me. Ethan > > > > On Thu, Apr 16, 2015 at 6:11 PM, Ethan Merritt <eam...@gm...> wrote: > > > On Thu, Apr 16, 2015 at 3:05 PM, Jon <dev...@gm...> wrote: > > > could you please give me your configure file relevant to gnuplot? > > > > > > What I am using are copied from online as > > > > > > export GDFONTPATH=/usr/share/fonts/liberation > > > export GNUPLOT_DEFAULT_GDFONT=LiberationSans-Regular > > > > > > which does exist under the specific directory but obviously not perfect. > > How > > > to check whether these are compatible with my current version of gnuplot? > > > > > > Thanks, > > > > > > > > > > > > On Thu, Apr 16, 2015 at 4:18 PM, Ethan Merritt <eam...@gm...> > > wrote: > > >> > > >> I do not know why/how your system is [mis]configured so that it does > > >> not find fonts by default, but you can use the environmental variable > > >> GDFONTPATH to give libgd a new list of directories to use for font > > >> lookup. Of course it will only find fonts that are actually present > > >> in those directories. > > > > I don't think the gnuplot version is relevant here. The only thing > > that matters is libgd. > > > > I think that all versions of libgd will accept a font by path and > > filename (as you show in your export commands above). libgd versions > > newer than (I think) 2.0.35 will also accept a font specified by its > > face name, in which case the system fontconfig utility is used to > > search for it. In either case gnuplot just passes through the > > requested font name and size to libgd; it doesn't do any font > > management by itself. > > > > It is in principle possible to have a copy of libgd that doesn't > > support TrueType or OpenType fonts, but I haven't seen such a thing > > since last century. This is tested at the time gnuplot is configured > > and the result is indicated by defining (or not) the symbol > > HAVE_GD_TTF in file config.h. You can also check this from inside > > gnuplot by typing "show version long" and looking for the string > > "+GD_TTF". > > |