|
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".
> >
|