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/psaux/psobjs.c | 39 ++++++++++++++++++--------------------- 1 file changed, 18 insertions(+), 21 deletions(-) (limited to 'freetype/src/psaux/psobjs.c') diff --git a/freetype/src/psaux/psobjs.c b/freetype/src/psaux/psobjs.c index 52e30a413..fe8398ae3 100644 --- a/freetype/src/psaux/psobjs.c +++ b/freetype/src/psaux/psobjs.c @@ -19,6 +19,7 @@ #include #include FT_INTERNAL_POSTSCRIPT_AUX_H #include FT_INTERNAL_DEBUG_H +#include FT_INTERNAL_CALC_H #include "psobjs.h" #include "psconv.h" @@ -564,8 +565,8 @@ cur++; if ( cur >= limit || *cur != '>' ) /* >> */ { - FT_ERROR(( "ps_parser_skip_PS_token: " - "unexpected closing delimiter `>'\n" )); + FT_ERROR(( "ps_parser_skip_PS_token:" + " unexpected closing delimiter `>'\n" )); error = PSaux_Err_Invalid_File_Format; goto Exit; } @@ -590,9 +591,10 @@ Exit: if ( cur == parser->cursor ) { - FT_ERROR(( "ps_parser_skip_PS_token: " - "current token is `%c', which is self-delimiting " - "but invalid at this point\n", + FT_ERROR(( "ps_parser_skip_PS_token:" + " current token is `%c' which is self-delimiting\n" + " " + " but invalid at this point\n", *cur )); error = PSaux_Err_Invalid_File_Format; @@ -1153,8 +1155,10 @@ } else { - FT_ERROR(( "ps_parser_load_field: expected a name or string " - "but found token of type %d instead\n", + FT_ERROR(( "ps_parser_load_field:" + " expected a name or string\n" + " " + " but found token of type %d instead\n", token.type )); error = PSaux_Err_Invalid_File_Format; goto Exit; @@ -1191,8 +1195,8 @@ if ( result < 0 ) { - FT_ERROR(( "ps_parser_load_field: " - "expected four integers in bounding box\n" )); + FT_ERROR(( "ps_parser_load_field:" + " expected four integers in bounding box\n" )); error = PSaux_Err_Invalid_File_Format; goto Exit; } @@ -1309,7 +1313,7 @@ FT_LOCAL_DEF( FT_Error ) ps_parser_to_bytes( PS_Parser parser, FT_Byte* bytes, - FT_Long max_bytes, + FT_Offset max_bytes, FT_Long* pnum_bytes, FT_Bool delimiters ) { @@ -1551,16 +1555,9 @@ FT_Byte* control = (FT_Byte*)outline->tags + outline->n_points; - if ( builder->shift ) - { - x >>= 16; - y >>= 16; - } - point->x = x; - point->y = y; + point->x = FIXED_TO_INT( x ); + point->y = FIXED_TO_INT( y ); *control = (FT_Byte)( flag ? FT_CURVE_TAG_ON : FT_CURVE_TAG_CUBIC ); - - builder->last = *point; } outline->n_points++; } @@ -1668,8 +1665,8 @@ if ( outline->n_contours > 0 ) { - /* Don't add contours only consisting of one point, i.e., */ - /* check whether begin point and last point are the same. */ + /* Don't add contours only consisting of one point, i.e., */ + /* check whether the first and the last point is the same. */ if ( first == outline->n_points - 1 ) { outline->n_contours--; -- cgit v1.2.3