OLD | NEW |
1 /***************************************************************************/ | 1 /***************************************************************************/ |
2 /* */ | 2 /* */ |
3 /* cidparse.c */ | 3 /* cidparse.c */ |
4 /* */ | 4 /* */ |
5 /* CID-keyed Type1 parser (body). */ | 5 /* CID-keyed Type1 parser (body). */ |
6 /* */ | 6 /* */ |
7 /* Copyright 1996-2007, 2009, 2013 by */ | 7 /* Copyright 1996-2007, 2009, 2013, 2014 by */ |
8 /* David Turner, Robert Wilhelm, and Werner Lemberg. */ | 8 /* David Turner, Robert Wilhelm, and Werner Lemberg. */ |
9 /* */ | 9 /* */ |
10 /* This file is part of the FreeType project, and may only be used, */ | 10 /* This file is part of the FreeType project, and may only be used, */ |
11 /* modified, and distributed under the terms of the FreeType project */ | 11 /* modified, and distributed under the terms of the FreeType project */ |
12 /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ | 12 /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ |
13 /* this file you indicate that you have read the license and */ | 13 /* this file you indicate that you have read the license and */ |
14 /* understand and accept it fully. */ | 14 /* understand and accept it fully. */ |
15 /* */ | 15 /* */ |
16 /***************************************************************************/ | 16 /***************************************************************************/ |
17 | 17 |
18 | 18 |
19 #include "../../include/ft2build.h" | 19 #include <ft2build.h> |
20 #include "../../include/freetype/internal/ftdebug.h" | 20 #include FT_INTERNAL_DEBUG_H |
21 #include "../../include/freetype/internal/ftobjs.h" | 21 #include FT_INTERNAL_OBJECTS_H |
22 #include "../../include/freetype/internal/ftstream.h" | 22 #include FT_INTERNAL_STREAM_H |
23 | 23 |
24 #include "cidparse.h" | 24 #include "cidparse.h" |
25 | 25 |
26 #include "ciderrs.h" | 26 #include "ciderrs.h" |
27 | 27 |
28 | 28 |
29 /*************************************************************************/ | 29 /*************************************************************************/ |
30 /* */ | 30 /* */ |
31 /* The macro FT_COMPONENT is used in trace mode. It is an implicit */ | 31 /* The macro FT_COMPONENT is used in trace mode. It is an implicit */ |
32 /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log */ | 32 /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log */ |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 { | 171 { |
172 error = parser->root.error; | 172 error = parser->root.error; |
173 goto Exit; | 173 goto Exit; |
174 } | 174 } |
175 | 175 |
176 if ( cur[0] == 'S' && ft_strncmp( (char*)cur, "StartData", 9 ) == 0 ) | 176 if ( cur[0] == 'S' && ft_strncmp( (char*)cur, "StartData", 9 ) == 0 ) |
177 { | 177 { |
178 if ( ft_strncmp( (char*)arg1, "(Hex)", 5 ) == 0 ) | 178 if ( ft_strncmp( (char*)arg1, "(Hex)", 5 ) == 0 ) |
179 parser->binary_length = ft_atol( (const char *)arg2 ); | 179 parser->binary_length = ft_atol( (const char *)arg2 ); |
180 | 180 |
181 limit = parser->root.limit; | |
182 cur = parser->root.cursor; | |
183 goto Exit; | 181 goto Exit; |
184 } | 182 } |
185 else if ( cur[1] == 's' && ft_strncmp( (char*)cur, "/sfnts", 6 ) == 0 ) | 183 else if ( cur[1] == 's' && ft_strncmp( (char*)cur, "/sfnts", 6 ) == 0 ) |
186 { | 184 { |
187 FT_TRACE2(( "cid_parser_new: cannot handle Type 11 fonts\n" )); | 185 FT_TRACE2(( "cid_parser_new: cannot handle Type 11 fonts\n" )); |
188 error = FT_THROW( Unknown_File_Format ); | 186 error = FT_THROW( Unknown_File_Format ); |
189 goto Exit; | 187 goto Exit; |
190 } | 188 } |
191 | 189 |
192 cid_parser_skip_PS_token( parser ); | 190 cid_parser_skip_PS_token( parser ); |
(...skipping 23 matching lines...) Expand all Loading... |
216 FT_Stream stream = parser->stream; | 214 FT_Stream stream = parser->stream; |
217 | 215 |
218 | 216 |
219 FT_FRAME_RELEASE( parser->postscript ); | 217 FT_FRAME_RELEASE( parser->postscript ); |
220 } | 218 } |
221 parser->root.funcs.done( &parser->root ); | 219 parser->root.funcs.done( &parser->root ); |
222 } | 220 } |
223 | 221 |
224 | 222 |
225 /* END */ | 223 /* END */ |
OLD | NEW |