scottmac Mon Apr 23 15:17:47 2007 UTC
Modified files: (Branch: PHP_5_2)
/php-src/ext/gd/libgd gd.h gdft.c
Log:
MFH: 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.26.2.3.2.3&r2=1.26.2.3.2.4&diff_format=u
Index: php-src/ext/gd/libgd/gd.h
diff -u php-src/ext/gd/libgd/gd.h:1.26.2.3.2.3
php-src/ext/gd/libgd/gd.h:1.26.2.3.2.4
--- php-src/ext/gd/libgd/gd.h:1.26.2.3.2.3 Wed Apr 4 00:47:55 2007
+++ php-src/ext/gd/libgd/gd.h Mon Apr 23 15:17:47 2007
@@ -11,14 +11,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 defined(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.36.4.8&r2=1.36.4.9&diff_format=u
Index: php-src/ext/gd/libgd/gdft.c
diff -u php-src/ext/gd/libgd/gdft.c:1.36.4.8
php-src/ext/gd/libgd/gdft.c:1.36.4.9
--- php-src/ext/gd/libgd/gdft.c:1.36.4.8 Wed Apr 4 14:24:03 2007
+++ php-src/ext/gd/libgd/gdft.c Mon Apr 23 15:17:47 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