Ignore:
Timestamp:
Jan 18, 2007, 5:32:59 PM (15 years ago)
Author:
Eugene Romanenko
Message:

freetype update to version 2.3.0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/poppler/freetype2/src/cid/cidparse.c

    r150 r182  
    55/*    CID-keyed Type1 parser (body).                                       */
    66/*                                                                         */
    7 /*  Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006 by                   */
     7/*  Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007 by             */
    88/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
    99/*                                                                         */
     
    8484
    8585  Again:
    86     /* now, read the rest of the file until we find a `StartData' */
     86    /* now, read the rest of the file until we find */
     87    /* `StartData' or `/sfnts'                      */
    8788    {
    8889      FT_Byte   buffer[256 + 10];
     
    9394      for ( offset = (FT_ULong)FT_STREAM_POS(); ; offset += 256 )
    9495      {
    95         FT_Int    stream_len;
     96        FT_Int  stream_len;
    9697
    9798
     
    117118            goto Found;
    118119          }
     120          else if ( p[1] == 's' && ft_strncmp( (char*)p, "/sfnts", 6 ) == 0 )
     121          {
     122            offset += p - buffer + 7;
     123            goto Found;
     124          }
    119125        }
    120126
     
    126132
    127133  Found:
    128     /* We have found the start of the binary data.  Now rewind and */
    129     /* extract the frame corresponding to the PostScript section.  */
     134    /* We have found the start of the binary data or the `/sfnts' token. */
     135    /* Now rewind and extract the frame corresponding to this PostScript */
     136    /* section.                                                          */
    130137
    131138    ps_len = offset - base_offset;
     
    141148    parser->num_dict       = -1;
    142149
    143     /* Finally, we check whether `StartData' was real -- it could be  */
    144     /* in a comment or string.  We also get its arguments to find out */
    145     /* whether the data is represented in binary or hex format.       */
     150    /* Finally, we check whether `StartData' or `/sfnts' was real --  */
     151    /* it could be in a comment or string.  We also get the arguments */
     152    /* of `StartData' to find out whether the data is represented in  */
     153    /* binary or hex format.                                          */
    146154
    147155    arg1 = parser->root.cursor;
     
    160168        break;
    161169
    162       if ( *cur == 'S' && ft_strncmp( (char*)cur, "StartData", 9 ) == 0 )
     170      if ( cur[0] == 'S' && ft_strncmp( (char*)cur, "StartData", 9 ) == 0 )
    163171      {
    164172        if ( ft_strncmp( (char*)arg1, "(Hex)", 5 ) == 0 )
     
    167175        limit = parser->root.limit;
    168176        cur   = parser->root.cursor;
     177        goto Exit;
     178      }
     179      else if ( cur[1] == 's' && ft_strncmp( (char*)cur, "/sfnts", 6 ) == 0 )
     180      {
     181        FT_TRACE2(( "cid_parser_new: cannot handle Type 11 fonts\n" ));
     182        error = CID_Err_Unknown_File_Format;
    169183        goto Exit;
    170184      }
Note: See TracChangeset for help on using the changeset viewer.