summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/gd/gd.c10
1 files 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