Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.graphics.apps.gnuplot > #1895 > unrolled thread

help with font error: "Could not find/open font when opening font arial, using internal non-scalable font"

Started byRich Cook <wealthychef@gmail.com>
First post2013-06-17 10:39 -0700
Last post2013-06-18 21:33 -0700
Articles 4 — 2 participants

Back to article view | Back to comp.graphics.apps.gnuplot


Contents

  help with font error:  "Could not find/open font when opening font arial, using internal non-scalable font" Rich Cook <wealthychef@gmail.com> - 2013-06-17 10:39 -0700
    Re: help with font error:  "Could not find/open font when opening font arial, using internal non-scalable font" sfeam <sfeam@users.sourceforge.net> - 2013-06-17 17:05 -0700
      Re: help with font error:  "Could not find/open font when opening font arial, using internal non-scalable font" Rich Cook <wealthychef@gmail.com> - 2013-06-18 20:36 -0700
        Re: help with font error:  "Could not find/open font when opening font arial, using internal non-scalable font" sfeam <sfeam@users.sourceforge.net> - 2013-06-18 21:33 -0700

#1895 — help with font error: "Could not find/open font when opening font arial, using internal non-scalable font"

FromRich Cook <wealthychef@gmail.com>
Date2013-06-17 10:39 -0700
Subjecthelp with font error: "Could not find/open font when opening font arial, using internal non-scalable font"
Message-ID<77710839-9e62-4c5e-a0ab-91fe1a39c7cc@googlegroups.com>
Hello, I have installed gnuplot on our cluster, and am seeing the above message when I try to run the following script.  Can someone please educate me?  :-)  Thanks!

set term png
set output '| display png:-'  # cool trick 
plot sin(x) with lines

Setting the term font does not help: 
set term png font arial 14 size 800,600 

Also, according to https://groups.google.com/forum/?fromgroups#!topic/opentsdb/iVXcPyy5e9I, I should be able to use the liberation fonts, which I have found in usr/share/fonts/liberation

rcook@rzgpu2 (gnuplot): ls /usr/share/fonts/liberation
LiberationMono-Bold.ttf        LiberationSans-Regular.ttf
LiberationMono-BoldItalic.ttf  LiberationSerif-Bold.ttf
LiberationMono-Italic.ttf      LiberationSerif-BoldItalic.ttf
LiberationMono-Regular.ttf     LiberationSerif-Italic.ttf
LiberationSans-Bold.ttf        LiberationSerif-Regular.ttf
LiberationSans-BoldItalic.ttf  fonts.dir
LiberationSans-Italic.ttf      fonts.scale

But when I try setting GDFONTPATH, it still gets the same error: 


rcook@rzgpu2 (gnuplot): export GDFONTPATH=/usr/share/fonts
rcook@rzgpu2 (gnuplot): gnuplot newtest.gnuplot 
Could not find/open font when opening font "arial", using internal non-scalable font

rcook@rzgpu2 (gnuplot): export GDFONTPATH=/usr/share/fonts/liberation
rcook@rzgpu2 (gnuplot): gnuplot newtest.gnuplot 
Could not find/open font when opening font "arial", using internal non-scalable font

[toc] | [next] | [standalone]


#1896

Fromsfeam <sfeam@users.sourceforge.net>
Date2013-06-17 17:05 -0700
Message-ID<kpo7uh$90j$1@dont-email.me>
In reply to#1895
Rich Cook wrote:

> Hello, I have installed gnuplot on our cluster, and am seeing the above
> message when I try to run the following script.  Can someone please
> educate me?  :-)  Thanks!
> 
> set term png
> set output '| display png:-'  # cool trick
> plot sin(x) with lines
> 
> Setting the term font does not help:
> set term png font arial 14 size 800,600

So you are telling libgd to use a font named arial;
it will add (.ttf) when looking for it.  So in order to satisfy this
request you need to have arial.ttf installed somewhere. 
> 
> Also, according to
> https://groups.google.com/forum/?fromgroups#!topic/opentsdb/iVXcPyy5e9I, I
> should be able to use the liberation fonts, which I have found in
> usr/share/fonts/liberation
> 
> rcook@rzgpu2 (gnuplot): ls /usr/share/fonts/liberation
> LiberationMono-Bold.ttf        LiberationSans-Regular.ttf
> LiberationMono-BoldItalic.ttf  LiberationSerif-Bold.ttf
> LiberationMono-Italic.ttf      LiberationSerif-BoldItalic.ttf
> LiberationMono-Regular.ttf     LiberationSerif-Italic.ttf
> LiberationSans-Bold.ttf        LiberationSerif-Regular.ttf
> LiberationSans-BoldItalic.ttf  fonts.dir
> LiberationSans-Italic.ttf      fonts.scale
> 
> But when I try setting GDFONTPATH, it still gets the same error:
> 
> 
> rcook@rzgpu2 (gnuplot): export GDFONTPATH=/usr/share/fonts
> rcook@rzgpu2 (gnuplot): gnuplot newtest.gnuplot
> Could not find/open font when opening font "arial", using internal
> non-scalable font

Well yes. If you want to use the Liberation fonts then say
   set term png font "LiberationSans-Regular"
or probably better, put it in an environmental variable.  E.g.
   setenv GNUPLOT_DEFAULT_GDFONT LiberationSans-Regular

Or if you think people are going to be requesting arial even though
you don't want to install it, how about
   cd /usr/share/fonts/liberation
   ln -s LiberationSans-Regular.ttf arial.ttf


> rcook@rzgpu2 (gnuplot): export GDFONTPATH=/usr/share/fonts/liberation
> rcook@rzgpu2 (gnuplot): gnuplot newtest.gnuplot
> Could not find/open font when opening font "arial", using internal
> non-scalable font

[toc] | [prev] | [next] | [standalone]


#1898

FromRich Cook <wealthychef@gmail.com>
Date2013-06-18 20:36 -0700
Message-ID<8ce29512-dec9-4afd-914a-0a7764c4f454@googlegroups.com>
In reply to#1896
On Monday, June 17, 2013 5:05:14 PM UTC-7, sfeam wrote:
> Rich Cook wrote:
> 
> 
> 
> > Hello, I have installed gnuplot on our cluster, and am seeing the above
> 
> > message when I try to run the following script.  Can someone please
> 
> > educate me?  :-)  Thanks!
> 
> > 
> 
> > set term png
> 
> > set output '| display png:-'  # cool trick
> 
> > plot sin(x) with lines
> 
> > 
> 
> > Setting the term font does not help:
> 
> > set term png font arial 14 size 800,600
> 
> 
> 
> So you are telling libgd to use a font named arial;
> 
> it will add (.ttf) when looking for it.  So in order to satisfy this
> 
> request you need to have arial.ttf installed somewhere. 
> 
> > 
> 
> > Also, according to
> 
> > https://groups.google.com/forum/?fromgroups#!topic/opentsdb/iVXcPyy5e9I, I
> 
> > should be able to use the liberation fonts, which I have found in
> 
> > usr/share/fonts/liberation
> 
> > 
> 
> > rcook@rzgpu2 (gnuplot): ls /usr/share/fonts/liberation
> 
> > LiberationMono-Bold.ttf        LiberationSans-Regular.ttf
> 
> > LiberationMono-BoldItalic.ttf  LiberationSerif-Bold.ttf
> 
> > LiberationMono-Italic.ttf      LiberationSerif-BoldItalic.ttf
> 
> > LiberationMono-Regular.ttf     LiberationSerif-Italic.ttf
> 
> > LiberationSans-Bold.ttf        LiberationSerif-Regular.ttf
> 
> > LiberationSans-BoldItalic.ttf  fonts.dir
> 
> > LiberationSans-Italic.ttf      fonts.scale
> 
> > 
> 
> > But when I try setting GDFONTPATH, it still gets the same error:
> 
> > 
> 
> > 
> 
> > rcook@rzgpu2 (gnuplot): export GDFONTPATH=/usr/share/fonts
> 
> > rcook@rzgpu2 (gnuplot): gnuplot newtest.gnuplot
> 
> > Could not find/open font when opening font "arial", using internal
> 
> > non-scalable font
> 
> 
> 
> Well yes. If you want to use the Liberation fonts then say
> 
>    set term png font "LiberationSans-Regular"
> 
> or probably better, put it in an environmental variable.  E.g.
> 
>    setenv GNUPLOT_DEFAULT_GDFONT LiberationSans-Regular
> 
> 
> 
> Or if you think people are going to be requesting arial even though
> 
> you don't want to install it, how about
> 
>    cd /usr/share/fonts/liberation
> 
>    ln -s LiberationSans-Regular.ttf arial.ttf
> 
> 
> 
> 
> 
> > rcook@rzgpu2 (gnuplot): export GDFONTPATH=/usr/share/fonts/liberation
> 
> > rcook@rzgpu2 (gnuplot): gnuplot newtest.gnuplot
> 
> > Could not find/open font when opening font "arial", using internal
> 
> > non-scalable font

It's not that I want to be able to use arial, it's that I'm getting the above message just by trying to make a simple plot with PNG terminal.  If I use pngcairo, then there is no error message.   If you notice, the first script I posted says nothing about fonts at all. Yet it gives the "cannot find arial" message.  
What is the source of the error? 

[toc] | [prev] | [next] | [standalone]


#1899

Fromsfeam <sfeam@users.sourceforge.net>
Date2013-06-18 21:33 -0700
Message-ID<kprc34$7u9$1@dont-email.me>
In reply to#1898
Rich Cook wrote:

> On Monday, June 17, 2013 5:05:14 PM UTC-7, sfeam wrote:
>> Rich Cook wrote:
>> 
>> 
>> 
>> > Hello, I have installed gnuplot on our cluster, and am seeing the
>> > above
>> 
>> > message when I try to run the following script.  Can someone please
>> 
>> > educate me?  :-)  Thanks!
>> 
>> > 
>> 
>> > set term png
>> 
>> > set output '| display png:-'  # cool trick
>> 
>> > plot sin(x) with lines
>> 
>> > 
>> 
>> > Setting the term font does not help:
>> 
>> > set term png font arial 14 size 800,600
>> 
>> 
>> 
>> So you are telling libgd to use a font named arial;
>> 
>> it will add (.ttf) when looking for it.  So in order to satisfy this
>> 
>> request you need to have arial.ttf installed somewhere.
>> 
>> > 
>> 
>> > Also, according to
>> 
>> > https://groups.google.com/forum/?fromgroups#!topic/opentsdb/iVXcPyy5e9I,
>> > I
>> 
>> > should be able to use the liberation fonts, which I have found in
>> 
>> > usr/share/fonts/liberation
>> 
>> > 
>> 
>> > rcook@rzgpu2 (gnuplot): ls /usr/share/fonts/liberation
>> 
>> > LiberationMono-Bold.ttf        LiberationSans-Regular.ttf
>> 
>> > LiberationMono-BoldItalic.ttf  LiberationSerif-Bold.ttf
>> 
>> > LiberationMono-Italic.ttf      LiberationSerif-BoldItalic.ttf
>> 
>> > LiberationMono-Regular.ttf     LiberationSerif-Italic.ttf
>> 
>> > LiberationSans-Bold.ttf        LiberationSerif-Regular.ttf
>> 
>> > LiberationSans-BoldItalic.ttf  fonts.dir
>> 
>> > LiberationSans-Italic.ttf      fonts.scale
>> 
>> > 
>> 
>> > But when I try setting GDFONTPATH, it still gets the same error:
>> 
>> > 
>> 
>> > 
>> 
>> > rcook@rzgpu2 (gnuplot): export GDFONTPATH=/usr/share/fonts
>> 
>> > rcook@rzgpu2 (gnuplot): gnuplot newtest.gnuplot
>> 
>> > Could not find/open font when opening font "arial", using internal
>> 
>> > non-scalable font
>> 
>> 
>> 
>> Well yes. If you want to use the Liberation fonts then say
>> 
>>    set term png font "LiberationSans-Regular"
>> 
>> or probably better, put it in an environmental variable.  E.g.
>> 
>>    setenv GNUPLOT_DEFAULT_GDFONT LiberationSans-Regular
>> 
>> 
>> 
>> Or if you think people are going to be requesting arial even though
>> 
>> you don't want to install it, how about
>> 
>>    cd /usr/share/fonts/liberation
>> 
>>    ln -s LiberationSans-Regular.ttf arial.ttf
>> 
>> 
>> 
>> 
>> 
>> > rcook@rzgpu2 (gnuplot): export
>> > GDFONTPATH=/usr/share/fonts/liberation
>> 
>> > rcook@rzgpu2 (gnuplot): gnuplot newtest.gnuplot
>> 
>> > Could not find/open font when opening font "arial", using internal
>> 
>> > non-scalable font
> 
> It's not that I want to be able to use arial, it's that I'm getting
> the above message just by trying to make a simple plot with PNG
> terminal.  If I use pngcairo, then there is no error message.   If you
> notice, the first script I posted says nothing about fonts at all. Yet
> it gives the "cannot find arial" message. What is the source of the
> error?

There has to be some default font.  
If you haven't specified a default font on your system, 
the program still has to pick one. Arial is reasonably common,
or was at the time the decision was made, so we picked that one.
  setenv GNUPLOT_DEFAULT_GDFONT LiberationSans-Regular
would bypass this, since it specifies a different default.

As to png (libgd) vs. pngcairo,  those are completely different
support libraries.  Font handling by one has nothing to do with
font handling by the other.  And PostScript is different yet 
again, and svg, and TeX, and so on and so on.    

[toc] | [prev] | [standalone]


Back to top | Article view | comp.graphics.apps.gnuplot


csiph-web