diff options
-rw-r--r-- | Android.mk | 6 | ||||
-rw-r--r-- | src/autofit/afcjk.c | 15 | ||||
-rw-r--r-- | src/autofit/aflatin.c | 5 |
3 files changed, 14 insertions, 12 deletions
@@ -50,11 +50,6 @@ ifeq ($(TARGET_SIMULATOR),true) LOCAL_CFLAGS += "-DFT_DEBUG_MEMORY" endif -# the following activates the new experimental auto-hinter -# one that should create less problems with a wide variety -# of glyphs, including our double-decker "g" -#LOCAL_CFLAGS += -DFT_OPTION_AUTOFIT2 - # the following is for testing only, and should not be used in final builds # of the product #LOCAL_CFLAGS += "-DTT_CONFIG_OPTION_BYTECODE_INTERPRETER" @@ -65,4 +60,3 @@ LOCAL_MODULE:= libft2 include $(BUILD_STATIC_LIBRARY) endif - diff --git a/src/autofit/afcjk.c b/src/autofit/afcjk.c index fabe921..de3ce11 100644 --- a/src/autofit/afcjk.c +++ b/src/autofit/afcjk.c @@ -4,7 +4,7 @@ /* */ /* Auto-fitter hinting routines for CJK script (body). */ /* */ -/* Copyright 2006, 2007 by */ +/* Copyright 2006, 2007, 2008 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -1253,10 +1253,15 @@ else if ( after >= edge_limit ) af_cjk_align_serif_edge( hints, before, edge ); else - edge->pos = before->pos + - FT_MulDiv( edge->fpos - before->fpos, - after->pos - before->pos, - after->fpos - before->fpos ); + { + if ( after->fpos == before->fpos ) + edge->pos = before->pos; + else + edge->pos = before->pos + + FT_MulDiv( edge->fpos - before->fpos, + after->pos - before->pos, + after->fpos - before->fpos ); + } } } } diff --git a/src/autofit/aflatin.c b/src/autofit/aflatin.c index 09f9a98..ba59e5b 100644 --- a/src/autofit/aflatin.c +++ b/src/autofit/aflatin.c @@ -2008,7 +2008,10 @@ if ( before >= edges && before < edge && after < edge_limit && after > edge ) { - edge->pos = before->pos + + if ( after->opos == before->opos ) + edge->pos = before->pos; + else + edge->pos = before->pos + FT_MulDiv( edge->opos - before->opos, after->pos - before->pos, after->opos - before->opos ); |