Hi,

The following in ext/gd/gd.c confuses me.

line 332, in function PHP_MINFO_FUNCTIONS:
#ifdef ENABLE_GD_TTF
    php_info_print_table_row(2, "FreeType Support", "enabled");
#if HAVE_LIBFREETYPE
    php_info_print_table_row(2, "FreeType Linkage", "with freetype");
#elif HAVE_LIBTTF
    php_info_print_table_row(2, "FreeType Linkage", "with TTF library");
#else
    php_info_print_table_row(2, "FreeType Linkage", "with unknown library");
#endif

So: you see 'freetype support enabled'.
Then - line 2654:
/* {{{ proto array imageftbbox(int size, int angle, string font_file, string text[, 
array extrainfo])
   Give the bounding box of a text using fonts via freetype2 */
PHP_FUNCTION(imageftbbox)
{
#if HAVE_LIBGD20 && HAVE_LIBFREETYPE && HAVE_GD_STRINGFTEX
    php_imagettftext_common(INTERNAL_FUNCTION_PARAM_PASSTHRU, TTFTEXT_BBOX, 1);
#else
    php_error(E_WARNING, "%s(): No FreeType 2 support in this PHP build", 
get_active_function_name(TSRMLS_C));
    RETURN_FALSE;
#endif
}
/* }}} */

Why the `&& HAVE_GD_STRINGFTEX' and where does it come from? I'm using gd 2.0.1 and 
there's no `gdImageStringFTEx' in gdft.c. So I guess this is from a later version.

Looking at the name of the function, I guess this is used for the __optional__ 'extra' 
array, so why is this extension:
1) Claiming to support freetype
2) and subsequently disabeling all relevant functions
3) for an optional argument?

This applies to both 4.2.2 and 4.2.3.

Thanx,

Melvyn


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to