From aeb407daf3711a10a27f3bc2223c5eb05158076e Mon Sep 17 00:00:00 2001 From: David 'Digit' Turner Date: Wed, 17 Aug 2011 18:21:28 +0200 Subject: Update to FreeType 2.4.6+ This patch updates our copy of the FreeType sources to 2.4.6+. More precisely, it contains source code corresponding to the state of the upstream repository at the following hash submitted on August 16 2001: c3fb981e2ac79acad09d5673352646696472f55e This corresponds to 2.4.6 with 7 more patches applied on top of it to fix bugs in the TrueType interpreter and the CFF parser. Change-Id: I9f3ac736d616020c8d10fd1d4e4be466f35fb6e7 --- src/smooth/ftgrays.c | 15 ++++----------- src/smooth/ftsmooth.c | 9 +++++++-- 2 files changed, 11 insertions(+), 13 deletions(-) (limited to 'src/smooth') diff --git a/src/smooth/ftgrays.c b/src/smooth/ftgrays.c index a85e160..40de269 100644 --- a/src/smooth/ftgrays.c +++ b/src/smooth/ftgrays.c @@ -4,7 +4,7 @@ /* */ /* A new `perfect' anti-aliasing renderer (body). */ /* */ -/* Copyright 2000-2001, 2002, 2003, 2005, 2006, 2007, 2008, 2009, 2010 by */ +/* Copyright 2000-2003, 2005-2011 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -890,14 +890,8 @@ typedef ptrdiff_t FT_PtrDist; if ( dx < dy ) dx = dy; - if ( dx <= ONE_PIXEL / 4 ) - { - gray_render_line( RAS_VAR_ arc[0].x, arc[0].y ); - return; - } - level = 0; - while ( dx > ONE_PIXEL / 4 ) + while ( dx > ONE_PIXEL / 6 ) { dx >>= 2; level++; @@ -907,7 +901,7 @@ typedef ptrdiff_t FT_PtrDist; levels[0] = level; top = 0; - while ( top >= 0 ) + do { level = levels[top]; if ( level > 1 ) @@ -940,9 +934,8 @@ typedef ptrdiff_t FT_PtrDist; gray_render_line( RAS_VAR_ arc[0].x, arc[0].y ); top--; arc -= 2; - } - return; + } while ( top >= 0 ); } diff --git a/src/smooth/ftsmooth.c b/src/smooth/ftsmooth.c index eb12f18..1350a56 100644 --- a/src/smooth/ftsmooth.c +++ b/src/smooth/ftsmooth.c @@ -4,7 +4,7 @@ /* */ /* Anti-aliasing renderer interface (body). */ /* */ -/* Copyright 2000-2001, 2002, 2003, 2004, 2005, 2006, 2009, 2010 by */ +/* Copyright 2000-2006, 2009-2011 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -105,7 +105,10 @@ FT_Error error; FT_Outline* outline = NULL; FT_BBox cbox; - FT_UInt width, height, height_org, width_org, pitch; + FT_UInt width, height, pitch; +#ifndef FT_CONFIG_OPTION_SUBPIXEL_RENDERING + FT_UInt height_org, width_org; +#endif FT_Bitmap* bitmap; FT_Memory memory; FT_Int hmul = mode == FT_RENDER_MODE_LCD; @@ -163,8 +166,10 @@ bitmap = &slot->bitmap; memory = render->root.memory; +#ifndef FT_CONFIG_OPTION_SUBPIXEL_RENDERING width_org = width; height_org = height; +#endif /* release old bitmap buffer */ if ( slot->internal->flags & FT_GLYPH_OWN_BITMAP ) -- cgit v1.2.3