Ok, I got latest CVS and tried again with:

./configure --with-apache=/usr/src/apache/apache_1.3.19 \
--with-gd \
--enable-gd-native-ttf \
--with-ttf=no \
--with-freetype-dir \
--with-png-dir=/usr/local \
--with-jpeg-dir=/usr/local \
--with-mysql=/usr \
--enable-debug --enable-track-vars=yes \
--with-zlib --with-bz2=/usr --disable-display-source \
--enable-sockets --with-imap

Everything compiles fine.  However, now I get this when calling
ImageTTFBBox:

<b>Warning</b>:  libgd was not built with TrueType font support

I simply installed gd and FreeType per their instructions with no problems.
Any ideas?

Brian Moon
Phorum Dev Team - Making better forums with PHP
http://phorum.org/
-------------------------------------------------------------------------

----- Original Message -----
From: "Wez Furlong" <[EMAIL PROTECTED]>
To: "Brian Moon" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Friday, April 13, 2001 7:26 PM
Subject: Re: [PHP-DEV] GD 2.0.1 and FreeType 2


On 2001-04-13 20:59:21, "Brian Moon" <[EMAIL PROTECTED]> wrote:
> Ok, first, I had to edit gdttf.c and change:
>
>     #if HAVE_LIBTTF && !defined(USE_GD_IMGSTRTTF)
> to:
>     #if (HAVE_LIBTTF|HAVE_FREETYPE) && !defined(USE_GD_IMGSTRTTF)

OK.  I was using "--enable-gd-native-ttf", so this didn't come up.

> Next I was getting complaints about not finding freetype.h.  I edited the
> configure script and fixed what I guess was a typo:
>
>     FREETYPE2_INC_DIR="$i/include/freetype/freetype2"
> to
>     FREETYPE2_INC_DIR="$i/include/freetype2/freetype"

Yes a typo, although I could have sworn I had written it the correct way
around.

> Then I started getting errors about freetype/config/ftheader.h not
existing.
> So, I hand edited config_vars.mk and added -I/usr/local/include/freetype2.
> It found the file fine then.
> Now I get massive parse errors.
> gdttf.c:74: parse error before `TT_Engine'
> [snip]

Ouch.  This is because gdttf.c assumes freetype 1.x.
A workaround is to use --enable-gd-native-ttf, but beware! the font size is
then measured in points whereas it was previously measured in pixels - the
fonts on your images will get bigger unless you adjust your PHP code.

I'm not sure what to do about this - the native GD routines look nicer
(fonts are smoother).  Is it worth the trouble of updating the PHP
equivalent for GD 2.0 and later?

For now, I have settled on the following behaviour:

./configure
"--with-jpeg-dir" \
"--with-png-dir" \
"--with-freetype-dir" \
"--with-gd"

If freetype2 is found, --with-ttf=no and --enable-gd-native-ttf are assumed.

This is going into CVS as we speak.

--Wez.




-- 
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