Anonymous avatar Anonymous committed e4f172d

- sync to 2.0.32

Comments (0)

Files changed (6)

 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.59 for GD 2.0.31.
+# Generated by GNU Autoconf 2.59 for GD 2.0.32.
 #
 # Report bugs to <gd@boutell.com>.
 #
 # Identity of this package.
 PACKAGE_NAME='GD'
 PACKAGE_TARNAME='gd'
-PACKAGE_VERSION='2.0.31'
-PACKAGE_STRING='GD 2.0.31'
+PACKAGE_VERSION='2.0.32'
+PACKAGE_STRING='GD 2.0.32'
 PACKAGE_BUGREPORT='gd@boutell.com'
 
 ac_unique_file="gd.c"
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures GD 2.0.31 to adapt to many kinds of systems.
+\`configure' configures GD 2.0.32 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of GD 2.0.31:";;
+     short | recursive ) echo "Configuration of GD 2.0.32:";;
    esac
   cat <<\_ACEOF
 
 test -n "$ac_init_help" && exit 0
 if $ac_init_version; then
   cat <<\_ACEOF
-GD configure 2.0.31
+GD configure 2.0.32
 generated by GNU Autoconf 2.59
 
 Copyright (C) 2003 Free Software Foundation, Inc.
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by GD $as_me 2.0.31, which was
+It was created by GD $as_me 2.0.32, which was
 generated by GNU Autoconf 2.59.  Invocation command line was
 
   $ $0 $@
 
 GDLIB_MAJOR=2
 GDLIB_MINOR=0
-GDLIB_REVISION=31
+GDLIB_REVISION=32
 GDLIBNAME=gd
 #Expanded by tests later in this file. TBB 2.0.26
 #2.0.28: GIF is standard now. Doesn't depend on anything else,
 
 # Define the identity of the package.
  PACKAGE='gd'
- VERSION='2.0.31'
+ VERSION='2.0.32'
 
 
 cat >>confdefs.h <<_ACEOF
 } >&5
 cat >&5 <<_CSEOF
 
-This file was extended by GD $as_me 2.0.31, which was
+This file was extended by GD $as_me 2.0.32, which was
 generated by GNU Autoconf 2.59.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
 
 cat >>$CONFIG_STATUS <<_ACEOF
 ac_cs_version="\\
-GD config.status 2.0.31
+GD config.status 2.0.32
 configured by $0, generated by GNU Autoconf 2.59,
   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
 
 AC_PREREQ(2.54)
 
 #HEY! Change BOTH the vesion number and the GDLIB_REVISION setting!
-AC_INIT([GD], [2.0.31], [gd@boutell.com])
+AC_INIT([GD], [2.0.32], [gd@boutell.com])
 AC_CONFIG_SRCDIR([gd.c])
 AC_CONFIG_AUX_DIR(config)
 
 GDLIB_MAJOR=2
 GDLIB_MINOR=0
-GDLIB_REVISION=31
+GDLIB_REVISION=32
 GDLIBNAME=gd
 #Expanded by tests later in this file. TBB 2.0.26
 #2.0.28: GIF is standard now. Doesn't depend on anything else,
       }
       for (i = 0; (i < (ints)); i += 2)
 	{
+#if 0
           int minx = im->polyInts[i];
           int maxx = im->polyInts[i + 1];
+#endif
           /* 2.0.29: back to gdImageLine to prevent segfaults when
             performing a pattern fill */
           gdImageLine (im, im->polyInts[i], y, im->polyInts[i + 1], y,
 } GifScreen;
 #endif
 
+#if 0
 static struct {
        int     transparent;
        int     delayTime;
        int     inputFlag;
        int     disposal;
 } Gif89 = { -1, -1, -1, 0 };
+#endif
 
 static int ReadColorMap (gdIOCtx *fd, int number, unsigned char (*buffer)[256]);
 static int DoExtension (gdIOCtx *fd, int label, int *Transparent, int *ZeroDataBlockP);
 BGD_DECLARE(gdImagePtr) gdImageCreateFromGifCtx(gdIOCtxPtr fd)
 {
        int BitPixel;
+#if 0
        int ColorResolution;
        int Background;
        int AspectRatio;
+#endif
        int Transparent = (-1);
        unsigned char   buf[16];
        unsigned char   c;
 		return 0;
 	}
        BitPixel        = 2<<(buf[4]&0x07);
+#if 0
        ColorResolution = (int) (((buf[4]&0x70)>>3)+1);
        Background      = buf[5];
        AspectRatio     = buf[6];
+#endif
 
        if (BitSet(buf[4], LOCALCOLORMAP)) {    /* Global Colormap */
                if (ReadColorMap(fd, BitPixel, ColorMap)) {
        switch (label) {
        case 0xf9:              /* Graphic Control Extension */
                (void) GetDataBlock(fd, (unsigned char*) buf, ZeroDataBlockP);
+#if 0
                Gif89.disposal    = (buf[0] >> 2) & 0x7;
                Gif89.inputFlag   = (buf[0] >> 1) & 0x1;
                Gif89.delayTime   = LM_to_uint(buf[1],buf[2]);
+#endif
                if ((buf[0] & 0x1) != 0)
                        *Transparent = buf[3];
 
   char *fontpath;
   FT_Library *library;
   FT_Face face;
-  FT_Bool have_char_map_unicode, have_char_map_big5, have_char_map_sjis,
-    have_char_map_apple_roman;
 }
 font_t;
 
 {
   font_t *a;
   fontkey_t *b = (fontkey_t *) key;
-  int n;
-  unsigned short platform, encoding;
   char *suffix;
   FT_Error err;
-  FT_CharMap found = 0;
-  FT_CharMap charmap;
 
   *error = NULL;
 
       return NULL;
     }
 
-/* FIXME - This mapping stuff is imcomplete - where is the spec? */
-/* EAM   - It's worse than that. It's pointless to match character encodings here. */
-/*         As currently written, the stored a->face->charmap only matches one of   */
-/*         the actual charmaps and we cannot know at this stage if it is the right */
-/*         one. We should just skip all this stuff, and check in gdImageStringFTEx */
-/*         if some particular charmap is preferred and if so whether it is held in */
-/*         one of the a->face->charmaps[0..num_charmaps].                          */
-/*         And why is it so bad not to find any recognized charmap?  The user may  */
-/*         still know what mapping to use, even if we do not.  In that case we can */
-/*         just use the map in a->face->charmaps[num_charmaps] and be done with it.*/
-
-  a->have_char_map_unicode = 0;
-  a->have_char_map_big5 = 0;
-  a->have_char_map_sjis = 0;
-  a->have_char_map_apple_roman = 0;
-  for (n = 0; n < a->face->num_charmaps; n++)
-    {
-      charmap = a->face->charmaps[n];
-      platform = charmap->platform_id;
-      encoding = charmap->encoding_id;
-
-/* EAM DEBUG - Newer versions of libfree2 make it easier 
-	by defining encodings */
-/* TBB: get this exactly right: 2.1.3 *or better*, all possible cases. */
-
-#if ((defined(FREETYPE_MAJOR)) && (((FREETYPE_MAJOR == 2) && (((FREETYPE_MINOR == 1) && (FREETYPE_PATCH >= 3)) || (FREETYPE_MINOR > 1))) || (FREETYPE_MAJOR > 2)))
-      if (charmap->encoding == FT_ENCODING_MS_SYMBOL
-         || charmap->encoding == FT_ENCODING_UNICODE
-	  || charmap->encoding == FT_ENCODING_ADOBE_CUSTOM
-	  || charmap->encoding == FT_ENCODING_ADOBE_STANDARD)
-	{
-	  a->have_char_map_unicode = 1;
-	  found = charmap;
-         FT_Set_Charmap(a->face, found);
-	  return (void *) a;
-	}
-#endif /* Freetype 2.1 or better */
-/* EAM DEBUG */
-
-      if ((platform == 3 && encoding == 1)	/* Windows Unicode */
-	  || (platform == 3 && encoding == 0)	/* Windows Symbol */
-	  || (platform == 2 && encoding == 1)	/* ISO Unicode */
-	  || (platform == 0))
-	{			/* Apple Unicode */
-	  a->have_char_map_unicode = 1;
-	  found = charmap;
-	  break;
-	}
-      else if (platform == 3 && encoding == 4)
-	{			/* Windows Big5 */
-	  a->have_char_map_big5 = 1;
-	  found = charmap;
-	  break;
-	}
-      else if (platform == 3 && encoding == 2)
-	{			/* Windows Sjis */
-	  a->have_char_map_sjis = 1;
-	  found = charmap;
-	  break;
-	}
-      else if ((platform == 1 && encoding == 0)	/* Apple Roman */
-	       || (platform == 2 && encoding == 0))
-	{			/* ISO ASCII */
-	  a->have_char_map_apple_roman = 1;
-	  found = charmap;
-	  break;
-	}
-    }
-  if (!found)
-    {
-      *error = "Unable to find a CharMap that I can handle";
-      /* 2.0.12: TBB: free these. Thanks to Frank Faubert. */
-      free (a->fontlist);
-      gdFree (a);
-      return NULL;
-    }
-  /* 2.0.5: we should actually return this */
-  FT_Set_Charmap(a->face, found);
   return (void *) a;
 }
 
   FT_Matrix matrix;
   FT_Vector penf, oldpenf, delta, total_min = {0,0}, total_max = {0,0}, glyph_min, glyph_max;
   FT_Face face;
+  FT_CharMap charmap;
   FT_Glyph image;
   FT_GlyphSlot slot;
   FT_Error err;
   if (fg < 0)
       render_mode |= FT_LOAD_MONOCHROME;
 
-  /* Try all three types of maps, but start with the specified one */
+  /* find requested charmap */
   encodingfound = 0;
-  for (i = 0; (i < 3); i++)
+  for (i = 0; i < face->num_charmaps; i++)
     {
-      switch (encoding)
+      charmap = face->charmaps[i];
+
+#if ((defined(FREETYPE_MAJOR)) && (((FREETYPE_MAJOR == 2) && (((FREETYPE_MINOR == 1) && (FREETYPE_PATCH >= 3)) || (FREETYPE_MINOR > 1))) || (FREETYPE_MAJOR > 2)))
+      if (encoding == gdFTEX_Unicode)
 	{
-	case gdFTEX_Unicode:
-	  if (font->have_char_map_unicode)
+	  if (charmap->encoding == FT_ENCODING_MS_SYMBOL
+	      || charmap->encoding == FT_ENCODING_UNICODE
+	      || charmap->encoding == FT_ENCODING_ADOBE_CUSTOM
+	      || charmap->encoding == FT_ENCODING_ADOBE_STANDARD)
 	    {
-	      encodingfound = 1;
+	      encodingfound++;
+	      break;
 	    }
-	  break;
-	case gdFTEX_Shift_JIS:
-	  if (font->have_char_map_sjis)
+	}
+      else if (encoding == gdFTEX_Big5)
+	{
+	  if (charmap->encoding == FT_ENCODING_BIG5)
 	    {
-	      encodingfound = 1;
+	      encodingfound++;
+	      break;
+	    }
+	}
+      else if (encoding == gdFTEX_Shift_JIS)
+	{
+	  if (charmap->encoding == FT_ENCODING_SJIS)
+	    {
+	      encodingfound++;
+	      break;
+	    }
+	}
+#else
+      if (encoding == gdFTEX_Unicode)
+	{
+	  if ((charmap->platform = 3 && charmap->encoding == 1)     /* Windows Unicode */
+	      || (charmap->platform == 3 && charmap->encoding == 0) /* Windows Symbol */
+	      || (charmap->platform == 2 && charmap->encoding == 1) /* ISO Unicode */
+	      || (charmap->platform == 0))                          /* Apple Unicode */
+	    {
+	      encodingfound++;
+	      break;
 	    }
-	  break;
-	case gdFTEX_Big5:
-	  {
-	    /* This was the 'else' case, we can't really 'detect' it */
-	    encodingfound = 1;
-	  }
-	  break;
 	}
-      if (encodingfound)
+      else if (encoding == gdFTEX_Big5)
 	{
-	  break;
+          if (charmap->platform == 3 && charmap->encoding == 4)     /* Windows Big5 */
+	    {
+	      encodingfound++;
+	      break;
+	    }
 	}
-      encoding++;
-      encoding %= 3;
+      else if (encoding == gdFTEX_Shift_JIS)
+	{
+          if (charmap->platform == 3 && charmap->encoding == 2)     /* Windows Sjis */
+	    {
+	      encodingfound++;
+	      break;
+	    }
+	}
+#endif
     }
-  if (!encodingfound)
+  if (encodingfound)
+    {
+      FT_Set_Charmap(face, charmap);
+    }
+  else
     {
       /* No character set found! */
       gdMutexUnlock (gdFontCacheMutex);
     }
 
 #ifndef JISX0208
-  if (font->have_char_map_sjis)
+  if (encoding == gdFTEX_Shift_JIS)
     {
 #endif
       if ((tmpstr = (char *) gdMalloc (BUFSIZ)))
 	  continue;
 	}
 
+
+        switch (encoding)
+	  {
+	  case gdFTEX_Unicode:
+	    {
+	      /* use UTF-8 mapping from ASCII */
+	      len = gdTcl_UtfToUniChar (next, &ch);
 /* EAM DEBUG */
 /* TBB: get this exactly right: 2.1.3 *or better*, all possible cases. */
 /* 2.0.24: David R. Morrison: use the more complete ifdef here. */
-
 #if ((defined(FREETYPE_MAJOR)) && (((FREETYPE_MAJOR == 2) && (((FREETYPE_MINOR == 1) && (FREETYPE_PATCH >= 3)) || (FREETYPE_MINOR > 1))) || (FREETYPE_MAJOR > 2)))
-      if (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 */
-	  /* stored in Microsoft font symbol.ttf                    */
-	  len = gdTcl_UtfToUniChar (next, &ch);
-	  ch |= 0xf000;
-	  next += len;
-	}
-      else
+      	      if (charmap->encoding == FT_ENCODING_MS_SYMBOL)
+#else
+	      if (charmap->platform == 3 && charmap->encoding == 0)
 #endif /* Freetype 2.1 or better */
+		{
+		  /* I do not know the significance of the constant 0xf000. */
+		  /* It was determined by inspection of the character codes */
+		  /* stored in Microsoft font symbol.ttf                    */
+		  ch |= 0xf000;
+		}
 /* EAM DEBUG */
-
-      switch (encoding)
-	  {
-	  case gdFTEX_Unicode:
-	    if (font->have_char_map_unicode)
-	      {
-		/* use UTF-8 mapping from ASCII */
-		len = gdTcl_UtfToUniChar (next, &ch);
-		next += len;
-	      }
+	      next += len;
+	    }
 	    break;
 	  case gdFTEX_Shift_JIS:
-	    if (font->have_char_map_sjis)
-	      {
-		unsigned char c;
-		int jiscode;
-		c = *next;
-		if (0xA1 <= c && c <= 0xFE)
-		  {
-		    next++;
-		    jiscode = 0x100 * (c & 0x7F) + ((*next) & 0x7F);
-
-		    ch = (jiscode >> 8) & 0xFF;
-		    jiscode &= 0xFF;
-
-		    if (ch & 1)
-		      jiscode += 0x40 - 0x21;
-		    else
-		      jiscode += 0x9E - 0x21;
-
-		    if (jiscode >= 0x7F)
-		      jiscode++;
-		    ch = (ch - 0x21) / 2 + 0x81;
-		    if (ch >= 0xA0)
-		      ch += 0x40;
-
-		    ch = (ch << 8) + jiscode;
-		  }
-		else
-		  {
-		    ch = c & 0xFF;	/* don't extend sign */
-		  }
-		next++;
-	      }
+	    {
+	      unsigned char c;
+	      int jiscode;
+	      c = *next;
+	      if (0xA1 <= c && c <= 0xFE)
+	        {
+	          next++;
+	          jiscode = 0x100 * (c & 0x7F) + ((*next) & 0x7F);
+      
+		  ch = (jiscode >> 8) & 0xFF;
+		  jiscode &= 0xFF;
+
+		  if (ch & 1)
+		    jiscode += 0x40 - 0x21;
+		  else
+		    jiscode += 0x9E - 0x21;
+
+		  if (jiscode >= 0x7F)
+		    jiscode++;
+		  ch = (ch - 0x21) / 2 + 0x81;
+		  if (ch >= 0xA0)
+		    ch += 0x40;
+
+		  ch = (ch << 8) + jiscode;
+		}
+	      else
+		{
+		  ch = c & 0xFF;	/* don't extend sign */
+		}
+	      next++;
+	    }
 	    break;
 	  case gdFTEX_Big5:
 	    {
 <!-- REMEMBER TO EDIT index.html.source -->
 <head>
-<TITLE>gd 2.0.31</TITLE>
+<TITLE>gd 2.0.32</TITLE>
 </head>
 <body bgcolor="#FFFFFF">
 <!-- BANNER HERE -->
-<H2>gd 2.0.31</H2>
+<H2>gd 2.0.32</H2>
 <H3>A graphics library for fast image creation</H3>
 <H3>Follow this link to the
 <A HREF="http://www.boutell.com/gd/">latest version
 legal advice regarding this issue. PNG remains a superior format especially
 if lossless truecolor images are needed.
 <p>
-When building from soruce, gd 2.0.31 <strong>requires</strong> that the 
+When building from soruce, gd 2.0.32 <strong>requires</strong> that the 
 following libraries also be installed, in order to produce the related 
 image formats. The win32 binary release (bgd) already contains the
 appropriate libraries.
 <H3>Table of Contents</H3>
 <UL>
 <LI><A HREF="#notice">Credits and license terms</A>
-<LI><A HREF="#whatsnew2.0.31">What's new in version "XYZ" of GD?</A>
+<LI><A HREF="#whatsnew2.0.32">What's new in version "XYZ" of GD?</A>
 <LI><A HREF="#whatis">What is gd?</A>
 <LI><A HREF="#gdother">What if I want to use another programming language?</A>
 <LI><A HREF="#required">What else do I need to use gd?</A>
 <A NAME="gdother"><H3>What if I want to use another programming
 language?</h3></A>
 Not all of these tools are necessarily up to date and fully compatible
-with 2.0.31.
+with 2.0.32.
 <h4>PHP</h4>
 A variant of gd 2.x is included in PHP 4.3.0. It is also possible
-to patch PHP 4.2.3 for use with gd 2.0.31; see the
+to patch PHP 4.2.3 for use with gd 2.0.32; see the
 <a href="http://www.boutell.com/gd/">gd home page</a> for a link to
 that information. It would be a Good Idea to merge all of the things
 that are better in mainstream gd and all of the things that are
 <li><a href="http://martin.gleeson.com/fly/">fly</a>, by Martin Gleeson
 </ul>
 <p>
+<A NAME="whatsnew2.0.32"><h3>What's new in version 2.0.32?</h3></a>
+<p>
+Version 2.0.32 restores correct detection of Unicode character sets
+for freetype fonts, which repairs a bug that prevented umlauts from
+displaying properly. Also, version 2.0.32 builds all test programs 
+smoothly in the absence of libpng. 
+<p>
 <A NAME="whatsnew2.0.31"><h3>What's new in version 2.0.31?</h3></a>
 <p>
 A minor type naming conflict prevented bgd.dll from compiling, and it
 </ul>
 <h4>Source Code:</h4>
 <ul>
-<li><a href="http://www.boutell.com/gd/http/gd-2.0.31.tar.gz">Gzipped Tar File (Unix)</a>
-<li><a href="http://www.boutell.com/gd/http/gd-2.0.31.zip">.ZIP File of SOURCE CODE (Windows)</a>
+<li><a href="http://www.boutell.com/gd/http/gd-2.0.32.tar.gz">Gzipped Tar File (Unix)</a>
+<li><a href="http://www.boutell.com/gd/http/gd-2.0.32.zip">.ZIP File of SOURCE CODE (Windows)</a>
 </ul>
 <P>
 <A NAME="buildgd"><H3>How do I build gd?</H3></A>
 consult with an experienced user of your system. Sorry, we cannot
 answer questions about basic Internet skills.
 <p>
-Unpacking the archive will produce a directory called "gd-2.0.31".
+Unpacking the archive will produce a directory called "gd-2.0.32".
 <p>
 <h4>For Unix</h4>
-<code>cd</code> to the 2.0.31 directory and type:
+<code>cd</code> to the 2.0.32 directory and type:
 <p>
 <code>./configure</code>
 <P>
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.