diff options
Diffstat (limited to 'freetype/src/base/ftoutln.c')
-rw-r--r-- | freetype/src/base/ftoutln.c | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/freetype/src/base/ftoutln.c b/freetype/src/base/ftoutln.c index b214f5446..004367367 100644 --- a/freetype/src/base/ftoutln.c +++ b/freetype/src/base/ftoutln.c @@ -4,7 +4,7 @@ /* */ /* FreeType outline management (body). */ /* */ -/* Copyright 1996-2008, 2010, 2012-2014 by */ +/* Copyright 1996-2015 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -279,7 +279,7 @@ if ( error ) goto Exit; - first = last + 1; + first = (FT_UInt)last + 1; } FT_TRACE5(( "FT_Outline_Decompose: Done\n", n )); @@ -320,7 +320,7 @@ FT_NEW_ARRAY( anoutline->contours, numContours ) ) goto Fail; - anoutline->n_points = (FT_UShort)numPoints; + anoutline->n_points = (FT_Short)numPoints; anoutline->n_contours = (FT_Short)numContours; anoutline->flags |= FT_OUTLINE_OWNER; @@ -612,7 +612,6 @@ FT_Raster_Params* params ) { FT_Error error; - FT_Bool update = FALSE; FT_Renderer renderer; FT_ListNode node; @@ -646,14 +645,8 @@ /* format */ renderer = FT_Lookup_Renderer( library, FT_GLYPH_FORMAT_OUTLINE, &node ); - update = TRUE; } - /* if we changed the current renderer for the glyph image format */ - /* we need to select it as the next current one */ - if ( !error && update && renderer ) - error = FT_Set_Renderer( library, renderer, 0, 0 ); - return error; } @@ -1002,13 +995,13 @@ l = FT_MIN( l_in, l_out ); /* non-strict inequalities avoid divide-by-zero when q == l == 0 */ - if ( FT_MulFix( xstrength, q ) <= FT_MulFix( d, l ) ) + if ( FT_MulFix( xstrength, q ) <= FT_MulFix( l, d ) ) shift.x = FT_MulDiv( shift.x, xstrength, d ); else shift.x = FT_MulDiv( shift.x, l, q ); - if ( FT_MulFix( ystrength, q ) <= FT_MulFix( d, l ) ) + if ( FT_MulFix( ystrength, q ) <= FT_MulFix( l, d ) ) shift.y = FT_MulDiv( shift.y, ystrength, d ); else shift.y = FT_MulDiv( shift.y, l, q ); @@ -1050,7 +1043,7 @@ /* We use the nonzero winding rule to find the orientation. */ /* Since glyph outlines behave much more `regular' than arbitrary */ /* cubic or quadratic curves, this test deals with the polygon */ - /* only which is spanned up by the control points. */ + /* only that is spanned up by the control points. */ FT_Outline_Get_CBox( outline, &cbox ); @@ -1058,10 +1051,11 @@ if ( cbox.xMin == cbox.xMax || cbox.yMin == cbox.yMax ) return FT_ORIENTATION_NONE; - xshift = FT_MSB( FT_ABS( cbox.xMax ) | FT_ABS( cbox.xMin ) ) - 14; + xshift = FT_MSB( (FT_UInt32)( FT_ABS( cbox.xMax ) | + FT_ABS( cbox.xMin ) ) ) - 14; xshift = FT_MAX( xshift, 0 ); - yshift = FT_MSB( cbox.yMax - cbox.yMin ) - 14; + yshift = FT_MSB( (FT_UInt32)( cbox.yMax - cbox.yMin ) ) - 14; yshift = FT_MAX( yshift, 0 ); points = outline->points; |