Commit 8b88466061a85ea3f4ae6753f88cf6fe94cabd1c

Werner Lemberg 2003-06-03T11:51:43

* src/autohint/ahhint.c (ah_hinter_hint_edges): Removed. Just a wrapper for ah_hint_edges. (ah_hint_edges): Renamed to... (ah_hinter_hint_edges): This. * src/base/ftobjs.c (FT_Set_Hint_Flags): Removed. Unused. * include/freetype/internal/ftobjs.h (FT_Face_InternalRec), include/freetype/internal/psaux.h (T1_DecoderRec), src/cff/cffgload.h (CFF_Builder): Remove `hint_flags' field. Unused. * src/cff/cffgload.c (cff_builder_init): Updated. (cff_decoder_parse_charstrings) <cff_op_endchar>: Call hinter->apply with decoder->hint_mode instead of builder->hint_flags. * src/psaux/t1decode.c (t1_decoder_init): Updated. * src/base/ftstroker.c (ft_stroke_border_export): s/index/idx/. * src/sfnt/sfobjs.c (sfnt_load_face): Commented out code which increased root->height by 15% if the line gap was zero. There exist fonts (containing e.g. form drawing characters) which intentionally have a zero line gap value.

diff --git a/ChangeLog b/ChangeLog
index 1286716..c5315d2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,29 @@
+2003-06-03  Werner Lemberg  <wl@gnu.org>
+
+	* src/autohint/ahhint.c (ah_hinter_hint_edges): Removed.  Just a
+	wrapper for ah_hint_edges.
+	(ah_hint_edges): Renamed to...
+	(ah_hinter_hint_edges): This.
+
+	* src/base/ftobjs.c (FT_Set_Hint_Flags): Removed.  Unused.
+
+	* include/freetype/internal/ftobjs.h (FT_Face_InternalRec),
+	include/freetype/internal/psaux.h (T1_DecoderRec),
+	src/cff/cffgload.h (CFF_Builder): Remove `hint_flags' field. 
+	Unused.
+
+	* src/cff/cffgload.c (cff_builder_init): Updated.
+	(cff_decoder_parse_charstrings) <cff_op_endchar>: Call hinter->apply
+	with decoder->hint_mode instead of builder->hint_flags.
+	* src/psaux/t1decode.c (t1_decoder_init): Updated.
+
+	* src/base/ftstroker.c (ft_stroke_border_export): s/index/idx/.
+
+	* src/sfnt/sfobjs.c (sfnt_load_face): Commented out code which
+	increased root->height by 15% if the line gap was zero.  There exist
+	fonts (containing e.g. form drawing characters) which intentionally
+	have a zero line gap value.
+
 2003-06-02  Werner Lemberg  <wl@gnu.org>
 
 	* src/cff/cffobjs.c (cff_face_init): Use symbolic names for
diff --git a/include/freetype/internal/ftobjs.h b/include/freetype/internal/ftobjs.h
index e60cb22..9dd2beb 100644
--- a/include/freetype/internal/ftobjs.h
+++ b/include/freetype/internal/ftobjs.h
@@ -296,9 +296,6 @@ FT_BEGIN_HEADER
   /*    transform_flags  :: Some flags used to classify the transform.     */
   /*                        Only used by the convenience functions.        */
   /*                                                                       */
-  /*    hint_flags       :: Some flags used to change the hinters'         */
-  /*                        behaviour.  Only used for debugging for now.   */
-  /*                                                                       */
   /*    postscript_name  :: Postscript font name for this face.            */
   /*                                                                       */
   /*    incremental_interface ::                                           */
@@ -318,8 +315,6 @@ FT_BEGIN_HEADER
     FT_Vector    transform_delta;
     FT_Int       transform_flags;
 
-    FT_UInt32    hint_flags;
-
     const char*  postscript_name;
 
 #ifdef FT_CONFIG_OPTION_INCREMENTAL
diff --git a/include/freetype/internal/psaux.h b/include/freetype/internal/psaux.h
index b85abe5..7375d67 100644
--- a/include/freetype/internal/psaux.h
+++ b/include/freetype/internal/psaux.h
@@ -664,7 +664,6 @@ FT_BEGIN_HEADER
 
     PS_Blend             blend;       /* for multiple master support */
 
-    FT_UInt32            hint_flags;
     FT_Render_Mode       hint_mode;
 
     T1_Decoder_Callback  parse_callback;
diff --git a/include/freetype/internal/pshints.h b/include/freetype/internal/pshints.h
index 15571d9..cd48f6c 100644
--- a/include/freetype/internal/pshints.h
+++ b/include/freetype/internal/pshints.h
@@ -6,7 +6,7 @@
 /*    recorders (specification only).  These are used to support native    */
 /*    T1/T2 hints in the "type1", "cid" and "cff" font drivers.            */
 /*                                                                         */
-/*  Copyright 2001, 2002 by                                                */
+/*  Copyright 2001, 2002, 2003 by                                          */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -261,13 +261,13 @@ FT_BEGIN_HEADER
   /*    been recorded.                                                     */
   /*                                                                       */
   /* @input:                                                               */
-  /*   hints      :: A handle to the Type 1 hints recorder.                */
+  /*   hints     :: A handle to the Type 1 hints recorder.                 */
   /*                                                                       */
-  /*   outline    :: A pointer to the target outline descriptor.           */
+  /*   outline   :: A pointer to the target outline descriptor.            */
   /*                                                                       */
-  /*   globals    :: The hinter globals for this font.                     */
+  /*   globals   :: The hinter globals for this font.                      */
   /*                                                                       */
-  /*   hint_flags :: Hinter bit flags.                                     */
+  /*   hint_mode :: Hinting information.                                   */
   /*                                                                       */
   /* @return:                                                              */
   /*   FreeType error code.  0 means success.                              */
@@ -542,13 +542,13 @@ FT_BEGIN_HEADER
   /*    method.                                                            */
   /*                                                                       */
   /* @input:                                                               */
-  /*    hints      :: A handle to the Type 2 hints recorder.               */
+  /*    hints     :: A handle to the Type 2 hints recorder.                */
   /*                                                                       */
-  /*    outline    :: A pointer to the target outline descriptor.          */
+  /*    outline   :: A pointer to the target outline descriptor.           */
   /*                                                                       */
-  /*    globals    :: The hinter globals for this font.                    */
+  /*    globals   :: The hinter globals for this font.                     */
   /*                                                                       */
-  /*    hint_flags :: Hinter bit flags.                                    */
+  /*    hint_mode :: Hinting information.                                  */
   /*                                                                       */
   /* @return:                                                              */
   /*   FreeType error code.  0 means success.                              */
diff --git a/src/autohint/ahhint.c b/src/autohint/ahhint.c
index 177be47..ea0ad95 100644
--- a/src/autohint/ahhint.c
+++ b/src/autohint/ahhint.c
@@ -421,8 +421,8 @@
   /*************************************************************************/
 
 
-  static void
-  ah_hint_edges( AH_Hinter  hinter )
+  FT_LOCAL_DEF( void )
+  ah_hinter_hint_edges( AH_Hinter  hinter )
   {
     AH_Edge     edges;
     AH_Edge     edge_limit;
@@ -789,18 +789,6 @@
   }
 
 
-  FT_LOCAL_DEF( void )
-  ah_hinter_hint_edges( AH_Hinter  hinter )
-  {
-    /* AH_Interpolate_Blue_Edges( hinter ); -- doesn't seem to help      */
-    /* reduce the problem of the disappearing eye in the `e' of Times... */
-    /* also, creates some artifacts near the blue zones?                 */
-    {
-      ah_hint_edges( hinter );
-    }
-  }
-
-
   /*************************************************************************/
   /*************************************************************************/
   /*************************************************************************/
diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c
index fefa9da..fe07883 100644
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -427,24 +427,6 @@
   }
 
 
-  /* documentation is in freetype.h */
-
-  FT_EXPORT_DEF( void )
-  FT_Set_Hint_Flags( FT_Face   face,
-                     FT_ULong  flags )
-  {
-    FT_Face_Internal  internal;
-
-
-    if ( !face )
-      return;
-
-    internal = face->internal;
-
-    internal->hint_flags = (FT_UInt)flags;
-  }
-
-
   static FT_Renderer
   ft_lookup_glyph_renderer( FT_GlyphSlot  slot );
 
diff --git a/src/base/ftstroker.c b/src/base/ftstroker.c
index 9b19bc8..34c93ed 100644
--- a/src/base/ftstroker.c
+++ b/src/base/ftstroker.c
@@ -578,14 +578,14 @@
       FT_UInt    count = border->num_points;
       FT_Byte*   tags  = border->tags;
       FT_Short*  write = outline->contours + outline->n_contours;
-      FT_Short   index = (FT_Short)outline->n_points;
+      FT_Short   idx   = (FT_Short)outline->n_points;
 
 
-      for ( ; count > 0; count--, tags++, index++ )
+      for ( ; count > 0; count--, tags++, idx++ )
       {
         if ( *tags & FT_STROKE_TAG_END )
         {
-          *write++ = index;
+          *write++ = idx;
           outline->n_contours++;
         }
       }
diff --git a/src/cff/cffgload.c b/src/cff/cffgload.c
index 0d75d89..d6248fe 100644
--- a/src/cff/cffgload.c
+++ b/src/cff/cffgload.c
@@ -246,7 +246,6 @@
       builder->current = &loader->current.outline;
       FT_GlyphLoader_Rewind( loader );
 
-      builder->hint_flags    = FT_FACE(face)->internal->hint_flags;
       builder->hints_globals = 0;
       builder->hints_funcs   = 0;
 
@@ -1770,7 +1769,7 @@
             hinter->apply( hinter->hints,
                            builder->current,
                            (PSH_Globals)builder->hints_globals,
-                           builder->hint_flags );
+                           decoder->hint_mode );
           }
 
           /* add current outline to the glyph slot */
diff --git a/src/cff/cffgload.h b/src/cff/cffgload.h
index a1be92c..3adfe7c 100644
--- a/src/cff/cffgload.h
+++ b/src/cff/cffgload.h
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    OpenType Glyph Loader (specification).                               */
 /*                                                                         */
-/*  Copyright 1996-2001, 2002 by                                           */
+/*  Copyright 1996-2001, 2002, 2003 by                                     */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -114,8 +114,6 @@ FT_BEGIN_HEADER
     FT_Error        error;         /* only used for memory errors */
     FT_Bool         metrics_only;
 
-    FT_UInt32       hint_flags;
-
     void*           hints_funcs;    /* hinter-specific */
     void*           hints_globals;  /* hinter-specific */
 
diff --git a/src/psaux/t1decode.c b/src/psaux/t1decode.c
index 27b4e87..ec741ff 100644
--- a/src/psaux/t1decode.c
+++ b/src/psaux/t1decode.c
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    PostScript Type 1 decoding routines (body).                          */
 /*                                                                         */
-/*  Copyright 2000-2001, 2002 by                                           */
+/*  Copyright 2000-2001, 2002, 2003 by                                     */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -1148,7 +1148,6 @@
 
     decoder->num_glyphs     = (FT_UInt)face->num_glyphs;
     decoder->glyph_names    = glyph_names;
-    decoder->hint_flags     = face->internal->hint_flags;
     decoder->hint_mode      = hint_mode;
     decoder->blend          = blend;
     decoder->parse_callback = parse_callback;
diff --git a/src/sfnt/sfobjs.c b/src/sfnt/sfobjs.c
index 08c24be..5eeea6e 100644
--- a/src/sfnt/sfobjs.c
+++ b/src/sfnt/sfobjs.c
@@ -708,10 +708,12 @@
         root->height    = (FT_Short)( root->ascender - root->descender +
                                       face->horizontal.Line_Gap );
 
+#if 0
         /* if the line_gap is 0, we add an extra 15% to the text height --  */
         /* this computation is based on various versions of Times New Roman */
         if ( face->horizontal.Line_Gap == 0 )
           root->height = (FT_Short)( ( root->height * 115 + 50 ) / 100 );
+#endif
 
 #if 0