iliaa           Sun Jan  5 19:47:41 2003 EDT

  Modified files:              
    /php4/ext/gd/libgd  gd.h gdft.c 
  Log:
  Fixed bug #21445.
  
  
Index: php4/ext/gd/libgd/gd.h
diff -u php4/ext/gd/libgd/gd.h:1.12 php4/ext/gd/libgd/gd.h:1.13
--- php4/ext/gd/libgd/gd.h:1.12 Wed Dec 11 15:47:26 2002
+++ php4/ext/gd/libgd/gd.h      Sun Jan  5 19:47:40 2003
@@ -7,11 +7,11 @@
 
 #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 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
 /* default fontpath for windows systems */
-#define DEFAULT_FONTPATH "c:\\winnt\\fonts"
+#define DEFAULT_FONTPATH "c:\\winnt\\fonts;."
 #define PATHSEPARATOR ";"
 #endif
 
Index: php4/ext/gd/libgd/gdft.c
diff -u php4/ext/gd/libgd/gdft.c:1.17 php4/ext/gd/libgd/gdft.c:1.18
--- php4/ext/gd/libgd/gdft.c:1.17       Thu Nov 28 20:44:19 2002
+++ php4/ext/gd/libgd/gdft.c    Sun Jan  5 19:47:40 2003
@@ -398,6 +398,11 @@
                        }
                }
                for (dir = strtok (path, PATHSEPARATOR); dir; dir = strtok (0, 
PATHSEPARATOR)) {
+                       sprintf(fullname, "%s/%s", dir, name);
+                       if (access (fullname, R_OK) == 0) {
+                               font_found++;
+                               break;
+                       }
                        sprintf(fullname, "%s/%s.ttf", dir, 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

Reply via email to