|
From: Tatsuro M. <tma...@ya...> - 2010-03-20 21:37:07
|
Hello
Thank you for your reply.
--- Ethan Merritt wrote:
>What is the exact version of libgd?
I have been using the gd-2.0.36RC1.
> Both are allowed. The 'old' method using the filename of the font
> is tried first. If that fails, then the 'new' fontconfig method is
> used.
> I think it is likely that your gnuplot executable was linked against
> a buggy version of libgd. When the fontconfig code was first added
> to libgd (2.0.36RC1), there was a bug that prevented using both methods
> from the same calling program. That bug was later fixed.
>
> Here is the fix:
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
> --- gd-2.0.36RC1/gdft.c 2007-11-27 00:30:34.000000000 -0800
> +++ gd-fixed/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;
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
I have tried the change of 'gdft.c' proposed by Kakuto in the threads introduced the previous post.
######################
BGD_DECLARE(int) gdFTUseFontConfig(int flag)
{
#ifdef HAVE_LIBFONTCONFIG
if(flag) {
fontConfigFlag = 1;
return 1;
} else {
fontConfigFlag = 0;
return 0;
}
#else
return 0;
#endif /* HAVE_LIBFONTCONFIG */
#####################
The modification the above seems to be logically the same as your patch.
At the previous post I seemed to do mis-confirmation.
I have put cour.ttf to 'C:/usr/tatsu/test/gptest/cour.ttf'
gnuplot> set term png font 'C:/usr/tatsu/test/gptest/cour.ttf'
Terminal type set to 'png'
Options are 'nocrop font C:/usr/tatsu/test/gptest/cour.ttf 12 fontscale 1.0 size 640,480 '
gnuplot> set out 'test.png'
gnuplot> plot sin(x)
gnuplot> set out
The gnuplot with the modified gd successfully gave a graph with courier fonts while the gnuplot-4.4.0
binary gave a graph with arial.
Therefore the modification proposed by Kakuto allow the gd linked with fontconfig to use old syntax.
However I cannot see the below message that you pointed out.
********
Trying to find font "/home/ttfonts/verdana.ttf" using old mechanism succeeded
*********
Anyway I will use your patch if new gd will not be available.
>
> It should be linked against a fixed version of libgd.
> Unfortunately I don't see a fixed version listed for download on
> libgd.org. I am cc'ing libgd maintainer Pierre Joye, who may be
> able to update the version on the site.
>
> Pierre: Isn't it about time that a "final" version of 2.0.36
> is packaged up? The -RC1 is now more than 2 years old!
In related to 'libpng-1.4', I have posted the gd should be modified not to use png_check_sig but to
use png_sig_cmp.
Please see;
http://old.nabble.com/Note-for-building-gd-wiwith-libpng-1.4-to27808790.html
Manfred Schwarb introduced me a tip.tar.gz on
http://bitbucket.org/pierrejoye/gd-libgd-20/get/tip.tar.gz.
However I do not have it in my home computer and it unfortunately could not be used I could not
configure script because of error related the autotool.
I will wait for the reply.
Anyway I will make gnuplot-4.5 (cvs) package for windows prepared with gd 2.0.36RC1+fontconfig with
the patch you have shown and upload it on my web.
For the cygwin, the gd library prepared by the maintainer on the cygwin community. I will report this
topic in the cygwin ML.
Regards
Tatsuro
--------------------------------------
VANCOUVER 2010 PARALYMPIC GAMES News
http://pr.mail.yahoo.co.jp/para/
|