scottmac Mon Apr 23 15:06:13 2007 UTC
Modified files:
/php-src/ext/gd/libgd gd.h gdft.c
Log:
Fixed bug #40130 (TTF usage doesn't work properly under Netware)
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/libgd/gd.h?r1=1.31&r2=1.32&diff_format=u
Index: php-src/ext/gd/libgd/gd.h
diff -u php-src/ext/gd/libgd/gd.h:1.31 php-src/ext/gd/libgd/gd.h:1.32
--- php-src/ext/gd/libgd/gd.h:1.31 Wed Apr 4 00:44:38 2007
+++ php-src/ext/gd/libgd/gd.h Mon Apr 23 15:06:13 2007
@@ -7,14 +7,18 @@
#include "php_compat.h"
-#ifndef WIN32
-/* default fontpath for unix systems */
-#define DEFAULT_FONTPATH
"/usr/X11R6/lib/X11/fonts/TrueType:/usr/X11R6/lib/X11/fonts/truetype:/usr/X11R6/lib/X11/fonts/TTF:/usr/share/fonts/TrueType:/usr/share/fonts/truetype:/usr/openwin/lib/X11/fonts/TrueType:/usr/X11R6/lib/X11/fonts/Type1:."
-#define PATHSEPARATOR ":"
-#else
+#ifdef NETWARE
+/* default fontpath for netware systems */
+#define DEFAULT_FONTPATH "sys:/java/nwgfx/lib/x11/fonts/ttf;."
+#define PATHSEPARATOR ";"
+#elif WIN32
/* default fontpath for windows systems */
#define DEFAULT_FONTPATH "c:\\winnt\\fonts;c:\\windows\\fonts;."
#define PATHSEPARATOR ";"
+#else
+/* default fontpath for unix systems */
+#define DEFAULT_FONTPATH
"/usr/X11R6/lib/X11/fonts/TrueType:/usr/X11R6/lib/X11/fonts/truetype:/usr/X11R6/lib/X11/fonts/TTF:/usr/share/fonts/TrueType:/usr/share/fonts/truetype:/usr/openwin/lib/X11/fonts/TrueType:/usr/X11R6/lib/X11/fonts/Type1:."
+#define PATHSEPARATOR ":"
#endif
/* gd.h: declarations file for the graphic-draw module.
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/libgd/gdft.c?r1=1.44&r2=1.45&diff_format=u
Index: php-src/ext/gd/libgd/gdft.c
diff -u php-src/ext/gd/libgd/gdft.c:1.44 php-src/ext/gd/libgd/gdft.c:1.45
--- php-src/ext/gd/libgd/gdft.c:1.44 Wed Apr 4 14:26:04 2007
+++ php-src/ext/gd/libgd/gdft.c Mon Apr 23 15:06:13 2007
@@ -377,7 +377,11 @@
path = gdEstrdup (fontsearchpath);
/* if name is an absolute filename then test directly */
+#ifdef NETWARE
+ if (*name == '/' || (name[0] != 0 && strstr(name, ":/"))) {
+#else
if (*name == '/' || (name[0] != 0 && name[1] == ':' && (name[2]
== '/' || name[2] == '\\'))) {
+#endif
snprintf(fullname, sizeof(fullname) - 1, "%s", name);
if (access(fullname, R_OK) == 0) {
font_found++;
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php