From f3b74fe9ac7481ad8b6441a8781424175e5ff8a5 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sat, 20 Nov 2004 13:09:45 +0000 Subject: [PATCH] - Attempt to fix #28598, bug introduced in GD (around php 4.3.4) The way they fix MS Symbol are wrong, multiple faces support hould added later, safer. Please test it with your weird fonts, if it works, MFH will be done. --- ext/gd/libgd/gdft.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ext/gd/libgd/gdft.c b/ext/gd/libgd/gdft.c index 5e74b5757f..a09bdcba6d 100644 --- a/ext/gd/libgd/gdft.c +++ b/ext/gd/libgd/gdft.c @@ -915,10 +915,12 @@ gdImageStringFTEx (gdImage * im, int *brect, int fg, char *fontlist, double ptsi /* EAM DEBUG */ #if (defined(FREETYPE_MAJOR) && ((FREETYPE_MAJOR == 2 && ((FREETYPE_MINOR == 1 && FREETYPE_PATCH >= 3) || FREETYPE_MINOR > 1) || FREETYPE_MAJOR > 2))) - if (font->face->charmap->encoding == FT_ENCODING_MS_SYMBOL) { + if (font->face->charmap->encoding == FT_ENCODING_MS_SYMBOL && strcmp(font->face->family_name, "Symbol") == 0) { /* I do not know the significance of the constant 0xf000. * It was determined by inspection of the character codes * stored in Microsoft font symbol. + * Added by Pierre (pajoye@php.net): + * Convert to the Symbol glyph range only for a Symbol family member */ len = gdTcl_UtfToUniChar (next, &ch); ch |= 0xf000; -- 2.50.1