Bug #12065 Updated: "libgd was not built with TrueType font support" problem
| From: | rip at undernet dot org | Date: | Mon, 16 Jul 2001 12:24:24 +0000 |
| Subject: | Bug #12065 Updated: "libgd was not built with TrueType font support" problem | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-60091@lists.php.net to get a copy of this message | ||
ID: 12065
User updated by: rip@undernet.org
Reported By: rip@undernet.org
Old Status: Feedback
Status: Closed
Bug Type: GD related
Operating System: FreeBSD 4.3
PHP Version: 4.0.6
Old Assigned To: wez
Assigned To:
New Comment:
Re
I am now using :
Apache 1.3.20
PHP 4.0.6 + the GD patch
freetype2 2.0.3.1
gd 1.8.4.2
It works fine.
Thanks wez.
Previous Comments:
------------------------------------------------------------------------
[2001-07-14 08:59:58] wez@php.net
OK, try either using the latest CVS or changing the following line in ext/gd/gd.c of the PHP
sources:
-# if HAVE_LIBGD20 & HAVE_LIBFREETYPE
+# if HAVE_LIBFREETYPE
(It's line 2761 for me in CVS; if you can't find it, look for gdImageStringTTF; it's
just above it).
I hope that fixes the problem!
--Wez.
------------------------------------------------------------------------
[2001-07-14 08:44:58] wez@php.net
It's a GD 1.8.4 problem:
It has both ttf and freetype support in different files; you built it with freetype support, and PHP
expects it to use TTF functions, which GD reports are not there.
This problem is not present in GD 2.0.1; the TTF functions call the FT functions instead.
I'll work up a patch for this case, so that PHP can try and stay ahead.
--Wez.
------------------------------------------------------------------------
[2001-07-13 13:31:10] rip@undernet.org
Re
No Way...
That's not the case.
And I have the same error on :
2 FreeBSD 4.3 box
1 linux 2.4.6 box
I say when you compile PHP 4.0.4/4.0.5/4.0.6 as a DSO module, truetype font support is screwed...
------------------------------------------------------------------------
[2001-07-13 03:02:32] wez@php.net
The only thing that I can think of is that you have and older version of libgd.so or libgd.a hanging
around that is mistakenly being linked in instead of the one you were expecting, and that configure
found.
Please look around your system to see if that is the case; I would recommend moving the duplicates
to some not in the lib path temporarily while compiling PHP and see if you still have the same
problem.
--Wez.
------------------------------------------------------------------------
[2001-07-12 19:35:42] rip@undernet.org
oops... I had to reply here... sorry.
Re
True, for GD I always have this in the Makefile :
CFLAGS=-O -DHAVE_LIBPNG -DHAVE_LIBJPEG -DHAVE_LIBFREETYPE
LIBS=-lgd -lpng -lz -ljpeg -lfreetype -lm
Can you successfully run the GD test programs that work with TTF/Freetype? (if there are any).
Yes.
I modified gdtestft.c to load the arial font instead of the "times" one by default.
http://www.documents.cyberabuse.org/fttest.png
Another proof of GD having freetype compiled with it is the phpinfo() result :
FreeType Support enabled
FreeType Linkage with freetype
(with freetype 2)
FreeType Support enabled
FreeType Linkage with TTF library
(with freetype 1)
If phpinfo() says it's ok and then the function says it's bugged... then I say something
is wrong.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/?id=12065
Edit this bug report at http://bugs.php.net/?id=12065&edit=1