shithub: freetype+ttf2subf

Download patch

ref: 948ee807e1d1d3270dc4d3a9c09615c11024b9c3
parent: 2062286fa854ae6d7e09965f9de6c848bdfdc602
author: Werner Lemberg <[email protected]>
date: Thu May 2 02:50:58 EDT 2002

* src/sfnt/ttcmap0.c (tt_cmap4_char_index): Fix serious typo
(0xFFFU -> 0xFFFFU).

* docs/INSTALL: Fix URL of makepp.

formatting

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,42 +1,49 @@
+2002-05-02  Werner Lemberg  <[email protected]>
+
+	* src/sfnt/ttcmap0.c (tt_cmap4_char_index): Fix serious typo
+	(0xFFFU -> 0xFFFFU).
+
+2002-05-01  Werner Lemberg  <[email protected]>
+
+	* docs/INSTALL: Fix URL of makepp.
+
 2002-05-01  David Turner  <[email protected]>
 
-        * src/sfnt/sfobjs.c (tt_face_get_name): fixing a bug that
-          caused FreeType to crash when certain broken fonts (e.g.
-          "hya6gb.ttf") were opened.
+	* src/sfnt/sfobjs.c (tt_face_get_name): Fixing a bug that caused
+	FreeType to crash when certain broken fonts (e.g. "hya6gb.ttf")
+	were opened.
 
-        * src/sfnt/ttload.c (TT_Load_Names): applied a small work-around to
-          manage fonts containing a broken name table (e.g. "hya6gb.ttf")
+	* src/sfnt/ttload.c (TT_Load_Names): Applied a small work-around to
+	manage fonts containing a broken name table (e.g. "hya6gb.ttf").
 
-        * src/sfnt/ttcmap0.c (tt_cmap4_validate):
-          fixed over-restrictive validation test. the charmap validator
-          now accepts overlapping ranges in format 4 charmaps.
+	* src/sfnt/ttcmap0.c (tt_cmap4_validate): Fixed over-restrictive
+	validation test.  The charmap validator now accepts overlapping
+	ranges in format 4 charmaps.
 
-        * src/sfnt/ttcmap0.c (tt_cmap4_char_index):
-          switched to a binary search algorithm. Certain fonts contain
-          more than 170 distinct segments !!
+	* src/sfnt/ttcmap0.c (tt_cmap4_char_index): Switched to a binary
+	search algorithm.  Certain fonts contain more than 170 distinct
+	segments!
 
-        * include/freetype/config/ftstdlib.h: adding an alias for the
-          'exit' function. This will be used in the near future to panic
-          in case of un-expected exception (which shouldn't happen in
-          theory, but as everyone knows, shit happens :-) )
+	* include/freetype/config/ftstdlib.h: Adding an alias for the `exit'
+	function.  This will be used in the near future to panic in case of
+	unexpected exception (which shouldn't happen in theory).
 
-        * include/freetype/internal/fthash.h, src/base/fthash.c:
-          adding a generic implementation of dynamic hash tables using
-          linear algorithm (to get rid of 'stalls' during resizes). This
-          will be used in the future in at least three parts of the
-          library: the cache sub-system, the object sub-system and
-          the memory debugger.
+	* include/freetype/internal/fthash.h, src/base/fthash.c: Adding a
+	generic implementation of dynamic hash tables using a linear
+	algorithm (to get rid of `stalls' during resizes).  This will be
+	used in the future in at least three parts of the library: the cache
+	sub-system, the object sub-system, and the memory debugger.
 
-        * include/freetype/internal/ftcore.h: added this header file to
-          group all new definitions related to exception handling and
-          memory management. It's very likely that this file will disappear
-          or be renamed in the future..
+	* include/freetype/internal/ftcore.h: Added this header file to
+	group all new definitions related to exception handling and memory
+	management.  It is very likely that this file will disappear or be
+	renamed in the future.
 
-        * include/freetype/internal/ftobject.h, include/freetype/ftsysmem.h:
-          adding comments to better explain the object sub-system as well
-          as the new memory manager interface.
+	* include/freetype/internal/ftobject.h, include/freetype/ftsysmem.h:
+	Adding comments to better explain the object sub-system as well as
+	the new memory manager interface.
 
-2002-04-30  Wenlin Institute (Tom Bishop) <[email protected]>
+2002-04-30  Wenlin Institute (Tom Bishop)  <[email protected]>
 
 	* src/base/ftmac.c (p2c_str): Removed.
 	(file_spec_from_path) [TARGET_API_MAC_CARBON]: Added support for
@@ -167,10 +174,10 @@
 2002-04-18  David Turner  <[email protected]>
 
 	* src/base/ftobjs.c, builds/win32/ftdebug.c,
-        builds/amiga/src/base/ftdebug.c: Version 2.1.0 couldn't be linked
-        against applications in Win32 and Amiga builds due to changes to
-        "src/base/ftdebug.c" that were not properly propagated to
-        "builds/win32" and "builds/amiga".  This has been fixed.
+	builds/amiga/src/base/ftdebug.c: Version 2.1.0 couldn't be linked
+	against applications in Win32 and Amiga builds due to changes to
+	"src/base/ftdebug.c" that were not properly propagated to
+	"builds/win32" and "builds/amiga".  This has been fixed.
 
 	* include/freetype/internal/ftobject.h,
 	include/freetype/internal/ftexcept.h, include/freetype/ftsysmem.h,
--- a/builds/freetype.mk
+++ b/builds/freetype.mk
@@ -3,7 +3,7 @@
 #
 
 
-# Copyright 1996-2000 by
+# Copyright 1996-2000, 2002 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
@@ -276,7 +276,7 @@
 # The Dos command shell does not support very long list of arguments, so
 # we are stuck with wildcards.
 #
-# Don't break the command lines with; this prevents the "del" command from
+# Don't break the command lines with \; this prevents the "del" command from
 # working correctly on Win9x.
 #
 clean_project_dos:
--- a/docs/INSTALL
+++ b/docs/INSTALL
@@ -70,7 +70,7 @@
 
   [Well, this is not  really correct.  Recently, a perl implementation
   of make called `makepp' has appeared which can also build FreeType 2
-  successfully on Unix platforms.  See http://LNC.usc.edu/~holt/makepp
+  successfully on  Unix platforms.   See http://makepp.sourceforge.net
   for more details.]
 
   - Go to the `freetype2' directory.
--- a/include/freetype/config/ftstdlib.h
+++ b/include/freetype/config/ftstdlib.h
@@ -98,6 +98,7 @@
 #define ft_qsort  qsort
 #define ft_exit   exit    /* only used to exit from un-handled exceptions */
 
+
   /**********************************************************************/
   /*                                                                    */
   /*                         execution control                          */
--- a/src/sfnt/ttcmap0.c
+++ b/src/sfnt/ttcmap0.c
@@ -670,9 +670,9 @@
         if ( start > end )
           FT_INVALID_DATA;
 
-        /* this test should be performed at default validation level   */
-        /* unfortunately, some popular asian fonts present overlapping */
-        /* ranges in their charmaps..                                  */
+        /* this test should be performed at default validation level;  */
+        /* unfortunately, some popular Asian fonts present overlapping */
+        /* ranges in their charmaps                                    */
         /*                                                             */
         if ( valid->level >= FT_VALIDATE_TIGHT )
         {
@@ -735,19 +735,19 @@
       num_segs2 = TT_PEEK_USHORT( p ) & -2;  /* be paranoid! */
 
 #if 1
-      /* some fonts have more than 170 segments in their charmaps !! */
-      /* we changed this function to use a more efficient binary     */
-      /* search to boost its performance                             */
+      /* Some fonts have more than 170 segments in their charmaps! */
+      /* We changed this function to use a more efficient binary   */
+      /* search for improving performance                          */
       {
-        FT_UInt   min = 0;
-        FT_UInt   max = num_segs2 >> 1;
-        FT_UInt   mid, start, end, offset;
+        FT_UInt  min = 0;
+        FT_UInt  max = num_segs2 >> 1;
+        FT_UInt  mid, start, end, offset;
         
 
         while ( min < max )
         {
           mid   = ( min + max ) >> 1;
-          p     = table + 14 + mid*2;
+          p     = table + 14 + mid * 2;
           end   = TT_NEXT_USHORT( p ); 
           p    += num_segs2;
           start = TT_PEEK_USHORT( p);
@@ -756,7 +756,7 @@
             max = mid;
           
           else if ( code > end )
-            min = mid+1;
+            min = mid + 1;
           
           else
           {
@@ -771,12 +771,12 @@
             
             if ( offset != 0 )
             {
-              p  += offset + 2*( idx - start );
+              p  += offset + 2 * ( idx - start );
               idx = TT_PEEK_USHORT( p );
             }
             
             if ( idx != 0 )
-              result = (FT_UInt)( idx + delta ) & 0xFFFU;
+              result = (FT_UInt)( idx + delta ) & 0xFFFFU;
             
             goto Exit;
           }
@@ -784,6 +784,7 @@
       }
 
 #else /* 0 - old code */
+
       {
         FT_UInt   n;
         FT_Byte*  q;
@@ -823,7 +824,9 @@
           }
         }
       }
+
 #endif /* 0 */
+
     }
     
   Exit:
--- a/src/sfnt/ttload.c
+++ b/src/sfnt/ttload.c
@@ -988,8 +988,8 @@
     /* check the 'storageOffset' field */
     storageOffset = names->storageOffset;
 
-    /* some broken asian fonts have a storage offset whose value is */
-    /* 12*numNameRecords. We deal with them here..                  */
+    /* Some broken Asian fonts have a storage offset whose value is */
+    /* 12 * numNameRecords.  We deal with them here.                */
     if ( storageOffset == (FT_ULong)(12 * names->numNameRecords) )
       storageOffset += 6;