]> granicus.if.org Git - php/commitdiff
Make gdttf.c work with virtual dir support.
authorAndrei Zmievski <andrei@php.net>
Mon, 12 Jun 2000 19:13:21 +0000 (19:13 +0000)
committerAndrei Zmievski <andrei@php.net>
Mon, 12 Jun 2000 19:13:21 +0000 (19:13 +0000)
ext/gd/gdttf.c

index 47f36e653c282620759957566e71e26a3c0d44a7..044e21c6b20afaf8b20de637eaf875712f839f57 100644 (file)
@@ -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);