summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Zmievski <andrei@php.net>2000-06-12 19:13:21 +0000
committerAndrei Zmievski <andrei@php.net>2000-06-12 19:13:21 +0000
commit5d514525459ac6fe86d480ca97d6eadcfdd2ce95 (patch)
treea1429979763e21f2533fe3fe4cdedaf03cdad2f6
parent02c42362ffb0f548942f3cb6f45c465520bed8ce (diff)
downloadphp-git-5d514525459ac6fe86d480ca97d6eadcfdd2ce95.tar.gz
Make gdttf.c work with virtual dir support.
-rw-r--r--ext/gd/gdttf.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/ext/gd/gdttf.c b/ext/gd/gdttf.c
index 47f36e653c..044e21c6b2 100644
--- a/ext/gd/gdttf.c
+++ b/ext/gd/gdttf.c
@@ -332,8 +332,15 @@ fontFetch ( char **error, void *key )
short platform, encoding;
a = (font_t *)malloc(sizeof(font_t));
+#ifdef VIRTUAL_DIR
+ if (virtual_filepath(b->fontname, &a->fontname)) {
+ *error = "Could not find/open font";
+ return NULL;
+ }
+#else
a->fontname = (char *)malloc(strlen(b->fontname) + 1);
strcpy(a->fontname,b->fontname);
+#endif
a->ptsize = b->ptsize;
a->angle = b->angle;
a->sin_a = sin(a->angle);