cvs: php4 /ext/gd/ gdttf.c
| From: | Andrei Zmievski | Date: | Mon, 12 Jun 2000 19:13:21 +0000 |
| Subject: | cvs: php4 /ext/gd/ gdttf.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-195@lists.php.net to get a copy of this message | ||
andrei Mon Jun 12 12:13:21 2000 EDT
Modified files:
/php4/ext/gd gdttf.c
Log:
Make gdttf.c work with virtual dir support.
Index: php4/ext/gd/gdttf.c
diff -u php4/ext/gd/gdttf.c:1.7 php4/ext/gd/gdttf.c:1.8
--- php4/ext/gd/gdttf.c:1.7 Tue Feb 8 14:21:43 2000
+++ php4/ext/gd/gdttf.c Mon Jun 12 12:13:21 2000
@@ -2,7 +2,7 @@
/* */
/* John Ellson ellson@lucent.com */
-/* $Id: gdttf.c,v 1.7 2000/02/08 22:21:43 zeev Exp $ */
+/* $Id: gdttf.c,v 1.8 2000/06/12 19:13:21 andrei Exp $ */
#if WIN32|WINNT
#include "config.w32.h"
@@ -332,8 +332,15 @@
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);