diff options
| author | foobar <sniper@php.net> | 2002-09-03 13:09:29 +0000 |
|---|---|---|
| committer | foobar <sniper@php.net> | 2002-09-03 13:09:29 +0000 |
| commit | cc7433870cb5e5a4ecb7d26a6e6c44910b34b504 (patch) | |
| tree | 3eae9e60a70f2c2374cf6d1f99afe874c633756f | |
| parent | 0151cb75cfec2bf831680bb46fe2f4b2874a1353 (diff) | |
| download | php-git-cc7433870cb5e5a4ecb7d26a6e6c44910b34b504.tar.gz | |
Patch by Melvyn to make ttf/ft string functions work again.
| -rw-r--r-- | ext/gd/gd.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/ext/gd/gd.c b/ext/gd/gd.c index f150ce8471..57e238708b 100644 --- a/ext/gd/gd.c +++ b/ext/gd/gd.c @@ -2655,8 +2655,12 @@ PHP_FUNCTION(imagesy) Give the bounding box of a text using fonts via freetype2 */ PHP_FUNCTION(imageftbbox) { -#if HAVE_LIBGD20 && HAVE_LIBFREETYPE && HAVE_GD_STRINGFTEX +#if HAVE_LIBGD20 && HAVE_LIBFREETYPE +# if HAVE_GD_STRINGFTEX php_imagettftext_common(INTERNAL_FUNCTION_PARAM_PASSTHRU, TTFTEXT_BBOX, 1); +# else + php_imagettftext_common(INTERNAL_FUNCTION_PARAM_PASSTHRU, TTFTEXT_BBOX, 0); +# endif #else php_error(E_WARNING, "%s(): No FreeType 2 support in this PHP build", get_active_function_name(TSRMLS_C)); RETURN_FALSE; @@ -2668,8 +2672,12 @@ PHP_FUNCTION(imageftbbox) Write text to the image using fonts via freetype2 */ PHP_FUNCTION(imagefttext) { -#if HAVE_LIBGD20 && HAVE_LIBFREETYPE && HAVE_GD_STRINGFTEX +#if HAVE_LIBGD20 && HAVE_LIBFREETYPE +# if HAVE_GD_STRINGFTEX php_imagettftext_common(INTERNAL_FUNCTION_PARAM_PASSTHRU, TTFTEXT_DRAW, 1); +# else + php_imagettftext_common(INTERNAL_FUNCTION_PARAM_PASSTHRU, TTFTEXT_DRAW, 0); +# endif #else php_error(E_WARNING, "%s(): No FreeType 2 support in this PHP build", get_active_function_name(TSRMLS_C)); RETURN_FALSE; |
