4 |
/* */ |
/* */ |
5 |
/* Type 1 font loader (body). */ |
/* Type 1 font loader (body). */ |
6 |
/* */ |
/* */ |
7 |
/* Copyright 1996-2001, 2002, 2003, 2004 by */ |
/* Copyright 1996-2001, 2002, 2003, 2004, 2005 by */ |
8 |
/* David Turner, Robert Wilhelm, and Werner Lemberg. */ |
/* David Turner, Robert Wilhelm, and Werner Lemberg. */ |
9 |
/* */ |
/* */ |
10 |
/* This file is part of the FreeType project, and may only be used, */ |
/* This file is part of the FreeType project, and may only be used, */ |
1008 |
*base = parser->root.cursor + 1; |
*base = parser->root.cursor + 1; |
1009 |
|
|
1010 |
parser->root.cursor += *size + 1; |
parser->root.cursor += *size + 1; |
1011 |
return 1; |
return !parser->root.error; |
1012 |
} |
} |
1013 |
|
|
1014 |
FT_ERROR(( "read_binary_data: invalid size field\n" )); |
FT_ERROR(( "read_binary_data: invalid size field\n" )); |
1202 |
|
|
1203 |
parser->root.cursor = cur; |
parser->root.cursor = cur; |
1204 |
T1_Skip_PS_Token( parser ); |
T1_Skip_PS_Token( parser ); |
1205 |
|
if ( parser->root.error ) |
1206 |
|
return; |
1207 |
|
|
1208 |
len = parser->root.cursor - cur; |
len = parser->root.cursor - cur; |
1209 |
|
|
1279 |
|
|
1280 |
/* position the parser right before the `dup' of the first subr */ |
/* position the parser right before the `dup' of the first subr */ |
1281 |
T1_Skip_PS_Token( parser ); /* `array' */ |
T1_Skip_PS_Token( parser ); /* `array' */ |
1282 |
T1_Skip_Spaces ( parser ); |
if ( parser->root.error ) |
1283 |
|
return; |
1284 |
|
T1_Skip_Spaces( parser ); |
1285 |
|
|
1286 |
/* initialize subrs array -- with synthetic fonts it is possible */ |
/* initialize subrs array -- with synthetic fonts it is possible */ |
1287 |
/* we get here twice */ |
/* we get here twice */ |
1319 |
/* `noaccess' & `put'. We position the parser right */ |
/* `noaccess' & `put'. We position the parser right */ |
1320 |
/* before the next `dup', if any. */ |
/* before the next `dup', if any. */ |
1321 |
T1_Skip_PS_Token( parser ); /* `NP' or `|' or `noaccess' */ |
T1_Skip_PS_Token( parser ); /* `NP' or `|' or `noaccess' */ |
1322 |
|
if ( parser->root.error ) |
1323 |
|
return; |
1324 |
T1_Skip_Spaces ( parser ); |
T1_Skip_Spaces ( parser ); |
1325 |
|
|
1326 |
if ( ft_strncmp( (char*)parser->root.cursor, "put", 3 ) == 0 ) |
if ( ft_strncmp( (char*)parser->root.cursor, "put", 3 ) == 0 ) |
1457 |
} |
} |
1458 |
|
|
1459 |
T1_Skip_PS_Token( parser ); |
T1_Skip_PS_Token( parser ); |
1460 |
|
if ( parser->root.error ) |
1461 |
|
return; |
1462 |
|
|
1463 |
if ( *cur == '/' ) |
if ( *cur == '/' ) |
1464 |
{ |
{ |
1731 |
break; |
break; |
1732 |
|
|
1733 |
T1_Skip_PS_Token( parser ); |
T1_Skip_PS_Token( parser ); |
1734 |
T1_Skip_Spaces ( parser ); |
if ( parser->root.error ) |
1735 |
|
goto Exit; |
1736 |
|
T1_Skip_Spaces( parser ); |
1737 |
cur = parser->root.cursor; |
cur = parser->root.cursor; |
1738 |
} |
} |
1739 |
|
|
1769 |
{ |
{ |
1770 |
start_binary = cur; |
start_binary = cur; |
1771 |
T1_Skip_PS_Token( parser ); |
T1_Skip_PS_Token( parser ); |
1772 |
|
if ( parser->root.error ) |
1773 |
|
goto Exit; |
1774 |
have_integer = 1; |
have_integer = 1; |
1775 |
} |
} |
1776 |
|
|
1813 |
|
|
1814 |
parser->root.cursor = cur; |
parser->root.cursor = cur; |
1815 |
T1_Skip_PS_Token( parser ); |
T1_Skip_PS_Token( parser ); |
1816 |
|
if ( parser->root.error ) |
1817 |
|
goto Exit; |
1818 |
|
|
1819 |
len = parser->root.cursor - cur; |
len = parser->root.cursor - cur; |
1820 |
|
|