php-developer-list | 2001041
Date: 04/13/01
- Next message: php-bugrep <email protected>: "[PHP-DEV] PHP 4.0 Bug #10322 Updated: Logical error in fopen-wrappers.c"
- Previous message: php-bugrep <email protected>: "[PHP-DEV] Bug #10322: Logical error in fopen-wrappers.c"
- In reply to: Brian Moon: "Re: [PHP-DEV] GD 2.0.1 and FreeType 2"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 2001-04-13 20:59:21, "Brian Moon" <brian <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: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: php-bugrep <email protected>: "[PHP-DEV] PHP 4.0 Bug #10322 Updated: Logical error in fopen-wrappers.c"
- Previous message: php-bugrep <email protected>: "[PHP-DEV] Bug #10322: Logical error in fopen-wrappers.c"
- In reply to: Brian Moon: "Re: [PHP-DEV] GD 2.0.1 and FreeType 2"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

