From: Andrei Zmievski Date: Mon, 12 Jun 2000 19:13:21 +0000 (+0000) Subject: Make gdttf.c work with virtual dir support. X-Git-Tag: php-4.0.1RC~253 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5d514525459ac6fe86d480ca97d6eadcfdd2ce95;p=php Make gdttf.c work with virtual dir support. --- 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);