From: Daniel Beulshausen Date: Fri, 20 Jul 2001 11:25:13 +0000 (+0000) Subject: fix font handling in vdir mode X-Git-Tag: PRE_TSRM_MERGE_PATCH~65 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=aa032e2e4c43772c19ac534a3cd2cb62b9feba38;p=php fix font handling in vdir mode --- diff --git a/ext/gd/gd.c b/ext/gd/gd.c index 6c6180c129..7850800b42 100644 --- a/ext/gd/gd.c +++ b/ext/gd/gd.c @@ -2754,9 +2754,15 @@ void php_imagettftext_common(INTERNAL_FUNCTION_PARAMETERS, int mode, int extende str = (unsigned char *) Z_STRVAL_PP(C); l = strlen(str); - fontname = (unsigned char *) Z_STRVAL_PP(FONTNAME); - +#ifdef VIRTUAL_DIR + if(virtual_filepath(Z_STRVAL_PP(FONTNAME), &fontname)) { + fontname = (unsigned char*)Z_STRVAL_PP(FONTNAME); + } +#else + fontname = (unsigned char*)Z_STRVAL_PP(FONTNAME); +#endif + #ifdef USE_GD_IMGSTRTTF # if HAVE_LIBFREETYPE