From 1ee02cd0419021c3d4950af2619da39c6e9c47f0 Mon Sep 17 00:00:00 2001 From: marha Date: Mon, 21 Dec 2009 15:22:51 +0000 Subject: Updated to freetype-2.3.11 --- freetype/src/type42/t42drivr.h | 4 ++++ freetype/src/type42/t42objs.c | 15 ++++++++------- freetype/src/type42/t42parse.c | 33 ++++++++++++++++++--------------- 3 files changed, 30 insertions(+), 22 deletions(-) (limited to 'freetype/src/type42') diff --git a/freetype/src/type42/t42drivr.h b/freetype/src/type42/t42drivr.h index 98b7410b6..4717e4613 100644 --- a/freetype/src/type42/t42drivr.h +++ b/freetype/src/type42/t42drivr.h @@ -25,6 +25,10 @@ FT_BEGIN_HEADER +#ifdef FT_CONFIG_OPTION_PIC +#error "this module does not support PIC yet" +#endif + FT_EXPORT_VAR( const FT_Driver_ClassRec ) t42_driver_class; diff --git a/freetype/src/type42/t42objs.c b/freetype/src/type42/t42objs.c index 16e9809ce..9081ffc6d 100644 --- a/freetype/src/type42/t42objs.c +++ b/freetype/src/type42/t42objs.c @@ -4,7 +4,8 @@ /* */ /* Type 42 objects manager (body). */ /* */ -/* Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008 by Roberto Alameda. */ +/* Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 */ +/* by Roberto Alameda. */ /* */ /* This file is part of the FreeType project, and may only be used, */ /* modified, and distributed under the terms of the FreeType project */ @@ -19,7 +20,6 @@ #include "t42parse.h" #include "t42error.h" #include FT_INTERNAL_DEBUG_H -#include FT_INTERNAL_STREAM_H #include FT_LIST_H @@ -70,7 +70,7 @@ if ( !loader.charstrings.init ) { - FT_ERROR(( "T42_Open_Face: no charstrings array in face!\n" )); + FT_ERROR(( "T42_Open_Face: no charstrings array in face\n" )); error = T42_Err_Invalid_File_Format; } @@ -100,8 +100,8 @@ /* The index is then stored in type1.encoding.char_index, and */ /* the name in type1.encoding.char_name */ - min_char = +32000; - max_char = -32000; + min_char = 0; + max_char = 0; charcode = 0; for ( ; charcode < loader.encoding_table.max_elems; charcode++ ) @@ -127,13 +127,14 @@ { if ( charcode < min_char ) min_char = charcode; - if ( charcode > max_char ) - max_char = charcode; + if ( charcode >= max_char ) + max_char = charcode + 1; } break; } } } + type1->encoding.code_first = min_char; type1->encoding.code_last = max_char; type1->encoding.num_chars = loader.num_chars; diff --git a/freetype/src/type42/t42parse.c b/freetype/src/type42/t42parse.c index b9e408c45..13bda64c8 100644 --- a/freetype/src/type42/t42parse.c +++ b/freetype/src/type42/t42parse.c @@ -20,7 +20,6 @@ #include "t42error.h" #include FT_INTERNAL_DEBUG_H #include FT_INTERNAL_STREAM_H -#include FT_LIST_H #include FT_INTERNAL_POSTSCRIPT_AUX_H @@ -304,7 +303,7 @@ cur = parser->root.cursor; if ( cur >= limit ) { - FT_ERROR(( "t42_parse_encoding: out of bounds!\n" )); + FT_ERROR(( "t42_parse_encoding: out of bounds\n" )); parser->root.error = T42_Err_Invalid_File_Format; return; } @@ -472,7 +471,7 @@ else { - FT_ERROR(( "t42_parse_encoding: invalid token!\n" )); + FT_ERROR(( "t42_parse_encoding: invalid token\n" )); parser->root.error = T42_Err_Invalid_File_Format; } } @@ -525,7 +524,7 @@ if ( parser->root.cursor >= limit || *parser->root.cursor++ != '[' ) { - FT_ERROR(( "t42_parse_sfnts: can't find begin of sfnts vector!\n" )); + FT_ERROR(( "t42_parse_sfnts: can't find begin of sfnts vector\n" )); error = T42_Err_Invalid_File_Format; goto Fail; } @@ -570,7 +569,7 @@ if ( allocated ) { FT_ERROR(( "t42_parse_sfnts: " - "can't handle mixed binary and hex strings!\n" )); + "can't handle mixed binary and hex strings\n" )); error = T42_Err_Invalid_File_Format; goto Fail; } @@ -586,7 +585,7 @@ parser->root.cursor += string_size + 1; if ( parser->root.cursor >= limit ) { - FT_ERROR(( "t42_parse_sfnts: too many binary data!\n" )); + FT_ERROR(( "t42_parse_sfnts: too many binary data\n" )); error = T42_Err_Invalid_File_Format; goto Fail; } @@ -594,7 +593,7 @@ if ( !string_buf ) { - FT_ERROR(( "t42_parse_sfnts: invalid data in sfnts array!\n" )); + FT_ERROR(( "t42_parse_sfnts: invalid data in sfnts array\n" )); error = T42_Err_Invalid_File_Format; goto Fail; } @@ -605,7 +604,7 @@ if ( !string_size ) { - FT_ERROR(( "t42_parse_sfnts: invalid string!\n" )); + FT_ERROR(( "t42_parse_sfnts: invalid string\n" )); error = T42_Err_Invalid_File_Format; goto Fail; } @@ -670,7 +669,7 @@ /* all other tables are just copied */ if ( count >= ttf_size ) { - FT_ERROR(( "t42_parse_sfnts: too many binary data!\n" )); + FT_ERROR(( "t42_parse_sfnts: too many binary data\n" )); error = T42_Err_Invalid_File_Format; goto Fail; } @@ -717,7 +716,7 @@ if ( parser->root.cursor >= limit ) { - FT_ERROR(( "t42_parse_charstrings: out of bounds!\n" )); + FT_ERROR(( "t42_parse_charstrings: out of bounds\n" )); error = T42_Err_Invalid_File_Format; goto Fail; } @@ -759,14 +758,14 @@ } else { - FT_ERROR(( "t42_parse_charstrings: invalid token!\n" )); + FT_ERROR(( "t42_parse_charstrings: invalid token\n" )); error = T42_Err_Invalid_File_Format; goto Fail; } if ( parser->root.cursor >= limit ) { - FT_ERROR(( "t42_parse_charstrings: out of bounds!\n" )); + FT_ERROR(( "t42_parse_charstrings: out of bounds\n" )); error = T42_Err_Invalid_File_Format; goto Fail; } @@ -826,7 +825,7 @@ if ( cur + 1 >= limit ) { - FT_ERROR(( "t42_parse_charstrings: out of bounds!\n" )); + FT_ERROR(( "t42_parse_charstrings: out of bounds\n" )); error = T42_Err_Invalid_File_Format; goto Fail; } @@ -857,7 +856,7 @@ (void)T1_ToInt( parser ); if ( parser->root.cursor >= limit ) { - FT_ERROR(( "t42_parse_charstrings: out of bounds!\n" )); + FT_ERROR(( "t42_parse_charstrings: out of bounds\n" )); error = T42_Err_Invalid_File_Format; goto Fail; } @@ -880,7 +879,7 @@ if ( !notdef_found ) { - FT_ERROR(( "t42_parse_charstrings: no /.notdef glyph!\n" )); + FT_ERROR(( "t42_parse_charstrings: no /.notdef glyph\n" )); error = T42_Err_Invalid_File_Format; goto Fail; } @@ -984,6 +983,10 @@ dummy_object = &face->type1.font_info; break; + case T1_FIELD_LOCATION_FONT_EXTRA: + dummy_object = &face->type1.font_extra; + break; + case T1_FIELD_LOCATION_BBOX: dummy_object = &face->type1.font_bbox; break; -- cgit v1.2.3