summaryrefslogtreecommitdiff
path: root/ext/gd/libgd/gdft.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/gd/libgd/gdft.c')
-rw-r--r--ext/gd/libgd/gdft.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/ext/gd/libgd/gdft.c b/ext/gd/libgd/gdft.c
index f0002ba296..acd5ea2bde 100644
--- a/ext/gd/libgd/gdft.c
+++ b/ext/gd/libgd/gdft.c
@@ -80,9 +80,9 @@ gdImageStringFT (gdImage * im, int *brect, int fg, char *fontlist,
/*
* The character (space) used to separate alternate fonts in the
- * fontlist parameter to gdImageStringFT.
+ * fontlist parameter to gdImageStringFT. 2.0.18: space was a oor choice for this.
*/
-#define LISTSEPARATOR " "
+#define LISTSEPARATOR ";"
/*
* DEFAULT_FONTPATH and PATHSEPARATOR are host type dependent and
@@ -434,7 +434,7 @@ static void *fontFetch (char **error, void *key)
encoding = charmap->encoding_id;
/* EAM DEBUG - Newer versions of libfree2 make it easier by defining encodings */
-#ifdef FT_ENCODING_MS_SYMBOL
+#if (defined(FREETYPE_MAJOR) && (FREETYPE_MAJOR >=2 ) && (FREETYPE_MINOR >= 1))
if (charmap->encoding == FT_ENCODING_MS_SYMBOL
|| charmap->encoding == FT_ENCODING_ADOBE_CUSTOM
|| charmap->encoding == FT_ENCODING_ADOBE_STANDARD) {
@@ -443,7 +443,7 @@ static void *fontFetch (char **error, void *key)
a->face->charmap = charmap;
return (void *)a;
}
-#endif /* FT_ENCODING_MS_SYMBOL */
+#endif /* Freetype 2.1 or better */
/* EAM DEBUG */
if ((platform == 3 && encoding == 1) /* Windows Unicode */
@@ -707,6 +707,11 @@ void gdFontCacheShutdown()
}
}
+void gdFreeFontCache()
+{
+ gdFontCacheShutdown();
+}
+
int gdFontCacheSetup(void)
{
if (fontCache) {
@@ -895,7 +900,7 @@ gdImageStringFTEx (gdImage * im, int *brect, int fg, char *fontlist, double ptsi
}
/* EAM DEBUG */
-#ifdef FT_ENCODING_MS_SYMBOL
+#if (defined(FREETYPE_MAJOR) && (FREETYPE_MAJOR >=2 ) && (FREETYPE_MINOR >= 1))
if (font->face->charmap->encoding == FT_ENCODING_MS_SYMBOL) {
/* I do not know the significance of the constant 0xf000.
* It was determined by inspection of the character codes
@@ -905,7 +910,7 @@ gdImageStringFTEx (gdImage * im, int *brect, int fg, char *fontlist, double ptsi
ch |= 0xf000;
next += len;
} else
-#endif /* FT_ENCODING_MS_SYMBOL */
+#endif /* Freetype 2.1 or better */
/* EAM DEBUG */
switch (m) {