/[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.117 by wl, Sat Aug 20 05:45:42 2005 UTC revision 1.118 by wl, Mon Sep 19 07:07:11 2005 UTC
# Line 156  Line 156 
156                    FT_UInt    num_tables )                    FT_UInt    num_tables )
157     {     {
158      FT_Error        error;      FT_Error        error;
159      FT_UInt         nn, has_head = 0;      FT_UInt         nn;
160        FT_UInt         has_head = 0, has_sing = 0, has_meta = 0;
161    
162      const FT_ULong  glyx_tag = FT_MAKE_TAG( 'g', 'l', 'y', 'x' );      const FT_ULong  glyx_tag = FT_MAKE_TAG( 'g', 'l', 'y', 'x' );
163      const FT_ULong  locx_tag = FT_MAKE_TAG( 'l', 'o', 'c', 'x' );      const FT_ULong  locx_tag = FT_MAKE_TAG( 'l', 'o', 'c', 'x' );
# Line 229  Line 230 
230          if ( FT_STREAM_SEEK( offset + 28 + 16*nn ) )          if ( FT_STREAM_SEEK( offset + 28 + 16*nn ) )
231            goto Bad_Format;            goto Bad_Format;
232        }        }
233    
234  #ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS  #ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
235        else if ( table.Tag == TTAG_bhed )        else if ( table.Tag == TTAG_bhed )
236          goto head_retry;          goto head_retry;
237  #endif  /* TT_CONFIG_OPTION_EMBEDDED_BITMAPS */        #endif  /* TT_CONFIG_OPTION_EMBEDDED_BITMAPS */      
238    
239          else if ( table.Tag == TTAG_SING )
240            has_sing = 1;
241          else if ( table.Tag == TTAG_META )
242            has_meta = 1;
243      }      }
244    
245        /* when sing and meta are present, head is not present */
246        if ( has_sing && has_meta && has_head == 0 )
247            goto Exit;
248    
249        /* otherwise, treat a missing head as a failure */
250      if ( has_head == 0 )      if ( has_head == 0 )
251        goto Bad_Format;        goto Bad_Format;
252    

Legend:
Removed from v.1.117  
changed lines
  Added in v.1.118

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