ID: 12065
Updated by: wez
Reported By: [EMAIL PROTECTED]
Old Summary: "libgd was not built with TrueType font support" problem
Old Status: 
Status: Feedback
Bug Type: GD related
Operating System: FreeBSD 4.3
PHP Version: 4.0.6
New Comment:

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.

Previous Comments:
------------------------------------------------------------------------

[2001-07-12 19:35:42] [EMAIL PROTECTED]

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.


------------------------------------------------------------------------

[2001-07-12 18:44:38] [EMAIL PROTECTED]

Try this short program:

#include <stdio.h>
#include <stdlib.h>
#include "gd.h"

int
main (int argc, char **argv)
{
  gdImagePtr im;

  im = gdImageCreate(100,100);
  printf("TTF returns %s\n",
    gdImageStringTTF(im, NULL, 1, "dummy.ttf",
      12, 0, 0, 0, "test"));
  gdImageDestroy (im);
  return 0;
}

Then do:
gcc gdttf.c -lgd -ljpeg -lpng -lfreetype -lm

Try -lttf instead of -lfreetype, depending on which you have installed.

If you still get the "libgd was not built with TrueType font support", then you 
haven't build gd with TrueType font support.

If you get any other error, then something screwy is going on.

--Wez.

------------------------------------------------------------------------

[2001-07-12 18:28:47] [EMAIL PROTECTED]


Are you really, really sure that GD is linked with freetype support??

"By default GD doesn't compile without freetype installed"
That statement is not correct in any of the GD sources that I have seen; you need to 
explicitly enable TTF/Freetype support in the makefiles.

Can you successfully run the GD test programs that work with TTF/Freetype? (if there 
are any).

--Wez.

------------------------------------------------------------------------

[2001-07-12 18:26:50] [EMAIL PROTECTED]

(Please use the web interface to reply!)
User Comment:

Heh, sure...
By default GD doesn't compile without freetype installed.

Today here's what I've tried :

FreeBSD 4.3 :

Apache 1.3.20 + PHP 4.04pl1 + lib GD 1.8.3 + freetype 1.3.1 << doesn't work

Apache 1.3.20 + PHP 4.06 + lib GD 1.8.3 + freetype 1.3.1 << doesn't work

Apache 1.3.20 + PHP 4.06 + lib GD 1.8.4 + freetype 2.0.4 << doesn't work

Apache 1.3.20 + PHP 4.06 + lib GD 2.0.1.beta + freetype 2.0.4 << doesn't work


Linux 2.2 :

Apache 1.3.20 + PHP 4.03pl1 + lib GD 1.8.3 + freetype 1.3.1 << worked

Apache 1.3.20 + PHP 4.06 + lib GD 1.8.4 + freetype 2.0.4 << doesn't work


The only difference in the version that works is PHP is not a dynamic module.

------------------------------------------------------------------------

[2001-07-12 07:39:23] [EMAIL PROTECTED]

That "libgd was not built with TrueType font support" message comes from the GD 
library itself, not PHP.

Did you compile the GD library with TrueType font support?

--Wez.

------------------------------------------------------------------------

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


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to