This forum is no longer active. Please post your questions to our new community site

Forums LAPPStack

lib GD FreeType font support

Subscribe to lib GD FreeType font support 6 post(s), 2 voice(s)

 
Avatar Boletus 3 post(s)

Thanks for your work on the Lapp package…

I am stuck on the following problem using Lappstack-1.1-2.

When I use the PHP imagettfbbox and imagettftext functions with a ttf font file, Apache gives me the following error message: « libgd was not built with FreeType font support »

Nevertheless PHP info suggests that FreeType fonts are supported:

GD support : enabled
GD version : 2.0 or higher
FreeType Support : enabled
FreeType Linkager : With freetype
FreeType Version : 2.3.7

Thanks for any help,

Jean

 
Avatar Beltrán Rueda Administrator 3,714 post(s)

Hi Jean,

Thanks for reporting this issue. I’m searching in the web about this issue and it seems an error of Gd library. Take a look this post. It seems that it is a bug in an older version of Gd. I will open an issue to investigate it. Any suggestion will be appreciated. Thanks.

 
Avatar Boletus 3 post(s)

Hi,

This time I tested the PHP imagettfbbox and imagettftext functions to create a png picture with a .ttf font file on wappstack 1.1-1 2009-01-28 running on XP 32.

It worked perfectly!

PHP info gives

GD support: enabled
GD version: bundled (2.0.42 compatible)
FreeType Support: enabled
FreeTypelinkage: with freetype
FreeTypeVersion: 2.1.9

T1lib and XBMlib are enabled on wapp, but this should not make a difference since I made a png picture.

Maybe there is an incompatibility between the Freetype and GD versions used on lappstack?

Salutations,

Jean

 
Avatar Beltrán Rueda Administrator 3,714 post(s)

Thanks for the info, we are looking into it.

 
Avatar Boletus 3 post(s)

I think I found the cause of the problem.

On Lappstack-1.1-2 (that has the GD library enabled) PHP can generate images with simple text but not with functions such as imagettftext. This make it for example impossible to generate captchas with rotated characters.

I installed Lapp on Debian Using the “apt-get” procedures and I ran exactly in the same problem.
This is happening because they are two versions of GD libraries: 1) the php team version and 2) the Boutell.Com version.
The first permits functions involving image rotations such as imagettftex and the second doesn’t. Therefore PHP should be compiled with the PHP bundled gd library (from the PHP team). I recompiled my php5 gd package following exactly the instructions given in this link and imagettftext worked perfectly.

Therefore I believe that Lappstack-1.1-2 has no bug but has likely been compiled with a gd library that doesn’t allow all the functions. I don’t know all the advantages and inconvenients of the different gd libraries, but characters rotations is very useful for generating captchas. I would suggest to compile Lappstack-1.1-2 using the same gd library as for wappstack.

Salutations,

Jean

 
Avatar Beltrán Rueda Administrator 3,714 post(s)

Hi,

You are right, I have took a look to the links and it seems a compilation error. We will try to fix for the new version. Thanks for the information.

Cheers.

Forums LAPPStack