blob: 814ed38e1e9ba0f90926c81d81dd49ad4db11e21 (
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.2.4.orig/src/gdft.c libgd-2.2.4/src/gdft.c
--- libgd-2.2.4.orig/src/gdft.c Wed Jan 18 20:01:19 2017
+++ libgd-2.2.4/src/gdft.c Thu Jan 19 07:20:24 2017
@@ -1683,6 +1683,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;
path = (char *) gdMalloc(sizeof(char) * strlen(fontsearchpath) + 1);
|