GD with FreeType 2.x

Hello,

To do that, you must compile gd with freetype support.

Do this :

Code:
cd /usr/local/directadmin/customapache/
wget [url]http://ovh.dl.sourceforge.net/sourceforge/freetype/freetype-2.1.9.tar.gz[/url]
tar zxf freetype-2.1.9.tar.gz
cd freetype-2.1.9
./configure
make
make install

Freetype 2.x is now installed on /usr/local/lib directory

Now, modify the build script (./build) for compile GD with FreeType :
In function doGD replace
Code:
./configure --with-png=/usr/local --with-jpeg=/usr/local --without-freetype
by
Code:
./configure --with-png=/usr/local --with-jpeg=/usr/local --with-freetype=/usr/local

Now, build PHP WITH compile of GD (type Y at prompted)

Code:
./build php
and after do
Code:
service httpd restart

That's all.
 
Last edited:
Didn't work for me, any ideas?

Thanks,
Seth
 
Last edited:
Thank you for using PHP.

/usr/local/directadmin/customapache/configure.php: line 7: --with-gd: command not found

*** There was an error while trying to configure php. Check the configure.php file

Is my error via shell.

-Seth
 
./configure \
--with-apxs \
--with-curl \
--with-curl-dir=/usr/local/lib \
--with-gd \
--with-gd-dir=/usr/local/lib \
--with-gettext \
--with-jpeg-dir=/usr/local/lib \
--with-kerberos \
--with-mcrypt \
--with-mhash \
--with-mysql \
--with-pear \
--with-png-dir=/usr/local/lib \
--with-xml \
--with-openssl \
--with-zlib \
--with-zlib-dir=/usr/local/lib \
--with-zip \
--enable-bcmath \
--enable-calendar \
--enable-ftp \
--enable-magic-quotes \
--enable-sockets \
--enable-track-vars
 
This is my file. It run with no error.
Code:
#!/bin/sh
./configure \
	--with-apxs \
	--with-curl \
	--with-curl-dir=/usr/local/lib \
	--with-gd \
	--with-gd-dir=/usr/local/lib \
	--with-gettext \
	--with-jpeg-dir=/usr/local/lib \
	--with-freetype-dir=/usr/local/lib \
	--with-kerberos \
	--with-mcrypt \
	--with-mhash \
	--with-mysql \
	--with-pear \
	--with-pcre \
	--with-png-dir=/usr/local/lib \
	--with-xml \
	--with-zlib \
	--with-zlib-dir=/usr/local/lib \
	--with-zip \
	--enable-bcmath \
	--enable-calendar \
	--enable-ftp \
	--enable-magic-quotes \
	--enable-sockets \
	--enable-track-vars
 
Can I see your php output? For some reason mine will not compile with Freetype
 
I have tried everything I know how to do with no luck.
 
Last edited:
tribal-dolphin said:
Freetype 2.x is now installed on /usr/local/lib directory

Now, modify the build script (./build) for compile GD with FreeType :
In function doGD replace
Code:
./configure --with-png=/usr/local --with-jpeg=/usr/local --without-freetype
by
Code:
./configure --with-png=/usr/local --with-jpeg=/usr/local --with-freetype=/usr/local

Now, build PHP WITH compile of GD (type Y at prompted)

Code:
./build php
and after do
Code:
service httpd restart

That's all. [/B]

Got stuck here. Everything went fine, and I edited the configure.php file so it looks like this :

#!/bin/sh
./configure \
--with-apxs \
--with-curl \
--with-curl-dir=/usr/local/lib \
--with-gd \
--with-gd-dir=/usr/local/lib \
--with-gettext \
--with-jpeg-dir=/usr/local/lib \
--with-freetype-dir=/usr/local/lib \
--with-kerberos \
--with-mcrypt \
--with-mhash \
--with-mysql \
--with-pear \
--with-pcre \
--with-png-dir=/usr/local/lib \
--with-xml \
--with-zlib \
--with-zlib-dir=/usr/local/lib \
--with-zip \
--enable-bcmath \
--enable-calendar \
--enable-ftp \


But when I recompile GD and PHP it still won't show the freetype......

What to do ?

http://www.salesplaza.nl/info.php
 
One more question :

Do I have to add something like --with-gif=/usr/local to get support with .gif ??
 
It still doesn't support the freetype :

'./configure' '--with-apxs' '--with-curl' '--with-curl-dir=/usr/local/lib' '--with-gd' '--with-gd-dir=/usr/local/lib' '--with-gettext' '--with-jpeg-dir=/usr/local/lib' '--with-kerberos' '--with-mcrypt' '--with-mhash' '--with-mysql' '--with-pear' '--with-png-dir=/usr/local/lib' '--with-xml' '--with-zlib' '--with-zlib-dir=/usr/local/lib' '--with-zip' '--with-openssl' '--enable-bcmath' '--enable-calendar' '--enable-ftp' '--enable-magic-quotes' '--enable-sockets' '--enable-track-vars'
 
Ok, but I now rebuild PHP and everything went fine, but still no support for freetype :(
 
Back
Top