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

index d626cb165b6fc422fc83a6364f26481c080834a0..74201b7fd4331aa66f0bdc957e0b834d655d9666 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 bc39f09c763c565000e1509aae75139771430adf..c98ce19cc3c9fb8dce9fb1d6aa1c1a8f94c1adf8 100644 (file)
@@ -386,6 +386,12 @@ 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)
            {