shithub: freetype+ttf2subf

Download patch

ref: 123429962025b376145a2541cc9b980722ad1440
parent: 2652bd54122de9ed7feb5e0478f310ed70703e86
author: Werner Lemberg <[email protected]>
date: Sat Aug 19 07:18:09 EDT 2006

formatting

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -14,63 +14,99 @@
 	* freetype2/src/sfnt/ttcmap.c (tt_face_build_cmaps): Same for
 	local variable `cmap'.
 
-
 2006-08-16  David Turner  <[email protected]>
 
-    * src/cid/cidgload.c (cid_slot_load_glyph),
-    src/truetype/ttgload.c (tt_prepare_zone): removing compiler warnings
+	* src/cid/cidgload.c (cid_slot_load_glyph): Remove compiler
+	warnings.
 
-    * src/base/ftobjs.c (ft_validator_run): disabling function, it is
-    buggy by design, so it will always return -1
+	* src/base/ftobjs.c (ft_validator_run): Disable function; it is
+	buggy by design.  Always return -1.
 
-    * include/freetype/internal/ftgloadr.h,
-    include/freetype/internal/tttypes.h, src/base/ftgloadr.c,
-    src/base/ftobjs.c, src/truetype/ttgload.c, src/truetype/ttinterp.c,
-    src/truetype/ttobjs.c: improvements to native TrueType hinting,
-    this is a first try, controlled by the FIX_BYTECODE macro in
-    src/truetype/ttinterp.c
 
+	Improvements to native TrueType hinting. This is a first try,
+	controlled by the FIX_BYTECODE macro in src/truetype/ttinterp.c.
 
+	* include/freetype/internal/ftgloadr.h (FT_GlyphLoadRec): Add member
+	`extra_points2'.
+
+	* include/freetype/internal/tttypes.h (TT_GlyphZoneRec): Add member
+	`orus'.
+
+	* src/base/ftgloadr.c (FT_GlyphLoader_Reset,
+	FT_GlyphLoader_Adjust_Points, FT_GlyphLoader_CreateExtra,
+	FT_GlyphLoader_CheckPoints, FT_GlyphLoader_CopyPoints): Updated to
+	handle `extra_points2'.
+
+	* src/truetype/ttgload.c (tt_prepare_zone): Handle `orus'.
+	Remove compiler warning.
+	(cur_to_arg): Remove macro.
+	(TT_Hint_Glyph): Updated.
+	(TT_Process_Simple_Glyph): Handle `orus'.
+
+	* src/truetype/ttinterp.c (FIX_BYTECODE): New macro.
+	(Ins_MD, Ins_MDRP, Ins_IP) [FIX_BYTECODE]: Handle `orus'.
+	(LOC_Ins_IUP): Renamed to...
+	(IUP_WorkerRec): This.
+	Add `orus' member.
+	(Shift): Renamed to...
+	(_iup_worker_shift): This.
+	Updated.
+	(Interp): Renamed to...
+	(_iup_worker_interpolate): This.
+	Updated to handle `orus'.
+	(Ins_IUP): Updated.
+
+	* src/truetype/ttobjs.c (tt_glyphzone_done, tt_glyphzone_new):
+	Handle `orus'.
+
 2006-08-15  suzuki toshiya  <[email protected]>
 
 	* modules.cfg (BASE_EXTENSIONS): Compile in ftgxval.c by default to
-	build ftvalid in ft2demos. Commit on 2006-02-28 had been slipped.
+	build ftvalid in ft2demos.  This has been inadvertedly changed
+	2006-08-13.
 
 2006-08-15  suzuki toshiya  <[email protected]>
 
-	`ft_validator_run' wrapping `setjmp' can cause crash, found by Jens:
-	http://lists.nongnu.org/archive/html/freetype-devel/2006-08/msg00004.htm
+	`ft_validator_run' wrapping `setjmp' can cause a crash, as found by
+	Jens:
+	http://lists.nongnu.org/archive/html/freetype-devel/2006-08/msg00004.htm.
 
-	* freetype2/src/otvalid/otvmod.c: replace `ft_validator_run' by
-	`ft_setjmp'. It reverts the change introduced on 2005-08-20.
+	* freetype2/src/otvalid/otvmod.c: Replace `ft_validator_run' by
+	`ft_setjmp'.  It reverts the change introduced on 2005-08-20.
 
 	* freetype2/src/gxvalid/gxvmod.c: Ditto.
 
 2006-08-13  Jens Claudius  <[email protected]>
 
-	* freetype2/include/freetype/internal/psaux.h: (enum T1_TokenType_):
-	add T1_TOKEN_TYPE_KEY. (struct T1_FieldRec_) add `dict'. Add macros
-	T1_FIELD_DICT_FONTDICT and  T1_FIELD_DICT_PRIVATE. Change T1_NEW_XXX and
-	T1_FIELD_XXX macros to take the dictionary where the PS keywords is
-	expected as an additional argument.
+	* freetype2/include/freetype/internal/psaux.h: (T1_TokenType): Add
+	T1_TOKEN_TYPE_KEY.
+	(T1_FieldRec): Add `dict'.
+	(T1_FIELD_DICT_FONTDICT, T1_FIELD_DICT_PRIVATE): New macros.
+	(T1_NEW_XXX, T1_FIELD_XXX): Update to take the dictionary where a PS
+	keyword is expected as an additional argument.
 
-	* freetype2/src/cid/cidload.c: (T1_FieldRec): Adjust invocations
-	of T1_FIELD_XXX.
+	* freetype2/src/cid/cidload.c: (cid_field_records): Adjust
+	invocations of T1_FIELD_XXX.
 
 	* freetype2/src/cid/cidtoken.h: Adjust invocations of T1_FIELD_XXX.
 
 	* freetype2/src/psaux/psobjs.c: Add macro FT_COMPONENT for tracing.
-	(ps_parser_to_token): Report a PostScript key as T1_TOKEN_TYPE_KEY
-	instead as T1_TOKEN_TYPE_ANY. (ps_parser_load_field): Make sure a token
-	that should be a string or name is a string or name indeed. Avoid
-	memory leak if a keyword has been already encountered and its value
-	is overwritten.
+	(ps_parser_to_token): Report a PostScript key as T1_TOKEN_TYPE_KEY,
+	not T1_TOKEN_TYPE_ANY.
+	(ps_parser_load_field): Make sure a token that should be a string or
+	name is really a string or name.
+	Avoid memory leak if a keyword has been already encountered and its
+	value is overwritten.
+	* freetype2/src/type1/t1load.c: (t1_keywords): Adjust invocations of
+	T1_FIELD_XXX.
+	(parse_dict): Ignore keywords that occur in the wrong dictionary
+	(e.g., in `Private' instead of `FontDict').
 
-	* freetype2/src/type1/t1load.c: (T1_FieldRec): Adjust invocations of
-	T1_FIELD_XXX. (parse_dict): Ignore keywords that occur in the wrong
-	dictionary (e.g., in Private instead of FontDict).
+	* freetype2/src/type1/t1tokens.h: Adjust invocations of
+	T1_FIELD_XXX.
 
-	* freetype2/src/type1/t1tokens.h: Adjust invocations of T1_FIELD_XXX.
+	* freetype2/src/type42/t42parse.c: (t42_keywords): Adjust
+	invocations of T1_FIELD_XXX.
 
 2006-07-18  Jens Claudius  <[email protected]>
 
--- a/src/base/ftgloadr.c
+++ b/src/base/ftgloadr.c
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    The FreeType glyph loader (body).                                    */
 /*                                                                         */
-/*  Copyright 2002, 2003, 2004, 2005 by                                    */
+/*  Copyright 2002, 2003, 2004, 2005, 2006 by                              */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg                       */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -168,7 +168,7 @@
     FT_Memory  memory = loader->memory;
 
 
-    if ( !FT_NEW_ARRAY( loader->base.extra_points, 2*loader->max_points ) )
+    if ( !FT_NEW_ARRAY( loader->base.extra_points, 2 * loader->max_points ) )
     {
       loader->use_extra          = 1;
       loader->base.extra_points2 = loader->base.extra_points +
@@ -224,7 +224,8 @@
 
       if ( loader->use_extra )
       {
-        if ( FT_RENEW_ARRAY( loader->base.extra_points, old_max*2, new_max*2 ) )
+        if ( FT_RENEW_ARRAY( loader->base.extra_points,
+                             old_max * 2, new_max * 2 ) )
           goto Exit;
 
         FT_ARRAY_MOVE( loader->base.extra_points + new_max,
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -78,8 +78,9 @@
   FT_BASE_DEF( FT_Int )
   ft_validator_run( FT_Validator  valid )
   {
-    /* this function is so buggy, none should be calling it */
-    FT_UNUSED(valid);
+    /* This function doesn't work!  None should call it. */
+    FT_UNUSED( valid );
+
     return -1;
   }
 
--- a/src/cid/cidgload.c
+++ b/src/cid/cidgload.c
@@ -298,7 +298,7 @@
                                            hinting,
                                            FT_LOAD_TARGET_MODE( load_flags ),
                                            cid_load_glyph );
-    if (error)
+    if ( error )
       goto Exit;
 
     /* TODO: initialize decoder.len_buildchar and decoder.buildchar */
@@ -309,7 +309,7 @@
       ( ( load_flags & FT_LOAD_NO_RECURSE ) != 0 ) );
 
     error = cid_load_glyph( &decoder, glyph_index );
-    if (error)
+    if ( error )
       goto Exit;
 
     font_matrix = decoder.font_matrix;
@@ -318,7 +318,7 @@
     /* save new glyph tables */
     psaux->t1_decoder_funcs->done( &decoder );
 
-    /* now, set the metrics -- this is rather simple, as   */
+    /* now set the metrics -- this is rather simple, as    */
     /* the left side bearing is the xMin, and the top side */
     /* bearing the yMax                                    */
     cidglyph->outline.flags &= FT_OUTLINE_OWNER;
@@ -334,9 +334,9 @@
       cidglyph->metrics.horiBearingX = decoder.builder.left_bearing.x;
       cidglyph->metrics.horiAdvance  = decoder.builder.advance.x;
 
-      internal->glyph_matrix         = font_matrix;
-      internal->glyph_delta          = font_offset;
-      internal->glyph_transformed    = 1;
+      internal->glyph_matrix      = font_matrix;
+      internal->glyph_delta       = font_offset;
+      internal->glyph_transformed = 1;
     }
     else
     {
@@ -371,6 +371,7 @@
       advance.y = 0;
       FT_Vector_Transform( &advance, &font_matrix );
       metrics->horiAdvance = advance.x + font_offset.x;
+
       advance.x = 0;
       advance.y = metrics->vertAdvance;
       FT_Vector_Transform( &advance, &font_matrix );
@@ -395,8 +396,8 @@
           }
 
         /* Then scale the metrics */
-        metrics->horiAdvance  = FT_MulFix( metrics->horiAdvance,  x_scale );
-        metrics->vertAdvance  = FT_MulFix( metrics->vertAdvance,  y_scale );
+        metrics->horiAdvance = FT_MulFix( metrics->horiAdvance, x_scale );
+        metrics->vertAdvance = FT_MulFix( metrics->vertAdvance, y_scale );
       }
 
       /* compute the other metrics */
--- a/src/cid/cidload.c
+++ b/src/cid/cidload.c
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    CID-keyed Type1 font loader (body).                                  */
 /*                                                                         */
-/*  Copyright 1996-2001, 2002, 2003, 2004, 2005 by                         */
+/*  Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006 by                   */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
--- a/src/cid/cidtoken.h
+++ b/src/cid/cidtoken.h
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    CID token definitions (specification only).                          */
 /*                                                                         */
-/*  Copyright 1996-2001, 2002, 2003 by                                     */
+/*  Copyright 1996-2001, 2002, 2003, 2006 by                               */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -21,17 +21,17 @@
 #undef  T1CODE
 #define T1CODE        T1_FIELD_LOCATION_CID_INFO
 
-  T1_FIELD_KEY   ( "CIDFontName", cid_font_name, 0 )
-  T1_FIELD_NUM   ( "CIDFontVersion", cid_version, 0 )
-  T1_FIELD_NUM   ( "CIDFontType", cid_font_type, 0 )
-  T1_FIELD_STRING( "Registry", registry, 0 )
-  T1_FIELD_STRING( "Ordering", ordering, 0 )
-  T1_FIELD_NUM   ( "Supplement", supplement, 0 )
-  T1_FIELD_NUM   ( "UIDBase", uid_base, 0 )
-  T1_FIELD_NUM   ( "CIDMapOffset", cidmap_offset, 0 )
-  T1_FIELD_NUM   ( "FDBytes", fd_bytes, 0 )
-  T1_FIELD_NUM   ( "GDBytes", gd_bytes, 0 )
-  T1_FIELD_NUM   ( "CIDCount", cid_count, 0 )
+  T1_FIELD_KEY   ( "CIDFontName",    cid_font_name, 0 )
+  T1_FIELD_NUM   ( "CIDFontVersion", cid_version,   0 )
+  T1_FIELD_NUM   ( "CIDFontType",    cid_font_type, 0 )
+  T1_FIELD_STRING( "Registry",       registry,      0 )
+  T1_FIELD_STRING( "Ordering",       ordering,      0 )
+  T1_FIELD_NUM   ( "Supplement",     supplement,    0 )
+  T1_FIELD_NUM   ( "UIDBase",        uid_base,      0 )
+  T1_FIELD_NUM   ( "CIDMapOffset",   cidmap_offset, 0 )
+  T1_FIELD_NUM   ( "FDBytes",        fd_bytes,      0 )
+  T1_FIELD_NUM   ( "GDBytes",        gd_bytes,      0 )
+  T1_FIELD_NUM   ( "CIDCount",       cid_count,     0 )
 
 
 #undef  FT_STRUCTURE
@@ -39,14 +39,14 @@
 #undef  T1CODE
 #define T1CODE        T1_FIELD_LOCATION_FONT_INFO
 
-  T1_FIELD_STRING( "version", version, 0 )
-  T1_FIELD_STRING( "Notice", notice, 0 )
-  T1_FIELD_STRING( "FullName", full_name, 0 )
-  T1_FIELD_STRING( "FamilyName", family_name, 0 )
-  T1_FIELD_STRING( "Weight", weight, 0 )
-  T1_FIELD_NUM   ( "ItalicAngle", italic_angle, 0 )
-  T1_FIELD_BOOL  ( "isFixedPitch", is_fixed_pitch, 0 )
-  T1_FIELD_NUM   ( "UnderlinePosition", underline_position, 0 )
+  T1_FIELD_STRING( "version",            version,             0 )
+  T1_FIELD_STRING( "Notice",             notice,              0 )
+  T1_FIELD_STRING( "FullName",           full_name,           0 )
+  T1_FIELD_STRING( "FamilyName",         family_name,         0 )
+  T1_FIELD_STRING( "Weight",             weight,              0 )
+  T1_FIELD_NUM   ( "ItalicAngle",        italic_angle,        0 )
+  T1_FIELD_BOOL  ( "isFixedPitch",       is_fixed_pitch,      0 )
+  T1_FIELD_NUM   ( "UnderlinePosition",  underline_position,  0 )
   T1_FIELD_NUM   ( "UnderlineThickness", underline_thickness, 0 )
 
 
@@ -55,15 +55,15 @@
 #undef  T1CODE
 #define T1CODE        T1_FIELD_LOCATION_FONT_DICT
 
-  T1_FIELD_NUM  ( "PaintType", paint_type, 0 )
-  T1_FIELD_NUM  ( "FontType", font_type, 0 )
-  T1_FIELD_NUM  ( "SubrMapOffset", subrmap_offset, 0 )
-  T1_FIELD_NUM  ( "SDBytes", sd_bytes, 0 )
-  T1_FIELD_NUM  ( "SubrCount", num_subrs, 0 )
-  T1_FIELD_NUM  ( "lenBuildCharArray", len_buildchar, 0 )
+  T1_FIELD_NUM  ( "PaintType",          paint_type,          0 )
+  T1_FIELD_NUM  ( "FontType",           font_type,           0 )
+  T1_FIELD_NUM  ( "SubrMapOffset",      subrmap_offset,      0 )
+  T1_FIELD_NUM  ( "SDBytes",            sd_bytes,            0 )
+  T1_FIELD_NUM  ( "SubrCount",          num_subrs,           0 )
+  T1_FIELD_NUM  ( "lenBuildCharArray",  len_buildchar,       0 )
   T1_FIELD_FIXED( "ForceBoldThreshold", forcebold_threshold, 0 )
-  T1_FIELD_FIXED( "ExpansionFactor", expansion_factor, 0 )
-  T1_FIELD_FIXED( "StrokeWidth", stroke_width, 0 )
+  T1_FIELD_FIXED( "ExpansionFactor",    expansion_factor,    0 )
+  T1_FIELD_FIXED( "StrokeWidth",        stroke_width,        0 )
 
 
 #undef  FT_STRUCTURE
@@ -71,26 +71,26 @@
 #undef  T1CODE
 #define T1CODE        T1_FIELD_LOCATION_PRIVATE
 
-  T1_FIELD_NUM       ( "UniqueID", unique_id, 0 )
-  T1_FIELD_NUM       ( "lenIV", lenIV, 0 )
-  T1_FIELD_NUM       ( "LanguageGroup", language_group, 0 )
-  T1_FIELD_NUM       ( "password", password, 0 )
+  T1_FIELD_NUM       ( "UniqueID",         unique_id,      0 )
+  T1_FIELD_NUM       ( "lenIV",            lenIV,          0 )
+  T1_FIELD_NUM       ( "LanguageGroup",    language_group, 0 )
+  T1_FIELD_NUM       ( "password",         password,       0 )
 
-  T1_FIELD_FIXED_1000( "BlueScale", blue_scale, 0 )
-  T1_FIELD_NUM       ( "BlueShift", blue_shift, 0 )
-  T1_FIELD_NUM       ( "BlueFuzz",  blue_fuzz, 0 )
+  T1_FIELD_FIXED_1000( "BlueScale",        blue_scale,     0 )
+  T1_FIELD_NUM       ( "BlueShift",        blue_shift,     0 )
+  T1_FIELD_NUM       ( "BlueFuzz",         blue_fuzz,      0 )
 
-  T1_FIELD_NUM_TABLE ( "BlueValues", blue_values, 14, 0 )
-  T1_FIELD_NUM_TABLE ( "OtherBlues", other_blues, 10, 0 )
-  T1_FIELD_NUM_TABLE ( "FamilyBlues", family_blues, 14, 0 )
+  T1_FIELD_NUM_TABLE ( "BlueValues",       blue_values,        14, 0 )
+  T1_FIELD_NUM_TABLE ( "OtherBlues",       other_blues,        10, 0 )
+  T1_FIELD_NUM_TABLE ( "FamilyBlues",      family_blues,       14, 0 )
   T1_FIELD_NUM_TABLE ( "FamilyOtherBlues", family_other_blues, 10, 0 )
 
-  T1_FIELD_NUM_TABLE2( "StdHW", standard_width,  1, 0 )
-  T1_FIELD_NUM_TABLE2( "StdVW", standard_height, 1, 0 )
-  T1_FIELD_NUM_TABLE2( "MinFeature", min_feature, 2, 0 )
+  T1_FIELD_NUM_TABLE2( "StdHW",            standard_width,      1, 0 )
+  T1_FIELD_NUM_TABLE2( "StdVW",            standard_height,     1, 0 )
+  T1_FIELD_NUM_TABLE2( "MinFeature",       min_feature,         2, 0 )
 
-  T1_FIELD_NUM_TABLE ( "StemSnapH", snap_widths, 12, 0 )
-  T1_FIELD_NUM_TABLE ( "StemSnapV", snap_heights, 12, 0 )
+  T1_FIELD_NUM_TABLE ( "StemSnapH",        snap_widths,        12, 0 )
+  T1_FIELD_NUM_TABLE ( "StemSnapV",        snap_heights,       12, 0 )
 
 #undef  FT_STRUCTURE
 #define FT_STRUCTURE  FT_BBox
--- a/src/gxvalid/gxvmod.c
+++ b/src/gxvalid/gxvmod.c
@@ -4,7 +4,8 @@
 /*                                                                         */
 /*    FreeType's TrueTypeGX/AAT validation module implementation (body).   */
 /*                                                                         */
-/*  Copyright 2004, 2005 by suzuki toshiya, Masatake YAMATO, Red Hat K.K., */
+/*  Copyright 2004, 2005, 2006                                             */
+/*  by suzuki toshiya, Masatake YAMATO, Red Hat K.K.,                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -72,9 +73,9 @@
   }
 
 
-#define GXV_TABLE_DECL( _sfnt )                  \
-          FT_Byte* volatile _sfnt        = NULL; \
-          FT_ULong           len_ ## _sfnt = 0
+#define GXV_TABLE_DECL( _sfnt )                     \
+          FT_Byte* volatile  _sfnt          = NULL; \
+          FT_ULong            len_ ## _sfnt = 0
 
 #define GXV_TABLE_LOAD( _sfnt )                                     \
           if ( ( FT_VALIDATE_ ## _sfnt ## _INDEX < table_count ) && \
@@ -109,10 +110,10 @@
                 FT_Bytes  tables[FT_VALIDATE_GX_LENGTH],
                 FT_UInt   table_count )
   {
-    FT_Memory volatile       memory = FT_FACE_MEMORY( face );
+    FT_Memory volatile        memory = FT_FACE_MEMORY( face );
 
-    FT_Error                 error = GXV_Err_Ok;
-    FT_ValidatorRec volatile valid;
+    FT_Error                  error = GXV_Err_Ok;
+    FT_ValidatorRec volatile  valid;
 
     FT_UInt  i;
 
--- a/src/otvalid/otvmod.c
+++ b/src/otvalid/otvmod.c
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType's OpenType validation module implementation (body).         */
 /*                                                                         */
-/*  Copyright 2004, 2005 by                                                */
+/*  Copyright 2004, 2005, 2006 by                                          */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -67,20 +67,20 @@
   static FT_Error
   otv_validate( FT_Face volatile   face,
                 FT_UInt            ot_flags,
-                FT_Bytes           *ot_base,
-                FT_Bytes           *ot_gdef,
-                FT_Bytes           *ot_gpos,
-                FT_Bytes           *ot_gsub,
-                FT_Bytes           *ot_jstf )
+                FT_Bytes          *ot_base,
+                FT_Bytes          *ot_gdef,
+                FT_Bytes          *ot_gpos,
+                FT_Bytes          *ot_gsub,
+                FT_Bytes          *ot_jstf )
   {
-    FT_Error                 error = OTV_Err_Ok;
-    FT_Byte* volatile        base;
-    FT_Byte* volatile        gdef;
-    FT_Byte* volatile        gpos;
-    FT_Byte* volatile        gsub;
-    FT_Byte* volatile        jstf;
-    FT_ULong                 len_base, len_gdef, len_gpos, len_gsub, len_jstf;
-    FT_ValidatorRec volatile valid;
+    FT_Error                  error = OTV_Err_Ok;
+    FT_Byte* volatile         base;
+    FT_Byte* volatile         gdef;
+    FT_Byte* volatile         gpos;
+    FT_Byte* volatile         gsub;
+    FT_Byte* volatile         jstf;
+    FT_ULong                  len_base, len_gdef, len_gpos, len_gsub, len_jstf;
+    FT_ValidatorRec volatile  valid;
 
 
     base     = gdef     = gpos     = gsub     = jstf     = NULL;
--- a/src/truetype/ttgload.c
+++ b/src/truetype/ttgload.c
@@ -618,7 +618,7 @@
 #ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
     /* save original point positioin in org */
     if ( n_ins > 0 )
-      FT_ARRAY_COPY( zone->org,  zone->cur, zone->n_points );
+      FT_ARRAY_COPY( zone->org, zone->cur, zone->n_points );
 #endif
 
     /* round pp2 and pp4 */
--- a/src/truetype/ttinterp.c
+++ b/src/truetype/ttinterp.c
@@ -16,11 +16,11 @@
 /***************************************************************************/
 
 
-/* define FIX_BYTECODE to implement the bytecode interpreter fixes needed
- * to match Windows behaviour more accurately
- */
+  /* define FIX_BYTECODE to implement the bytecode interpreter fixes */
+  /* needed to match Windows behaviour more accurately               */
 #define  FIX_BYTECODE
 
+
 #include <ft2build.h>
 #include FT_INTERNAL_DEBUG_H
 #include FT_INTERNAL_CALC_H
@@ -4787,15 +4787,16 @@
         D = CUR_Func_project( CUR.zp0.cur + L, CUR.zp1.cur + K );
       else
       {
+
 #ifdef FIX_BYTECODE
+
         FT_Vector  vec1, vec2;
 
+
         if ( CUR.GS.gep0 == 0 || CUR.GS.gep1 == 0 )
-        {
           FT_ARRAY_COPY( CUR.twilight.orus,
                          CUR.twilight.org,
                          CUR.twilight.n_points );
-        }
 
         /* get scaled orus coordinates */
         vec1 = CUR.zp0.orus[L];
@@ -4807,9 +4808,12 @@
         vec2.y = TT_MULFIX( vec2.y, CUR.metrics.y_scale );
 
         D = CUR_Func_dualproj( &vec1, &vec2 );
+
 #else
+
         D = CUR_Func_dualproj( CUR.zp0.org + L, CUR.zp1.org + K );
-#endif
+
+#endif /* FIX_BYTECODE */
       }
     }
 
@@ -5725,9 +5729,11 @@
     /*      twilight zone?                                  */
 
 #ifdef FIX_BYTECODE
+
     {
       FT_Vector  vec1, vec2;
 
+
       if ( CUR.GS.gep0 == 0 || CUR.GS.gep1 == 0 )
         FT_ARRAY_COPY( CUR.twilight.orus,
                        CUR.twilight.org,
@@ -5744,13 +5750,16 @@
 
       org_dist = CUR_Func_dualproj( &vec1, &vec2 );
     }
+
 #else
+
     org_dist = CUR_Func_dualproj( CUR.zp1.org + point,
                                   CUR.zp0.org + CUR.GS.rp0 );
-#endif
 
-    /* single width cutin test */
+#endif /* FIX_BYTECODE */
 
+    /* single width cut-in test */
+
     if ( FT_ABS( org_dist - CUR.GS.single_width_value ) <
          CUR.GS.single_width_cutin )
     {
@@ -6117,13 +6126,15 @@
     }
 
 #ifdef FIX_BYTECODE
-   /* we need to deal in a special way with the twilight zone
-    * the easiest is simply to copy the coordinates from 'org' to 'orus'
-    * whenever someone tries to perform intersections based on some
-    * of its points.
-    *
-    * otherwise, by definition value of CUR.twilight[n] is (0,0), whatever 'n'
-    */
+
+    /* We need to deal in a special way with the twilight zone.  The easiest
+     * solution is simply to copy the coordinates from `org' to `orus'
+     * whenever someone tries to perform intersections based on some of its
+     * points.
+     *
+     * Otherwise, by definition, value of CUR.twilight[n] is (0,0),
+     * whatever value of `n'.
+     */
     if ( CUR.GS.gep0 == 0 || CUR.GS.gep1 == 0 || CUR.GS.gep2 == 0 )
     {
       FT_ARRAY_COPY( CUR.twilight.orus,
@@ -6130,6 +6141,7 @@
                      CUR.twilight.org,
                      CUR.twilight.n_points );
     }
+
 #endif /* FIX_BYTECODE */
 
     /* XXX: There are some glyphs in some braindead but popular  */
@@ -6145,9 +6157,12 @@
     }
     else
     {
+
 #ifdef FIX_BYTECODE
+
       FT_Vector  vec1, vec2;
 
+
       vec1   = CUR.zp0.orus[CUR.GS.rp1];
       vec2   = CUR.zp1.orus[CUR.GS.rp2];
       vec1.x = TT_MULFIX( vec1.x, CUR.metrics.x_scale );
@@ -6157,11 +6172,14 @@
 
       org_a = CUR_Func_dualproj( &vec1, NULL_Vector );
       org_b = CUR_Func_dualproj( &vec2, NULL_Vector );
+
 #else
+
       org_a = CUR_Func_dualproj( CUR.zp0.org + CUR.GS.rp1, NULL_Vector );
       org_b = CUR_Func_dualproj( CUR.zp1.org + CUR.GS.rp2, NULL_Vector );
-#endif
 
+#endif /* FIX_BYTECODE */
+
       cur_a = CUR_Func_project( CUR.zp0.cur + CUR.GS.rp1, NULL_Vector );
       cur_b = CUR_Func_project( CUR.zp1.cur + CUR.GS.rp2, NULL_Vector );
     }
@@ -6181,17 +6199,24 @@
       }
       else
       {
+
 #ifdef FIX_BYTECODE
+
         FT_Vector  vec;
 
+
         vec   = CUR.zp2.orus[point];
         vec.x = TT_MULFIX( vec.x, CUR.metrics.x_scale );
         vec.y = TT_MULFIX( vec.y, CUR.metrics.y_scale );
 
         org_x = CUR_Func_dualproj( &vec, NULL_Vector );
+
 #else
+
         org_x = CUR_Func_dualproj( CUR.zp2.org + point, NULL_Vector );
-#endif
+
+#endif /* FIX_BYTECODE */
+
         cur_x = CUR_Func_project ( CUR.zp2.cur + point, NULL_Vector );
 
         if ( ( org_a <= org_b && org_x <= org_a ) ||
@@ -6306,13 +6331,19 @@
     orus1 = worker->orus[ref1].x;
     orus2 = worker->orus[ref2].x;
 
-    if (orus1 > orus2)
+    if ( orus1 > orus2 )
     {
       FT_F26Dot6  tmp_o;
       FT_UInt     tmp_r;
 
-      tmp_o = orus1; orus1 = orus2; orus2 = tmp_o;
-      tmp_r = ref1;  ref1  = ref2;  ref2  = tmp_r;
+
+      tmp_o = orus1;
+      orus1 = orus2;
+      orus2 = tmp_o;
+
+      tmp_r = ref1;
+      ref1  = ref2;
+      ref2  = tmp_r;
     }
 
     org1   = worker->orgs[ref1].x;
@@ -6327,6 +6358,7 @@
       {
         FT_F26Dot6  x = worker->orgs[i].x;
 
+
         if ( x <= org1 )
           x += delta1;
         else
@@ -6340,11 +6372,13 @@
       FT_Fixed  scale       = 0;
       FT_Bool   scale_valid = 0;
 
+
       /* interpolation */
       for ( i = p1; i <= p2; i++ )
       {
         FT_F26Dot6  x = worker->orgs[i].x;
 
+
         if ( x <= org1 )
           x += delta1;
 
@@ -6356,11 +6390,12 @@
           if ( !scale_valid )
           {
             scale_valid = 1;
-            scale       = TT_MULDIV( org2+delta2 - (org1+delta1), 0x10000,
-                                     orus2 - orus1 );
+            scale       = TT_MULDIV( org2 + delta2 - ( org1 + delta1 ),
+                                     0x10000, orus2 - orus1 );
           }
 
-          x = (org1 + delta1) + TT_MULFIX( worker->orus[i].x - orus1, scale );
+          x = ( org1 + delta1 ) +
+              TT_MULFIX( worker->orus[i].x - orus1, scale );
         }
         worker->curs[i].x = x;
       }
--- a/src/type1/t1load.c
+++ b/src/type1/t1load.c
@@ -1721,18 +1721,28 @@
 #include "t1tokens.h"
 
     /* now add the special functions... */
-    T1_FIELD_CALLBACK( "FontMatrix", parse_font_matrix, T1_FIELD_DICT_FONTDICT )
-    T1_FIELD_CALLBACK( "Encoding", parse_encoding, T1_FIELD_DICT_FONTDICT )
-    T1_FIELD_CALLBACK( "Subrs", parse_subrs, T1_FIELD_DICT_PRIVATE )
-    T1_FIELD_CALLBACK( "CharStrings", parse_charstrings, T1_FIELD_DICT_PRIVATE )
-    T1_FIELD_CALLBACK( "Private", parse_private, T1_FIELD_DICT_FONTDICT )
+    T1_FIELD_CALLBACK( "FontMatrix",           parse_font_matrix,
+                       T1_FIELD_DICT_FONTDICT )
+    T1_FIELD_CALLBACK( "Encoding",             parse_encoding,
+                       T1_FIELD_DICT_FONTDICT )
+    T1_FIELD_CALLBACK( "Subrs",                parse_subrs,
+                       T1_FIELD_DICT_PRIVATE )
+    T1_FIELD_CALLBACK( "CharStrings",          parse_charstrings,
+                       T1_FIELD_DICT_PRIVATE )
+    T1_FIELD_CALLBACK( "Private",              parse_private,
+                       T1_FIELD_DICT_FONTDICT )
 
 #ifndef T1_CONFIG_OPTION_NO_MM_SUPPORT
-    T1_FIELD_CALLBACK( "BlendDesignPositions", parse_blend_design_positions, T1_FIELD_DICT_FONTDICT )
-    T1_FIELD_CALLBACK( "BlendDesignMap", parse_blend_design_map, T1_FIELD_DICT_FONTDICT )
-    T1_FIELD_CALLBACK( "BlendAxisTypes", parse_blend_axis_types, T1_FIELD_DICT_FONTDICT )
-    T1_FIELD_CALLBACK( "WeightVector", parse_weight_vector, T1_FIELD_DICT_FONTDICT )
-    T1_FIELD_CALLBACK( "BuildCharArray", parse_buildchar, T1_FIELD_DICT_PRIVATE )
+    T1_FIELD_CALLBACK( "BlendDesignPositions", parse_blend_design_positions,
+                       T1_FIELD_DICT_FONTDICT )
+    T1_FIELD_CALLBACK( "BlendDesignMap",       parse_blend_design_map,
+                       T1_FIELD_DICT_FONTDICT )
+    T1_FIELD_CALLBACK( "BlendAxisTypes",       parse_blend_axis_types,
+                       T1_FIELD_DICT_FONTDICT )
+    T1_FIELD_CALLBACK( "WeightVector",         parse_weight_vector,
+                       T1_FIELD_DICT_FONTDICT )
+    T1_FIELD_CALLBACK( "BuildCharArray",       parse_buildchar,
+                       T1_FIELD_DICT_PRIVATE )
 #endif
 
     { 0, T1_FIELD_LOCATION_CID_INFO, T1_FIELD_TYPE_NONE, 0, 0, 0, 0, 0, 0 }
@@ -1866,41 +1876,42 @@
               /* synthetic font) to deal adequately with      */
               /* multiple master fonts; this is also          */
               /* necessary because later PostScript           */
-              /* definitions override earlier ones            */
+              /* definitions override earlier ones.           */
 
               /* Once we encounter `FontDirectory' after      */
               /* `/Private', we know that this is a synthetic */
               /* font; except for `/CharStrings' we are not   */
               /* interested in anything that follows this     */
-              /* `FontDirectory'                              */
+              /* `FontDirectory'.                             */
 
               /* MM fonts have more than one /Private token at */
               /* the top level; let's hope that all the junk   */
               /* that follows the first /Private token is not  */
-              /* interesting to us                             */
+              /* interesting to us.                            */
 
               /* According to Adobe Tech Note #5175 (CID-Keyed */
               /* Font Installation for ATM Software) a `begin' */
-              /* must be followed by exactly one `end' and     */
+              /* must be followed by exactly one `end', and    */
               /* `begin' -- `end' pairs must be accurately     */
-              /* paired. We could use this to dinstinguish     */
+              /* paired.  We could use this to dinstinguish    */
               /* between the global Private and the Private    */
-              /* that is a member of the Blend dict.           */
+              /* dict that is a member of the Blend dict.      */
 
-              const FT_UInt dict
-                = ( ( loader->keywords_encountered & T1_PRIVATE ) ? 
-                    T1_FIELD_DICT_PRIVATE : T1_FIELD_DICT_FONTDICT );
+              const FT_UInt dict =
+                ( loader->keywords_encountered & T1_PRIVATE )
+                    ? T1_FIELD_DICT_PRIVATE
+                    : T1_FIELD_DICT_FONTDICT;
 
-              if ( ! ( dict & keyword->dict ) )
+              if ( !( dict & keyword->dict ) )
               {
-                FT_TRACE1(( "parse_dict: found %s but ignore it "
+                FT_TRACE1(( "parse_dict: found %s but ignoring it "
                             "since it is in the wrong dictionary\n",
                             keyword->ident ));
                 break;
               }
 
-              if ( !( loader->keywords_encountered                  &
-                      T1_FONTDIR_AFTER_PRIVATE ) ||
+              if ( !( loader->keywords_encountered &
+                      T1_FONTDIR_AFTER_PRIVATE     )                  ||
                    ft_strcmp( (const char*)name, "CharStrings" ) == 0 )
               {
                 parser->root.error = t1_load_keyword( face,
--- a/src/type1/t1tokens.h
+++ b/src/type1/t1tokens.h
@@ -21,17 +21,26 @@
 #undef  T1CODE
 #define T1CODE        T1_FIELD_LOCATION_FONT_INFO
 
-  T1_FIELD_STRING( "version", version, T1_FIELD_DICT_FONTDICT )
-  T1_FIELD_STRING( "Notice", notice, T1_FIELD_DICT_FONTDICT )
-  T1_FIELD_STRING( "FullName", full_name, T1_FIELD_DICT_FONTDICT )
-  T1_FIELD_STRING( "FamilyName", family_name, T1_FIELD_DICT_FONTDICT )
-  T1_FIELD_STRING( "Weight", weight, T1_FIELD_DICT_FONTDICT )
+  T1_FIELD_STRING( "version",            version,
+                   T1_FIELD_DICT_FONTDICT )
+  T1_FIELD_STRING( "Notice",             notice,
+                   T1_FIELD_DICT_FONTDICT )
+  T1_FIELD_STRING( "FullName",           full_name,
+                   T1_FIELD_DICT_FONTDICT )
+  T1_FIELD_STRING( "FamilyName",         family_name,
+                   T1_FIELD_DICT_FONTDICT )
+  T1_FIELD_STRING( "Weight",             weight,
+                   T1_FIELD_DICT_FONTDICT )
 
   /* we use pointers to detect modifications made by synthetic fonts */
-  T1_FIELD_NUM   ( "ItalicAngle", italic_angle, T1_FIELD_DICT_FONTDICT )
-  T1_FIELD_BOOL  ( "isFixedPitch", is_fixed_pitch, T1_FIELD_DICT_FONTDICT )
-  T1_FIELD_NUM   ( "UnderlinePosition", underline_position, T1_FIELD_DICT_FONTDICT )
-  T1_FIELD_NUM   ( "UnderlineThickness", underline_thickness, T1_FIELD_DICT_FONTDICT )
+  T1_FIELD_NUM   ( "ItalicAngle",        italic_angle,
+                   T1_FIELD_DICT_FONTDICT )
+  T1_FIELD_BOOL  ( "isFixedPitch",       is_fixed_pitch,
+                   T1_FIELD_DICT_FONTDICT )
+  T1_FIELD_NUM   ( "UnderlinePosition",  underline_position,
+                   T1_FIELD_DICT_FONTDICT )
+  T1_FIELD_NUM   ( "UnderlineThickness", underline_thickness,
+                   T1_FIELD_DICT_FONTDICT )
 
 
 #undef  FT_STRUCTURE
@@ -39,28 +48,45 @@
 #undef  T1CODE
 #define T1CODE        T1_FIELD_LOCATION_PRIVATE
 
-  T1_FIELD_NUM       ( "UniqueID", unique_id, T1_FIELD_DICT_FONTDICT | T1_FIELD_DICT_PRIVATE )
-  T1_FIELD_NUM       ( "lenIV", lenIV, T1_FIELD_DICT_PRIVATE )
-  T1_FIELD_NUM       ( "LanguageGroup", language_group, T1_FIELD_DICT_PRIVATE )
-  T1_FIELD_NUM       ( "password", password, T1_FIELD_DICT_PRIVATE )
+  T1_FIELD_NUM       ( "UniqueID",         unique_id,
+                       T1_FIELD_DICT_FONTDICT | T1_FIELD_DICT_PRIVATE )
+  T1_FIELD_NUM       ( "lenIV",            lenIV,
+                       T1_FIELD_DICT_PRIVATE )
+  T1_FIELD_NUM       ( "LanguageGroup",    language_group,
+                       T1_FIELD_DICT_PRIVATE )
+  T1_FIELD_NUM       ( "password",         password,
+                       T1_FIELD_DICT_PRIVATE )
 
-  T1_FIELD_FIXED_1000( "BlueScale", blue_scale, T1_FIELD_DICT_PRIVATE )
-  T1_FIELD_NUM       ( "BlueShift", blue_shift, T1_FIELD_DICT_PRIVATE )
-  T1_FIELD_NUM       ( "BlueFuzz",  blue_fuzz, T1_FIELD_DICT_PRIVATE )
+  T1_FIELD_FIXED_1000( "BlueScale",        blue_scale,
+                       T1_FIELD_DICT_PRIVATE )
+  T1_FIELD_NUM       ( "BlueShift",        blue_shift,
+                       T1_FIELD_DICT_PRIVATE )
+  T1_FIELD_NUM       ( "BlueFuzz",         blue_fuzz,
+                       T1_FIELD_DICT_PRIVATE )
 
-  T1_FIELD_NUM_TABLE ( "BlueValues", blue_values, 14, T1_FIELD_DICT_PRIVATE )
-  T1_FIELD_NUM_TABLE ( "OtherBlues", other_blues, 10, T1_FIELD_DICT_PRIVATE )
-  T1_FIELD_NUM_TABLE ( "FamilyBlues", family_blues, 14, T1_FIELD_DICT_PRIVATE )
-  T1_FIELD_NUM_TABLE ( "FamilyOtherBlues", family_other_blues, 10, T1_FIELD_DICT_PRIVATE )
+  T1_FIELD_NUM_TABLE ( "BlueValues",       blue_values,        14,
+                       T1_FIELD_DICT_PRIVATE )
+  T1_FIELD_NUM_TABLE ( "OtherBlues",       other_blues,        10,
+                       T1_FIELD_DICT_PRIVATE )
+  T1_FIELD_NUM_TABLE ( "FamilyBlues",      family_blues,       14,
+                       T1_FIELD_DICT_PRIVATE )
+  T1_FIELD_NUM_TABLE ( "FamilyOtherBlues", family_other_blues, 10,
+                       T1_FIELD_DICT_PRIVATE )
 
-  T1_FIELD_NUM_TABLE2( "StdHW", standard_width,  1, T1_FIELD_DICT_PRIVATE )
-  T1_FIELD_NUM_TABLE2( "StdVW", standard_height, 1, T1_FIELD_DICT_PRIVATE )
-  T1_FIELD_NUM_TABLE2( "MinFeature", min_feature, 2, T1_FIELD_DICT_PRIVATE )
+  T1_FIELD_NUM_TABLE2( "StdHW",            standard_width,      1,
+                       T1_FIELD_DICT_PRIVATE )
+  T1_FIELD_NUM_TABLE2( "StdVW",            standard_height,     1,
+                       T1_FIELD_DICT_PRIVATE )
+  T1_FIELD_NUM_TABLE2( "MinFeature",       min_feature,         2,
+                       T1_FIELD_DICT_PRIVATE )
 
-  T1_FIELD_NUM_TABLE ( "StemSnapH", snap_widths, 12, T1_FIELD_DICT_PRIVATE )
-  T1_FIELD_NUM_TABLE ( "StemSnapV", snap_heights, 12, T1_FIELD_DICT_PRIVATE )
+  T1_FIELD_NUM_TABLE ( "StemSnapH",        snap_widths,        12,
+                       T1_FIELD_DICT_PRIVATE )
+  T1_FIELD_NUM_TABLE ( "StemSnapV",        snap_heights,       12,
+                       T1_FIELD_DICT_PRIVATE )
 
-  T1_FIELD_FIXED     ( "ExpansionFactor", expansion_factor, T1_FIELD_DICT_PRIVATE )
+  T1_FIELD_FIXED     ( "ExpansionFactor",  expansion_factor,
+                       T1_FIELD_DICT_PRIVATE )
 
 
 #undef  FT_STRUCTURE
@@ -68,9 +94,9 @@
 #undef  T1CODE
 #define T1CODE        T1_FIELD_LOCATION_FONT_DICT
 
-  T1_FIELD_KEY  ( "FontName", font_name, T1_FIELD_DICT_FONTDICT )
-  T1_FIELD_NUM  ( "PaintType", paint_type, T1_FIELD_DICT_FONTDICT )
-  T1_FIELD_NUM  ( "FontType", font_type, T1_FIELD_DICT_FONTDICT )
+  T1_FIELD_KEY  ( "FontName",    font_name,    T1_FIELD_DICT_FONTDICT )
+  T1_FIELD_NUM  ( "PaintType",   paint_type,   T1_FIELD_DICT_FONTDICT )
+  T1_FIELD_NUM  ( "FontType",    font_type,    T1_FIELD_DICT_FONTDICT )
   T1_FIELD_FIXED( "StrokeWidth", stroke_width, T1_FIELD_DICT_FONTDICT )
 
 
@@ -89,8 +115,8 @@
 #undef  T1CODE
 #define T1CODE        T1_FIELD_LOCATION_FACE
 
-  T1_FIELD_NUM      ( "NDV", ndv_idx, T1_FIELD_DICT_PRIVATE )
-  T1_FIELD_NUM      ( "CDV", cdv_idx, T1_FIELD_DICT_PRIVATE )
+  T1_FIELD_NUM( "NDV", ndv_idx, T1_FIELD_DICT_PRIVATE )
+  T1_FIELD_NUM( "CDV", cdv_idx, T1_FIELD_DICT_PRIVATE )
 
 
 #undef  FT_STRUCTURE
@@ -98,7 +124,8 @@
 #undef  T1CODE
 #define T1CODE        T1_FIELD_LOCATION_BLEND
 
-  T1_FIELD_NUM_TABLE( "DesignVector", default_design_vector, T1_MAX_MM_DESIGNS, T1_FIELD_DICT_FONTDICT )
+  T1_FIELD_NUM_TABLE( "DesignVector", default_design_vector,
+                      T1_MAX_MM_DESIGNS, T1_FIELD_DICT_FONTDICT )
 
 
 #endif /* T1_CONFIG_OPTION_NO_MM_SUPPORT */