shithub: freetype+ttf2subf

Download patch

ref: 3ad8f355371d495fc0897a5217a48c1bf4c4a982
parent: 79405d75c0b485eceafaff51c8bdb2412b7dbc4c
author: Daniel Zimmermann <[email protected]>
date: Tue May 24 02:22:32 EDT 2011

Reduce warnings for MS Visual Studio 2010.

* src/autofit/afhints.c (af_glyph_hints_get_num_segments,
af_glyph_hints_get_segment_offset) [!FT_DEBUG_AUTOFIT]: Provide
return value.
* src/cff/cffgload.c (cff_slot_load): Add cast.
* src/truetype/ttobjs.c (tt_check_trickyness_sfnt_ids): Use proper
loop variable type.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2011-05-24  Daniel Zimmermann  <[email protected]>
+
+	Reduce warnings for MS Visual Studio 2010.
+
+	* src/autofit/afhints.c (af_glyph_hints_get_num_segments,
+	af_glyph_hints_get_segment_offset) [!FT_DEBUG_AUTOFIT]: Provide
+	return value.
+	* src/cff/cffgload.c (cff_slot_load): Add cast.
+	* src/truetype/ttobjs.c (tt_check_trickyness_sfnt_ids): Use proper
+	loop variable type.
+
 2011-05-16  suzuki toshiya  <[email protected]>
 
 	Automake component `builds/unix/install-sh' is removed.
--- a/src/autofit/afhints.c
+++ b/src/autofit/afhints.c
@@ -420,6 +420,8 @@
     FT_UNUSED( hints );
     FT_UNUSED( dimension );
     FT_UNUSED( num_segments );
+
+    return 0;
   }
 
 
@@ -433,6 +435,8 @@
     FT_UNUSED( dimension );
     FT_UNUSED( idx );
     FT_UNUSED( offset );
+
+    return 0;
   }
 
 
--- a/src/cff/cffgload.c
+++ b/src/cff/cffgload.c
@@ -2706,7 +2706,7 @@
                                               glyph_index );
 
       if ( fd_index >= cff->num_subfonts ) 
-        fd_index = cff->num_subfonts - 1;
+        fd_index = (FT_Byte)( cff->num_subfonts - 1 );
 
       top_upm = cff->top_font.font_dict.units_per_em;
       sub_upm = cff->subfonts[fd_index]->font_dict.units_per_em;
--- a/src/truetype/ttobjs.c
+++ b/src/truetype/ttobjs.c
@@ -320,10 +320,11 @@
       }
     };
 
-    FT_ULong  checksum;
-    int       num_matched_ids[TRICK_SFNT_IDS_NUM_FACES];
-    FT_Bool   has_cvt, has_fpgm, has_prep;
-    int       i, j, k;
+    FT_ULong   checksum;
+    int        num_matched_ids[TRICK_SFNT_IDS_NUM_FACES];
+    FT_Bool    has_cvt, has_fpgm, has_prep;
+    FT_UShort  i;
+    int        j, k;
 
 
     FT_MEM_SET( num_matched_ids, 0,