shithub: freetype+ttf2subf

Download patch

ref: ed6c0e063c05f474de620bdc3a22fb96f35379e5
parent: b211651ac9a40f3ed2d25474dcf9a9e09c8a81dd
author: Werner Lemberg <[email protected]>
date: Mon Sep 15 03:49:40 EDT 2008

Fix Savannah bug #24179, reported by Bram Tassyns.

* src/type1/t1load.c (mm_axis_unmap, T1_Get_MM_Var): Fix computation
of default values.


* src/tools/glnames.py (main): Surround `ft_get_adobe_glyph_index'
and `ft_adobe_glyph_list' with FT_CONFIG_OPTION_ADOBE_GLYPH_LIST to
prevent unconditional definition.  This fixes Savannah bug #24241.

* src/psnames/pstables.h: Regenerated.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2008-09-15  George Williams  <[email protected]>
+
+	Fix Savannah bug #24179, reported by Bram Tassyns.
+
+	* src/type1/t1load.c (mm_axis_unmap, T1_Get_MM_Var): Fix computation
+	of default values.
+
+2008-09-15  Werner Lemberg  <[email protected]>
+
+	* src/tools/glnames.py (main): Surround `ft_get_adobe_glyph_index'
+	and `ft_adobe_glyph_list' with FT_CONFIG_OPTION_ADOBE_GLYPH_LIST to
+	prevent unconditional definition.  This fixes Savannah bug #24241.
+
+	* src/psnames/pstables.h: Regenerated.
+
 2008-09-13  Werner Lemberg  <[email protected]>
 
 	* autogen.sh, builds/unix/configure.raw,
--- a/include/freetype/config/ftoption.h
+++ b/include/freetype/config/ftoption.h
@@ -233,12 +233,12 @@
   /*                                                                       */
   /* Glyph Postscript Names handling                                       */
   /*                                                                       */
-  /*   By default, FreeType 2 is compiled with the `PSNames' module.  This */
+  /*   By default, FreeType 2 is compiled with the `psnames' module.  This */
   /*   module is in charge of converting a glyph name string into a        */
   /*   Unicode value, or return a Macintosh standard glyph name for the    */
   /*   use with the TrueType `post' table.                                 */
   /*                                                                       */
-  /*   Undefine this macro if you do not want `PSNames' compiled in your   */
+  /*   Undefine this macro if you do not want `psnames' compiled in your   */
   /*   build of FreeType.  This has the following effects:                 */
   /*                                                                       */
   /*   - The TrueType driver will provide its own set of glyph names,      */
@@ -245,7 +245,7 @@
   /*     if you build it to support postscript names in the TrueType       */
   /*     `post' table.                                                     */
   /*                                                                       */
-  /*   - The Type 1 driver will not be able to synthetize a Unicode        */
+  /*   - The Type 1 driver will not be able to synthesize a Unicode        */
   /*     charmap out of the glyphs found in the fonts.                     */
   /*                                                                       */
   /*   You would normally undefine this configuration macro when building  */
--- a/src/psnames/pstables.h
+++ b/src/psnames/pstables.h
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    PostScript glyph names.                                              */
 /*                                                                         */
-/*  Copyright 2005 by                                                      */
+/*  Copyright 2005, 2008 by                                                */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -561,6 +561,9 @@
    *  The lookup function to get the Unicode value for a given string
    *  is defined below the table.
    */
+
+#ifdef FT_CONFIG_OPTION_ADOBE_GLYPH_LIST
+
   static const unsigned char  ft_adobe_glyph_list[54791] =
   {
       0, 52,  0,106,  2,167,  3, 63,  4,220,  6,125,  9,143, 10, 23,
@@ -4085,6 +4088,8 @@
   NotFound:
     return 0;
   }
+
+#endif /* FT_CONFIG_OPTION_ADOBE_GLYPH_LIST */
 
 
 /* END */
--- a/src/tools/glnames.py
+++ b/src/tools/glnames.py
@@ -6,7 +6,7 @@
 #
 
 
-# Copyright 1996-2000, 2003, 2005, 2007 by
+# Copyright 1996-2000, 2003, 2005, 2007, 2008 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
@@ -21,7 +21,7 @@
 usage: %s <output-file>
 
   This python script generates the glyph names tables defined in the
-  PSNames module.
+  `psnames' module.
 
   Its single argument is the name of the header file to be created.
 """
@@ -5067,7 +5067,7 @@
   write( "/*                                                                         */\n" )
   write( "/*    PostScript glyph names.                                              */\n" )
   write( "/*                                                                         */\n" )
-  write( "/*  Copyright 2005 by                                                      */\n" )
+  write( "/*  Copyright 2005, 2008 by                                                */\n" )
   write( "/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */\n" )
   write( "/*                                                                         */\n" )
   write( "/*  This file is part of the FreeType project, and may only be used,       */\n" )
@@ -5117,6 +5117,9 @@
    *  The lookup function to get the Unicode value for a given string
    *  is defined below the table.
    */
+
+#ifdef FT_CONFIG_OPTION_ADOBE_GLYPH_LIST
+
 """ )
 
   dump_array( dict_array, write, "ft_adobe_glyph_list" )
@@ -5218,6 +5221,8 @@
   NotFound:
     return 0;
   }
+
+#endif /* FT_CONFIG_OPTION_ADOBE_GLYPH_LIST */
 
 """ )
 
--- a/src/type1/t1load.c
+++ b/src/type1/t1load.c
@@ -241,8 +241,7 @@
                                  axismap->blend_points[j] -
                                    axismap->blend_points[j - 1] );
 
-
-        return axismap->design_points[j - 1] +
+        return FT_INT_TO_FIXED( axismap->design_points[j - 1] ) +
                  FT_MulDiv( t,
                             axismap->design_points[j] -
                               axismap->design_points[j - 1],
@@ -355,9 +354,8 @@
                         blend->num_axis );
 
       for ( i = 0; i < mmaster.num_axis; ++i )
-        mmvar->axis[i].def =
-          FT_INT_TO_FIXED( mm_axis_unmap( &blend->design_map[i],
-                                          axiscoords[i] ) );
+        mmvar->axis[i].def = mm_axis_unmap( &blend->design_map[i],
+                                            axiscoords[i] );
     }
 
     *master = mmvar;