|
From: <pl...@pi...> - 2011-04-12 12:28:49
|
Hi, I just tried outputting to png terminal and it failed to find a scalable font. I have not found out why yet, but I don't recall this error last time I did this a few months back. gnuplot> load "foo.gnu Could not find/open font when opening font "arial", using internal non-scalable font However, the result of this is text misplacement. set xtics out nomirror rotate by -45 Now it seems that 45-rotation is not possible with whatever font it substituted but what it did output was the tick label going straight upwards from the origin (close to the tick mark) where the rotated text would have started. There seem to be two problems here. 1/ rotate -45 should slope down to the right. Here it IS rotated but +90 , no rotation or -90 would be a better fall-back. 2/ if it does rotate up the origin is totally wrong (ie not recalculated for the actual rotation) and dumps all over the plot area. My guess from the behaviour is that the actual rotation is a bug rather than a fall-back , or at least a buggy fall-back. This was running std release version 4.2.2 regards. Peter. |
|
From: Ethan M. <merritt@u.washington.edu> - 2011-04-12 17:03:56
|
On Tuesday, April 12, 2011 01:28:26 am pl...@pi... wrote: > Hi, > > I just tried outputting to png terminal and it failed to find a scalable > font. I have not found out why yet, but I don't recall this error last > time I did this a few months back. Sounds like a problem with libgd. Check your environmental variable GDFONTPATH. > gnuplot> load "foo.gnu > Could not find/open font when opening font "arial", using internal > non-scalable font > > > However, the result of this is text misplacement. > > set xtics out nomirror rotate by -45 > > Now it seems that 45-rotation is not possible with whatever font it > substituted but what it did output was the tick label going straight > upwards from the origin (close to the tick mark) where the rotated text > would have started. > > There seem to be two problems here. > > 1/ rotate -45 should slope down to the right. Here it IS rotated but +90 > , no rotation or -90 would be a better fall-back. > > 2/ if it does rotate up the origin is totally wrong (ie not recalculated > for the actual rotation) and dumps all over the plot area. > > > My guess from the behaviour is that the actual rotation is a bug rather > than a fall-back , or at least a buggy fall-back. The fonts internal to libgd are non-rotatable, although the orientation of the pixel array can be transposed to give +/- 90 degree orientation. Given that rotatable fonts (ttf, otf, pfa, etc) are ubiquitous these days, I don't think it's worth much effort trying to figure out which emergency fallback orientation of a non-rotatable font is least wrong. > This was running std release version 4.2.2 If that's not a typo for 4.4.2, you're talking about a ~5 year old version. No further releases in the 4.2 series are likely to happen, so bug reports should be made against 4.4 or 4.5. Ethan > > regards. Peter. > > ------------------------------------------------------------------------------ > Forrester Wave Report - Recovery time is now measured in hours and minutes > not days. Key insights are discussed in the 2010 Forrester Wave Report as > part of an in-depth evaluation of disaster recovery service providers. > Forrester found the best-in-class provider in terms of services and vision. > Read this report now! http://p.sf.net/sfu/ibm-webcastpromo > _______________________________________________ > gnuplot-beta mailing list > gnu...@li... > https://lists.sourceforge.net/lists/listinfo/gnuplot-beta > -- Ethan A Merritt Biomolecular Structure Center, K-428 Health Sciences Bldg University of Washington, Seattle 98195-7742 |
|
From: <pl...@pi...> - 2011-04-12 18:06:45
|
On 04/12/11 19:02, Ethan Merritt wrote: > On Tuesday, April 12, 2011 01:28:26 am pl...@pi... wrote: >> Hi, >> >> I just tried outputting to png terminal and it failed to find a scalable >> font. I have not found out why yet, but I don't recall this error last >> time I did this a few months back. > > Sounds like a problem with libgd. > Check your environmental variable GDFONTPATH. Correct , that is not set but apparently that was not needed a month or so ago. My Xorg.0.log shows this, so clearly the fonts are available. [ 1665.111] (**) FontPath set to: /usr/share/fonts/corefonts, /usr/share/fonts/100dpi:unscaled, /usr/share/fonts/75dpi:unscaled, /usr/share/fonts/TTF, ls /usr/share/fonts/corefonts/arial* -l -rw-r--r-- 1 root root 286620 Jun 29 2010 /usr/share/fonts/corefonts/arialbd.ttf -rw-r--r-- 1 root root 224692 Jun 29 2010 /usr/share/fonts/corefonts/arialbi.ttf -rw-r--r-- 1 root root 206132 Jun 29 2010 /usr/share/fonts/corefonts/ariali.ttf -rw-r--r-- 1 root root 275572 Jun 29 2010 /usr/share/fonts/corefonts/arial.ttf So is this a change in xorg, gdlib or the way I'm using gnuplot? Exporting GDFONTPATH fixed it but I don't quite see why it is now necessary to clutter my env even further . > >> gnuplot> load "foo.gnu >> Could not find/open font when opening font "arial", using internal >> non-scalable font >> >> >> However, the result of this is text misplacement. >> >> set xtics out nomirror rotate by -45 >> >> Now it seems that 45-rotation is not possible with whatever font it >> substituted but what it did output was the tick label going straight >> upwards from the origin (close to the tick mark) where the rotated text >> would have started. >> >> There seem to be two problems here. >> >> 1/ rotate -45 should slope down to the right. Here it IS rotated but +90 >> , no rotation or -90 would be a better fall-back. >> >> 2/ if it does rotate up the origin is totally wrong (ie not recalculated >> for the actual rotation) and dumps all over the plot area. >> >> >> My guess from the behaviour is that the actual rotation is a bug rather >> than a fall-back , or at least a buggy fall-back. > > The fonts internal to libgd are non-rotatable, although the orientation of > the pixel array can be transposed to give +/- 90 degree orientation. > Given that rotatable fonts (ttf, otf, pfa, etc) are ubiquitous these days, > I don't think it's worth much effort trying to figure out which emergency > fallback orientation of a non-rotatable font is least wrong. > >> This was running std release version 4.2.2 > > If that's not a typo for 4.4.2, you're talking about a ~5 year old version. > No further releases in the 4.2 series are likely to happen, > so bug reports should be made against 4.4 or 4.5. Yes , dyslexia rules, K.O !! regards. Peter. > > Ethan > > >> >> regards. Peter. >> |
|
From: Ethan A M. <sf...@us...> - 2011-04-12 18:32:23
|
On Tuesday, April 12, 2011 11:06:31 am pl...@pi... wrote:
> On 04/12/11 19:02, Ethan Merritt wrote:
> > On Tuesday, April 12, 2011 01:28:26 am pl...@pi... wrote:
> >> Hi,
> >>
> >> I just tried outputting to png terminal and it failed to find a scalable
> >> font. I have not found out why yet, but I don't recall this error last
> >> time I did this a few months back.
> >
> > Sounds like a problem with libgd.
> > Check your environmental variable GDFONTPATH.
>
> Correct , that is not set but apparently that was not needed a month or
> so ago.
>
> My Xorg.0.log shows this, so clearly the fonts are available.
No. That's a misunderstanding.
libgd doesn't use X11 for anything. It works perfectly well
on a machine with no X font server at all (e.g. Windows).
So the settings in Xorg are not relevant.
> So is this a change in xorg, gdlib or the way I'm using gnuplot?
>
> Exporting GDFONTPATH fixed it but I don't quite see why it is now
> necessary to clutter my env even further .
In versions of libgd through (I think) 2.0.34, the environmental variable
was the only way to control font paths. In 2.0.35 there is a second mechanism
possible, using the fontconfig utility. Shige Takeno added a fallback mechanism
to gnuplot in Sep 2010 such that if no font is found using GDFONTPATH then
it makes a second try using fontconfig. But it's hard to see how that would
explain your case. In principle the difference should be that the new method
has two chances to get it right, whereas before it only had one chance.
Caveat: It's slightly more complicated than that due to a bug in the
released version of libgd 2.0.35/36. If you want to try recompiling libgd,
the patch is here:
--- gd-2.0.36/gdft.c 2008-03-09 16:05:52.000000000 -0700
+++ gd-2.0.36-mod/gdft.c 2009-05-20 20:22:13.000000000 -0700
@@ -1661,7 +1661,7 @@ static char * font_path(char **fontpath,
BGD_DECLARE(int) gdFTUseFontConfig(int flag)
{
#ifdef HAVE_LIBFONTCONFIG
- fontConfigFlag = 1;
+ fontConfigFlag = flag;
return 1;
#else
return 0;
If your copy of libgd came via a linux distribution, it is possible that this
patch has already been applied. It's been circulating for a couple of years.
But really the "normal" way of setting a font path for libgd is GDFONTPATH or,
if you have a development version of libgd (2.0.36+ or 2.1.0) then your can
alternatively use fontconfig.
Ethan
>
> >
> >> gnuplot> load "foo.gnu
> >> Could not find/open font when opening font "arial", using internal
> >> non-scalable font
> >>
> >>
> >> However, the result of this is text misplacement.
> >>
> >> set xtics out nomirror rotate by -45
> >>
> >> Now it seems that 45-rotation is not possible with whatever font it
> >> substituted but what it did output was the tick label going straight
> >> upwards from the origin (close to the tick mark) where the rotated text
> >> would have started.
> >>
> >> There seem to be two problems here.
> >>
> >> 1/ rotate -45 should slope down to the right. Here it IS rotated but +90
> >> , no rotation or -90 would be a better fall-back.
> >>
> >> 2/ if it does rotate up the origin is totally wrong (ie not recalculated
> >> for the actual rotation) and dumps all over the plot area.
> >>
> >>
> >> My guess from the behaviour is that the actual rotation is a bug rather
> >> than a fall-back , or at least a buggy fall-back.
> >
> > The fonts internal to libgd are non-rotatable, although the orientation of
> > the pixel array can be transposed to give +/- 90 degree orientation.
> > Given that rotatable fonts (ttf, otf, pfa, etc) are ubiquitous these days,
> > I don't think it's worth much effort trying to figure out which emergency
> > fallback orientation of a non-rotatable font is least wrong.
> >
> >> This was running std release version 4.2.2
> >
> > If that's not a typo for 4.4.2, you're talking about a ~5 year old version.
> > No further releases in the 4.2 series are likely to happen,
> > so bug reports should be made against 4.4 or 4.5.
>
> Yes , dyslexia rules, K.O !!
>
> regards. Peter.
>
> >
> > Ethan
> >
> >
> >>
> >> regards. Peter.
> >>
>
>
|
|
From: <pl...@pi...> - 2011-04-13 07:54:48
|
On 04/12/11 20:29, Ethan A Merritt wrote:
> On Tuesday, April 12, 2011 11:06:31 am pl...@pi... wrote:
>> On 04/12/11 19:02, Ethan Merritt wrote:
>>> On Tuesday, April 12, 2011 01:28:26 am pl...@pi... wrote:
>>>> Hi,
>>>>
>>>> I just tried outputting to png terminal and it failed to find a scalable
>>>> font. I have not found out why yet, but I don't recall this error last
>>>> time I did this a few months back.
>>>
>>> Sounds like a problem with libgd.
>>> Check your environmental variable GDFONTPATH.
>>
>> Correct , that is not set but apparently that was not needed a month or
>> so ago.
>>
>> My Xorg.0.log shows this, so clearly the fonts are available.
>
> No. That's a misunderstanding.
> libgd doesn't use X11 for anything. It works perfectly well
> on a machine with no X font server at all (e.g. Windows).
> So the settings in Xorg are not relevant.
>
>> So is this a change in xorg, gdlib or the way I'm using gnuplot?
>>
>> Exporting GDFONTPATH fixed it but I don't quite see why it is now
>> necessary to clutter my env even further .
>
> In versions of libgd through (I think) 2.0.34, the environmental variable
> was the only way to control font paths. In 2.0.35 there is a second mechanism
> possible, using the fontconfig utility. Shige Takeno added a fallback mechanism
> to gnuplot in Sep 2010 such that if no font is found using GDFONTPATH then
> it makes a second try using fontconfig. But it's hard to see how that would
> explain your case. In principle the difference should be that the new method
> has two chances to get it right, whereas before it only had one chance.
>
> Caveat: It's slightly more complicated than that due to a bug in the
> released version of libgd 2.0.35/36. If you want to try recompiling libgd,
> the patch is here:
> --- gd-2.0.36/gdft.c 2008-03-09 16:05:52.000000000 -0700
> +++ gd-2.0.36-mod/gdft.c 2009-05-20 20:22:13.000000000 -0700
> @@ -1661,7 +1661,7 @@ static char * font_path(char **fontpath,
> BGD_DECLARE(int) gdFTUseFontConfig(int flag)
> {
> #ifdef HAVE_LIBFONTCONFIG
> - fontConfigFlag = 1;
> + fontConfigFlag = flag;
> return 1;
> #else
> return 0;
>
> If your copy of libgd came via a linux distribution, it is possible that this
> patch has already been applied. It's been circulating for a couple of years.
>
> But really the "normal" way of setting a font path for libgd is GDFONTPATH or,
> if you have a development version of libgd (2.0.36+ or 2.1.0) then your can
> alternatively use fontconfig.
>
> Ethan
>
>
>
>
>
>
>
>>
>>>
>>>> gnuplot> load "foo.gnu
>>>> Could not find/open font when opening font "arial", using internal
>>>> non-scalable font
>>>>
>>>>
>>>> However, the result of this is text misplacement.
>>>>
>>>> set xtics out nomirror rotate by -45
>>>>
>>>> Now it seems that 45-rotation is not possible with whatever font it
>>>> substituted but what it did output was the tick label going straight
>>>> upwards from the origin (close to the tick mark) where the rotated text
>>>> would have started.
>>>>
>>>> There seem to be two problems here.
>>>>
>>>> 1/ rotate -45 should slope down to the right. Here it IS rotated but +90
>>>> , no rotation or -90 would be a better fall-back.
>>>>
>>>> 2/ if it does rotate up the origin is totally wrong (ie not recalculated
>>>> for the actual rotation) and dumps all over the plot area.
>>>>
>>>>
>>>> My guess from the behaviour is that the actual rotation is a bug rather
>>>> than a fall-back , or at least a buggy fall-back.
>>>
>>> The fonts internal to libgd are non-rotatable, although the orientation of
>>> the pixel array can be transposed to give +/- 90 degree orientation.
>>> Given that rotatable fonts (ttf, otf, pfa, etc) are ubiquitous these days,
>>> I don't think it's worth much effort trying to figure out which emergency
>>> fallback orientation of a non-rotatable font is least wrong.
>>>
>>>> This was running std release version 4.2.2
>>>
>>> If that's not a typo for 4.4.2, you're talking about a ~5 year old version.
>>> No further releases in the 4.2 series are likely to happen,
>>> so bug reports should be made against 4.4 or 4.5.
>>
>> Yes , dyslexia rules, K.O !!
>>
>> regards. Peter.
>>
>>>
>>> Ethan
>>>
>>>
>>>>
>>>> regards. Peter.
>>>>
>>
>>
>
>
Hi Ethan,
Thanks for sharing your deep understanding of all this and providing the
patch.
Gentoo devs have been very responsive and that patch is already in thier
ebuild system. (By default it is configured with the fontconfig option )
*however*, even after a full reboot, if I unset GDFONTPATH I still get
the font fallback just as before.
:?
|
|
From: Ethan A M. <sf...@us...> - 2011-04-13 16:00:00
|
pl...@pi... wrote > > Hi Ethan, > > Thanks for sharing your deep understanding of all this and providing the > patch. > > Gentoo devs have been very responsive and that patch is already in thier > ebuild system. (By default it is configured with the fontconfig option ) > > *however*, even after a full reboot, if I unset GDFONTPATH I still get > the font fallback just as before. I don't know whether the configuration layout is the same on Gentoo, but on my systems the key thing in order for fontconfig to work is to create and customize this file: [1] cat /etc/fonts/local.conf <!DOCTYPE fontconfig SYSTEM "fonts.dtd"> <fontconfig> <dir>/home/local/share/ttfonts</dir> </fontconfig> cheers, Ethan |