diff options
Diffstat (limited to 'Build/source/libs/gd/TLPATCHES/patch-01-win32')
-rw-r--r-- | Build/source/libs/gd/TLPATCHES/patch-01-win32 | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Build/source/libs/gd/TLPATCHES/patch-01-win32 b/Build/source/libs/gd/TLPATCHES/patch-01-win32 new file mode 100644 index 00000000000..814ed38e1e9 --- /dev/null +++ b/Build/source/libs/gd/TLPATCHES/patch-01-win32 @@ -0,0 +1,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); |