ref: 971517ac8e9fb75b0b2ef944a62199fc4fcb0ffe
parent: f0f1b6ae15d9f2c9c0dce7325d362c13c15878db
author: David Turner <[email protected]>
date: Mon Jul 8 19:13:25 EDT 2002
* src/pshinter/pshglob.h, src/pshinter/pshglob.c: adding support for blue fuzz
--- a/ChangeLog
+++ b/ChangeLog
@@ -17,6 +17,9 @@
2002-07-07 Owen Taylor <[email protected]>
+ * 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,
--- 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 )
{
@@ -679,6 +679,8 @@
globals->blues.blue_shift = priv->blue_shift
? priv->blue_shift
: 7;
+
+ globals->blues.blue_fuzz = priv->blue_fuzz;
globals->dimension[0].scale_mult = 0;
globals->dimension[0].scale_delta = 0;
--- a/src/pshinter/pshglob.h
+++ b/src/pshinter/pshglob.h
@@ -123,6 +123,7 @@
FT_Fixed blue_scale;
FT_Int blue_shift;
FT_Int blue_threshold;
+ FT_Int blue_fuzz;
FT_Bool no_overshoots;
} PSH_BluesRec, *PSH_Blues;
--- 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,