Commits

Anonymous committed 53b27af

- #30, restores the ability to recognize and handle a font with
Adobe-specific character encoding (Adobe custom)
- Fix proto in index.html

Comments (0)

Files changed (3)

     int flags;			/* Logical OR of gdFTEX_ values */
     double linespacing;		/* fine tune line spacing for '\n' */
     int charmap;		/* TBB: 2.0.12: may be gdFTEX_Unicode,
-				   gdFTEX_Shift_JIS, or gdFTEX_Big5;
+				   gdFTEX_Shift_JIS, gdFTEX_Big5,
+				   or gdFTEX_Adobe_Custom;
 				   when not specified, maps are searched
 				   for in the above order. */
     int hdpi;                   /* if (flags & gdFTEX_RESOLUTION) */
 #define gdFTEX_Unicode 0
 #define gdFTEX_Shift_JIS 1
 #define gdFTEX_Big5 2
+#define gdFTEX_Adobe_Custom 3
 
 BGD_DECLARE(char *) gdImageStringFTEx (gdImage * im, int *brect, int fg, char *fontlist,
 			   double ptsize, double angle, int x, int y,
 	      break;
 	    }
 	}
+      else if (encoding == gdFTEX_Adobe_Custom)
+	{
+	  if (charmap->encoding == FT_ENCODING_ADOBE_CUSTOM)
+	    {
+	      encodingfound++;
+	      break;
+	    }
+	}
       else if (encoding == gdFTEX_Big5)
 	{
 /* renamed sometime after freetype-2.1.4 */
 		}
 	    }
 	    break;
+
+	  case gdFTEX_Adobe_Custom:
+	  default:
+	    next++;
+	    break;
 	  }
 
       /* Convert character code to glyph index */
 <DT><A NAME="gdImageStringFTEx">
 char *gdImageStringFTEx(gdImagePtr im, int *brect,
   int fg, char *fontname, double ptsize, double angle,
-  int x, int y, gdFTStringExtraPtr strex)</A>
+  int x, int y, char *string, gdFTStringExtraPtr strex)</A>
 <STRONG>(FUNCTION)</STRONG>
 <DD>
 <strong>New in 2.0.5,</strong> also found in common third-party versions
 flags |= gdFTEX_CHARMAP;
 </pre>
 And set <code>charmap</code> to the desired value, which can be
-any of gdFTEX_Unicode, gdFTEX_Shift_JIS, or gdFTEX_Big5. If you do not
-specify a preference, Unicode will be tried first. If the preferred
+any of gdFTEX_Unicode, gdFTEX_Shift_JIS, gdFTEX_Big5, or gdFTEX_Adobe_Custom.
+If you do not specify a preference, Unicode will be tried first. If the preferred
 character mapping is not found in the font, other character mappings 
 are attempted.
 <p>