From aa032e2e4c43772c19ac534a3cd2cb62b9feba38 Mon Sep 17 00:00:00 2001 From: Daniel Beulshausen Date: Fri, 20 Jul 2001 11:25:13 +0000 Subject: [PATCH] fix font handling in vdir mode --- ext/gd/gd.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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 -- 2.50.1