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:

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 

For now, I have settled on the following behaviour:

"--with-jpeg-dir" \
"--with-png-dir" \
"--with-freetype-dir" \

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

This is going into CVS as we speak.


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