diff options
author | Werner Lemberg <wl@gnu.org> | 2012-02-08 07:31:32 +0100 |
---|---|---|
committer | Werner Lemberg <wl@gnu.org> | 2012-02-08 07:31:32 +0100 |
commit | 84f034aed978098869ba966fc280a2c89857dc2a (patch) | |
tree | 1c7ef5f101c87e25735cd67175f7ec82ac195b27 /src/autofit/aflatin.c | |
parent | e343e87d4f2914cf1a9f55c07d79530c4c85e322 (diff) | |
download | freetype2-84f034aed978098869ba966fc280a2c89857dc2a.tar.gz |
A first try to integrate the Infinality patches for the autohinter.autohinter-properties
It provides a framework for properties and adds a single property, `adjust
glyph heights'.
Diffstat (limited to 'src/autofit/aflatin.c')
-rw-r--r-- | src/autofit/aflatin.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/src/autofit/aflatin.c b/src/autofit/aflatin.c index 30145a2b7..5853d9ec4 100644 --- a/src/autofit/aflatin.c +++ b/src/autofit/aflatin.c @@ -4,7 +4,7 @@ /* */ /* Auto-fitter hinting routines for latin script (body). */ /* */ -/* Copyright 2003-2011 by */ +/* Copyright 2003-2012 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -18,6 +18,7 @@ #include <ft2build.h> #include FT_ADVANCES_H +#include FT_AUTOHINTER_H #include FT_INTERNAL_DEBUG_H #include "aflatin.h" @@ -569,10 +570,22 @@ if ( blue ) { - FT_Pos scaled = FT_MulFix( blue->shoot.org, scaler->y_scale ); - FT_Pos fitted = ( scaled + 40 ) & ~63; + FT_Pos scaled; + FT_Pos threshold; + FT_Pos fitted; + scaled = FT_MulFix( blue->shoot.org, scaler->y_scale ); + + threshold = 40; + if ( ( metrics->root.scaler.face->internal->auto_hinter_flags & + FT_AUTOHINTER_INCREASE_GLYPH_HEIGHTS ) && + metrics->root.scaler.face->size->metrics.x_ppem < 15 && + metrics->root.scaler.face->size->metrics.x_ppem > 5 ) + threshold = 52; + + fitted = ( scaled + threshold ) & ~63; + if ( scaled != fitted ) { #if 0 |