blob: 70ee7ce5275c18fccff410d4890211a128713ee4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
diff -ur libgd-2.1.0.orig/src/gdft.c libgd-2.1.0/src/gdft.c
--- libgd-2.1.0.orig/src/gdft.c 2013-06-25 11:58:23.000000000 +0200
+++ libgd-2.1.0/src/gdft.c 2013-06-26 13:52:34.000000000 +0200
@@ -1512,6 +1512,16 @@
*/
*fontpath = NULL;
fontsearchpath = getenv ("GDFONTPATH");
+#ifdef _WIN32
+ if (!fontsearchpath) {
+ char *ffptr = getenv ("SYSTEMROOT");
+ if (ffptr) {
+ fontsearchpath = malloc (strlen(ffptr) + strlen("\\fonts") + 1);
+ strcpy(fontsearchpath, ffptr);
+ strcat(fontsearchpath, "\\fonts");
+ }
+ }
+#endif
if (!fontsearchpath)
fontsearchpath = DEFAULT_FONTPATH;
|