summaryrefslogtreecommitdiffstats
path: root/src/smooth
diff options
context:
space:
mode:
Diffstat (limited to 'src/smooth')
-rw-r--r--src/smooth/ftgrays.c15
-rw-r--r--src/smooth/ftsmooth.c9
2 files changed, 11 insertions, 13 deletions
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 )