shithub: freetype+ttf2subf

Download patch

ref: 861ba624db9df65529a11718d3eabc45b124dbeb
parent: 24ea09fcbdaa66ab3ca5bfce1ba4cce2af9a7a98
author: David Turner <[email protected]>
date: Tue Feb 15 07:54:51 EST 2000

small fix (reduce compiler warnings)

git/fs: mount .git/fs: mount/attach disallowed
--- a/src/base/ftdriver.h
+++ b/src/base/ftdriver.h
@@ -72,6 +72,7 @@
   /*                                                                       */
   typedef FT_Error  (*FTDriver_doneDriver)( FT_Driver  driver );
 
+
   
   /*************************************************************************/
   /*                                                                       */
@@ -100,8 +101,11 @@
   /*    isn't available (i.e., wasn't compiled in the driver at build      */
   /*    time).                                                             */
   /*                                                                       */
-  typedef void*  (*FTDriver_getInterface)( FT_Driver         driver,
-                                           const FT_String*  interface );
+  typedef void  (*FTDriver_Interface)( void );
+
+  typedef FTDriver_Interface  (*FTDriver_getInterface)
+                        ( FT_Driver         driver,
+                          const FT_String*  interface );
 
 
   /*************************************************************************/
--- a/src/truetype/ttgload.c
+++ b/src/truetype/ttgload.c
@@ -206,9 +206,9 @@
     if ( n_contours > load->left_contours )
     {
       FT_TRACE0(( "ERROR: Glyph index %ld has %d contours > left %d\n",
-                   subg->index,
+                   load->glyph_index,
                    n_contours,
-                   left_contours ));
+                   load->left_contours ));
       return TT_Err_Too_Many_Contours;
     }
 
@@ -236,7 +236,7 @@
 
     if ( n_points > load->left_points )
     {
-      FT_TRACE0(( "ERROR: Too many points in glyph %ld\n", subg->index ));
+      FT_TRACE0(( "ERROR: Too many points in glyph %ld\n", load->glyph_index ));
       error = TT_Err_Too_Many_Points;
       goto Fail;
     }
@@ -478,6 +478,7 @@
       goto Fail;
     }
 
+    loader->glyph_index = glyph_index;
     num_contours = 0;
     num_points   = 0;
     ins_offset   = 0;
--- a/src/truetype/ttgload.h
+++ b/src/truetype/ttgload.h
@@ -36,6 +36,7 @@
     TT_GlyphSlot    glyph;
 
     TT_ULong        load_flags;
+    TT_UInt         glyph_index;
 
     FT_Stream       stream;
     TT_Int          byte_len;
--- a/src/type1/t1afm.c
+++ b/src/type1/t1afm.c
@@ -44,7 +44,7 @@
     len = p - *start;
     if (len > 0 && len < 64)
     {
-      FT_UInt  n;
+      FT_Int  n;
       
       /* copy glyph name to intermediate array */
       MEM_Copy( temp, start, len );
@@ -124,8 +124,8 @@
     if ( !ACCESS_Frame(stream->size) )
       return error;
       
-    start = stream->cursor;
-    limit = stream->limit;
+    start = (FT_Byte*)stream->cursor;
+    limit = (FT_Byte*)stream->limit;
     p     = start;
     
     /* we are now going to count the occurences of "KP" or "KPX" in */
--- a/src/type1/t1driver.c
+++ b/src/type1/t1driver.c
@@ -55,11 +55,11 @@
   /*    time).                                                             */
   /*                                                                       */
   static
-  void*  Get_Interface( FT_Driver         driver,
-                        const FT_String*  interface )
+  FTDriver_Interface  Get_Interface( FT_Driver         driver,
+                                     const FT_String*  interface )
   {
     if ( strcmp( (const char*)interface, "attach_file" ) == 0 )
-      return T1_Read_AFM;
+      return (FTDriver_Interface)T1_Read_AFM;
       
     return 0;
   }