]> granicus.if.org Git - php/commitdiff
Fixed bug #21445.
authorIlia Alshanetsky <iliaa@php.net>
Mon, 6 Jan 2003 00:47:40 +0000 (00:47 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Mon, 6 Jan 2003 00:47:40 +0000 (00:47 +0000)
ext/gd/libgd/gd.h
ext/gd/libgd/gdft.c

index 4cf707863530f3e2a968a5c4fb64ed36629bf63e..b3a5045ac839304ee0e19a21e45be6f8adec9402 100644 (file)
@@ -7,11 +7,11 @@ extern "C" {
 
 #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 746613e438ccceda2c4a74df52328ca46f4863e0..eb6832da0bf5a2e2661436dac55b56ac14640572 100644 (file)
@@ -398,6 +398,11 @@ static void *fontFetch (char **error, void *key)
                        }
                }
                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++;