* src/pshinter/pshglob.h, src/pshinter/pshglob.c: adding support for blue fuzz
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
diff --git a/ChangeLog b/ChangeLog
index 68360ec..4239c37 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -17,6 +17,9 @@
2002-07-07 Owen Taylor <owen@redhat.com>
+ * src/pshinter/pshglob.h, src/pshinter/pshglob.c: adding support for
+ blue fuzz
+
* include/freetype/freetype.h, src/base/ftobjs.h,
freetype/internal/ftobjs.h, freetype/internal/psaux.h,
freetype/internal/pshints.h, src/psaux/t1decode.c, src/cff/cffgload.h,
diff --git a/src/pshinter/pshglob.c b/src/pshinter/pshglob.c
index 58c77b5..ef71396 100644
--- a/src/pshinter/pshglob.c
+++ b/src/pshinter/pshglob.c
@@ -534,10 +534,10 @@
for ( ; count > 0; count--, zone++ )
{
delta = stem_top - zone->org_bottom;
- if ( delta < 0 )
+ if ( delta < -blues->blue_fuzz )
break;
- if ( stem_top <= zone->org_top )
+ if ( stem_top <= zone->org_top + blues->blue_fuzz)
{
if ( no_shoots || delta <= blues->blue_threshold )
{
@@ -556,10 +556,10 @@
for ( ; count > 0; count--, zone-- )
{
delta = zone->org_top - stem_bot;
- if ( delta < 0 )
+ if ( delta < -blues->blue_fuzz )
break;
- if ( stem_bot >= zone->org_bottom )
+ if ( stem_bot >= zone->org_bottom - blues->blue_fuzz )
{
if ( no_shoots || delta < blues->blue_shift )
{
@@ -680,6 +680,8 @@
? priv->blue_shift
: 7;
+ globals->blues.blue_fuzz = priv->blue_fuzz;
+
globals->dimension[0].scale_mult = 0;
globals->dimension[0].scale_delta = 0;
globals->dimension[1].scale_mult = 0;
diff --git a/src/pshinter/pshglob.h b/src/pshinter/pshglob.h
index fcda9da..0a3a96a 100644
--- a/src/pshinter/pshglob.h
+++ b/src/pshinter/pshglob.h
@@ -123,6 +123,7 @@ FT_BEGIN_HEADER
FT_Fixed blue_scale;
FT_Int blue_shift;
FT_Int blue_threshold;
+ FT_Int blue_fuzz;
FT_Bool no_overshoots;
} PSH_BluesRec, *PSH_Blues;
diff --git a/src/type1/t1load.c b/src/type1/t1load.c
index d2f810d..4868a98 100644
--- a/src/type1/t1load.c
+++ b/src/type1/t1load.c
@@ -1653,6 +1653,9 @@
/* default lenIV */
type1->private_dict.lenIV = 4;
+ /* default blue fuzz, we put it there since 0 is a valid value */
+ type1->private_dict.blue_fuzz = 1;
+
parser = &loader.parser;
error = T1_New_Parser( parser,
face->root.stream,