/[freetype]/freetype2/src/sfnt/ttload.c
ViewVC logotype

Diff of /freetype2/src/sfnt/ttload.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.115 by freetype, Tue Mar 1 22:57:25 2005 UTC revision 1.116 by wl, Mon May 9 22:11:36 2005 UTC
# Line 134  Line 134 
134    }    }
135    
136    
137   /* In theory, we should check the values of `search_range',               */    /* In theory, we should check the values of `search_range',              */
138   /* `entry_selector', and `range_shift' to detect non-SFNT based files     */    /* `entry_selector', and `range_shift' to detect non-SFNT based files    */
139   /* whose header might also start with 0x100000L (yes, these exist).       */    /* whose header might also start with 0x100000L (yes, these exist).      */
140   /*                                                                        */    /*                                                                       */
141   /* Very unfortunately, many TrueType fonts don't have these fields        */    /* Very unfortunately, many TrueType fonts don't have these fields       */
142   /* set correctly and we must ignore them to support them.  An alternative */    /* set correctly and we must ignore them to support them.  An            */
143   /* way to check the font file is thus to:                                 */    /* alternative way to check the font file is thus to:                    */
144   /*                                                                        */    /*                                                                       */
145   /* - check that `num_tables' is valid                                     */    /* - check that `num_tables' is valid                                    */
146   /* - look for a "head" table, check its size, and parse it to             */    /* - look for a "head" table, check its size, and parse it to            */
147   /*   see if its "magic" field is correctly set                            */    /*   see if its "magic" field is correctly set                           */
148   /*                                                                        */    /*                                                                       */
149   /* When checking directory entries, ignore the tables `glyx' and `locx'   */    /* When checking directory entries, ignore the tables `glyx' and `locx'  */
150   /* which are hacked-out versions of `glyf' and `loca' in some PostScript  */    /* which are hacked-out versions of `glyf' and `loca' in some PostScript */
151   /* Type 42 fonts, and will generally be invalid.                          */    /* Type 42 fonts, and will generally be invalid.                         */
152   /*                                                                        */    /*                                                                       */
153    static FT_Error    static FT_Error
154    sfnt_dir_check( FT_Stream  stream,    sfnt_dir_check( FT_Stream  stream,
155                    FT_ULong   offset,                    FT_ULong   offset,
# Line 239  Line 239 
239        goto Bad_Format;        goto Bad_Format;
240    
241    Exit:    Exit:
242      return  error;      return error;
243    
244    Bad_Format:    Bad_Format:
245      error = SFNT_Err_Unknown_File_Format;      error = SFNT_Err_Unknown_File_Format;

Legend:
Removed from v.1.115  
changed lines
  Added in v.1.116

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26