shithub: freetype+ttf2subf

Download patch

ref: 6b87e6f0ff7867f3faf3959cbeaf6f8ac5122ab0
parent: 9207e001983db7cb6e5579c3e3bee20c4b036935
author: Werner Lemberg <[email protected]>
date: Tue Jan 2 14:20:08 EST 2007

* src/gxvalid/gxvkern.c (gxv_kern_subtable_fmt0_pairs_validate):
Remove compiler warning.

Formatting.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,21 +1,27 @@
+2007-01-02  Werner Lemberg  <[email protected]>
+
+	* src/gxvalid/gxvkern.c (gxv_kern_subtable_fmt0_pairs_validate):
+	Remove compiler warning.
+
 2007-01-02  David Turner  <[email protected]>
 
-	* src/sfnt/sfobjs.c: adding documentation comment
+	* src/sfnt/sfobjs.c: Add documentation comment.
 
 2006-12-31  Masatake YAMATO  <[email protected]>
 
-	* src/gxvalid/gxvkern.c (gxv_kern_subtable_fmt0_pairs_validate): New function.
-	Checks uniqueness of the gid pairs.
+	* src/gxvalid/gxvkern.c (gxv_kern_subtable_fmt0_pairs_validate): New
+	function.
+	Check uniqueness of the gid pairs.
 	(gxv_kern_subtable_fmt0_validate): Move some code to 
 	`gxv_kern_subtable_fmt0_pairs_validate'.
 
 2006-12-22  David Turner  <[email protected]>
 
-	* src/autofit/aflatin.c, src/truetype/ttgload.c: removing compiler
-	warnings
+	* src/autofit/aflatin.c, src/truetype/ttgload.c: Remove compiler
+	warnings.
 
-	* builds/win32/visualc/freetype.vcproj: adding _CRT_SECURE_NO_DEPRECATE
-	to avoid deprecation warnings with Visual C++ 8
+	* builds/win32/visualc/freetype.vcproj: Add _CRT_SECURE_NO_DEPRECATE
+	to avoid deprecation warnings with Visual C++ 8.
 
 2006-12-16  Anders Kaseorg  <[email protected]>
 
--- a/src/autofit/aflatin.c
+++ b/src/autofit/aflatin.c
@@ -797,11 +797,13 @@
 
           p = first->prev;
           if ( p->v < first_v )
-            segment->height = (FT_Short)(segment->height + (( first_v - p->v ) >> 1));
+            segment->height = (FT_Short)( segment->height +
+                                          ( ( first_v - p->v ) >> 1 ) );
 
           p = last->next;
           if ( p->v > last_v )
-            segment->height = (FT_Short)(segment->height + (( p->v - last_v ) >> 1));
+            segment->height = (FT_Short)( segment->height +
+                                          ( ( p->v - last_v ) >> 1 ) );
         }
         else
         {
@@ -810,11 +812,13 @@
 
           p = first->prev;
           if ( p->v > first_v )
-            segment->height = (FT_Short)(segment->height + (( p->v - first_v ) >> 1));
+            segment->height = (FT_Short)( segment->height +
+                                          ( ( p->v - first_v ) >> 1 ) );
 
           p = last->next;
           if ( p->v < last_v )
-            segment->height = (FT_Short)(segment->height + (( last_v - p->v ) >> 1));
+            segment->height = (FT_Short)( segment->height +
+                                          ( ( last_v - p->v ) >> 1 ) );
         }
       }
     }
--- a/src/gxvalid/gxvkern.c
+++ b/src/gxvalid/gxvkern.c
@@ -4,7 +4,8 @@
 /*                                                                         */
 /*    TrueTypeGX/AAT kern table validation (body).                         */
 /*                                                                         */
-/*  Copyright 2004, 2005 by suzuki toshiya, Masatake YAMATO, Red Hat K.K., */
+/*  Copyright 2004, 2005, 2006, 2007                                       */
+/*  by suzuki toshiya, Masatake YAMATO, Red Hat K.K.,                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -117,9 +118,11 @@
     FT_UShort  last_gid_left  = 0;
     FT_UShort  last_gid_right = 0;
 
+    FT_UNUSED( limit );
 
-    GXV_NAME_ENTER( "kern format 0 paris" );
 
+    GXV_NAME_ENTER( "kern format 0 pairs" );
+
     for ( i = 0; i < nPairs; i++ )
     {
       FT_UShort  gid_left;
@@ -135,7 +138,7 @@
       gid_right = FT_NEXT_USHORT( p );
       gxv_glyphid_validate( gid_right, valid );
 
-      /* A pair of left and right gid must be uniqe and be sorted. */
+      /* Pairs of left and right GIDs must be unique and sorted. */
       GXV_TRACE(( "left gid = %u, right gid = %u\n", gid_left, gid_right ));
       if ( gid_left == last_gid_left )
       {
@@ -170,7 +173,7 @@
     FT_UShort  unitSize;
 
 
-    GXV_NAME_ENTER( "kern subtable format0" );
+    GXV_NAME_ENTER( "kern subtable format 0" );
 
     unitSize = 2 + 2 + 2;
     nPairs   = 0;
@@ -300,7 +303,7 @@
     GXV_kern_fmt1_StateOptRec  vt_rec;
 
 
-    GXV_NAME_ENTER( "kern subtable format1" );
+    GXV_NAME_ENTER( "kern subtable format 1" );
 
     valid->statetable.optdata =
       &vt_rec;
@@ -402,7 +405,7 @@
     FT_UShort  rightOffsetTable;
 
 
-    GXV_NAME_ENTER( "kern subtable format2" );
+    GXV_NAME_ENTER( "kern subtable format 2" );
 
     GXV_ODTECT_INIT( odtect );
     fmt2_rec.odtect = odtect;
@@ -459,7 +462,7 @@
     FT_Byte    flags;
 
 
-    GXV_NAME_ENTER( "kern subtable format3" );
+    GXV_NAME_ENTER( "kern subtable format 3" );
 
     GXV_LIMIT_CHECK( 2 + 1 + 1 + 1 + 1 );
     glyphCount      = FT_NEXT_USHORT( p );
--- a/src/sfnt/sfobjs.c
+++ b/src/sfnt/sfobjs.c
@@ -229,11 +229,11 @@
         break;
 
       case TT_MS_ID_UCS_4:
-       /* apparently, when this value is found in a name table entry,
-        * it is documented as "Full Unicode repertoire". Experience
-        * with the MsGothic shipped with Windows Vista shows that this is
-        * really UTF-16 names  (the real UCS-4 is only used for charmaps)
-        */
+        /* Apparently, if this value is found in a name table entry, it is */
+        /* documented as `full Unicode repertoire'.  Experience with the   */
+        /* MsGothic font shipped with Windows Vista shows that this really */
+        /* means UTF-16 encoded names (UCS-4 values are only used within   */
+        /* charmaps).                                                      */
         convert = tt_name_entry_ascii_from_utf16;
         break;
 
--- a/src/truetype/ttgload.c
+++ b/src/truetype/ttgload.c
@@ -644,7 +644,7 @@
       loader->exec->pts          = *zone;
 
       debug = FT_BOOL( !( loader->load_flags & FT_LOAD_NO_SCALE ) &&
-                        ((TT_Size)loader->size)->debug );
+                       ((TT_Size)loader->size)->debug             );
 
       error = TT_Run_Context( loader->exec, debug );
       if ( error && loader->exec->pedantic_hinting )