diff options
-rw-r--r-- | ext/gd/gdttf.c | 7 |
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); |