GD with FreeType 2.x

pgeluk said:
Same problem...
I saw in your phpinfo that you have it working now.

please let me know how I can fix it

if I do ./configure in the freetype directory:
---
GNU make (>= 3.79.1) or makepp (>= 1.19) is required to build FreeType2.
Please try
`GNUMAKE=<GNU make command name> ./configure'.
or >&2
`GNUMAKE="makepp --norc-substitution" ./configure'.
---


For FreeBSD 6.1
===========


# cd /usr/local/directadmin/customapache/
# wget http://download.savannah.gnu.org/releases/freetype/freetype-2.2.1.tar.gz
# tar zxf freetype-2.2.1.tar.gz
# cd freetype-2.2.1

vi configure
edit change make to gmake

# ./configure
# gmake
# gmake install
# cd ..
# cp build build.orig
# vi build

In function doGD replace:
./configure --with-png=/usr/local --with-jpeg=/usr/local --without-freetype --without-x
by:
./configure --with-png=/usr/local --with-jpeg=/usr/local --without-x --with-freetype=/usr/local/lib

# cp configure.php configure.php.orig
# vi configure.php

replace:
--with-gd \
--with-gd-dir=/usr/local \
by:
--with-gd \
--with-gd-dir=/usr/local/lib \
--with-freetype \
--with-freetype-dir=/usr/local/lib \

# ./build clean
# nice ./build gd
# yes | nice ./build php
# /usr/local/etc/rc.d/httpd restart
 
please note FreeBSD 6.x
-------------------------------

freetype lib need gnu make or gmake

please test gmake from command line
# gmake -v

and check version "GNU Make 3.80"

If gmake not install?

cd /usr/ports/devel/gmake
make
make install
make clean

.....
 
#yes | nice ./build php

for FreeBSD5.x this error


......................

If configure fails try --with-jpeg-dir=<DIR>
configure: error: PNG support requires ZLIB. Use --with-zlib-dir=<DIR>
--with-gettext: not found

*** There was an error while trying to configure php. Check the configure.php file
 
Last edited:
Re: this worked for me

jaumesb said:
combinig the tips from several previous posts, this is what I've done and has worked for me :

# cd /usr/local/directadmin/customapache/
# wget http://download.savannah.gnu.org/releases/freetype/freetype-2.2.1.tar.gz
# tar zxf freetype-2.2.1.tar.gz
# cd freetype-2.2.1
# ./configure
# make
# make install
# cd ..
# cp build build.orig
# vi build

In function doGD replace:
./configure --with-png=/usr/local --with-jpeg=/usr/local --without-freetype --without-x
by:
./configure --with-png=/usr/local --with-jpeg=/usr/local --without-x --with-freetype=/usr/local/lib

# cp configure.php configure.php.orig
# vi configure.php

replace:
--with-gd \
--with-gd-dir=/usr/local \
by:
--with-gd \
--with-gd-dir=/usr/local/lib \
--with-freetype \
--with-freetype-dir=/usr/local/lib \

# ./build clean
# nice ./build gd
# yes | nice ./build php
# service httpd restart

This HowTo works on CentOs 4. I do have an addition....

# mkdir /usr/X11R6/lib/X11/fonts/truetype

copy required ttf files from windows to /usr/X11R6/lib/X11/fonts/truetype

Your users can now use the fonts you provided in their GD pictures/graphs.
 
Onno,

I wish this didn't confuse me as much as it does :) .

I'm not sure what you mean by
Your users can now use the fonts you provided in their GD pictures/graphs.
Do you mean in images they create on the fly?

Thanks.

Jeff
 
bigboy said:
#yes | nice ./build php

for FreeBSD5.x this error


......................

If configure fails try --with-jpeg-dir=<DIR>
configure: error: PNG support requires ZLIB. Use --with-zlib-dir=<DIR>
--with-gettext: not found

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

Hello,

I am getting this same error on CentOS 4.4 - I too have followed each step in this thred and am getting most of the same errors reported by others - with the exception that I am never logged out.

I do need this for one of my hosting accounts that needs freetype support in GD and they are bugging me to get this solved.

Anyone have any further ideas? I am downloading the 236meg AVI file someone posted in this thread and will take a look at it for any ideas.

Just wondering why freetype is exclluded in the build in the first place?
 
./build clean
and
./build php y

Did it for me. Thanks for all the help :)
 
I am trying to get freetype installed too on centos 4.3 I followed everything in this thread including the post above this, I am getting disconnected when the build is going on.

/bin/sh /usr/local/directadmin/customapache/php-4.4.4/libtool --silent --preserv e-dup-deps --mode=compile gcc -Imain/ -I/usr/local/directadmin/customapache/php -4.4.4/main/ -DPHP_ATOM_INC -I/usr/local/directadmin/customapache/php-4.4.4/incl ude -I/usr/local/directadmin/customapache/php-4.4.4/main -I/usr/local/directadmi n/customapache/php-4.4.4 -I/usr/local/include -I/usr/local/include/freetype2 -I/ usr/local/directadmin/customapache/php-4.4.4/ext/mbstring/mbregex -I/usr/local/d irectadmin/customapache/php-4.4.4/ext/mbstring/libmbfl -I/usr/local/directadmin/ customapache/php-4.4.4/ext/mbstring/libmbfl/mbfl -I/usr/include/mysql -I/usr/loc al/directadmin/customapache/php-4.4.4/ext/xml/expat -I/usr/local/directadmin/cus tomapache/php-4.4.4/TSRM -I/usr/local/directadmin/customapache/php-4.4.4/Zend -g -O2 -prefer-non-pic -c main/internal_functions.c -o main/internal_functions .lo

Every time I am getting disconnected when build reaches as in the above quote. Help is appreciated thank you.
 
I don't mind helping you. Shoot me a PM and we can get it going for you :)
 
Personally, I have tried every suggestion posted and still can't get it working on my system :(

Open to any other suggestions. It would really help me to get this working. I have some software running on one of my hosting accounts that needs this for their Captcha system.

Dale
 
Personally, I have tried every suggestion posted and still can't get it working on my system :(

Open to any other suggestions. It would really help me to get this working. I have some software running on one of my hosting accounts that needs this for their Captcha system.

Dale

Same here, any help?
 
finaly after 2 day's of working on this i found the solution

edit the build script with your editor (like pico)

pico build
then look at this part
Code:
doGD() {

        cd $CWD;
        FILE=${CWD}/gd-${GD_VER}.tar.gz
        checkFile $FILE
        echo "Extracting ...";
        tar xzf $FILE
        echo "Done.";
        cd gd-${GD_VER}
        echo "Configuring gd-${GD_VER}...";

        ./configure --with-png=/usr/local --with-jpeg=/usr/local --without-freetype --without-x

just change --without-freetype to --with-freetype
then do
./build clean
./build gd
./build php
service http restart
and now it sould work
 
Hello,

I'am trying to install freetype on a server with FC5, directadmin.

I have followed the instructions from:

http://www.directadmin.com/forum/showthread.php?t=4205&page=2

When doing ./build php I got the following error:

If configure fails try --with-jpeg-dir=<DIR>
configure: error: PNG support requires ZLIB. Use --with-zlib-dir=<DIR>
/usr/local/directadmin/customapache/configure.php: line 11: --with-gettext: command not found

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

Somebody knows whats going wrong?

Thanks!

Jinyoki
 
Hello

I have just done the install of freetype with the new custumbuild of directadmin.
The install of freetype is exactly the same, but the configure.php file is not in the same place.

If you are using php5, the configure.php is in : configure/ap2/configure.php5
(ap2 for apache2, so f you have apache 1, choose ap1)

(im on a fedora core6)
Sky
 
Hi,

I have a really strange problem. In the user registration the captcha image shows, but it doens't display any fonts?

Check it here. That's just one example, it isnt working on more sites.

Here is my php_info, which looks ok to me?

Does anyone know what's wrong here?
 
Hi,

I have a really strange problem. In the user registration the captcha image shows, but it doens't display any fonts?

Check it here. That's just one example, it isnt working on more sites.

Here is my php_info, which looks ok to me?

Does anyone know what's wrong here?

Could be any of 3 things:
1) Permissions (777)
2) Has the font file (.ttf) been uploaded and
3) Has GD been compiled with TrueType fonts?

Cheers
 
Could be any of 3 things:
1) Permissions (777)
2) Has the font file (.ttf) been uploaded and
3) Has GD been compiled with TrueType fonts?

Cheers

1) Permissions are 777
2) Yes, the fonts are in place
3) Yes, as you can see in the php_info link.

I've been searching for 2 days now, but I can't find the solution to this problem.
 
Back
Top