diff options
author | Bartłomiej Piotrowski <bpiotrowski@alpinelinux.org> | 2015-02-06 08:25:01 +0100 |
---|---|---|
committer | Bartłomiej Piotrowski <bpiotrowski@alpinelinux.org> | 2015-02-06 08:25:01 +0100 |
commit | 726f5aa5aadf19eb6e0eab10d7d3e6f89f17c224 (patch) | |
tree | c854af7bf4ea345208ccc34788a012cea81571c2 /testing | |
parent | 80843bc4e29167c267b72fdc00d8136158fb70b6 (diff) | |
download | aports-726f5aa5aadf19eb6e0eab10d7d3e6f89f17c224.tar.bz2 aports-726f5aa5aadf19eb6e0eab10d7d3e6f89f17c224.tar.xz |
testing/freetype-infinality: upgrade to 2.5.5
Diffstat (limited to 'testing')
-rw-r--r-- | testing/freetype-infinality/01-freetype-2.5.5-enable-valid.patch (renamed from testing/freetype-infinality/freetype-2.5.3-enable-valid.patch) | 0 | ||||
-rw-r--r-- | testing/freetype-infinality/02-ftsmooth-2.5.5.patch | 341 | ||||
-rw-r--r-- | testing/freetype-infinality/03-upstream-2015.01.23.patch | 29265 | ||||
-rw-r--r-- | testing/freetype-infinality/04-infinality-2.5.5-2015.01.23.patch (renamed from testing/freetype-infinality/infinality-2.5.3-2014.10.08.patch) | 167 | ||||
-rw-r--r-- | testing/freetype-infinality/APKBUILD | 44 | ||||
-rw-r--r-- | testing/freetype-infinality/infinality-settings.sh | 10 | ||||
-rw-r--r-- | testing/freetype-infinality/upstream-2014.10.08.patch | 6990 |
7 files changed, 29685 insertions, 7132 deletions
diff --git a/testing/freetype-infinality/freetype-2.5.3-enable-valid.patch b/testing/freetype-infinality/01-freetype-2.5.5-enable-valid.patch index df81058b16..df81058b16 100644 --- a/testing/freetype-infinality/freetype-2.5.3-enable-valid.patch +++ b/testing/freetype-infinality/01-freetype-2.5.5-enable-valid.patch diff --git a/testing/freetype-infinality/02-ftsmooth-2.5.5.patch b/testing/freetype-infinality/02-ftsmooth-2.5.5.patch new file mode 100644 index 0000000000..10ec0c036a --- /dev/null +++ b/testing/freetype-infinality/02-ftsmooth-2.5.5.patch @@ -0,0 +1,341 @@ +Temporarily reverting upstream commits (Infinality patch `08` needs a bit of tweaking): + +1. From 465ab99585cb748f9de0087d369677cc9e196785 Mon Sep 17 00:00:00 2001 + From: Alexei Podtelezhnikov <apodtele@gmail.com> + Date: Wed, 29 Oct 2014 23:45:23 -0400 + Subject: [PATCH] [smooth] Improve code readability. + +2. From e1efe0a2fc877c198d72cb0c877db3a17e956f63 Mon Sep 17 00:00:00 2001 + From: Alexei Podtelezhnikov <apodtele@gmail.com> + Date: Fri, 31 Oct 2014 00:07:14 -0400 + Subject: [PATCH] [smooth] Reduce outline translations during rendering. + +3. From 525d4876bea4a56adc0b3c9aab2082f84f050e32 Mon Sep 17 00:00:00 2001 + From: Alexei Podtelezhnikov <apodtele@gmail.com> + Date: Fri, 31 Oct 2014 22:12:37 -0400 + Subject: [PATCH] [smooth] Improve code readability. + +4. From 2676e07aa45761d00ff0cb0101bf0aeb0d95ad05 Mon Sep 17 00:00:00 2001 + From: suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> + Date: Fri, 28 Nov 2014 00:58:25 +0900 + Subject: [PATCH] * src/smooth/ftsmooth.c (ft_smooth_render_generic): Remove + unrequired negative value check for `width' and `height'. + +Applying a bug fix: + +From c7fd93565c2f9f967aa24fe8dee028c2600c459d Mon Sep 17 00:00:00 2001 +From: Alexei Podtelezhnikov <apodtele@gmail.com> +Date: Thu, 30 Oct 2014 22:43:01 -0400 +Subject: [PATCH] [smooth] Fix Savannah bug #35604 (cont'd). + +--- + +--- a/src/smooth/ftsmooth.c 2014-11-27 19:17:01.009987078 +0100 ++++ b/src/smooth/ftsmooth.c 2013-06-05 12:12:47.000000000 +0200 +@@ -103,24 +103,25 @@ + FT_Render_Mode required_mode ) + { + FT_Error error; +- FT_Outline* outline = &slot->outline; +- FT_Bitmap* bitmap = &slot->bitmap; +- FT_Memory memory = render->root.memory; ++ FT_Outline* outline = NULL; + FT_BBox cbox; +- FT_Pos x_shift = 0; +- FT_Pos y_shift = 0; +- FT_Pos x_left, y_top; + FT_Pos width, height, pitch; + #ifndef FT_CONFIG_OPTION_SUBPIXEL_RENDERING + FT_Pos height_org, width_org; + #endif ++ FT_Bitmap* bitmap = &slot->bitmap; ++ FT_Memory memory = render->root.memory; + FT_Int hmul = mode == FT_RENDER_MODE_LCD; + FT_Int vmul = mode == FT_RENDER_MODE_LCD_V; ++ FT_Pos x_shift = 0; ++ FT_Pos y_shift = 0; ++ FT_Pos x_left, y_top; + + FT_Raster_Params params; + +- FT_Bool have_outline_shifted = FALSE; +- FT_Bool have_buffer = FALSE; ++ FT_Bool have_translated_origin = FALSE; ++ FT_Bool have_outline_shifted = FALSE; ++ FT_Bool have_buffer = FALSE; + + + /* check glyph image format */ +@@ -137,45 +138,73 @@ + goto Exit; + } + ++ outline = &slot->outline; ++ ++ /* translate the outline to the new origin if needed */ + if ( origin ) + { +- x_shift = origin->x; +- y_shift = origin->y; ++ FT_Outline_Translate( outline, origin->x, origin->y ); ++ have_translated_origin = TRUE; + } + + /* compute the control box, and grid fit it */ +- /* taking into account the origin shift */ + FT_Outline_Get_CBox( outline, &cbox ); + +- cbox.xMin = FT_PIX_FLOOR( cbox.xMin + x_shift ); +- cbox.yMin = FT_PIX_FLOOR( cbox.yMin + y_shift ); +- cbox.xMax = FT_PIX_CEIL( cbox.xMax + x_shift ); +- cbox.yMax = FT_PIX_CEIL( cbox.yMax + y_shift ); +- +- x_shift -= cbox.xMin; +- y_shift -= cbox.yMin; +- +- x_left = cbox.xMin >> 6; +- y_top = cbox.yMax >> 6; ++ cbox.xMin = FT_PIX_FLOOR( cbox.xMin ); ++ cbox.yMin = FT_PIX_FLOOR( cbox.yMin ); ++ cbox.xMax = FT_PIX_CEIL( cbox.xMax ); ++ cbox.yMax = FT_PIX_CEIL( cbox.yMax ); ++ ++ if ( cbox.xMin < 0 && cbox.xMax > FT_INT_MAX + cbox.xMin ) ++ { ++ FT_ERROR(( "ft_smooth_render_generic: glyph too large:" ++ " xMin = %d, xMax = %d\n", ++ cbox.xMin >> 6, cbox.xMax >> 6 )); ++ error = FT_THROW( Raster_Overflow ); ++ goto Exit; ++ } ++ else ++ width = ( cbox.xMax - cbox.xMin ) >> 6; + +- width = (FT_ULong)( cbox.xMax - cbox.xMin ) >> 6; +- height = (FT_ULong)( cbox.yMax - cbox.yMin ) >> 6; ++ if ( cbox.yMin < 0 && cbox.yMax > FT_INT_MAX + cbox.yMin ) ++ { ++ FT_ERROR(( "ft_smooth_render_generic: glyph too large:" ++ " yMin = %d, yMax = %d\n", ++ cbox.yMin >> 6, cbox.yMax >> 6 )); ++ error = FT_THROW( Raster_Overflow ); ++ goto Exit; ++ } ++ else ++ height = ( cbox.yMax - cbox.yMin ) >> 6; + + #ifndef FT_CONFIG_OPTION_SUBPIXEL_RENDERING + width_org = width; + height_org = height; + #endif + ++ /* release old bitmap buffer */ ++ if ( slot->internal->flags & FT_GLYPH_OWN_BITMAP ) ++ { ++ FT_FREE( bitmap->buffer ); ++ slot->internal->flags &= ~FT_GLYPH_OWN_BITMAP; ++ } ++ ++ /* allocate new one */ + pitch = width; + if ( hmul ) + { +- width *= 3; +- pitch = FT_PAD_CEIL( width, 4 ); ++ width = width * 3; ++ pitch = FT_PAD_CEIL( width, 4 ); + } + + if ( vmul ) + height *= 3; + ++ x_shift = (FT_Int) cbox.xMin; ++ y_shift = (FT_Int) cbox.yMin; ++ x_left = (FT_Int)( cbox.xMin >> 6 ); ++ y_top = (FT_Int)( cbox.yMax >> 6 ); ++ + #ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING + + if ( slot->library->lcd_filter_func ) +@@ -185,32 +214,23 @@ + + if ( hmul ) + { +- x_shift += 64 * ( extra >> 1 ); +- x_left -= extra >> 1; ++ x_shift -= 64 * ( extra >> 1 ); + width += 3 * extra; + pitch = FT_PAD_CEIL( width, 4 ); ++ x_left -= extra >> 1; + } + + if ( vmul ) + { +- y_shift += 64 * ( extra >> 1 ); +- y_top += extra >> 1; ++ y_shift -= 64 * ( extra >> 1 ); + height += 3 * extra; ++ y_top += extra >> 1; + } + } + + #endif + +- /* +- * XXX: on 16bit system, we return an error for huge bitmap +- * to prevent an overflow. +- */ +- if ( x_left > FT_INT_MAX || y_top > FT_INT_MAX || +- x_left < FT_INT_MIN || y_top < FT_INT_MIN ) +- { +- error = FT_THROW( Invalid_Pixel_Size ); +- goto Exit; +- } ++#if FT_UINT_MAX > 0xFFFFU + + /* Required check is (pitch * height < FT_ULONG_MAX), */ + /* but we care realistic cases only. Always pitch <= width. */ +@@ -222,24 +242,7 @@ + goto Exit; + } + +- /* release old bitmap buffer */ +- if ( slot->internal->flags & FT_GLYPH_OWN_BITMAP ) +- { +- FT_FREE( bitmap->buffer ); +- slot->internal->flags &= ~FT_GLYPH_OWN_BITMAP; +- } +- +- /* allocate new one */ +- if ( FT_ALLOC( bitmap->buffer, (FT_ULong)pitch * height ) ) +- goto Exit; +- else +- have_buffer = TRUE; +- +- slot->internal->flags |= FT_GLYPH_OWN_BITMAP; +- +- slot->format = FT_GLYPH_FORMAT_BITMAP; +- slot->bitmap_left = (FT_Int)x_left; +- slot->bitmap_top = (FT_Int)y_top; ++#endif + + bitmap->pixel_mode = FT_PIXEL_MODE_GRAY; + bitmap->num_grays = 256; +@@ -248,11 +251,15 @@ + bitmap->pitch = pitch; + + /* translate outline to render it into the bitmap */ +- if ( x_shift || y_shift ) +- { +- FT_Outline_Translate( outline, x_shift, y_shift ); +- have_outline_shifted = TRUE; +- } ++ FT_Outline_Translate( outline, -x_shift, -y_shift ); ++ have_outline_shifted = TRUE; ++ ++ if ( FT_ALLOC( bitmap->buffer, (FT_ULong)pitch * height ) ) ++ goto Exit; ++ else ++ have_buffer = TRUE; ++ ++ slot->internal->flags |= FT_GLYPH_OWN_BITMAP; + + /* set up parameters */ + params.target = bitmap; +@@ -359,6 +366,20 @@ + + #endif /* !FT_CONFIG_OPTION_SUBPIXEL_RENDERING */ + ++ /* ++ * XXX: on 16bit system, we return an error for huge bitmap ++ * to prevent an overflow. ++ */ ++ if ( x_left > FT_INT_MAX || y_top > FT_INT_MAX ) ++ { ++ error = FT_THROW( Invalid_Pixel_Size ); ++ goto Exit; ++ } ++ ++ slot->format = FT_GLYPH_FORMAT_BITMAP; ++ slot->bitmap_left = (FT_Int)x_left; ++ slot->bitmap_top = (FT_Int)y_top; ++ + /* everything is fine; don't deallocate buffer */ + have_buffer = FALSE; + +@@ -366,7 +387,9 @@ + + Exit: + if ( have_outline_shifted ) +- FT_Outline_Translate( outline, -x_shift, -y_shift ); ++ FT_Outline_Translate( outline, x_shift, y_shift ); ++ if ( have_translated_origin ) ++ FT_Outline_Translate( outline, -origin->x, -origin->y ); + if ( have_buffer ) + { + FT_FREE( bitmap->buffer ); +--- a/src/smooth/ftsmooth.c 2013-06-05 12:12:47.000000000 +0200 ++++ b/src/smooth/ftsmooth.c 2014-12-04 23:05:42.723095358 +0100 +@@ -155,27 +155,8 @@ + cbox.xMax = FT_PIX_CEIL( cbox.xMax ); + cbox.yMax = FT_PIX_CEIL( cbox.yMax ); + +- if ( cbox.xMin < 0 && cbox.xMax > FT_INT_MAX + cbox.xMin ) +- { +- FT_ERROR(( "ft_smooth_render_generic: glyph too large:" +- " xMin = %d, xMax = %d\n", +- cbox.xMin >> 6, cbox.xMax >> 6 )); +- error = FT_THROW( Raster_Overflow ); +- goto Exit; +- } +- else +- width = ( cbox.xMax - cbox.xMin ) >> 6; +- +- if ( cbox.yMin < 0 && cbox.yMax > FT_INT_MAX + cbox.yMin ) +- { +- FT_ERROR(( "ft_smooth_render_generic: glyph too large:" +- " yMin = %d, yMax = %d\n", +- cbox.yMin >> 6, cbox.yMax >> 6 )); +- error = FT_THROW( Raster_Overflow ); +- goto Exit; +- } +- else +- height = ( cbox.yMax - cbox.yMin ) >> 6; ++ width = (FT_ULong)( cbox.xMax - cbox.xMin ) >> 6; ++ height = (FT_ULong)( cbox.yMax - cbox.yMin ) >> 6; + + #ifndef FT_CONFIG_OPTION_SUBPIXEL_RENDERING + width_org = width; +@@ -200,10 +181,10 @@ + if ( vmul ) + height *= 3; + +- x_shift = (FT_Int) cbox.xMin; +- y_shift = (FT_Int) cbox.yMin; +- x_left = (FT_Int)( cbox.xMin >> 6 ); +- y_top = (FT_Int)( cbox.yMax >> 6 ); ++ x_shift = cbox.xMin; ++ y_shift = cbox.yMin; ++ x_left = cbox.xMin >> 6; ++ y_top = cbox.yMax >> 6; + + #ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING + +@@ -230,8 +211,6 @@ + + #endif + +-#if FT_UINT_MAX > 0xFFFFU +- + /* Required check is (pitch * height < FT_ULONG_MAX), */ + /* but we care realistic cases only. Always pitch <= width. */ + if ( width > 0x7FFF || height > 0x7FFF ) +@@ -242,8 +221,6 @@ + goto Exit; + } + +-#endif +- + bitmap->pixel_mode = FT_PIXEL_MODE_GRAY; + bitmap->num_grays = 256; + bitmap->width = width; diff --git a/testing/freetype-infinality/03-upstream-2015.01.23.patch b/testing/freetype-infinality/03-upstream-2015.01.23.patch new file mode 100644 index 0000000000..a42ba0b352 --- /dev/null +++ b/testing/freetype-infinality/03-upstream-2015.01.23.patch @@ -0,0 +1,29265 @@ +From 1b4d68cf901d18cadfef5c4433e78969cc5b6d46 Mon Sep 17 00:00:00 2001 +From: Werner Lemberg <wl@gnu.org> +Date: Sat, 10 Jan 2015 19:56:28 +0100 +Subject: [PATCH] * src/truetype/ttinterp.c (CUR): Remove by replacing with + expansion. + +This starts a series of patches that simplifies the code of the +bytecode interpreter. +--- + ChangeLog | 7 + + src/truetype/ttinterp.c | 2532 +++++++++++++++++++++++------------------------ + 2 files changed, 1271 insertions(+), 1268 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index 5a857ff..12fe053 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,3 +1,10 @@ ++2015-01-10 Werner Lemberg <wl@gnu.org> ++ ++ * src/truetype/ttinterp.c (CUR): Remove by replacing with expansion. ++ ++ This starts a series of patches that simplifies the code of the ++ bytecode interpreter. ++ + 2014-12-30 Werner Lemberg <wl@gnu.org> + + * Version 2.5.5 released. +diff --git a/src/truetype/ttinterp.c b/src/truetype/ttinterp.c +index eccd4aa..ffef8c0 100644 +--- a/src/truetype/ttinterp.c ++++ b/src/truetype/ttinterp.c +@@ -92,8 +92,6 @@ + + #ifndef TT_CONFIG_OPTION_STATIC_INTERPRETER /* indirect implementation */ + +-#define CUR (*exc) /* see ttobjs.h */ +- + /*************************************************************************/ + /* */ + /* This macro is used whenever `exec' is unused in a function, to avoid */ +@@ -103,8 +101,6 @@ + + #else /* static implementation */ + +-#define CUR cur +- + #define FT_UNUSED_EXEC int __dummy = __dummy + + static +@@ -132,8 +128,8 @@ + #define FT_UNUSED_ARG FT_UNUSED_EXEC; FT_UNUSED( args ) + + +-#define SUBPIXEL_HINTING \ +- ( ((TT_Driver)FT_FACE_DRIVER( CUR.face ))->interpreter_version == \ ++#define SUBPIXEL_HINTING \ ++ ( ((TT_Driver)FT_FACE_DRIVER( exc->face ))->interpreter_version == \ + TT_INTERPRETER_VERSION_38 ) + + +@@ -164,25 +160,25 @@ + Ins_Goto_CodeRange( EXEC_ARG_ range, ip ) + + #define CUR_Func_move( z, p, d ) \ +- CUR.func_move( EXEC_ARG_ z, p, d ) ++ exc->func_move( EXEC_ARG_ z, p, d ) + + #define CUR_Func_move_orig( z, p, d ) \ +- CUR.func_move_orig( EXEC_ARG_ z, p, d ) ++ exc->func_move_orig( EXEC_ARG_ z, p, d ) + + #define CUR_Func_round( d, c ) \ +- CUR.func_round( EXEC_ARG_ d, c ) ++ exc->func_round( EXEC_ARG_ d, c ) + + #define CUR_Func_cur_ppem() \ +- CUR.func_cur_ppem( EXEC_ARG ) ++ exc->func_cur_ppem( EXEC_ARG ) + + #define CUR_Func_read_cvt( index ) \ +- CUR.func_read_cvt( EXEC_ARG_ index ) ++ exc->func_read_cvt( EXEC_ARG_ index ) + + #define CUR_Func_write_cvt( index, val ) \ +- CUR.func_write_cvt( EXEC_ARG_ index, val ) ++ exc->func_write_cvt( EXEC_ARG_ index, val ) + + #define CUR_Func_move_cvt( index, val ) \ +- CUR.func_move_cvt( EXEC_ARG_ index, val ) ++ exc->func_move_cvt( EXEC_ARG_ index, val ) + + #define CURRENT_Ratio() \ + Current_Ratio( EXEC_ARG ) +@@ -204,16 +200,16 @@ + + + #define CUR_Func_project( v1, v2 ) \ +- CUR.func_project( EXEC_ARG_ (v1)->x - (v2)->x, (v1)->y - (v2)->y ) ++ exc->func_project( EXEC_ARG_ (v1)->x - (v2)->x, (v1)->y - (v2)->y ) + + #define CUR_Func_dualproj( v1, v2 ) \ +- CUR.func_dualproj( EXEC_ARG_ (v1)->x - (v2)->x, (v1)->y - (v2)->y ) ++ exc->func_dualproj( EXEC_ARG_ (v1)->x - (v2)->x, (v1)->y - (v2)->y ) + + #define CUR_fast_project( v ) \ +- CUR.func_project( EXEC_ARG_ (v)->x, (v)->y ) ++ exc->func_project( EXEC_ARG_ (v)->x, (v)->y ) + + #define CUR_fast_dualproj( v ) \ +- CUR.func_dualproj( EXEC_ARG_ (v)->x, (v)->y ) ++ exc->func_dualproj( EXEC_ARG_ (v)->x, (v)->y ) + + + /*************************************************************************/ +@@ -245,11 +241,11 @@ + #define FAILURE 1 + + #ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING +-#define GUESS_VECTOR( V ) \ +- if ( CUR.face->unpatented_hinting ) \ +- { \ +- CUR.GS.V.x = (FT_F2Dot14)( CUR.GS.both_x_axis ? 0x4000 : 0 ); \ +- CUR.GS.V.y = (FT_F2Dot14)( CUR.GS.both_x_axis ? 0 : 0x4000 ); \ ++#define GUESS_VECTOR( V ) \ ++ if ( exc->face->unpatented_hinting ) \ ++ { \ ++ exc->GS.V.x = (FT_F2Dot14)( exc->GS.both_x_axis ? 0x4000 : 0 ); \ ++ exc->GS.V.y = (FT_F2Dot14)( exc->GS.both_x_axis ? 0 : 0x4000 ); \ + } + #else + #define GUESS_VECTOR( V ) +@@ -1639,53 +1635,53 @@ + static FT_Long + Current_Ratio( EXEC_OP ) + { +- if ( !CUR.tt_metrics.ratio ) ++ if ( !exc->tt_metrics.ratio ) + { + #ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING +- if ( CUR.face->unpatented_hinting ) ++ if ( exc->face->unpatented_hinting ) + { +- if ( CUR.GS.both_x_axis ) +- CUR.tt_metrics.ratio = CUR.tt_metrics.x_ratio; ++ if ( exc->GS.both_x_axis ) ++ exc->tt_metrics.ratio = exc->tt_metrics.x_ratio; + else +- CUR.tt_metrics.ratio = CUR.tt_metrics.y_ratio; ++ exc->tt_metrics.ratio = exc->tt_metrics.y_ratio; + } + else + #endif + { +- if ( CUR.GS.projVector.y == 0 ) +- CUR.tt_metrics.ratio = CUR.tt_metrics.x_ratio; ++ if ( exc->GS.projVector.y == 0 ) ++ exc->tt_metrics.ratio = exc->tt_metrics.x_ratio; + +- else if ( CUR.GS.projVector.x == 0 ) +- CUR.tt_metrics.ratio = CUR.tt_metrics.y_ratio; ++ else if ( exc->GS.projVector.x == 0 ) ++ exc->tt_metrics.ratio = exc->tt_metrics.y_ratio; + + else + { + FT_F26Dot6 x, y; + + +- x = TT_MulFix14( CUR.tt_metrics.x_ratio, +- CUR.GS.projVector.x ); +- y = TT_MulFix14( CUR.tt_metrics.y_ratio, +- CUR.GS.projVector.y ); +- CUR.tt_metrics.ratio = FT_Hypot( x, y ); ++ x = TT_MulFix14( exc->tt_metrics.x_ratio, ++ exc->GS.projVector.x ); ++ y = TT_MulFix14( exc->tt_metrics.y_ratio, ++ exc->GS.projVector.y ); ++ exc->tt_metrics.ratio = FT_Hypot( x, y ); + } + } + } +- return CUR.tt_metrics.ratio; ++ return exc->tt_metrics.ratio; + } + + + FT_CALLBACK_DEF( FT_Long ) + Current_Ppem( EXEC_OP ) + { +- return CUR.tt_metrics.ppem; ++ return exc->tt_metrics.ppem; + } + + + FT_CALLBACK_DEF( FT_Long ) + Current_Ppem_Stretched( EXEC_OP ) + { +- return FT_MulFix( CUR.tt_metrics.ppem, CURRENT_Ratio() ); ++ return FT_MulFix( exc->tt_metrics.ppem, CURRENT_Ratio() ); + } + + +@@ -1699,14 +1695,14 @@ + FT_CALLBACK_DEF( FT_F26Dot6 ) + Read_CVT( EXEC_OP_ FT_ULong idx ) + { +- return CUR.cvt[idx]; ++ return exc->cvt[idx]; + } + + + FT_CALLBACK_DEF( FT_F26Dot6 ) + Read_CVT_Stretched( EXEC_OP_ FT_ULong idx ) + { +- return FT_MulFix( CUR.cvt[idx], CURRENT_Ratio() ); ++ return FT_MulFix( exc->cvt[idx], CURRENT_Ratio() ); + } + + +@@ -1714,7 +1710,7 @@ + Write_CVT( EXEC_OP_ FT_ULong idx, + FT_F26Dot6 value ) + { +- CUR.cvt[idx] = value; ++ exc->cvt[idx] = value; + } + + +@@ -1722,7 +1718,7 @@ + Write_CVT_Stretched( EXEC_OP_ FT_ULong idx, + FT_F26Dot6 value ) + { +- CUR.cvt[idx] = FT_DivFix( value, CURRENT_Ratio() ); ++ exc->cvt[idx] = FT_DivFix( value, CURRENT_Ratio() ); + } + + +@@ -1730,7 +1726,7 @@ + Move_CVT( EXEC_OP_ FT_ULong idx, + FT_F26Dot6 value ) + { +- CUR.cvt[idx] += value; ++ exc->cvt[idx] += value; + } + + +@@ -1738,7 +1734,7 @@ + Move_CVT_Stretched( EXEC_OP_ FT_ULong idx, + FT_F26Dot6 value ) + { +- CUR.cvt[idx] += FT_DivFix( value, CURRENT_Ratio() ); ++ exc->cvt[idx] += FT_DivFix( value, CURRENT_Ratio() ); + } + + +@@ -1761,9 +1757,9 @@ + GetShortIns( EXEC_OP ) + { + /* Reading a byte stream so there is no endianess (DaveP) */ +- CUR.IP += 2; +- return (FT_Short)( ( CUR.code[CUR.IP - 2] << 8 ) + +- CUR.code[CUR.IP - 1] ); ++ exc->IP += 2; ++ return (FT_Short)( ( exc->code[exc->IP - 2] << 8 ) + ++ exc->code[exc->IP - 1] ); + } + + +@@ -1792,15 +1788,15 @@ + + if ( aRange < 1 || aRange > 3 ) + { +- CUR.error = FT_THROW( Bad_Argument ); ++ exc->error = FT_THROW( Bad_Argument ); + return FAILURE; + } + +- range = &CUR.codeRangeTable[aRange - 1]; ++ range = &exc->codeRangeTable[aRange - 1]; + + if ( range->base == NULL ) /* invalid coderange */ + { +- CUR.error = FT_THROW( Invalid_CodeRange ); ++ exc->error = FT_THROW( Invalid_CodeRange ); + return FAILURE; + } + +@@ -1810,14 +1806,14 @@ + + if ( aIP > range->size ) + { +- CUR.error = FT_THROW( Code_Overflow ); ++ exc->error = FT_THROW( Code_Overflow ); + return FAILURE; + } + +- CUR.code = range->base; +- CUR.codeSize = range->size; +- CUR.IP = aIP; +- CUR.curRange = aRange; ++ exc->code = range->base; ++ exc->codeSize = range->size; ++ exc->IP = aIP; ++ exc->curRange = aRange; + + return SUCCESS; + } +@@ -1849,28 +1845,28 @@ + + + #ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING +- FT_ASSERT( !CUR.face->unpatented_hinting ); ++ FT_ASSERT( !exc->face->unpatented_hinting ); + #endif + +- v = CUR.GS.freeVector.x; ++ v = exc->GS.freeVector.x; + + if ( v != 0 ) + { + #ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING +- if ( !SUBPIXEL_HINTING || +- ( !CUR.ignore_x_mode || +- ( CUR.sph_tweak_flags & SPH_TWEAK_ALLOW_X_DMOVE ) ) ) ++ if ( !SUBPIXEL_HINTING || ++ ( !exc->ignore_x_mode || ++ ( exc->sph_tweak_flags & SPH_TWEAK_ALLOW_X_DMOVE ) ) ) + #endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ +- zone->cur[point].x += FT_MulDiv( distance, v, CUR.F_dot_P ); ++ zone->cur[point].x += FT_MulDiv( distance, v, exc->F_dot_P ); + + zone->tags[point] |= FT_CURVE_TAG_TOUCH_X; + } + +- v = CUR.GS.freeVector.y; ++ v = exc->GS.freeVector.y; + + if ( v != 0 ) + { +- zone->cur[point].y += FT_MulDiv( distance, v, CUR.F_dot_P ); ++ zone->cur[point].y += FT_MulDiv( distance, v, exc->F_dot_P ); + + zone->tags[point] |= FT_CURVE_TAG_TOUCH_Y; + } +@@ -1903,18 +1899,18 @@ + + + #ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING +- FT_ASSERT( !CUR.face->unpatented_hinting ); ++ FT_ASSERT( !exc->face->unpatented_hinting ); + #endif + +- v = CUR.GS.freeVector.x; ++ v = exc->GS.freeVector.x; + + if ( v != 0 ) +- zone->org[point].x += FT_MulDiv( distance, v, CUR.F_dot_P ); ++ zone->org[point].x += FT_MulDiv( distance, v, exc->F_dot_P ); + +- v = CUR.GS.freeVector.y; ++ v = exc->GS.freeVector.y; + + if ( v != 0 ) +- zone->org[point].y += FT_MulDiv( distance, v, CUR.F_dot_P ); ++ zone->org[point].y += FT_MulDiv( distance, v, exc->F_dot_P ); + } + + +@@ -1936,8 +1932,8 @@ + FT_UNUSED_EXEC; + + #ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING +- if ( !SUBPIXEL_HINTING || +- !CUR.ignore_x_mode ) ++ if ( !SUBPIXEL_HINTING || ++ !exc->ignore_x_mode ) + #endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ + zone->cur[point].x += distance; + +@@ -2277,19 +2273,19 @@ + + if ( distance >= 0 ) + { +- val = ( distance - CUR.phase + CUR.threshold + compensation ) & +- -CUR.period; +- val += CUR.phase; ++ val = ( distance - exc->phase + exc->threshold + compensation ) & ++ -exc->period; ++ val += exc->phase; + if ( val < 0 ) +- val = CUR.phase; ++ val = exc->phase; + } + else + { +- val = -( ( CUR.threshold - CUR.phase - distance + compensation ) & +- -CUR.period ); +- val -= CUR.phase; ++ val = -( ( exc->threshold - exc->phase - distance + compensation ) & ++ -exc->period ); ++ val -= exc->phase; + if ( val > 0 ) +- val = -CUR.phase; ++ val = -exc->phase; + } + + return val; +@@ -2325,19 +2321,19 @@ + + if ( distance >= 0 ) + { +- val = ( ( distance - CUR.phase + CUR.threshold + compensation ) / +- CUR.period ) * CUR.period; +- val += CUR.phase; ++ val = ( ( distance - exc->phase + exc->threshold + compensation ) / ++ exc->period ) * exc->period; ++ val += exc->phase; + if ( val < 0 ) +- val = CUR.phase; ++ val = exc->phase; + } + else + { +- val = -( ( ( CUR.threshold - CUR.phase - distance + compensation ) / +- CUR.period ) * CUR.period ); +- val -= CUR.phase; ++ val = -( ( ( exc->threshold - exc->phase - distance + compensation ) / ++ exc->period ) * exc->period ); ++ val -= exc->phase; + if ( val > 0 ) +- val = -CUR.phase; ++ val = -exc->phase; + } + + return val; +@@ -2361,35 +2357,35 @@ + switch ( round_mode ) + { + case TT_Round_Off: +- CUR.func_round = (TT_Round_Func)Round_None; ++ exc->func_round = (TT_Round_Func)Round_None; + break; + + case TT_Round_To_Grid: +- CUR.func_round = (TT_Round_Func)Round_To_Grid; ++ exc->func_round = (TT_Round_Func)Round_To_Grid; + break; + + case TT_Round_Up_To_Grid: +- CUR.func_round = (TT_Round_Func)Round_Up_To_Grid; ++ exc->func_round = (TT_Round_Func)Round_Up_To_Grid; + break; + + case TT_Round_Down_To_Grid: +- CUR.func_round = (TT_Round_Func)Round_Down_To_Grid; ++ exc->func_round = (TT_Round_Func)Round_Down_To_Grid; + break; + + case TT_Round_To_Half_Grid: +- CUR.func_round = (TT_Round_Func)Round_To_Half_Grid; ++ exc->func_round = (TT_Round_Func)Round_To_Half_Grid; + break; + + case TT_Round_To_Double_Grid: +- CUR.func_round = (TT_Round_Func)Round_To_Double_Grid; ++ exc->func_round = (TT_Round_Func)Round_To_Double_Grid; + break; + + case TT_Round_Super: +- CUR.func_round = (TT_Round_Func)Round_Super; ++ exc->func_round = (TT_Round_Func)Round_Super; + break; + + case TT_Round_Super_45: +- CUR.func_round = (TT_Round_Func)Round_Super_45; ++ exc->func_round = (TT_Round_Func)Round_Super_45; + break; + } + } +@@ -2415,51 +2411,51 @@ + switch ( (FT_Int)( selector & 0xC0 ) ) + { + case 0: +- CUR.period = GridPeriod / 2; ++ exc->period = GridPeriod / 2; + break; + + case 0x40: +- CUR.period = GridPeriod; ++ exc->period = GridPeriod; + break; + + case 0x80: +- CUR.period = GridPeriod * 2; ++ exc->period = GridPeriod * 2; + break; + + /* This opcode is reserved, but... */ + + case 0xC0: +- CUR.period = GridPeriod; ++ exc->period = GridPeriod; + break; + } + + switch ( (FT_Int)( selector & 0x30 ) ) + { + case 0: +- CUR.phase = 0; ++ exc->phase = 0; + break; + + case 0x10: +- CUR.phase = CUR.period / 4; ++ exc->phase = exc->period / 4; + break; + + case 0x20: +- CUR.phase = CUR.period / 2; ++ exc->phase = exc->period / 2; + break; + + case 0x30: +- CUR.phase = CUR.period * 3 / 4; ++ exc->phase = exc->period * 3 / 4; + break; + } + + if ( ( selector & 0x0F ) == 0 ) +- CUR.threshold = CUR.period - 1; ++ exc->threshold = exc->period - 1; + else +- CUR.threshold = ( (FT_Int)( selector & 0x0F ) - 4 ) * CUR.period / 8; ++ exc->threshold = ( (FT_Int)( selector & 0x0F ) - 4 ) * exc->period / 8; + +- CUR.period /= 256; +- CUR.phase /= 256; +- CUR.threshold /= 256; ++ exc->period /= 256; ++ exc->phase /= 256; ++ exc->threshold /= 256; + } + + +@@ -2484,12 +2480,12 @@ + FT_Pos dy ) + { + #ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING +- FT_ASSERT( !CUR.face->unpatented_hinting ); ++ FT_ASSERT( !exc->face->unpatented_hinting ); + #endif + + return TT_DotFix14( (FT_UInt32)dx, (FT_UInt32)dy, +- CUR.GS.projVector.x, +- CUR.GS.projVector.y ); ++ exc->GS.projVector.x, ++ exc->GS.projVector.y ); + } + + +@@ -2514,8 +2510,8 @@ + FT_Pos dy ) + { + return TT_DotFix14( (FT_UInt32)dx, (FT_UInt32)dy, +- CUR.GS.dualVector.x, +- CUR.GS.dualVector.y ); ++ exc->GS.dualVector.x, ++ exc->GS.dualVector.y ); + } + + +@@ -2586,98 +2582,98 @@ + Compute_Funcs( EXEC_OP ) + { + #ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING +- if ( CUR.face->unpatented_hinting ) ++ if ( exc->face->unpatented_hinting ) + { + /* If both vectors point rightwards along the x axis, set */ + /* `both-x-axis' true, otherwise set it false. The x values only */ + /* need be tested because the vector has been normalised to a unit */ + /* vector of length 0x4000 = unity. */ +- CUR.GS.both_x_axis = (FT_Bool)( CUR.GS.projVector.x == 0x4000 && +- CUR.GS.freeVector.x == 0x4000 ); ++ exc->GS.both_x_axis = (FT_Bool)( exc->GS.projVector.x == 0x4000 && ++ exc->GS.freeVector.x == 0x4000 ); + + /* Throw away projection and freedom vector information */ + /* because the patents don't allow them to be stored. */ + /* The relevant US Patents are 5155805 and 5325479. */ +- CUR.GS.projVector.x = 0; +- CUR.GS.projVector.y = 0; +- CUR.GS.freeVector.x = 0; +- CUR.GS.freeVector.y = 0; ++ exc->GS.projVector.x = 0; ++ exc->GS.projVector.y = 0; ++ exc->GS.freeVector.x = 0; ++ exc->GS.freeVector.y = 0; + +- if ( CUR.GS.both_x_axis ) ++ if ( exc->GS.both_x_axis ) + { +- CUR.func_project = Project_x; +- CUR.func_move = Direct_Move_X; +- CUR.func_move_orig = Direct_Move_Orig_X; ++ exc->func_project = Project_x; ++ exc->func_move = Direct_Move_X; ++ exc->func_move_orig = Direct_Move_Orig_X; + } + else + { +- CUR.func_project = Project_y; +- CUR.func_move = Direct_Move_Y; +- CUR.func_move_orig = Direct_Move_Orig_Y; ++ exc->func_project = Project_y; ++ exc->func_move = Direct_Move_Y; ++ exc->func_move_orig = Direct_Move_Orig_Y; + } + +- if ( CUR.GS.dualVector.x == 0x4000 ) +- CUR.func_dualproj = Project_x; +- else if ( CUR.GS.dualVector.y == 0x4000 ) +- CUR.func_dualproj = Project_y; ++ if ( exc->GS.dualVector.x == 0x4000 ) ++ exc->func_dualproj = Project_x; ++ else if ( exc->GS.dualVector.y == 0x4000 ) ++ exc->func_dualproj = Project_y; + else +- CUR.func_dualproj = Dual_Project; ++ exc->func_dualproj = Dual_Project; + + /* Force recalculation of cached aspect ratio */ +- CUR.tt_metrics.ratio = 0; ++ exc->tt_metrics.ratio = 0; + + return; + } + #endif /* TT_CONFIG_OPTION_UNPATENTED_HINTING */ + +- if ( CUR.GS.freeVector.x == 0x4000 ) +- CUR.F_dot_P = CUR.GS.projVector.x; +- else if ( CUR.GS.freeVector.y == 0x4000 ) +- CUR.F_dot_P = CUR.GS.projVector.y; ++ if ( exc->GS.freeVector.x == 0x4000 ) ++ exc->F_dot_P = exc->GS.projVector.x; ++ else if ( exc->GS.freeVector.y == 0x4000 ) ++ exc->F_dot_P = exc->GS.projVector.y; + else +- CUR.F_dot_P = ( (FT_Long)CUR.GS.projVector.x * CUR.GS.freeVector.x + +- (FT_Long)CUR.GS.projVector.y * CUR.GS.freeVector.y ) >> +- 14; +- +- if ( CUR.GS.projVector.x == 0x4000 ) +- CUR.func_project = (TT_Project_Func)Project_x; +- else if ( CUR.GS.projVector.y == 0x4000 ) +- CUR.func_project = (TT_Project_Func)Project_y; ++ exc->F_dot_P = ( (FT_Long)exc->GS.projVector.x * exc->GS.freeVector.x + ++ (FT_Long)exc->GS.projVector.y * exc->GS.freeVector.y ) >> ++ 14; ++ ++ if ( exc->GS.projVector.x == 0x4000 ) ++ exc->func_project = (TT_Project_Func)Project_x; ++ else if ( exc->GS.projVector.y == 0x4000 ) ++ exc->func_project = (TT_Project_Func)Project_y; + else +- CUR.func_project = (TT_Project_Func)Project; ++ exc->func_project = (TT_Project_Func)Project; + +- if ( CUR.GS.dualVector.x == 0x4000 ) +- CUR.func_dualproj = (TT_Project_Func)Project_x; +- else if ( CUR.GS.dualVector.y == 0x4000 ) +- CUR.func_dualproj = (TT_Project_Func)Project_y; ++ if ( exc->GS.dualVector.x == 0x4000 ) ++ exc->func_dualproj = (TT_Project_Func)Project_x; ++ else if ( exc->GS.dualVector.y == 0x4000 ) ++ exc->func_dualproj = (TT_Project_Func)Project_y; + else +- CUR.func_dualproj = (TT_Project_Func)Dual_Project; ++ exc->func_dualproj = (TT_Project_Func)Dual_Project; + +- CUR.func_move = (TT_Move_Func)Direct_Move; +- CUR.func_move_orig = (TT_Move_Func)Direct_Move_Orig; ++ exc->func_move = (TT_Move_Func)Direct_Move; ++ exc->func_move_orig = (TT_Move_Func)Direct_Move_Orig; + +- if ( CUR.F_dot_P == 0x4000L ) ++ if ( exc->F_dot_P == 0x4000L ) + { +- if ( CUR.GS.freeVector.x == 0x4000 ) ++ if ( exc->GS.freeVector.x == 0x4000 ) + { +- CUR.func_move = (TT_Move_Func)Direct_Move_X; +- CUR.func_move_orig = (TT_Move_Func)Direct_Move_Orig_X; ++ exc->func_move = (TT_Move_Func)Direct_Move_X; ++ exc->func_move_orig = (TT_Move_Func)Direct_Move_Orig_X; + } +- else if ( CUR.GS.freeVector.y == 0x4000 ) ++ else if ( exc->GS.freeVector.y == 0x4000 ) + { +- CUR.func_move = (TT_Move_Func)Direct_Move_Y; +- CUR.func_move_orig = (TT_Move_Func)Direct_Move_Orig_Y; ++ exc->func_move = (TT_Move_Func)Direct_Move_Y; ++ exc->func_move_orig = (TT_Move_Func)Direct_Move_Orig_Y; + } + } + + /* at small sizes, F_dot_P can become too small, resulting */ + /* in overflows and `spikes' in a number of glyphs like `w'. */ + +- if ( FT_ABS( CUR.F_dot_P ) < 0x400L ) +- CUR.F_dot_P = 0x4000L; ++ if ( FT_ABS( exc->F_dot_P ) < 0x400L ) ++ exc->F_dot_P = 0x4000L; + + /* Disable cached aspect ratio */ +- CUR.tt_metrics.ratio = 0; ++ exc->tt_metrics.ratio = 0; + } + + +@@ -2753,16 +2749,16 @@ + FT_Vector* p2; + + +- if ( BOUNDS( aIdx1, CUR.zp2.n_points ) || +- BOUNDS( aIdx2, CUR.zp1.n_points ) ) ++ if ( BOUNDS( aIdx1, exc->zp2.n_points ) || ++ BOUNDS( aIdx2, exc->zp1.n_points ) ) + { +- if ( CUR.pedantic_hinting ) +- CUR.error = FT_THROW( Invalid_Reference ); ++ if ( exc->pedantic_hinting ) ++ exc->error = FT_THROW( Invalid_Reference ); + return FAILURE; + } + +- p1 = CUR.zp1.cur + aIdx2; +- p2 = CUR.zp2.cur + aIdx1; ++ p1 = exc->zp1.cur + aIdx2; ++ p2 = exc->zp2.cur + aIdx1; + + A = p1->x - p2->x; + B = p1->y - p2->y; +@@ -2797,89 +2793,89 @@ + /* */ + /* They are all defined there. */ + +-#define DO_SVTCA \ +- { \ +- FT_Short A, B; \ +- \ +- \ +- A = (FT_Short)( CUR.opcode & 1 ) << 14; \ +- B = A ^ (FT_Short)0x4000; \ +- \ +- CUR.GS.freeVector.x = A; \ +- CUR.GS.projVector.x = A; \ +- CUR.GS.dualVector.x = A; \ +- \ +- CUR.GS.freeVector.y = B; \ +- CUR.GS.projVector.y = B; \ +- CUR.GS.dualVector.y = B; \ +- \ +- COMPUTE_Funcs(); \ +- } +- +- +-#define DO_SPVTCA \ +- { \ +- FT_Short A, B; \ +- \ +- \ +- A = (FT_Short)( CUR.opcode & 1 ) << 14; \ +- B = A ^ (FT_Short)0x4000; \ +- \ +- CUR.GS.projVector.x = A; \ +- CUR.GS.dualVector.x = A; \ +- \ +- CUR.GS.projVector.y = B; \ +- CUR.GS.dualVector.y = B; \ +- \ +- GUESS_VECTOR( freeVector ); \ +- \ +- COMPUTE_Funcs(); \ +- } +- +- +-#define DO_SFVTCA \ +- { \ +- FT_Short A, B; \ +- \ +- \ +- A = (FT_Short)( CUR.opcode & 1 ) << 14; \ +- B = A ^ (FT_Short)0x4000; \ +- \ +- CUR.GS.freeVector.x = A; \ +- CUR.GS.freeVector.y = B; \ +- \ +- GUESS_VECTOR( projVector ); \ +- \ +- COMPUTE_Funcs(); \ +- } +- +- +-#define DO_SPVTL \ +- if ( INS_SxVTL( (FT_UShort)args[1], \ +- (FT_UShort)args[0], \ +- CUR.opcode, \ +- &CUR.GS.projVector ) == SUCCESS ) \ +- { \ +- CUR.GS.dualVector = CUR.GS.projVector; \ +- GUESS_VECTOR( freeVector ); \ +- COMPUTE_Funcs(); \ +- } +- +- +-#define DO_SFVTL \ +- if ( INS_SxVTL( (FT_UShort)args[1], \ +- (FT_UShort)args[0], \ +- CUR.opcode, \ +- &CUR.GS.freeVector ) == SUCCESS ) \ +- { \ +- GUESS_VECTOR( projVector ); \ +- COMPUTE_Funcs(); \ +- } +- +- +-#define DO_SFVTPV \ +- GUESS_VECTOR( projVector ); \ +- CUR.GS.freeVector = CUR.GS.projVector; \ ++#define DO_SVTCA \ ++ { \ ++ FT_Short A, B; \ ++ \ ++ \ ++ A = (FT_Short)( exc->opcode & 1 ) << 14; \ ++ B = A ^ (FT_Short)0x4000; \ ++ \ ++ exc->GS.freeVector.x = A; \ ++ exc->GS.projVector.x = A; \ ++ exc->GS.dualVector.x = A; \ ++ \ ++ exc->GS.freeVector.y = B; \ ++ exc->GS.projVector.y = B; \ ++ exc->GS.dualVector.y = B; \ ++ \ ++ COMPUTE_Funcs(); \ ++ } ++ ++ ++#define DO_SPVTCA \ ++ { \ ++ FT_Short A, B; \ ++ \ ++ \ ++ A = (FT_Short)( exc->opcode & 1 ) << 14; \ ++ B = A ^ (FT_Short)0x4000; \ ++ \ ++ exc->GS.projVector.x = A; \ ++ exc->GS.dualVector.x = A; \ ++ \ ++ exc->GS.projVector.y = B; \ ++ exc->GS.dualVector.y = B; \ ++ \ ++ GUESS_VECTOR( freeVector ); \ ++ \ ++ COMPUTE_Funcs(); \ ++ } ++ ++ ++#define DO_SFVTCA \ ++ { \ ++ FT_Short A, B; \ ++ \ ++ \ ++ A = (FT_Short)( exc->opcode & 1 ) << 14; \ ++ B = A ^ (FT_Short)0x4000; \ ++ \ ++ exc->GS.freeVector.x = A; \ ++ exc->GS.freeVector.y = B; \ ++ \ ++ GUESS_VECTOR( projVector ); \ ++ \ ++ COMPUTE_Funcs(); \ ++ } ++ ++ ++#define DO_SPVTL \ ++ if ( INS_SxVTL( (FT_UShort)args[1], \ ++ (FT_UShort)args[0], \ ++ exc->opcode, \ ++ &exc->GS.projVector ) == SUCCESS ) \ ++ { \ ++ exc->GS.dualVector = exc->GS.projVector; \ ++ GUESS_VECTOR( freeVector ); \ ++ COMPUTE_Funcs(); \ ++ } ++ ++ ++#define DO_SFVTL \ ++ if ( INS_SxVTL( (FT_UShort)args[1], \ ++ (FT_UShort)args[0], \ ++ exc->opcode, \ ++ &exc->GS.freeVector ) == SUCCESS ) \ ++ { \ ++ GUESS_VECTOR( projVector ); \ ++ COMPUTE_Funcs(); \ ++ } ++ ++ ++#define DO_SFVTPV \ ++ GUESS_VECTOR( projVector ); \ ++ exc->GS.freeVector = exc->GS.projVector; \ + COMPUTE_Funcs(); + + +@@ -2895,9 +2891,9 @@ + S = (FT_Short)args[0]; \ + X = (FT_Long)S; \ + \ +- NORMalize( X, Y, &CUR.GS.projVector ); \ ++ NORMalize( X, Y, &exc->GS.projVector ); \ + \ +- CUR.GS.dualVector = CUR.GS.projVector; \ ++ exc->GS.dualVector = exc->GS.projVector; \ + GUESS_VECTOR( freeVector ); \ + COMPUTE_Funcs(); \ + } +@@ -2915,145 +2911,145 @@ + S = (FT_Short)args[0]; \ + X = S; \ + \ +- NORMalize( X, Y, &CUR.GS.freeVector ); \ ++ NORMalize( X, Y, &exc->GS.freeVector ); \ + GUESS_VECTOR( projVector ); \ + COMPUTE_Funcs(); \ + } + + + #ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING +-#define DO_GPV \ +- if ( CUR.face->unpatented_hinting ) \ +- { \ +- args[0] = CUR.GS.both_x_axis ? 0x4000 : 0; \ +- args[1] = CUR.GS.both_x_axis ? 0 : 0x4000; \ +- } \ +- else \ +- { \ +- args[0] = CUR.GS.projVector.x; \ +- args[1] = CUR.GS.projVector.y; \ ++#define DO_GPV \ ++ if ( exc->face->unpatented_hinting ) \ ++ { \ ++ args[0] = exc->GS.both_x_axis ? 0x4000 : 0; \ ++ args[1] = exc->GS.both_x_axis ? 0 : 0x4000; \ ++ } \ ++ else \ ++ { \ ++ args[0] = exc->GS.projVector.x; \ ++ args[1] = exc->GS.projVector.y; \ + } + #else +-#define DO_GPV \ +- args[0] = CUR.GS.projVector.x; \ +- args[1] = CUR.GS.projVector.y; ++#define DO_GPV \ ++ args[0] = exc->GS.projVector.x; \ ++ args[1] = exc->GS.projVector.y; + #endif + + + #ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING +-#define DO_GFV \ +- if ( CUR.face->unpatented_hinting ) \ +- { \ +- args[0] = CUR.GS.both_x_axis ? 0x4000 : 0; \ +- args[1] = CUR.GS.both_x_axis ? 0 : 0x4000; \ +- } \ +- else \ +- { \ +- args[0] = CUR.GS.freeVector.x; \ +- args[1] = CUR.GS.freeVector.y; \ ++#define DO_GFV \ ++ if ( exc->face->unpatented_hinting ) \ ++ { \ ++ args[0] = exc->GS.both_x_axis ? 0x4000 : 0; \ ++ args[1] = exc->GS.both_x_axis ? 0 : 0x4000; \ ++ } \ ++ else \ ++ { \ ++ args[0] = exc->GS.freeVector.x; \ ++ args[1] = exc->GS.freeVector.y; \ + } + #else +-#define DO_GFV \ +- args[0] = CUR.GS.freeVector.x; \ +- args[1] = CUR.GS.freeVector.y; ++#define DO_GFV \ ++ args[0] = exc->GS.freeVector.x; \ ++ args[1] = exc->GS.freeVector.y; + #endif + + +-#define DO_SRP0 \ +- CUR.GS.rp0 = (FT_UShort)args[0]; ++#define DO_SRP0 \ ++ exc->GS.rp0 = (FT_UShort)args[0]; + + +-#define DO_SRP1 \ +- CUR.GS.rp1 = (FT_UShort)args[0]; ++#define DO_SRP1 \ ++ exc->GS.rp1 = (FT_UShort)args[0]; + + +-#define DO_SRP2 \ +- CUR.GS.rp2 = (FT_UShort)args[0]; ++#define DO_SRP2 \ ++ exc->GS.rp2 = (FT_UShort)args[0]; + + +-#define DO_RTHG \ +- CUR.GS.round_state = TT_Round_To_Half_Grid; \ +- CUR.func_round = (TT_Round_Func)Round_To_Half_Grid; ++#define DO_RTHG \ ++ exc->GS.round_state = TT_Round_To_Half_Grid; \ ++ exc->func_round = (TT_Round_Func)Round_To_Half_Grid; + + +-#define DO_RTG \ +- CUR.GS.round_state = TT_Round_To_Grid; \ +- CUR.func_round = (TT_Round_Func)Round_To_Grid; ++#define DO_RTG \ ++ exc->GS.round_state = TT_Round_To_Grid; \ ++ exc->func_round = (TT_Round_Func)Round_To_Grid; + + +-#define DO_RTDG \ +- CUR.GS.round_state = TT_Round_To_Double_Grid; \ +- CUR.func_round = (TT_Round_Func)Round_To_Double_Grid; ++#define DO_RTDG \ ++ exc->GS.round_state = TT_Round_To_Double_Grid; \ ++ exc->func_round = (TT_Round_Func)Round_To_Double_Grid; + + +-#define DO_RUTG \ +- CUR.GS.round_state = TT_Round_Up_To_Grid; \ +- CUR.func_round = (TT_Round_Func)Round_Up_To_Grid; ++#define DO_RUTG \ ++ exc->GS.round_state = TT_Round_Up_To_Grid; \ ++ exc->func_round = (TT_Round_Func)Round_Up_To_Grid; + + +-#define DO_RDTG \ +- CUR.GS.round_state = TT_Round_Down_To_Grid; \ +- CUR.func_round = (TT_Round_Func)Round_Down_To_Grid; ++#define DO_RDTG \ ++ exc->GS.round_state = TT_Round_Down_To_Grid; \ ++ exc->func_round = (TT_Round_Func)Round_Down_To_Grid; + + +-#define DO_ROFF \ +- CUR.GS.round_state = TT_Round_Off; \ +- CUR.func_round = (TT_Round_Func)Round_None; ++#define DO_ROFF \ ++ exc->GS.round_state = TT_Round_Off; \ ++ exc->func_round = (TT_Round_Func)Round_None; + + +-#define DO_SROUND \ +- SET_SuperRound( 0x4000, args[0] ); \ +- CUR.GS.round_state = TT_Round_Super; \ +- CUR.func_round = (TT_Round_Func)Round_Super; ++#define DO_SROUND \ ++ SET_SuperRound( 0x4000, args[0] ); \ ++ exc->GS.round_state = TT_Round_Super; \ ++ exc->func_round = (TT_Round_Func)Round_Super; + + +-#define DO_S45ROUND \ +- SET_SuperRound( 0x2D41, args[0] ); \ +- CUR.GS.round_state = TT_Round_Super_45; \ +- CUR.func_round = (TT_Round_Func)Round_Super_45; ++#define DO_S45ROUND \ ++ SET_SuperRound( 0x2D41, args[0] ); \ ++ exc->GS.round_state = TT_Round_Super_45; \ ++ exc->func_round = (TT_Round_Func)Round_Super_45; + + +-#define DO_SLOOP \ +- if ( args[0] < 0 ) \ +- CUR.error = FT_THROW( Bad_Argument ); \ +- else \ +- CUR.GS.loop = args[0]; ++#define DO_SLOOP \ ++ if ( args[0] < 0 ) \ ++ exc->error = FT_THROW( Bad_Argument ); \ ++ else \ ++ exc->GS.loop = args[0]; + + +-#define DO_SMD \ +- CUR.GS.minimum_distance = args[0]; ++#define DO_SMD \ ++ exc->GS.minimum_distance = args[0]; + + +-#define DO_SCVTCI \ +- CUR.GS.control_value_cutin = (FT_F26Dot6)args[0]; ++#define DO_SCVTCI \ ++ exc->GS.control_value_cutin = (FT_F26Dot6)args[0]; + + +-#define DO_SSWCI \ +- CUR.GS.single_width_cutin = (FT_F26Dot6)args[0]; ++#define DO_SSWCI \ ++ exc->GS.single_width_cutin = (FT_F26Dot6)args[0]; + + +-#define DO_SSW \ +- CUR.GS.single_width_value = FT_MulFix( args[0], \ +- CUR.tt_metrics.scale ); ++#define DO_SSW \ ++ exc->GS.single_width_value = FT_MulFix( args[0], \ ++ exc->tt_metrics.scale ); + + +-#define DO_FLIPON \ +- CUR.GS.auto_flip = TRUE; ++#define DO_FLIPON \ ++ exc->GS.auto_flip = TRUE; + + +-#define DO_FLIPOFF \ +- CUR.GS.auto_flip = FALSE; ++#define DO_FLIPOFF \ ++ exc->GS.auto_flip = FALSE; + + +-#define DO_SDB \ +- CUR.GS.delta_base = (FT_UShort)args[0]; ++#define DO_SDB \ ++ exc->GS.delta_base = (FT_UShort)args[0]; + + +-#define DO_SDS \ +- if ( (FT_ULong)args[0] > 6UL ) \ +- CUR.error = FT_THROW( Bad_Argument ); \ +- else \ +- CUR.GS.delta_shift = (FT_UShort)args[0]; ++#define DO_SDS \ ++ if ( (FT_ULong)args[0] > 6UL ) \ ++ exc->error = FT_THROW( Bad_Argument ); \ ++ else \ ++ exc->GS.delta_shift = (FT_UShort)args[0]; + + + #define DO_MD /* nothing */ +@@ -3067,8 +3063,8 @@ + /* we thus decide to return only the ppem. */ + #if 0 + +-#define DO_MPS \ +- args[0] = CUR.metrics.pointSize; ++#define DO_MPS \ ++ args[0] = exc->metrics.pointSize; + + #else + +@@ -3082,8 +3078,8 @@ + args[1] = args[0]; + + +-#define DO_CLEAR \ +- CUR.new_top = 0; ++#define DO_CLEAR \ ++ exc->new_top = 0; + + + #define DO_SWAP \ +@@ -3097,64 +3093,64 @@ + } + + +-#define DO_DEPTH \ +- args[0] = CUR.top; ++#define DO_DEPTH \ ++ args[0] = exc->top; + + +-#define DO_CINDEX \ +- { \ +- FT_Long L; \ +- \ +- \ +- L = args[0]; \ +- \ +- if ( L <= 0 || L > CUR.args ) \ +- { \ +- if ( CUR.pedantic_hinting ) \ +- CUR.error = FT_THROW( Invalid_Reference ); \ +- args[0] = 0; \ +- } \ +- else \ +- args[0] = CUR.stack[CUR.args - L]; \ ++#define DO_CINDEX \ ++ { \ ++ FT_Long L; \ ++ \ ++ \ ++ L = args[0]; \ ++ \ ++ if ( L <= 0 || L > exc->args ) \ ++ { \ ++ if ( exc->pedantic_hinting ) \ ++ exc->error = FT_THROW( Invalid_Reference ); \ ++ args[0] = 0; \ ++ } \ ++ else \ ++ args[0] = exc->stack[exc->args - L]; \ + } + + +-#define DO_JROT \ +- if ( args[1] != 0 ) \ +- { \ +- if ( args[0] == 0 && CUR.args == 0 ) \ +- CUR.error = FT_THROW( Bad_Argument ); \ +- CUR.IP += args[0]; \ +- if ( CUR.IP < 0 || \ +- ( CUR.callTop > 0 && \ +- CUR.IP > CUR.callStack[CUR.callTop - 1].Def->end ) ) \ +- CUR.error = FT_THROW( Bad_Argument ); \ +- CUR.step_ins = FALSE; \ ++#define DO_JROT \ ++ if ( args[1] != 0 ) \ ++ { \ ++ if ( args[0] == 0 && exc->args == 0 ) \ ++ exc->error = FT_THROW( Bad_Argument ); \ ++ exc->IP += args[0]; \ ++ if ( exc->IP < 0 || \ ++ ( exc->callTop > 0 && \ ++ exc->IP > exc->callStack[exc->callTop - 1].Def->end ) ) \ ++ exc->error = FT_THROW( Bad_Argument ); \ ++ exc->step_ins = FALSE; \ + } + + +-#define DO_JMPR \ +- if ( args[0] == 0 && CUR.args == 0 ) \ +- CUR.error = FT_THROW( Bad_Argument ); \ +- CUR.IP += args[0]; \ +- if ( CUR.IP < 0 || \ +- ( CUR.callTop > 0 && \ +- CUR.IP > CUR.callStack[CUR.callTop - 1].Def->end ) ) \ +- CUR.error = FT_THROW( Bad_Argument ); \ +- CUR.step_ins = FALSE; ++#define DO_JMPR \ ++ if ( args[0] == 0 && exc->args == 0 ) \ ++ exc->error = FT_THROW( Bad_Argument ); \ ++ exc->IP += args[0]; \ ++ if ( exc->IP < 0 || \ ++ ( exc->callTop > 0 && \ ++ exc->IP > exc->callStack[exc->callTop - 1].Def->end ) ) \ ++ exc->error = FT_THROW( Bad_Argument ); \ ++ exc->step_ins = FALSE; + + +-#define DO_JROF \ +- if ( args[1] == 0 ) \ +- { \ +- if ( args[0] == 0 && CUR.args == 0 ) \ +- CUR.error = FT_THROW( Bad_Argument ); \ +- CUR.IP += args[0]; \ +- if ( CUR.IP < 0 || \ +- ( CUR.callTop > 0 && \ +- CUR.IP > CUR.callStack[CUR.callTop - 1].Def->end ) ) \ +- CUR.error = FT_THROW( Bad_Argument ); \ +- CUR.step_ins = FALSE; \ ++#define DO_JROF \ ++ if ( args[1] == 0 ) \ ++ { \ ++ if ( args[0] == 0 && exc->args == 0 ) \ ++ exc->error = FT_THROW( Bad_Argument ); \ ++ exc->IP += args[0]; \ ++ if ( exc->IP < 0 || \ ++ ( exc->callTop > 0 && \ ++ exc->IP > exc->callStack[exc->callTop - 1].Def->end ) ) \ ++ exc->error = FT_THROW( Bad_Argument ); \ ++ exc->step_ins = FALSE; \ + } + + +@@ -3212,7 +3208,7 @@ + + #define DO_DIV \ + if ( args[1] == 0 ) \ +- CUR.error = FT_THROW( Divide_By_Zero ); \ ++ exc->error = FT_THROW( Divide_By_Zero ); \ + else \ + args[0] = FT_MulDiv_No_Round( args[0], 64L, args[1] ); + +@@ -3229,7 +3225,7 @@ + args[0] = -args[0]; + + +-#define DO_FLOOR \ ++#define DO_FLOOR \ + args[0] = FT_PIX_FLOOR( args[0] ); + + +@@ -3238,79 +3234,79 @@ + + #ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING + +-#define DO_RS \ +- { \ +- FT_ULong I = (FT_ULong)args[0]; \ +- \ +- \ +- if ( BOUNDSL( I, CUR.storeSize ) ) \ +- { \ +- if ( CUR.pedantic_hinting ) \ +- ARRAY_BOUND_ERROR; \ +- else \ +- args[0] = 0; \ +- } \ +- else \ +- { \ +- /* subpixel hinting - avoid Typeman Dstroke and */ \ +- /* IStroke and Vacuform rounds */ \ +- \ +- if ( SUBPIXEL_HINTING && \ +- CUR.ignore_x_mode && \ +- ( ( I == 24 && \ +- ( CUR.face->sph_found_func_flags & \ +- ( SPH_FDEF_SPACING_1 | \ +- SPH_FDEF_SPACING_2 ) ) ) || \ +- ( I == 22 && \ +- ( CUR.sph_in_func_flags & \ +- SPH_FDEF_TYPEMAN_STROKES ) ) || \ +- ( I == 8 && \ +- ( CUR.face->sph_found_func_flags & \ +- SPH_FDEF_VACUFORM_ROUND_1 ) && \ +- CUR.iup_called ) ) ) \ +- args[0] = 0; \ +- else \ +- args[0] = CUR.storage[I]; \ +- } \ ++#define DO_RS \ ++ { \ ++ FT_ULong I = (FT_ULong)args[0]; \ ++ \ ++ \ ++ if ( BOUNDSL( I, exc->storeSize ) ) \ ++ { \ ++ if ( exc->pedantic_hinting ) \ ++ ARRAY_BOUND_ERROR; \ ++ else \ ++ args[0] = 0; \ ++ } \ ++ else \ ++ { \ ++ /* subpixel hinting - avoid Typeman Dstroke and */ \ ++ /* IStroke and Vacuform rounds */ \ ++ \ ++ if ( SUBPIXEL_HINTING && \ ++ exc->ignore_x_mode && \ ++ ( ( I == 24 && \ ++ ( exc->face->sph_found_func_flags & \ ++ ( SPH_FDEF_SPACING_1 | \ ++ SPH_FDEF_SPACING_2 ) ) ) || \ ++ ( I == 22 && \ ++ ( exc->sph_in_func_flags & \ ++ SPH_FDEF_TYPEMAN_STROKES ) ) || \ ++ ( I == 8 && \ ++ ( exc->face->sph_found_func_flags & \ ++ SPH_FDEF_VACUFORM_ROUND_1 ) && \ ++ exc->iup_called ) ) ) \ ++ args[0] = 0; \ ++ else \ ++ args[0] = exc->storage[I]; \ ++ } \ + } + + #else /* !TT_CONFIG_OPTION_SUBPIXEL_HINTING */ + +-#define DO_RS \ +- { \ +- FT_ULong I = (FT_ULong)args[0]; \ +- \ +- \ +- if ( BOUNDSL( I, CUR.storeSize ) ) \ +- { \ +- if ( CUR.pedantic_hinting ) \ +- { \ +- ARRAY_BOUND_ERROR; \ +- } \ +- else \ +- args[0] = 0; \ +- } \ +- else \ +- args[0] = CUR.storage[I]; \ ++#define DO_RS \ ++ { \ ++ FT_ULong I = (FT_ULong)args[0]; \ ++ \ ++ \ ++ if ( BOUNDSL( I, exc->storeSize ) ) \ ++ { \ ++ if ( exc->pedantic_hinting ) \ ++ { \ ++ ARRAY_BOUND_ERROR; \ ++ } \ ++ else \ ++ args[0] = 0; \ ++ } \ ++ else \ ++ args[0] = exc->storage[I]; \ + } + + #endif /* !TT_CONFIG_OPTION_SUBPIXEL_HINTING */ + + +-#define DO_WS \ +- { \ +- FT_ULong I = (FT_ULong)args[0]; \ +- \ +- \ +- if ( BOUNDSL( I, CUR.storeSize ) ) \ +- { \ +- if ( CUR.pedantic_hinting ) \ +- { \ +- ARRAY_BOUND_ERROR; \ +- } \ +- } \ +- else \ +- CUR.storage[I] = args[1]; \ ++#define DO_WS \ ++ { \ ++ FT_ULong I = (FT_ULong)args[0]; \ ++ \ ++ \ ++ if ( BOUNDSL( I, exc->storeSize ) ) \ ++ { \ ++ if ( exc->pedantic_hinting ) \ ++ { \ ++ ARRAY_BOUND_ERROR; \ ++ } \ ++ } \ ++ else \ ++ exc->storage[I] = args[1]; \ + } + + +@@ -3319,9 +3315,9 @@ + FT_ULong I = (FT_ULong)args[0]; \ + \ + \ +- if ( BOUNDSL( I, CUR.cvtSize ) ) \ ++ if ( BOUNDSL( I, exc->cvtSize ) ) \ + { \ +- if ( CUR.pedantic_hinting ) \ ++ if ( exc->pedantic_hinting ) \ + { \ + ARRAY_BOUND_ERROR; \ + } \ +@@ -3338,9 +3334,9 @@ + FT_ULong I = (FT_ULong)args[0]; \ + \ + \ +- if ( BOUNDSL( I, CUR.cvtSize ) ) \ ++ if ( BOUNDSL( I, exc->cvtSize ) ) \ + { \ +- if ( CUR.pedantic_hinting ) \ ++ if ( exc->pedantic_hinting ) \ + { \ + ARRAY_BOUND_ERROR; \ + } \ +@@ -3350,36 +3346,36 @@ + } + + +-#define DO_WCVTF \ +- { \ +- FT_ULong I = (FT_ULong)args[0]; \ +- \ +- \ +- if ( BOUNDSL( I, CUR.cvtSize ) ) \ +- { \ +- if ( CUR.pedantic_hinting ) \ +- { \ +- ARRAY_BOUND_ERROR; \ +- } \ +- } \ +- else \ +- CUR.cvt[I] = FT_MulFix( args[1], CUR.tt_metrics.scale ); \ ++#define DO_WCVTF \ ++ { \ ++ FT_ULong I = (FT_ULong)args[0]; \ ++ \ ++ \ ++ if ( BOUNDSL( I, exc->cvtSize ) ) \ ++ { \ ++ if ( exc->pedantic_hinting ) \ ++ { \ ++ ARRAY_BOUND_ERROR; \ ++ } \ ++ } \ ++ else \ ++ exc->cvt[I] = FT_MulFix( args[1], exc->tt_metrics.scale ); \ + } + + +-#define DO_DEBUG \ +- CUR.error = FT_THROW( Debug_OpCode ); ++#define DO_DEBUG \ ++ exc->error = FT_THROW( Debug_OpCode ); + + +-#define DO_ROUND \ +- args[0] = CUR_Func_round( \ +- args[0], \ +- CUR.tt_metrics.compensations[CUR.opcode - 0x68] ); ++#define DO_ROUND \ ++ args[0] = CUR_Func_round( \ ++ args[0], \ ++ exc->tt_metrics.compensations[exc->opcode - 0x68] ); + + +-#define DO_NROUND \ +- args[0] = ROUND_None( args[0], \ +- CUR.tt_metrics.compensations[CUR.opcode - 0x6C] ); ++#define DO_NROUND \ ++ args[0] = ROUND_None( args[0], \ ++ exc->tt_metrics.compensations[exc->opcode - 0x6C] ); + + + #define DO_MAX \ +@@ -3396,10 +3392,10 @@ + + + #undef ARRAY_BOUND_ERROR +-#define ARRAY_BOUND_ERROR \ +- { \ +- CUR.error = FT_THROW( Invalid_Reference ); \ +- return; \ ++#define ARRAY_BOUND_ERROR \ ++ { \ ++ exc->error = FT_THROW( Invalid_Reference ); \ ++ return; \ + } + + +@@ -4375,20 +4371,20 @@ + + L = args[0]; + +- if ( L <= 0 || L > CUR.args ) ++ if ( L <= 0 || L > exc->args ) + { +- if ( CUR.pedantic_hinting ) +- CUR.error = FT_THROW( Invalid_Reference ); ++ if ( exc->pedantic_hinting ) ++ exc->error = FT_THROW( Invalid_Reference ); + } + else + { +- K = CUR.stack[CUR.args - L]; ++ K = exc->stack[exc->args - L]; + +- FT_ARRAY_MOVE( &CUR.stack[CUR.args - L ], +- &CUR.stack[CUR.args - L + 1], ++ FT_ARRAY_MOVE( &exc->stack[exc->args - L ], ++ &exc->stack[exc->args - L + 1], + ( L - 1 ) ); + +- CUR.stack[CUR.args - 1] = K; ++ exc->stack[exc->args - 1] = K; + } + } + +@@ -4429,26 +4425,26 @@ + static FT_Bool + SkipCode( EXEC_OP ) + { +- CUR.IP += CUR.length; ++ exc->IP += exc->length; + +- if ( CUR.IP < CUR.codeSize ) ++ if ( exc->IP < exc->codeSize ) + { +- CUR.opcode = CUR.code[CUR.IP]; ++ exc->opcode = exc->code[exc->IP]; + +- CUR.length = opcode_length[CUR.opcode]; +- if ( CUR.length < 0 ) ++ exc->length = opcode_length[exc->opcode]; ++ if ( exc->length < 0 ) + { +- if ( CUR.IP + 1 >= CUR.codeSize ) ++ if ( exc->IP + 1 >= exc->codeSize ) + goto Fail_Overflow; +- CUR.length = 2 - CUR.length * CUR.code[CUR.IP + 1]; ++ exc->length = 2 - exc->length * exc->code[exc->IP + 1]; + } + +- if ( CUR.IP + CUR.length <= CUR.codeSize ) ++ if ( exc->IP + exc->length <= exc->codeSize ) + return SUCCESS; + } + + Fail_Overflow: +- CUR.error = FT_THROW( Code_Overflow ); ++ exc->error = FT_THROW( Code_Overflow ); + return FAILURE; + } + +@@ -4477,7 +4473,7 @@ + if ( SKIP_Code() == FAILURE ) + return; + +- switch ( CUR.opcode ) ++ switch ( exc->opcode ) + { + case 0x58: /* IF */ + nIfs++; +@@ -4517,7 +4513,7 @@ + if ( SKIP_Code() == FAILURE ) + return; + +- switch ( CUR.opcode ) ++ switch ( exc->opcode ) + { + case 0x58: /* IF */ + nIfs++; +@@ -4657,8 +4653,8 @@ + /* some font programs are broken enough to redefine functions! */ + /* We will then parse the current table. */ + +- rec = CUR.FDefs; +- limit = rec + CUR.numFDefs; ++ rec = exc->FDefs; ++ limit = rec + exc->numFDefs; + n = args[0]; + + for ( ; rec < limit; rec++ ) +@@ -4670,31 +4666,31 @@ + if ( rec == limit ) + { + /* check that there is enough room for new functions */ +- if ( CUR.numFDefs >= CUR.maxFDefs ) ++ if ( exc->numFDefs >= exc->maxFDefs ) + { +- CUR.error = FT_THROW( Too_Many_Function_Defs ); ++ exc->error = FT_THROW( Too_Many_Function_Defs ); + return; + } +- CUR.numFDefs++; ++ exc->numFDefs++; + } + + /* Although FDEF takes unsigned 32-bit integer, */ + /* func # must be within unsigned 16-bit integer */ + if ( n > 0xFFFFU ) + { +- CUR.error = FT_THROW( Too_Many_Function_Defs ); ++ exc->error = FT_THROW( Too_Many_Function_Defs ); + return; + } + +- rec->range = CUR.curRange; ++ rec->range = exc->curRange; + rec->opc = (FT_UInt16)n; +- rec->start = CUR.IP + 1; ++ rec->start = exc->IP + 1; + rec->active = TRUE; + rec->inline_delta = FALSE; + rec->sph_fdef_flags = 0x0000; + +- if ( n > CUR.maxFunc ) +- CUR.maxFunc = (FT_UInt16)n; ++ if ( n > exc->maxFunc ) ++ exc->maxFunc = (FT_UInt16)n; + + #ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING + /* We don't know for sure these are typeman functions, */ +@@ -4715,8 +4711,8 @@ + { + for ( i = 0; i < opcode_patterns; i++ ) + { +- if ( opcode_pointer[i] < opcode_size[i] && +- CUR.opcode == opcode_pattern[i][opcode_pointer[i]] ) ++ if ( opcode_pointer[i] < opcode_size[i] && ++ exc->opcode == opcode_pattern[i][opcode_pointer[i]] ) + { + opcode_pointer[i] += 1; + +@@ -4724,19 +4720,19 @@ + { + FT_TRACE7(( "sph: Function %d, opcode ptrn: %d, %s %s\n", + i, n, +- CUR.face->root.family_name, +- CUR.face->root.style_name )); ++ exc->face->root.family_name, ++ exc->face->root.style_name )); + + switch ( i ) + { + case 0: +- rec->sph_fdef_flags |= SPH_FDEF_INLINE_DELTA_1; +- CUR.face->sph_found_func_flags |= SPH_FDEF_INLINE_DELTA_1; ++ rec->sph_fdef_flags |= SPH_FDEF_INLINE_DELTA_1; ++ exc->face->sph_found_func_flags |= SPH_FDEF_INLINE_DELTA_1; + break; + + case 1: +- rec->sph_fdef_flags |= SPH_FDEF_INLINE_DELTA_2; +- CUR.face->sph_found_func_flags |= SPH_FDEF_INLINE_DELTA_2; ++ rec->sph_fdef_flags |= SPH_FDEF_INLINE_DELTA_2; ++ exc->face->sph_found_func_flags |= SPH_FDEF_INLINE_DELTA_2; + break; + + case 2: +@@ -4744,8 +4740,8 @@ + { + /* needs to be implemented still */ + case 58: +- rec->sph_fdef_flags |= SPH_FDEF_DIAGONAL_STROKE; +- CUR.face->sph_found_func_flags |= SPH_FDEF_DIAGONAL_STROKE; ++ rec->sph_fdef_flags |= SPH_FDEF_DIAGONAL_STROKE; ++ exc->face->sph_found_func_flags |= SPH_FDEF_DIAGONAL_STROKE; + } + break; + +@@ -4753,15 +4749,15 @@ + switch ( n ) + { + case 0: +- rec->sph_fdef_flags |= SPH_FDEF_VACUFORM_ROUND_1; +- CUR.face->sph_found_func_flags |= SPH_FDEF_VACUFORM_ROUND_1; ++ rec->sph_fdef_flags |= SPH_FDEF_VACUFORM_ROUND_1; ++ exc->face->sph_found_func_flags |= SPH_FDEF_VACUFORM_ROUND_1; + } + break; + + case 4: + /* probably not necessary to detect anymore */ +- rec->sph_fdef_flags |= SPH_FDEF_TTFAUTOHINT_1; +- CUR.face->sph_found_func_flags |= SPH_FDEF_TTFAUTOHINT_1; ++ rec->sph_fdef_flags |= SPH_FDEF_TTFAUTOHINT_1; ++ exc->face->sph_found_func_flags |= SPH_FDEF_TTFAUTOHINT_1; + break; + + case 5: +@@ -4773,8 +4769,8 @@ + case 4: + case 7: + case 8: +- rec->sph_fdef_flags |= SPH_FDEF_SPACING_1; +- CUR.face->sph_found_func_flags |= SPH_FDEF_SPACING_1; ++ rec->sph_fdef_flags |= SPH_FDEF_SPACING_1; ++ exc->face->sph_found_func_flags |= SPH_FDEF_SPACING_1; + } + break; + +@@ -4787,20 +4783,20 @@ + case 4: + case 7: + case 8: +- rec->sph_fdef_flags |= SPH_FDEF_SPACING_2; +- CUR.face->sph_found_func_flags |= SPH_FDEF_SPACING_2; ++ rec->sph_fdef_flags |= SPH_FDEF_SPACING_2; ++ exc->face->sph_found_func_flags |= SPH_FDEF_SPACING_2; + } + break; + + case 7: +- rec->sph_fdef_flags |= SPH_FDEF_TYPEMAN_DIAGENDCTRL; +- CUR.face->sph_found_func_flags |= SPH_FDEF_TYPEMAN_DIAGENDCTRL; ++ rec->sph_fdef_flags |= SPH_FDEF_TYPEMAN_DIAGENDCTRL; ++ exc->face->sph_found_func_flags |= SPH_FDEF_TYPEMAN_DIAGENDCTRL; + break; + + case 8: + #if 0 +- rec->sph_fdef_flags |= SPH_FDEF_TYPEMAN_DIAGENDCTRL; +- CUR.face->sph_found_func_flags |= SPH_FDEF_TYPEMAN_DIAGENDCTRL; ++ rec->sph_fdef_flags |= SPH_FDEF_TYPEMAN_DIAGENDCTRL; ++ exc->face->sph_found_func_flags |= SPH_FDEF_TYPEMAN_DIAGENDCTRL; + #endif + break; + } +@@ -4813,22 +4809,22 @@ + } + + /* Set sph_compatibility_mode only when deltas are detected */ +- CUR.face->sph_compatibility_mode = +- ( ( CUR.face->sph_found_func_flags & SPH_FDEF_INLINE_DELTA_1 ) | +- ( CUR.face->sph_found_func_flags & SPH_FDEF_INLINE_DELTA_2 ) ); ++ exc->face->sph_compatibility_mode = ++ ( ( exc->face->sph_found_func_flags & SPH_FDEF_INLINE_DELTA_1 ) | ++ ( exc->face->sph_found_func_flags & SPH_FDEF_INLINE_DELTA_2 ) ); + } + + #endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ + +- switch ( CUR.opcode ) ++ switch ( exc->opcode ) + { + case 0x89: /* IDEF */ + case 0x2C: /* FDEF */ +- CUR.error = FT_THROW( Nested_DEFS ); ++ exc->error = FT_THROW( Nested_DEFS ); + return; + + case 0x2D: /* ENDF */ +- rec->end = CUR.IP; ++ rec->end = exc->IP; + return; + } + } +@@ -4850,27 +4846,27 @@ + + + #ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING +- CUR.sph_in_func_flags = 0x0000; ++ exc->sph_in_func_flags = 0x0000; + #endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ + +- if ( CUR.callTop <= 0 ) /* We encountered an ENDF without a call */ ++ if ( exc->callTop <= 0 ) /* We encountered an ENDF without a call */ + { +- CUR.error = FT_THROW( ENDF_In_Exec_Stream ); ++ exc->error = FT_THROW( ENDF_In_Exec_Stream ); + return; + } + +- CUR.callTop--; ++ exc->callTop--; + +- pRec = &CUR.callStack[CUR.callTop]; ++ pRec = &exc->callStack[exc->callTop]; + + pRec->Cur_Count--; + +- CUR.step_ins = FALSE; ++ exc->step_ins = FALSE; + + if ( pRec->Cur_Count > 0 ) + { +- CUR.callTop++; +- CUR.IP = pRec->Def->start; ++ exc->callTop++; ++ exc->IP = pRec->Def->start; + } + else + /* Loop through the current function */ +@@ -4904,27 +4900,27 @@ + /* first of all, check the index */ + + F = args[0]; +- if ( BOUNDSL( F, CUR.maxFunc + 1 ) ) ++ if ( BOUNDSL( F, exc->maxFunc + 1 ) ) + goto Fail; + + /* Except for some old Apple fonts, all functions in a TrueType */ + /* font are defined in increasing order, starting from 0. This */ + /* means that we normally have */ + /* */ +- /* CUR.maxFunc+1 == CUR.numFDefs */ +- /* CUR.FDefs[n].opc == n for n in 0..CUR.maxFunc */ ++ /* exc->maxFunc+1 == exc->numFDefs */ ++ /* exc->FDefs[n].opc == n for n in 0..exc->maxFunc */ + /* */ + /* If this isn't true, we need to look up the function table. */ + +- def = CUR.FDefs + F; +- if ( CUR.maxFunc + 1 != CUR.numFDefs || def->opc != F ) ++ def = exc->FDefs + F; ++ if ( exc->maxFunc + 1 != exc->numFDefs || def->opc != F ) + { + /* look up the FDefs table */ + TT_DefRecord* limit; + + +- def = CUR.FDefs; +- limit = def + CUR.numFDefs; ++ def = exc->FDefs; ++ limit = def + exc->numFDefs; + + while ( def < limit && def->opc != F ) + def++; +@@ -4938,41 +4934,41 @@ + goto Fail; + + #ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING +- if ( SUBPIXEL_HINTING && +- CUR.ignore_x_mode && +- ( ( CUR.iup_called && +- ( CUR.sph_tweak_flags & SPH_TWEAK_NO_CALL_AFTER_IUP ) ) || +- ( def->sph_fdef_flags & SPH_FDEF_VACUFORM_ROUND_1 ) ) ) ++ if ( SUBPIXEL_HINTING && ++ exc->ignore_x_mode && ++ ( ( exc->iup_called && ++ ( exc->sph_tweak_flags & SPH_TWEAK_NO_CALL_AFTER_IUP ) ) || ++ ( def->sph_fdef_flags & SPH_FDEF_VACUFORM_ROUND_1 ) ) ) + goto Fail; + else +- CUR.sph_in_func_flags = def->sph_fdef_flags; ++ exc->sph_in_func_flags = def->sph_fdef_flags; + #endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ + + /* check the call stack */ +- if ( CUR.callTop >= CUR.callSize ) ++ if ( exc->callTop >= exc->callSize ) + { +- CUR.error = FT_THROW( Stack_Overflow ); ++ exc->error = FT_THROW( Stack_Overflow ); + return; + } + +- pCrec = CUR.callStack + CUR.callTop; ++ pCrec = exc->callStack + exc->callTop; + +- pCrec->Caller_Range = CUR.curRange; +- pCrec->Caller_IP = CUR.IP + 1; ++ pCrec->Caller_Range = exc->curRange; ++ pCrec->Caller_IP = exc->IP + 1; + pCrec->Cur_Count = 1; + pCrec->Def = def; + +- CUR.callTop++; ++ exc->callTop++; + + INS_Goto_CodeRange( def->range, + def->start ); + +- CUR.step_ins = FALSE; ++ exc->step_ins = FALSE; + + return; + + Fail: +- CUR.error = FT_THROW( Invalid_Reference ); ++ exc->error = FT_THROW( Invalid_Reference ); + } + + +@@ -4992,27 +4988,27 @@ + + /* first of all, check the index */ + F = args[1]; +- if ( BOUNDSL( F, CUR.maxFunc + 1 ) ) ++ if ( BOUNDSL( F, exc->maxFunc + 1 ) ) + goto Fail; + + /* Except for some old Apple fonts, all functions in a TrueType */ + /* font are defined in increasing order, starting from 0. This */ + /* means that we normally have */ + /* */ +- /* CUR.maxFunc+1 == CUR.numFDefs */ +- /* CUR.FDefs[n].opc == n for n in 0..CUR.maxFunc */ ++ /* exc->maxFunc+1 == exc->numFDefs */ ++ /* exc->FDefs[n].opc == n for n in 0..exc->maxFunc */ + /* */ + /* If this isn't true, we need to look up the function table. */ + +- def = CUR.FDefs + F; +- if ( CUR.maxFunc + 1 != CUR.numFDefs || def->opc != F ) ++ def = exc->FDefs + F; ++ if ( exc->maxFunc + 1 != exc->numFDefs || def->opc != F ) + { + /* look up the FDefs table */ + TT_DefRecord* limit; + + +- def = CUR.FDefs; +- limit = def + CUR.numFDefs; ++ def = exc->FDefs; ++ limit = def + exc->numFDefs; + + while ( def < limit && def->opc != F ) + def++; +@@ -5027,40 +5023,40 @@ + + #ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING + if ( SUBPIXEL_HINTING && +- CUR.ignore_x_mode && ++ exc->ignore_x_mode && + ( def->sph_fdef_flags & SPH_FDEF_VACUFORM_ROUND_1 ) ) + goto Fail; + else +- CUR.sph_in_func_flags = def->sph_fdef_flags; ++ exc->sph_in_func_flags = def->sph_fdef_flags; + #endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ + + /* check stack */ +- if ( CUR.callTop >= CUR.callSize ) ++ if ( exc->callTop >= exc->callSize ) + { +- CUR.error = FT_THROW( Stack_Overflow ); ++ exc->error = FT_THROW( Stack_Overflow ); + return; + } + + if ( args[0] > 0 ) + { +- pCrec = CUR.callStack + CUR.callTop; ++ pCrec = exc->callStack + exc->callTop; + +- pCrec->Caller_Range = CUR.curRange; +- pCrec->Caller_IP = CUR.IP + 1; ++ pCrec->Caller_Range = exc->curRange; ++ pCrec->Caller_IP = exc->IP + 1; + pCrec->Cur_Count = (FT_Int)args[0]; + pCrec->Def = def; + +- CUR.callTop++; ++ exc->callTop++; + + INS_Goto_CodeRange( def->range, def->start ); + +- CUR.step_ins = FALSE; ++ exc->step_ins = FALSE; + } + + return; + + Fail: +- CUR.error = FT_THROW( Invalid_Reference ); ++ exc->error = FT_THROW( Invalid_Reference ); + } + + +@@ -5079,8 +5075,8 @@ + + /* First of all, look for the same function in our table */ + +- def = CUR.IDefs; +- limit = def + CUR.numIDefs; ++ def = exc->IDefs; ++ limit = def + exc->numIDefs; + + for ( ; def < limit; def++ ) + if ( def->opc == (FT_ULong)args[0] ) +@@ -5089,39 +5085,39 @@ + if ( def == limit ) + { + /* check that there is enough room for a new instruction */ +- if ( CUR.numIDefs >= CUR.maxIDefs ) ++ if ( exc->numIDefs >= exc->maxIDefs ) + { +- CUR.error = FT_THROW( Too_Many_Instruction_Defs ); ++ exc->error = FT_THROW( Too_Many_Instruction_Defs ); + return; + } +- CUR.numIDefs++; ++ exc->numIDefs++; + } + + /* opcode must be unsigned 8-bit integer */ + if ( 0 > args[0] || args[0] > 0x00FF ) + { +- CUR.error = FT_THROW( Too_Many_Instruction_Defs ); ++ exc->error = FT_THROW( Too_Many_Instruction_Defs ); + return; + } + + def->opc = (FT_Byte)args[0]; +- def->start = CUR.IP + 1; +- def->range = CUR.curRange; ++ def->start = exc->IP + 1; ++ def->range = exc->curRange; + def->active = TRUE; + +- if ( (FT_ULong)args[0] > CUR.maxIns ) +- CUR.maxIns = (FT_Byte)args[0]; ++ if ( (FT_ULong)args[0] > exc->maxIns ) ++ exc->maxIns = (FT_Byte)args[0]; + + /* Now skip the whole function definition. */ + /* We don't allow nested IDEFs & FDEFs. */ + + while ( SKIP_Code() == SUCCESS ) + { +- switch ( CUR.opcode ) ++ switch ( exc->opcode ) + { + case 0x89: /* IDEF */ + case 0x2C: /* FDEF */ +- CUR.error = FT_THROW( Nested_DEFS ); ++ exc->error = FT_THROW( Nested_DEFS ); + return; + case 0x2D: /* ENDF */ + return; +@@ -5151,18 +5147,18 @@ + FT_UShort L, K; + + +- L = (FT_UShort)CUR.code[CUR.IP + 1]; ++ L = (FT_UShort)exc->code[exc->IP + 1]; + +- if ( BOUNDS( L, CUR.stackSize + 1 - CUR.top ) ) ++ if ( BOUNDS( L, exc->stackSize + 1 - exc->top ) ) + { +- CUR.error = FT_THROW( Stack_Overflow ); ++ exc->error = FT_THROW( Stack_Overflow ); + return; + } + + for ( K = 1; K <= L; K++ ) +- args[K - 1] = CUR.code[CUR.IP + K + 1]; ++ args[K - 1] = exc->code[exc->IP + K + 1]; + +- CUR.new_top += L; ++ exc->new_top += L; + } + + +@@ -5178,21 +5174,21 @@ + FT_UShort L, K; + + +- L = (FT_UShort)CUR.code[CUR.IP + 1]; ++ L = (FT_UShort)exc->code[exc->IP + 1]; + +- if ( BOUNDS( L, CUR.stackSize + 1 - CUR.top ) ) ++ if ( BOUNDS( L, exc->stackSize + 1 - exc->top ) ) + { +- CUR.error = FT_THROW( Stack_Overflow ); ++ exc->error = FT_THROW( Stack_Overflow ); + return; + } + +- CUR.IP += 2; ++ exc->IP += 2; + + for ( K = 0; K < L; K++ ) + args[K] = GET_ShortIns(); + +- CUR.step_ins = FALSE; +- CUR.new_top += L; ++ exc->step_ins = FALSE; ++ exc->new_top += L; + } + + +@@ -5208,16 +5204,16 @@ + FT_UShort L, K; + + +- L = (FT_UShort)( CUR.opcode - 0xB0 + 1 ); ++ L = (FT_UShort)( exc->opcode - 0xB0 + 1 ); + +- if ( BOUNDS( L, CUR.stackSize + 1 - CUR.top ) ) ++ if ( BOUNDS( L, exc->stackSize + 1 - exc->top ) ) + { +- CUR.error = FT_THROW( Stack_Overflow ); ++ exc->error = FT_THROW( Stack_Overflow ); + return; + } + + for ( K = 1; K <= L; K++ ) +- args[K - 1] = CUR.code[CUR.IP + K]; ++ args[K - 1] = exc->code[exc->IP + K]; + } + + +@@ -5233,20 +5229,20 @@ + FT_UShort L, K; + + +- L = (FT_UShort)( CUR.opcode - 0xB8 + 1 ); ++ L = (FT_UShort)( exc->opcode - 0xB8 + 1 ); + +- if ( BOUNDS( L, CUR.stackSize + 1 - CUR.top ) ) ++ if ( BOUNDS( L, exc->stackSize + 1 - exc->top ) ) + { +- CUR.error = FT_THROW( Stack_Overflow ); ++ exc->error = FT_THROW( Stack_Overflow ); + return; + } + +- CUR.IP++; ++ exc->IP++; + + for ( K = 0; K < L; K++ ) + args[K] = GET_ShortIns(); + +- CUR.step_ins = FALSE; ++ exc->step_ins = FALSE; + } + + +@@ -5277,18 +5273,18 @@ + + L = (FT_ULong)args[0]; + +- if ( BOUNDSL( L, CUR.zp2.n_points ) ) ++ if ( BOUNDSL( L, exc->zp2.n_points ) ) + { +- if ( CUR.pedantic_hinting ) +- CUR.error = FT_THROW( Invalid_Reference ); ++ if ( exc->pedantic_hinting ) ++ exc->error = FT_THROW( Invalid_Reference ); + R = 0; + } + else + { +- if ( CUR.opcode & 1 ) +- R = CUR_fast_dualproj( &CUR.zp2.org[L] ); ++ if ( exc->opcode & 1 ) ++ R = CUR_fast_dualproj( &exc->zp2.org[L] ); + else +- R = CUR_fast_project( &CUR.zp2.cur[L] ); ++ R = CUR_fast_project( &exc->zp2.cur[L] ); + } + + args[0] = R; +@@ -5314,21 +5310,21 @@ + + L = (FT_UShort)args[0]; + +- if ( BOUNDS( L, CUR.zp2.n_points ) ) ++ if ( BOUNDS( L, exc->zp2.n_points ) ) + { +- if ( CUR.pedantic_hinting ) +- CUR.error = FT_THROW( Invalid_Reference ); ++ if ( exc->pedantic_hinting ) ++ exc->error = FT_THROW( Invalid_Reference ); + return; + } + +- K = CUR_fast_project( &CUR.zp2.cur[L] ); ++ K = CUR_fast_project( &exc->zp2.cur[L] ); + +- CUR_Func_move( &CUR.zp2, L, args[1] - K ); ++ CUR_Func_move( &exc->zp2, L, args[1] - K ); + + /* UNDOCUMENTED! The MS rasterizer does that with */ + /* twilight points (confirmed by Greg Hitchcock) */ +- if ( CUR.GS.gep2 == 0 ) +- CUR.zp2.org[L] = CUR.zp2.cur[L]; ++ if ( exc->GS.gep2 == 0 ) ++ exc->zp2.org[L] = exc->zp2.cur[L]; + } + + +@@ -5357,48 +5353,48 @@ + K = (FT_UShort)args[1]; + L = (FT_UShort)args[0]; + +- if ( BOUNDS( L, CUR.zp0.n_points ) || +- BOUNDS( K, CUR.zp1.n_points ) ) ++ if ( BOUNDS( L, exc->zp0.n_points ) || ++ BOUNDS( K, exc->zp1.n_points ) ) + { +- if ( CUR.pedantic_hinting ) +- CUR.error = FT_THROW( Invalid_Reference ); ++ if ( exc->pedantic_hinting ) ++ exc->error = FT_THROW( Invalid_Reference ); + D = 0; + } + else + { +- if ( CUR.opcode & 1 ) +- D = CUR_Func_project( CUR.zp0.cur + L, CUR.zp1.cur + K ); ++ if ( exc->opcode & 1 ) ++ D = CUR_Func_project( exc->zp0.cur + L, exc->zp1.cur + K ); + else + { + /* XXX: UNDOCUMENTED: twilight zone special case */ + +- if ( CUR.GS.gep0 == 0 || CUR.GS.gep1 == 0 ) ++ if ( exc->GS.gep0 == 0 || exc->GS.gep1 == 0 ) + { +- FT_Vector* vec1 = CUR.zp0.org + L; +- FT_Vector* vec2 = CUR.zp1.org + K; ++ FT_Vector* vec1 = exc->zp0.org + L; ++ FT_Vector* vec2 = exc->zp1.org + K; + + + D = CUR_Func_dualproj( vec1, vec2 ); + } + else + { +- FT_Vector* vec1 = CUR.zp0.orus + L; +- FT_Vector* vec2 = CUR.zp1.orus + K; ++ FT_Vector* vec1 = exc->zp0.orus + L; ++ FT_Vector* vec2 = exc->zp1.orus + K; + + +- if ( CUR.metrics.x_scale == CUR.metrics.y_scale ) ++ if ( exc->metrics.x_scale == exc->metrics.y_scale ) + { + /* this should be faster */ + D = CUR_Func_dualproj( vec1, vec2 ); +- D = FT_MulFix( D, CUR.metrics.x_scale ); ++ D = FT_MulFix( D, exc->metrics.x_scale ); + } + else + { + FT_Vector vec; + + +- vec.x = FT_MulFix( vec1->x - vec2->x, CUR.metrics.x_scale ); +- vec.y = FT_MulFix( vec1->y - vec2->y, CUR.metrics.y_scale ); ++ vec.x = FT_MulFix( vec1->x - vec2->x, exc->metrics.x_scale ); ++ vec.y = FT_MulFix( vec1->y - vec2->y, exc->metrics.y_scale ); + + D = CUR_fast_dualproj( &vec ); + } +@@ -5408,8 +5404,8 @@ + + #ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING + /* Disable Type 2 Vacuform Rounds - e.g. Arial Narrow */ +- if ( SUBPIXEL_HINTING && +- CUR.ignore_x_mode && FT_ABS( D ) == 64 ) ++ if ( SUBPIXEL_HINTING && ++ exc->ignore_x_mode && FT_ABS( D ) == 64 ) + D += 1; + #endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ + +@@ -5428,23 +5424,23 @@ + { + FT_Long A, B, C; + FT_UShort p1, p2; /* was FT_Int in pas type ERROR */ +- FT_Int aOpc = CUR.opcode; ++ FT_Int aOpc = exc->opcode; + + + p1 = (FT_UShort)args[1]; + p2 = (FT_UShort)args[0]; + +- if ( BOUNDS( p2, CUR.zp1.n_points ) || +- BOUNDS( p1, CUR.zp2.n_points ) ) ++ if ( BOUNDS( p2, exc->zp1.n_points ) || ++ BOUNDS( p1, exc->zp2.n_points ) ) + { +- if ( CUR.pedantic_hinting ) +- CUR.error = FT_THROW( Invalid_Reference ); ++ if ( exc->pedantic_hinting ) ++ exc->error = FT_THROW( Invalid_Reference ); + return; + } + + { +- FT_Vector* v1 = CUR.zp1.org + p2; +- FT_Vector* v2 = CUR.zp2.org + p1; ++ FT_Vector* v1 = exc->zp1.org + p2; ++ FT_Vector* v2 = exc->zp2.org + p1; + + + A = v1->x - v2->x; +@@ -5469,11 +5465,11 @@ + A = -C; + } + +- NORMalize( A, B, &CUR.GS.dualVector ); ++ NORMalize( A, B, &exc->GS.dualVector ); + + { +- FT_Vector* v1 = CUR.zp1.cur + p2; +- FT_Vector* v2 = CUR.zp2.cur + p1; ++ FT_Vector* v1 = exc->zp1.cur + p2; ++ FT_Vector* v2 = exc->zp2.cur + p1; + + + A = v1->x - v2->x; +@@ -5493,7 +5489,7 @@ + A = -C; + } + +- NORMalize( A, B, &CUR.GS.projVector ); ++ NORMalize( A, B, &exc->GS.projVector ); + + GUESS_VECTOR( freeVector ); + +@@ -5513,20 +5509,20 @@ + switch ( (FT_Int)args[0] ) + { + case 0: +- CUR.zp0 = CUR.twilight; ++ exc->zp0 = exc->twilight; + break; + + case 1: +- CUR.zp0 = CUR.pts; ++ exc->zp0 = exc->pts; + break; + + default: +- if ( CUR.pedantic_hinting ) +- CUR.error = FT_THROW( Invalid_Reference ); ++ if ( exc->pedantic_hinting ) ++ exc->error = FT_THROW( Invalid_Reference ); + return; + } + +- CUR.GS.gep0 = (FT_UShort)args[0]; ++ exc->GS.gep0 = (FT_UShort)args[0]; + } + + +@@ -5542,20 +5538,20 @@ + switch ( (FT_Int)args[0] ) + { + case 0: +- CUR.zp1 = CUR.twilight; ++ exc->zp1 = exc->twilight; + break; + + case 1: +- CUR.zp1 = CUR.pts; ++ exc->zp1 = exc->pts; + break; + + default: +- if ( CUR.pedantic_hinting ) +- CUR.error = FT_THROW( Invalid_Reference ); ++ if ( exc->pedantic_hinting ) ++ exc->error = FT_THROW( Invalid_Reference ); + return; + } + +- CUR.GS.gep1 = (FT_UShort)args[0]; ++ exc->GS.gep1 = (FT_UShort)args[0]; + } + + +@@ -5571,20 +5567,20 @@ + switch ( (FT_Int)args[0] ) + { + case 0: +- CUR.zp2 = CUR.twilight; ++ exc->zp2 = exc->twilight; + break; + + case 1: +- CUR.zp2 = CUR.pts; ++ exc->zp2 = exc->pts; + break; + + default: +- if ( CUR.pedantic_hinting ) +- CUR.error = FT_THROW( Invalid_Reference ); ++ if ( exc->pedantic_hinting ) ++ exc->error = FT_THROW( Invalid_Reference ); + return; + } + +- CUR.GS.gep2 = (FT_UShort)args[0]; ++ exc->GS.gep2 = (FT_UShort)args[0]; + } + + +@@ -5600,25 +5596,25 @@ + switch ( (FT_Int)args[0] ) + { + case 0: +- CUR.zp0 = CUR.twilight; ++ exc->zp0 = exc->twilight; + break; + + case 1: +- CUR.zp0 = CUR.pts; ++ exc->zp0 = exc->pts; + break; + + default: +- if ( CUR.pedantic_hinting ) +- CUR.error = FT_THROW( Invalid_Reference ); ++ if ( exc->pedantic_hinting ) ++ exc->error = FT_THROW( Invalid_Reference ); + return; + } + +- CUR.zp1 = CUR.zp0; +- CUR.zp2 = CUR.zp0; ++ exc->zp1 = exc->zp0; ++ exc->zp2 = exc->zp0; + +- CUR.GS.gep0 = (FT_UShort)args[0]; +- CUR.GS.gep1 = (FT_UShort)args[0]; +- CUR.GS.gep2 = (FT_UShort)args[0]; ++ exc->GS.gep0 = (FT_UShort)args[0]; ++ exc->GS.gep1 = (FT_UShort)args[0]; ++ exc->GS.gep2 = (FT_UShort)args[0]; + } + + +@@ -5639,16 +5635,16 @@ + + if ( K < 1 || K > 2 ) + { +- if ( CUR.pedantic_hinting ) +- CUR.error = FT_THROW( Invalid_Reference ); ++ if ( exc->pedantic_hinting ) ++ exc->error = FT_THROW( Invalid_Reference ); + return; + } + + if ( L != 0 ) + L = K; + +- CUR.GS.instruct_control = FT_BOOL( +- ( (FT_Byte)CUR.GS.instruct_control & ~(FT_Byte)K ) | (FT_Byte)L ); ++ exc->GS.instruct_control = FT_BOOL( ++ ( (FT_Byte)exc->GS.instruct_control & ~(FT_Byte)K ) | (FT_Byte)L ); + } + + +@@ -5669,32 +5665,32 @@ + + if ( A == 0xFF ) + { +- CUR.GS.scan_control = TRUE; ++ exc->GS.scan_control = TRUE; + return; + } + else if ( A == 0 ) + { +- CUR.GS.scan_control = FALSE; ++ exc->GS.scan_control = FALSE; + return; + } + +- if ( ( args[0] & 0x100 ) != 0 && CUR.tt_metrics.ppem <= A ) +- CUR.GS.scan_control = TRUE; ++ if ( ( args[0] & 0x100 ) != 0 && exc->tt_metrics.ppem <= A ) ++ exc->GS.scan_control = TRUE; + +- if ( ( args[0] & 0x200 ) != 0 && CUR.tt_metrics.rotated ) +- CUR.GS.scan_control = TRUE; ++ if ( ( args[0] & 0x200 ) != 0 && exc->tt_metrics.rotated ) ++ exc->GS.scan_control = TRUE; + +- if ( ( args[0] & 0x400 ) != 0 && CUR.tt_metrics.stretched ) +- CUR.GS.scan_control = TRUE; ++ if ( ( args[0] & 0x400 ) != 0 && exc->tt_metrics.stretched ) ++ exc->GS.scan_control = TRUE; + +- if ( ( args[0] & 0x800 ) != 0 && CUR.tt_metrics.ppem > A ) +- CUR.GS.scan_control = FALSE; ++ if ( ( args[0] & 0x800 ) != 0 && exc->tt_metrics.ppem > A ) ++ exc->GS.scan_control = FALSE; + +- if ( ( args[0] & 0x1000 ) != 0 && CUR.tt_metrics.rotated ) +- CUR.GS.scan_control = FALSE; ++ if ( ( args[0] & 0x1000 ) != 0 && exc->tt_metrics.rotated ) ++ exc->GS.scan_control = FALSE; + +- if ( ( args[0] & 0x2000 ) != 0 && CUR.tt_metrics.stretched ) +- CUR.GS.scan_control = FALSE; ++ if ( ( args[0] & 0x2000 ) != 0 && exc->tt_metrics.stretched ) ++ exc->GS.scan_control = FALSE; + } + + +@@ -5708,7 +5704,7 @@ + Ins_SCANTYPE( INS_ARG ) + { + if ( args[0] >= 0 ) +- CUR.GS.scan_type = (FT_Int)args[0]; ++ exc->GS.scan_type = (FT_Int)args[0]; + } + + +@@ -5735,36 +5731,36 @@ + FT_UNUSED_ARG; + + +- if ( CUR.top < CUR.GS.loop ) ++ if ( exc->top < exc->GS.loop ) + { +- if ( CUR.pedantic_hinting ) +- CUR.error = FT_THROW( Too_Few_Arguments ); ++ if ( exc->pedantic_hinting ) ++ exc->error = FT_THROW( Too_Few_Arguments ); + goto Fail; + } + +- while ( CUR.GS.loop > 0 ) ++ while ( exc->GS.loop > 0 ) + { +- CUR.args--; ++ exc->args--; + +- point = (FT_UShort)CUR.stack[CUR.args]; ++ point = (FT_UShort)exc->stack[exc->args]; + +- if ( BOUNDS( point, CUR.pts.n_points ) ) ++ if ( BOUNDS( point, exc->pts.n_points ) ) + { +- if ( CUR.pedantic_hinting ) ++ if ( exc->pedantic_hinting ) + { +- CUR.error = FT_THROW( Invalid_Reference ); ++ exc->error = FT_THROW( Invalid_Reference ); + return; + } + } + else +- CUR.pts.tags[point] ^= FT_CURVE_TAG_ON; ++ exc->pts.tags[point] ^= FT_CURVE_TAG_ON; + +- CUR.GS.loop--; ++ exc->GS.loop--; + } + + Fail: +- CUR.GS.loop = 1; +- CUR.new_top = CUR.args; ++ exc->GS.loop = 1; ++ exc->new_top = exc->args; + } + + +@@ -5783,16 +5779,16 @@ + K = (FT_UShort)args[1]; + L = (FT_UShort)args[0]; + +- if ( BOUNDS( K, CUR.pts.n_points ) || +- BOUNDS( L, CUR.pts.n_points ) ) ++ if ( BOUNDS( K, exc->pts.n_points ) || ++ BOUNDS( L, exc->pts.n_points ) ) + { +- if ( CUR.pedantic_hinting ) +- CUR.error = FT_THROW( Invalid_Reference ); ++ if ( exc->pedantic_hinting ) ++ exc->error = FT_THROW( Invalid_Reference ); + return; + } + + for ( I = L; I <= K; I++ ) +- CUR.pts.tags[I] |= FT_CURVE_TAG_ON; ++ exc->pts.tags[I] |= FT_CURVE_TAG_ON; + } + + +@@ -5811,16 +5807,16 @@ + K = (FT_UShort)args[1]; + L = (FT_UShort)args[0]; + +- if ( BOUNDS( K, CUR.pts.n_points ) || +- BOUNDS( L, CUR.pts.n_points ) ) ++ if ( BOUNDS( K, exc->pts.n_points ) || ++ BOUNDS( L, exc->pts.n_points ) ) + { +- if ( CUR.pedantic_hinting ) +- CUR.error = FT_THROW( Invalid_Reference ); ++ if ( exc->pedantic_hinting ) ++ exc->error = FT_THROW( Invalid_Reference ); + return; + } + + for ( I = L; I <= K; I++ ) +- CUR.pts.tags[I] &= ~FT_CURVE_TAG_ON; ++ exc->pts.tags[I] &= ~FT_CURVE_TAG_ON; + } + + +@@ -5835,21 +5831,21 @@ + FT_F26Dot6 d; + + +- if ( CUR.opcode & 1 ) ++ if ( exc->opcode & 1 ) + { +- zp = CUR.zp0; +- p = CUR.GS.rp1; ++ zp = exc->zp0; ++ p = exc->GS.rp1; + } + else + { +- zp = CUR.zp1; +- p = CUR.GS.rp2; ++ zp = exc->zp1; ++ p = exc->GS.rp2; + } + + if ( BOUNDS( p, zp.n_points ) ) + { +- if ( CUR.pedantic_hinting ) +- CUR.error = FT_THROW( Invalid_Reference ); ++ if ( exc->pedantic_hinting ) ++ exc->error = FT_THROW( Invalid_Reference ); + *refp = 0; + return FAILURE; + } +@@ -5860,9 +5856,9 @@ + d = CUR_Func_project( zp.cur + p, zp.org + p ); + + #ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING +- if ( CUR.face->unpatented_hinting ) ++ if ( exc->face->unpatented_hinting ) + { +- if ( CUR.GS.both_x_axis ) ++ if ( exc->GS.both_x_axis ) + { + *x = d; + *y = 0; +@@ -5876,8 +5872,8 @@ + else + #endif + { +- *x = FT_MulDiv( d, (FT_Long)CUR.GS.freeVector.x, CUR.F_dot_P ); +- *y = FT_MulDiv( d, (FT_Long)CUR.GS.freeVector.y, CUR.F_dot_P ); ++ *x = FT_MulDiv( d, (FT_Long)exc->GS.freeVector.x, exc->F_dot_P ); ++ *y = FT_MulDiv( d, (FT_Long)exc->GS.freeVector.y, exc->F_dot_P ); + } + + return SUCCESS; +@@ -5891,36 +5887,36 @@ + FT_Bool touch ) + { + #ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING +- if ( CUR.face->unpatented_hinting ) ++ if ( exc->face->unpatented_hinting ) + { +- if ( CUR.GS.both_x_axis ) ++ if ( exc->GS.both_x_axis ) + { +- CUR.zp2.cur[point].x += dx; ++ exc->zp2.cur[point].x += dx; + if ( touch ) +- CUR.zp2.tags[point] |= FT_CURVE_TAG_TOUCH_X; ++ exc->zp2.tags[point] |= FT_CURVE_TAG_TOUCH_X; + } + else + { +- CUR.zp2.cur[point].y += dy; ++ exc->zp2.cur[point].y += dy; + if ( touch ) +- CUR.zp2.tags[point] |= FT_CURVE_TAG_TOUCH_Y; ++ exc->zp2.tags[point] |= FT_CURVE_TAG_TOUCH_Y; + } + return; + } + #endif + +- if ( CUR.GS.freeVector.x != 0 ) ++ if ( exc->GS.freeVector.x != 0 ) + { +- CUR.zp2.cur[point].x += dx; ++ exc->zp2.cur[point].x += dx; + if ( touch ) +- CUR.zp2.tags[point] |= FT_CURVE_TAG_TOUCH_X; ++ exc->zp2.tags[point] |= FT_CURVE_TAG_TOUCH_X; + } + +- if ( CUR.GS.freeVector.y != 0 ) ++ if ( exc->GS.freeVector.y != 0 ) + { +- CUR.zp2.cur[point].y += dy; ++ exc->zp2.cur[point].y += dy; + if ( touch ) +- CUR.zp2.tags[point] |= FT_CURVE_TAG_TOUCH_Y; ++ exc->zp2.tags[point] |= FT_CURVE_TAG_TOUCH_Y; + } + } + +@@ -5944,45 +5940,45 @@ + FT_UNUSED_ARG; + + +- if ( CUR.top < CUR.GS.loop ) ++ if ( exc->top < exc->GS.loop ) + { +- if ( CUR.pedantic_hinting ) +- CUR.error = FT_THROW( Invalid_Reference ); ++ if ( exc->pedantic_hinting ) ++ exc->error = FT_THROW( Invalid_Reference ); + goto Fail; + } + + if ( COMPUTE_Point_Displacement( &dx, &dy, &zp, &refp ) ) + return; + +- while ( CUR.GS.loop > 0 ) ++ while ( exc->GS.loop > 0 ) + { +- CUR.args--; +- point = (FT_UShort)CUR.stack[CUR.args]; ++ exc->args--; ++ point = (FT_UShort)exc->stack[exc->args]; + +- if ( BOUNDS( point, CUR.zp2.n_points ) ) ++ if ( BOUNDS( point, exc->zp2.n_points ) ) + { +- if ( CUR.pedantic_hinting ) ++ if ( exc->pedantic_hinting ) + { +- CUR.error = FT_THROW( Invalid_Reference ); ++ exc->error = FT_THROW( Invalid_Reference ); + return; + } + } + else + #ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING + /* doesn't follow Cleartype spec but produces better result */ +- if ( SUBPIXEL_HINTING && +- CUR.ignore_x_mode ) ++ if ( SUBPIXEL_HINTING && ++ exc->ignore_x_mode ) + MOVE_Zp2_Point( point, 0, dy, TRUE ); + else + #endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ + MOVE_Zp2_Point( point, dx, dy, TRUE ); + +- CUR.GS.loop--; ++ exc->GS.loop--; + } + + Fail: +- CUR.GS.loop = 1; +- CUR.new_top = CUR.args; ++ exc->GS.loop = 1; ++ exc->new_top = exc->args; + } + + +@@ -6008,12 +6004,12 @@ + + + contour = (FT_UShort)args[0]; +- bounds = ( CUR.GS.gep2 == 0 ) ? 1 : CUR.zp2.n_contours; ++ bounds = ( exc->GS.gep2 == 0 ) ? 1 : exc->zp2.n_contours; + + if ( BOUNDS( contour, bounds ) ) + { +- if ( CUR.pedantic_hinting ) +- CUR.error = FT_THROW( Invalid_Reference ); ++ if ( exc->pedantic_hinting ) ++ exc->error = FT_THROW( Invalid_Reference ); + return; + } + +@@ -6023,19 +6019,19 @@ + if ( contour == 0 ) + start = 0; + else +- start = (FT_UShort)( CUR.zp2.contours[contour - 1] + 1 - +- CUR.zp2.first_point ); ++ start = (FT_UShort)( exc->zp2.contours[contour - 1] + 1 - ++ exc->zp2.first_point ); + + /* we use the number of points if in the twilight zone */ +- if ( CUR.GS.gep2 == 0 ) +- limit = CUR.zp2.n_points; ++ if ( exc->GS.gep2 == 0 ) ++ limit = exc->zp2.n_points; + else +- limit = (FT_UShort)( CUR.zp2.contours[contour] - +- CUR.zp2.first_point + 1 ); ++ limit = (FT_UShort)( exc->zp2.contours[contour] - ++ exc->zp2.first_point + 1 ); + + for ( i = start; i < limit; i++ ) + { +- if ( zp.cur != CUR.zp2.cur || refp != i ) ++ if ( zp.cur != exc->zp2.cur || refp != i ) + MOVE_Zp2_Point( i, dx, dy, TRUE ); + } + } +@@ -6060,8 +6056,8 @@ + + if ( BOUNDS( args[0], 2 ) ) + { +- if ( CUR.pedantic_hinting ) +- CUR.error = FT_THROW( Invalid_Reference ); ++ if ( exc->pedantic_hinting ) ++ exc->error = FT_THROW( Invalid_Reference ); + return; + } + +@@ -6072,17 +6068,17 @@ + /* Twilight zone has no real contours, so use `n_points'. */ + /* Normal zone's `n_points' includes phantoms, so must */ + /* use end of last contour. */ +- if ( CUR.GS.gep2 == 0 ) +- limit = (FT_UShort)CUR.zp2.n_points; +- else if ( CUR.GS.gep2 == 1 && CUR.zp2.n_contours > 0 ) +- limit = (FT_UShort)( CUR.zp2.contours[CUR.zp2.n_contours - 1] + 1 ); ++ if ( exc->GS.gep2 == 0 ) ++ limit = (FT_UShort)exc->zp2.n_points; ++ else if ( exc->GS.gep2 == 1 && exc->zp2.n_contours > 0 ) ++ limit = (FT_UShort)( exc->zp2.contours[exc->zp2.n_contours - 1] + 1 ); + else + limit = 0; + + /* XXX: UNDOCUMENTED! SHZ doesn't touch the points */ + for ( i = 0; i < limit; i++ ) + { +- if ( zp.cur != CUR.zp2.cur || refp != i ) ++ if ( zp.cur != exc->zp2.cur || refp != i ) + MOVE_Zp2_Point( i, dx, dy, FALSE ); + } + } +@@ -6104,17 +6100,17 @@ + #endif + + +- if ( CUR.top < CUR.GS.loop + 1 ) ++ if ( exc->top < exc->GS.loop + 1 ) + { +- if ( CUR.pedantic_hinting ) +- CUR.error = FT_THROW( Invalid_Reference ); ++ if ( exc->pedantic_hinting ) ++ exc->error = FT_THROW( Invalid_Reference ); + goto Fail; + } + + #ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING +- if ( CUR.face->unpatented_hinting ) ++ if ( exc->face->unpatented_hinting ) + { +- if ( CUR.GS.both_x_axis ) ++ if ( exc->GS.both_x_axis ) + { + dx = (FT_UInt32)args[0]; + dy = 0; +@@ -6128,21 +6124,21 @@ + else + #endif + { +- dx = TT_MulFix14( (FT_UInt32)args[0], CUR.GS.freeVector.x ); +- dy = TT_MulFix14( (FT_UInt32)args[0], CUR.GS.freeVector.y ); ++ dx = TT_MulFix14( (FT_UInt32)args[0], exc->GS.freeVector.x ); ++ dy = TT_MulFix14( (FT_UInt32)args[0], exc->GS.freeVector.y ); + } + +- while ( CUR.GS.loop > 0 ) ++ while ( exc->GS.loop > 0 ) + { +- CUR.args--; ++ exc->args--; + +- point = (FT_UShort)CUR.stack[CUR.args]; ++ point = (FT_UShort)exc->stack[exc->args]; + +- if ( BOUNDS( point, CUR.zp2.n_points ) ) ++ if ( BOUNDS( point, exc->zp2.n_points ) ) + { +- if ( CUR.pedantic_hinting ) ++ if ( exc->pedantic_hinting ) + { +- CUR.error = FT_THROW( Invalid_Reference ); ++ exc->error = FT_THROW( Invalid_Reference ); + return; + } + } +@@ -6157,57 +6153,57 @@ + /* - the glyph is specifically set to allow SHPIX moves */ + /* - the move is on a previously Y-touched point */ + +- if ( SUBPIXEL_HINTING && +- CUR.ignore_x_mode ) ++ if ( SUBPIXEL_HINTING && ++ exc->ignore_x_mode ) + { + /* save point for later comparison */ +- if ( CUR.GS.freeVector.y != 0 ) +- B1 = CUR.zp2.cur[point].y; ++ if ( exc->GS.freeVector.y != 0 ) ++ B1 = exc->zp2.cur[point].y; + else +- B1 = CUR.zp2.cur[point].x; ++ B1 = exc->zp2.cur[point].x; + +- if ( !CUR.face->sph_compatibility_mode && +- CUR.GS.freeVector.y != 0 ) ++ if ( !exc->face->sph_compatibility_mode && ++ exc->GS.freeVector.y != 0 ) + { + MOVE_Zp2_Point( point, dx, dy, TRUE ); + + /* save new point */ +- if ( CUR.GS.freeVector.y != 0 ) ++ if ( exc->GS.freeVector.y != 0 ) + { +- B2 = CUR.zp2.cur[point].y; ++ B2 = exc->zp2.cur[point].y; + + /* reverse any disallowed moves */ +- if ( ( CUR.sph_tweak_flags & SPH_TWEAK_SKIP_NONPIXEL_Y_MOVES ) && +- ( B1 & 63 ) != 0 && +- ( B2 & 63 ) != 0 && +- B1 != B2 ) ++ if ( ( exc->sph_tweak_flags & SPH_TWEAK_SKIP_NONPIXEL_Y_MOVES ) && ++ ( B1 & 63 ) != 0 && ++ ( B2 & 63 ) != 0 && ++ B1 != B2 ) + MOVE_Zp2_Point( point, -dx, -dy, TRUE ); + } + } +- else if ( CUR.face->sph_compatibility_mode ) ++ else if ( exc->face->sph_compatibility_mode ) + { +- if ( CUR.sph_tweak_flags & SPH_TWEAK_ROUND_NONPIXEL_Y_MOVES ) ++ if ( exc->sph_tweak_flags & SPH_TWEAK_ROUND_NONPIXEL_Y_MOVES ) + { + dx = FT_PIX_ROUND( B1 + dx ) - B1; + dy = FT_PIX_ROUND( B1 + dy ) - B1; + } + + /* skip post-iup deltas */ +- if ( CUR.iup_called && +- ( ( CUR.sph_in_func_flags & SPH_FDEF_INLINE_DELTA_1 ) || +- ( CUR.sph_in_func_flags & SPH_FDEF_INLINE_DELTA_2 ) ) ) ++ if ( exc->iup_called && ++ ( ( exc->sph_in_func_flags & SPH_FDEF_INLINE_DELTA_1 ) || ++ ( exc->sph_in_func_flags & SPH_FDEF_INLINE_DELTA_2 ) ) ) + goto Skip; + +- if ( !( CUR.sph_tweak_flags & SPH_TWEAK_ALWAYS_SKIP_DELTAP ) && +- ( ( CUR.is_composite && CUR.GS.freeVector.y != 0 ) || +- ( CUR.zp2.tags[point] & FT_CURVE_TAG_TOUCH_Y ) || +- ( CUR.sph_tweak_flags & SPH_TWEAK_DO_SHPIX ) ) ) ++ if ( !( exc->sph_tweak_flags & SPH_TWEAK_ALWAYS_SKIP_DELTAP ) && ++ ( ( exc->is_composite && exc->GS.freeVector.y != 0 ) || ++ ( exc->zp2.tags[point] & FT_CURVE_TAG_TOUCH_Y ) || ++ ( exc->sph_tweak_flags & SPH_TWEAK_DO_SHPIX ) ) ) + MOVE_Zp2_Point( point, 0, dy, TRUE ); + + /* save new point */ +- if ( CUR.GS.freeVector.y != 0 ) ++ if ( exc->GS.freeVector.y != 0 ) + { +- B2 = CUR.zp2.cur[point].y; ++ B2 = exc->zp2.cur[point].y; + + /* reverse any disallowed moves */ + if ( ( B1 & 63 ) == 0 && +@@ -6216,7 +6212,7 @@ + MOVE_Zp2_Point( point, 0, -dy, TRUE ); + } + } +- else if ( CUR.sph_in_func_flags & SPH_FDEF_TYPEMAN_DIAGENDCTRL ) ++ else if ( exc->sph_in_func_flags & SPH_FDEF_TYPEMAN_DIAGENDCTRL ) + MOVE_Zp2_Point( point, dx, dy, TRUE ); + } + else +@@ -6231,12 +6227,12 @@ + + #endif /* !TT_CONFIG_OPTION_SUBPIXEL_HINTING */ + +- CUR.GS.loop--; ++ exc->GS.loop--; + } + + Fail: +- CUR.GS.loop = 1; +- CUR.new_top = CUR.args; ++ exc->GS.loop = 1; ++ exc->new_top = exc->args; + } + + +@@ -6258,11 +6254,11 @@ + + if ( SUBPIXEL_HINTING ) + { +- control_value_cutin = CUR.GS.control_value_cutin; ++ control_value_cutin = exc->GS.control_value_cutin; + +- if ( CUR.ignore_x_mode && +- CUR.GS.freeVector.x != 0 && +- !( CUR.sph_tweak_flags & SPH_TWEAK_NORMAL_ROUND ) ) ++ if ( exc->ignore_x_mode && ++ exc->GS.freeVector.x != 0 && ++ !( exc->sph_tweak_flags & SPH_TWEAK_NORMAL_ROUND ) ) + control_value_cutin = 0; + } + +@@ -6270,42 +6266,42 @@ + + point = (FT_UShort)args[0]; + +- if ( BOUNDS( point, CUR.zp1.n_points ) || +- BOUNDS( CUR.GS.rp0, CUR.zp0.n_points ) ) ++ if ( BOUNDS( point, exc->zp1.n_points ) || ++ BOUNDS( exc->GS.rp0, exc->zp0.n_points ) ) + { +- if ( CUR.pedantic_hinting ) +- CUR.error = FT_THROW( Invalid_Reference ); ++ if ( exc->pedantic_hinting ) ++ exc->error = FT_THROW( Invalid_Reference ); + return; + } + + /* UNDOCUMENTED! The MS rasterizer does that with */ + /* twilight points (confirmed by Greg Hitchcock) */ +- if ( CUR.GS.gep1 == 0 ) ++ if ( exc->GS.gep1 == 0 ) + { +- CUR.zp1.org[point] = CUR.zp0.org[CUR.GS.rp0]; +- CUR_Func_move_orig( &CUR.zp1, point, args[1] ); +- CUR.zp1.cur[point] = CUR.zp1.org[point]; ++ exc->zp1.org[point] = exc->zp0.org[exc->GS.rp0]; ++ CUR_Func_move_orig( &exc->zp1, point, args[1] ); ++ exc->zp1.cur[point] = exc->zp1.org[point]; + } + +- distance = CUR_Func_project( CUR.zp1.cur + point, +- CUR.zp0.cur + CUR.GS.rp0 ); ++ distance = CUR_Func_project( exc->zp1.cur + point, ++ exc->zp0.cur + exc->GS.rp0 ); + + #ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING + /* subpixel hinting - make MSIRP respect CVT cut-in; */ + if ( SUBPIXEL_HINTING && +- CUR.ignore_x_mode && +- CUR.GS.freeVector.x != 0 && ++ exc->ignore_x_mode && ++ exc->GS.freeVector.x != 0 && + FT_ABS( distance - args[1] ) >= control_value_cutin ) + distance = args[1]; + #endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ + +- CUR_Func_move( &CUR.zp1, point, args[1] - distance ); ++ CUR_Func_move( &exc->zp1, point, args[1] - distance ); + +- CUR.GS.rp1 = CUR.GS.rp0; +- CUR.GS.rp2 = point; ++ exc->GS.rp1 = exc->GS.rp0; ++ exc->GS.rp2 = point; + +- if ( ( CUR.opcode & 1 ) != 0 ) +- CUR.GS.rp0 = point; ++ if ( ( exc->opcode & 1 ) != 0 ) ++ exc->GS.rp0 = point; + } + + +@@ -6325,36 +6321,36 @@ + + point = (FT_UShort)args[0]; + +- if ( BOUNDS( point, CUR.zp0.n_points ) ) ++ if ( BOUNDS( point, exc->zp0.n_points ) ) + { +- if ( CUR.pedantic_hinting ) +- CUR.error = FT_THROW( Invalid_Reference ); ++ if ( exc->pedantic_hinting ) ++ exc->error = FT_THROW( Invalid_Reference ); + return; + } + +- if ( ( CUR.opcode & 1 ) != 0 ) ++ if ( ( exc->opcode & 1 ) != 0 ) + { +- cur_dist = CUR_fast_project( &CUR.zp0.cur[point] ); ++ cur_dist = CUR_fast_project( &exc->zp0.cur[point] ); + #ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING +- if ( SUBPIXEL_HINTING && +- CUR.ignore_x_mode && +- CUR.GS.freeVector.x != 0 ) ++ if ( SUBPIXEL_HINTING && ++ exc->ignore_x_mode && ++ exc->GS.freeVector.x != 0 ) + distance = ROUND_None( + cur_dist, +- CUR.tt_metrics.compensations[0] ) - cur_dist; ++ exc->tt_metrics.compensations[0] ) - cur_dist; + else + #endif + distance = CUR_Func_round( + cur_dist, +- CUR.tt_metrics.compensations[0] ) - cur_dist; ++ exc->tt_metrics.compensations[0] ) - cur_dist; + } + else + distance = 0; + +- CUR_Func_move( &CUR.zp0, point, distance ); ++ CUR_Func_move( &exc->zp0, point, distance ); + +- CUR.GS.rp0 = point; +- CUR.GS.rp1 = point; ++ exc->GS.rp0 = point; ++ exc->GS.rp1 = point; + } + + +@@ -6374,24 +6370,24 @@ + FT_F26Dot6 control_value_cutin; + + +- control_value_cutin = CUR.GS.control_value_cutin; ++ control_value_cutin = exc->GS.control_value_cutin; + cvtEntry = (FT_ULong)args[1]; + point = (FT_UShort)args[0]; + + #ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING +- if ( SUBPIXEL_HINTING && +- CUR.ignore_x_mode && +- CUR.GS.freeVector.x != 0 && +- CUR.GS.freeVector.y == 0 && +- !( CUR.sph_tweak_flags & SPH_TWEAK_NORMAL_ROUND ) ) ++ if ( SUBPIXEL_HINTING && ++ exc->ignore_x_mode && ++ exc->GS.freeVector.x != 0 && ++ exc->GS.freeVector.y == 0 && ++ !( exc->sph_tweak_flags & SPH_TWEAK_NORMAL_ROUND ) ) + control_value_cutin = 0; + #endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ + +- if ( BOUNDS( point, CUR.zp0.n_points ) || +- BOUNDSL( cvtEntry, CUR.cvtSize ) ) ++ if ( BOUNDS( point, exc->zp0.n_points ) || ++ BOUNDSL( cvtEntry, exc->cvtSize ) ) + { +- if ( CUR.pedantic_hinting ) +- CUR.error = FT_THROW( Invalid_Reference ); ++ if ( exc->pedantic_hinting ) ++ exc->error = FT_THROW( Invalid_Reference ); + goto Fail; + } + +@@ -6417,54 +6413,54 @@ + + distance = CUR_Func_read_cvt( cvtEntry ); + +- if ( CUR.GS.gep0 == 0 ) /* If in twilight zone */ ++ if ( exc->GS.gep0 == 0 ) /* If in twilight zone */ + { + #ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING + /* Only adjust if not in sph_compatibility_mode or ignore_x_mode. */ + /* Determined via experimentation and may be incorrect... */ +- if ( !SUBPIXEL_HINTING || +- ( !CUR.ignore_x_mode || +- !CUR.face->sph_compatibility_mode ) ) ++ if ( !SUBPIXEL_HINTING || ++ ( !exc->ignore_x_mode || ++ !exc->face->sph_compatibility_mode ) ) + #endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ +- CUR.zp0.org[point].x = TT_MulFix14( (FT_UInt32)distance, +- CUR.GS.freeVector.x ); +- CUR.zp0.org[point].y = TT_MulFix14( (FT_UInt32)distance, +- CUR.GS.freeVector.y ), +- CUR.zp0.cur[point] = CUR.zp0.org[point]; ++ exc->zp0.org[point].x = TT_MulFix14( (FT_UInt32)distance, ++ exc->GS.freeVector.x ); ++ exc->zp0.org[point].y = TT_MulFix14( (FT_UInt32)distance, ++ exc->GS.freeVector.y ), ++ exc->zp0.cur[point] = exc->zp0.org[point]; + } + #ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING +- if ( SUBPIXEL_HINTING && +- CUR.ignore_x_mode && +- ( CUR.sph_tweak_flags & SPH_TWEAK_MIAP_HACK ) && +- distance > 0 && +- CUR.GS.freeVector.y != 0 ) ++ if ( SUBPIXEL_HINTING && ++ exc->ignore_x_mode && ++ ( exc->sph_tweak_flags & SPH_TWEAK_MIAP_HACK ) && ++ distance > 0 && ++ exc->GS.freeVector.y != 0 ) + distance = 0; + #endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ + +- org_dist = CUR_fast_project( &CUR.zp0.cur[point] ); ++ org_dist = CUR_fast_project( &exc->zp0.cur[point] ); + +- if ( ( CUR.opcode & 1 ) != 0 ) /* rounding and control cut-in flag */ ++ if ( ( exc->opcode & 1 ) != 0 ) /* rounding and control cut-in flag */ + { + if ( FT_ABS( distance - org_dist ) > control_value_cutin ) + distance = org_dist; + + #ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING +- if ( SUBPIXEL_HINTING && +- CUR.ignore_x_mode && +- CUR.GS.freeVector.x != 0 ) ++ if ( SUBPIXEL_HINTING && ++ exc->ignore_x_mode && ++ exc->GS.freeVector.x != 0 ) + distance = ROUND_None( distance, +- CUR.tt_metrics.compensations[0] ); ++ exc->tt_metrics.compensations[0] ); + else + #endif + distance = CUR_Func_round( distance, +- CUR.tt_metrics.compensations[0] ); ++ exc->tt_metrics.compensations[0] ); + } + +- CUR_Func_move( &CUR.zp0, point, distance - org_dist ); ++ CUR_Func_move( &exc->zp0, point, distance - org_dist ); + + Fail: +- CUR.GS.rp0 = point; +- CUR.GS.rp1 = point; ++ exc->GS.rp0 = point; ++ exc->GS.rp1 = point; + } + + +@@ -6481,23 +6477,23 @@ + FT_F26Dot6 org_dist, distance, minimum_distance; + + +- minimum_distance = CUR.GS.minimum_distance; ++ minimum_distance = exc->GS.minimum_distance; + + #ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING +- if ( SUBPIXEL_HINTING && +- CUR.ignore_x_mode && +- CUR.GS.freeVector.x != 0 && +- !( CUR.sph_tweak_flags & SPH_TWEAK_NORMAL_ROUND ) ) ++ if ( SUBPIXEL_HINTING && ++ exc->ignore_x_mode && ++ exc->GS.freeVector.x != 0 && ++ !( exc->sph_tweak_flags & SPH_TWEAK_NORMAL_ROUND ) ) + minimum_distance = 0; + #endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ + + point = (FT_UShort)args[0]; + +- if ( BOUNDS( point, CUR.zp1.n_points ) || +- BOUNDS( CUR.GS.rp0, CUR.zp0.n_points ) ) ++ if ( BOUNDS( point, exc->zp1.n_points ) || ++ BOUNDS( exc->GS.rp0, exc->zp0.n_points ) ) + { +- if ( CUR.pedantic_hinting ) +- CUR.error = FT_THROW( Invalid_Reference ); ++ if ( exc->pedantic_hinting ) ++ exc->error = FT_THROW( Invalid_Reference ); + goto Fail; + } + +@@ -6506,33 +6502,33 @@ + + /* XXX: UNDOCUMENTED: twilight zone special case */ + +- if ( CUR.GS.gep0 == 0 || CUR.GS.gep1 == 0 ) ++ if ( exc->GS.gep0 == 0 || exc->GS.gep1 == 0 ) + { +- FT_Vector* vec1 = &CUR.zp1.org[point]; +- FT_Vector* vec2 = &CUR.zp0.org[CUR.GS.rp0]; ++ FT_Vector* vec1 = &exc->zp1.org[point]; ++ FT_Vector* vec2 = &exc->zp0.org[exc->GS.rp0]; + + + org_dist = CUR_Func_dualproj( vec1, vec2 ); + } + else + { +- FT_Vector* vec1 = &CUR.zp1.orus[point]; +- FT_Vector* vec2 = &CUR.zp0.orus[CUR.GS.rp0]; ++ FT_Vector* vec1 = &exc->zp1.orus[point]; ++ FT_Vector* vec2 = &exc->zp0.orus[exc->GS.rp0]; + + +- if ( CUR.metrics.x_scale == CUR.metrics.y_scale ) ++ if ( exc->metrics.x_scale == exc->metrics.y_scale ) + { + /* this should be faster */ + org_dist = CUR_Func_dualproj( vec1, vec2 ); +- org_dist = FT_MulFix( org_dist, CUR.metrics.x_scale ); ++ org_dist = FT_MulFix( org_dist, exc->metrics.x_scale ); + } + else + { + FT_Vector vec; + + +- vec.x = FT_MulFix( vec1->x - vec2->x, CUR.metrics.x_scale ); +- vec.y = FT_MulFix( vec1->y - vec2->y, CUR.metrics.y_scale ); ++ vec.x = FT_MulFix( vec1->x - vec2->x, exc->metrics.x_scale ); ++ vec.y = FT_MulFix( vec1->y - vec2->y, exc->metrics.y_scale ); + + org_dist = CUR_fast_dualproj( &vec ); + } +@@ -6540,40 +6536,40 @@ + + /* single width cut-in test */ + +- if ( FT_ABS( org_dist - CUR.GS.single_width_value ) < +- CUR.GS.single_width_cutin ) ++ if ( FT_ABS( org_dist - exc->GS.single_width_value ) < ++ exc->GS.single_width_cutin ) + { + if ( org_dist >= 0 ) +- org_dist = CUR.GS.single_width_value; ++ org_dist = exc->GS.single_width_value; + else +- org_dist = -CUR.GS.single_width_value; ++ org_dist = -exc->GS.single_width_value; + } + + /* round flag */ + +- if ( ( CUR.opcode & 4 ) != 0 ) ++ if ( ( exc->opcode & 4 ) != 0 ) + { + #ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING +- if ( SUBPIXEL_HINTING && +- CUR.ignore_x_mode && +- CUR.GS.freeVector.x != 0 ) ++ if ( SUBPIXEL_HINTING && ++ exc->ignore_x_mode && ++ exc->GS.freeVector.x != 0 ) + distance = ROUND_None( + org_dist, +- CUR.tt_metrics.compensations[CUR.opcode & 3] ); ++ exc->tt_metrics.compensations[exc->opcode & 3] ); + else + #endif + distance = CUR_Func_round( + org_dist, +- CUR.tt_metrics.compensations[CUR.opcode & 3] ); ++ exc->tt_metrics.compensations[exc->opcode & 3] ); + } + else + distance = ROUND_None( + org_dist, +- CUR.tt_metrics.compensations[CUR.opcode & 3] ); ++ exc->tt_metrics.compensations[exc->opcode & 3] ); + + /* minimum distance flag */ + +- if ( ( CUR.opcode & 8 ) != 0 ) ++ if ( ( exc->opcode & 8 ) != 0 ) + { + if ( org_dist >= 0 ) + { +@@ -6589,17 +6585,17 @@ + + /* now move the point */ + +- org_dist = CUR_Func_project( CUR.zp1.cur + point, +- CUR.zp0.cur + CUR.GS.rp0 ); ++ org_dist = CUR_Func_project( exc->zp1.cur + point, ++ exc->zp0.cur + exc->GS.rp0 ); + +- CUR_Func_move( &CUR.zp1, point, distance - org_dist ); ++ CUR_Func_move( &exc->zp1, point, distance - org_dist ); + + Fail: +- CUR.GS.rp1 = CUR.GS.rp0; +- CUR.GS.rp2 = point; ++ exc->GS.rp1 = exc->GS.rp0; ++ exc->GS.rp2 = point; + +- if ( ( CUR.opcode & 16 ) != 0 ) +- CUR.GS.rp0 = point; ++ if ( ( exc->opcode & 16 ) != 0 ) ++ exc->GS.rp0 = point; + } + + +@@ -6628,27 +6624,27 @@ + #endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ + + +- minimum_distance = CUR.GS.minimum_distance; +- control_value_cutin = CUR.GS.control_value_cutin; ++ minimum_distance = exc->GS.minimum_distance; ++ control_value_cutin = exc->GS.control_value_cutin; + point = (FT_UShort)args[0]; + cvtEntry = (FT_ULong)( args[1] + 1 ); + + #ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING +- if ( SUBPIXEL_HINTING && +- CUR.ignore_x_mode && +- CUR.GS.freeVector.x != 0 && +- !( CUR.sph_tweak_flags & SPH_TWEAK_NORMAL_ROUND ) ) ++ if ( SUBPIXEL_HINTING && ++ exc->ignore_x_mode && ++ exc->GS.freeVector.x != 0 && ++ !( exc->sph_tweak_flags & SPH_TWEAK_NORMAL_ROUND ) ) + control_value_cutin = minimum_distance = 0; + #endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ + + /* XXX: UNDOCUMENTED! cvt[-1] = 0 always */ + +- if ( BOUNDS( point, CUR.zp1.n_points ) || +- BOUNDSL( cvtEntry, CUR.cvtSize + 1 ) || +- BOUNDS( CUR.GS.rp0, CUR.zp0.n_points ) ) ++ if ( BOUNDS( point, exc->zp1.n_points ) || ++ BOUNDSL( cvtEntry, exc->cvtSize + 1 ) || ++ BOUNDS( exc->GS.rp0, exc->zp0.n_points ) ) + { +- if ( CUR.pedantic_hinting ) +- CUR.error = FT_THROW( Invalid_Reference ); ++ if ( exc->pedantic_hinting ) ++ exc->error = FT_THROW( Invalid_Reference ); + goto Fail; + } + +@@ -6659,46 +6655,46 @@ + + /* single width test */ + +- if ( FT_ABS( cvt_dist - CUR.GS.single_width_value ) < +- CUR.GS.single_width_cutin ) ++ if ( FT_ABS( cvt_dist - exc->GS.single_width_value ) < ++ exc->GS.single_width_cutin ) + { + if ( cvt_dist >= 0 ) +- cvt_dist = CUR.GS.single_width_value; ++ cvt_dist = exc->GS.single_width_value; + else +- cvt_dist = -CUR.GS.single_width_value; ++ cvt_dist = -exc->GS.single_width_value; + } + + /* UNDOCUMENTED! The MS rasterizer does that with */ + /* twilight points (confirmed by Greg Hitchcock) */ +- if ( CUR.GS.gep1 == 0 ) ++ if ( exc->GS.gep1 == 0 ) + { +- CUR.zp1.org[point].x = CUR.zp0.org[CUR.GS.rp0].x + +- TT_MulFix14( (FT_UInt32)cvt_dist, +- CUR.GS.freeVector.x ); +- CUR.zp1.org[point].y = CUR.zp0.org[CUR.GS.rp0].y + +- TT_MulFix14( (FT_UInt32)cvt_dist, +- CUR.GS.freeVector.y ); +- CUR.zp1.cur[point] = CUR.zp1.org[point]; ++ exc->zp1.org[point].x = exc->zp0.org[exc->GS.rp0].x + ++ TT_MulFix14( (FT_UInt32)cvt_dist, ++ exc->GS.freeVector.x ); ++ exc->zp1.org[point].y = exc->zp0.org[exc->GS.rp0].y + ++ TT_MulFix14( (FT_UInt32)cvt_dist, ++ exc->GS.freeVector.y ); ++ exc->zp1.cur[point] = exc->zp1.org[point]; + } + +- org_dist = CUR_Func_dualproj( &CUR.zp1.org[point], +- &CUR.zp0.org[CUR.GS.rp0] ); +- cur_dist = CUR_Func_project ( &CUR.zp1.cur[point], +- &CUR.zp0.cur[CUR.GS.rp0] ); ++ org_dist = CUR_Func_dualproj( &exc->zp1.org[point], ++ &exc->zp0.org[exc->GS.rp0] ); ++ cur_dist = CUR_Func_project ( &exc->zp1.cur[point], ++ &exc->zp0.cur[exc->GS.rp0] ); + + /* auto-flip test */ + +- if ( CUR.GS.auto_flip ) ++ if ( exc->GS.auto_flip ) + { + if ( ( org_dist ^ cvt_dist ) < 0 ) + cvt_dist = -cvt_dist; + } + + #ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING +- if ( SUBPIXEL_HINTING && +- CUR.ignore_x_mode && +- CUR.GS.freeVector.y != 0 && +- ( CUR.sph_tweak_flags & SPH_TWEAK_TIMES_NEW_ROMAN_HACK ) ) ++ if ( SUBPIXEL_HINTING && ++ exc->ignore_x_mode && ++ exc->GS.freeVector.y != 0 && ++ ( exc->sph_tweak_flags & SPH_TWEAK_TIMES_NEW_ROMAN_HACK ) ) + { + if ( cur_dist < -64 ) + cvt_dist -= 16; +@@ -6709,12 +6705,12 @@ + + /* control value cut-in and round */ + +- if ( ( CUR.opcode & 4 ) != 0 ) ++ if ( ( exc->opcode & 4 ) != 0 ) + { + /* XXX: UNDOCUMENTED! Only perform cut-in test when both points */ + /* refer to the same zone. */ + +- if ( CUR.GS.gep0 == CUR.GS.gep1 ) ++ if ( exc->GS.gep0 == exc->GS.gep1 ) + { + /* XXX: According to Greg Hitchcock, the following wording is */ + /* the right one: */ +@@ -6734,16 +6730,16 @@ + + distance = CUR_Func_round( + cvt_dist, +- CUR.tt_metrics.compensations[CUR.opcode & 3] ); ++ exc->tt_metrics.compensations[exc->opcode & 3] ); + } + else + { + + #ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING + /* do cvt cut-in always in MIRP for sph */ +- if ( SUBPIXEL_HINTING && +- CUR.ignore_x_mode && +- CUR.GS.gep0 == CUR.GS.gep1 ) ++ if ( SUBPIXEL_HINTING && ++ exc->ignore_x_mode && ++ exc->GS.gep0 == exc->GS.gep1 ) + { + if ( FT_ABS( cvt_dist - org_dist ) > control_value_cutin ) + cvt_dist = org_dist; +@@ -6752,12 +6748,12 @@ + + distance = ROUND_None( + cvt_dist, +- CUR.tt_metrics.compensations[CUR.opcode & 3] ); ++ exc->tt_metrics.compensations[exc->opcode & 3] ); + } + + /* minimum distance test */ + +- if ( ( CUR.opcode & 8 ) != 0 ) ++ if ( ( exc->opcode & 8 ) != 0 ) + { + if ( org_dist >= 0 ) + { +@@ -6774,59 +6770,59 @@ + #ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING + if ( SUBPIXEL_HINTING ) + { +- B1 = CUR.zp1.cur[point].y; ++ B1 = exc->zp1.cur[point].y; + + /* Round moves if necessary */ +- if ( CUR.ignore_x_mode && +- CUR.GS.freeVector.y != 0 && +- ( CUR.sph_tweak_flags & SPH_TWEAK_ROUND_NONPIXEL_Y_MOVES ) ) ++ if ( exc->ignore_x_mode && ++ exc->GS.freeVector.y != 0 && ++ ( exc->sph_tweak_flags & SPH_TWEAK_ROUND_NONPIXEL_Y_MOVES ) ) + distance = FT_PIX_ROUND( B1 + distance - cur_dist ) - B1 + cur_dist; + +- if ( CUR.ignore_x_mode && +- CUR.GS.freeVector.y != 0 && +- ( CUR.opcode & 16 ) == 0 && +- ( CUR.opcode & 8 ) == 0 && +- ( CUR.sph_tweak_flags & SPH_TWEAK_COURIER_NEW_2_HACK ) ) ++ if ( exc->ignore_x_mode && ++ exc->GS.freeVector.y != 0 && ++ ( exc->opcode & 16 ) == 0 && ++ ( exc->opcode & 8 ) == 0 && ++ ( exc->sph_tweak_flags & SPH_TWEAK_COURIER_NEW_2_HACK ) ) + distance += 64; + } + #endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ + +- CUR_Func_move( &CUR.zp1, point, distance - cur_dist ); ++ CUR_Func_move( &exc->zp1, point, distance - cur_dist ); + + #ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING + if ( SUBPIXEL_HINTING ) + { +- B2 = CUR.zp1.cur[point].y; ++ B2 = exc->zp1.cur[point].y; + + /* Reverse move if necessary */ +- if ( CUR.ignore_x_mode ) ++ if ( exc->ignore_x_mode ) + { +- if ( CUR.face->sph_compatibility_mode && +- CUR.GS.freeVector.y != 0 && +- ( B1 & 63 ) == 0 && +- ( B2 & 63 ) != 0 ) ++ if ( exc->face->sph_compatibility_mode && ++ exc->GS.freeVector.y != 0 && ++ ( B1 & 63 ) == 0 && ++ ( B2 & 63 ) != 0 ) + reverse_move = TRUE; + +- if ( ( CUR.sph_tweak_flags & SPH_TWEAK_SKIP_NONPIXEL_Y_MOVES ) && +- CUR.GS.freeVector.y != 0 && +- ( B2 & 63 ) != 0 && +- ( B1 & 63 ) != 0 ) ++ if ( ( exc->sph_tweak_flags & SPH_TWEAK_SKIP_NONPIXEL_Y_MOVES ) && ++ exc->GS.freeVector.y != 0 && ++ ( B2 & 63 ) != 0 && ++ ( B1 & 63 ) != 0 ) + reverse_move = TRUE; + } + + if ( reverse_move ) +- CUR_Func_move( &CUR.zp1, point, -( distance - cur_dist ) ); ++ CUR_Func_move( &exc->zp1, point, -( distance - cur_dist ) ); + } + + #endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ + + Fail: +- CUR.GS.rp1 = CUR.GS.rp0; ++ exc->GS.rp1 = exc->GS.rp0; + +- if ( ( CUR.opcode & 16 ) != 0 ) +- CUR.GS.rp0 = point; ++ if ( ( exc->opcode & 16 ) != 0 ) ++ exc->GS.rp0 = point; + +- CUR.GS.rp2 = point; ++ exc->GS.rp2 = point; + } + + +@@ -6846,52 +6842,52 @@ + + + #ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING +- if ( SUBPIXEL_HINTING && +- CUR.ignore_x_mode && +- CUR.iup_called && +- ( CUR.sph_tweak_flags & SPH_TWEAK_NO_ALIGNRP_AFTER_IUP ) ) ++ if ( SUBPIXEL_HINTING && ++ exc->ignore_x_mode && ++ exc->iup_called && ++ ( exc->sph_tweak_flags & SPH_TWEAK_NO_ALIGNRP_AFTER_IUP ) ) + { +- CUR.error = FT_THROW( Invalid_Reference ); ++ exc->error = FT_THROW( Invalid_Reference ); + goto Fail; + } + #endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ + +- if ( CUR.top < CUR.GS.loop || +- BOUNDS( CUR.GS.rp0, CUR.zp0.n_points ) ) ++ if ( exc->top < exc->GS.loop || ++ BOUNDS( exc->GS.rp0, exc->zp0.n_points ) ) + { +- if ( CUR.pedantic_hinting ) +- CUR.error = FT_THROW( Invalid_Reference ); ++ if ( exc->pedantic_hinting ) ++ exc->error = FT_THROW( Invalid_Reference ); + goto Fail; + } + +- while ( CUR.GS.loop > 0 ) ++ while ( exc->GS.loop > 0 ) + { +- CUR.args--; ++ exc->args--; + +- point = (FT_UShort)CUR.stack[CUR.args]; ++ point = (FT_UShort)exc->stack[exc->args]; + +- if ( BOUNDS( point, CUR.zp1.n_points ) ) ++ if ( BOUNDS( point, exc->zp1.n_points ) ) + { +- if ( CUR.pedantic_hinting ) ++ if ( exc->pedantic_hinting ) + { +- CUR.error = FT_THROW( Invalid_Reference ); ++ exc->error = FT_THROW( Invalid_Reference ); + return; + } + } + else + { +- distance = CUR_Func_project( CUR.zp1.cur + point, +- CUR.zp0.cur + CUR.GS.rp0 ); ++ distance = CUR_Func_project( exc->zp1.cur + point, ++ exc->zp0.cur + exc->GS.rp0 ); + +- CUR_Func_move( &CUR.zp1, point, -distance ); ++ CUR_Func_move( &exc->zp1, point, -distance ); + } + +- CUR.GS.loop--; ++ exc->GS.loop--; + } + + Fail: +- CUR.GS.loop = 1; +- CUR.new_top = CUR.args; ++ exc->GS.loop = 1; ++ exc->new_top = exc->args; + } + + +@@ -6926,29 +6922,29 @@ + b0 = (FT_UShort)args[3]; + b1 = (FT_UShort)args[4]; + +- if ( BOUNDS( b0, CUR.zp0.n_points ) || +- BOUNDS( b1, CUR.zp0.n_points ) || +- BOUNDS( a0, CUR.zp1.n_points ) || +- BOUNDS( a1, CUR.zp1.n_points ) || +- BOUNDS( point, CUR.zp2.n_points ) ) ++ if ( BOUNDS( b0, exc->zp0.n_points ) || ++ BOUNDS( b1, exc->zp0.n_points ) || ++ BOUNDS( a0, exc->zp1.n_points ) || ++ BOUNDS( a1, exc->zp1.n_points ) || ++ BOUNDS( point, exc->zp2.n_points ) ) + { +- if ( CUR.pedantic_hinting ) +- CUR.error = FT_THROW( Invalid_Reference ); ++ if ( exc->pedantic_hinting ) ++ exc->error = FT_THROW( Invalid_Reference ); + return; + } + + /* Cramer's rule */ + +- dbx = CUR.zp0.cur[b1].x - CUR.zp0.cur[b0].x; +- dby = CUR.zp0.cur[b1].y - CUR.zp0.cur[b0].y; ++ dbx = exc->zp0.cur[b1].x - exc->zp0.cur[b0].x; ++ dby = exc->zp0.cur[b1].y - exc->zp0.cur[b0].y; + +- dax = CUR.zp1.cur[a1].x - CUR.zp1.cur[a0].x; +- day = CUR.zp1.cur[a1].y - CUR.zp1.cur[a0].y; ++ dax = exc->zp1.cur[a1].x - exc->zp1.cur[a0].x; ++ day = exc->zp1.cur[a1].y - exc->zp1.cur[a0].y; + +- dx = CUR.zp0.cur[b0].x - CUR.zp1.cur[a0].x; +- dy = CUR.zp0.cur[b0].y - CUR.zp1.cur[a0].y; ++ dx = exc->zp0.cur[b0].x - exc->zp1.cur[a0].x; ++ dy = exc->zp0.cur[b0].y - exc->zp1.cur[a0].y; + +- CUR.zp2.tags[point] |= FT_CURVE_TAG_TOUCH_BOTH; ++ exc->zp2.tags[point] |= FT_CURVE_TAG_TOUCH_BOTH; + + discriminant = FT_MulDiv( dax, -dby, 0x40 ) + + FT_MulDiv( day, dbx, 0x40 ); +@@ -6970,21 +6966,21 @@ + R.x = FT_MulDiv( val, dax, discriminant ); + R.y = FT_MulDiv( val, day, discriminant ); + +- CUR.zp2.cur[point].x = CUR.zp1.cur[a0].x + R.x; +- CUR.zp2.cur[point].y = CUR.zp1.cur[a0].y + R.y; ++ exc->zp2.cur[point].x = exc->zp1.cur[a0].x + R.x; ++ exc->zp2.cur[point].y = exc->zp1.cur[a0].y + R.y; + } + else + { + /* else, take the middle of the middles of A and B */ + +- CUR.zp2.cur[point].x = ( CUR.zp1.cur[a0].x + +- CUR.zp1.cur[a1].x + +- CUR.zp0.cur[b0].x + +- CUR.zp0.cur[b1].x ) / 4; +- CUR.zp2.cur[point].y = ( CUR.zp1.cur[a0].y + +- CUR.zp1.cur[a1].y + +- CUR.zp0.cur[b0].y + +- CUR.zp0.cur[b1].y ) / 4; ++ exc->zp2.cur[point].x = ( exc->zp1.cur[a0].x + ++ exc->zp1.cur[a1].x + ++ exc->zp0.cur[b0].x + ++ exc->zp0.cur[b1].x ) / 4; ++ exc->zp2.cur[point].y = ( exc->zp1.cur[a0].y + ++ exc->zp1.cur[a1].y + ++ exc->zp0.cur[b0].y + ++ exc->zp0.cur[b1].y ) / 4; + } + } + +@@ -7005,19 +7001,19 @@ + p1 = (FT_UShort)args[0]; + p2 = (FT_UShort)args[1]; + +- if ( BOUNDS( p1, CUR.zp1.n_points ) || +- BOUNDS( p2, CUR.zp0.n_points ) ) ++ if ( BOUNDS( p1, exc->zp1.n_points ) || ++ BOUNDS( p2, exc->zp0.n_points ) ) + { +- if ( CUR.pedantic_hinting ) +- CUR.error = FT_THROW( Invalid_Reference ); ++ if ( exc->pedantic_hinting ) ++ exc->error = FT_THROW( Invalid_Reference ); + return; + } + +- distance = CUR_Func_project( CUR.zp0.cur + p2, +- CUR.zp1.cur + p1 ) / 2; ++ distance = CUR_Func_project( exc->zp0.cur + p2, ++ exc->zp1.cur + p1 ) / 2; + +- CUR_Func_move( &CUR.zp1, p1, distance ); +- CUR_Func_move( &CUR.zp0, p2, -distance ); ++ CUR_Func_move( &exc->zp1, p1, distance ); ++ CUR_Func_move( &exc->zp0, p2, -distance ); + } + + +@@ -7041,40 +7037,40 @@ + FT_UNUSED_ARG; + + +- if ( CUR.top < CUR.GS.loop ) ++ if ( exc->top < exc->GS.loop ) + { +- if ( CUR.pedantic_hinting ) +- CUR.error = FT_THROW( Invalid_Reference ); ++ if ( exc->pedantic_hinting ) ++ exc->error = FT_THROW( Invalid_Reference ); + goto Fail; + } + + /* + * We need to deal in a special way with the twilight zone. +- * Otherwise, by definition, the value of CUR.twilight.orus[n] is (0,0), ++ * Otherwise, by definition, the value of exc->twilight.orus[n] is (0,0), + * for every n. + */ +- twilight = CUR.GS.gep0 == 0 || CUR.GS.gep1 == 0 || CUR.GS.gep2 == 0; ++ twilight = exc->GS.gep0 == 0 || exc->GS.gep1 == 0 || exc->GS.gep2 == 0; + +- if ( BOUNDS( CUR.GS.rp1, CUR.zp0.n_points ) ) ++ if ( BOUNDS( exc->GS.rp1, exc->zp0.n_points ) ) + { +- if ( CUR.pedantic_hinting ) +- CUR.error = FT_THROW( Invalid_Reference ); ++ if ( exc->pedantic_hinting ) ++ exc->error = FT_THROW( Invalid_Reference ); + goto Fail; + } + + if ( twilight ) +- orus_base = &CUR.zp0.org[CUR.GS.rp1]; ++ orus_base = &exc->zp0.org[exc->GS.rp1]; + else +- orus_base = &CUR.zp0.orus[CUR.GS.rp1]; ++ orus_base = &exc->zp0.orus[exc->GS.rp1]; + +- cur_base = &CUR.zp0.cur[CUR.GS.rp1]; ++ cur_base = &exc->zp0.cur[exc->GS.rp1]; + + /* XXX: There are some glyphs in some braindead but popular */ + /* fonts out there (e.g. [aeu]grave in monotype.ttf) */ + /* calling IP[] with bad values of rp[12]. */ + /* Do something sane when this odd thing happens. */ +- if ( BOUNDS( CUR.GS.rp1, CUR.zp0.n_points ) || +- BOUNDS( CUR.GS.rp2, CUR.zp1.n_points ) ) ++ if ( BOUNDS( exc->GS.rp1, exc->zp0.n_points ) || ++ BOUNDS( exc->GS.rp2, exc->zp1.n_points ) ) + { + old_range = 0; + cur_range = 0; +@@ -7082,62 +7078,62 @@ + else + { + if ( twilight ) +- old_range = CUR_Func_dualproj( &CUR.zp1.org[CUR.GS.rp2], ++ old_range = CUR_Func_dualproj( &exc->zp1.org[exc->GS.rp2], + orus_base ); +- else if ( CUR.metrics.x_scale == CUR.metrics.y_scale ) +- old_range = CUR_Func_dualproj( &CUR.zp1.orus[CUR.GS.rp2], ++ else if ( exc->metrics.x_scale == exc->metrics.y_scale ) ++ old_range = CUR_Func_dualproj( &exc->zp1.orus[exc->GS.rp2], + orus_base ); + else + { + FT_Vector vec; + + +- vec.x = FT_MulFix( CUR.zp1.orus[CUR.GS.rp2].x - orus_base->x, +- CUR.metrics.x_scale ); +- vec.y = FT_MulFix( CUR.zp1.orus[CUR.GS.rp2].y - orus_base->y, +- CUR.metrics.y_scale ); ++ vec.x = FT_MulFix( exc->zp1.orus[exc->GS.rp2].x - orus_base->x, ++ exc->metrics.x_scale ); ++ vec.y = FT_MulFix( exc->zp1.orus[exc->GS.rp2].y - orus_base->y, ++ exc->metrics.y_scale ); + + old_range = CUR_fast_dualproj( &vec ); + } + +- cur_range = CUR_Func_project ( &CUR.zp1.cur[CUR.GS.rp2], cur_base ); ++ cur_range = CUR_Func_project ( &exc->zp1.cur[exc->GS.rp2], cur_base ); + } + +- for ( ; CUR.GS.loop > 0; --CUR.GS.loop ) ++ for ( ; exc->GS.loop > 0; --exc->GS.loop ) + { +- FT_UInt point = (FT_UInt)CUR.stack[--CUR.args]; ++ FT_UInt point = (FT_UInt)exc->stack[--exc->args]; + FT_F26Dot6 org_dist, cur_dist, new_dist; + + + /* check point bounds */ +- if ( BOUNDS( point, CUR.zp2.n_points ) ) ++ if ( BOUNDS( point, exc->zp2.n_points ) ) + { +- if ( CUR.pedantic_hinting ) ++ if ( exc->pedantic_hinting ) + { +- CUR.error = FT_THROW( Invalid_Reference ); ++ exc->error = FT_THROW( Invalid_Reference ); + return; + } + continue; + } + + if ( twilight ) +- org_dist = CUR_Func_dualproj( &CUR.zp2.org[point], orus_base ); +- else if ( CUR.metrics.x_scale == CUR.metrics.y_scale ) +- org_dist = CUR_Func_dualproj( &CUR.zp2.orus[point], orus_base ); ++ org_dist = CUR_Func_dualproj( &exc->zp2.org[point], orus_base ); ++ else if ( exc->metrics.x_scale == exc->metrics.y_scale ) ++ org_dist = CUR_Func_dualproj( &exc->zp2.orus[point], orus_base ); + else + { + FT_Vector vec; + + +- vec.x = FT_MulFix( CUR.zp2.orus[point].x - orus_base->x, +- CUR.metrics.x_scale ); +- vec.y = FT_MulFix( CUR.zp2.orus[point].y - orus_base->y, +- CUR.metrics.y_scale ); ++ vec.x = FT_MulFix( exc->zp2.orus[point].x - orus_base->x, ++ exc->metrics.x_scale ); ++ vec.y = FT_MulFix( exc->zp2.orus[point].y - orus_base->y, ++ exc->metrics.y_scale ); + + org_dist = CUR_fast_dualproj( &vec ); + } + +- cur_dist = CUR_Func_project( &CUR.zp2.cur[point], cur_base ); ++ cur_dist = CUR_Func_project( &exc->zp2.cur[point], cur_base ); + + if ( org_dist ) + { +@@ -7167,12 +7163,12 @@ + else + new_dist = 0; + +- CUR_Func_move( &CUR.zp2, (FT_UShort)point, new_dist - cur_dist ); ++ CUR_Func_move( &exc->zp2, (FT_UShort)point, new_dist - cur_dist ); + } + + Fail: +- CUR.GS.loop = 1; +- CUR.new_top = CUR.args; ++ exc->GS.loop = 1; ++ exc->new_top = exc->args; + } + + +@@ -7191,22 +7187,22 @@ + + point = (FT_UShort)args[0]; + +- if ( BOUNDS( point, CUR.zp0.n_points ) ) ++ if ( BOUNDS( point, exc->zp0.n_points ) ) + { +- if ( CUR.pedantic_hinting ) +- CUR.error = FT_THROW( Invalid_Reference ); ++ if ( exc->pedantic_hinting ) ++ exc->error = FT_THROW( Invalid_Reference ); + return; + } + + mask = 0xFF; + +- if ( CUR.GS.freeVector.x != 0 ) ++ if ( exc->GS.freeVector.x != 0 ) + mask &= ~FT_CURVE_TAG_TOUCH_X; + +- if ( CUR.GS.freeVector.y != 0 ) ++ if ( exc->GS.freeVector.y != 0 ) + mask &= ~FT_CURVE_TAG_TOUCH_Y; + +- CUR.zp0.tags[point] &= mask; ++ exc->zp0.tags[point] &= mask; + } + + +@@ -7361,47 +7357,47 @@ + + + /* ignore empty outlines */ +- if ( CUR.pts.n_contours == 0 ) ++ if ( exc->pts.n_contours == 0 ) + return; + +- if ( CUR.opcode & 1 ) ++ if ( exc->opcode & 1 ) + { + mask = FT_CURVE_TAG_TOUCH_X; +- V.orgs = CUR.pts.org; +- V.curs = CUR.pts.cur; +- V.orus = CUR.pts.orus; ++ V.orgs = exc->pts.org; ++ V.curs = exc->pts.cur; ++ V.orus = exc->pts.orus; + } + else + { + mask = FT_CURVE_TAG_TOUCH_Y; +- V.orgs = (FT_Vector*)( (FT_Pos*)CUR.pts.org + 1 ); +- V.curs = (FT_Vector*)( (FT_Pos*)CUR.pts.cur + 1 ); +- V.orus = (FT_Vector*)( (FT_Pos*)CUR.pts.orus + 1 ); ++ V.orgs = (FT_Vector*)( (FT_Pos*)exc->pts.org + 1 ); ++ V.curs = (FT_Vector*)( (FT_Pos*)exc->pts.cur + 1 ); ++ V.orus = (FT_Vector*)( (FT_Pos*)exc->pts.orus + 1 ); + } +- V.max_points = CUR.pts.n_points; ++ V.max_points = exc->pts.n_points; + + contour = 0; + point = 0; + + #ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING +- if ( SUBPIXEL_HINTING && +- CUR.ignore_x_mode ) ++ if ( SUBPIXEL_HINTING && ++ exc->ignore_x_mode ) + { +- CUR.iup_called = TRUE; +- if ( CUR.sph_tweak_flags & SPH_TWEAK_SKIP_IUP ) ++ exc->iup_called = TRUE; ++ if ( exc->sph_tweak_flags & SPH_TWEAK_SKIP_IUP ) + return; + } + #endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ + + do + { +- end_point = CUR.pts.contours[contour] - CUR.pts.first_point; ++ end_point = exc->pts.contours[contour] - exc->pts.first_point; + first_point = point; + +- if ( BOUNDS ( end_point, CUR.pts.n_points ) ) +- end_point = CUR.pts.n_points - 1; ++ if ( BOUNDS( end_point, exc->pts.n_points ) ) ++ end_point = exc->pts.n_points - 1; + +- while ( point <= end_point && ( CUR.pts.tags[point] & mask ) == 0 ) ++ while ( point <= end_point && ( exc->pts.tags[point] & mask ) == 0 ) + point++; + + if ( point <= end_point ) +@@ -7413,7 +7409,7 @@ + + while ( point <= end_point ) + { +- if ( ( CUR.pts.tags[point] & mask ) != 0 ) ++ if ( ( exc->pts.tags[point] & mask ) != 0 ) + { + _iup_worker_interpolate( &V, + cur_touched + 1, +@@ -7445,7 +7441,7 @@ + } + } + contour++; +- } while ( contour < CUR.pts.n_contours ); ++ } while ( contour < exc->pts.n_contours ); + } + + +@@ -7466,30 +7462,30 @@ + FT_UShort B1, B2; + + +- if ( SUBPIXEL_HINTING && +- CUR.ignore_x_mode && +- CUR.iup_called && +- ( CUR.sph_tweak_flags & SPH_TWEAK_NO_DELTAP_AFTER_IUP ) ) ++ if ( SUBPIXEL_HINTING && ++ exc->ignore_x_mode && ++ exc->iup_called && ++ ( exc->sph_tweak_flags & SPH_TWEAK_NO_DELTAP_AFTER_IUP ) ) + goto Fail; + #endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ + + + #ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING + /* Delta hinting is covered by US Patent 5159668. */ +- if ( CUR.face->unpatented_hinting ) ++ if ( exc->face->unpatented_hinting ) + { + FT_Long n = args[0] * 2; + + +- if ( CUR.args < n ) ++ if ( exc->args < n ) + { +- if ( CUR.pedantic_hinting ) +- CUR.error = FT_THROW( Too_Few_Arguments ); +- n = CUR.args; ++ if ( exc->pedantic_hinting ) ++ exc->error = FT_THROW( Too_Few_Arguments ); ++ n = exc->args; + } + +- CUR.args -= n; +- CUR.new_top = CUR.args; ++ exc->args -= n; ++ exc->new_top = exc->args; + return; + } + #endif +@@ -7500,18 +7496,18 @@ + + for ( k = 1; k <= nump; k++ ) + { +- if ( CUR.args < 2 ) ++ if ( exc->args < 2 ) + { +- if ( CUR.pedantic_hinting ) +- CUR.error = FT_THROW( Too_Few_Arguments ); +- CUR.args = 0; ++ if ( exc->pedantic_hinting ) ++ exc->error = FT_THROW( Too_Few_Arguments ); ++ exc->args = 0; + goto Fail; + } + +- CUR.args -= 2; ++ exc->args -= 2; + +- A = (FT_UShort)CUR.stack[CUR.args + 1]; +- B = CUR.stack[CUR.args]; ++ A = (FT_UShort)exc->stack[exc->args + 1]; ++ B = exc->stack[exc->args]; + + /* XXX: Because some popular fonts contain some invalid DeltaP */ + /* instructions, we simply ignore them when the stacked */ +@@ -7519,11 +7515,11 @@ + /* error. As a delta instruction doesn't change a glyph */ + /* in great ways, this shouldn't be a problem. */ + +- if ( !BOUNDS( A, CUR.zp0.n_points ) ) ++ if ( !BOUNDS( A, exc->zp0.n_points ) ) + { + C = ( (FT_ULong)B & 0xF0 ) >> 4; + +- switch ( CUR.opcode ) ++ switch ( exc->opcode ) + { + case 0x5D: + break; +@@ -7537,14 +7533,14 @@ + break; + } + +- C += CUR.GS.delta_base; ++ C += exc->GS.delta_base; + + if ( P == C ) + { + B = ( (FT_ULong)B & 0xF ) - 8; + if ( B >= 0 ) + B++; +- B *= 1L << ( 6 - CUR.GS.delta_shift ); ++ B *= 1L << ( 6 - exc->GS.delta_shift ); + + #ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING + +@@ -7558,65 +7554,65 @@ + * - glyph is composite and freedom vector is not in subpixel + * direction. + */ +- if ( !CUR.ignore_x_mode || +- ( CUR.sph_tweak_flags & SPH_TWEAK_ALWAYS_DO_DELTAP ) || +- ( CUR.is_composite && CUR.GS.freeVector.y != 0 ) ) +- CUR_Func_move( &CUR.zp0, A, B ); ++ if ( !exc->ignore_x_mode || ++ ( exc->sph_tweak_flags & SPH_TWEAK_ALWAYS_DO_DELTAP ) || ++ ( exc->is_composite && exc->GS.freeVector.y != 0 ) ) ++ CUR_Func_move( &exc->zp0, A, B ); + + /* Otherwise, apply subpixel hinting and compatibility mode */ + /* rules, always skipping deltas in subpixel direction. */ +- else if ( CUR.ignore_x_mode && CUR.GS.freeVector.y != 0 ) ++ else if ( exc->ignore_x_mode && exc->GS.freeVector.y != 0 ) + { + /* save the y value of the point now; compare after move */ +- B1 = (FT_UShort)CUR.zp0.cur[A].y; ++ B1 = (FT_UShort)exc->zp0.cur[A].y; + + /* Standard subpixel hinting: Allow y move for y-touched */ + /* points. This messes up DejaVu ... */ +- if ( !CUR.face->sph_compatibility_mode && +- ( CUR.zp0.tags[A] & FT_CURVE_TAG_TOUCH_Y ) ) +- CUR_Func_move( &CUR.zp0, A, B ); ++ if ( !exc->face->sph_compatibility_mode && ++ ( exc->zp0.tags[A] & FT_CURVE_TAG_TOUCH_Y ) ) ++ CUR_Func_move( &exc->zp0, A, B ); + + /* compatibility mode */ +- else if ( CUR.face->sph_compatibility_mode && +- !( CUR.sph_tweak_flags & SPH_TWEAK_ALWAYS_SKIP_DELTAP ) ) ++ else if ( exc->face->sph_compatibility_mode && ++ !( exc->sph_tweak_flags & SPH_TWEAK_ALWAYS_SKIP_DELTAP ) ) + { +- if ( CUR.sph_tweak_flags & SPH_TWEAK_ROUND_NONPIXEL_Y_MOVES ) ++ if ( exc->sph_tweak_flags & SPH_TWEAK_ROUND_NONPIXEL_Y_MOVES ) + B = FT_PIX_ROUND( B1 + B ) - B1; + + /* Allow delta move if using sph_compatibility_mode, */ + /* IUP has not been called, and point is touched on Y. */ +- if ( !CUR.iup_called && +- ( CUR.zp0.tags[A] & FT_CURVE_TAG_TOUCH_Y ) ) +- CUR_Func_move( &CUR.zp0, A, B ); ++ if ( !exc->iup_called && ++ ( exc->zp0.tags[A] & FT_CURVE_TAG_TOUCH_Y ) ) ++ CUR_Func_move( &exc->zp0, A, B ); + } + +- B2 = (FT_UShort)CUR.zp0.cur[A].y; ++ B2 = (FT_UShort)exc->zp0.cur[A].y; + + /* Reverse this move if it results in a disallowed move */ +- if ( CUR.GS.freeVector.y != 0 && +- ( ( CUR.face->sph_compatibility_mode && ++ if ( exc->GS.freeVector.y != 0 && ++ ( ( exc->face->sph_compatibility_mode && + ( B1 & 63 ) == 0 && + ( B2 & 63 ) != 0 ) || +- ( ( CUR.sph_tweak_flags & ++ ( ( exc->sph_tweak_flags & + SPH_TWEAK_SKIP_NONPIXEL_Y_MOVES_DELTAP ) && + ( B1 & 63 ) != 0 && + ( B2 & 63 ) != 0 ) ) ) +- CUR_Func_move( &CUR.zp0, A, -B ); ++ CUR_Func_move( &exc->zp0, A, -B ); + } + } + else + #endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ + +- CUR_Func_move( &CUR.zp0, A, B ); ++ CUR_Func_move( &exc->zp0, A, B ); + } + } + else +- if ( CUR.pedantic_hinting ) +- CUR.error = FT_THROW( Invalid_Reference ); ++ if ( exc->pedantic_hinting ) ++ exc->error = FT_THROW( Invalid_Reference ); + } + + Fail: +- CUR.new_top = CUR.args; ++ exc->new_top = exc->args; + } + + +@@ -7636,20 +7632,20 @@ + + #ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING + /* Delta hinting is covered by US Patent 5159668. */ +- if ( CUR.face->unpatented_hinting ) ++ if ( exc->face->unpatented_hinting ) + { + FT_Long n = args[0] * 2; + + +- if ( CUR.args < n ) ++ if ( exc->args < n ) + { +- if ( CUR.pedantic_hinting ) +- CUR.error = FT_THROW( Too_Few_Arguments ); +- n = CUR.args; ++ if ( exc->pedantic_hinting ) ++ exc->error = FT_THROW( Too_Few_Arguments ); ++ n = exc->args; + } + +- CUR.args -= n; +- CUR.new_top = CUR.args; ++ exc->args -= n; ++ exc->new_top = exc->args; + return; + } + #endif +@@ -7659,24 +7655,24 @@ + + for ( k = 1; k <= nump; k++ ) + { +- if ( CUR.args < 2 ) ++ if ( exc->args < 2 ) + { +- if ( CUR.pedantic_hinting ) +- CUR.error = FT_THROW( Too_Few_Arguments ); +- CUR.args = 0; ++ if ( exc->pedantic_hinting ) ++ exc->error = FT_THROW( Too_Few_Arguments ); ++ exc->args = 0; + goto Fail; + } + +- CUR.args -= 2; ++ exc->args -= 2; + +- A = (FT_ULong)CUR.stack[CUR.args + 1]; +- B = CUR.stack[CUR.args]; ++ A = (FT_ULong)exc->stack[exc->args + 1]; ++ B = exc->stack[exc->args]; + +- if ( BOUNDSL( A, CUR.cvtSize ) ) ++ if ( BOUNDSL( A, exc->cvtSize ) ) + { +- if ( CUR.pedantic_hinting ) ++ if ( exc->pedantic_hinting ) + { +- CUR.error = FT_THROW( Invalid_Reference ); ++ exc->error = FT_THROW( Invalid_Reference ); + return; + } + } +@@ -7684,7 +7680,7 @@ + { + C = ( (FT_ULong)B & 0xF0 ) >> 4; + +- switch ( CUR.opcode ) ++ switch ( exc->opcode ) + { + case 0x73: + break; +@@ -7698,14 +7694,14 @@ + break; + } + +- C += CUR.GS.delta_base; ++ C += exc->GS.delta_base; + + if ( P == C ) + { + B = ( (FT_ULong)B & 0xF ) - 8; + if ( B >= 0 ) + B++; +- B *= 1L << ( 6 - CUR.GS.delta_shift ); ++ B *= 1L << ( 6 - exc->GS.delta_shift ); + + CUR_Func_move_cvt( A, B ); + } +@@ -7713,7 +7709,7 @@ + } + + Fail: +- CUR.new_top = CUR.args; ++ exc->new_top = exc->args; + } + + +@@ -7746,11 +7742,11 @@ + /* */ + if ( SUBPIXEL_HINTING && + ( args[0] & 1 ) != 0 && +- CUR.ignore_x_mode ) ++ exc->ignore_x_mode ) + { +- K = CUR.rasterizer_version; ++ K = exc->rasterizer_version; + FT_TRACE7(( "Setting rasterizer version %d\n", +- CUR.rasterizer_version )); ++ exc->rasterizer_version )); + } + else + #endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ +@@ -7762,7 +7758,7 @@ + /* Selector Bit: 1 */ + /* Return Bit(s): 8 */ + /* */ +- if ( ( args[0] & 2 ) != 0 && CUR.tt_metrics.rotated ) ++ if ( ( args[0] & 2 ) != 0 && exc->tt_metrics.rotated ) + K |= 0x80; + + /********************************/ +@@ -7770,7 +7766,7 @@ + /* Selector Bit: 2 */ + /* Return Bit(s): 9 */ + /* */ +- if ( ( args[0] & 4 ) != 0 && CUR.tt_metrics.stretched ) ++ if ( ( args[0] & 4 ) != 0 && exc->tt_metrics.stretched ) + K |= 1 << 8; + + /********************************/ +@@ -7778,24 +7774,24 @@ + /* Selector Bit: 5 */ + /* Return Bit(s): 12 */ + /* */ +- if ( ( args[0] & 32 ) != 0 && CUR.grayscale ) ++ if ( ( args[0] & 32 ) != 0 && exc->grayscale ) + K |= 1 << 12; + + #ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING + +- if ( SUBPIXEL_HINTING && +- CUR.ignore_x_mode && +- CUR.rasterizer_version >= TT_INTERPRETER_VERSION_35 ) ++ if ( SUBPIXEL_HINTING && ++ exc->ignore_x_mode && ++ exc->rasterizer_version >= TT_INTERPRETER_VERSION_35 ) + { + +- if ( CUR.rasterizer_version >= 37 ) ++ if ( exc->rasterizer_version >= 37 ) + { + /********************************/ + /* HINTING FOR SUBPIXEL */ + /* Selector Bit: 6 */ + /* Return Bit(s): 13 */ + /* */ +- if ( ( args[0] & 64 ) != 0 && CUR.subpixel ) ++ if ( ( args[0] & 64 ) != 0 && exc->subpixel ) + K |= 1 << 13; + + /********************************/ +@@ -7804,7 +7800,7 @@ + /* Return Bit(s): 14 */ + /* */ + /* Functionality still needs to be added */ +- if ( ( args[0] & 128 ) != 0 && CUR.compatible_widths ) ++ if ( ( args[0] & 128 ) != 0 && exc->compatible_widths ) + K |= 1 << 14; + + /********************************/ +@@ -7813,7 +7809,7 @@ + /* Return Bit(s): 15 */ + /* */ + /* Functionality still needs to be added */ +- if ( ( args[0] & 256 ) != 0 && CUR.symmetrical_smoothing ) ++ if ( ( args[0] & 256 ) != 0 && exc->symmetrical_smoothing ) + K |= 1 << 15; + + /********************************/ +@@ -7822,10 +7818,10 @@ + /* Return Bit(s): 16 */ + /* */ + /* Functionality still needs to be added */ +- if ( ( args[0] & 512 ) != 0 && CUR.bgr ) ++ if ( ( args[0] & 512 ) != 0 && exc->bgr ) + K |= 1 << 16; + +- if ( CUR.rasterizer_version >= 38 ) ++ if ( exc->rasterizer_version >= 38 ) + { + /********************************/ + /* SUBPIXEL POSITIONED? */ +@@ -7833,7 +7829,7 @@ + /* Return Bit(s): 17 */ + /* */ + /* Functionality still needs to be added */ +- if ( ( args[0] & 1024 ) != 0 && CUR.subpixel_positioned ) ++ if ( ( args[0] & 1024 ) != 0 && exc->subpixel_positioned ) + K |= 1 << 17; + } + } +@@ -7848,40 +7844,40 @@ + static void + Ins_UNKNOWN( INS_ARG ) + { +- TT_DefRecord* def = CUR.IDefs; +- TT_DefRecord* limit = def + CUR.numIDefs; ++ TT_DefRecord* def = exc->IDefs; ++ TT_DefRecord* limit = def + exc->numIDefs; + + FT_UNUSED_ARG; + + + for ( ; def < limit; def++ ) + { +- if ( (FT_Byte)def->opc == CUR.opcode && def->active ) ++ if ( (FT_Byte)def->opc == exc->opcode && def->active ) + { + TT_CallRec* call; + + +- if ( CUR.callTop >= CUR.callSize ) ++ if ( exc->callTop >= exc->callSize ) + { +- CUR.error = FT_THROW( Stack_Overflow ); ++ exc->error = FT_THROW( Stack_Overflow ); + return; + } + +- call = CUR.callStack + CUR.callTop++; ++ call = exc->callStack + exc->callTop++; + +- call->Caller_Range = CUR.curRange; +- call->Caller_IP = CUR.IP + 1; ++ call->Caller_Range = exc->curRange; ++ call->Caller_IP = exc->IP + 1; + call->Cur_Count = 1; + call->Def = def; + + INS_Goto_CodeRange( def->range, def->start ); + +- CUR.step_ins = FALSE; ++ exc->step_ins = FALSE; + return; + } + } + +- CUR.error = FT_THROW( Invalid_Opcode ); ++ exc->error = FT_THROW( Invalid_Opcode ); + } + + +@@ -8233,26 +8229,26 @@ + #endif + + #ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING +- CUR.iup_called = FALSE; ++ exc->iup_called = FALSE; + #endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ + + /* set PPEM and CVT functions */ +- CUR.tt_metrics.ratio = 0; +- if ( CUR.metrics.x_ppem != CUR.metrics.y_ppem ) ++ exc->tt_metrics.ratio = 0; ++ if ( exc->metrics.x_ppem != exc->metrics.y_ppem ) + { + /* non-square pixels, use the stretched routines */ +- CUR.func_cur_ppem = Current_Ppem_Stretched; +- CUR.func_read_cvt = Read_CVT_Stretched; +- CUR.func_write_cvt = Write_CVT_Stretched; +- CUR.func_move_cvt = Move_CVT_Stretched; ++ exc->func_cur_ppem = Current_Ppem_Stretched; ++ exc->func_read_cvt = Read_CVT_Stretched; ++ exc->func_write_cvt = Write_CVT_Stretched; ++ exc->func_move_cvt = Move_CVT_Stretched; + } + else + { + /* square pixels, use normal routines */ +- CUR.func_cur_ppem = Current_Ppem; +- CUR.func_read_cvt = Read_CVT; +- CUR.func_write_cvt = Write_CVT; +- CUR.func_move_cvt = Move_CVT; ++ exc->func_cur_ppem = Current_Ppem; ++ exc->func_read_cvt = Read_CVT; ++ exc->func_write_cvt = Write_CVT; ++ exc->func_move_cvt = Move_CVT; + } + + COMPUTE_Funcs(); +@@ -8260,55 +8256,55 @@ + + do + { +- CUR.opcode = CUR.code[CUR.IP]; ++ exc->opcode = exc->code[exc->IP]; + + FT_TRACE7(( " " )); +- FT_TRACE7(( opcode_name[CUR.opcode] )); ++ FT_TRACE7(( opcode_name[exc->opcode] )); + FT_TRACE7(( "\n" )); + +- if ( ( CUR.length = opcode_length[CUR.opcode] ) < 0 ) ++ if ( ( exc->length = opcode_length[exc->opcode] ) < 0 ) + { +- if ( CUR.IP + 1 >= CUR.codeSize ) ++ if ( exc->IP + 1 >= exc->codeSize ) + goto LErrorCodeOverflow_; + +- CUR.length = 2 - CUR.length * CUR.code[CUR.IP + 1]; ++ exc->length = 2 - exc->length * exc->code[exc->IP + 1]; + } + +- if ( CUR.IP + CUR.length > CUR.codeSize ) ++ if ( exc->IP + exc->length > exc->codeSize ) + goto LErrorCodeOverflow_; + + /* First, let's check for empty stack and overflow */ +- CUR.args = CUR.top - ( Pop_Push_Count[CUR.opcode] >> 4 ); ++ exc->args = exc->top - ( Pop_Push_Count[exc->opcode] >> 4 ); + + /* `args' is the top of the stack once arguments have been popped. */ + /* One can also interpret it as the index of the last argument. */ +- if ( CUR.args < 0 ) ++ if ( exc->args < 0 ) + { +- if ( CUR.pedantic_hinting ) ++ if ( exc->pedantic_hinting ) + { +- CUR.error = FT_THROW( Too_Few_Arguments ); ++ exc->error = FT_THROW( Too_Few_Arguments ); + goto LErrorLabel_; + } + + /* push zeroes onto the stack */ +- for ( i = 0; i < Pop_Push_Count[CUR.opcode] >> 4; i++ ) +- CUR.stack[i] = 0; +- CUR.args = 0; ++ for ( i = 0; i < Pop_Push_Count[exc->opcode] >> 4; i++ ) ++ exc->stack[i] = 0; ++ exc->args = 0; + } + +- CUR.new_top = CUR.args + ( Pop_Push_Count[CUR.opcode] & 15 ); ++ exc->new_top = exc->args + ( Pop_Push_Count[exc->opcode] & 15 ); + + /* `new_top' is the new top of the stack, after the instruction's */ + /* execution. `top' will be set to `new_top' after the `switch' */ + /* statement. */ +- if ( CUR.new_top > CUR.stackSize ) ++ if ( exc->new_top > exc->stackSize ) + { +- CUR.error = FT_THROW( Stack_Overflow ); ++ exc->error = FT_THROW( Stack_Overflow ); + goto LErrorLabel_; + } + +- CUR.step_ins = TRUE; +- CUR.error = FT_Err_Ok; ++ exc->step_ins = TRUE; ++ exc->error = FT_Err_Ok; + + #ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING + +@@ -8316,8 +8312,8 @@ + { + for ( i = 0; i < opcode_patterns; i++ ) + { +- if ( opcode_pointer[i] < opcode_size[i] && +- CUR.opcode == opcode_pattern[i][opcode_pointer[i]] ) ++ if ( opcode_pointer[i] < opcode_size[i] && ++ exc->opcode == opcode_pattern[i][opcode_pointer[i]] ) + { + opcode_pointer[i] += 1; + +@@ -8325,8 +8321,8 @@ + { + FT_TRACE7(( "sph: opcode ptrn: %d, %s %s\n", + i, +- CUR.face->root.family_name, +- CUR.face->root.style_name )); ++ exc->face->root.family_name, ++ exc->face->root.style_name )); + + switch ( i ) + { +@@ -8346,8 +8342,8 @@ + #ifdef TT_CONFIG_OPTION_INTERPRETER_SWITCH + + { +- FT_Long* args = CUR.stack + CUR.args; +- FT_Byte opcode = CUR.opcode; ++ FT_Long* args = exc->stack + exc->args; ++ FT_Byte opcode = exc->opcode; + + + #undef ARRAY_BOUND_ERROR +@@ -8371,11 +8367,11 @@ + + if ( opcode < 4 ) + { +- CUR.GS.projVector.x = AA; +- CUR.GS.projVector.y = BB; ++ exc->GS.projVector.x = AA; ++ exc->GS.projVector.y = BB; + +- CUR.GS.dualVector.x = AA; +- CUR.GS.dualVector.y = BB; ++ exc->GS.dualVector.x = AA; ++ exc->GS.dualVector.y = BB; + } + else + { +@@ -8384,8 +8380,8 @@ + + if ( ( opcode & 2 ) == 0 ) + { +- CUR.GS.freeVector.x = AA; +- CUR.GS.freeVector.y = BB; ++ exc->GS.freeVector.x = AA; ++ exc->GS.freeVector.y = BB; + } + else + { +@@ -8614,7 +8610,7 @@ + break; + + Set_Invalid_Ref: +- CUR.error = FT_THROW( Invalid_Reference ); ++ exc->error = FT_THROW( Invalid_Reference ); + break; + + case 0x43: /* RS */ +@@ -8900,38 +8896,38 @@ + + #else + +- Instruct_Dispatch[CUR.opcode]( EXEC_ARG_ &CUR.stack[CUR.args] ); ++ Instruct_Dispatch[exc->opcode]( EXEC_ARG_ &exc->stack[exc->args] ); + + #endif /* TT_CONFIG_OPTION_INTERPRETER_SWITCH */ + +- if ( CUR.error ) ++ if ( exc->error ) + { +- switch ( CUR.error ) ++ switch ( exc->error ) + { + /* looking for redefined instructions */ + case FT_ERR( Invalid_Opcode ): + { +- TT_DefRecord* def = CUR.IDefs; +- TT_DefRecord* limit = def + CUR.numIDefs; ++ TT_DefRecord* def = exc->IDefs; ++ TT_DefRecord* limit = def + exc->numIDefs; + + + for ( ; def < limit; def++ ) + { +- if ( def->active && CUR.opcode == (FT_Byte)def->opc ) ++ if ( def->active && exc->opcode == (FT_Byte)def->opc ) + { + TT_CallRec* callrec; + + +- if ( CUR.callTop >= CUR.callSize ) ++ if ( exc->callTop >= exc->callSize ) + { +- CUR.error = FT_THROW( Invalid_Reference ); ++ exc->error = FT_THROW( Invalid_Reference ); + goto LErrorLabel_; + } + +- callrec = &CUR.callStack[CUR.callTop]; ++ callrec = &exc->callStack[exc->callTop]; + +- callrec->Caller_Range = CUR.curRange; +- callrec->Caller_IP = CUR.IP + 1; ++ callrec->Caller_Range = exc->curRange; ++ callrec->Caller_IP = exc->IP + 1; + callrec->Cur_Count = 1; + callrec->Def = def; + +@@ -8943,7 +8939,7 @@ + } + } + +- CUR.error = FT_THROW( Invalid_Opcode ); ++ exc->error = FT_THROW( Invalid_Opcode ); + goto LErrorLabel_; + + #if 0 +@@ -8961,10 +8957,10 @@ + } + } + +- CUR.top = CUR.new_top; ++ exc->top = exc->new_top; + +- if ( CUR.step_ins ) +- CUR.IP += CUR.length; ++ if ( exc->step_ins ) ++ exc->IP += exc->length; + + /* increment instruction counter and check if we didn't */ + /* run this program for too long (e.g. infinite loops). */ +@@ -8972,17 +8968,17 @@ + return FT_THROW( Execution_Too_Long ); + + LSuiteLabel_: +- if ( CUR.IP >= CUR.codeSize ) ++ if ( exc->IP >= exc->codeSize ) + { +- if ( CUR.callTop > 0 ) ++ if ( exc->callTop > 0 ) + { +- CUR.error = FT_THROW( Code_Overflow ); ++ exc->error = FT_THROW( Code_Overflow ); + goto LErrorLabel_; + } + else + goto LNo_Error_; + } +- } while ( !CUR.instruction_trap ); ++ } while ( !exc->instruction_trap ); + + LNo_Error_: + +@@ -8993,7 +8989,7 @@ + return FT_Err_Ok; + + LErrorCodeOverflow_: +- CUR.error = FT_THROW( Code_Overflow ); ++ exc->error = FT_THROW( Code_Overflow ); + + LErrorLabel_: + +@@ -9004,16 +9000,16 @@ + /* If any errors have occurred, function tables may be broken. */ + /* Force a re-execution of `prep' and `fpgm' tables if no */ + /* bytecode debugger is run. */ +- if ( CUR.error && +- !CUR.instruction_trap && +- CUR.curRange == tt_coderange_glyph ) ++ if ( exc->error && ++ !exc->instruction_trap && ++ exc->curRange == tt_coderange_glyph ) + { +- FT_TRACE1(( " The interpreter returned error 0x%x\n", CUR.error )); ++ FT_TRACE1(( " The interpreter returned error 0x%x\n", exc->error )); + exc->size->bytecode_ready = -1; + exc->size->cvt_ready = -1; + } + +- return CUR.error; ++ return exc->error; + } + + +-- +2.2.2 + +From 5a752f332c568d64b1056636ae3e4ff527f7b17a Mon Sep 17 00:00:00 2001 +From: Werner Lemberg <wl@gnu.org> +Date: Sat, 10 Jan 2015 20:08:35 +0100 +Subject: [PATCH] [truetype] Remove code for static TrueType interpreter. + +This is a follow-up patch. + +* src/truetype/ttinterp.c, src/truetype/ttinterp.h +[TT_CONFIG_OPTION_STATIC_INTERPRETER, +TT_CONFIG_OPTION_STATIC_RASTER]: Remove macros and related code. +--- + ChangeLog | 10 +++++++ + src/truetype/ttinterp.c | 69 ------------------------------------------------- + src/truetype/ttinterp.h | 11 -------- + 3 files changed, 10 insertions(+), 80 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index 12fe053..ca832a2 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,5 +1,15 @@ + 2015-01-10 Werner Lemberg <wl@gnu.org> + ++ [truetype] Remove code for static TrueType interpreter. ++ ++ This is a follow-up patch. ++ ++ * src/truetype/ttinterp.c, src/truetype/ttinterp.h ++ [TT_CONFIG_OPTION_STATIC_INTERPRETER, ++ TT_CONFIG_OPTION_STATIC_RASTER]: Remove macros and related code. ++ ++2015-01-10 Werner Lemberg <wl@gnu.org> ++ + * src/truetype/ttinterp.c (CUR): Remove by replacing with expansion. + + This starts a series of patches that simplifies the code of the +diff --git a/src/truetype/ttinterp.c b/src/truetype/ttinterp.c +index ffef8c0..d9bda32 100644 +--- a/src/truetype/ttinterp.c ++++ b/src/truetype/ttinterp.c +@@ -55,63 +55,11 @@ + + /*************************************************************************/ + /* */ +- /* There are two kinds of implementations: */ +- /* */ +- /* a. static implementation */ +- /* */ +- /* The current execution context is a static variable, which fields */ +- /* are accessed directly by the interpreter during execution. The */ +- /* context is named `cur'. */ +- /* */ +- /* This version is non-reentrant, of course. */ +- /* */ +- /* b. indirect implementation */ +- /* */ +- /* The current execution context is passed to _each_ function as its */ +- /* first argument, and each field is thus accessed indirectly. */ +- /* */ +- /* This version is fully re-entrant. */ +- /* */ +- /* The idea is that an indirect implementation may be slower to execute */ +- /* on low-end processors that are used in some systems (like 386s or */ +- /* even 486s). */ +- /* */ +- /* As a consequence, the indirect implementation is now the default, as */ +- /* its performance costs can be considered negligible in our context. */ +- /* Note, however, that we kept the same source with macros because: */ +- /* */ +- /* - The code is kept very close in design to the Pascal code used for */ +- /* development. */ +- /* */ +- /* - It's much more readable that way! */ +- /* */ +- /* - It's still open to experimentation and tuning. */ +- /* */ +- /*************************************************************************/ +- +- +-#ifndef TT_CONFIG_OPTION_STATIC_INTERPRETER /* indirect implementation */ +- +- /*************************************************************************/ +- /* */ + /* This macro is used whenever `exec' is unused in a function, to avoid */ + /* stupid warnings from pedantic compilers. */ + /* */ + #define FT_UNUSED_EXEC FT_UNUSED( exc ) + +-#else /* static implementation */ +- +-#define FT_UNUSED_EXEC int __dummy = __dummy +- +- static +- TT_ExecContextRec cur; /* static exec. context variable */ +- +- /* apparently, we have a _lot_ of direct indexing when accessing */ +- /* the static `cur', which makes the code bigger (due to all the */ +- /* four bytes addresses). */ +- +-#endif /* TT_CONFIG_OPTION_STATIC_INTERPRETER */ +- + + /*************************************************************************/ + /* */ +@@ -8221,13 +8169,6 @@ + #endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ + + +-#ifdef TT_CONFIG_OPTION_STATIC_RASTER +- if ( !exc ) +- return FT_THROW( Invalid_Argument ); +- +- cur = *exc; +-#endif +- + #ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING + exc->iup_called = FALSE; + #endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ +@@ -8981,22 +8922,12 @@ + } while ( !exc->instruction_trap ); + + LNo_Error_: +- +-#ifdef TT_CONFIG_OPTION_STATIC_RASTER +- *exc = cur; +-#endif +- + return FT_Err_Ok; + + LErrorCodeOverflow_: + exc->error = FT_THROW( Code_Overflow ); + + LErrorLabel_: +- +-#ifdef TT_CONFIG_OPTION_STATIC_RASTER +- *exc = cur; +-#endif +- + /* If any errors have occurred, function tables may be broken. */ + /* Force a re-execution of `prep' and `fpgm' tables if no */ + /* bytecode debugger is run. */ +diff --git a/src/truetype/ttinterp.h b/src/truetype/ttinterp.h +index 333decc..c282471 100644 +--- a/src/truetype/ttinterp.h ++++ b/src/truetype/ttinterp.h +@@ -26,22 +26,11 @@ + FT_BEGIN_HEADER + + +-#ifndef TT_CONFIG_OPTION_STATIC_INTERPRETER /* indirect implementation */ +- + #define EXEC_OP_ TT_ExecContext exc, + #define EXEC_OP TT_ExecContext exc + #define EXEC_ARG_ exc, + #define EXEC_ARG exc + +-#else /* static implementation */ +- +-#define EXEC_OP_ /* void */ +-#define EXEC_OP /* void */ +-#define EXEC_ARG_ /* void */ +-#define EXEC_ARG /* void */ +- +-#endif /* TT_CONFIG_OPTION_STATIC_INTERPRETER */ +- + + /*************************************************************************/ + /* */ +-- +2.2.2 + +From fae0c81f6917a0f782129f085fadfe151469ba79 Mon Sep 17 00:00:00 2001 +From: Werner Lemberg <wl@gnu.org> +Date: Sat, 10 Jan 2015 20:23:10 +0100 +Subject: [PATCH] [truetype] More macro expansions. + +* src/truetype/ttinterp.c (EXEC_OP_, EXEC_OP): Remove by replacing +with expansion. +--- + ChangeLog | 7 ++ + src/truetype/ttinterp.c | 190 ++++++++++++++++++++++++++++-------------------- + src/truetype/ttinterp.h | 29 ++++---- + 3 files changed, 134 insertions(+), 92 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index ca832a2..60bb0b1 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,5 +1,12 @@ + 2015-01-10 Werner Lemberg <wl@gnu.org> + ++ [truetype] More macro expansions. ++ ++ * src/truetype/ttinterp.c (EXEC_OP_, EXEC_OP): Remove by replacing ++ with expansion. ++ ++2015-01-10 Werner Lemberg <wl@gnu.org> ++ + [truetype] Remove code for static TrueType interpreter. + + This is a follow-up patch. +diff --git a/src/truetype/ttinterp.c b/src/truetype/ttinterp.c +index d9bda32..e153a58 100644 +--- a/src/truetype/ttinterp.c ++++ b/src/truetype/ttinterp.c +@@ -65,7 +65,8 @@ + /* */ + /* The instruction argument stack. */ + /* */ +-#define INS_ARG EXEC_OP_ FT_Long* args /* see ttobjs.h for EXEC_OP_ */ ++#define INS_ARG TT_ExecContext exc, \ ++ FT_Long* args + + + /*************************************************************************/ +@@ -1581,7 +1582,7 @@ + /* The aspect ratio in 16.16 format, always <= 1.0 . */ + /* */ + static FT_Long +- Current_Ratio( EXEC_OP ) ++ Current_Ratio( TT_ExecContext exc ) + { + if ( !exc->tt_metrics.ratio ) + { +@@ -1620,14 +1621,14 @@ + + + FT_CALLBACK_DEF( FT_Long ) +- Current_Ppem( EXEC_OP ) ++ Current_Ppem( TT_ExecContext exc ) + { + return exc->tt_metrics.ppem; + } + + + FT_CALLBACK_DEF( FT_Long ) +- Current_Ppem_Stretched( EXEC_OP ) ++ Current_Ppem_Stretched( TT_ExecContext exc ) + { + return FT_MulFix( exc->tt_metrics.ppem, CURRENT_Ratio() ); + } +@@ -1641,46 +1642,52 @@ + + + FT_CALLBACK_DEF( FT_F26Dot6 ) +- Read_CVT( EXEC_OP_ FT_ULong idx ) ++ Read_CVT( TT_ExecContext exc, ++ FT_ULong idx ) + { + return exc->cvt[idx]; + } + + + FT_CALLBACK_DEF( FT_F26Dot6 ) +- Read_CVT_Stretched( EXEC_OP_ FT_ULong idx ) ++ Read_CVT_Stretched( TT_ExecContext exc, ++ FT_ULong idx ) + { + return FT_MulFix( exc->cvt[idx], CURRENT_Ratio() ); + } + + + FT_CALLBACK_DEF( void ) +- Write_CVT( EXEC_OP_ FT_ULong idx, +- FT_F26Dot6 value ) ++ Write_CVT( TT_ExecContext exc, ++ FT_ULong idx, ++ FT_F26Dot6 value ) + { + exc->cvt[idx] = value; + } + + + FT_CALLBACK_DEF( void ) +- Write_CVT_Stretched( EXEC_OP_ FT_ULong idx, +- FT_F26Dot6 value ) ++ Write_CVT_Stretched( TT_ExecContext exc, ++ FT_ULong idx, ++ FT_F26Dot6 value ) + { + exc->cvt[idx] = FT_DivFix( value, CURRENT_Ratio() ); + } + + + FT_CALLBACK_DEF( void ) +- Move_CVT( EXEC_OP_ FT_ULong idx, +- FT_F26Dot6 value ) ++ Move_CVT( TT_ExecContext exc, ++ FT_ULong idx, ++ FT_F26Dot6 value ) + { + exc->cvt[idx] += value; + } + + + FT_CALLBACK_DEF( void ) +- Move_CVT_Stretched( EXEC_OP_ FT_ULong idx, +- FT_F26Dot6 value ) ++ Move_CVT_Stretched( TT_ExecContext exc, ++ FT_ULong idx, ++ FT_F26Dot6 value ) + { + exc->cvt[idx] += FT_DivFix( value, CURRENT_Ratio() ); + } +@@ -1702,7 +1709,7 @@ + /* This one could become a macro. */ + /* */ + static FT_Short +- GetShortIns( EXEC_OP ) ++ GetShortIns( TT_ExecContext exc ) + { + /* Reading a byte stream so there is no endianess (DaveP) */ + exc->IP += 2; +@@ -1728,8 +1735,9 @@ + /* SUCCESS or FAILURE. */ + /* */ + static FT_Bool +- Ins_Goto_CodeRange( EXEC_OP_ FT_Int aRange, +- FT_ULong aIP ) ++ Ins_Goto_CodeRange( TT_ExecContext exc, ++ FT_Int aRange, ++ FT_ULong aIP ) + { + TT_CodeRange* range; + +@@ -1785,9 +1793,10 @@ + /* zone :: The affected glyph zone. */ + /* */ + static void +- Direct_Move( EXEC_OP_ TT_GlyphZone zone, +- FT_UShort point, +- FT_F26Dot6 distance ) ++ Direct_Move( TT_ExecContext exc, ++ TT_GlyphZone zone, ++ FT_UShort point, ++ FT_F26Dot6 distance ) + { + FT_F26Dot6 v; + +@@ -1839,9 +1848,10 @@ + /* zone :: The affected glyph zone. */ + /* */ + static void +- Direct_Move_Orig( EXEC_OP_ TT_GlyphZone zone, +- FT_UShort point, +- FT_F26Dot6 distance ) ++ Direct_Move_Orig( TT_ExecContext exc, ++ TT_GlyphZone zone, ++ FT_UShort point, ++ FT_F26Dot6 distance ) + { + FT_F26Dot6 v; + +@@ -1873,9 +1883,10 @@ + + + static void +- Direct_Move_X( EXEC_OP_ TT_GlyphZone zone, +- FT_UShort point, +- FT_F26Dot6 distance ) ++ Direct_Move_X( TT_ExecContext exc, ++ TT_GlyphZone zone, ++ FT_UShort point, ++ FT_F26Dot6 distance ) + { + FT_UNUSED_EXEC; + +@@ -1890,9 +1901,10 @@ + + + static void +- Direct_Move_Y( EXEC_OP_ TT_GlyphZone zone, +- FT_UShort point, +- FT_F26Dot6 distance ) ++ Direct_Move_Y( TT_ExecContext exc, ++ TT_GlyphZone zone, ++ FT_UShort point, ++ FT_F26Dot6 distance ) + { + FT_UNUSED_EXEC; + +@@ -1912,9 +1924,10 @@ + + + static void +- Direct_Move_Orig_X( EXEC_OP_ TT_GlyphZone zone, +- FT_UShort point, +- FT_F26Dot6 distance ) ++ Direct_Move_Orig_X( TT_ExecContext exc, ++ TT_GlyphZone zone, ++ FT_UShort point, ++ FT_F26Dot6 distance ) + { + FT_UNUSED_EXEC; + +@@ -1923,9 +1936,10 @@ + + + static void +- Direct_Move_Orig_Y( EXEC_OP_ TT_GlyphZone zone, +- FT_UShort point, +- FT_F26Dot6 distance ) ++ Direct_Move_Orig_Y( TT_ExecContext exc, ++ TT_GlyphZone zone, ++ FT_UShort point, ++ FT_F26Dot6 distance ) + { + FT_UNUSED_EXEC; + +@@ -1956,8 +1970,9 @@ + /* before rounding. */ + /* */ + static FT_F26Dot6 +- Round_None( EXEC_OP_ FT_F26Dot6 distance, +- FT_F26Dot6 compensation ) ++ Round_None( TT_ExecContext exc, ++ FT_F26Dot6 distance, ++ FT_F26Dot6 compensation ) + { + FT_F26Dot6 val; + +@@ -1997,8 +2012,9 @@ + /* Rounded distance. */ + /* */ + static FT_F26Dot6 +- Round_To_Grid( EXEC_OP_ FT_F26Dot6 distance, +- FT_F26Dot6 compensation ) ++ Round_To_Grid( TT_ExecContext exc, ++ FT_F26Dot6 distance, ++ FT_F26Dot6 compensation ) + { + FT_F26Dot6 val; + +@@ -2039,8 +2055,9 @@ + /* Rounded distance. */ + /* */ + static FT_F26Dot6 +- Round_To_Half_Grid( EXEC_OP_ FT_F26Dot6 distance, +- FT_F26Dot6 compensation ) ++ Round_To_Half_Grid( TT_ExecContext exc, ++ FT_F26Dot6 distance, ++ FT_F26Dot6 compensation ) + { + FT_F26Dot6 val; + +@@ -2081,8 +2098,9 @@ + /* Rounded distance. */ + /* */ + static FT_F26Dot6 +- Round_Down_To_Grid( EXEC_OP_ FT_F26Dot6 distance, +- FT_F26Dot6 compensation ) ++ Round_Down_To_Grid( TT_ExecContext exc, ++ FT_F26Dot6 distance, ++ FT_F26Dot6 compensation ) + { + FT_F26Dot6 val; + +@@ -2123,8 +2141,9 @@ + /* Rounded distance. */ + /* */ + static FT_F26Dot6 +- Round_Up_To_Grid( EXEC_OP_ FT_F26Dot6 distance, +- FT_F26Dot6 compensation ) ++ Round_Up_To_Grid( TT_ExecContext exc, ++ FT_F26Dot6 distance, ++ FT_F26Dot6 compensation ) + { + FT_F26Dot6 val; + +@@ -2165,8 +2184,9 @@ + /* Rounded distance. */ + /* */ + static FT_F26Dot6 +- Round_To_Double_Grid( EXEC_OP_ FT_F26Dot6 distance, +- FT_F26Dot6 compensation ) ++ Round_To_Double_Grid( TT_ExecContext exc, ++ FT_F26Dot6 distance, ++ FT_F26Dot6 compensation ) + { + FT_F26Dot6 val; + +@@ -2213,8 +2233,9 @@ + /* before rounding. */ + /* */ + static FT_F26Dot6 +- Round_Super( EXEC_OP_ FT_F26Dot6 distance, +- FT_F26Dot6 compensation ) ++ Round_Super( TT_ExecContext exc, ++ FT_F26Dot6 distance, ++ FT_F26Dot6 compensation ) + { + FT_F26Dot6 val; + +@@ -2261,8 +2282,9 @@ + /* greater precision. */ + /* */ + static FT_F26Dot6 +- Round_Super_45( EXEC_OP_ FT_F26Dot6 distance, +- FT_F26Dot6 compensation ) ++ Round_Super_45( TT_ExecContext exc, ++ FT_F26Dot6 distance, ++ FT_F26Dot6 compensation ) + { + FT_F26Dot6 val; + +@@ -2300,7 +2322,8 @@ + /* round_mode :: The rounding mode to be used. */ + /* */ + static void +- Compute_Round( EXEC_OP_ FT_Byte round_mode ) ++ Compute_Round( TT_ExecContext exc, ++ FT_Byte round_mode ) + { + switch ( round_mode ) + { +@@ -2353,8 +2376,9 @@ + /* selector :: The SROUND opcode. */ + /* */ + static void +- SetSuperRound( EXEC_OP_ FT_F26Dot6 GridPeriod, +- FT_Long selector ) ++ SetSuperRound( TT_ExecContext exc, ++ FT_F26Dot6 GridPeriod, ++ FT_Long selector ) + { + switch ( (FT_Int)( selector & 0xC0 ) ) + { +@@ -2424,8 +2448,9 @@ + /* The distance in F26dot6 format. */ + /* */ + static FT_F26Dot6 +- Project( EXEC_OP_ FT_Pos dx, +- FT_Pos dy ) ++ Project( TT_ExecContext exc, ++ FT_Pos dx, ++ FT_Pos dy ) + { + #ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING + FT_ASSERT( !exc->face->unpatented_hinting ); +@@ -2454,8 +2479,9 @@ + /* The distance in F26dot6 format. */ + /* */ + static FT_F26Dot6 +- Dual_Project( EXEC_OP_ FT_Pos dx, +- FT_Pos dy ) ++ Dual_Project( TT_ExecContext exc, ++ FT_Pos dx, ++ FT_Pos dy ) + { + return TT_DotFix14( (FT_UInt32)dx, (FT_UInt32)dy, + exc->GS.dualVector.x, +@@ -2480,8 +2506,9 @@ + /* The distance in F26dot6 format. */ + /* */ + static FT_F26Dot6 +- Project_x( EXEC_OP_ FT_Pos dx, +- FT_Pos dy ) ++ Project_x( TT_ExecContext exc, ++ FT_Pos dx, ++ FT_Pos dy ) + { + FT_UNUSED_EXEC; + FT_UNUSED( dy ); +@@ -2507,8 +2534,9 @@ + /* The distance in F26dot6 format. */ + /* */ + static FT_F26Dot6 +- Project_y( EXEC_OP_ FT_Pos dx, +- FT_Pos dy ) ++ Project_y( TT_ExecContext exc, ++ FT_Pos dx, ++ FT_Pos dy ) + { + FT_UNUSED_EXEC; + FT_UNUSED( dx ); +@@ -2527,7 +2555,7 @@ + /* to the current graphics state. */ + /* */ + static void +- Compute_Funcs( EXEC_OP ) ++ Compute_Funcs( TT_ExecContext exc ) + { + #ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING + if ( exc->face->unpatented_hinting ) +@@ -2648,9 +2676,10 @@ + /* R is undefined. */ + /* */ + static FT_Bool +- Normalize( EXEC_OP_ FT_F26Dot6 Vx, +- FT_F26Dot6 Vy, +- FT_UnitVector* R ) ++ Normalize( TT_ExecContext exc, ++ FT_F26Dot6 Vx, ++ FT_F26Dot6 Vy, ++ FT_UnitVector* R ) + { + FT_F26Dot6 W; + +@@ -2687,10 +2716,11 @@ + + + static FT_Bool +- Ins_SxVTL( EXEC_OP_ FT_UShort aIdx1, +- FT_UShort aIdx2, +- FT_Int aOpc, +- FT_UnitVector* Vec ) ++ Ins_SxVTL( TT_ExecContext exc, ++ FT_UShort aIdx1, ++ FT_UShort aIdx2, ++ FT_Int aOpc, ++ FT_UnitVector* Vec ) + { + FT_Long A, B, C; + FT_Vector* p1; +@@ -4371,7 +4401,7 @@ + + + static FT_Bool +- SkipCode( EXEC_OP ) ++ SkipCode( TT_ExecContext exc ) + { + exc->IP += exc->length; + +@@ -5769,10 +5799,11 @@ + + + static FT_Bool +- Compute_Point_Displacement( EXEC_OP_ FT_F26Dot6* x, +- FT_F26Dot6* y, +- TT_GlyphZone zone, +- FT_UShort* refp ) ++ Compute_Point_Displacement( TT_ExecContext exc, ++ FT_F26Dot6* x, ++ FT_F26Dot6* y, ++ TT_GlyphZone zone, ++ FT_UShort* refp ) + { + TT_GlyphZoneRec zp; + FT_UShort p; +@@ -5829,10 +5860,11 @@ + + + static void +- Move_Zp2_Point( EXEC_OP_ FT_UShort point, +- FT_F26Dot6 dx, +- FT_F26Dot6 dy, +- FT_Bool touch ) ++ Move_Zp2_Point( TT_ExecContext exc, ++ FT_UShort point, ++ FT_F26Dot6 dx, ++ FT_F26Dot6 dy, ++ FT_Bool touch ) + { + #ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING + if ( exc->face->unpatented_hinting ) +diff --git a/src/truetype/ttinterp.h b/src/truetype/ttinterp.h +index c282471..50f1acd 100644 +--- a/src/truetype/ttinterp.h ++++ b/src/truetype/ttinterp.h +@@ -26,8 +26,6 @@ + FT_BEGIN_HEADER + + +-#define EXEC_OP_ TT_ExecContext exc, +-#define EXEC_OP TT_ExecContext exc + #define EXEC_ARG_ exc, + #define EXEC_ARG exc + +@@ -56,33 +54,38 @@ FT_BEGIN_HEADER + + /* Rounding function */ + typedef FT_F26Dot6 +- (*TT_Round_Func)( EXEC_OP_ FT_F26Dot6 distance, +- FT_F26Dot6 compensation ); ++ (*TT_Round_Func)( TT_ExecContext exc, ++ FT_F26Dot6 distance, ++ FT_F26Dot6 compensation ); + + /* Point displacement along the freedom vector routine */ + typedef void +- (*TT_Move_Func)( EXEC_OP_ TT_GlyphZone zone, +- FT_UShort point, +- FT_F26Dot6 distance ); ++ (*TT_Move_Func)( TT_ExecContext exc, ++ TT_GlyphZone zone, ++ FT_UShort point, ++ FT_F26Dot6 distance ); + + /* Distance projection along one of the projection vectors */ + typedef FT_F26Dot6 +- (*TT_Project_Func)( EXEC_OP_ FT_Pos dx, +- FT_Pos dy ); ++ (*TT_Project_Func)( TT_ExecContext exc, ++ FT_Pos dx, ++ FT_Pos dy ); + + /* getting current ppem. Take care of non-square pixels if necessary */ + typedef FT_Long +- (*TT_Cur_Ppem_Func)( EXEC_OP ); ++ (*TT_Cur_Ppem_Func)( TT_ExecContext exc ); + + /* reading a cvt value. Take care of non-square pixels if necessary */ + typedef FT_F26Dot6 +- (*TT_Get_CVT_Func)( EXEC_OP_ FT_ULong idx ); ++ (*TT_Get_CVT_Func)( TT_ExecContext exc, ++ FT_ULong idx ); + + /* setting or moving a cvt value. Take care of non-square pixels */ + /* if necessary */ + typedef void +- (*TT_Set_CVT_Func)( EXEC_OP_ FT_ULong idx, +- FT_F26Dot6 value ); ++ (*TT_Set_CVT_Func)( TT_ExecContext exc, ++ FT_ULong idx, ++ FT_F26Dot6 value ); + + + /*************************************************************************/ +-- +2.2.2 + +From 246814554fb1ba4e8d7747e156572ad1481af13c Mon Sep 17 00:00:00 2001 +From: Werner Lemberg <wl@gnu.org> +Date: Sat, 10 Jan 2015 21:53:48 +0100 +Subject: [PATCH] [truetype] More macro expansions. + +Based on a patch from Behdad. + +* src/truetype/ttinterp.c (SKIP_Code, GET_ShortIns, NORMalize, +SET_SuperRound, ROUND_None, INS_Goto_CodeRange, CUR_Func_move, +CUR_Func_move_orig, CUR_Func_round, CUR_Func_cur_ppem, +CUR_Func_read_cvt, CUR_Func_write_cvt, CUR_Func_move_cvt, +CURRENT_Ratio, INS_SxVTL, COMPUTE_Funcs, COMPUTE_Round, +COMPUTE_Point_Displacement, MOVE_Zp2_Point): Remove by replacing +with expansion. + +(Cur_Func_project, CUR_Func_dualproj, CUR_fast_project, +CUR_fast_dualproj): Replace with macros `project', `dualproj', +`fast_project', `fast_dualproj'. +--- + ChangeLog | 18 ++ + src/truetype/ttinterp.c | 483 +++++++++++++++++++++--------------------------- + 2 files changed, 231 insertions(+), 270 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index 60bb0b1..a271e5a 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -2,6 +2,24 @@ + + [truetype] More macro expansions. + ++ Based on a patch from Behdad. ++ ++ * src/truetype/ttinterp.c (SKIP_Code, GET_ShortIns, NORMalize, ++ SET_SuperRound, ROUND_None, INS_Goto_CodeRange, CUR_Func_move, ++ CUR_Func_move_orig, CUR_Func_round, CUR_Func_cur_ppem, ++ CUR_Func_read_cvt, CUR_Func_write_cvt, CUR_Func_move_cvt, ++ CURRENT_Ratio, INS_SxVTL, COMPUTE_Funcs, COMPUTE_Round, ++ COMPUTE_Point_Displacement, MOVE_Zp2_Point): Remove by replacing ++ with expansion. ++ ++ (Cur_Func_project, CUR_Func_dualproj, CUR_fast_project, ++ CUR_fast_dualproj): Replace with macros `project', `dualproj', ++ `fast_project', `fast_dualproj'. ++ ++2015-01-10 Werner Lemberg <wl@gnu.org> ++ ++ [truetype] More macro expansions. ++ + * src/truetype/ttinterp.c (EXEC_OP_, EXEC_OP): Remove by replacing + with expansion. + +diff --git a/src/truetype/ttinterp.c b/src/truetype/ttinterp.c +index e153a58..1c5e98a 100644 +--- a/src/truetype/ttinterp.c ++++ b/src/truetype/ttinterp.c +@@ -82,83 +82,17 @@ + TT_INTERPRETER_VERSION_38 ) + + +- /*************************************************************************/ +- /* */ +- /* The following macros hide the use of EXEC_ARG and EXEC_ARG_ to */ +- /* increase readability of the code. */ +- /* */ +- /*************************************************************************/ +- +- +-#define SKIP_Code() \ +- SkipCode( EXEC_ARG ) +- +-#define GET_ShortIns() \ +- GetShortIns( EXEC_ARG ) +- +-#define NORMalize( x, y, v ) \ +- Normalize( EXEC_ARG_ x, y, v ) +- +-#define SET_SuperRound( scale, flags ) \ +- SetSuperRound( EXEC_ARG_ scale, flags ) +- +-#define ROUND_None( d, c ) \ +- Round_None( EXEC_ARG_ d, c ) +- +-#define INS_Goto_CodeRange( range, ip ) \ +- Ins_Goto_CodeRange( EXEC_ARG_ range, ip ) +- +-#define CUR_Func_move( z, p, d ) \ +- exc->func_move( EXEC_ARG_ z, p, d ) +- +-#define CUR_Func_move_orig( z, p, d ) \ +- exc->func_move_orig( EXEC_ARG_ z, p, d ) +- +-#define CUR_Func_round( d, c ) \ +- exc->func_round( EXEC_ARG_ d, c ) ++#define project( v1, v2 ) \ ++ exc->func_project( exc, (v1)->x - (v2)->x, (v1)->y - (v2)->y ) + +-#define CUR_Func_cur_ppem() \ +- exc->func_cur_ppem( EXEC_ARG ) ++#define dualproj( v1, v2 ) \ ++ exc->func_dualproj( exc, (v1)->x - (v2)->x, (v1)->y - (v2)->y ) + +-#define CUR_Func_read_cvt( index ) \ +- exc->func_read_cvt( EXEC_ARG_ index ) ++#define fast_project( v ) \ ++ exc->func_project( exc, (v)->x, (v)->y ) + +-#define CUR_Func_write_cvt( index, val ) \ +- exc->func_write_cvt( EXEC_ARG_ index, val ) +- +-#define CUR_Func_move_cvt( index, val ) \ +- exc->func_move_cvt( EXEC_ARG_ index, val ) +- +-#define CURRENT_Ratio() \ +- Current_Ratio( EXEC_ARG ) +- +-#define INS_SxVTL( a, b, c, d ) \ +- Ins_SxVTL( EXEC_ARG_ a, b, c, d ) +- +-#define COMPUTE_Funcs() \ +- Compute_Funcs( EXEC_ARG ) +- +-#define COMPUTE_Round( a ) \ +- Compute_Round( EXEC_ARG_ a ) +- +-#define COMPUTE_Point_Displacement( a, b, c, d ) \ +- Compute_Point_Displacement( EXEC_ARG_ a, b, c, d ) +- +-#define MOVE_Zp2_Point( a, b, c, t ) \ +- Move_Zp2_Point( EXEC_ARG_ a, b, c, t ) +- +- +-#define CUR_Func_project( v1, v2 ) \ +- exc->func_project( EXEC_ARG_ (v1)->x - (v2)->x, (v1)->y - (v2)->y ) +- +-#define CUR_Func_dualproj( v1, v2 ) \ +- exc->func_dualproj( EXEC_ARG_ (v1)->x - (v2)->x, (v1)->y - (v2)->y ) +- +-#define CUR_fast_project( v ) \ +- exc->func_project( EXEC_ARG_ (v)->x, (v)->y ) +- +-#define CUR_fast_dualproj( v ) \ +- exc->func_dualproj( EXEC_ARG_ (v)->x, (v)->y ) ++#define fast_dualproj( v ) \ ++ exc->func_dualproj( exc, (v)->x, (v)->y ) + + + /*************************************************************************/ +@@ -1630,7 +1564,7 @@ + FT_CALLBACK_DEF( FT_Long ) + Current_Ppem_Stretched( TT_ExecContext exc ) + { +- return FT_MulFix( exc->tt_metrics.ppem, CURRENT_Ratio() ); ++ return FT_MulFix( exc->tt_metrics.ppem, Current_Ratio( exc ) ); + } + + +@@ -1653,7 +1587,7 @@ + Read_CVT_Stretched( TT_ExecContext exc, + FT_ULong idx ) + { +- return FT_MulFix( exc->cvt[idx], CURRENT_Ratio() ); ++ return FT_MulFix( exc->cvt[idx], Current_Ratio( exc ) ); + } + + +@@ -1671,7 +1605,7 @@ + FT_ULong idx, + FT_F26Dot6 value ) + { +- exc->cvt[idx] = FT_DivFix( value, CURRENT_Ratio() ); ++ exc->cvt[idx] = FT_DivFix( value, Current_Ratio( exc ) ); + } + + +@@ -1689,7 +1623,7 @@ + FT_ULong idx, + FT_F26Dot6 value ) + { +- exc->cvt[idx] += FT_DivFix( value, CURRENT_Ratio() ); ++ exc->cvt[idx] += FT_DivFix( value, Current_Ratio( exc ) ); + } + + +@@ -2759,7 +2693,7 @@ + A = -C; + } + +- NORMalize( A, B, Vec ); ++ Normalize( exc, A, B, Vec ); + + return SUCCESS; + } +@@ -2787,7 +2721,7 @@ + exc->GS.projVector.y = B; \ + exc->GS.dualVector.y = B; \ + \ +- COMPUTE_Funcs(); \ ++ Compute_Funcs( exc ); \ + } + + +@@ -2807,7 +2741,7 @@ + \ + GUESS_VECTOR( freeVector ); \ + \ +- COMPUTE_Funcs(); \ ++ Compute_Funcs( exc ); \ + } + + +@@ -2824,74 +2758,76 @@ + \ + GUESS_VECTOR( projVector ); \ + \ +- COMPUTE_Funcs(); \ ++ Compute_Funcs( exc ); \ + } + + + #define DO_SPVTL \ +- if ( INS_SxVTL( (FT_UShort)args[1], \ ++ if ( Ins_SxVTL( exc, \ ++ (FT_UShort)args[1], \ + (FT_UShort)args[0], \ + exc->opcode, \ + &exc->GS.projVector ) == SUCCESS ) \ + { \ + exc->GS.dualVector = exc->GS.projVector; \ + GUESS_VECTOR( freeVector ); \ +- COMPUTE_Funcs(); \ ++ Compute_Funcs( exc ); \ + } + + + #define DO_SFVTL \ +- if ( INS_SxVTL( (FT_UShort)args[1], \ ++ if ( Ins_SxVTL( exc, \ ++ (FT_UShort)args[1], \ + (FT_UShort)args[0], \ + exc->opcode, \ + &exc->GS.freeVector ) == SUCCESS ) \ + { \ + GUESS_VECTOR( projVector ); \ +- COMPUTE_Funcs(); \ ++ Compute_Funcs( exc ); \ + } + + + #define DO_SFVTPV \ + GUESS_VECTOR( projVector ); \ + exc->GS.freeVector = exc->GS.projVector; \ +- COMPUTE_Funcs(); +- +- +-#define DO_SPVFS \ +- { \ +- FT_Short S; \ +- FT_Long X, Y; \ +- \ +- \ +- /* Only use low 16bits, then sign extend */ \ +- S = (FT_Short)args[1]; \ +- Y = (FT_Long)S; \ +- S = (FT_Short)args[0]; \ +- X = (FT_Long)S; \ +- \ +- NORMalize( X, Y, &exc->GS.projVector ); \ +- \ +- exc->GS.dualVector = exc->GS.projVector; \ +- GUESS_VECTOR( freeVector ); \ +- COMPUTE_Funcs(); \ +- } +- +- +-#define DO_SFVFS \ +- { \ +- FT_Short S; \ +- FT_Long X, Y; \ +- \ +- \ +- /* Only use low 16bits, then sign extend */ \ +- S = (FT_Short)args[1]; \ +- Y = (FT_Long)S; \ +- S = (FT_Short)args[0]; \ +- X = S; \ +- \ +- NORMalize( X, Y, &exc->GS.freeVector ); \ +- GUESS_VECTOR( projVector ); \ +- COMPUTE_Funcs(); \ ++ Compute_Funcs( exc ); ++ ++ ++#define DO_SPVFS \ ++ { \ ++ FT_Short S; \ ++ FT_Long X, Y; \ ++ \ ++ \ ++ /* Only use low 16bits, then sign extend */ \ ++ S = (FT_Short)args[1]; \ ++ Y = (FT_Long)S; \ ++ S = (FT_Short)args[0]; \ ++ X = (FT_Long)S; \ ++ \ ++ Normalize( exc, X, Y, &exc->GS.projVector ); \ ++ \ ++ exc->GS.dualVector = exc->GS.projVector; \ ++ GUESS_VECTOR( freeVector ); \ ++ Compute_Funcs( exc ); \ ++ } ++ ++ ++#define DO_SFVFS \ ++ { \ ++ FT_Short S; \ ++ FT_Long X, Y; \ ++ \ ++ \ ++ /* Only use low 16bits, then sign extend */ \ ++ S = (FT_Short)args[1]; \ ++ Y = (FT_Long)S; \ ++ S = (FT_Short)args[0]; \ ++ X = S; \ ++ \ ++ Normalize( exc, X, Y, &exc->GS.freeVector ); \ ++ GUESS_VECTOR( projVector ); \ ++ Compute_Funcs( exc ); \ + } + + +@@ -2976,13 +2912,13 @@ + + + #define DO_SROUND \ +- SET_SuperRound( 0x4000, args[0] ); \ ++ SetSuperRound( exc, 0x4000, args[0] ); \ + exc->GS.round_state = TT_Round_Super; \ + exc->func_round = (TT_Round_Func)Round_Super; + + + #define DO_S45ROUND \ +- SET_SuperRound( 0x2D41, args[0] ); \ ++ SetSuperRound( exc, 0x2D41, args[0] ); \ + exc->GS.round_state = TT_Round_Super_45; \ + exc->func_round = (TT_Round_Func)Round_Super_45; + +@@ -3033,8 +2969,8 @@ + #define DO_MD /* nothing */ + + +-#define DO_MPPEM \ +- args[0] = CUR_Func_cur_ppem(); ++#define DO_MPPEM \ ++ args[0] = exc->func_cur_ppem( exc ); + + + /* Note: The pointSize should be irrelevant in a given font program; */ +@@ -3046,8 +2982,8 @@ + + #else + +-#define DO_MPS \ +- args[0] = CUR_Func_cur_ppem(); ++#define DO_MPS \ ++ args[0] = exc->func_cur_ppem( exc ); + + #endif /* 0 */ + +@@ -3156,12 +3092,12 @@ + args[0] = ( args[0] != args[1] ); + + +-#define DO_ODD \ +- args[0] = ( ( CUR_Func_round( args[0], 0 ) & 127 ) == 64 ); ++#define DO_ODD \ ++ args[0] = ( ( exc->func_round( exc, args[0], 0 ) & 127 ) == 64 ); + + +-#define DO_EVEN \ +- args[0] = ( ( CUR_Func_round( args[0], 0 ) & 127 ) == 0 ); ++#define DO_EVEN \ ++ args[0] = ( ( exc->func_round( exc, args[0], 0 ) & 127 ) == 0 ); + + + #define DO_AND \ +@@ -3288,39 +3224,39 @@ + } + + +-#define DO_RCVT \ +- { \ +- FT_ULong I = (FT_ULong)args[0]; \ +- \ +- \ +- if ( BOUNDSL( I, exc->cvtSize ) ) \ +- { \ +- if ( exc->pedantic_hinting ) \ +- { \ +- ARRAY_BOUND_ERROR; \ +- } \ +- else \ +- args[0] = 0; \ +- } \ +- else \ +- args[0] = CUR_Func_read_cvt( I ); \ ++#define DO_RCVT \ ++ { \ ++ FT_ULong I = (FT_ULong)args[0]; \ ++ \ ++ \ ++ if ( BOUNDSL( I, exc->cvtSize ) ) \ ++ { \ ++ if ( exc->pedantic_hinting ) \ ++ { \ ++ ARRAY_BOUND_ERROR; \ ++ } \ ++ else \ ++ args[0] = 0; \ ++ } \ ++ else \ ++ args[0] = exc->func_read_cvt( exc, I ); \ + } + + +-#define DO_WCVTP \ +- { \ +- FT_ULong I = (FT_ULong)args[0]; \ +- \ +- \ +- if ( BOUNDSL( I, exc->cvtSize ) ) \ +- { \ +- if ( exc->pedantic_hinting ) \ +- { \ +- ARRAY_BOUND_ERROR; \ +- } \ +- } \ +- else \ +- CUR_Func_write_cvt( I, args[1] ); \ ++#define DO_WCVTP \ ++ { \ ++ FT_ULong I = (FT_ULong)args[0]; \ ++ \ ++ \ ++ if ( BOUNDSL( I, exc->cvtSize ) ) \ ++ { \ ++ if ( exc->pedantic_hinting ) \ ++ { \ ++ ARRAY_BOUND_ERROR; \ ++ } \ ++ } \ ++ else \ ++ exc->func_write_cvt( exc, I, args[1] ); \ + } + + +@@ -3345,14 +3281,16 @@ + exc->error = FT_THROW( Debug_OpCode ); + + +-#define DO_ROUND \ +- args[0] = CUR_Func_round( \ +- args[0], \ ++#define DO_ROUND \ ++ args[0] = exc->func_round( \ ++ exc, \ ++ args[0], \ + exc->tt_metrics.compensations[exc->opcode - 0x68] ); + + + #define DO_NROUND \ +- args[0] = ROUND_None( args[0], \ ++ args[0] = Round_None( exc, \ ++ args[0], \ + exc->tt_metrics.compensations[exc->opcode - 0x6C] ); + + +@@ -4448,7 +4386,7 @@ + + do + { +- if ( SKIP_Code() == FAILURE ) ++ if ( SkipCode( exc ) == FAILURE ) + return; + + switch ( exc->opcode ) +@@ -4488,7 +4426,7 @@ + + do + { +- if ( SKIP_Code() == FAILURE ) ++ if ( SkipCode( exc ) == FAILURE ) + return; + + switch ( exc->opcode ) +@@ -4680,7 +4618,7 @@ + /* Now skip the whole function definition. */ + /* We don't allow nested IDEFS & FDEFs. */ + +- while ( SKIP_Code() == SUCCESS ) ++ while ( SkipCode( exc ) == SUCCESS ) + { + + #ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING +@@ -4848,8 +4786,7 @@ + } + else + /* Loop through the current function */ +- INS_Goto_CodeRange( pRec->Caller_Range, +- pRec->Caller_IP ); ++ Ins_Goto_CodeRange( exc, pRec->Caller_Range, pRec->Caller_IP ); + + /* Exit the current call frame. */ + +@@ -4938,8 +4875,7 @@ + + exc->callTop++; + +- INS_Goto_CodeRange( def->range, +- def->start ); ++ Ins_Goto_CodeRange( exc, def->range, def->start ); + + exc->step_ins = FALSE; + +@@ -5026,7 +4962,7 @@ + + exc->callTop++; + +- INS_Goto_CodeRange( def->range, def->start ); ++ Ins_Goto_CodeRange( exc, def->range, def->start ); + + exc->step_ins = FALSE; + } +@@ -5089,7 +5025,7 @@ + /* Now skip the whole function definition. */ + /* We don't allow nested IDEFs & FDEFs. */ + +- while ( SKIP_Code() == SUCCESS ) ++ while ( SkipCode( exc ) == SUCCESS ) + { + switch ( exc->opcode ) + { +@@ -5163,7 +5099,7 @@ + exc->IP += 2; + + for ( K = 0; K < L; K++ ) +- args[K] = GET_ShortIns(); ++ args[K] = GetShortIns( exc ); + + exc->step_ins = FALSE; + exc->new_top += L; +@@ -5218,7 +5154,7 @@ + exc->IP++; + + for ( K = 0; K < L; K++ ) +- args[K] = GET_ShortIns(); ++ args[K] = GetShortIns( exc ); + + exc->step_ins = FALSE; + } +@@ -5260,9 +5196,9 @@ + else + { + if ( exc->opcode & 1 ) +- R = CUR_fast_dualproj( &exc->zp2.org[L] ); ++ R = fast_dualproj( &exc->zp2.org[L] ); + else +- R = CUR_fast_project( &exc->zp2.cur[L] ); ++ R = fast_project( &exc->zp2.cur[L] ); + } + + args[0] = R; +@@ -5295,9 +5231,9 @@ + return; + } + +- K = CUR_fast_project( &exc->zp2.cur[L] ); ++ K = fast_project( &exc->zp2.cur[L] ); + +- CUR_Func_move( &exc->zp2, L, args[1] - K ); ++ exc->func_move( exc, &exc->zp2, L, args[1] - K ); + + /* UNDOCUMENTED! The MS rasterizer does that with */ + /* twilight points (confirmed by Greg Hitchcock) */ +@@ -5341,7 +5277,7 @@ + else + { + if ( exc->opcode & 1 ) +- D = CUR_Func_project( exc->zp0.cur + L, exc->zp1.cur + K ); ++ D = project( exc->zp0.cur + L, exc->zp1.cur + K ); + else + { + /* XXX: UNDOCUMENTED: twilight zone special case */ +@@ -5352,7 +5288,7 @@ + FT_Vector* vec2 = exc->zp1.org + K; + + +- D = CUR_Func_dualproj( vec1, vec2 ); ++ D = dualproj( vec1, vec2 ); + } + else + { +@@ -5363,7 +5299,7 @@ + if ( exc->metrics.x_scale == exc->metrics.y_scale ) + { + /* this should be faster */ +- D = CUR_Func_dualproj( vec1, vec2 ); ++ D = dualproj( vec1, vec2 ); + D = FT_MulFix( D, exc->metrics.x_scale ); + } + else +@@ -5374,7 +5310,7 @@ + vec.x = FT_MulFix( vec1->x - vec2->x, exc->metrics.x_scale ); + vec.y = FT_MulFix( vec1->y - vec2->y, exc->metrics.y_scale ); + +- D = CUR_fast_dualproj( &vec ); ++ D = fast_dualproj( &vec ); + } + } + } +@@ -5443,7 +5379,7 @@ + A = -C; + } + +- NORMalize( A, B, &exc->GS.dualVector ); ++ Normalize( exc, A, B, &exc->GS.dualVector ); + + { + FT_Vector* v1 = exc->zp1.cur + p2; +@@ -5467,11 +5403,11 @@ + A = -C; + } + +- NORMalize( A, B, &exc->GS.projVector ); ++ Normalize( exc, A, B, &exc->GS.projVector ); + + GUESS_VECTOR( freeVector ); + +- COMPUTE_Funcs(); ++ Compute_Funcs( exc ); + } + + +@@ -5832,7 +5768,7 @@ + *zone = zp; + *refp = p; + +- d = CUR_Func_project( zp.cur + p, zp.org + p ); ++ d = project( zp.cur + p, zp.org + p ); + + #ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING + if ( exc->face->unpatented_hinting ) +@@ -5927,7 +5863,7 @@ + goto Fail; + } + +- if ( COMPUTE_Point_Displacement( &dx, &dy, &zp, &refp ) ) ++ if ( Compute_Point_Displacement( exc, &dx, &dy, &zp, &refp ) ) + return; + + while ( exc->GS.loop > 0 ) +@@ -5948,10 +5884,10 @@ + /* doesn't follow Cleartype spec but produces better result */ + if ( SUBPIXEL_HINTING && + exc->ignore_x_mode ) +- MOVE_Zp2_Point( point, 0, dy, TRUE ); ++ Move_Zp2_Point( exc, point, 0, dy, TRUE ); + else + #endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ +- MOVE_Zp2_Point( point, dx, dy, TRUE ); ++ Move_Zp2_Point( exc, point, dx, dy, TRUE ); + + exc->GS.loop--; + } +@@ -5993,7 +5929,7 @@ + return; + } + +- if ( COMPUTE_Point_Displacement( &dx, &dy, &zp, &refp ) ) ++ if ( Compute_Point_Displacement( exc, &dx, &dy, &zp, &refp ) ) + return; + + if ( contour == 0 ) +@@ -6012,7 +5948,7 @@ + for ( i = start; i < limit; i++ ) + { + if ( zp.cur != exc->zp2.cur || refp != i ) +- MOVE_Zp2_Point( i, dx, dy, TRUE ); ++ Move_Zp2_Point( exc, i, dx, dy, TRUE ); + } + } + +@@ -6041,7 +5977,7 @@ + return; + } + +- if ( COMPUTE_Point_Displacement( &dx, &dy, &zp, &refp ) ) ++ if ( Compute_Point_Displacement( exc, &dx, &dy, &zp, &refp ) ) + return; + + /* XXX: UNDOCUMENTED! SHZ doesn't move the phantom points. */ +@@ -6059,7 +5995,7 @@ + for ( i = 0; i < limit; i++ ) + { + if ( zp.cur != exc->zp2.cur || refp != i ) +- MOVE_Zp2_Point( i, dx, dy, FALSE ); ++ Move_Zp2_Point( exc, i, dx, dy, FALSE ); + } + } + +@@ -6145,7 +6081,7 @@ + if ( !exc->face->sph_compatibility_mode && + exc->GS.freeVector.y != 0 ) + { +- MOVE_Zp2_Point( point, dx, dy, TRUE ); ++ Move_Zp2_Point( exc, point, dx, dy, TRUE ); + + /* save new point */ + if ( exc->GS.freeVector.y != 0 ) +@@ -6157,7 +6093,7 @@ + ( B1 & 63 ) != 0 && + ( B2 & 63 ) != 0 && + B1 != B2 ) +- MOVE_Zp2_Point( point, -dx, -dy, TRUE ); ++ Move_Zp2_Point( exc, point, -dx, -dy, TRUE ); + } + } + else if ( exc->face->sph_compatibility_mode ) +@@ -6178,7 +6114,7 @@ + ( ( exc->is_composite && exc->GS.freeVector.y != 0 ) || + ( exc->zp2.tags[point] & FT_CURVE_TAG_TOUCH_Y ) || + ( exc->sph_tweak_flags & SPH_TWEAK_DO_SHPIX ) ) ) +- MOVE_Zp2_Point( point, 0, dy, TRUE ); ++ Move_Zp2_Point( exc, point, 0, dy, TRUE ); + + /* save new point */ + if ( exc->GS.freeVector.y != 0 ) +@@ -6189,21 +6125,21 @@ + if ( ( B1 & 63 ) == 0 && + ( B2 & 63 ) != 0 && + B1 != B2 ) +- MOVE_Zp2_Point( point, 0, -dy, TRUE ); ++ Move_Zp2_Point( exc, point, 0, -dy, TRUE ); + } + } + else if ( exc->sph_in_func_flags & SPH_FDEF_TYPEMAN_DIAGENDCTRL ) +- MOVE_Zp2_Point( point, dx, dy, TRUE ); ++ Move_Zp2_Point( exc, point, dx, dy, TRUE ); + } + else +- MOVE_Zp2_Point( point, dx, dy, TRUE ); ++ Move_Zp2_Point( exc, point, dx, dy, TRUE ); + } + + Skip: + + #else /* !TT_CONFIG_OPTION_SUBPIXEL_HINTING */ + +- MOVE_Zp2_Point( point, dx, dy, TRUE ); ++ Move_Zp2_Point( exc, point, dx, dy, TRUE ); + + #endif /* !TT_CONFIG_OPTION_SUBPIXEL_HINTING */ + +@@ -6259,12 +6195,11 @@ + if ( exc->GS.gep1 == 0 ) + { + exc->zp1.org[point] = exc->zp0.org[exc->GS.rp0]; +- CUR_Func_move_orig( &exc->zp1, point, args[1] ); ++ exc->func_move_orig( exc, &exc->zp1, point, args[1] ); + exc->zp1.cur[point] = exc->zp1.org[point]; + } + +- distance = CUR_Func_project( exc->zp1.cur + point, +- exc->zp0.cur + exc->GS.rp0 ); ++ distance = project( exc->zp1.cur + point, exc->zp0.cur + exc->GS.rp0 ); + + #ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING + /* subpixel hinting - make MSIRP respect CVT cut-in; */ +@@ -6275,7 +6210,7 @@ + distance = args[1]; + #endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ + +- CUR_Func_move( &exc->zp1, point, args[1] - distance ); ++ exc->func_move( exc, &exc->zp1, point, args[1] - distance ); + + exc->GS.rp1 = exc->GS.rp0; + exc->GS.rp2 = point; +@@ -6310,24 +6245,26 @@ + + if ( ( exc->opcode & 1 ) != 0 ) + { +- cur_dist = CUR_fast_project( &exc->zp0.cur[point] ); ++ cur_dist = fast_project( &exc->zp0.cur[point] ); + #ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING + if ( SUBPIXEL_HINTING && + exc->ignore_x_mode && + exc->GS.freeVector.x != 0 ) +- distance = ROUND_None( ++ distance = Round_None( ++ exc, + cur_dist, + exc->tt_metrics.compensations[0] ) - cur_dist; + else + #endif +- distance = CUR_Func_round( ++ distance = exc->func_round( ++ exc, + cur_dist, + exc->tt_metrics.compensations[0] ) - cur_dist; + } + else + distance = 0; + +- CUR_Func_move( &exc->zp0, point, distance ); ++ exc->func_move( exc, &exc->zp0, point, distance ); + + exc->GS.rp0 = point; + exc->GS.rp1 = point; +@@ -6391,7 +6328,7 @@ + /* */ + /* Confirmed by Greg Hitchcock. */ + +- distance = CUR_Func_read_cvt( cvtEntry ); ++ distance = exc->func_read_cvt( exc, cvtEntry ); + + if ( exc->GS.gep0 == 0 ) /* If in twilight zone */ + { +@@ -6417,7 +6354,7 @@ + distance = 0; + #endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ + +- org_dist = CUR_fast_project( &exc->zp0.cur[point] ); ++ org_dist = fast_project( &exc->zp0.cur[point] ); + + if ( ( exc->opcode & 1 ) != 0 ) /* rounding and control cut-in flag */ + { +@@ -6428,15 +6365,17 @@ + if ( SUBPIXEL_HINTING && + exc->ignore_x_mode && + exc->GS.freeVector.x != 0 ) +- distance = ROUND_None( distance, ++ distance = Round_None( exc, ++ distance, + exc->tt_metrics.compensations[0] ); + else + #endif +- distance = CUR_Func_round( distance, +- exc->tt_metrics.compensations[0] ); ++ distance = exc->func_round( exc, ++ distance, ++ exc->tt_metrics.compensations[0] ); + } + +- CUR_Func_move( &exc->zp0, point, distance - org_dist ); ++ exc->func_move( exc, &exc->zp0, point, distance - org_dist ); + + Fail: + exc->GS.rp0 = point; +@@ -6488,7 +6427,7 @@ + FT_Vector* vec2 = &exc->zp0.org[exc->GS.rp0]; + + +- org_dist = CUR_Func_dualproj( vec1, vec2 ); ++ org_dist = dualproj( vec1, vec2 ); + } + else + { +@@ -6499,7 +6438,7 @@ + if ( exc->metrics.x_scale == exc->metrics.y_scale ) + { + /* this should be faster */ +- org_dist = CUR_Func_dualproj( vec1, vec2 ); ++ org_dist = dualproj( vec1, vec2 ); + org_dist = FT_MulFix( org_dist, exc->metrics.x_scale ); + } + else +@@ -6510,7 +6449,7 @@ + vec.x = FT_MulFix( vec1->x - vec2->x, exc->metrics.x_scale ); + vec.y = FT_MulFix( vec1->y - vec2->y, exc->metrics.y_scale ); + +- org_dist = CUR_fast_dualproj( &vec ); ++ org_dist = fast_dualproj( &vec ); + } + } + +@@ -6533,17 +6472,20 @@ + if ( SUBPIXEL_HINTING && + exc->ignore_x_mode && + exc->GS.freeVector.x != 0 ) +- distance = ROUND_None( ++ distance = Round_None( ++ exc, + org_dist, + exc->tt_metrics.compensations[exc->opcode & 3] ); + else + #endif +- distance = CUR_Func_round( +- org_dist, +- exc->tt_metrics.compensations[exc->opcode & 3] ); ++ distance = exc->func_round( ++ exc, ++ org_dist, ++ exc->tt_metrics.compensations[exc->opcode & 3] ); + } + else +- distance = ROUND_None( ++ distance = Round_None( ++ exc, + org_dist, + exc->tt_metrics.compensations[exc->opcode & 3] ); + +@@ -6565,10 +6507,9 @@ + + /* now move the point */ + +- org_dist = CUR_Func_project( exc->zp1.cur + point, +- exc->zp0.cur + exc->GS.rp0 ); ++ org_dist = project( exc->zp1.cur + point, exc->zp0.cur + exc->GS.rp0 ); + +- CUR_Func_move( &exc->zp1, point, distance - org_dist ); ++ exc->func_move( exc, &exc->zp1, point, distance - org_dist ); + + Fail: + exc->GS.rp1 = exc->GS.rp0; +@@ -6631,7 +6572,7 @@ + if ( !cvtEntry ) + cvt_dist = 0; + else +- cvt_dist = CUR_Func_read_cvt( cvtEntry - 1 ); ++ cvt_dist = exc->func_read_cvt( exc, cvtEntry - 1 ); + + /* single width test */ + +@@ -6657,10 +6598,8 @@ + exc->zp1.cur[point] = exc->zp1.org[point]; + } + +- org_dist = CUR_Func_dualproj( &exc->zp1.org[point], +- &exc->zp0.org[exc->GS.rp0] ); +- cur_dist = CUR_Func_project ( &exc->zp1.cur[point], +- &exc->zp0.cur[exc->GS.rp0] ); ++ org_dist = dualproj( &exc->zp1.org[point], &exc->zp0.org[exc->GS.rp0] ); ++ cur_dist = project ( &exc->zp1.cur[point], &exc->zp0.cur[exc->GS.rp0] ); + + /* auto-flip test */ + +@@ -6708,7 +6647,8 @@ + cvt_dist = org_dist; + } + +- distance = CUR_Func_round( ++ distance = exc->func_round( ++ exc, + cvt_dist, + exc->tt_metrics.compensations[exc->opcode & 3] ); + } +@@ -6726,7 +6666,8 @@ + } + #endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ + +- distance = ROUND_None( ++ distance = Round_None( ++ exc, + cvt_dist, + exc->tt_metrics.compensations[exc->opcode & 3] ); + } +@@ -6767,7 +6708,7 @@ + } + #endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ + +- CUR_Func_move( &exc->zp1, point, distance - cur_dist ); ++ exc->func_move( exc, &exc->zp1, point, distance - cur_dist ); + + #ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING + if ( SUBPIXEL_HINTING ) +@@ -6791,7 +6732,7 @@ + } + + if ( reverse_move ) +- CUR_Func_move( &exc->zp1, point, -( distance - cur_dist ) ); ++ exc->func_move( exc, &exc->zp1, point, -( distance - cur_dist ) ); + } + + #endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ +@@ -6856,10 +6797,10 @@ + } + else + { +- distance = CUR_Func_project( exc->zp1.cur + point, +- exc->zp0.cur + exc->GS.rp0 ); ++ distance = project( exc->zp1.cur + point, ++ exc->zp0.cur + exc->GS.rp0 ); + +- CUR_Func_move( &exc->zp1, point, -distance ); ++ exc->func_move( exc, &exc->zp1, point, -distance ); + } + + exc->GS.loop--; +@@ -6989,11 +6930,10 @@ + return; + } + +- distance = CUR_Func_project( exc->zp0.cur + p2, +- exc->zp1.cur + p1 ) / 2; ++ distance = project( exc->zp0.cur + p2, exc->zp1.cur + p1 ) / 2; + +- CUR_Func_move( &exc->zp1, p1, distance ); +- CUR_Func_move( &exc->zp0, p2, -distance ); ++ exc->func_move( exc, &exc->zp1, p1, distance ); ++ exc->func_move( exc, &exc->zp0, p2, -distance ); + } + + +@@ -7058,11 +6998,9 @@ + else + { + if ( twilight ) +- old_range = CUR_Func_dualproj( &exc->zp1.org[exc->GS.rp2], +- orus_base ); ++ old_range = dualproj( &exc->zp1.org[exc->GS.rp2], orus_base ); + else if ( exc->metrics.x_scale == exc->metrics.y_scale ) +- old_range = CUR_Func_dualproj( &exc->zp1.orus[exc->GS.rp2], +- orus_base ); ++ old_range = dualproj( &exc->zp1.orus[exc->GS.rp2], orus_base ); + else + { + FT_Vector vec; +@@ -7073,10 +7011,10 @@ + vec.y = FT_MulFix( exc->zp1.orus[exc->GS.rp2].y - orus_base->y, + exc->metrics.y_scale ); + +- old_range = CUR_fast_dualproj( &vec ); ++ old_range = fast_dualproj( &vec ); + } + +- cur_range = CUR_Func_project ( &exc->zp1.cur[exc->GS.rp2], cur_base ); ++ cur_range = project( &exc->zp1.cur[exc->GS.rp2], cur_base ); + } + + for ( ; exc->GS.loop > 0; --exc->GS.loop ) +@@ -7097,9 +7035,9 @@ + } + + if ( twilight ) +- org_dist = CUR_Func_dualproj( &exc->zp2.org[point], orus_base ); ++ org_dist = dualproj( &exc->zp2.org[point], orus_base ); + else if ( exc->metrics.x_scale == exc->metrics.y_scale ) +- org_dist = CUR_Func_dualproj( &exc->zp2.orus[point], orus_base ); ++ org_dist = dualproj( &exc->zp2.orus[point], orus_base ); + else + { + FT_Vector vec; +@@ -7110,10 +7048,10 @@ + vec.y = FT_MulFix( exc->zp2.orus[point].y - orus_base->y, + exc->metrics.y_scale ); + +- org_dist = CUR_fast_dualproj( &vec ); ++ org_dist = fast_dualproj( &vec ); + } + +- cur_dist = CUR_Func_project( &exc->zp2.cur[point], cur_base ); ++ cur_dist = project( &exc->zp2.cur[point], cur_base ); + + if ( org_dist ) + { +@@ -7143,7 +7081,10 @@ + else + new_dist = 0; + +- CUR_Func_move( &exc->zp2, (FT_UShort)point, new_dist - cur_dist ); ++ exc->func_move( exc, ++ &exc->zp2, ++ (FT_UShort)point, ++ new_dist - cur_dist ); + } + + Fail: +@@ -7470,7 +7411,7 @@ + } + #endif + +- P = (FT_ULong)CUR_Func_cur_ppem(); ++ P = (FT_ULong)exc->func_cur_ppem( exc ); + nump = (FT_ULong)args[0]; /* some points theoretically may occur more + than once, thus UShort isn't enough */ + +@@ -7537,7 +7478,7 @@ + if ( !exc->ignore_x_mode || + ( exc->sph_tweak_flags & SPH_TWEAK_ALWAYS_DO_DELTAP ) || + ( exc->is_composite && exc->GS.freeVector.y != 0 ) ) +- CUR_Func_move( &exc->zp0, A, B ); ++ exc->func_move( exc, &exc->zp0, A, B ); + + /* Otherwise, apply subpixel hinting and compatibility mode */ + /* rules, always skipping deltas in subpixel direction. */ +@@ -7550,7 +7491,7 @@ + /* points. This messes up DejaVu ... */ + if ( !exc->face->sph_compatibility_mode && + ( exc->zp0.tags[A] & FT_CURVE_TAG_TOUCH_Y ) ) +- CUR_Func_move( &exc->zp0, A, B ); ++ exc->func_move( exc, &exc->zp0, A, B ); + + /* compatibility mode */ + else if ( exc->face->sph_compatibility_mode && +@@ -7563,7 +7504,7 @@ + /* IUP has not been called, and point is touched on Y. */ + if ( !exc->iup_called && + ( exc->zp0.tags[A] & FT_CURVE_TAG_TOUCH_Y ) ) +- CUR_Func_move( &exc->zp0, A, B ); ++ exc->func_move( exc, &exc->zp0, A, B ); + } + + B2 = (FT_UShort)exc->zp0.cur[A].y; +@@ -7577,13 +7518,13 @@ + SPH_TWEAK_SKIP_NONPIXEL_Y_MOVES_DELTAP ) && + ( B1 & 63 ) != 0 && + ( B2 & 63 ) != 0 ) ) ) +- CUR_Func_move( &exc->zp0, A, -B ); ++ exc->func_move( exc, &exc->zp0, A, -B ); + } + } + else + #endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ + +- CUR_Func_move( &exc->zp0, A, B ); ++ exc->func_move( exc, &exc->zp0, A, B ); + } + } + else +@@ -7630,7 +7571,7 @@ + } + #endif + +- P = (FT_ULong)CUR_Func_cur_ppem(); ++ P = (FT_ULong)exc->func_cur_ppem( exc ); + nump = (FT_ULong)args[0]; + + for ( k = 1; k <= nump; k++ ) +@@ -7683,7 +7624,7 @@ + B++; + B *= 1L << ( 6 - exc->GS.delta_shift ); + +- CUR_Func_move_cvt( A, B ); ++ exc->func_move_cvt( exc, A, B ); + } + } + } +@@ -7850,7 +7791,7 @@ + call->Cur_Count = 1; + call->Def = def; + +- INS_Goto_CodeRange( def->range, def->start ); ++ Ins_Goto_CodeRange( exc, def->range, def->start ); + + exc->step_ins = FALSE; + return; +@@ -8224,8 +8165,8 @@ + exc->func_move_cvt = Move_CVT; + } + +- COMPUTE_Funcs(); +- COMPUTE_Round( (FT_Byte)exc->GS.round_state ); ++ Compute_Funcs( exc ); ++ Compute_Round( exc, (FT_Byte)exc->GS.round_state ); + + do + { +@@ -8361,7 +8302,7 @@ + GUESS_VECTOR( freeVector ); + } + +- COMPUTE_Funcs(); ++ Compute_Funcs( exc ); + } + break; + +@@ -8904,7 +8845,9 @@ + callrec->Cur_Count = 1; + callrec->Def = def; + +- if ( INS_Goto_CodeRange( def->range, def->start ) == FAILURE ) ++ if ( Ins_Goto_CodeRange( exc, ++ def->range, ++ def->start ) == FAILURE ) + goto LErrorLabel_; + + goto LSuiteLabel_; +-- +2.2.2 + +From 6cc1f123aa7294b5fbf0af3696d941b1f55a216b Mon Sep 17 00:00:00 2001 +From: Werner Lemberg <wl@gnu.org> +Date: Sat, 10 Jan 2015 21:56:59 +0100 +Subject: [PATCH] [truetype] More macro expansions. + +* src/truetype/ttinterp.c, src/truetype/ttinterp.h (EXEC_ARG_, +EXEC_ARG): Remove by replacing with expansion. +--- + ChangeLog | 7 ++++ + src/truetype/ttinterp.c | 104 ++++++++++++++++++++++++------------------------ + src/truetype/ttinterp.h | 4 -- + 3 files changed, 59 insertions(+), 56 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index a271e5a..3401b17 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -2,6 +2,13 @@ + + [truetype] More macro expansions. + ++ * src/truetype/ttinterp.c, src/truetype/ttinterp.h (EXEC_ARG_, ++ EXEC_ARG): Remove by replacing with expansion. ++ ++2015-01-10 Werner Lemberg <wl@gnu.org> ++ ++ [truetype] More macro expansions. ++ + Based on a patch from Behdad. + + * src/truetype/ttinterp.c (SKIP_Code, GET_ShortIns, NORMalize, +diff --git a/src/truetype/ttinterp.c b/src/truetype/ttinterp.c +index 1c5e98a..a845a9a 100644 +--- a/src/truetype/ttinterp.c ++++ b/src/truetype/ttinterp.c +@@ -8337,7 +8337,7 @@ + break; + + case 0x0F: /* ISECT */ +- Ins_ISECT( EXEC_ARG_ args ); ++ Ins_ISECT( exc, args ); + break; + + case 0x10: /* SRP0 */ +@@ -8353,19 +8353,19 @@ + break; + + case 0x13: /* SZP0 */ +- Ins_SZP0( EXEC_ARG_ args ); ++ Ins_SZP0( exc, args ); + break; + + case 0x14: /* SZP1 */ +- Ins_SZP1( EXEC_ARG_ args ); ++ Ins_SZP1( exc, args ); + break; + + case 0x15: /* SZP2 */ +- Ins_SZP2( EXEC_ARG_ args ); ++ Ins_SZP2( exc, args ); + break; + + case 0x16: /* SZPS */ +- Ins_SZPS( EXEC_ARG_ args ); ++ Ins_SZPS( exc, args ); + break; + + case 0x17: /* SLOOP */ +@@ -8385,7 +8385,7 @@ + break; + + case 0x1B: /* ELSE */ +- Ins_ELSE( EXEC_ARG_ args ); ++ Ins_ELSE( exc, args ); + break; + + case 0x1C: /* JMPR */ +@@ -8429,77 +8429,77 @@ + break; + + case 0x26: /* MINDEX */ +- Ins_MINDEX( EXEC_ARG_ args ); ++ Ins_MINDEX( exc, args ); + break; + + case 0x27: /* ALIGNPTS */ +- Ins_ALIGNPTS( EXEC_ARG_ args ); ++ Ins_ALIGNPTS( exc, args ); + break; + + case 0x28: /* ???? */ +- Ins_UNKNOWN( EXEC_ARG_ args ); ++ Ins_UNKNOWN( exc, args ); + break; + + case 0x29: /* UTP */ +- Ins_UTP( EXEC_ARG_ args ); ++ Ins_UTP( exc, args ); + break; + + case 0x2A: /* LOOPCALL */ +- Ins_LOOPCALL( EXEC_ARG_ args ); ++ Ins_LOOPCALL( exc, args ); + break; + + case 0x2B: /* CALL */ +- Ins_CALL( EXEC_ARG_ args ); ++ Ins_CALL( exc, args ); + break; + + case 0x2C: /* FDEF */ +- Ins_FDEF( EXEC_ARG_ args ); ++ Ins_FDEF( exc, args ); + break; + + case 0x2D: /* ENDF */ +- Ins_ENDF( EXEC_ARG_ args ); ++ Ins_ENDF( exc, args ); + break; + + case 0x2E: /* MDAP */ + case 0x2F: /* MDAP */ +- Ins_MDAP( EXEC_ARG_ args ); ++ Ins_MDAP( exc, args ); + break; + + case 0x30: /* IUP */ + case 0x31: /* IUP */ +- Ins_IUP( EXEC_ARG_ args ); ++ Ins_IUP( exc, args ); + break; + + case 0x32: /* SHP */ + case 0x33: /* SHP */ +- Ins_SHP( EXEC_ARG_ args ); ++ Ins_SHP( exc, args ); + break; + + case 0x34: /* SHC */ + case 0x35: /* SHC */ +- Ins_SHC( EXEC_ARG_ args ); ++ Ins_SHC( exc, args ); + break; + + case 0x36: /* SHZ */ + case 0x37: /* SHZ */ +- Ins_SHZ( EXEC_ARG_ args ); ++ Ins_SHZ( exc, args ); + break; + + case 0x38: /* SHPIX */ +- Ins_SHPIX( EXEC_ARG_ args ); ++ Ins_SHPIX( exc, args ); + break; + + case 0x39: /* IP */ +- Ins_IP( EXEC_ARG_ args ); ++ Ins_IP( exc, args ); + break; + + case 0x3A: /* MSIRP */ + case 0x3B: /* MSIRP */ +- Ins_MSIRP( EXEC_ARG_ args ); ++ Ins_MSIRP( exc, args ); + break; + + case 0x3C: /* AlignRP */ +- Ins_ALIGNRP( EXEC_ARG_ args ); ++ Ins_ALIGNRP( exc, args ); + break; + + case 0x3D: /* RTDG */ +@@ -8508,15 +8508,15 @@ + + case 0x3E: /* MIAP */ + case 0x3F: /* MIAP */ +- Ins_MIAP( EXEC_ARG_ args ); ++ Ins_MIAP( exc, args ); + break; + + case 0x40: /* NPUSHB */ +- Ins_NPUSHB( EXEC_ARG_ args ); ++ Ins_NPUSHB( exc, args ); + break; + + case 0x41: /* NPUSHW */ +- Ins_NPUSHW( EXEC_ARG_ args ); ++ Ins_NPUSHW( exc, args ); + break; + + case 0x42: /* WS */ +@@ -8541,16 +8541,16 @@ + + case 0x46: /* GC */ + case 0x47: /* GC */ +- Ins_GC( EXEC_ARG_ args ); ++ Ins_GC( exc, args ); + break; + + case 0x48: /* SCFS */ +- Ins_SCFS( EXEC_ARG_ args ); ++ Ins_SCFS( exc, args ); + break; + + case 0x49: /* MD */ + case 0x4A: /* MD */ +- Ins_MD( EXEC_ARG_ args ); ++ Ins_MD( exc, args ); + break; + + case 0x4B: /* MPPEM */ +@@ -8606,7 +8606,7 @@ + break; + + case 0x58: /* IF */ +- Ins_IF( EXEC_ARG_ args ); ++ Ins_IF( exc, args ); + break; + + case 0x59: /* EIF */ +@@ -8626,7 +8626,7 @@ + break; + + case 0x5D: /* DELTAP1 */ +- Ins_DELTAP( EXEC_ARG_ args ); ++ Ins_DELTAP( exc, args ); + break; + + case 0x5E: /* SDB */ +@@ -8689,13 +8689,13 @@ + + case 0x71: /* DELTAP2 */ + case 0x72: /* DELTAP3 */ +- Ins_DELTAP( EXEC_ARG_ args ); ++ Ins_DELTAP( exc, args ); + break; + + case 0x73: /* DELTAC0 */ + case 0x74: /* DELTAC1 */ + case 0x75: /* DELTAC2 */ +- Ins_DELTAC( EXEC_ARG_ args ); ++ Ins_DELTAC( exc, args ); + break; + + case 0x76: /* SROUND */ +@@ -8719,7 +8719,7 @@ + break; + + case 0x7B: /* ???? */ +- Ins_UNKNOWN( EXEC_ARG_ args ); ++ Ins_UNKNOWN( exc, args ); + break; + + case 0x7C: /* RUTG */ +@@ -8736,41 +8736,41 @@ + break; + + case 0x80: /* FLIPPT */ +- Ins_FLIPPT( EXEC_ARG_ args ); ++ Ins_FLIPPT( exc, args ); + break; + + case 0x81: /* FLIPRGON */ +- Ins_FLIPRGON( EXEC_ARG_ args ); ++ Ins_FLIPRGON( exc, args ); + break; + + case 0x82: /* FLIPRGOFF */ +- Ins_FLIPRGOFF( EXEC_ARG_ args ); ++ Ins_FLIPRGOFF( exc, args ); + break; + + case 0x83: /* UNKNOWN */ + case 0x84: /* UNKNOWN */ +- Ins_UNKNOWN( EXEC_ARG_ args ); ++ Ins_UNKNOWN( exc, args ); + break; + + case 0x85: /* SCANCTRL */ +- Ins_SCANCTRL( EXEC_ARG_ args ); ++ Ins_SCANCTRL( exc, args ); + break; + + case 0x86: /* SDPVTL */ + case 0x87: /* SDPVTL */ +- Ins_SDPVTL( EXEC_ARG_ args ); ++ Ins_SDPVTL( exc, args ); + break; + + case 0x88: /* GETINFO */ +- Ins_GETINFO( EXEC_ARG_ args ); ++ Ins_GETINFO( exc, args ); + break; + + case 0x89: /* IDEF */ +- Ins_IDEF( EXEC_ARG_ args ); ++ Ins_IDEF( exc, args ); + break; + + case 0x8A: /* ROLL */ +- Ins_ROLL( EXEC_ARG_ args ); ++ Ins_ROLL( exc, args ); + break; + + case 0x8B: /* MAX */ +@@ -8782,35 +8782,35 @@ + break; + + case 0x8D: /* SCANTYPE */ +- Ins_SCANTYPE( EXEC_ARG_ args ); ++ Ins_SCANTYPE( exc, args ); + break; + + case 0x8E: /* INSTCTRL */ +- Ins_INSTCTRL( EXEC_ARG_ args ); ++ Ins_INSTCTRL( exc, args ); + break; + + case 0x8F: +- Ins_UNKNOWN( EXEC_ARG_ args ); ++ Ins_UNKNOWN( exc, args ); + break; + + default: + if ( opcode >= 0xE0 ) +- Ins_MIRP( EXEC_ARG_ args ); ++ Ins_MIRP( exc, args ); + else if ( opcode >= 0xC0 ) +- Ins_MDRP( EXEC_ARG_ args ); ++ Ins_MDRP( exc, args ); + else if ( opcode >= 0xB8 ) +- Ins_PUSHW( EXEC_ARG_ args ); ++ Ins_PUSHW( exc, args ); + else if ( opcode >= 0xB0 ) +- Ins_PUSHB( EXEC_ARG_ args ); ++ Ins_PUSHB( exc, args ); + else +- Ins_UNKNOWN( EXEC_ARG_ args ); ++ Ins_UNKNOWN( exc, args ); + } + + } + + #else + +- Instruct_Dispatch[exc->opcode]( EXEC_ARG_ &exc->stack[exc->args] ); ++ Instruct_Dispatch[exc->opcode]( exc, &exc->stack[exc->args] ); + + #endif /* TT_CONFIG_OPTION_INTERPRETER_SWITCH */ + +diff --git a/src/truetype/ttinterp.h b/src/truetype/ttinterp.h +index 50f1acd..2893c56 100644 +--- a/src/truetype/ttinterp.h ++++ b/src/truetype/ttinterp.h +@@ -26,10 +26,6 @@ + FT_BEGIN_HEADER + + +-#define EXEC_ARG_ exc, +-#define EXEC_ARG exc +- +- + /*************************************************************************/ + /* */ + /* Rounding mode constants. */ +-- +2.2.2 + +From 01be130d7383d0b7c9c88979a0d0f940a6261e79 Mon Sep 17 00:00:00 2001 +From: Werner Lemberg <wl@gnu.org> +Date: Sat, 10 Jan 2015 23:05:37 +0100 +Subject: [PATCH] [truetype] Remove TT_CONFIG_OPTION_INTERPRETER_SWITCH. + +Behdad suggested this code simplification, and nobody objected... + +* include/config/ftoption.h, devel/ftoption.h +(TT_CONFIG_OPTION_INTERPRETER_SWITCH): Remove. + +* src/truetype/ttinterp.c [TT_CONFIG_OPTION_INTERPRETER_SWITCH]: +Remove related code. +(ARRAY_BOUND_ERROR): Use do-while loop. +--- + ChangeLog | 13 ++ + devel/ftoption.h | 13 -- + include/config/ftoption.h | 13 -- + src/truetype/ttinterp.c | 324 +--------------------------------------------- + 4 files changed, 16 insertions(+), 347 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index 3401b17..16f9924 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,5 +1,18 @@ + 2015-01-10 Werner Lemberg <wl@gnu.org> + ++ [truetype] Remove TT_CONFIG_OPTION_INTERPRETER_SWITCH. ++ ++ Behdad suggested this code simplification, and nobody objected... ++ ++ * include/config/ftoption.h, devel/ftoption.h ++ (TT_CONFIG_OPTION_INTERPRETER_SWITCH): Remove. ++ ++ * src/truetype/ttinterp.c [TT_CONFIG_OPTION_INTERPRETER_SWITCH]: ++ Remove related code. ++ (ARRAY_BOUND_ERROR): Use do-while loop. ++ ++2015-01-10 Werner Lemberg <wl@gnu.org> ++ + [truetype] More macro expansions. + + * src/truetype/ttinterp.c, src/truetype/ttinterp.h (EXEC_ARG_, +diff --git a/devel/ftoption.h b/devel/ftoption.h +index 10027bb..5984601 100644 +--- a/devel/ftoption.h ++++ b/devel/ftoption.h +@@ -659,19 +659,6 @@ FT_BEGIN_HEADER + + /*************************************************************************/ + /* */ +- /* Define TT_CONFIG_OPTION_INTERPRETER_SWITCH to compile the TrueType */ +- /* bytecode interpreter with a huge switch statement, rather than a call */ +- /* table. This results in smaller and faster code for a number of */ +- /* architectures. */ +- /* */ +- /* Note however that on some compiler/processor combinations, undefining */ +- /* this macro will generate faster, though larger, code. */ +- /* */ +-#define TT_CONFIG_OPTION_INTERPRETER_SWITCH +- +- +- /*************************************************************************/ +- /* */ + /* Define TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED to compile the */ + /* TrueType glyph loader to use Apple's definition of how to handle */ + /* component offsets in composite glyphs. */ +diff --git a/include/config/ftoption.h b/include/config/ftoption.h +index 2b0b67e..a40e88c 100644 +--- a/include/config/ftoption.h ++++ b/include/config/ftoption.h +@@ -659,19 +659,6 @@ FT_BEGIN_HEADER + + /*************************************************************************/ + /* */ +- /* Define TT_CONFIG_OPTION_INTERPRETER_SWITCH to compile the TrueType */ +- /* bytecode interpreter with a huge switch statement, rather than a call */ +- /* table. This results in smaller and faster code for a number of */ +- /* architectures. */ +- /* */ +- /* Note however that on some compiler/processor combinations, undefining */ +- /* this macro will generate faster, though larger, code. */ +- /* */ +-#define TT_CONFIG_OPTION_INTERPRETER_SWITCH +- +- +- /*************************************************************************/ +- /* */ + /* Define TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED to compile the */ + /* TrueType glyph loader to use Apple's definition of how to handle */ + /* component offsets in composite glyphs. */ +diff --git a/src/truetype/ttinterp.c b/src/truetype/ttinterp.c +index a845a9a..6c6f8e8 100644 +--- a/src/truetype/ttinterp.c ++++ b/src/truetype/ttinterp.c +@@ -3194,9 +3194,7 @@ + if ( BOUNDSL( I, exc->storeSize ) ) \ + { \ + if ( exc->pedantic_hinting ) \ +- { \ + ARRAY_BOUND_ERROR; \ +- } \ + else \ + args[0] = 0; \ + } \ +@@ -3215,9 +3213,7 @@ + if ( BOUNDSL( I, exc->storeSize ) ) \ + { \ + if ( exc->pedantic_hinting ) \ +- { \ + ARRAY_BOUND_ERROR; \ +- } \ + } \ + else \ + exc->storage[I] = args[1]; \ +@@ -3232,9 +3228,7 @@ + if ( BOUNDSL( I, exc->cvtSize ) ) \ + { \ + if ( exc->pedantic_hinting ) \ +- { \ + ARRAY_BOUND_ERROR; \ +- } \ + else \ + args[0] = 0; \ + } \ +@@ -3251,9 +3245,7 @@ + if ( BOUNDSL( I, exc->cvtSize ) ) \ + { \ + if ( exc->pedantic_hinting ) \ +- { \ + ARRAY_BOUND_ERROR; \ +- } \ + } \ + else \ + exc->func_write_cvt( exc, I, args[1] ); \ +@@ -3268,9 +3260,7 @@ + if ( BOUNDSL( I, exc->cvtSize ) ) \ + { \ + if ( exc->pedantic_hinting ) \ +- { \ + ARRAY_BOUND_ERROR; \ +- } \ + } \ + else \ + exc->cvt[I] = FT_MulFix( args[1], exc->tt_metrics.scale ); \ +@@ -3304,15 +3294,12 @@ + args[0] = args[1]; + + +-#ifndef TT_CONFIG_OPTION_INTERPRETER_SWITCH +- +- +-#undef ARRAY_BOUND_ERROR + #define ARRAY_BOUND_ERROR \ ++ do \ + { \ + exc->error = FT_THROW( Invalid_Reference ); \ + return; \ +- } ++ } while (0) + + + /*************************************************************************/ +@@ -4263,16 +4250,6 @@ + } + + +-#endif /* !TT_CONFIG_OPTION_INTERPRETER_SWITCH */ +- +- +- /*************************************************************************/ +- /* */ +- /* The following functions are called as is within the switch statement. */ +- /* */ +- /*************************************************************************/ +- +- + /*************************************************************************/ + /* */ + /* MINDEX[]: Move INDEXed element */ +@@ -7802,292 +7779,6 @@ + } + + +-#ifndef TT_CONFIG_OPTION_INTERPRETER_SWITCH +- +- +- static +- TInstruction_Function Instruct_Dispatch[256] = +- { +- /* Opcodes are gathered in groups of 16. */ +- /* Please keep the spaces as they are. */ +- +- /* SVTCA y */ Ins_SVTCA, +- /* SVTCA x */ Ins_SVTCA, +- /* SPvTCA y */ Ins_SPVTCA, +- /* SPvTCA x */ Ins_SPVTCA, +- /* SFvTCA y */ Ins_SFVTCA, +- /* SFvTCA x */ Ins_SFVTCA, +- /* SPvTL // */ Ins_SPVTL, +- /* SPvTL + */ Ins_SPVTL, +- /* SFvTL // */ Ins_SFVTL, +- /* SFvTL + */ Ins_SFVTL, +- /* SPvFS */ Ins_SPVFS, +- /* SFvFS */ Ins_SFVFS, +- /* GPV */ Ins_GPV, +- /* GFV */ Ins_GFV, +- /* SFvTPv */ Ins_SFVTPV, +- /* ISECT */ Ins_ISECT, +- +- /* SRP0 */ Ins_SRP0, +- /* SRP1 */ Ins_SRP1, +- /* SRP2 */ Ins_SRP2, +- /* SZP0 */ Ins_SZP0, +- /* SZP1 */ Ins_SZP1, +- /* SZP2 */ Ins_SZP2, +- /* SZPS */ Ins_SZPS, +- /* SLOOP */ Ins_SLOOP, +- /* RTG */ Ins_RTG, +- /* RTHG */ Ins_RTHG, +- /* SMD */ Ins_SMD, +- /* ELSE */ Ins_ELSE, +- /* JMPR */ Ins_JMPR, +- /* SCvTCi */ Ins_SCVTCI, +- /* SSwCi */ Ins_SSWCI, +- /* SSW */ Ins_SSW, +- +- /* DUP */ Ins_DUP, +- /* POP */ Ins_POP, +- /* CLEAR */ Ins_CLEAR, +- /* SWAP */ Ins_SWAP, +- /* DEPTH */ Ins_DEPTH, +- /* CINDEX */ Ins_CINDEX, +- /* MINDEX */ Ins_MINDEX, +- /* AlignPTS */ Ins_ALIGNPTS, +- /* INS_0x28 */ Ins_UNKNOWN, +- /* UTP */ Ins_UTP, +- /* LOOPCALL */ Ins_LOOPCALL, +- /* CALL */ Ins_CALL, +- /* FDEF */ Ins_FDEF, +- /* ENDF */ Ins_ENDF, +- /* MDAP[0] */ Ins_MDAP, +- /* MDAP[1] */ Ins_MDAP, +- +- /* IUP[0] */ Ins_IUP, +- /* IUP[1] */ Ins_IUP, +- /* SHP[0] */ Ins_SHP, +- /* SHP[1] */ Ins_SHP, +- /* SHC[0] */ Ins_SHC, +- /* SHC[1] */ Ins_SHC, +- /* SHZ[0] */ Ins_SHZ, +- /* SHZ[1] */ Ins_SHZ, +- /* SHPIX */ Ins_SHPIX, +- /* IP */ Ins_IP, +- /* MSIRP[0] */ Ins_MSIRP, +- /* MSIRP[1] */ Ins_MSIRP, +- /* AlignRP */ Ins_ALIGNRP, +- /* RTDG */ Ins_RTDG, +- /* MIAP[0] */ Ins_MIAP, +- /* MIAP[1] */ Ins_MIAP, +- +- /* NPushB */ Ins_NPUSHB, +- /* NPushW */ Ins_NPUSHW, +- /* WS */ Ins_WS, +- /* RS */ Ins_RS, +- /* WCvtP */ Ins_WCVTP, +- /* RCvt */ Ins_RCVT, +- /* GC[0] */ Ins_GC, +- /* GC[1] */ Ins_GC, +- /* SCFS */ Ins_SCFS, +- /* MD[0] */ Ins_MD, +- /* MD[1] */ Ins_MD, +- /* MPPEM */ Ins_MPPEM, +- /* MPS */ Ins_MPS, +- /* FlipON */ Ins_FLIPON, +- /* FlipOFF */ Ins_FLIPOFF, +- /* DEBUG */ Ins_DEBUG, +- +- /* LT */ Ins_LT, +- /* LTEQ */ Ins_LTEQ, +- /* GT */ Ins_GT, +- /* GTEQ */ Ins_GTEQ, +- /* EQ */ Ins_EQ, +- /* NEQ */ Ins_NEQ, +- /* ODD */ Ins_ODD, +- /* EVEN */ Ins_EVEN, +- /* IF */ Ins_IF, +- /* EIF */ Ins_EIF, +- /* AND */ Ins_AND, +- /* OR */ Ins_OR, +- /* NOT */ Ins_NOT, +- /* DeltaP1 */ Ins_DELTAP, +- /* SDB */ Ins_SDB, +- /* SDS */ Ins_SDS, +- +- /* ADD */ Ins_ADD, +- /* SUB */ Ins_SUB, +- /* DIV */ Ins_DIV, +- /* MUL */ Ins_MUL, +- /* ABS */ Ins_ABS, +- /* NEG */ Ins_NEG, +- /* FLOOR */ Ins_FLOOR, +- /* CEILING */ Ins_CEILING, +- /* ROUND[0] */ Ins_ROUND, +- /* ROUND[1] */ Ins_ROUND, +- /* ROUND[2] */ Ins_ROUND, +- /* ROUND[3] */ Ins_ROUND, +- /* NROUND[0] */ Ins_NROUND, +- /* NROUND[1] */ Ins_NROUND, +- /* NROUND[2] */ Ins_NROUND, +- /* NROUND[3] */ Ins_NROUND, +- +- /* WCvtF */ Ins_WCVTF, +- /* DeltaP2 */ Ins_DELTAP, +- /* DeltaP3 */ Ins_DELTAP, +- /* DeltaCn[0] */ Ins_DELTAC, +- /* DeltaCn[1] */ Ins_DELTAC, +- /* DeltaCn[2] */ Ins_DELTAC, +- /* SROUND */ Ins_SROUND, +- /* S45Round */ Ins_S45ROUND, +- /* JROT */ Ins_JROT, +- /* JROF */ Ins_JROF, +- /* ROFF */ Ins_ROFF, +- /* INS_0x7B */ Ins_UNKNOWN, +- /* RUTG */ Ins_RUTG, +- /* RDTG */ Ins_RDTG, +- /* SANGW */ Ins_SANGW, +- /* AA */ Ins_AA, +- +- /* FlipPT */ Ins_FLIPPT, +- /* FlipRgON */ Ins_FLIPRGON, +- /* FlipRgOFF */ Ins_FLIPRGOFF, +- /* INS_0x83 */ Ins_UNKNOWN, +- /* INS_0x84 */ Ins_UNKNOWN, +- /* ScanCTRL */ Ins_SCANCTRL, +- /* SDPVTL[0] */ Ins_SDPVTL, +- /* SDPVTL[1] */ Ins_SDPVTL, +- /* GetINFO */ Ins_GETINFO, +- /* IDEF */ Ins_IDEF, +- /* ROLL */ Ins_ROLL, +- /* MAX */ Ins_MAX, +- /* MIN */ Ins_MIN, +- /* ScanTYPE */ Ins_SCANTYPE, +- /* InstCTRL */ Ins_INSTCTRL, +- /* INS_0x8F */ Ins_UNKNOWN, +- +- /* INS_0x90 */ Ins_UNKNOWN, +- /* INS_0x91 */ Ins_UNKNOWN, +- /* INS_0x92 */ Ins_UNKNOWN, +- /* INS_0x93 */ Ins_UNKNOWN, +- /* INS_0x94 */ Ins_UNKNOWN, +- /* INS_0x95 */ Ins_UNKNOWN, +- /* INS_0x96 */ Ins_UNKNOWN, +- /* INS_0x97 */ Ins_UNKNOWN, +- /* INS_0x98 */ Ins_UNKNOWN, +- /* INS_0x99 */ Ins_UNKNOWN, +- /* INS_0x9A */ Ins_UNKNOWN, +- /* INS_0x9B */ Ins_UNKNOWN, +- /* INS_0x9C */ Ins_UNKNOWN, +- /* INS_0x9D */ Ins_UNKNOWN, +- /* INS_0x9E */ Ins_UNKNOWN, +- /* INS_0x9F */ Ins_UNKNOWN, +- +- /* INS_0xA0 */ Ins_UNKNOWN, +- /* INS_0xA1 */ Ins_UNKNOWN, +- /* INS_0xA2 */ Ins_UNKNOWN, +- /* INS_0xA3 */ Ins_UNKNOWN, +- /* INS_0xA4 */ Ins_UNKNOWN, +- /* INS_0xA5 */ Ins_UNKNOWN, +- /* INS_0xA6 */ Ins_UNKNOWN, +- /* INS_0xA7 */ Ins_UNKNOWN, +- /* INS_0xA8 */ Ins_UNKNOWN, +- /* INS_0xA9 */ Ins_UNKNOWN, +- /* INS_0xAA */ Ins_UNKNOWN, +- /* INS_0xAB */ Ins_UNKNOWN, +- /* INS_0xAC */ Ins_UNKNOWN, +- /* INS_0xAD */ Ins_UNKNOWN, +- /* INS_0xAE */ Ins_UNKNOWN, +- /* INS_0xAF */ Ins_UNKNOWN, +- +- /* PushB[0] */ Ins_PUSHB, +- /* PushB[1] */ Ins_PUSHB, +- /* PushB[2] */ Ins_PUSHB, +- /* PushB[3] */ Ins_PUSHB, +- /* PushB[4] */ Ins_PUSHB, +- /* PushB[5] */ Ins_PUSHB, +- /* PushB[6] */ Ins_PUSHB, +- /* PushB[7] */ Ins_PUSHB, +- /* PushW[0] */ Ins_PUSHW, +- /* PushW[1] */ Ins_PUSHW, +- /* PushW[2] */ Ins_PUSHW, +- /* PushW[3] */ Ins_PUSHW, +- /* PushW[4] */ Ins_PUSHW, +- /* PushW[5] */ Ins_PUSHW, +- /* PushW[6] */ Ins_PUSHW, +- /* PushW[7] */ Ins_PUSHW, +- +- /* MDRP[00] */ Ins_MDRP, +- /* MDRP[01] */ Ins_MDRP, +- /* MDRP[02] */ Ins_MDRP, +- /* MDRP[03] */ Ins_MDRP, +- /* MDRP[04] */ Ins_MDRP, +- /* MDRP[05] */ Ins_MDRP, +- /* MDRP[06] */ Ins_MDRP, +- /* MDRP[07] */ Ins_MDRP, +- /* MDRP[08] */ Ins_MDRP, +- /* MDRP[09] */ Ins_MDRP, +- /* MDRP[10] */ Ins_MDRP, +- /* MDRP[11] */ Ins_MDRP, +- /* MDRP[12] */ Ins_MDRP, +- /* MDRP[13] */ Ins_MDRP, +- /* MDRP[14] */ Ins_MDRP, +- /* MDRP[15] */ Ins_MDRP, +- +- /* MDRP[16] */ Ins_MDRP, +- /* MDRP[17] */ Ins_MDRP, +- /* MDRP[18] */ Ins_MDRP, +- /* MDRP[19] */ Ins_MDRP, +- /* MDRP[20] */ Ins_MDRP, +- /* MDRP[21] */ Ins_MDRP, +- /* MDRP[22] */ Ins_MDRP, +- /* MDRP[23] */ Ins_MDRP, +- /* MDRP[24] */ Ins_MDRP, +- /* MDRP[25] */ Ins_MDRP, +- /* MDRP[26] */ Ins_MDRP, +- /* MDRP[27] */ Ins_MDRP, +- /* MDRP[28] */ Ins_MDRP, +- /* MDRP[29] */ Ins_MDRP, +- /* MDRP[30] */ Ins_MDRP, +- /* MDRP[31] */ Ins_MDRP, +- +- /* MIRP[00] */ Ins_MIRP, +- /* MIRP[01] */ Ins_MIRP, +- /* MIRP[02] */ Ins_MIRP, +- /* MIRP[03] */ Ins_MIRP, +- /* MIRP[04] */ Ins_MIRP, +- /* MIRP[05] */ Ins_MIRP, +- /* MIRP[06] */ Ins_MIRP, +- /* MIRP[07] */ Ins_MIRP, +- /* MIRP[08] */ Ins_MIRP, +- /* MIRP[09] */ Ins_MIRP, +- /* MIRP[10] */ Ins_MIRP, +- /* MIRP[11] */ Ins_MIRP, +- /* MIRP[12] */ Ins_MIRP, +- /* MIRP[13] */ Ins_MIRP, +- /* MIRP[14] */ Ins_MIRP, +- /* MIRP[15] */ Ins_MIRP, +- +- /* MIRP[16] */ Ins_MIRP, +- /* MIRP[17] */ Ins_MIRP, +- /* MIRP[18] */ Ins_MIRP, +- /* MIRP[19] */ Ins_MIRP, +- /* MIRP[20] */ Ins_MIRP, +- /* MIRP[21] */ Ins_MIRP, +- /* MIRP[22] */ Ins_MIRP, +- /* MIRP[23] */ Ins_MIRP, +- /* MIRP[24] */ Ins_MIRP, +- /* MIRP[25] */ Ins_MIRP, +- /* MIRP[26] */ Ins_MIRP, +- /* MIRP[27] */ Ins_MIRP, +- /* MIRP[28] */ Ins_MIRP, +- /* MIRP[29] */ Ins_MIRP, +- /* MIRP[30] */ Ins_MIRP, +- /* MIRP[31] */ Ins_MIRP +- }; +- +- +-#endif /* !TT_CONFIG_OPTION_INTERPRETER_SWITCH */ +- +- + /*************************************************************************/ + /* */ + /* RUN */ +@@ -8253,8 +7944,6 @@ + + #endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ + +-#ifdef TT_CONFIG_OPTION_INTERPRETER_SWITCH +- + { + FT_Long* args = exc->stack + exc->args; + FT_Byte opcode = exc->opcode; +@@ -8524,7 +8213,7 @@ + break; + + Set_Invalid_Ref: +- exc->error = FT_THROW( Invalid_Reference ); ++ exc->error = FT_THROW( Invalid_Reference ); + break; + + case 0x43: /* RS */ +@@ -8805,15 +8494,8 @@ + else + Ins_UNKNOWN( exc, args ); + } +- + } + +-#else +- +- Instruct_Dispatch[exc->opcode]( exc, &exc->stack[exc->args] ); +- +-#endif /* TT_CONFIG_OPTION_INTERPRETER_SWITCH */ +- + if ( exc->error ) + { + switch ( exc->error ) +-- +2.2.2 + +From eb3413684f9e2a114cd38ab0d49a5d56f52752b2 Mon Sep 17 00:00:00 2001 +From: Werner Lemberg <wl@gnu.org> +Date: Sun, 11 Jan 2015 00:23:27 +0100 +Subject: [PATCH] [truetype] More macro expansions. + +Based on a patch from Behdad. + +* src/truetype/ttinterp.c (DO_*): Expand macros into corresponding +`Ins_*' functions. +(TT_RunIns): Replace `DO_*' macros with `Ins_*' function calls. +(ARRAY_BOUND_ERROR): Remove second definition, which is no longer +needed. +(Ins_SVTCA, Ins_SPVTCA, Ins_SFVTCA): Replaced with... +(Ins_SxyTCA): New function. +--- + ChangeLog | 14 + + src/truetype/ttinterp.c | 1202 ++++++++++++++++------------------------------- + 2 files changed, 425 insertions(+), 791 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index 16f9924..3ca03df 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,5 +1,19 @@ + 2015-01-10 Werner Lemberg <wl@gnu.org> + ++ [truetype] More macro expansions. ++ ++ Based on a patch from Behdad. ++ ++ * src/truetype/ttinterp.c (DO_*): Expand macros into corresponding ++ `Ins_*' functions. ++ (TT_RunIns): Replace `DO_*' macros with `Ins_*' function calls. ++ (ARRAY_BOUND_ERROR): Remove second definition, which is no longer ++ needed. ++ (Ins_SVTCA, Ins_SPVTCA, Ins_SFVTCA): Replaced with... ++ (Ins_SxyTCA): New function. ++ ++2015-01-10 Werner Lemberg <wl@gnu.org> ++ + [truetype] Remove TT_CONFIG_OPTION_INTERPRETER_SWITCH. + + Behdad suggested this code simplification, and nobody objected... +diff --git a/src/truetype/ttinterp.c b/src/truetype/ttinterp.c +index 6c6f8e8..c666049 100644 +--- a/src/truetype/ttinterp.c ++++ b/src/truetype/ttinterp.c +@@ -2699,601 +2699,6 @@ + } + + +- /* When not using the big switch statements, the interpreter uses a */ +- /* call table defined later below in this source. Each opcode must */ +- /* thus have a corresponding function, even trivial ones. */ +- /* */ +- /* They are all defined there. */ +- +-#define DO_SVTCA \ +- { \ +- FT_Short A, B; \ +- \ +- \ +- A = (FT_Short)( exc->opcode & 1 ) << 14; \ +- B = A ^ (FT_Short)0x4000; \ +- \ +- exc->GS.freeVector.x = A; \ +- exc->GS.projVector.x = A; \ +- exc->GS.dualVector.x = A; \ +- \ +- exc->GS.freeVector.y = B; \ +- exc->GS.projVector.y = B; \ +- exc->GS.dualVector.y = B; \ +- \ +- Compute_Funcs( exc ); \ +- } +- +- +-#define DO_SPVTCA \ +- { \ +- FT_Short A, B; \ +- \ +- \ +- A = (FT_Short)( exc->opcode & 1 ) << 14; \ +- B = A ^ (FT_Short)0x4000; \ +- \ +- exc->GS.projVector.x = A; \ +- exc->GS.dualVector.x = A; \ +- \ +- exc->GS.projVector.y = B; \ +- exc->GS.dualVector.y = B; \ +- \ +- GUESS_VECTOR( freeVector ); \ +- \ +- Compute_Funcs( exc ); \ +- } +- +- +-#define DO_SFVTCA \ +- { \ +- FT_Short A, B; \ +- \ +- \ +- A = (FT_Short)( exc->opcode & 1 ) << 14; \ +- B = A ^ (FT_Short)0x4000; \ +- \ +- exc->GS.freeVector.x = A; \ +- exc->GS.freeVector.y = B; \ +- \ +- GUESS_VECTOR( projVector ); \ +- \ +- Compute_Funcs( exc ); \ +- } +- +- +-#define DO_SPVTL \ +- if ( Ins_SxVTL( exc, \ +- (FT_UShort)args[1], \ +- (FT_UShort)args[0], \ +- exc->opcode, \ +- &exc->GS.projVector ) == SUCCESS ) \ +- { \ +- exc->GS.dualVector = exc->GS.projVector; \ +- GUESS_VECTOR( freeVector ); \ +- Compute_Funcs( exc ); \ +- } +- +- +-#define DO_SFVTL \ +- if ( Ins_SxVTL( exc, \ +- (FT_UShort)args[1], \ +- (FT_UShort)args[0], \ +- exc->opcode, \ +- &exc->GS.freeVector ) == SUCCESS ) \ +- { \ +- GUESS_VECTOR( projVector ); \ +- Compute_Funcs( exc ); \ +- } +- +- +-#define DO_SFVTPV \ +- GUESS_VECTOR( projVector ); \ +- exc->GS.freeVector = exc->GS.projVector; \ +- Compute_Funcs( exc ); +- +- +-#define DO_SPVFS \ +- { \ +- FT_Short S; \ +- FT_Long X, Y; \ +- \ +- \ +- /* Only use low 16bits, then sign extend */ \ +- S = (FT_Short)args[1]; \ +- Y = (FT_Long)S; \ +- S = (FT_Short)args[0]; \ +- X = (FT_Long)S; \ +- \ +- Normalize( exc, X, Y, &exc->GS.projVector ); \ +- \ +- exc->GS.dualVector = exc->GS.projVector; \ +- GUESS_VECTOR( freeVector ); \ +- Compute_Funcs( exc ); \ +- } +- +- +-#define DO_SFVFS \ +- { \ +- FT_Short S; \ +- FT_Long X, Y; \ +- \ +- \ +- /* Only use low 16bits, then sign extend */ \ +- S = (FT_Short)args[1]; \ +- Y = (FT_Long)S; \ +- S = (FT_Short)args[0]; \ +- X = S; \ +- \ +- Normalize( exc, X, Y, &exc->GS.freeVector ); \ +- GUESS_VECTOR( projVector ); \ +- Compute_Funcs( exc ); \ +- } +- +- +-#ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING +-#define DO_GPV \ +- if ( exc->face->unpatented_hinting ) \ +- { \ +- args[0] = exc->GS.both_x_axis ? 0x4000 : 0; \ +- args[1] = exc->GS.both_x_axis ? 0 : 0x4000; \ +- } \ +- else \ +- { \ +- args[0] = exc->GS.projVector.x; \ +- args[1] = exc->GS.projVector.y; \ +- } +-#else +-#define DO_GPV \ +- args[0] = exc->GS.projVector.x; \ +- args[1] = exc->GS.projVector.y; +-#endif +- +- +-#ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING +-#define DO_GFV \ +- if ( exc->face->unpatented_hinting ) \ +- { \ +- args[0] = exc->GS.both_x_axis ? 0x4000 : 0; \ +- args[1] = exc->GS.both_x_axis ? 0 : 0x4000; \ +- } \ +- else \ +- { \ +- args[0] = exc->GS.freeVector.x; \ +- args[1] = exc->GS.freeVector.y; \ +- } +-#else +-#define DO_GFV \ +- args[0] = exc->GS.freeVector.x; \ +- args[1] = exc->GS.freeVector.y; +-#endif +- +- +-#define DO_SRP0 \ +- exc->GS.rp0 = (FT_UShort)args[0]; +- +- +-#define DO_SRP1 \ +- exc->GS.rp1 = (FT_UShort)args[0]; +- +- +-#define DO_SRP2 \ +- exc->GS.rp2 = (FT_UShort)args[0]; +- +- +-#define DO_RTHG \ +- exc->GS.round_state = TT_Round_To_Half_Grid; \ +- exc->func_round = (TT_Round_Func)Round_To_Half_Grid; +- +- +-#define DO_RTG \ +- exc->GS.round_state = TT_Round_To_Grid; \ +- exc->func_round = (TT_Round_Func)Round_To_Grid; +- +- +-#define DO_RTDG \ +- exc->GS.round_state = TT_Round_To_Double_Grid; \ +- exc->func_round = (TT_Round_Func)Round_To_Double_Grid; +- +- +-#define DO_RUTG \ +- exc->GS.round_state = TT_Round_Up_To_Grid; \ +- exc->func_round = (TT_Round_Func)Round_Up_To_Grid; +- +- +-#define DO_RDTG \ +- exc->GS.round_state = TT_Round_Down_To_Grid; \ +- exc->func_round = (TT_Round_Func)Round_Down_To_Grid; +- +- +-#define DO_ROFF \ +- exc->GS.round_state = TT_Round_Off; \ +- exc->func_round = (TT_Round_Func)Round_None; +- +- +-#define DO_SROUND \ +- SetSuperRound( exc, 0x4000, args[0] ); \ +- exc->GS.round_state = TT_Round_Super; \ +- exc->func_round = (TT_Round_Func)Round_Super; +- +- +-#define DO_S45ROUND \ +- SetSuperRound( exc, 0x2D41, args[0] ); \ +- exc->GS.round_state = TT_Round_Super_45; \ +- exc->func_round = (TT_Round_Func)Round_Super_45; +- +- +-#define DO_SLOOP \ +- if ( args[0] < 0 ) \ +- exc->error = FT_THROW( Bad_Argument ); \ +- else \ +- exc->GS.loop = args[0]; +- +- +-#define DO_SMD \ +- exc->GS.minimum_distance = args[0]; +- +- +-#define DO_SCVTCI \ +- exc->GS.control_value_cutin = (FT_F26Dot6)args[0]; +- +- +-#define DO_SSWCI \ +- exc->GS.single_width_cutin = (FT_F26Dot6)args[0]; +- +- +-#define DO_SSW \ +- exc->GS.single_width_value = FT_MulFix( args[0], \ +- exc->tt_metrics.scale ); +- +- +-#define DO_FLIPON \ +- exc->GS.auto_flip = TRUE; +- +- +-#define DO_FLIPOFF \ +- exc->GS.auto_flip = FALSE; +- +- +-#define DO_SDB \ +- exc->GS.delta_base = (FT_UShort)args[0]; +- +- +-#define DO_SDS \ +- if ( (FT_ULong)args[0] > 6UL ) \ +- exc->error = FT_THROW( Bad_Argument ); \ +- else \ +- exc->GS.delta_shift = (FT_UShort)args[0]; +- +- +-#define DO_MD /* nothing */ +- +- +-#define DO_MPPEM \ +- args[0] = exc->func_cur_ppem( exc ); +- +- +- /* Note: The pointSize should be irrelevant in a given font program; */ +- /* we thus decide to return only the ppem. */ +-#if 0 +- +-#define DO_MPS \ +- args[0] = exc->metrics.pointSize; +- +-#else +- +-#define DO_MPS \ +- args[0] = exc->func_cur_ppem( exc ); +- +-#endif /* 0 */ +- +- +-#define DO_DUP \ +- args[1] = args[0]; +- +- +-#define DO_CLEAR \ +- exc->new_top = 0; +- +- +-#define DO_SWAP \ +- { \ +- FT_Long L; \ +- \ +- \ +- L = args[0]; \ +- args[0] = args[1]; \ +- args[1] = L; \ +- } +- +- +-#define DO_DEPTH \ +- args[0] = exc->top; +- +- +-#define DO_CINDEX \ +- { \ +- FT_Long L; \ +- \ +- \ +- L = args[0]; \ +- \ +- if ( L <= 0 || L > exc->args ) \ +- { \ +- if ( exc->pedantic_hinting ) \ +- exc->error = FT_THROW( Invalid_Reference ); \ +- args[0] = 0; \ +- } \ +- else \ +- args[0] = exc->stack[exc->args - L]; \ +- } +- +- +-#define DO_JROT \ +- if ( args[1] != 0 ) \ +- { \ +- if ( args[0] == 0 && exc->args == 0 ) \ +- exc->error = FT_THROW( Bad_Argument ); \ +- exc->IP += args[0]; \ +- if ( exc->IP < 0 || \ +- ( exc->callTop > 0 && \ +- exc->IP > exc->callStack[exc->callTop - 1].Def->end ) ) \ +- exc->error = FT_THROW( Bad_Argument ); \ +- exc->step_ins = FALSE; \ +- } +- +- +-#define DO_JMPR \ +- if ( args[0] == 0 && exc->args == 0 ) \ +- exc->error = FT_THROW( Bad_Argument ); \ +- exc->IP += args[0]; \ +- if ( exc->IP < 0 || \ +- ( exc->callTop > 0 && \ +- exc->IP > exc->callStack[exc->callTop - 1].Def->end ) ) \ +- exc->error = FT_THROW( Bad_Argument ); \ +- exc->step_ins = FALSE; +- +- +-#define DO_JROF \ +- if ( args[1] == 0 ) \ +- { \ +- if ( args[0] == 0 && exc->args == 0 ) \ +- exc->error = FT_THROW( Bad_Argument ); \ +- exc->IP += args[0]; \ +- if ( exc->IP < 0 || \ +- ( exc->callTop > 0 && \ +- exc->IP > exc->callStack[exc->callTop - 1].Def->end ) ) \ +- exc->error = FT_THROW( Bad_Argument ); \ +- exc->step_ins = FALSE; \ +- } +- +- +-#define DO_LT \ +- args[0] = ( args[0] < args[1] ); +- +- +-#define DO_LTEQ \ +- args[0] = ( args[0] <= args[1] ); +- +- +-#define DO_GT \ +- args[0] = ( args[0] > args[1] ); +- +- +-#define DO_GTEQ \ +- args[0] = ( args[0] >= args[1] ); +- +- +-#define DO_EQ \ +- args[0] = ( args[0] == args[1] ); +- +- +-#define DO_NEQ \ +- args[0] = ( args[0] != args[1] ); +- +- +-#define DO_ODD \ +- args[0] = ( ( exc->func_round( exc, args[0], 0 ) & 127 ) == 64 ); +- +- +-#define DO_EVEN \ +- args[0] = ( ( exc->func_round( exc, args[0], 0 ) & 127 ) == 0 ); +- +- +-#define DO_AND \ +- args[0] = ( args[0] && args[1] ); +- +- +-#define DO_OR \ +- args[0] = ( args[0] || args[1] ); +- +- +-#define DO_NOT \ +- args[0] = !args[0]; +- +- +-#define DO_ADD \ +- args[0] += args[1]; +- +- +-#define DO_SUB \ +- args[0] -= args[1]; +- +- +-#define DO_DIV \ +- if ( args[1] == 0 ) \ +- exc->error = FT_THROW( Divide_By_Zero ); \ +- else \ +- args[0] = FT_MulDiv_No_Round( args[0], 64L, args[1] ); +- +- +-#define DO_MUL \ +- args[0] = FT_MulDiv( args[0], args[1], 64L ); +- +- +-#define DO_ABS \ +- args[0] = FT_ABS( args[0] ); +- +- +-#define DO_NEG \ +- args[0] = -args[0]; +- +- +-#define DO_FLOOR \ +- args[0] = FT_PIX_FLOOR( args[0] ); +- +- +-#define DO_CEILING \ +- args[0] = FT_PIX_CEIL( args[0] ); +- +-#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING +- +-#define DO_RS \ +- { \ +- FT_ULong I = (FT_ULong)args[0]; \ +- \ +- \ +- if ( BOUNDSL( I, exc->storeSize ) ) \ +- { \ +- if ( exc->pedantic_hinting ) \ +- ARRAY_BOUND_ERROR; \ +- else \ +- args[0] = 0; \ +- } \ +- else \ +- { \ +- /* subpixel hinting - avoid Typeman Dstroke and */ \ +- /* IStroke and Vacuform rounds */ \ +- \ +- if ( SUBPIXEL_HINTING && \ +- exc->ignore_x_mode && \ +- ( ( I == 24 && \ +- ( exc->face->sph_found_func_flags & \ +- ( SPH_FDEF_SPACING_1 | \ +- SPH_FDEF_SPACING_2 ) ) ) || \ +- ( I == 22 && \ +- ( exc->sph_in_func_flags & \ +- SPH_FDEF_TYPEMAN_STROKES ) ) || \ +- ( I == 8 && \ +- ( exc->face->sph_found_func_flags & \ +- SPH_FDEF_VACUFORM_ROUND_1 ) && \ +- exc->iup_called ) ) ) \ +- args[0] = 0; \ +- else \ +- args[0] = exc->storage[I]; \ +- } \ +- } +- +-#else /* !TT_CONFIG_OPTION_SUBPIXEL_HINTING */ +- +-#define DO_RS \ +- { \ +- FT_ULong I = (FT_ULong)args[0]; \ +- \ +- \ +- if ( BOUNDSL( I, exc->storeSize ) ) \ +- { \ +- if ( exc->pedantic_hinting ) \ +- ARRAY_BOUND_ERROR; \ +- else \ +- args[0] = 0; \ +- } \ +- else \ +- args[0] = exc->storage[I]; \ +- } +- +-#endif /* !TT_CONFIG_OPTION_SUBPIXEL_HINTING */ +- +- +-#define DO_WS \ +- { \ +- FT_ULong I = (FT_ULong)args[0]; \ +- \ +- \ +- if ( BOUNDSL( I, exc->storeSize ) ) \ +- { \ +- if ( exc->pedantic_hinting ) \ +- ARRAY_BOUND_ERROR; \ +- } \ +- else \ +- exc->storage[I] = args[1]; \ +- } +- +- +-#define DO_RCVT \ +- { \ +- FT_ULong I = (FT_ULong)args[0]; \ +- \ +- \ +- if ( BOUNDSL( I, exc->cvtSize ) ) \ +- { \ +- if ( exc->pedantic_hinting ) \ +- ARRAY_BOUND_ERROR; \ +- else \ +- args[0] = 0; \ +- } \ +- else \ +- args[0] = exc->func_read_cvt( exc, I ); \ +- } +- +- +-#define DO_WCVTP \ +- { \ +- FT_ULong I = (FT_ULong)args[0]; \ +- \ +- \ +- if ( BOUNDSL( I, exc->cvtSize ) ) \ +- { \ +- if ( exc->pedantic_hinting ) \ +- ARRAY_BOUND_ERROR; \ +- } \ +- else \ +- exc->func_write_cvt( exc, I, args[1] ); \ +- } +- +- +-#define DO_WCVTF \ +- { \ +- FT_ULong I = (FT_ULong)args[0]; \ +- \ +- \ +- if ( BOUNDSL( I, exc->cvtSize ) ) \ +- { \ +- if ( exc->pedantic_hinting ) \ +- ARRAY_BOUND_ERROR; \ +- } \ +- else \ +- exc->cvt[I] = FT_MulFix( args[1], exc->tt_metrics.scale ); \ +- } +- +- +-#define DO_DEBUG \ +- exc->error = FT_THROW( Debug_OpCode ); +- +- +-#define DO_ROUND \ +- args[0] = exc->func_round( \ +- exc, \ +- args[0], \ +- exc->tt_metrics.compensations[exc->opcode - 0x68] ); +- +- +-#define DO_NROUND \ +- args[0] = Round_None( exc, \ +- args[0], \ +- exc->tt_metrics.compensations[exc->opcode - 0x6C] ); +- +- +-#define DO_MAX \ +- if ( args[1] > args[0] ) \ +- args[0] = args[1]; +- +- +-#define DO_MIN \ +- if ( args[1] < args[0] ) \ +- args[0] = args[1]; +- +- + #define ARRAY_BOUND_ERROR \ + do \ + { \ +@@ -3308,36 +2713,48 @@ + /* Opcode range: 0x00-0x01 */ + /* Stack: --> */ + /* */ +- static void +- Ins_SVTCA( INS_ARG ) +- { +- DO_SVTCA +- } +- +- +- /*************************************************************************/ +- /* */ + /* SPVTCA[a]: Set PVector to Coordinate Axis */ + /* Opcode range: 0x02-0x03 */ + /* Stack: --> */ + /* */ +- static void +- Ins_SPVTCA( INS_ARG ) +- { +- DO_SPVTCA +- } +- +- +- /*************************************************************************/ +- /* */ + /* SFVTCA[a]: Set FVector to Coordinate Axis */ + /* Opcode range: 0x04-0x05 */ + /* Stack: --> */ + /* */ + static void +- Ins_SFVTCA( INS_ARG ) ++ Ins_SxyTCA( INS_ARG ) + { +- DO_SFVTCA ++ FT_Short AA, BB; ++ FT_Byte opcode = exc->opcode; ++ ++ ++ AA = (FT_Short)( ( opcode & 1 ) << 14 ); ++ BB = (FT_Short)( AA ^ 0x4000 ); ++ ++ if ( opcode < 4 ) ++ { ++ exc->GS.projVector.x = AA; ++ exc->GS.projVector.y = BB; ++ ++ exc->GS.dualVector.x = AA; ++ exc->GS.dualVector.y = BB; ++ } ++ else ++ { ++ GUESS_VECTOR( projVector ); ++ } ++ ++ if ( ( opcode & 2 ) == 0 ) ++ { ++ exc->GS.freeVector.x = AA; ++ exc->GS.freeVector.y = BB; ++ } ++ else ++ { ++ GUESS_VECTOR( freeVector ); ++ } ++ ++ Compute_Funcs( exc ); + } + + +@@ -3350,7 +2767,16 @@ + static void + Ins_SPVTL( INS_ARG ) + { +- DO_SPVTL ++ if ( Ins_SxVTL( exc, ++ (FT_UShort)args[1], ++ (FT_UShort)args[0], ++ exc->opcode, ++ &exc->GS.projVector ) == SUCCESS ) ++ { ++ exc->GS.dualVector = exc->GS.projVector; ++ GUESS_VECTOR( freeVector ); ++ Compute_Funcs( exc ); ++ } + } + + +@@ -3363,7 +2789,15 @@ + static void + Ins_SFVTL( INS_ARG ) + { +- DO_SFVTL ++ if ( Ins_SxVTL( exc, ++ (FT_UShort)args[1], ++ (FT_UShort)args[0], ++ exc->opcode, ++ &exc->GS.freeVector ) == SUCCESS ) ++ { ++ GUESS_VECTOR( projVector ); ++ Compute_Funcs( exc ); ++ } + } + + +@@ -3376,7 +2810,9 @@ + static void + Ins_SFVTPV( INS_ARG ) + { +- DO_SFVTPV ++ GUESS_VECTOR( projVector ); ++ exc->GS.freeVector = exc->GS.projVector; ++ Compute_Funcs( exc ); + } + + +@@ -3389,7 +2825,21 @@ + static void + Ins_SPVFS( INS_ARG ) + { +- DO_SPVFS ++ FT_Short S; ++ FT_Long X, Y; ++ ++ ++ /* Only use low 16bits, then sign extend */ ++ S = (FT_Short)args[1]; ++ Y = (FT_Long)S; ++ S = (FT_Short)args[0]; ++ X = (FT_Long)S; ++ ++ Normalize( exc, X, Y, &exc->GS.projVector ); ++ ++ exc->GS.dualVector = exc->GS.projVector; ++ GUESS_VECTOR( freeVector ); ++ Compute_Funcs( exc ); + } + + +@@ -3402,7 +2852,19 @@ + static void + Ins_SFVFS( INS_ARG ) + { +- DO_SFVFS ++ FT_Short S; ++ FT_Long X, Y; ++ ++ ++ /* Only use low 16bits, then sign extend */ ++ S = (FT_Short)args[1]; ++ Y = (FT_Long)S; ++ S = (FT_Short)args[0]; ++ X = S; ++ ++ Normalize( exc, X, Y, &exc->GS.freeVector ); ++ GUESS_VECTOR( projVector ); ++ Compute_Funcs( exc ); + } + + +@@ -3415,7 +2877,21 @@ + static void + Ins_GPV( INS_ARG ) + { +- DO_GPV ++#ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING ++ if ( exc->face->unpatented_hinting ) ++ { ++ args[0] = exc->GS.both_x_axis ? 0x4000 : 0; ++ args[1] = exc->GS.both_x_axis ? 0 : 0x4000; ++ } ++ else ++ { ++ args[0] = exc->GS.projVector.x; ++ args[1] = exc->GS.projVector.y; ++ } ++#else ++ args[0] = exc->GS.projVector.x; ++ args[1] = exc->GS.projVector.y; ++#endif + } + + +@@ -3427,7 +2903,21 @@ + static void + Ins_GFV( INS_ARG ) + { +- DO_GFV ++#ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING ++ if ( exc->face->unpatented_hinting ) ++ { ++ args[0] = exc->GS.both_x_axis ? 0x4000 : 0; ++ args[1] = exc->GS.both_x_axis ? 0 : 0x4000; ++ } ++ else ++ { ++ args[0] = exc->GS.freeVector.x; ++ args[1] = exc->GS.freeVector.y; ++ } ++#else ++ args[0] = exc->GS.freeVector.x; ++ args[1] = exc->GS.freeVector.y; ++#endif + } + + +@@ -3440,7 +2930,7 @@ + static void + Ins_SRP0( INS_ARG ) + { +- DO_SRP0 ++ exc->GS.rp0 = (FT_UShort)args[0]; + } + + +@@ -3453,7 +2943,7 @@ + static void + Ins_SRP1( INS_ARG ) + { +- DO_SRP1 ++ exc->GS.rp1 = (FT_UShort)args[0]; + } + + +@@ -3466,7 +2956,7 @@ + static void + Ins_SRP2( INS_ARG ) + { +- DO_SRP2 ++ exc->GS.rp2 = (FT_UShort)args[0]; + } + + +@@ -3479,7 +2969,8 @@ + static void + Ins_RTHG( INS_ARG ) + { +- DO_RTHG ++ exc->GS.round_state = TT_Round_To_Half_Grid; ++ exc->func_round = (TT_Round_Func)Round_To_Half_Grid; + } + + +@@ -3492,7 +2983,8 @@ + static void + Ins_RTG( INS_ARG ) + { +- DO_RTG ++ exc->GS.round_state = TT_Round_To_Grid; ++ exc->func_round = (TT_Round_Func)Round_To_Grid; + } + + +@@ -3504,7 +2996,8 @@ + static void + Ins_RTDG( INS_ARG ) + { +- DO_RTDG ++ exc->GS.round_state = TT_Round_To_Double_Grid; ++ exc->func_round = (TT_Round_Func)Round_To_Double_Grid; + } + + +@@ -3516,7 +3009,8 @@ + static void + Ins_RUTG( INS_ARG ) + { +- DO_RUTG ++ exc->GS.round_state = TT_Round_Up_To_Grid; ++ exc->func_round = (TT_Round_Func)Round_Up_To_Grid; + } + + +@@ -3529,7 +3023,8 @@ + static void + Ins_RDTG( INS_ARG ) + { +- DO_RDTG ++ exc->GS.round_state = TT_Round_Down_To_Grid; ++ exc->func_round = (TT_Round_Func)Round_Down_To_Grid; + } + + +@@ -3542,7 +3037,8 @@ + static void + Ins_ROFF( INS_ARG ) + { +- DO_ROFF ++ exc->GS.round_state = TT_Round_Off; ++ exc->func_round = (TT_Round_Func)Round_None; + } + + +@@ -3555,7 +3051,10 @@ + static void + Ins_SROUND( INS_ARG ) + { +- DO_SROUND ++ SetSuperRound( exc, 0x4000, args[0] ); ++ ++ exc->GS.round_state = TT_Round_Super; ++ exc->func_round = (TT_Round_Func)Round_Super; + } + + +@@ -3568,7 +3067,10 @@ + static void + Ins_S45ROUND( INS_ARG ) + { +- DO_S45ROUND ++ SetSuperRound( exc, 0x2D41, args[0] ); ++ ++ exc->GS.round_state = TT_Round_Super_45; ++ exc->func_round = (TT_Round_Func)Round_Super_45; + } + + +@@ -3581,7 +3083,10 @@ + static void + Ins_SLOOP( INS_ARG ) + { +- DO_SLOOP ++ if ( args[0] < 0 ) ++ exc->error = FT_THROW( Bad_Argument ); ++ else ++ exc->GS.loop = args[0]; + } + + +@@ -3594,7 +3099,7 @@ + static void + Ins_SMD( INS_ARG ) + { +- DO_SMD ++ exc->GS.minimum_distance = args[0]; + } + + +@@ -3607,7 +3112,7 @@ + static void + Ins_SCVTCI( INS_ARG ) + { +- DO_SCVTCI ++ exc->GS.control_value_cutin = (FT_F26Dot6)args[0]; + } + + +@@ -3620,7 +3125,7 @@ + static void + Ins_SSWCI( INS_ARG ) + { +- DO_SSWCI ++ exc->GS.single_width_cutin = (FT_F26Dot6)args[0]; + } + + +@@ -3633,7 +3138,8 @@ + static void + Ins_SSW( INS_ARG ) + { +- DO_SSW ++ exc->GS.single_width_value = FT_MulFix( args[0], ++ exc->tt_metrics.scale ); + } + + +@@ -3646,7 +3152,7 @@ + static void + Ins_FLIPON( INS_ARG ) + { +- DO_FLIPON ++ exc->GS.auto_flip = TRUE; + } + + +@@ -3659,7 +3165,7 @@ + static void + Ins_FLIPOFF( INS_ARG ) + { +- DO_FLIPOFF ++ exc->GS.auto_flip = FALSE; + } + + +@@ -3685,7 +3191,7 @@ + static void + Ins_SDB( INS_ARG ) + { +- DO_SDB ++ exc->GS.delta_base = (FT_UShort)args[0]; + } + + +@@ -3698,7 +3204,10 @@ + static void + Ins_SDS( INS_ARG ) + { +- DO_SDS ++ if ( (FT_ULong)args[0] > 6UL ) ++ exc->error = FT_THROW( Bad_Argument ); ++ else ++ exc->GS.delta_shift = (FT_UShort)args[0]; + } + + +@@ -3711,7 +3220,7 @@ + static void + Ins_MPPEM( INS_ARG ) + { +- DO_MPPEM ++ args[0] = exc->func_cur_ppem( exc ); + } + + +@@ -3724,7 +3233,13 @@ + static void + Ins_MPS( INS_ARG ) + { +- DO_MPS ++ /* Note: The point size should be irrelevant in a given font program; */ ++ /* we thus decide to return only the PPEM value. */ ++#if 0 ++ args[0] = exc->metrics.pointSize; ++#else ++ args[0] = exc->func_cur_ppem( exc ); ++#endif + } + + +@@ -3737,7 +3252,7 @@ + static void + Ins_DUP( INS_ARG ) + { +- DO_DUP ++ args[1] = args[0]; + } + + +@@ -3763,7 +3278,7 @@ + static void + Ins_CLEAR( INS_ARG ) + { +- DO_CLEAR ++ exc->new_top = 0; + } + + +@@ -3776,7 +3291,12 @@ + static void + Ins_SWAP( INS_ARG ) + { +- DO_SWAP ++ FT_Long L; ++ ++ ++ L = args[0]; ++ args[0] = args[1]; ++ args[1] = L; + } + + +@@ -3789,7 +3309,7 @@ + static void + Ins_DEPTH( INS_ARG ) + { +- DO_DEPTH ++ args[0] = exc->top; + } + + +@@ -3802,7 +3322,19 @@ + static void + Ins_CINDEX( INS_ARG ) + { +- DO_CINDEX ++ FT_Long L; ++ ++ ++ L = args[0]; ++ ++ if ( L <= 0 || L > exc->args ) ++ { ++ if ( exc->pedantic_hinting ) ++ exc->error = FT_THROW( Invalid_Reference ); ++ args[0] = 0; ++ } ++ else ++ args[0] = exc->stack[exc->args - L]; + } + + +@@ -3828,7 +3360,17 @@ + static void + Ins_JROT( INS_ARG ) + { +- DO_JROT ++ if ( args[1] != 0 ) ++ { ++ if ( args[0] == 0 && exc->args == 0 ) ++ exc->error = FT_THROW( Bad_Argument ); ++ exc->IP += args[0]; ++ if ( exc->IP < 0 || ++ ( exc->callTop > 0 && ++ exc->IP > exc->callStack[exc->callTop - 1].Def->end ) ) ++ exc->error = FT_THROW( Bad_Argument ); ++ exc->step_ins = FALSE; ++ } + } + + +@@ -3841,7 +3383,14 @@ + static void + Ins_JMPR( INS_ARG ) + { +- DO_JMPR ++ if ( args[0] == 0 && exc->args == 0 ) ++ exc->error = FT_THROW( Bad_Argument ); ++ exc->IP += args[0]; ++ if ( exc->IP < 0 || ++ ( exc->callTop > 0 && ++ exc->IP > exc->callStack[exc->callTop - 1].Def->end ) ) ++ exc->error = FT_THROW( Bad_Argument ); ++ exc->step_ins = FALSE; + } + + +@@ -3854,7 +3403,17 @@ + static void + Ins_JROF( INS_ARG ) + { +- DO_JROF ++ if ( args[1] == 0 ) ++ { ++ if ( args[0] == 0 && exc->args == 0 ) ++ exc->error = FT_THROW( Bad_Argument ); ++ exc->IP += args[0]; ++ if ( exc->IP < 0 || ++ ( exc->callTop > 0 && ++ exc->IP > exc->callStack[exc->callTop - 1].Def->end ) ) ++ exc->error = FT_THROW( Bad_Argument ); ++ exc->step_ins = FALSE; ++ } + } + + +@@ -3867,7 +3426,7 @@ + static void + Ins_LT( INS_ARG ) + { +- DO_LT ++ args[0] = ( args[0] < args[1] ); + } + + +@@ -3880,7 +3439,7 @@ + static void + Ins_LTEQ( INS_ARG ) + { +- DO_LTEQ ++ args[0] = ( args[0] <= args[1] ); + } + + +@@ -3893,7 +3452,7 @@ + static void + Ins_GT( INS_ARG ) + { +- DO_GT ++ args[0] = ( args[0] > args[1] ); + } + + +@@ -3906,7 +3465,7 @@ + static void + Ins_GTEQ( INS_ARG ) + { +- DO_GTEQ ++ args[0] = ( args[0] >= args[1] ); + } + + +@@ -3919,7 +3478,7 @@ + static void + Ins_EQ( INS_ARG ) + { +- DO_EQ ++ args[0] = ( args[0] == args[1] ); + } + + +@@ -3932,7 +3491,7 @@ + static void + Ins_NEQ( INS_ARG ) + { +- DO_NEQ ++ args[0] = ( args[0] != args[1] ); + } + + +@@ -3945,7 +3504,7 @@ + static void + Ins_ODD( INS_ARG ) + { +- DO_ODD ++ args[0] = ( ( exc->func_round( exc, args[0], 0 ) & 127 ) == 64 ); + } + + +@@ -3958,7 +3517,7 @@ + static void + Ins_EVEN( INS_ARG ) + { +- DO_EVEN ++ args[0] = ( ( exc->func_round( exc, args[0], 0 ) & 127 ) == 0 ); + } + + +@@ -3971,7 +3530,7 @@ + static void + Ins_AND( INS_ARG ) + { +- DO_AND ++ args[0] = ( args[0] && args[1] ); + } + + +@@ -3984,7 +3543,7 @@ + static void + Ins_OR( INS_ARG ) + { +- DO_OR ++ args[0] = ( args[0] || args[1] ); + } + + +@@ -3997,7 +3556,7 @@ + static void + Ins_NOT( INS_ARG ) + { +- DO_NOT ++ args[0] = !args[0]; + } + + +@@ -4010,7 +3569,7 @@ + static void + Ins_ADD( INS_ARG ) + { +- DO_ADD ++ args[0] += args[1]; + } + + +@@ -4023,7 +3582,7 @@ + static void + Ins_SUB( INS_ARG ) + { +- DO_SUB ++ args[0] -= args[1]; + } + + +@@ -4036,7 +3595,10 @@ + static void + Ins_DIV( INS_ARG ) + { +- DO_DIV ++ if ( args[1] == 0 ) ++ exc->error = FT_THROW( Divide_By_Zero ); ++ else ++ args[0] = FT_MulDiv_No_Round( args[0], 64L, args[1] ); + } + + +@@ -4049,7 +3611,7 @@ + static void + Ins_MUL( INS_ARG ) + { +- DO_MUL ++ args[0] = FT_MulDiv( args[0], args[1], 64L ); + } + + +@@ -4062,7 +3624,7 @@ + static void + Ins_ABS( INS_ARG ) + { +- DO_ABS ++ args[0] = FT_ABS( args[0] ); + } + + +@@ -4075,7 +3637,7 @@ + static void + Ins_NEG( INS_ARG ) + { +- DO_NEG ++ args[0] = -args[0]; + } + + +@@ -4088,7 +3650,7 @@ + static void + Ins_FLOOR( INS_ARG ) + { +- DO_FLOOR ++ args[0] = FT_PIX_FLOOR( args[0] ); + } + + +@@ -4101,7 +3663,7 @@ + static void + Ins_CEILING( INS_ARG ) + { +- DO_CEILING ++ args[0] = FT_PIX_CEIL( args[0] ); + } + + +@@ -4114,7 +3676,56 @@ + static void + Ins_RS( INS_ARG ) + { +- DO_RS ++#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING ++ ++ FT_ULong I = (FT_ULong)args[0]; ++ ++ ++ if ( BOUNDSL( I, exc->storeSize ) ) ++ { ++ if ( exc->pedantic_hinting ) ++ ARRAY_BOUND_ERROR; ++ else ++ args[0] = 0; ++ } ++ else ++ { ++ /* subpixel hinting - avoid Typeman Dstroke and */ ++ /* IStroke and Vacuform rounds */ ++ if ( SUBPIXEL_HINTING && ++ exc->ignore_x_mode && ++ ( ( I == 24 && ++ ( exc->face->sph_found_func_flags & ++ ( SPH_FDEF_SPACING_1 | ++ SPH_FDEF_SPACING_2 ) ) ) || ++ ( I == 22 && ++ ( exc->sph_in_func_flags & ++ SPH_FDEF_TYPEMAN_STROKES ) ) || ++ ( I == 8 && ++ ( exc->face->sph_found_func_flags & ++ SPH_FDEF_VACUFORM_ROUND_1 ) && ++ exc->iup_called ) ) ) ++ args[0] = 0; ++ else ++ args[0] = exc->storage[I]; ++ } ++ ++#else /* !TT_CONFIG_OPTION_SUBPIXEL_HINTING */ ++ ++ FT_ULong I = (FT_ULong)args[0]; ++ ++ ++ if ( BOUNDSL( I, exc->storeSize ) ) ++ { ++ if ( exc->pedantic_hinting ) ++ ARRAY_BOUND_ERROR; ++ else ++ args[0] = 0; ++ } ++ else ++ args[0] = exc->storage[I]; ++ ++#endif /* !TT_CONFIG_OPTION_SUBPIXEL_HINTING */ + } + + +@@ -4127,7 +3738,16 @@ + static void + Ins_WS( INS_ARG ) + { +- DO_WS ++ FT_ULong I = (FT_ULong)args[0]; ++ ++ ++ if ( BOUNDSL( I, exc->storeSize ) ) ++ { ++ if ( exc->pedantic_hinting ) ++ ARRAY_BOUND_ERROR; ++ } ++ else ++ exc->storage[I] = args[1]; + } + + +@@ -4140,7 +3760,16 @@ + static void + Ins_WCVTP( INS_ARG ) + { +- DO_WCVTP ++ FT_ULong I = (FT_ULong)args[0]; ++ ++ ++ if ( BOUNDSL( I, exc->cvtSize ) ) ++ { ++ if ( exc->pedantic_hinting ) ++ ARRAY_BOUND_ERROR; ++ } ++ else ++ exc->func_write_cvt( exc, I, args[1] ); + } + + +@@ -4153,7 +3782,16 @@ + static void + Ins_WCVTF( INS_ARG ) + { +- DO_WCVTF ++ FT_ULong I = (FT_ULong)args[0]; ++ ++ ++ if ( BOUNDSL( I, exc->cvtSize ) ) ++ { ++ if ( exc->pedantic_hinting ) ++ ARRAY_BOUND_ERROR; ++ } ++ else ++ exc->cvt[I] = FT_MulFix( args[1], exc->tt_metrics.scale ); + } + + +@@ -4166,7 +3804,18 @@ + static void + Ins_RCVT( INS_ARG ) + { +- DO_RCVT ++ FT_ULong I = (FT_ULong)args[0]; ++ ++ ++ if ( BOUNDSL( I, exc->cvtSize ) ) ++ { ++ if ( exc->pedantic_hinting ) ++ ARRAY_BOUND_ERROR; ++ else ++ args[0] = 0; ++ } ++ else ++ args[0] = exc->func_read_cvt( exc, I ); + } + + +@@ -4194,7 +3843,7 @@ + static void + Ins_DEBUG( INS_ARG ) + { +- DO_DEBUG ++ exc->error = FT_THROW( Debug_OpCode ); + } + + +@@ -4207,7 +3856,10 @@ + static void + Ins_ROUND( INS_ARG ) + { +- DO_ROUND ++ args[0] = exc->func_round( ++ exc, ++ args[0], ++ exc->tt_metrics.compensations[exc->opcode - 0x68] ); + } + + +@@ -4220,7 +3872,9 @@ + static void + Ins_NROUND( INS_ARG ) + { +- DO_NROUND ++ args[0] = Round_None( exc, ++ args[0], ++ exc->tt_metrics.compensations[exc->opcode - 0x6C] ); + } + + +@@ -4233,7 +3887,8 @@ + static void + Ins_MAX( INS_ARG ) + { +- DO_MAX ++ if ( args[1] > args[0] ) ++ args[0] = args[1]; + } + + +@@ -4246,7 +3901,8 @@ + static void + Ins_MIN( INS_ARG ) + { +- DO_MIN ++ if ( args[1] < args[0] ) ++ args[0] = args[1]; + } + + +@@ -7949,10 +7605,6 @@ + FT_Byte opcode = exc->opcode; + + +-#undef ARRAY_BOUND_ERROR +-#define ARRAY_BOUND_ERROR goto Set_Invalid_Ref +- +- + switch ( opcode ) + { + case 0x00: /* SVTCA y */ +@@ -7961,68 +7613,37 @@ + case 0x03: /* SPvTCA x */ + case 0x04: /* SFvTCA y */ + case 0x05: /* SFvTCA x */ +- { +- FT_Short AA, BB; +- +- +- AA = (FT_Short)( ( opcode & 1 ) << 14 ); +- BB = (FT_Short)( AA ^ 0x4000 ); +- +- if ( opcode < 4 ) +- { +- exc->GS.projVector.x = AA; +- exc->GS.projVector.y = BB; +- +- exc->GS.dualVector.x = AA; +- exc->GS.dualVector.y = BB; +- } +- else +- { +- GUESS_VECTOR( projVector ); +- } +- +- if ( ( opcode & 2 ) == 0 ) +- { +- exc->GS.freeVector.x = AA; +- exc->GS.freeVector.y = BB; +- } +- else +- { +- GUESS_VECTOR( freeVector ); +- } +- +- Compute_Funcs( exc ); +- } ++ Ins_SxyTCA( exc, args ); + break; + + case 0x06: /* SPvTL // */ + case 0x07: /* SPvTL + */ +- DO_SPVTL ++ Ins_SPVTL( exc, args ); + break; + + case 0x08: /* SFvTL // */ + case 0x09: /* SFvTL + */ +- DO_SFVTL ++ Ins_SFVTL( exc, args ); + break; + + case 0x0A: /* SPvFS */ +- DO_SPVFS ++ Ins_SPVFS( exc, args ); + break; + + case 0x0B: /* SFvFS */ +- DO_SFVFS ++ Ins_SFVFS( exc, args ); + break; + + case 0x0C: /* GPV */ +- DO_GPV ++ Ins_GPV( exc, args ); + break; + + case 0x0D: /* GFV */ +- DO_GFV ++ Ins_GFV( exc, args ); + break; + + case 0x0E: /* SFvTPv */ +- DO_SFVTPV ++ Ins_SFVTPV( exc, args ); + break; + + case 0x0F: /* ISECT */ +@@ -8030,15 +7651,15 @@ + break; + + case 0x10: /* SRP0 */ +- DO_SRP0 ++ Ins_SRP0( exc, args ); + break; + + case 0x11: /* SRP1 */ +- DO_SRP1 ++ Ins_SRP1( exc, args ); + break; + + case 0x12: /* SRP2 */ +- DO_SRP2 ++ Ins_SRP2( exc, args ); + break; + + case 0x13: /* SZP0 */ +@@ -8058,19 +7679,19 @@ + break; + + case 0x17: /* SLOOP */ +- DO_SLOOP ++ Ins_SLOOP( exc, args ); + break; + + case 0x18: /* RTG */ +- DO_RTG ++ Ins_RTG( exc, args ); + break; + + case 0x19: /* RTHG */ +- DO_RTHG ++ Ins_RTHG( exc, args ); + break; + + case 0x1A: /* SMD */ +- DO_SMD ++ Ins_SMD( exc, args ); + break; + + case 0x1B: /* ELSE */ +@@ -8078,43 +7699,43 @@ + break; + + case 0x1C: /* JMPR */ +- DO_JMPR ++ Ins_JMPR( exc, args ); + break; + + case 0x1D: /* SCVTCI */ +- DO_SCVTCI ++ Ins_SCVTCI( exc, args ); + break; + + case 0x1E: /* SSWCI */ +- DO_SSWCI ++ Ins_SSWCI( exc, args ); + break; + + case 0x1F: /* SSW */ +- DO_SSW ++ Ins_SSW( exc, args ); + break; + + case 0x20: /* DUP */ +- DO_DUP ++ Ins_DUP( exc, args ); + break; + + case 0x21: /* POP */ +- /* nothing :-) */ ++ Ins_POP( exc, args ); + break; + + case 0x22: /* CLEAR */ +- DO_CLEAR ++ Ins_CLEAR( exc, args ); + break; + + case 0x23: /* SWAP */ +- DO_SWAP ++ Ins_SWAP( exc, args ); + break; + + case 0x24: /* DEPTH */ +- DO_DEPTH ++ Ins_DEPTH( exc, args ); + break; + + case 0x25: /* CINDEX */ +- DO_CINDEX ++ Ins_CINDEX( exc, args ); + break; + + case 0x26: /* MINDEX */ +@@ -8192,7 +7813,7 @@ + break; + + case 0x3D: /* RTDG */ +- DO_RTDG ++ Ins_RTDG( exc, args ); + break; + + case 0x3E: /* MIAP */ +@@ -8209,23 +7830,19 @@ + break; + + case 0x42: /* WS */ +- DO_WS +- break; +- +- Set_Invalid_Ref: +- exc->error = FT_THROW( Invalid_Reference ); ++ Ins_WS( exc, args ); + break; + + case 0x43: /* RS */ +- DO_RS ++ Ins_RS( exc, args ); + break; + + case 0x44: /* WCVTP */ +- DO_WCVTP ++ Ins_WCVTP( exc, args ); + break; + + case 0x45: /* RCVT */ +- DO_RCVT ++ Ins_RCVT( exc, args ); + break; + + case 0x46: /* GC */ +@@ -8243,55 +7860,55 @@ + break; + + case 0x4B: /* MPPEM */ +- DO_MPPEM ++ Ins_MPPEM( exc, args ); + break; + + case 0x4C: /* MPS */ +- DO_MPS ++ Ins_MPS( exc, args ); + break; + + case 0x4D: /* FLIPON */ +- DO_FLIPON ++ Ins_FLIPON( exc, args ); + break; + + case 0x4E: /* FLIPOFF */ +- DO_FLIPOFF ++ Ins_FLIPOFF( exc, args ); + break; + + case 0x4F: /* DEBUG */ +- DO_DEBUG ++ Ins_DEBUG( exc, args ); + break; + + case 0x50: /* LT */ +- DO_LT ++ Ins_LT( exc, args ); + break; + + case 0x51: /* LTEQ */ +- DO_LTEQ ++ Ins_LTEQ( exc, args ); + break; + + case 0x52: /* GT */ +- DO_GT ++ Ins_GT( exc, args ); + break; + + case 0x53: /* GTEQ */ +- DO_GTEQ ++ Ins_GTEQ( exc, args ); + break; + + case 0x54: /* EQ */ +- DO_EQ ++ Ins_EQ( exc, args ); + break; + + case 0x55: /* NEQ */ +- DO_NEQ ++ Ins_NEQ( exc, args ); + break; + + case 0x56: /* ODD */ +- DO_ODD ++ Ins_ODD( exc, args ); + break; + + case 0x57: /* EVEN */ +- DO_EVEN ++ Ins_EVEN( exc, args ); + break; + + case 0x58: /* IF */ +@@ -8299,19 +7916,19 @@ + break; + + case 0x59: /* EIF */ +- /* do nothing */ ++ Ins_EIF( exc, args ); + break; + + case 0x5A: /* AND */ +- DO_AND ++ Ins_AND( exc, args ); + break; + + case 0x5B: /* OR */ +- DO_OR ++ Ins_OR( exc, args ); + break; + + case 0x5C: /* NOT */ +- DO_NOT ++ Ins_NOT( exc, args ); + break; + + case 0x5D: /* DELTAP1 */ +@@ -8319,61 +7936,61 @@ + break; + + case 0x5E: /* SDB */ +- DO_SDB ++ Ins_SDB( exc, args ); + break; + + case 0x5F: /* SDS */ +- DO_SDS ++ Ins_SDS( exc, args ); + break; + + case 0x60: /* ADD */ +- DO_ADD ++ Ins_ADD( exc, args ); + break; + + case 0x61: /* SUB */ +- DO_SUB ++ Ins_SUB( exc, args ); + break; + + case 0x62: /* DIV */ +- DO_DIV ++ Ins_DIV( exc, args ); + break; + + case 0x63: /* MUL */ +- DO_MUL ++ Ins_MUL( exc, args ); + break; + + case 0x64: /* ABS */ +- DO_ABS ++ Ins_ABS( exc, args ); + break; + + case 0x65: /* NEG */ +- DO_NEG ++ Ins_NEG( exc, args ); + break; + + case 0x66: /* FLOOR */ +- DO_FLOOR ++ Ins_FLOOR( exc, args ); + break; + + case 0x67: /* CEILING */ +- DO_CEILING ++ Ins_CEILING( exc, args ); + break; + + case 0x68: /* ROUND */ + case 0x69: /* ROUND */ + case 0x6A: /* ROUND */ + case 0x6B: /* ROUND */ +- DO_ROUND ++ Ins_ROUND( exc, args ); + break; + + case 0x6C: /* NROUND */ + case 0x6D: /* NROUND */ + case 0x6E: /* NRRUND */ + case 0x6F: /* NROUND */ +- DO_NROUND ++ Ins_NROUND( exc, args ); + break; + + case 0x70: /* WCVTF */ +- DO_WCVTF ++ Ins_WCVTF( exc, args ); + break; + + case 0x71: /* DELTAP2 */ +@@ -8388,23 +8005,23 @@ + break; + + case 0x76: /* SROUND */ +- DO_SROUND ++ Ins_SROUND( exc, args ); + break; + + case 0x77: /* S45Round */ +- DO_S45ROUND ++ Ins_S45ROUND( exc, args ); + break; + + case 0x78: /* JROT */ +- DO_JROT ++ Ins_JROT( exc, args ); + break; + + case 0x79: /* JROF */ +- DO_JROF ++ Ins_JROF( exc, args ); + break; + + case 0x7A: /* ROFF */ +- DO_ROFF ++ Ins_ROFF( exc, args ); + break; + + case 0x7B: /* ???? */ +@@ -8412,16 +8029,19 @@ + break; + + case 0x7C: /* RUTG */ +- DO_RUTG ++ Ins_RUTG( exc, args ); + break; + + case 0x7D: /* RDTG */ +- DO_RDTG ++ Ins_RDTG( exc, args ); + break; + + case 0x7E: /* SANGW */ +- case 0x7F: /* AA */ +- /* nothing - obsolete */ ++ Ins_SANGW( exc, args ); ++ break; ++ ++ case 0x7F: /* AA */ ++ Ins_AA( exc, args ); + break; + + case 0x80: /* FLIPPT */ +@@ -8463,11 +8083,11 @@ + break; + + case 0x8B: /* MAX */ +- DO_MAX ++ Ins_MAX( exc, args ); + break; + + case 0x8C: /* MIN */ +- DO_MIN ++ Ins_MIN( exc, args ); + break; + + case 0x8D: /* SCANTYPE */ +-- +2.2.2 + +From 7e1db6d42d553f019d9a3c9dba9fe6d400da2b35 Mon Sep 17 00:00:00 2001 +From: Werner Lemberg <wl@gnu.org> +Date: Sun, 11 Jan 2015 00:56:55 +0100 +Subject: [PATCH] Formatting, typos. + +--- + src/truetype/ttinterp.c | 87 ++++++++++++++++++++++++------------------------- + 1 file changed, 42 insertions(+), 45 deletions(-) + +diff --git a/src/truetype/ttinterp.c b/src/truetype/ttinterp.c +index c666049..7b23025 100644 +--- a/src/truetype/ttinterp.c ++++ b/src/truetype/ttinterp.c +@@ -113,8 +113,7 @@ + /* */ + /* This macro computes (a*2^14)/b and complements TT_MulFix14. */ + /* */ +-#define TT_DivFix14( a, b ) \ +- FT_DivFix( a, (b) << 2 ) ++#define TT_DivFix14( a, b ) FT_DivFix( a, (b) << 2 ) + + + #undef SUCCESS +@@ -124,14 +123,17 @@ + #define FAILURE 1 + + #ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING +-#define GUESS_VECTOR( V ) \ +- if ( exc->face->unpatented_hinting ) \ +- { \ +- exc->GS.V.x = (FT_F2Dot14)( exc->GS.both_x_axis ? 0x4000 : 0 ); \ +- exc->GS.V.y = (FT_F2Dot14)( exc->GS.both_x_axis ? 0 : 0x4000 ); \ +- } ++#define GUESS_VECTOR( V ) \ ++ do \ ++ { \ ++ if ( exc->face->unpatented_hinting ) \ ++ { \ ++ exc->GS.V.x = (FT_F2Dot14)( exc->GS.both_x_axis ? 0x4000 : 0 ); \ ++ exc->GS.V.y = (FT_F2Dot14)( exc->GS.both_x_axis ? 0 : 0x4000 ); \ ++ } \ ++ } while (0) + #else +-#define GUESS_VECTOR( V ) ++#define GUESS_VECTOR( V ) do { } while (0) + #endif + + /*************************************************************************/ +@@ -713,8 +715,8 @@ + /* SFvTL + */ PACK( 2, 0 ), + /* SPvFS */ PACK( 2, 0 ), + /* SFvFS */ PACK( 2, 0 ), +- /* GPV */ PACK( 0, 2 ), +- /* GFV */ PACK( 0, 2 ), ++ /* GPv */ PACK( 0, 2 ), ++ /* GFv */ PACK( 0, 2 ), + /* SFvTPv */ PACK( 0, 0 ), + /* ISECT */ PACK( 5, 0 ), + +@@ -843,8 +845,8 @@ + /* INS_$83 */ PACK( 0, 0 ), + /* INS_$84 */ PACK( 0, 0 ), + /* ScanCTRL */ PACK( 1, 0 ), +- /* SDPVTL[0] */ PACK( 2, 0 ), +- /* SDPVTL[1] */ PACK( 2, 0 ), ++ /* SDPvTL[0] */ PACK( 2, 0 ), ++ /* SDPvTL[1] */ PACK( 2, 0 ), + /* GetINFO */ PACK( 1, 1 ), + /* IDEF */ PACK( 1, 0 ), + /* ROLL */ PACK( 3, 3 ), +@@ -992,8 +994,8 @@ + "SFvTL +", + "SPvFS", + "SFvFS", +- "GPV", +- "GFV", ++ "GPv", ++ "GFv", + "SFvTPv", + "ISECT", + +@@ -1122,8 +1124,8 @@ + "INS_$83", + "INS_$84", + "ScanCTRL", +- "SDVPTL[0]", +- "SDVPTL[1]", ++ "SDPvTL[0]", ++ "SDPvTL[1]", + "GetINFO", + "IDEF", + "ROLL", +@@ -2541,9 +2543,9 @@ + else if ( exc->GS.freeVector.y == 0x4000 ) + exc->F_dot_P = exc->GS.projVector.y; + else +- exc->F_dot_P = ( (FT_Long)exc->GS.projVector.x * exc->GS.freeVector.x + +- (FT_Long)exc->GS.projVector.y * exc->GS.freeVector.y ) >> +- 14; ++ exc->F_dot_P = ++ ( (FT_Long)exc->GS.projVector.x * exc->GS.freeVector.x + ++ (FT_Long)exc->GS.projVector.y * exc->GS.freeVector.y ) >> 14; + + if ( exc->GS.projVector.x == 0x4000 ) + exc->func_project = (TT_Project_Func)Project_x; +@@ -2675,8 +2677,8 @@ + A = p1->x - p2->x; + B = p1->y - p2->y; + +- /* If p1 == p2, SPVTL and SFVTL behave the same as */ +- /* SPVTCA[X] and SFVTCA[X], respectively. */ ++ /* If p1 == p2, SPvTL and SFvTL behave the same as */ ++ /* SPvTCA[X] and SFvTCA[X], respectively. */ + /* */ + /* Confirmed by Greg Hitchcock. */ + +@@ -2713,11 +2715,11 @@ + /* Opcode range: 0x00-0x01 */ + /* Stack: --> */ + /* */ +- /* SPVTCA[a]: Set PVector to Coordinate Axis */ ++ /* SPvTCA[a]: Set PVector to Coordinate Axis */ + /* Opcode range: 0x02-0x03 */ + /* Stack: --> */ + /* */ +- /* SFVTCA[a]: Set FVector to Coordinate Axis */ ++ /* SFvTCA[a]: Set FVector to Coordinate Axis */ + /* Opcode range: 0x04-0x05 */ + /* Stack: --> */ + /* */ +@@ -2740,9 +2742,7 @@ + exc->GS.dualVector.y = BB; + } + else +- { + GUESS_VECTOR( projVector ); +- } + + if ( ( opcode & 2 ) == 0 ) + { +@@ -2750,9 +2750,7 @@ + exc->GS.freeVector.y = BB; + } + else +- { + GUESS_VECTOR( freeVector ); +- } + + Compute_Funcs( exc ); + } +@@ -2760,7 +2758,7 @@ + + /*************************************************************************/ + /* */ +- /* SPVTL[a]: Set PVector To Line */ ++ /* SPvTL[a]: Set PVector To Line */ + /* Opcode range: 0x06-0x07 */ + /* Stack: uint32 uint32 --> */ + /* */ +@@ -2782,7 +2780,7 @@ + + /*************************************************************************/ + /* */ +- /* SFVTL[a]: Set FVector To Line */ ++ /* SFvTL[a]: Set FVector To Line */ + /* Opcode range: 0x08-0x09 */ + /* Stack: uint32 uint32 --> */ + /* */ +@@ -2803,7 +2801,7 @@ + + /*************************************************************************/ + /* */ +- /* SFVTPV[]: Set FVector To PVector */ ++ /* SFvTPv[]: Set FVector To PVector */ + /* Opcode range: 0x0E */ + /* Stack: --> */ + /* */ +@@ -2818,7 +2816,7 @@ + + /*************************************************************************/ + /* */ +- /* SPVFS[]: Set PVector From Stack */ ++ /* SPvFS[]: Set PVector From Stack */ + /* Opcode range: 0x0A */ + /* Stack: f2.14 f2.14 --> */ + /* */ +@@ -2845,7 +2843,7 @@ + + /*************************************************************************/ + /* */ +- /* SFVFS[]: Set FVector From Stack */ ++ /* SFvFS[]: Set FVector From Stack */ + /* Opcode range: 0x0B */ + /* Stack: f2.14 f2.14 --> */ + /* */ +@@ -2870,7 +2868,7 @@ + + /*************************************************************************/ + /* */ +- /* GPV[]: Get Projection Vector */ ++ /* GPv[]: Get Projection Vector */ + /* Opcode range: 0x0C */ + /* Stack: ef2.14 --> ef2.14 */ + /* */ +@@ -2896,7 +2894,8 @@ + + + /*************************************************************************/ +- /* GFV[]: Get Freedom Vector */ ++ /* */ ++ /* GFv[]: Get Freedom Vector */ + /* Opcode range: 0x0D */ + /* Stack: ef2.14 --> ef2.14 */ + /* */ +@@ -3245,7 +3244,7 @@ + + /*************************************************************************/ + /* */ +- /* DUP[]: DUPlicate the top stack's element */ ++ /* DUP[]: DUPlicate the stack's top element */ + /* Opcode range: 0x20 */ + /* Stack: StkElt --> StkElt StkElt */ + /* */ +@@ -4962,7 +4961,7 @@ + + /*************************************************************************/ + /* */ +- /* SDPVTL[a]: Set Dual PVector to Line */ ++ /* SDPvTL[a]: Set Dual PVector to Line */ + /* Opcode range: 0x86-0x87 */ + /* Stack: uint32 uint32 --> */ + /* */ +@@ -4993,7 +4992,7 @@ + A = v1->x - v2->x; + B = v1->y - v2->y; + +- /* If v1 == v2, SDPVTL behaves the same as */ ++ /* If v1 == v2, SDPvTL behaves the same as */ + /* SVTCA[X], respectively. */ + /* */ + /* Confirmed by Greg Hitchcock. */ +@@ -5037,9 +5036,7 @@ + } + + Normalize( exc, A, B, &exc->GS.projVector ); +- + GUESS_VECTOR( freeVector ); +- + Compute_Funcs( exc ); + } + +@@ -6406,7 +6403,7 @@ + } + #endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ + +- if ( exc->top < exc->GS.loop || ++ if ( exc->top < exc->GS.loop || + BOUNDS( exc->GS.rp0, exc->zp0.n_points ) ) + { + if ( exc->pedantic_hinting ) +@@ -7634,11 +7631,11 @@ + Ins_SFVFS( exc, args ); + break; + +- case 0x0C: /* GPV */ ++ case 0x0C: /* GPv */ + Ins_GPV( exc, args ); + break; + +- case 0x0D: /* GFV */ ++ case 0x0D: /* GFv */ + Ins_GFV( exc, args ); + break; + +@@ -8065,8 +8062,8 @@ + Ins_SCANCTRL( exc, args ); + break; + +- case 0x86: /* SDPVTL */ +- case 0x87: /* SDPVTL */ ++ case 0x86: /* SDPvTL */ ++ case 0x87: /* SDPvTL */ + Ins_SDPVTL( exc, args ); + break; + +-- +2.2.2 + +From d03a67a12c3feca6c2fb21052ef4d2e83b5d5171 Mon Sep 17 00:00:00 2001 +From: Werner Lemberg <wl@gnu.org> +Date: Sun, 11 Jan 2015 08:39:14 +0100 +Subject: [PATCH] [truetype] More macro expansions. + +* src/truetype/ttinterp.c (INS_ARG): Remove macro by expansion, +adjusting funtion calls where necessary. +(FT_UNUSED_ARG): Removed, no longer needed. +--- + ChangeLog | 8 + + src/truetype/ttinterp.c | 451 ++++++++++++++++++++++++++---------------------- + 2 files changed, 253 insertions(+), 206 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index 3ca03df..878c82b 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,3 +1,11 @@ ++2015-01-11 Werner Lemberg <wl@gnu.org> ++ ++ [truetype] More macro expansions. ++ ++ * src/truetype/ttinterp.c (INS_ARG): Remove macro by expansion, ++ adjusting funtion calls where necessary. ++ (FT_UNUSED_ARG): Removed, no longer needed. ++ + 2015-01-10 Werner Lemberg <wl@gnu.org> + + [truetype] More macro expansions. +diff --git a/src/truetype/ttinterp.c b/src/truetype/ttinterp.c +index 7b23025..91ddb9b 100644 +--- a/src/truetype/ttinterp.c ++++ b/src/truetype/ttinterp.c +@@ -61,22 +61,6 @@ + #define FT_UNUSED_EXEC FT_UNUSED( exc ) + + +- /*************************************************************************/ +- /* */ +- /* The instruction argument stack. */ +- /* */ +-#define INS_ARG TT_ExecContext exc, \ +- FT_Long* args +- +- +- /*************************************************************************/ +- /* */ +- /* This macro is used whenever `args' is unused in a function, to avoid */ +- /* stupid warnings from pedantic compilers. */ +- /* */ +-#define FT_UNUSED_ARG FT_UNUSED_EXEC; FT_UNUSED( args ) +- +- + #define SUBPIXEL_HINTING \ + ( ((TT_Driver)FT_FACE_DRIVER( exc->face ))->interpreter_version == \ + TT_INTERPRETER_VERSION_38 ) +@@ -99,7 +83,8 @@ + /* */ + /* Instruction dispatch function, as used by the interpreter. */ + /* */ +- typedef void (*TInstruction_Function)( INS_ARG ); ++ typedef void (*TInstruction_Function)( TT_ExecContext exc, ++ FT_Long* args ); + + + /*************************************************************************/ +@@ -2724,7 +2709,7 @@ + /* Stack: --> */ + /* */ + static void +- Ins_SxyTCA( INS_ARG ) ++ Ins_SxyTCA( TT_ExecContext exc ) + { + FT_Short AA, BB; + FT_Byte opcode = exc->opcode; +@@ -2763,7 +2748,8 @@ + /* Stack: uint32 uint32 --> */ + /* */ + static void +- Ins_SPVTL( INS_ARG ) ++ Ins_SPVTL( TT_ExecContext exc, ++ FT_Long* args ) + { + if ( Ins_SxVTL( exc, + (FT_UShort)args[1], +@@ -2785,7 +2771,8 @@ + /* Stack: uint32 uint32 --> */ + /* */ + static void +- Ins_SFVTL( INS_ARG ) ++ Ins_SFVTL( TT_ExecContext exc, ++ FT_Long* args ) + { + if ( Ins_SxVTL( exc, + (FT_UShort)args[1], +@@ -2806,7 +2793,7 @@ + /* Stack: --> */ + /* */ + static void +- Ins_SFVTPV( INS_ARG ) ++ Ins_SFVTPV( TT_ExecContext exc ) + { + GUESS_VECTOR( projVector ); + exc->GS.freeVector = exc->GS.projVector; +@@ -2821,7 +2808,8 @@ + /* Stack: f2.14 f2.14 --> */ + /* */ + static void +- Ins_SPVFS( INS_ARG ) ++ Ins_SPVFS( TT_ExecContext exc, ++ FT_Long* args ) + { + FT_Short S; + FT_Long X, Y; +@@ -2848,7 +2836,8 @@ + /* Stack: f2.14 f2.14 --> */ + /* */ + static void +- Ins_SFVFS( INS_ARG ) ++ Ins_SFVFS( TT_ExecContext exc, ++ FT_Long* args ) + { + FT_Short S; + FT_Long X, Y; +@@ -2873,7 +2862,8 @@ + /* Stack: ef2.14 --> ef2.14 */ + /* */ + static void +- Ins_GPV( INS_ARG ) ++ Ins_GPV( TT_ExecContext exc, ++ FT_Long* args ) + { + #ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING + if ( exc->face->unpatented_hinting ) +@@ -2900,7 +2890,8 @@ + /* Stack: ef2.14 --> ef2.14 */ + /* */ + static void +- Ins_GFV( INS_ARG ) ++ Ins_GFV( TT_ExecContext exc, ++ FT_Long* args ) + { + #ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING + if ( exc->face->unpatented_hinting ) +@@ -2927,7 +2918,8 @@ + /* Stack: uint32 --> */ + /* */ + static void +- Ins_SRP0( INS_ARG ) ++ Ins_SRP0( TT_ExecContext exc, ++ FT_Long* args ) + { + exc->GS.rp0 = (FT_UShort)args[0]; + } +@@ -2940,7 +2932,8 @@ + /* Stack: uint32 --> */ + /* */ + static void +- Ins_SRP1( INS_ARG ) ++ Ins_SRP1( TT_ExecContext exc, ++ FT_Long* args ) + { + exc->GS.rp1 = (FT_UShort)args[0]; + } +@@ -2953,7 +2946,8 @@ + /* Stack: uint32 --> */ + /* */ + static void +- Ins_SRP2( INS_ARG ) ++ Ins_SRP2( TT_ExecContext exc, ++ FT_Long* args ) + { + exc->GS.rp2 = (FT_UShort)args[0]; + } +@@ -2966,7 +2960,7 @@ + /* Stack: --> */ + /* */ + static void +- Ins_RTHG( INS_ARG ) ++ Ins_RTHG( TT_ExecContext exc ) + { + exc->GS.round_state = TT_Round_To_Half_Grid; + exc->func_round = (TT_Round_Func)Round_To_Half_Grid; +@@ -2980,7 +2974,7 @@ + /* Stack: --> */ + /* */ + static void +- Ins_RTG( INS_ARG ) ++ Ins_RTG( TT_ExecContext exc ) + { + exc->GS.round_state = TT_Round_To_Grid; + exc->func_round = (TT_Round_Func)Round_To_Grid; +@@ -2993,7 +2987,7 @@ + /* Stack: --> */ + /* */ + static void +- Ins_RTDG( INS_ARG ) ++ Ins_RTDG( TT_ExecContext exc ) + { + exc->GS.round_state = TT_Round_To_Double_Grid; + exc->func_round = (TT_Round_Func)Round_To_Double_Grid; +@@ -3006,7 +3000,7 @@ + /* Stack: --> */ + /* */ + static void +- Ins_RUTG( INS_ARG ) ++ Ins_RUTG( TT_ExecContext exc ) + { + exc->GS.round_state = TT_Round_Up_To_Grid; + exc->func_round = (TT_Round_Func)Round_Up_To_Grid; +@@ -3020,7 +3014,7 @@ + /* Stack: --> */ + /* */ + static void +- Ins_RDTG( INS_ARG ) ++ Ins_RDTG( TT_ExecContext exc ) + { + exc->GS.round_state = TT_Round_Down_To_Grid; + exc->func_round = (TT_Round_Func)Round_Down_To_Grid; +@@ -3034,7 +3028,7 @@ + /* Stack: --> */ + /* */ + static void +- Ins_ROFF( INS_ARG ) ++ Ins_ROFF( TT_ExecContext exc ) + { + exc->GS.round_state = TT_Round_Off; + exc->func_round = (TT_Round_Func)Round_None; +@@ -3048,7 +3042,8 @@ + /* Stack: Eint8 --> */ + /* */ + static void +- Ins_SROUND( INS_ARG ) ++ Ins_SROUND( TT_ExecContext exc, ++ FT_Long* args ) + { + SetSuperRound( exc, 0x4000, args[0] ); + +@@ -3064,7 +3059,8 @@ + /* Stack: uint32 --> */ + /* */ + static void +- Ins_S45ROUND( INS_ARG ) ++ Ins_S45ROUND( TT_ExecContext exc, ++ FT_Long* args ) + { + SetSuperRound( exc, 0x2D41, args[0] ); + +@@ -3080,7 +3076,8 @@ + /* Stack: int32? --> */ + /* */ + static void +- Ins_SLOOP( INS_ARG ) ++ Ins_SLOOP( TT_ExecContext exc, ++ FT_Long* args ) + { + if ( args[0] < 0 ) + exc->error = FT_THROW( Bad_Argument ); +@@ -3096,7 +3093,8 @@ + /* Stack: f26.6 --> */ + /* */ + static void +- Ins_SMD( INS_ARG ) ++ Ins_SMD( TT_ExecContext exc, ++ FT_Long* args ) + { + exc->GS.minimum_distance = args[0]; + } +@@ -3109,7 +3107,8 @@ + /* Stack: f26.6 --> */ + /* */ + static void +- Ins_SCVTCI( INS_ARG ) ++ Ins_SCVTCI( TT_ExecContext exc, ++ FT_Long* args ) + { + exc->GS.control_value_cutin = (FT_F26Dot6)args[0]; + } +@@ -3122,7 +3121,8 @@ + /* Stack: f26.6 --> */ + /* */ + static void +- Ins_SSWCI( INS_ARG ) ++ Ins_SSWCI( TT_ExecContext exc, ++ FT_Long* args ) + { + exc->GS.single_width_cutin = (FT_F26Dot6)args[0]; + } +@@ -3135,7 +3135,8 @@ + /* Stack: int32? --> */ + /* */ + static void +- Ins_SSW( INS_ARG ) ++ Ins_SSW( TT_ExecContext exc, ++ FT_Long* args ) + { + exc->GS.single_width_value = FT_MulFix( args[0], + exc->tt_metrics.scale ); +@@ -3149,7 +3150,7 @@ + /* Stack: --> */ + /* */ + static void +- Ins_FLIPON( INS_ARG ) ++ Ins_FLIPON( TT_ExecContext exc ) + { + exc->GS.auto_flip = TRUE; + } +@@ -3162,7 +3163,7 @@ + /* Stack: --> */ + /* */ + static void +- Ins_FLIPOFF( INS_ARG ) ++ Ins_FLIPOFF( TT_ExecContext exc ) + { + exc->GS.auto_flip = FALSE; + } +@@ -3175,7 +3176,7 @@ + /* Stack: uint32 --> */ + /* */ + static void +- Ins_SANGW( INS_ARG ) ++ Ins_SANGW( void ) + { + /* instruction not supported anymore */ + } +@@ -3188,7 +3189,8 @@ + /* Stack: uint32 --> */ + /* */ + static void +- Ins_SDB( INS_ARG ) ++ Ins_SDB( TT_ExecContext exc, ++ FT_Long* args ) + { + exc->GS.delta_base = (FT_UShort)args[0]; + } +@@ -3201,7 +3203,8 @@ + /* Stack: uint32 --> */ + /* */ + static void +- Ins_SDS( INS_ARG ) ++ Ins_SDS( TT_ExecContext exc, ++ FT_Long* args ) + { + if ( (FT_ULong)args[0] > 6UL ) + exc->error = FT_THROW( Bad_Argument ); +@@ -3217,7 +3220,8 @@ + /* Stack: --> Euint16 */ + /* */ + static void +- Ins_MPPEM( INS_ARG ) ++ Ins_MPPEM( TT_ExecContext exc, ++ FT_Long* args ) + { + args[0] = exc->func_cur_ppem( exc ); + } +@@ -3230,7 +3234,8 @@ + /* Stack: --> Euint16 */ + /* */ + static void +- Ins_MPS( INS_ARG ) ++ Ins_MPS( TT_ExecContext exc, ++ FT_Long* args ) + { + /* Note: The point size should be irrelevant in a given font program; */ + /* we thus decide to return only the PPEM value. */ +@@ -3249,7 +3254,7 @@ + /* Stack: StkElt --> StkElt StkElt */ + /* */ + static void +- Ins_DUP( INS_ARG ) ++ Ins_DUP( FT_Long* args ) + { + args[1] = args[0]; + } +@@ -3262,7 +3267,7 @@ + /* Stack: StkElt --> */ + /* */ + static void +- Ins_POP( INS_ARG ) ++ Ins_POP( void ) + { + /* nothing to do */ + } +@@ -3275,7 +3280,7 @@ + /* Stack: StkElt... --> */ + /* */ + static void +- Ins_CLEAR( INS_ARG ) ++ Ins_CLEAR( TT_ExecContext exc ) + { + exc->new_top = 0; + } +@@ -3288,7 +3293,7 @@ + /* Stack: 2 * StkElt --> 2 * StkElt */ + /* */ + static void +- Ins_SWAP( INS_ARG ) ++ Ins_SWAP( FT_Long* args ) + { + FT_Long L; + +@@ -3306,7 +3311,8 @@ + /* Stack: --> uint32 */ + /* */ + static void +- Ins_DEPTH( INS_ARG ) ++ Ins_DEPTH( TT_ExecContext exc, ++ FT_Long* args ) + { + args[0] = exc->top; + } +@@ -3319,7 +3325,8 @@ + /* Stack: int32 --> StkElt */ + /* */ + static void +- Ins_CINDEX( INS_ARG ) ++ Ins_CINDEX( TT_ExecContext exc, ++ FT_Long* args ) + { + FT_Long L; + +@@ -3344,7 +3351,7 @@ + /* Stack: --> */ + /* */ + static void +- Ins_EIF( INS_ARG ) ++ Ins_EIF( void ) + { + /* nothing to do */ + } +@@ -3357,7 +3364,8 @@ + /* Stack: StkElt int32 --> */ + /* */ + static void +- Ins_JROT( INS_ARG ) ++ Ins_JROT( TT_ExecContext exc, ++ FT_Long* args ) + { + if ( args[1] != 0 ) + { +@@ -3380,7 +3388,8 @@ + /* Stack: int32 --> */ + /* */ + static void +- Ins_JMPR( INS_ARG ) ++ Ins_JMPR( TT_ExecContext exc, ++ FT_Long* args ) + { + if ( args[0] == 0 && exc->args == 0 ) + exc->error = FT_THROW( Bad_Argument ); +@@ -3400,7 +3409,8 @@ + /* Stack: StkElt int32 --> */ + /* */ + static void +- Ins_JROF( INS_ARG ) ++ Ins_JROF( TT_ExecContext exc, ++ FT_Long* args ) + { + if ( args[1] == 0 ) + { +@@ -3423,7 +3433,7 @@ + /* Stack: int32? int32? --> bool */ + /* */ + static void +- Ins_LT( INS_ARG ) ++ Ins_LT( FT_Long* args ) + { + args[0] = ( args[0] < args[1] ); + } +@@ -3436,7 +3446,7 @@ + /* Stack: int32? int32? --> bool */ + /* */ + static void +- Ins_LTEQ( INS_ARG ) ++ Ins_LTEQ( FT_Long* args ) + { + args[0] = ( args[0] <= args[1] ); + } +@@ -3449,7 +3459,7 @@ + /* Stack: int32? int32? --> bool */ + /* */ + static void +- Ins_GT( INS_ARG ) ++ Ins_GT( FT_Long* args ) + { + args[0] = ( args[0] > args[1] ); + } +@@ -3462,7 +3472,7 @@ + /* Stack: int32? int32? --> bool */ + /* */ + static void +- Ins_GTEQ( INS_ARG ) ++ Ins_GTEQ( FT_Long* args ) + { + args[0] = ( args[0] >= args[1] ); + } +@@ -3475,7 +3485,7 @@ + /* Stack: StkElt StkElt --> bool */ + /* */ + static void +- Ins_EQ( INS_ARG ) ++ Ins_EQ( FT_Long* args ) + { + args[0] = ( args[0] == args[1] ); + } +@@ -3488,7 +3498,7 @@ + /* Stack: StkElt StkElt --> bool */ + /* */ + static void +- Ins_NEQ( INS_ARG ) ++ Ins_NEQ( FT_Long* args ) + { + args[0] = ( args[0] != args[1] ); + } +@@ -3501,7 +3511,8 @@ + /* Stack: f26.6 --> bool */ + /* */ + static void +- Ins_ODD( INS_ARG ) ++ Ins_ODD( TT_ExecContext exc, ++ FT_Long* args ) + { + args[0] = ( ( exc->func_round( exc, args[0], 0 ) & 127 ) == 64 ); + } +@@ -3514,7 +3525,8 @@ + /* Stack: f26.6 --> bool */ + /* */ + static void +- Ins_EVEN( INS_ARG ) ++ Ins_EVEN( TT_ExecContext exc, ++ FT_Long* args ) + { + args[0] = ( ( exc->func_round( exc, args[0], 0 ) & 127 ) == 0 ); + } +@@ -3527,7 +3539,7 @@ + /* Stack: uint32 uint32 --> uint32 */ + /* */ + static void +- Ins_AND( INS_ARG ) ++ Ins_AND( FT_Long* args ) + { + args[0] = ( args[0] && args[1] ); + } +@@ -3540,7 +3552,7 @@ + /* Stack: uint32 uint32 --> uint32 */ + /* */ + static void +- Ins_OR( INS_ARG ) ++ Ins_OR( FT_Long* args ) + { + args[0] = ( args[0] || args[1] ); + } +@@ -3553,7 +3565,7 @@ + /* Stack: StkElt --> uint32 */ + /* */ + static void +- Ins_NOT( INS_ARG ) ++ Ins_NOT( FT_Long* args ) + { + args[0] = !args[0]; + } +@@ -3566,7 +3578,7 @@ + /* Stack: f26.6 f26.6 --> f26.6 */ + /* */ + static void +- Ins_ADD( INS_ARG ) ++ Ins_ADD( FT_Long* args ) + { + args[0] += args[1]; + } +@@ -3579,7 +3591,7 @@ + /* Stack: f26.6 f26.6 --> f26.6 */ + /* */ + static void +- Ins_SUB( INS_ARG ) ++ Ins_SUB( FT_Long* args ) + { + args[0] -= args[1]; + } +@@ -3592,7 +3604,8 @@ + /* Stack: f26.6 f26.6 --> f26.6 */ + /* */ + static void +- Ins_DIV( INS_ARG ) ++ Ins_DIV( TT_ExecContext exc, ++ FT_Long* args ) + { + if ( args[1] == 0 ) + exc->error = FT_THROW( Divide_By_Zero ); +@@ -3608,7 +3621,7 @@ + /* Stack: f26.6 f26.6 --> f26.6 */ + /* */ + static void +- Ins_MUL( INS_ARG ) ++ Ins_MUL( FT_Long* args ) + { + args[0] = FT_MulDiv( args[0], args[1], 64L ); + } +@@ -3621,7 +3634,7 @@ + /* Stack: f26.6 --> f26.6 */ + /* */ + static void +- Ins_ABS( INS_ARG ) ++ Ins_ABS( FT_Long* args ) + { + args[0] = FT_ABS( args[0] ); + } +@@ -3634,7 +3647,7 @@ + /* Stack: f26.6 --> f26.6 */ + /* */ + static void +- Ins_NEG( INS_ARG ) ++ Ins_NEG( FT_Long* args ) + { + args[0] = -args[0]; + } +@@ -3647,7 +3660,7 @@ + /* Stack: f26.6 --> f26.6 */ + /* */ + static void +- Ins_FLOOR( INS_ARG ) ++ Ins_FLOOR( FT_Long* args ) + { + args[0] = FT_PIX_FLOOR( args[0] ); + } +@@ -3660,7 +3673,7 @@ + /* Stack: f26.6 --> f26.6 */ + /* */ + static void +- Ins_CEILING( INS_ARG ) ++ Ins_CEILING( FT_Long* args ) + { + args[0] = FT_PIX_CEIL( args[0] ); + } +@@ -3673,7 +3686,8 @@ + /* Stack: uint32 --> uint32 */ + /* */ + static void +- Ins_RS( INS_ARG ) ++ Ins_RS( TT_ExecContext exc, ++ FT_Long* args ) + { + #ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING + +@@ -3735,7 +3749,8 @@ + /* Stack: uint32 uint32 --> */ + /* */ + static void +- Ins_WS( INS_ARG ) ++ Ins_WS( TT_ExecContext exc, ++ FT_Long* args ) + { + FT_ULong I = (FT_ULong)args[0]; + +@@ -3757,7 +3772,8 @@ + /* Stack: f26.6 uint32 --> */ + /* */ + static void +- Ins_WCVTP( INS_ARG ) ++ Ins_WCVTP( TT_ExecContext exc, ++ FT_Long* args ) + { + FT_ULong I = (FT_ULong)args[0]; + +@@ -3779,7 +3795,8 @@ + /* Stack: uint32 uint32 --> */ + /* */ + static void +- Ins_WCVTF( INS_ARG ) ++ Ins_WCVTF( TT_ExecContext exc, ++ FT_Long* args ) + { + FT_ULong I = (FT_ULong)args[0]; + +@@ -3801,7 +3818,8 @@ + /* Stack: uint32 --> f26.6 */ + /* */ + static void +- Ins_RCVT( INS_ARG ) ++ Ins_RCVT( TT_ExecContext exc, ++ FT_Long* args ) + { + FT_ULong I = (FT_ULong)args[0]; + +@@ -3825,7 +3843,7 @@ + /* Stack: uint32 --> */ + /* */ + static void +- Ins_AA( INS_ARG ) ++ Ins_AA( void ) + { + /* intentionally no longer supported */ + } +@@ -3840,7 +3858,7 @@ + /* Note: The original instruction pops a value from the stack. */ + /* */ + static void +- Ins_DEBUG( INS_ARG ) ++ Ins_DEBUG( TT_ExecContext exc ) + { + exc->error = FT_THROW( Debug_OpCode ); + } +@@ -3853,7 +3871,8 @@ + /* Stack: f26.6 --> f26.6 */ + /* */ + static void +- Ins_ROUND( INS_ARG ) ++ Ins_ROUND( TT_ExecContext exc, ++ FT_Long* args ) + { + args[0] = exc->func_round( + exc, +@@ -3869,11 +3888,13 @@ + /* Stack: f26.6 --> f26.6 */ + /* */ + static void +- Ins_NROUND( INS_ARG ) ++ Ins_NROUND( TT_ExecContext exc, ++ FT_Long* args ) + { +- args[0] = Round_None( exc, +- args[0], +- exc->tt_metrics.compensations[exc->opcode - 0x6C] ); ++ args[0] = Round_None( ++ exc, ++ args[0], ++ exc->tt_metrics.compensations[exc->opcode - 0x6C] ); + } + + +@@ -3884,7 +3905,7 @@ + /* Stack: int32? int32? --> int32 */ + /* */ + static void +- Ins_MAX( INS_ARG ) ++ Ins_MAX( FT_Long* args ) + { + if ( args[1] > args[0] ) + args[0] = args[1]; +@@ -3898,7 +3919,7 @@ + /* Stack: int32? int32? --> int32 */ + /* */ + static void +- Ins_MIN( INS_ARG ) ++ Ins_MIN( FT_Long* args ) + { + if ( args[1] < args[0] ) + args[0] = args[1]; +@@ -3912,7 +3933,8 @@ + /* Stack: int32? --> StkElt */ + /* */ + static void +- Ins_MINDEX( INS_ARG ) ++ Ins_MINDEX( TT_ExecContext exc, ++ FT_Long* args ) + { + FT_Long L, K; + +@@ -3944,12 +3966,10 @@ + /* Stack: 3 * StkElt --> 3 * StkElt */ + /* */ + static void +- Ins_ROLL( INS_ARG ) ++ Ins_ROLL( FT_Long* args ) + { + FT_Long A, B, C; + +- FT_UNUSED_EXEC; +- + + A = args[2]; + B = args[1]; +@@ -4004,7 +4024,8 @@ + /* Stack: StkElt --> */ + /* */ + static void +- Ins_IF( INS_ARG ) ++ Ins_IF( TT_ExecContext exc, ++ FT_Long* args ) + { + FT_Int nIfs; + FT_Bool Out; +@@ -4047,12 +4068,10 @@ + /* Stack: --> */ + /* */ + static void +- Ins_ELSE( INS_ARG ) ++ Ins_ELSE( TT_ExecContext exc ) + { + FT_Int nIfs; + +- FT_UNUSED_ARG; +- + + nIfs = 1; + +@@ -4091,7 +4110,8 @@ + /* Stack: uint32 --> */ + /* */ + static void +- Ins_FDEF( INS_ARG ) ++ Ins_FDEF( TT_ExecContext exc, ++ FT_Long* args ) + { + FT_ULong n; + TT_DefRecord* rec; +@@ -4386,12 +4406,10 @@ + /* Stack: --> */ + /* */ + static void +- Ins_ENDF( INS_ARG ) ++ Ins_ENDF( TT_ExecContext exc ) + { + TT_CallRec* pRec; + +- FT_UNUSED_ARG; +- + + #ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING + exc->sph_in_func_flags = 0x0000; +@@ -4437,7 +4455,8 @@ + /* Stack: uint32? --> */ + /* */ + static void +- Ins_CALL( INS_ARG ) ++ Ins_CALL( TT_ExecContext exc, ++ FT_Long* args ) + { + FT_ULong F; + TT_CallRec* pCrec; +@@ -4525,7 +4544,8 @@ + /* Stack: uint32? Eint16? --> */ + /* */ + static void +- Ins_LOOPCALL( INS_ARG ) ++ Ins_LOOPCALL( TT_ExecContext exc, ++ FT_Long* args ) + { + FT_ULong F; + TT_CallRec* pCrec; +@@ -4613,7 +4633,8 @@ + /* Stack: Eint8 --> */ + /* */ + static void +- Ins_IDEF( INS_ARG ) ++ Ins_IDEF( TT_ExecContext exc, ++ FT_Long* args ) + { + TT_DefRecord* def; + TT_DefRecord* limit; +@@ -4688,7 +4709,8 @@ + /* Stack: --> uint32... */ + /* */ + static void +- Ins_NPUSHB( INS_ARG ) ++ Ins_NPUSHB( TT_ExecContext exc, ++ FT_Long* args ) + { + FT_UShort L, K; + +@@ -4715,7 +4737,8 @@ + /* Stack: --> int32... */ + /* */ + static void +- Ins_NPUSHW( INS_ARG ) ++ Ins_NPUSHW( TT_ExecContext exc, ++ FT_Long* args ) + { + FT_UShort L, K; + +@@ -4745,7 +4768,8 @@ + /* Stack: --> uint32... */ + /* */ + static void +- Ins_PUSHB( INS_ARG ) ++ Ins_PUSHB( TT_ExecContext exc, ++ FT_Long* args ) + { + FT_UShort L, K; + +@@ -4770,7 +4794,8 @@ + /* Stack: --> int32... */ + /* */ + static void +- Ins_PUSHW( INS_ARG ) ++ Ins_PUSHW( TT_ExecContext exc, ++ FT_Long* args ) + { + FT_UShort L, K; + +@@ -4811,7 +4836,8 @@ + /* along the dual projection vector! */ + /* */ + static void +- Ins_GC( INS_ARG ) ++ Ins_GC( TT_ExecContext exc, ++ FT_Long* args ) + { + FT_ULong L; + FT_F26Dot6 R; +@@ -4848,7 +4874,8 @@ + /* OA := OA + ( value - OA.p )/( f.p ) * f */ + /* */ + static void +- Ins_SCFS( INS_ARG ) ++ Ins_SCFS( TT_ExecContext exc, ++ FT_Long* args ) + { + FT_Long K; + FT_UShort L; +@@ -4890,7 +4917,8 @@ + /* XXX: UNDOCUMENTED: `zp0 - zp1', and not `zp2 - zp1! */ + /* */ + static void +- Ins_MD( INS_ARG ) ++ Ins_MD( TT_ExecContext exc, ++ FT_Long* args ) + { + FT_UShort K, L; + FT_F26Dot6 D; +@@ -4966,7 +4994,8 @@ + /* Stack: uint32 uint32 --> */ + /* */ + static void +- Ins_SDPVTL( INS_ARG ) ++ Ins_SDPVTL( TT_ExecContext exc, ++ FT_Long* args ) + { + FT_Long A, B, C; + FT_UShort p1, p2; /* was FT_Int in pas type ERROR */ +@@ -5048,7 +5077,8 @@ + /* Stack: uint32 --> */ + /* */ + static void +- Ins_SZP0( INS_ARG ) ++ Ins_SZP0( TT_ExecContext exc, ++ FT_Long* args ) + { + switch ( (FT_Int)args[0] ) + { +@@ -5077,7 +5107,8 @@ + /* Stack: uint32 --> */ + /* */ + static void +- Ins_SZP1( INS_ARG ) ++ Ins_SZP1( TT_ExecContext exc, ++ FT_Long* args ) + { + switch ( (FT_Int)args[0] ) + { +@@ -5106,7 +5137,8 @@ + /* Stack: uint32 --> */ + /* */ + static void +- Ins_SZP2( INS_ARG ) ++ Ins_SZP2( TT_ExecContext exc, ++ FT_Long* args ) + { + switch ( (FT_Int)args[0] ) + { +@@ -5135,7 +5167,8 @@ + /* Stack: uint32 --> */ + /* */ + static void +- Ins_SZPS( INS_ARG ) ++ Ins_SZPS( TT_ExecContext exc, ++ FT_Long* args ) + { + switch ( (FT_Int)args[0] ) + { +@@ -5169,7 +5202,8 @@ + /* Stack: int32 int32 --> */ + /* */ + static void +- Ins_INSTCTRL( INS_ARG ) ++ Ins_INSTCTRL( TT_ExecContext exc, ++ FT_Long* args ) + { + FT_Long K, L; + +@@ -5199,7 +5233,8 @@ + /* Stack: uint32? --> */ + /* */ + static void +- Ins_SCANCTRL( INS_ARG ) ++ Ins_SCANCTRL( TT_ExecContext exc, ++ FT_Long* args ) + { + FT_Int A; + +@@ -5245,7 +5280,8 @@ + /* Stack: uint32? --> */ + /* */ + static void +- Ins_SCANTYPE( INS_ARG ) ++ Ins_SCANTYPE( TT_ExecContext exc, ++ FT_Long* args ) + { + if ( args[0] >= 0 ) + exc->GS.scan_type = (FT_Int)args[0]; +@@ -5268,12 +5304,10 @@ + /* Stack: uint32... --> */ + /* */ + static void +- Ins_FLIPPT( INS_ARG ) ++ Ins_FLIPPT( TT_ExecContext exc ) + { + FT_UShort point; + +- FT_UNUSED_ARG; +- + + if ( exc->top < exc->GS.loop ) + { +@@ -5315,7 +5349,8 @@ + /* Stack: uint32 uint32 --> */ + /* */ + static void +- Ins_FLIPRGON( INS_ARG ) ++ Ins_FLIPRGON( TT_ExecContext exc, ++ FT_Long* args ) + { + FT_UShort I, K, L; + +@@ -5343,7 +5378,8 @@ + /* Stack: uint32 uint32 --> */ + /* */ + static void +- Ins_FLIPRGOFF( INS_ARG ) ++ Ins_FLIPRGOFF( TT_ExecContext exc, ++ FT_Long* args ) + { + FT_UShort I, K, L; + +@@ -5474,17 +5510,14 @@ + /* Stack: uint32... --> */ + /* */ + static void +- Ins_SHP( INS_ARG ) ++ Ins_SHP( TT_ExecContext exc ) + { + TT_GlyphZoneRec zp; + FT_UShort refp; + +- FT_F26Dot6 dx, +- dy; ++ FT_F26Dot6 dx, dy; + FT_UShort point; + +- FT_UNUSED_ARG; +- + + if ( exc->top < exc->GS.loop ) + { +@@ -5539,7 +5572,8 @@ + /* zero which includes all points of it. */ + /* */ + static void +- Ins_SHC( INS_ARG ) ++ Ins_SHC( TT_ExecContext exc, ++ FT_Long* args ) + { + TT_GlyphZoneRec zp; + FT_UShort refp; +@@ -5590,7 +5624,8 @@ + /* Stack: uint32 --> */ + /* */ + static void +- Ins_SHZ( INS_ARG ) ++ Ins_SHZ( TT_ExecContext exc, ++ FT_Long* args ) + { + TT_GlyphZoneRec zp; + FT_UShort refp; +@@ -5637,7 +5672,8 @@ + /* Stack: f26.6 uint32... --> */ + /* */ + static void +- Ins_SHPIX( INS_ARG ) ++ Ins_SHPIX( TT_ExecContext exc, ++ FT_Long* args ) + { + FT_F26Dot6 dx, dy; + FT_UShort point; +@@ -5789,7 +5825,8 @@ + /* Stack: f26.6 uint32 --> */ + /* */ + static void +- Ins_MSIRP( INS_ARG ) ++ Ins_MSIRP( TT_ExecContext exc, ++ FT_Long* args ) + { + FT_UShort point; + FT_F26Dot6 distance; +@@ -5857,7 +5894,8 @@ + /* Stack: uint32 --> */ + /* */ + static void +- Ins_MDAP( INS_ARG ) ++ Ins_MDAP( TT_ExecContext exc, ++ FT_Long* args ) + { + FT_UShort point; + FT_F26Dot6 cur_dist; +@@ -5908,7 +5946,8 @@ + /* Stack: uint32 uint32 --> */ + /* */ + static void +- Ins_MIAP( INS_ARG ) ++ Ins_MIAP( TT_ExecContext exc, ++ FT_Long* args ) + { + FT_ULong cvtEntry; + FT_UShort point; +@@ -6020,7 +6059,8 @@ + /* Stack: uint32 --> */ + /* */ + static void +- Ins_MDRP( INS_ARG ) ++ Ins_MDRP( TT_ExecContext exc, ++ FT_Long* args ) + { + FT_UShort point; + FT_F26Dot6 org_dist, distance, minimum_distance; +@@ -6157,7 +6197,8 @@ + /* Stack: int32? uint32 --> */ + /* */ + static void +- Ins_MIRP( INS_ARG ) ++ Ins_MIRP( TT_ExecContext exc, ++ FT_Long* args ) + { + FT_UShort point; + FT_ULong cvtEntry; +@@ -6384,13 +6425,11 @@ + /* Stack: uint32 uint32... --> */ + /* */ + static void +- Ins_ALIGNRP( INS_ARG ) ++ Ins_ALIGNRP( TT_ExecContext exc ) + { + FT_UShort point; + FT_F26Dot6 distance; + +- FT_UNUSED_ARG; +- + + #ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING + if ( SUBPIXEL_HINTING && +@@ -6449,7 +6488,8 @@ + /* Stack: 5 * uint32 --> */ + /* */ + static void +- Ins_ISECT( INS_ARG ) ++ Ins_ISECT( TT_ExecContext exc, ++ FT_Long* args ) + { + FT_UShort point, + a0, a1, +@@ -6543,7 +6583,8 @@ + /* Stack: uint32 uint32 --> */ + /* */ + static void +- Ins_ALIGNPTS( INS_ARG ) ++ Ins_ALIGNPTS( TT_ExecContext exc, ++ FT_Long* args ) + { + FT_UShort p1, p2; + FT_F26Dot6 distance; +@@ -6577,15 +6618,13 @@ + /* SOMETIMES, DUMBER CODE IS BETTER CODE */ + + static void +- Ins_IP( INS_ARG ) ++ Ins_IP( TT_ExecContext exc ) + { + FT_F26Dot6 old_range, cur_range; + FT_Vector* orus_base; + FT_Vector* cur_base; + FT_Int twilight; + +- FT_UNUSED_ARG; +- + + if ( exc->top < exc->GS.loop ) + { +@@ -6730,7 +6769,8 @@ + /* Stack: uint32 --> */ + /* */ + static void +- Ins_UTP( INS_ARG ) ++ Ins_UTP( TT_ExecContext exc, ++ FT_Long* args ) + { + FT_UShort point; + FT_Byte mask; +@@ -6890,7 +6930,7 @@ + /* Stack: --> */ + /* */ + static void +- Ins_IUP( INS_ARG ) ++ Ins_IUP( TT_ExecContext exc ) + { + IUP_WorkerRec V; + FT_Byte mask; +@@ -6904,8 +6944,6 @@ + FT_UInt point; /* current point */ + FT_Short contour; /* current contour */ + +- FT_UNUSED_ARG; +- + + /* ignore empty outlines */ + if ( exc->pts.n_contours == 0 ) +@@ -7003,7 +7041,8 @@ + /* Stack: uint32 (2 * uint32)... --> */ + /* */ + static void +- Ins_DELTAP( INS_ARG ) ++ Ins_DELTAP( TT_ExecContext exc, ++ FT_Long* args ) + { + FT_ULong nump, k; + FT_UShort A; +@@ -7174,7 +7213,8 @@ + /* Stack: uint32 (2 * uint32)... --> */ + /* */ + static void +- Ins_DELTAC( INS_ARG ) ++ Ins_DELTAC( TT_ExecContext exc, ++ FT_Long* args ) + { + FT_ULong nump, k; + FT_ULong A, C, P; +@@ -7278,7 +7318,8 @@ + /* Stack: uint32 --> uint32 */ + /* */ + static void +- Ins_GETINFO( INS_ARG ) ++ Ins_GETINFO( TT_ExecContext exc, ++ FT_Long* args ) + { + FT_Long K; + +@@ -7393,13 +7434,11 @@ + + + static void +- Ins_UNKNOWN( INS_ARG ) ++ Ins_UNKNOWN( TT_ExecContext exc ) + { + TT_DefRecord* def = exc->IDefs; + TT_DefRecord* limit = def + exc->numIDefs; + +- FT_UNUSED_ARG; +- + + for ( ; def < limit; def++ ) + { +@@ -7610,7 +7649,7 @@ + case 0x03: /* SPvTCA x */ + case 0x04: /* SFvTCA y */ + case 0x05: /* SFvTCA x */ +- Ins_SxyTCA( exc, args ); ++ Ins_SxyTCA( exc ); + break; + + case 0x06: /* SPvTL // */ +@@ -7640,7 +7679,7 @@ + break; + + case 0x0E: /* SFvTPv */ +- Ins_SFVTPV( exc, args ); ++ Ins_SFVTPV( exc ); + break; + + case 0x0F: /* ISECT */ +@@ -7680,11 +7719,11 @@ + break; + + case 0x18: /* RTG */ +- Ins_RTG( exc, args ); ++ Ins_RTG( exc ); + break; + + case 0x19: /* RTHG */ +- Ins_RTHG( exc, args ); ++ Ins_RTHG( exc ); + break; + + case 0x1A: /* SMD */ +@@ -7692,7 +7731,7 @@ + break; + + case 0x1B: /* ELSE */ +- Ins_ELSE( exc, args ); ++ Ins_ELSE( exc ); + break; + + case 0x1C: /* JMPR */ +@@ -7712,19 +7751,19 @@ + break; + + case 0x20: /* DUP */ +- Ins_DUP( exc, args ); ++ Ins_DUP( args ); + break; + + case 0x21: /* POP */ +- Ins_POP( exc, args ); ++ Ins_POP(); + break; + + case 0x22: /* CLEAR */ +- Ins_CLEAR( exc, args ); ++ Ins_CLEAR( exc ); + break; + + case 0x23: /* SWAP */ +- Ins_SWAP( exc, args ); ++ Ins_SWAP( args ); + break; + + case 0x24: /* DEPTH */ +@@ -7744,7 +7783,7 @@ + break; + + case 0x28: /* ???? */ +- Ins_UNKNOWN( exc, args ); ++ Ins_UNKNOWN( exc ); + break; + + case 0x29: /* UTP */ +@@ -7764,7 +7803,7 @@ + break; + + case 0x2D: /* ENDF */ +- Ins_ENDF( exc, args ); ++ Ins_ENDF( exc ); + break; + + case 0x2E: /* MDAP */ +@@ -7774,12 +7813,12 @@ + + case 0x30: /* IUP */ + case 0x31: /* IUP */ +- Ins_IUP( exc, args ); ++ Ins_IUP( exc ); + break; + + case 0x32: /* SHP */ + case 0x33: /* SHP */ +- Ins_SHP( exc, args ); ++ Ins_SHP( exc ); + break; + + case 0x34: /* SHC */ +@@ -7797,7 +7836,7 @@ + break; + + case 0x39: /* IP */ +- Ins_IP( exc, args ); ++ Ins_IP( exc ); + break; + + case 0x3A: /* MSIRP */ +@@ -7806,11 +7845,11 @@ + break; + + case 0x3C: /* AlignRP */ +- Ins_ALIGNRP( exc, args ); ++ Ins_ALIGNRP( exc ); + break; + + case 0x3D: /* RTDG */ +- Ins_RTDG( exc, args ); ++ Ins_RTDG( exc ); + break; + + case 0x3E: /* MIAP */ +@@ -7865,39 +7904,39 @@ + break; + + case 0x4D: /* FLIPON */ +- Ins_FLIPON( exc, args ); ++ Ins_FLIPON( exc ); + break; + + case 0x4E: /* FLIPOFF */ +- Ins_FLIPOFF( exc, args ); ++ Ins_FLIPOFF( exc ); + break; + + case 0x4F: /* DEBUG */ +- Ins_DEBUG( exc, args ); ++ Ins_DEBUG( exc ); + break; + + case 0x50: /* LT */ +- Ins_LT( exc, args ); ++ Ins_LT( args ); + break; + + case 0x51: /* LTEQ */ +- Ins_LTEQ( exc, args ); ++ Ins_LTEQ( args ); + break; + + case 0x52: /* GT */ +- Ins_GT( exc, args ); ++ Ins_GT( args ); + break; + + case 0x53: /* GTEQ */ +- Ins_GTEQ( exc, args ); ++ Ins_GTEQ( args ); + break; + + case 0x54: /* EQ */ +- Ins_EQ( exc, args ); ++ Ins_EQ( args ); + break; + + case 0x55: /* NEQ */ +- Ins_NEQ( exc, args ); ++ Ins_NEQ( args ); + break; + + case 0x56: /* ODD */ +@@ -7913,19 +7952,19 @@ + break; + + case 0x59: /* EIF */ +- Ins_EIF( exc, args ); ++ Ins_EIF(); + break; + + case 0x5A: /* AND */ +- Ins_AND( exc, args ); ++ Ins_AND( args ); + break; + + case 0x5B: /* OR */ +- Ins_OR( exc, args ); ++ Ins_OR( args ); + break; + + case 0x5C: /* NOT */ +- Ins_NOT( exc, args ); ++ Ins_NOT( args ); + break; + + case 0x5D: /* DELTAP1 */ +@@ -7941,11 +7980,11 @@ + break; + + case 0x60: /* ADD */ +- Ins_ADD( exc, args ); ++ Ins_ADD( args ); + break; + + case 0x61: /* SUB */ +- Ins_SUB( exc, args ); ++ Ins_SUB( args ); + break; + + case 0x62: /* DIV */ +@@ -7953,23 +7992,23 @@ + break; + + case 0x63: /* MUL */ +- Ins_MUL( exc, args ); ++ Ins_MUL( args ); + break; + + case 0x64: /* ABS */ +- Ins_ABS( exc, args ); ++ Ins_ABS( args ); + break; + + case 0x65: /* NEG */ +- Ins_NEG( exc, args ); ++ Ins_NEG( args ); + break; + + case 0x66: /* FLOOR */ +- Ins_FLOOR( exc, args ); ++ Ins_FLOOR( args ); + break; + + case 0x67: /* CEILING */ +- Ins_CEILING( exc, args ); ++ Ins_CEILING( args ); + break; + + case 0x68: /* ROUND */ +@@ -8018,31 +8057,31 @@ + break; + + case 0x7A: /* ROFF */ +- Ins_ROFF( exc, args ); ++ Ins_ROFF( exc ); + break; + + case 0x7B: /* ???? */ +- Ins_UNKNOWN( exc, args ); ++ Ins_UNKNOWN( exc ); + break; + + case 0x7C: /* RUTG */ +- Ins_RUTG( exc, args ); ++ Ins_RUTG( exc ); + break; + + case 0x7D: /* RDTG */ +- Ins_RDTG( exc, args ); ++ Ins_RDTG( exc ); + break; + + case 0x7E: /* SANGW */ +- Ins_SANGW( exc, args ); ++ Ins_SANGW(); + break; + + case 0x7F: /* AA */ +- Ins_AA( exc, args ); ++ Ins_AA(); + break; + + case 0x80: /* FLIPPT */ +- Ins_FLIPPT( exc, args ); ++ Ins_FLIPPT( exc ); + break; + + case 0x81: /* FLIPRGON */ +@@ -8055,7 +8094,7 @@ + + case 0x83: /* UNKNOWN */ + case 0x84: /* UNKNOWN */ +- Ins_UNKNOWN( exc, args ); ++ Ins_UNKNOWN( exc ); + break; + + case 0x85: /* SCANCTRL */ +@@ -8076,15 +8115,15 @@ + break; + + case 0x8A: /* ROLL */ +- Ins_ROLL( exc, args ); ++ Ins_ROLL( args ); + break; + + case 0x8B: /* MAX */ +- Ins_MAX( exc, args ); ++ Ins_MAX( args ); + break; + + case 0x8C: /* MIN */ +- Ins_MIN( exc, args ); ++ Ins_MIN( args ); + break; + + case 0x8D: /* SCANTYPE */ +@@ -8096,7 +8135,7 @@ + break; + + case 0x8F: +- Ins_UNKNOWN( exc, args ); ++ Ins_UNKNOWN( exc ); + break; + + default: +@@ -8109,7 +8148,7 @@ + else if ( opcode >= 0xB0 ) + Ins_PUSHB( exc, args ); + else +- Ins_UNKNOWN( exc, args ); ++ Ins_UNKNOWN( exc ); + } + } + +-- +2.2.2 + +From 4aaadf4610b37f73a868697274506e31a71104e4 Mon Sep 17 00:00:00 2001 +From: Werner Lemberg <wl@gnu.org> +Date: Sun, 11 Jan 2015 08:42:28 +0100 +Subject: [PATCH] [truetype] More macro expansions. + +* src/truetype/ttinterp.c (FT_UNUSED_EXEC): Remove macro by +expansion. +--- + ChangeLog | 7 +++++++ + src/truetype/ttinterp.c | 34 +++++++++++++--------------------- + 2 files changed, 20 insertions(+), 21 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index 878c82b..8ab57c4 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -2,6 +2,13 @@ + + [truetype] More macro expansions. + ++ * src/truetype/ttinterp.c (FT_UNUSED_EXEC): Remove macro by ++ expansion. ++ ++2015-01-11 Werner Lemberg <wl@gnu.org> ++ ++ [truetype] More macro expansions. ++ + * src/truetype/ttinterp.c (INS_ARG): Remove macro by expansion, + adjusting funtion calls where necessary. + (FT_UNUSED_ARG): Removed, no longer needed. +diff --git a/src/truetype/ttinterp.c b/src/truetype/ttinterp.c +index 91ddb9b..82e79d0 100644 +--- a/src/truetype/ttinterp.c ++++ b/src/truetype/ttinterp.c +@@ -53,14 +53,6 @@ + #define MAX_RUNNABLE_OPCODES 1000000L + + +- /*************************************************************************/ +- /* */ +- /* This macro is used whenever `exec' is unused in a function, to avoid */ +- /* stupid warnings from pedantic compilers. */ +- /* */ +-#define FT_UNUSED_EXEC FT_UNUSED( exc ) +- +- + #define SUBPIXEL_HINTING \ + ( ((TT_Driver)FT_FACE_DRIVER( exc->face ))->interpreter_version == \ + TT_INTERPRETER_VERSION_38 ) +@@ -1809,7 +1801,7 @@ + FT_UShort point, + FT_F26Dot6 distance ) + { +- FT_UNUSED_EXEC; ++ FT_UNUSED( exc ); + + #ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING + if ( !SUBPIXEL_HINTING || +@@ -1827,7 +1819,7 @@ + FT_UShort point, + FT_F26Dot6 distance ) + { +- FT_UNUSED_EXEC; ++ FT_UNUSED( exc ); + + zone->cur[point].y += distance; + zone->tags[point] |= FT_CURVE_TAG_TOUCH_Y; +@@ -1850,7 +1842,7 @@ + FT_UShort point, + FT_F26Dot6 distance ) + { +- FT_UNUSED_EXEC; ++ FT_UNUSED( exc ); + + zone->org[point].x += distance; + } +@@ -1862,7 +1854,7 @@ + FT_UShort point, + FT_F26Dot6 distance ) + { +- FT_UNUSED_EXEC; ++ FT_UNUSED( exc ); + + zone->org[point].y += distance; + } +@@ -1897,7 +1889,7 @@ + { + FT_F26Dot6 val; + +- FT_UNUSED_EXEC; ++ FT_UNUSED( exc ); + + + if ( distance >= 0 ) +@@ -1939,7 +1931,7 @@ + { + FT_F26Dot6 val; + +- FT_UNUSED_EXEC; ++ FT_UNUSED( exc ); + + + if ( distance >= 0 ) +@@ -1982,7 +1974,7 @@ + { + FT_F26Dot6 val; + +- FT_UNUSED_EXEC; ++ FT_UNUSED( exc ); + + + if ( distance >= 0 ) +@@ -2025,7 +2017,7 @@ + { + FT_F26Dot6 val; + +- FT_UNUSED_EXEC; ++ FT_UNUSED( exc ); + + + if ( distance >= 0 ) +@@ -2068,7 +2060,7 @@ + { + FT_F26Dot6 val; + +- FT_UNUSED_EXEC; ++ FT_UNUSED( exc ); + + + if ( distance >= 0 ) +@@ -2111,7 +2103,7 @@ + { + FT_F26Dot6 val; + +- FT_UNUSED_EXEC; ++ FT_UNUSED( exc ); + + + if ( distance >= 0 ) +@@ -2431,7 +2423,7 @@ + FT_Pos dx, + FT_Pos dy ) + { +- FT_UNUSED_EXEC; ++ FT_UNUSED( exc ); + FT_UNUSED( dy ); + + return dx; +@@ -2459,7 +2451,7 @@ + FT_Pos dx, + FT_Pos dy ) + { +- FT_UNUSED_EXEC; ++ FT_UNUSED( exc ); + FT_UNUSED( dx ); + + return dy; +@@ -2604,7 +2596,7 @@ + { + FT_F26Dot6 W; + +- FT_UNUSED_EXEC; ++ FT_UNUSED( exc ); + + + if ( FT_ABS( Vx ) < 0x4000L && FT_ABS( Vy ) < 0x4000L ) +-- +2.2.2 + +From 08e7909a5818de4c71c9a54b7ae66b3ad01c65d8 Mon Sep 17 00:00:00 2001 +From: Werner Lemberg <wl@gnu.org> +Date: Sun, 11 Jan 2015 08:45:50 +0100 +Subject: [PATCH] * src/truetype/ttinterp.c (Normalize): Remove unused + argument. + +--- + ChangeLog | 4 ++++ + src/truetype/ttinterp.c | 17 +++++++---------- + 2 files changed, 11 insertions(+), 10 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index 8ab57c4..755db2c 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,5 +1,9 @@ + 2015-01-11 Werner Lemberg <wl@gnu.org> + ++ * src/truetype/ttinterp.c (Normalize): Remove unused argument. ++ ++2015-01-11 Werner Lemberg <wl@gnu.org> ++ + [truetype] More macro expansions. + + * src/truetype/ttinterp.c (FT_UNUSED_EXEC): Remove macro by +diff --git a/src/truetype/ttinterp.c b/src/truetype/ttinterp.c +index 82e79d0..f35c5c6 100644 +--- a/src/truetype/ttinterp.c ++++ b/src/truetype/ttinterp.c +@@ -2585,19 +2585,16 @@ + /* Returns FAILURE if a vector parameter is zero. */ + /* */ + /* <Note> */ +- /* In case Vx and Vy are both zero, Normalize() returns SUCCESS, and */ ++ /* In case Vx and Vy are both zero, `Normalize' returns SUCCESS, and */ + /* R is undefined. */ + /* */ + static FT_Bool +- Normalize( TT_ExecContext exc, +- FT_F26Dot6 Vx, ++ Normalize( FT_F26Dot6 Vx, + FT_F26Dot6 Vy, + FT_UnitVector* R ) + { + FT_F26Dot6 W; + +- FT_UNUSED( exc ); +- + + if ( FT_ABS( Vx ) < 0x4000L && FT_ABS( Vy ) < 0x4000L ) + { +@@ -2672,7 +2669,7 @@ + A = -C; + } + +- Normalize( exc, A, B, Vec ); ++ Normalize( A, B, Vec ); + + return SUCCESS; + } +@@ -2813,7 +2810,7 @@ + S = (FT_Short)args[0]; + X = (FT_Long)S; + +- Normalize( exc, X, Y, &exc->GS.projVector ); ++ Normalize( X, Y, &exc->GS.projVector ); + + exc->GS.dualVector = exc->GS.projVector; + GUESS_VECTOR( freeVector ); +@@ -2841,7 +2838,7 @@ + S = (FT_Short)args[0]; + X = S; + +- Normalize( exc, X, Y, &exc->GS.freeVector ); ++ Normalize( X, Y, &exc->GS.freeVector ); + GUESS_VECTOR( projVector ); + Compute_Funcs( exc ); + } +@@ -5032,7 +5029,7 @@ + A = -C; + } + +- Normalize( exc, A, B, &exc->GS.dualVector ); ++ Normalize( A, B, &exc->GS.dualVector ); + + { + FT_Vector* v1 = exc->zp1.cur + p2; +@@ -5056,7 +5053,7 @@ + A = -C; + } + +- Normalize( exc, A, B, &exc->GS.projVector ); ++ Normalize( A, B, &exc->GS.projVector ); + GUESS_VECTOR( freeVector ); + Compute_Funcs( exc ); + } +-- +2.2.2 + +From 628578c6558abe6e1106f7d23e6466c06b9ce153 Mon Sep 17 00:00:00 2001 +From: Werner Lemberg <wl@gnu.org> +Date: Sun, 11 Jan 2015 08:53:31 +0100 +Subject: [PATCH] * src/truetype/ttinterp.c (Ins_SxVTL): Simplify function + call. + +--- + ChangeLog | 4 ++++ + src/truetype/ttinterp.c | 29 +++++++++++++++-------------- + 2 files changed, 19 insertions(+), 14 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index 755db2c..8b3fe5f 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,5 +1,9 @@ + 2015-01-11 Werner Lemberg <wl@gnu.org> + ++ * src/truetype/ttinterp.c (Ins_SxVTL): Simplify function call. ++ ++2015-01-11 Werner Lemberg <wl@gnu.org> ++ + * src/truetype/ttinterp.c (Normalize): Remove unused argument. + + 2015-01-11 Werner Lemberg <wl@gnu.org> +diff --git a/src/truetype/ttinterp.c b/src/truetype/ttinterp.c +index f35c5c6..b530ec8 100644 +--- a/src/truetype/ttinterp.c ++++ b/src/truetype/ttinterp.c +@@ -2629,13 +2629,14 @@ + Ins_SxVTL( TT_ExecContext exc, + FT_UShort aIdx1, + FT_UShort aIdx2, +- FT_Int aOpc, + FT_UnitVector* Vec ) + { + FT_Long A, B, C; + FT_Vector* p1; + FT_Vector* p2; + ++ FT_Byte opcode = exc->opcode; ++ + + if ( BOUNDS( aIdx1, exc->zp2.n_points ) || + BOUNDS( aIdx2, exc->zp1.n_points ) ) +@@ -2658,11 +2659,11 @@ + + if ( A == 0 && B == 0 ) + { +- A = 0x4000; +- aOpc = 0; ++ A = 0x4000; ++ opcode = 0; + } + +- if ( ( aOpc & 1 ) != 0 ) ++ if ( ( opcode & 1 ) != 0 ) + { + C = B; /* counter clockwise rotation */ + B = A; +@@ -2701,7 +2702,8 @@ + Ins_SxyTCA( TT_ExecContext exc ) + { + FT_Short AA, BB; +- FT_Byte opcode = exc->opcode; ++ ++ FT_Byte opcode = exc->opcode; + + + AA = (FT_Short)( ( opcode & 1 ) << 14 ); +@@ -2743,7 +2745,6 @@ + if ( Ins_SxVTL( exc, + (FT_UShort)args[1], + (FT_UShort)args[0], +- exc->opcode, + &exc->GS.projVector ) == SUCCESS ) + { + exc->GS.dualVector = exc->GS.projVector; +@@ -2766,7 +2767,6 @@ + if ( Ins_SxVTL( exc, + (FT_UShort)args[1], + (FT_UShort)args[0], +- exc->opcode, + &exc->GS.freeVector ) == SUCCESS ) + { + GUESS_VECTOR( projVector ); +@@ -4988,7 +4988,8 @@ + { + FT_Long A, B, C; + FT_UShort p1, p2; /* was FT_Int in pas type ERROR */ +- FT_Int aOpc = exc->opcode; ++ ++ FT_Byte opcode = exc->opcode; + + + p1 = (FT_UShort)args[1]; +@@ -5017,12 +5018,12 @@ + + if ( A == 0 && B == 0 ) + { +- A = 0x4000; +- aOpc = 0; ++ A = 0x4000; ++ opcode = 0; + } + } + +- if ( ( aOpc & 1 ) != 0 ) ++ if ( ( opcode & 1 ) != 0 ) + { + C = B; /* counter clockwise rotation */ + B = A; +@@ -5041,12 +5042,12 @@ + + if ( A == 0 && B == 0 ) + { +- A = 0x4000; +- aOpc = 0; ++ A = 0x4000; ++ opcode = 0; + } + } + +- if ( ( aOpc & 1 ) != 0 ) ++ if ( ( opcode & 1 ) != 0 ) + { + C = B; /* counter clockwise rotation */ + B = A; +-- +2.2.2 + +From ea173c04933e43fc920f9d5515a59bbc006fb5ce Mon Sep 17 00:00:00 2001 +From: Werner Lemberg <wl@gnu.org> +Date: Sun, 11 Jan 2015 08:58:54 +0100 +Subject: [PATCH] * src/truetype/ttinterp.c (Ins_JROT, Ins_JROF): Simplify. + +Based on a patch from Behdad. +--- + ChangeLog | 6 ++++++ + src/truetype/ttinterp.c | 50 ++++++++++++++++--------------------------------- + 2 files changed, 22 insertions(+), 34 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index 8b3fe5f..53946aa 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,5 +1,11 @@ + 2015-01-11 Werner Lemberg <wl@gnu.org> + ++ * src/truetype/ttinterp.c (Ins_JROT, Ins_JROF): Simplify. ++ ++ Based on a patch from Behdad. ++ ++2015-01-11 Werner Lemberg <wl@gnu.org> ++ + * src/truetype/ttinterp.c (Ins_SxVTL): Simplify function call. + + 2015-01-11 Werner Lemberg <wl@gnu.org> +diff --git a/src/truetype/ttinterp.c b/src/truetype/ttinterp.c +index b530ec8..f929000 100644 +--- a/src/truetype/ttinterp.c ++++ b/src/truetype/ttinterp.c +@@ -3348,30 +3348,6 @@ + + /*************************************************************************/ + /* */ +- /* JROT[]: Jump Relative On True */ +- /* Opcode range: 0x78 */ +- /* Stack: StkElt int32 --> */ +- /* */ +- static void +- Ins_JROT( TT_ExecContext exc, +- FT_Long* args ) +- { +- if ( args[1] != 0 ) +- { +- if ( args[0] == 0 && exc->args == 0 ) +- exc->error = FT_THROW( Bad_Argument ); +- exc->IP += args[0]; +- if ( exc->IP < 0 || +- ( exc->callTop > 0 && +- exc->IP > exc->callStack[exc->callTop - 1].Def->end ) ) +- exc->error = FT_THROW( Bad_Argument ); +- exc->step_ins = FALSE; +- } +- } +- +- +- /*************************************************************************/ +- /* */ + /* JMPR[]: JuMP Relative */ + /* Opcode range: 0x1C */ + /* Stack: int32 --> */ +@@ -3393,6 +3369,21 @@ + + /*************************************************************************/ + /* */ ++ /* JROT[]: Jump Relative On True */ ++ /* Opcode range: 0x78 */ ++ /* Stack: StkElt int32 --> */ ++ /* */ ++ static void ++ Ins_JROT( TT_ExecContext exc, ++ FT_Long* args ) ++ { ++ if ( args[1] != 0 ) ++ Ins_JMPR( exc, args ); ++ } ++ ++ ++ /*************************************************************************/ ++ /* */ + /* JROF[]: Jump Relative On False */ + /* Opcode range: 0x79 */ + /* Stack: StkElt int32 --> */ +@@ -3402,16 +3393,7 @@ + FT_Long* args ) + { + if ( args[1] == 0 ) +- { +- if ( args[0] == 0 && exc->args == 0 ) +- exc->error = FT_THROW( Bad_Argument ); +- exc->IP += args[0]; +- if ( exc->IP < 0 || +- ( exc->callTop > 0 && +- exc->IP > exc->callStack[exc->callTop - 1].Def->end ) ) +- exc->error = FT_THROW( Bad_Argument ); +- exc->step_ins = FALSE; +- } ++ Ins_JMPR( exc, args ); + } + + +-- +2.2.2 + +From 95b57052737daaa1633a36e706b6ae8f3299de52 Mon Sep 17 00:00:00 2001 +From: Werner Lemberg <wl@gnu.org> +Date: Sun, 11 Jan 2015 09:50:49 +0100 +Subject: [PATCH] [truetype] Prettyfing. + +* src/truetype/ttinterp.c (project, dualproj, fast_project, +fast_dualproj): Rename to... +(PROJECT, DUALPROJ, FAST_PROJECT, FAST_DUALPROJ): ... this. +--- + ChangeLog | 8 +++++ + src/truetype/ttinterp.c | 89 +++++++++++++++++++++++++------------------------ + 2 files changed, 54 insertions(+), 43 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index 53946aa..084f67d 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,5 +1,13 @@ + 2015-01-11 Werner Lemberg <wl@gnu.org> + ++ [truetype] Prettyfing. ++ ++ * src/truetype/ttinterp.c (project, dualproj, fast_project, ++ fast_dualproj): Rename to... ++ (PROJECT, DUALPROJ, FAST_PROJECT, FAST_DUALPROJ): ... this. ++ ++2015-01-11 Werner Lemberg <wl@gnu.org> ++ + * src/truetype/ttinterp.c (Ins_JROT, Ins_JROF): Simplify. + + Based on a patch from Behdad. +diff --git a/src/truetype/ttinterp.c b/src/truetype/ttinterp.c +index f929000..7bcf089 100644 +--- a/src/truetype/ttinterp.c ++++ b/src/truetype/ttinterp.c +@@ -44,6 +44,7 @@ + #undef FT_COMPONENT + #define FT_COMPONENT trace_ttinterp + ++ + /*************************************************************************/ + /* */ + /* In order to detect infinite loops in the code, we set up a counter */ +@@ -58,16 +59,16 @@ + TT_INTERPRETER_VERSION_38 ) + + +-#define project( v1, v2 ) \ ++#define PROJECT( v1, v2 ) \ + exc->func_project( exc, (v1)->x - (v2)->x, (v1)->y - (v2)->y ) + +-#define dualproj( v1, v2 ) \ ++#define DUALPROJ( v1, v2 ) \ + exc->func_dualproj( exc, (v1)->x - (v2)->x, (v1)->y - (v2)->y ) + +-#define fast_project( v ) \ ++#define FAST_PROJECT( v ) \ + exc->func_project( exc, (v)->x, (v)->y ) + +-#define fast_dualproj( v ) \ ++#define FAST_DUALPROJ( v ) \ + exc->func_dualproj( exc, (v)->x, (v)->y ) + + +@@ -86,6 +87,7 @@ + #define BOUNDS( x, n ) ( (FT_UInt)(x) >= (FT_UInt)(n) ) + #define BOUNDSL( x, n ) ( (FT_ULong)(x) >= (FT_ULong)(n) ) + ++ + /*************************************************************************/ + /* */ + /* This macro computes (a*2^14)/b and complements TT_MulFix14. */ +@@ -113,6 +115,7 @@ + #define GUESS_VECTOR( V ) do { } while (0) + #endif + ++ + /*************************************************************************/ + /* */ + /* CODERANGE FUNCTIONS */ +@@ -2473,10 +2476,10 @@ + #ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING + if ( exc->face->unpatented_hinting ) + { +- /* If both vectors point rightwards along the x axis, set */ +- /* `both-x-axis' true, otherwise set it false. The x values only */ +- /* need be tested because the vector has been normalised to a unit */ +- /* vector of length 0x4000 = unity. */ ++ /* If both vectors point rightwards along the x axis, set */ ++ /* `both-x-axis' true, otherwise set it false. The x values only */ ++ /* need be tested because the vector has been normalised to a unit */ ++ /* vector of length 0x4000 = unity. */ + exc->GS.both_x_axis = (FT_Bool)( exc->GS.projVector.x == 0x4000 && + exc->GS.freeVector.x == 0x4000 ); + +@@ -4825,9 +4828,9 @@ + else + { + if ( exc->opcode & 1 ) +- R = fast_dualproj( &exc->zp2.org[L] ); ++ R = FAST_DUALPROJ( &exc->zp2.org[L] ); + else +- R = fast_project( &exc->zp2.cur[L] ); ++ R = FAST_PROJECT( &exc->zp2.cur[L] ); + } + + args[0] = R; +@@ -4861,7 +4864,7 @@ + return; + } + +- K = fast_project( &exc->zp2.cur[L] ); ++ K = FAST_PROJECT( &exc->zp2.cur[L] ); + + exc->func_move( exc, &exc->zp2, L, args[1] - K ); + +@@ -4908,7 +4911,7 @@ + else + { + if ( exc->opcode & 1 ) +- D = project( exc->zp0.cur + L, exc->zp1.cur + K ); ++ D = PROJECT( exc->zp0.cur + L, exc->zp1.cur + K ); + else + { + /* XXX: UNDOCUMENTED: twilight zone special case */ +@@ -4919,7 +4922,7 @@ + FT_Vector* vec2 = exc->zp1.org + K; + + +- D = dualproj( vec1, vec2 ); ++ D = DUALPROJ( vec1, vec2 ); + } + else + { +@@ -4930,7 +4933,7 @@ + if ( exc->metrics.x_scale == exc->metrics.y_scale ) + { + /* this should be faster */ +- D = dualproj( vec1, vec2 ); ++ D = DUALPROJ( vec1, vec2 ); + D = FT_MulFix( D, exc->metrics.x_scale ); + } + else +@@ -4941,7 +4944,7 @@ + vec.x = FT_MulFix( vec1->x - vec2->x, exc->metrics.x_scale ); + vec.y = FT_MulFix( vec1->y - vec2->y, exc->metrics.y_scale ); + +- D = fast_dualproj( &vec ); ++ D = FAST_DUALPROJ( &vec ); + } + } + } +@@ -5406,7 +5409,7 @@ + *zone = zp; + *refp = p; + +- d = project( zp.cur + p, zp.org + p ); ++ d = PROJECT( zp.cur + p, zp.org + p ); + + #ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING + if ( exc->face->unpatented_hinting ) +@@ -5699,13 +5702,13 @@ + else + #ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING + { +- /* If not using ignore_x_mode rendering, allow ZP2 move. */ +- /* If inline deltas aren't allowed, skip ZP2 move. */ +- /* If using ignore_x_mode rendering, allow ZP2 point move if: */ +- /* - freedom vector is y and sph_compatibility_mode is off */ +- /* - the glyph is composite and the move is in the Y direction */ +- /* - the glyph is specifically set to allow SHPIX moves */ +- /* - the move is on a previously Y-touched point */ ++ /* If not using ignore_x_mode rendering, allow ZP2 move. */ ++ /* If inline deltas aren't allowed, skip ZP2 move. */ ++ /* If using ignore_x_mode rendering, allow ZP2 point move if: */ ++ /* - freedom vector is y and sph_compatibility_mode is off */ ++ /* - the glyph is composite and the move is in the Y direction */ ++ /* - the glyph is specifically set to allow SHPIX moves */ ++ /* - the move is on a previously Y-touched point */ + + if ( SUBPIXEL_HINTING && + exc->ignore_x_mode ) +@@ -5730,7 +5733,7 @@ + if ( ( exc->sph_tweak_flags & SPH_TWEAK_SKIP_NONPIXEL_Y_MOVES ) && + ( B1 & 63 ) != 0 && + ( B2 & 63 ) != 0 && +- B1 != B2 ) ++ B1 != B2 ) + Move_Zp2_Point( exc, point, -dx, -dy, TRUE ); + } + } +@@ -5838,7 +5841,7 @@ + exc->zp1.cur[point] = exc->zp1.org[point]; + } + +- distance = project( exc->zp1.cur + point, exc->zp0.cur + exc->GS.rp0 ); ++ distance = PROJECT( exc->zp1.cur + point, exc->zp0.cur + exc->GS.rp0 ); + + #ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING + /* subpixel hinting - make MSIRP respect CVT cut-in; */ +@@ -5885,7 +5888,7 @@ + + if ( ( exc->opcode & 1 ) != 0 ) + { +- cur_dist = fast_project( &exc->zp0.cur[point] ); ++ cur_dist = FAST_PROJECT( &exc->zp0.cur[point] ); + #ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING + if ( SUBPIXEL_HINTING && + exc->ignore_x_mode && +@@ -5995,7 +5998,7 @@ + distance = 0; + #endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ + +- org_dist = fast_project( &exc->zp0.cur[point] ); ++ org_dist = FAST_PROJECT( &exc->zp0.cur[point] ); + + if ( ( exc->opcode & 1 ) != 0 ) /* rounding and control cut-in flag */ + { +@@ -6069,7 +6072,7 @@ + FT_Vector* vec2 = &exc->zp0.org[exc->GS.rp0]; + + +- org_dist = dualproj( vec1, vec2 ); ++ org_dist = DUALPROJ( vec1, vec2 ); + } + else + { +@@ -6080,7 +6083,7 @@ + if ( exc->metrics.x_scale == exc->metrics.y_scale ) + { + /* this should be faster */ +- org_dist = dualproj( vec1, vec2 ); ++ org_dist = DUALPROJ( vec1, vec2 ); + org_dist = FT_MulFix( org_dist, exc->metrics.x_scale ); + } + else +@@ -6091,7 +6094,7 @@ + vec.x = FT_MulFix( vec1->x - vec2->x, exc->metrics.x_scale ); + vec.y = FT_MulFix( vec1->y - vec2->y, exc->metrics.y_scale ); + +- org_dist = fast_dualproj( &vec ); ++ org_dist = FAST_DUALPROJ( &vec ); + } + } + +@@ -6149,7 +6152,7 @@ + + /* now move the point */ + +- org_dist = project( exc->zp1.cur + point, exc->zp0.cur + exc->GS.rp0 ); ++ org_dist = PROJECT( exc->zp1.cur + point, exc->zp0.cur + exc->GS.rp0 ); + + exc->func_move( exc, &exc->zp1, point, distance - org_dist ); + +@@ -6241,8 +6244,8 @@ + exc->zp1.cur[point] = exc->zp1.org[point]; + } + +- org_dist = dualproj( &exc->zp1.org[point], &exc->zp0.org[exc->GS.rp0] ); +- cur_dist = project ( &exc->zp1.cur[point], &exc->zp0.cur[exc->GS.rp0] ); ++ org_dist = DUALPROJ( &exc->zp1.org[point], &exc->zp0.org[exc->GS.rp0] ); ++ cur_dist = PROJECT ( &exc->zp1.cur[point], &exc->zp0.cur[exc->GS.rp0] ); + + /* auto-flip test */ + +@@ -6438,7 +6441,7 @@ + } + else + { +- distance = project( exc->zp1.cur + point, ++ distance = PROJECT( exc->zp1.cur + point, + exc->zp0.cur + exc->GS.rp0 ); + + exc->func_move( exc, &exc->zp1, point, -distance ); +@@ -6573,7 +6576,7 @@ + return; + } + +- distance = project( exc->zp0.cur + p2, exc->zp1.cur + p1 ) / 2; ++ distance = PROJECT( exc->zp0.cur + p2, exc->zp1.cur + p1 ) / 2; + + exc->func_move( exc, &exc->zp1, p1, distance ); + exc->func_move( exc, &exc->zp0, p2, -distance ); +@@ -6639,9 +6642,9 @@ + else + { + if ( twilight ) +- old_range = dualproj( &exc->zp1.org[exc->GS.rp2], orus_base ); ++ old_range = DUALPROJ( &exc->zp1.org[exc->GS.rp2], orus_base ); + else if ( exc->metrics.x_scale == exc->metrics.y_scale ) +- old_range = dualproj( &exc->zp1.orus[exc->GS.rp2], orus_base ); ++ old_range = DUALPROJ( &exc->zp1.orus[exc->GS.rp2], orus_base ); + else + { + FT_Vector vec; +@@ -6652,10 +6655,10 @@ + vec.y = FT_MulFix( exc->zp1.orus[exc->GS.rp2].y - orus_base->y, + exc->metrics.y_scale ); + +- old_range = fast_dualproj( &vec ); ++ old_range = FAST_DUALPROJ( &vec ); + } + +- cur_range = project( &exc->zp1.cur[exc->GS.rp2], cur_base ); ++ cur_range = PROJECT( &exc->zp1.cur[exc->GS.rp2], cur_base ); + } + + for ( ; exc->GS.loop > 0; --exc->GS.loop ) +@@ -6676,9 +6679,9 @@ + } + + if ( twilight ) +- org_dist = dualproj( &exc->zp2.org[point], orus_base ); ++ org_dist = DUALPROJ( &exc->zp2.org[point], orus_base ); + else if ( exc->metrics.x_scale == exc->metrics.y_scale ) +- org_dist = dualproj( &exc->zp2.orus[point], orus_base ); ++ org_dist = DUALPROJ( &exc->zp2.orus[point], orus_base ); + else + { + FT_Vector vec; +@@ -6689,10 +6692,10 @@ + vec.y = FT_MulFix( exc->zp2.orus[point].y - orus_base->y, + exc->metrics.y_scale ); + +- org_dist = fast_dualproj( &vec ); ++ org_dist = FAST_DUALPROJ( &vec ); + } + +- cur_dist = project( &exc->zp2.cur[point], cur_base ); ++ cur_dist = PROJECT( &exc->zp2.cur[point], cur_base ); + + if ( org_dist ) + { +-- +2.2.2 + +From 2af74c9b87d4a35f019d54ad89c9ef1c2208f7bb Mon Sep 17 00:00:00 2001 +From: Werner Lemberg <wl@gnu.org> +Date: Sun, 11 Jan 2015 10:08:09 +0100 +Subject: [PATCH] [truetype] Better grouping of functions in `ttinterp.c'. + +No code change. +--- + src/truetype/ttinterp.c | 2918 +++++++++++++++++++++++------------------------ + 1 file changed, 1453 insertions(+), 1465 deletions(-) + +diff --git a/src/truetype/ttinterp.c b/src/truetype/ttinterp.c +index 7bcf089..293af9d 100644 +--- a/src/truetype/ttinterp.c ++++ b/src/truetype/ttinterp.c +@@ -2628,57 +2628,6 @@ + /*************************************************************************/ + + +- static FT_Bool +- Ins_SxVTL( TT_ExecContext exc, +- FT_UShort aIdx1, +- FT_UShort aIdx2, +- FT_UnitVector* Vec ) +- { +- FT_Long A, B, C; +- FT_Vector* p1; +- FT_Vector* p2; +- +- FT_Byte opcode = exc->opcode; +- +- +- if ( BOUNDS( aIdx1, exc->zp2.n_points ) || +- BOUNDS( aIdx2, exc->zp1.n_points ) ) +- { +- if ( exc->pedantic_hinting ) +- exc->error = FT_THROW( Invalid_Reference ); +- return FAILURE; +- } +- +- p1 = exc->zp1.cur + aIdx2; +- p2 = exc->zp2.cur + aIdx1; +- +- A = p1->x - p2->x; +- B = p1->y - p2->y; +- +- /* If p1 == p2, SPvTL and SFvTL behave the same as */ +- /* SPvTCA[X] and SFvTCA[X], respectively. */ +- /* */ +- /* Confirmed by Greg Hitchcock. */ +- +- if ( A == 0 && B == 0 ) +- { +- A = 0x4000; +- opcode = 0; +- } +- +- if ( ( opcode & 1 ) != 0 ) +- { +- C = B; /* counter clockwise rotation */ +- B = A; +- A = -C; +- } +- +- Normalize( A, B, Vec ); +- +- return SUCCESS; +- } +- +- + #define ARRAY_BOUND_ERROR \ + do \ + { \ +@@ -2689,2115 +2638,2158 @@ + + /*************************************************************************/ + /* */ +- /* SVTCA[a]: Set (F and P) Vectors to Coordinate Axis */ +- /* Opcode range: 0x00-0x01 */ +- /* Stack: --> */ +- /* */ +- /* SPvTCA[a]: Set PVector to Coordinate Axis */ +- /* Opcode range: 0x02-0x03 */ +- /* Stack: --> */ +- /* */ +- /* SFvTCA[a]: Set FVector to Coordinate Axis */ +- /* Opcode range: 0x04-0x05 */ +- /* Stack: --> */ ++ /* MPPEM[]: Measure Pixel Per EM */ ++ /* Opcode range: 0x4B */ ++ /* Stack: --> Euint16 */ + /* */ + static void +- Ins_SxyTCA( TT_ExecContext exc ) ++ Ins_MPPEM( TT_ExecContext exc, ++ FT_Long* args ) + { +- FT_Short AA, BB; +- +- FT_Byte opcode = exc->opcode; +- +- +- AA = (FT_Short)( ( opcode & 1 ) << 14 ); +- BB = (FT_Short)( AA ^ 0x4000 ); +- +- if ( opcode < 4 ) +- { +- exc->GS.projVector.x = AA; +- exc->GS.projVector.y = BB; +- +- exc->GS.dualVector.x = AA; +- exc->GS.dualVector.y = BB; +- } +- else +- GUESS_VECTOR( projVector ); +- +- if ( ( opcode & 2 ) == 0 ) +- { +- exc->GS.freeVector.x = AA; +- exc->GS.freeVector.y = BB; +- } +- else +- GUESS_VECTOR( freeVector ); +- +- Compute_Funcs( exc ); ++ args[0] = exc->func_cur_ppem( exc ); + } + + + /*************************************************************************/ + /* */ +- /* SPvTL[a]: Set PVector To Line */ +- /* Opcode range: 0x06-0x07 */ +- /* Stack: uint32 uint32 --> */ ++ /* MPS[]: Measure Point Size */ ++ /* Opcode range: 0x4C */ ++ /* Stack: --> Euint16 */ + /* */ + static void +- Ins_SPVTL( TT_ExecContext exc, +- FT_Long* args ) ++ Ins_MPS( TT_ExecContext exc, ++ FT_Long* args ) + { +- if ( Ins_SxVTL( exc, +- (FT_UShort)args[1], +- (FT_UShort)args[0], +- &exc->GS.projVector ) == SUCCESS ) +- { +- exc->GS.dualVector = exc->GS.projVector; +- GUESS_VECTOR( freeVector ); +- Compute_Funcs( exc ); +- } ++ /* Note: The point size should be irrelevant in a given font program; */ ++ /* we thus decide to return only the PPEM value. */ ++#if 0 ++ args[0] = exc->metrics.pointSize; ++#else ++ args[0] = exc->func_cur_ppem( exc ); ++#endif + } + + + /*************************************************************************/ + /* */ +- /* SFvTL[a]: Set FVector To Line */ +- /* Opcode range: 0x08-0x09 */ +- /* Stack: uint32 uint32 --> */ ++ /* DUP[]: DUPlicate the stack's top element */ ++ /* Opcode range: 0x20 */ ++ /* Stack: StkElt --> StkElt StkElt */ + /* */ + static void +- Ins_SFVTL( TT_ExecContext exc, +- FT_Long* args ) ++ Ins_DUP( FT_Long* args ) + { +- if ( Ins_SxVTL( exc, +- (FT_UShort)args[1], +- (FT_UShort)args[0], +- &exc->GS.freeVector ) == SUCCESS ) +- { +- GUESS_VECTOR( projVector ); +- Compute_Funcs( exc ); +- } ++ args[1] = args[0]; + } + + + /*************************************************************************/ + /* */ +- /* SFvTPv[]: Set FVector To PVector */ +- /* Opcode range: 0x0E */ +- /* Stack: --> */ ++ /* POP[]: POP the stack's top element */ ++ /* Opcode range: 0x21 */ ++ /* Stack: StkElt --> */ + /* */ + static void +- Ins_SFVTPV( TT_ExecContext exc ) ++ Ins_POP( void ) + { +- GUESS_VECTOR( projVector ); +- exc->GS.freeVector = exc->GS.projVector; +- Compute_Funcs( exc ); ++ /* nothing to do */ + } + + + /*************************************************************************/ + /* */ +- /* SPvFS[]: Set PVector From Stack */ +- /* Opcode range: 0x0A */ +- /* Stack: f2.14 f2.14 --> */ ++ /* CLEAR[]: CLEAR the entire stack */ ++ /* Opcode range: 0x22 */ ++ /* Stack: StkElt... --> */ + /* */ + static void +- Ins_SPVFS( TT_ExecContext exc, +- FT_Long* args ) ++ Ins_CLEAR( TT_ExecContext exc ) + { +- FT_Short S; +- FT_Long X, Y; +- +- +- /* Only use low 16bits, then sign extend */ +- S = (FT_Short)args[1]; +- Y = (FT_Long)S; +- S = (FT_Short)args[0]; +- X = (FT_Long)S; +- +- Normalize( X, Y, &exc->GS.projVector ); +- +- exc->GS.dualVector = exc->GS.projVector; +- GUESS_VECTOR( freeVector ); +- Compute_Funcs( exc ); ++ exc->new_top = 0; + } + + + /*************************************************************************/ + /* */ +- /* SFvFS[]: Set FVector From Stack */ +- /* Opcode range: 0x0B */ +- /* Stack: f2.14 f2.14 --> */ ++ /* SWAP[]: SWAP the stack's top two elements */ ++ /* Opcode range: 0x23 */ ++ /* Stack: 2 * StkElt --> 2 * StkElt */ + /* */ + static void +- Ins_SFVFS( TT_ExecContext exc, +- FT_Long* args ) ++ Ins_SWAP( FT_Long* args ) + { +- FT_Short S; +- FT_Long X, Y; +- ++ FT_Long L; + +- /* Only use low 16bits, then sign extend */ +- S = (FT_Short)args[1]; +- Y = (FT_Long)S; +- S = (FT_Short)args[0]; +- X = S; + +- Normalize( X, Y, &exc->GS.freeVector ); +- GUESS_VECTOR( projVector ); +- Compute_Funcs( exc ); ++ L = args[0]; ++ args[0] = args[1]; ++ args[1] = L; + } + + + /*************************************************************************/ + /* */ +- /* GPv[]: Get Projection Vector */ +- /* Opcode range: 0x0C */ +- /* Stack: ef2.14 --> ef2.14 */ ++ /* DEPTH[]: return the stack DEPTH */ ++ /* Opcode range: 0x24 */ ++ /* Stack: --> uint32 */ + /* */ + static void +- Ins_GPV( TT_ExecContext exc, +- FT_Long* args ) ++ Ins_DEPTH( TT_ExecContext exc, ++ FT_Long* args ) + { +-#ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING +- if ( exc->face->unpatented_hinting ) +- { +- args[0] = exc->GS.both_x_axis ? 0x4000 : 0; +- args[1] = exc->GS.both_x_axis ? 0 : 0x4000; +- } +- else +- { +- args[0] = exc->GS.projVector.x; +- args[1] = exc->GS.projVector.y; +- } +-#else +- args[0] = exc->GS.projVector.x; +- args[1] = exc->GS.projVector.y; +-#endif ++ args[0] = exc->top; + } + + + /*************************************************************************/ + /* */ +- /* GFv[]: Get Freedom Vector */ +- /* Opcode range: 0x0D */ +- /* Stack: ef2.14 --> ef2.14 */ ++ /* LT[]: Less Than */ ++ /* Opcode range: 0x50 */ ++ /* Stack: int32? int32? --> bool */ + /* */ + static void +- Ins_GFV( TT_ExecContext exc, +- FT_Long* args ) ++ Ins_LT( FT_Long* args ) + { +-#ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING +- if ( exc->face->unpatented_hinting ) +- { +- args[0] = exc->GS.both_x_axis ? 0x4000 : 0; +- args[1] = exc->GS.both_x_axis ? 0 : 0x4000; +- } +- else +- { +- args[0] = exc->GS.freeVector.x; +- args[1] = exc->GS.freeVector.y; +- } +-#else +- args[0] = exc->GS.freeVector.x; +- args[1] = exc->GS.freeVector.y; +-#endif ++ args[0] = ( args[0] < args[1] ); + } + + + /*************************************************************************/ + /* */ +- /* SRP0[]: Set Reference Point 0 */ +- /* Opcode range: 0x10 */ +- /* Stack: uint32 --> */ ++ /* LTEQ[]: Less Than or EQual */ ++ /* Opcode range: 0x51 */ ++ /* Stack: int32? int32? --> bool */ + /* */ + static void +- Ins_SRP0( TT_ExecContext exc, +- FT_Long* args ) ++ Ins_LTEQ( FT_Long* args ) + { +- exc->GS.rp0 = (FT_UShort)args[0]; ++ args[0] = ( args[0] <= args[1] ); + } + + + /*************************************************************************/ + /* */ +- /* SRP1[]: Set Reference Point 1 */ +- /* Opcode range: 0x11 */ +- /* Stack: uint32 --> */ ++ /* GT[]: Greater Than */ ++ /* Opcode range: 0x52 */ ++ /* Stack: int32? int32? --> bool */ + /* */ + static void +- Ins_SRP1( TT_ExecContext exc, +- FT_Long* args ) ++ Ins_GT( FT_Long* args ) + { +- exc->GS.rp1 = (FT_UShort)args[0]; ++ args[0] = ( args[0] > args[1] ); + } + + + /*************************************************************************/ + /* */ +- /* SRP2[]: Set Reference Point 2 */ +- /* Opcode range: 0x12 */ +- /* Stack: uint32 --> */ ++ /* GTEQ[]: Greater Than or EQual */ ++ /* Opcode range: 0x53 */ ++ /* Stack: int32? int32? --> bool */ + /* */ + static void +- Ins_SRP2( TT_ExecContext exc, +- FT_Long* args ) ++ Ins_GTEQ( FT_Long* args ) + { +- exc->GS.rp2 = (FT_UShort)args[0]; ++ args[0] = ( args[0] >= args[1] ); + } + + + /*************************************************************************/ + /* */ +- /* RTHG[]: Round To Half Grid */ +- /* Opcode range: 0x19 */ +- /* Stack: --> */ ++ /* EQ[]: EQual */ ++ /* Opcode range: 0x54 */ ++ /* Stack: StkElt StkElt --> bool */ + /* */ + static void +- Ins_RTHG( TT_ExecContext exc ) ++ Ins_EQ( FT_Long* args ) + { +- exc->GS.round_state = TT_Round_To_Half_Grid; +- exc->func_round = (TT_Round_Func)Round_To_Half_Grid; ++ args[0] = ( args[0] == args[1] ); + } + + + /*************************************************************************/ + /* */ +- /* RTG[]: Round To Grid */ +- /* Opcode range: 0x18 */ +- /* Stack: --> */ ++ /* NEQ[]: Not EQual */ ++ /* Opcode range: 0x55 */ ++ /* Stack: StkElt StkElt --> bool */ + /* */ + static void +- Ins_RTG( TT_ExecContext exc ) ++ Ins_NEQ( FT_Long* args ) + { +- exc->GS.round_state = TT_Round_To_Grid; +- exc->func_round = (TT_Round_Func)Round_To_Grid; ++ args[0] = ( args[0] != args[1] ); + } + + + /*************************************************************************/ +- /* RTDG[]: Round To Double Grid */ +- /* Opcode range: 0x3D */ +- /* Stack: --> */ + /* */ +- static void +- Ins_RTDG( TT_ExecContext exc ) +- { +- exc->GS.round_state = TT_Round_To_Double_Grid; +- exc->func_round = (TT_Round_Func)Round_To_Double_Grid; +- } +- +- +- /*************************************************************************/ +- /* RUTG[]: Round Up To Grid */ +- /* Opcode range: 0x7C */ +- /* Stack: --> */ ++ /* ODD[]: Is ODD */ ++ /* Opcode range: 0x56 */ ++ /* Stack: f26.6 --> bool */ + /* */ + static void +- Ins_RUTG( TT_ExecContext exc ) ++ Ins_ODD( TT_ExecContext exc, ++ FT_Long* args ) + { +- exc->GS.round_state = TT_Round_Up_To_Grid; +- exc->func_round = (TT_Round_Func)Round_Up_To_Grid; ++ args[0] = ( ( exc->func_round( exc, args[0], 0 ) & 127 ) == 64 ); + } + + + /*************************************************************************/ + /* */ +- /* RDTG[]: Round Down To Grid */ +- /* Opcode range: 0x7D */ +- /* Stack: --> */ ++ /* EVEN[]: Is EVEN */ ++ /* Opcode range: 0x57 */ ++ /* Stack: f26.6 --> bool */ + /* */ + static void +- Ins_RDTG( TT_ExecContext exc ) ++ Ins_EVEN( TT_ExecContext exc, ++ FT_Long* args ) + { +- exc->GS.round_state = TT_Round_Down_To_Grid; +- exc->func_round = (TT_Round_Func)Round_Down_To_Grid; ++ args[0] = ( ( exc->func_round( exc, args[0], 0 ) & 127 ) == 0 ); + } + + + /*************************************************************************/ + /* */ +- /* ROFF[]: Round OFF */ +- /* Opcode range: 0x7A */ +- /* Stack: --> */ ++ /* AND[]: logical AND */ ++ /* Opcode range: 0x5A */ ++ /* Stack: uint32 uint32 --> uint32 */ + /* */ + static void +- Ins_ROFF( TT_ExecContext exc ) ++ Ins_AND( FT_Long* args ) + { +- exc->GS.round_state = TT_Round_Off; +- exc->func_round = (TT_Round_Func)Round_None; ++ args[0] = ( args[0] && args[1] ); + } + + + /*************************************************************************/ + /* */ +- /* SROUND[]: Super ROUND */ +- /* Opcode range: 0x76 */ +- /* Stack: Eint8 --> */ ++ /* OR[]: logical OR */ ++ /* Opcode range: 0x5B */ ++ /* Stack: uint32 uint32 --> uint32 */ + /* */ + static void +- Ins_SROUND( TT_ExecContext exc, +- FT_Long* args ) ++ Ins_OR( FT_Long* args ) + { +- SetSuperRound( exc, 0x4000, args[0] ); +- +- exc->GS.round_state = TT_Round_Super; +- exc->func_round = (TT_Round_Func)Round_Super; ++ args[0] = ( args[0] || args[1] ); + } + + + /*************************************************************************/ + /* */ +- /* S45ROUND[]: Super ROUND 45 degrees */ +- /* Opcode range: 0x77 */ +- /* Stack: uint32 --> */ ++ /* NOT[]: logical NOT */ ++ /* Opcode range: 0x5C */ ++ /* Stack: StkElt --> uint32 */ + /* */ + static void +- Ins_S45ROUND( TT_ExecContext exc, +- FT_Long* args ) ++ Ins_NOT( FT_Long* args ) + { +- SetSuperRound( exc, 0x2D41, args[0] ); +- +- exc->GS.round_state = TT_Round_Super_45; +- exc->func_round = (TT_Round_Func)Round_Super_45; ++ args[0] = !args[0]; + } + + + /*************************************************************************/ + /* */ +- /* SLOOP[]: Set LOOP variable */ +- /* Opcode range: 0x17 */ +- /* Stack: int32? --> */ ++ /* ADD[]: ADD */ ++ /* Opcode range: 0x60 */ ++ /* Stack: f26.6 f26.6 --> f26.6 */ + /* */ + static void +- Ins_SLOOP( TT_ExecContext exc, +- FT_Long* args ) ++ Ins_ADD( FT_Long* args ) + { +- if ( args[0] < 0 ) +- exc->error = FT_THROW( Bad_Argument ); +- else +- exc->GS.loop = args[0]; ++ args[0] += args[1]; + } + + + /*************************************************************************/ + /* */ +- /* SMD[]: Set Minimum Distance */ +- /* Opcode range: 0x1A */ +- /* Stack: f26.6 --> */ ++ /* SUB[]: SUBtract */ ++ /* Opcode range: 0x61 */ ++ /* Stack: f26.6 f26.6 --> f26.6 */ + /* */ + static void +- Ins_SMD( TT_ExecContext exc, +- FT_Long* args ) ++ Ins_SUB( FT_Long* args ) + { +- exc->GS.minimum_distance = args[0]; ++ args[0] -= args[1]; + } + + + /*************************************************************************/ + /* */ +- /* SCVTCI[]: Set Control Value Table Cut In */ +- /* Opcode range: 0x1D */ +- /* Stack: f26.6 --> */ ++ /* DIV[]: DIVide */ ++ /* Opcode range: 0x62 */ ++ /* Stack: f26.6 f26.6 --> f26.6 */ + /* */ + static void +- Ins_SCVTCI( TT_ExecContext exc, +- FT_Long* args ) ++ Ins_DIV( TT_ExecContext exc, ++ FT_Long* args ) + { +- exc->GS.control_value_cutin = (FT_F26Dot6)args[0]; ++ if ( args[1] == 0 ) ++ exc->error = FT_THROW( Divide_By_Zero ); ++ else ++ args[0] = FT_MulDiv_No_Round( args[0], 64L, args[1] ); + } + + + /*************************************************************************/ + /* */ +- /* SSWCI[]: Set Single Width Cut In */ +- /* Opcode range: 0x1E */ +- /* Stack: f26.6 --> */ ++ /* MUL[]: MULtiply */ ++ /* Opcode range: 0x63 */ ++ /* Stack: f26.6 f26.6 --> f26.6 */ + /* */ + static void +- Ins_SSWCI( TT_ExecContext exc, +- FT_Long* args ) ++ Ins_MUL( FT_Long* args ) + { +- exc->GS.single_width_cutin = (FT_F26Dot6)args[0]; ++ args[0] = FT_MulDiv( args[0], args[1], 64L ); + } + + + /*************************************************************************/ + /* */ +- /* SSW[]: Set Single Width */ +- /* Opcode range: 0x1F */ +- /* Stack: int32? --> */ ++ /* ABS[]: ABSolute value */ ++ /* Opcode range: 0x64 */ ++ /* Stack: f26.6 --> f26.6 */ + /* */ + static void +- Ins_SSW( TT_ExecContext exc, +- FT_Long* args ) ++ Ins_ABS( FT_Long* args ) + { +- exc->GS.single_width_value = FT_MulFix( args[0], +- exc->tt_metrics.scale ); ++ args[0] = FT_ABS( args[0] ); + } + + + /*************************************************************************/ + /* */ +- /* FLIPON[]: Set auto-FLIP to ON */ +- /* Opcode range: 0x4D */ +- /* Stack: --> */ ++ /* NEG[]: NEGate */ ++ /* Opcode range: 0x65 */ ++ /* Stack: f26.6 --> f26.6 */ + /* */ + static void +- Ins_FLIPON( TT_ExecContext exc ) ++ Ins_NEG( FT_Long* args ) + { +- exc->GS.auto_flip = TRUE; ++ args[0] = -args[0]; + } + + + /*************************************************************************/ + /* */ +- /* FLIPOFF[]: Set auto-FLIP to OFF */ +- /* Opcode range: 0x4E */ +- /* Stack: --> */ ++ /* FLOOR[]: FLOOR */ ++ /* Opcode range: 0x66 */ ++ /* Stack: f26.6 --> f26.6 */ + /* */ + static void +- Ins_FLIPOFF( TT_ExecContext exc ) ++ Ins_FLOOR( FT_Long* args ) + { +- exc->GS.auto_flip = FALSE; ++ args[0] = FT_PIX_FLOOR( args[0] ); + } + + + /*************************************************************************/ + /* */ +- /* SANGW[]: Set ANGle Weight */ +- /* Opcode range: 0x7E */ +- /* Stack: uint32 --> */ ++ /* CEILING[]: CEILING */ ++ /* Opcode range: 0x67 */ ++ /* Stack: f26.6 --> f26.6 */ + /* */ + static void +- Ins_SANGW( void ) ++ Ins_CEILING( FT_Long* args ) + { +- /* instruction not supported anymore */ ++ args[0] = FT_PIX_CEIL( args[0] ); + } + + + /*************************************************************************/ + /* */ +- /* SDB[]: Set Delta Base */ +- /* Opcode range: 0x5E */ +- /* Stack: uint32 --> */ ++ /* RS[]: Read Store */ ++ /* Opcode range: 0x43 */ ++ /* Stack: uint32 --> uint32 */ + /* */ + static void +- Ins_SDB( TT_ExecContext exc, +- FT_Long* args ) ++ Ins_RS( TT_ExecContext exc, ++ FT_Long* args ) + { +- exc->GS.delta_base = (FT_UShort)args[0]; +- } +- ++#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING + +- /*************************************************************************/ +- /* */ +- /* SDS[]: Set Delta Shift */ +- /* Opcode range: 0x5F */ +- /* Stack: uint32 --> */ +- /* */ +- static void +- Ins_SDS( TT_ExecContext exc, +- FT_Long* args ) +- { +- if ( (FT_ULong)args[0] > 6UL ) +- exc->error = FT_THROW( Bad_Argument ); +- else +- exc->GS.delta_shift = (FT_UShort)args[0]; +- } ++ FT_ULong I = (FT_ULong)args[0]; + + +- /*************************************************************************/ +- /* */ +- /* MPPEM[]: Measure Pixel Per EM */ +- /* Opcode range: 0x4B */ +- /* Stack: --> Euint16 */ +- /* */ +- static void +- Ins_MPPEM( TT_ExecContext exc, +- FT_Long* args ) +- { +- args[0] = exc->func_cur_ppem( exc ); +- } ++ if ( BOUNDSL( I, exc->storeSize ) ) ++ { ++ if ( exc->pedantic_hinting ) ++ ARRAY_BOUND_ERROR; ++ else ++ args[0] = 0; ++ } ++ else ++ { ++ /* subpixel hinting - avoid Typeman Dstroke and */ ++ /* IStroke and Vacuform rounds */ ++ if ( SUBPIXEL_HINTING && ++ exc->ignore_x_mode && ++ ( ( I == 24 && ++ ( exc->face->sph_found_func_flags & ++ ( SPH_FDEF_SPACING_1 | ++ SPH_FDEF_SPACING_2 ) ) ) || ++ ( I == 22 && ++ ( exc->sph_in_func_flags & ++ SPH_FDEF_TYPEMAN_STROKES ) ) || ++ ( I == 8 && ++ ( exc->face->sph_found_func_flags & ++ SPH_FDEF_VACUFORM_ROUND_1 ) && ++ exc->iup_called ) ) ) ++ args[0] = 0; ++ else ++ args[0] = exc->storage[I]; ++ } + ++#else /* !TT_CONFIG_OPTION_SUBPIXEL_HINTING */ + +- /*************************************************************************/ +- /* */ +- /* MPS[]: Measure Point Size */ +- /* Opcode range: 0x4C */ +- /* Stack: --> Euint16 */ +- /* */ +- static void +- Ins_MPS( TT_ExecContext exc, +- FT_Long* args ) +- { +- /* Note: The point size should be irrelevant in a given font program; */ +- /* we thus decide to return only the PPEM value. */ +-#if 0 +- args[0] = exc->metrics.pointSize; +-#else +- args[0] = exc->func_cur_ppem( exc ); +-#endif +- } ++ FT_ULong I = (FT_ULong)args[0]; + + +- /*************************************************************************/ +- /* */ +- /* DUP[]: DUPlicate the stack's top element */ +- /* Opcode range: 0x20 */ +- /* Stack: StkElt --> StkElt StkElt */ +- /* */ +- static void +- Ins_DUP( FT_Long* args ) +- { +- args[1] = args[0]; ++ if ( BOUNDSL( I, exc->storeSize ) ) ++ { ++ if ( exc->pedantic_hinting ) ++ ARRAY_BOUND_ERROR; ++ else ++ args[0] = 0; ++ } ++ else ++ args[0] = exc->storage[I]; ++ ++#endif /* !TT_CONFIG_OPTION_SUBPIXEL_HINTING */ + } + + + /*************************************************************************/ + /* */ +- /* POP[]: POP the stack's top element */ +- /* Opcode range: 0x21 */ +- /* Stack: StkElt --> */ ++ /* WS[]: Write Store */ ++ /* Opcode range: 0x42 */ ++ /* Stack: uint32 uint32 --> */ + /* */ + static void +- Ins_POP( void ) ++ Ins_WS( TT_ExecContext exc, ++ FT_Long* args ) + { +- /* nothing to do */ +- } ++ FT_ULong I = (FT_ULong)args[0]; + + +- /*************************************************************************/ +- /* */ +- /* CLEAR[]: CLEAR the entire stack */ +- /* Opcode range: 0x22 */ +- /* Stack: StkElt... --> */ +- /* */ +- static void +- Ins_CLEAR( TT_ExecContext exc ) +- { +- exc->new_top = 0; ++ if ( BOUNDSL( I, exc->storeSize ) ) ++ { ++ if ( exc->pedantic_hinting ) ++ ARRAY_BOUND_ERROR; ++ } ++ else ++ exc->storage[I] = args[1]; + } + + + /*************************************************************************/ + /* */ +- /* SWAP[]: SWAP the stack's top two elements */ +- /* Opcode range: 0x23 */ +- /* Stack: 2 * StkElt --> 2 * StkElt */ ++ /* WCVTP[]: Write CVT in Pixel units */ ++ /* Opcode range: 0x44 */ ++ /* Stack: f26.6 uint32 --> */ + /* */ + static void +- Ins_SWAP( FT_Long* args ) ++ Ins_WCVTP( TT_ExecContext exc, ++ FT_Long* args ) + { +- FT_Long L; ++ FT_ULong I = (FT_ULong)args[0]; + + +- L = args[0]; +- args[0] = args[1]; +- args[1] = L; ++ if ( BOUNDSL( I, exc->cvtSize ) ) ++ { ++ if ( exc->pedantic_hinting ) ++ ARRAY_BOUND_ERROR; ++ } ++ else ++ exc->func_write_cvt( exc, I, args[1] ); + } + + + /*************************************************************************/ + /* */ +- /* DEPTH[]: return the stack DEPTH */ +- /* Opcode range: 0x24 */ +- /* Stack: --> uint32 */ ++ /* WCVTF[]: Write CVT in Funits */ ++ /* Opcode range: 0x70 */ ++ /* Stack: uint32 uint32 --> */ + /* */ + static void +- Ins_DEPTH( TT_ExecContext exc, ++ Ins_WCVTF( TT_ExecContext exc, + FT_Long* args ) + { +- args[0] = exc->top; ++ FT_ULong I = (FT_ULong)args[0]; ++ ++ ++ if ( BOUNDSL( I, exc->cvtSize ) ) ++ { ++ if ( exc->pedantic_hinting ) ++ ARRAY_BOUND_ERROR; ++ } ++ else ++ exc->cvt[I] = FT_MulFix( args[1], exc->tt_metrics.scale ); + } + + + /*************************************************************************/ + /* */ +- /* CINDEX[]: Copy INDEXed element */ +- /* Opcode range: 0x25 */ +- /* Stack: int32 --> StkElt */ ++ /* RCVT[]: Read CVT */ ++ /* Opcode range: 0x45 */ ++ /* Stack: uint32 --> f26.6 */ + /* */ + static void +- Ins_CINDEX( TT_ExecContext exc, +- FT_Long* args ) ++ Ins_RCVT( TT_ExecContext exc, ++ FT_Long* args ) + { +- FT_Long L; +- ++ FT_ULong I = (FT_ULong)args[0]; + +- L = args[0]; + +- if ( L <= 0 || L > exc->args ) ++ if ( BOUNDSL( I, exc->cvtSize ) ) + { + if ( exc->pedantic_hinting ) +- exc->error = FT_THROW( Invalid_Reference ); +- args[0] = 0; ++ ARRAY_BOUND_ERROR; ++ else ++ args[0] = 0; + } + else +- args[0] = exc->stack[exc->args - L]; ++ args[0] = exc->func_read_cvt( exc, I ); + } + + + /*************************************************************************/ + /* */ +- /* EIF[]: End IF */ +- /* Opcode range: 0x59 */ +- /* Stack: --> */ ++ /* AA[]: Adjust Angle */ ++ /* Opcode range: 0x7F */ ++ /* Stack: uint32 --> */ + /* */ + static void +- Ins_EIF( void ) ++ Ins_AA( void ) + { +- /* nothing to do */ ++ /* intentionally no longer supported */ + } + + + /*************************************************************************/ + /* */ +- /* JMPR[]: JuMP Relative */ +- /* Opcode range: 0x1C */ +- /* Stack: int32 --> */ ++ /* DEBUG[]: DEBUG. Unsupported. */ ++ /* Opcode range: 0x4F */ ++ /* Stack: uint32 --> */ ++ /* */ ++ /* Note: The original instruction pops a value from the stack. */ + /* */ + static void +- Ins_JMPR( TT_ExecContext exc, +- FT_Long* args ) ++ Ins_DEBUG( TT_ExecContext exc ) + { +- if ( args[0] == 0 && exc->args == 0 ) +- exc->error = FT_THROW( Bad_Argument ); +- exc->IP += args[0]; +- if ( exc->IP < 0 || +- ( exc->callTop > 0 && +- exc->IP > exc->callStack[exc->callTop - 1].Def->end ) ) +- exc->error = FT_THROW( Bad_Argument ); +- exc->step_ins = FALSE; ++ exc->error = FT_THROW( Debug_OpCode ); + } + + + /*************************************************************************/ + /* */ +- /* JROT[]: Jump Relative On True */ +- /* Opcode range: 0x78 */ +- /* Stack: StkElt int32 --> */ ++ /* ROUND[ab]: ROUND value */ ++ /* Opcode range: 0x68-0x6B */ ++ /* Stack: f26.6 --> f26.6 */ + /* */ + static void +- Ins_JROT( TT_ExecContext exc, +- FT_Long* args ) ++ Ins_ROUND( TT_ExecContext exc, ++ FT_Long* args ) + { +- if ( args[1] != 0 ) +- Ins_JMPR( exc, args ); ++ args[0] = exc->func_round( ++ exc, ++ args[0], ++ exc->tt_metrics.compensations[exc->opcode - 0x68] ); + } + + + /*************************************************************************/ + /* */ +- /* JROF[]: Jump Relative On False */ +- /* Opcode range: 0x79 */ +- /* Stack: StkElt int32 --> */ ++ /* NROUND[ab]: No ROUNDing of value */ ++ /* Opcode range: 0x6C-0x6F */ ++ /* Stack: f26.6 --> f26.6 */ + /* */ + static void +- Ins_JROF( TT_ExecContext exc, +- FT_Long* args ) ++ Ins_NROUND( TT_ExecContext exc, ++ FT_Long* args ) + { +- if ( args[1] == 0 ) +- Ins_JMPR( exc, args ); ++ args[0] = Round_None( ++ exc, ++ args[0], ++ exc->tt_metrics.compensations[exc->opcode - 0x6C] ); + } + + + /*************************************************************************/ + /* */ +- /* LT[]: Less Than */ +- /* Opcode range: 0x50 */ +- /* Stack: int32? int32? --> bool */ ++ /* MAX[]: MAXimum */ ++ /* Opcode range: 0x68 */ ++ /* Stack: int32? int32? --> int32 */ + /* */ + static void +- Ins_LT( FT_Long* args ) ++ Ins_MAX( FT_Long* args ) + { +- args[0] = ( args[0] < args[1] ); ++ if ( args[1] > args[0] ) ++ args[0] = args[1]; + } + + + /*************************************************************************/ + /* */ +- /* LTEQ[]: Less Than or EQual */ +- /* Opcode range: 0x51 */ +- /* Stack: int32? int32? --> bool */ ++ /* MIN[]: MINimum */ ++ /* Opcode range: 0x69 */ ++ /* Stack: int32? int32? --> int32 */ + /* */ + static void +- Ins_LTEQ( FT_Long* args ) ++ Ins_MIN( FT_Long* args ) + { +- args[0] = ( args[0] <= args[1] ); ++ if ( args[1] < args[0] ) ++ args[0] = args[1]; + } + + + /*************************************************************************/ + /* */ +- /* GT[]: Greater Than */ +- /* Opcode range: 0x52 */ +- /* Stack: int32? int32? --> bool */ +- /* */ +- static void +- Ins_GT( FT_Long* args ) ++ /* MINDEX[]: Move INDEXed element */ ++ /* Opcode range: 0x26 */ ++ /* Stack: int32? --> StkElt */ ++ /* */ ++ static void ++ Ins_MINDEX( TT_ExecContext exc, ++ FT_Long* args ) + { +- args[0] = ( args[0] > args[1] ); ++ FT_Long L, K; ++ ++ ++ L = args[0]; ++ ++ if ( L <= 0 || L > exc->args ) ++ { ++ if ( exc->pedantic_hinting ) ++ exc->error = FT_THROW( Invalid_Reference ); ++ } ++ else ++ { ++ K = exc->stack[exc->args - L]; ++ ++ FT_ARRAY_MOVE( &exc->stack[exc->args - L ], ++ &exc->stack[exc->args - L + 1], ++ ( L - 1 ) ); ++ ++ exc->stack[exc->args - 1] = K; ++ } + } + + + /*************************************************************************/ + /* */ +- /* GTEQ[]: Greater Than or EQual */ +- /* Opcode range: 0x53 */ +- /* Stack: int32? int32? --> bool */ ++ /* CINDEX[]: Copy INDEXed element */ ++ /* Opcode range: 0x25 */ ++ /* Stack: int32 --> StkElt */ + /* */ + static void +- Ins_GTEQ( FT_Long* args ) ++ Ins_CINDEX( TT_ExecContext exc, ++ FT_Long* args ) + { +- args[0] = ( args[0] >= args[1] ); ++ FT_Long L; ++ ++ ++ L = args[0]; ++ ++ if ( L <= 0 || L > exc->args ) ++ { ++ if ( exc->pedantic_hinting ) ++ exc->error = FT_THROW( Invalid_Reference ); ++ args[0] = 0; ++ } ++ else ++ args[0] = exc->stack[exc->args - L]; + } + + + /*************************************************************************/ + /* */ +- /* EQ[]: EQual */ +- /* Opcode range: 0x54 */ +- /* Stack: StkElt StkElt --> bool */ ++ /* ROLL[]: ROLL top three elements */ ++ /* Opcode range: 0x8A */ ++ /* Stack: 3 * StkElt --> 3 * StkElt */ + /* */ + static void +- Ins_EQ( FT_Long* args ) ++ Ins_ROLL( FT_Long* args ) + { +- args[0] = ( args[0] == args[1] ); ++ FT_Long A, B, C; ++ ++ ++ A = args[2]; ++ B = args[1]; ++ C = args[0]; ++ ++ args[2] = C; ++ args[1] = A; ++ args[0] = B; + } + + + /*************************************************************************/ + /* */ +- /* NEQ[]: Not EQual */ +- /* Opcode range: 0x55 */ +- /* Stack: StkElt StkElt --> bool */ ++ /* MANAGING THE FLOW OF CONTROL */ + /* */ +- static void +- Ins_NEQ( FT_Long* args ) +- { +- args[0] = ( args[0] != args[1] ); +- } ++ /*************************************************************************/ + + + /*************************************************************************/ + /* */ +- /* ODD[]: Is ODD */ +- /* Opcode range: 0x56 */ +- /* Stack: f26.6 --> bool */ ++ /* SLOOP[]: Set LOOP variable */ ++ /* Opcode range: 0x17 */ ++ /* Stack: int32? --> */ + /* */ + static void +- Ins_ODD( TT_ExecContext exc, +- FT_Long* args ) ++ Ins_SLOOP( TT_ExecContext exc, ++ FT_Long* args ) + { +- args[0] = ( ( exc->func_round( exc, args[0], 0 ) & 127 ) == 64 ); ++ if ( args[0] < 0 ) ++ exc->error = FT_THROW( Bad_Argument ); ++ else ++ exc->GS.loop = args[0]; + } + + +- /*************************************************************************/ +- /* */ +- /* EVEN[]: Is EVEN */ +- /* Opcode range: 0x57 */ +- /* Stack: f26.6 --> bool */ +- /* */ +- static void +- Ins_EVEN( TT_ExecContext exc, +- FT_Long* args ) ++ static FT_Bool ++ SkipCode( TT_ExecContext exc ) + { +- args[0] = ( ( exc->func_round( exc, args[0], 0 ) & 127 ) == 0 ); ++ exc->IP += exc->length; ++ ++ if ( exc->IP < exc->codeSize ) ++ { ++ exc->opcode = exc->code[exc->IP]; ++ ++ exc->length = opcode_length[exc->opcode]; ++ if ( exc->length < 0 ) ++ { ++ if ( exc->IP + 1 >= exc->codeSize ) ++ goto Fail_Overflow; ++ exc->length = 2 - exc->length * exc->code[exc->IP + 1]; ++ } ++ ++ if ( exc->IP + exc->length <= exc->codeSize ) ++ return SUCCESS; ++ } ++ ++ Fail_Overflow: ++ exc->error = FT_THROW( Code_Overflow ); ++ return FAILURE; + } + + + /*************************************************************************/ + /* */ +- /* AND[]: logical AND */ +- /* Opcode range: 0x5A */ +- /* Stack: uint32 uint32 --> uint32 */ ++ /* IF[]: IF test */ ++ /* Opcode range: 0x58 */ ++ /* Stack: StkElt --> */ + /* */ + static void +- Ins_AND( FT_Long* args ) ++ Ins_IF( TT_ExecContext exc, ++ FT_Long* args ) + { +- args[0] = ( args[0] && args[1] ); ++ FT_Int nIfs; ++ FT_Bool Out; ++ ++ ++ if ( args[0] != 0 ) ++ return; ++ ++ nIfs = 1; ++ Out = 0; ++ ++ do ++ { ++ if ( SkipCode( exc ) == FAILURE ) ++ return; ++ ++ switch ( exc->opcode ) ++ { ++ case 0x58: /* IF */ ++ nIfs++; ++ break; ++ ++ case 0x1B: /* ELSE */ ++ Out = FT_BOOL( nIfs == 1 ); ++ break; ++ ++ case 0x59: /* EIF */ ++ nIfs--; ++ Out = FT_BOOL( nIfs == 0 ); ++ break; ++ } ++ } while ( Out == 0 ); + } + + + /*************************************************************************/ + /* */ +- /* OR[]: logical OR */ +- /* Opcode range: 0x5B */ +- /* Stack: uint32 uint32 --> uint32 */ ++ /* ELSE[]: ELSE */ ++ /* Opcode range: 0x1B */ ++ /* Stack: --> */ + /* */ + static void +- Ins_OR( FT_Long* args ) ++ Ins_ELSE( TT_ExecContext exc ) + { +- args[0] = ( args[0] || args[1] ); ++ FT_Int nIfs; ++ ++ ++ nIfs = 1; ++ ++ do ++ { ++ if ( SkipCode( exc ) == FAILURE ) ++ return; ++ ++ switch ( exc->opcode ) ++ { ++ case 0x58: /* IF */ ++ nIfs++; ++ break; ++ ++ case 0x59: /* EIF */ ++ nIfs--; ++ break; ++ } ++ } while ( nIfs != 0 ); + } + + + /*************************************************************************/ + /* */ +- /* NOT[]: logical NOT */ +- /* Opcode range: 0x5C */ +- /* Stack: StkElt --> uint32 */ ++ /* EIF[]: End IF */ ++ /* Opcode range: 0x59 */ ++ /* Stack: --> */ + /* */ + static void +- Ins_NOT( FT_Long* args ) ++ Ins_EIF( void ) + { +- args[0] = !args[0]; ++ /* nothing to do */ + } + + + /*************************************************************************/ + /* */ +- /* ADD[]: ADD */ +- /* Opcode range: 0x60 */ +- /* Stack: f26.6 f26.6 --> f26.6 */ ++ /* JMPR[]: JuMP Relative */ ++ /* Opcode range: 0x1C */ ++ /* Stack: int32 --> */ + /* */ + static void +- Ins_ADD( FT_Long* args ) ++ Ins_JMPR( TT_ExecContext exc, ++ FT_Long* args ) + { +- args[0] += args[1]; ++ if ( args[0] == 0 && exc->args == 0 ) ++ exc->error = FT_THROW( Bad_Argument ); ++ exc->IP += args[0]; ++ if ( exc->IP < 0 || ++ ( exc->callTop > 0 && ++ exc->IP > exc->callStack[exc->callTop - 1].Def->end ) ) ++ exc->error = FT_THROW( Bad_Argument ); ++ exc->step_ins = FALSE; + } + + + /*************************************************************************/ + /* */ +- /* SUB[]: SUBtract */ +- /* Opcode range: 0x61 */ +- /* Stack: f26.6 f26.6 --> f26.6 */ ++ /* JROT[]: Jump Relative On True */ ++ /* Opcode range: 0x78 */ ++ /* Stack: StkElt int32 --> */ + /* */ + static void +- Ins_SUB( FT_Long* args ) ++ Ins_JROT( TT_ExecContext exc, ++ FT_Long* args ) + { +- args[0] -= args[1]; ++ if ( args[1] != 0 ) ++ Ins_JMPR( exc, args ); + } + + + /*************************************************************************/ + /* */ +- /* DIV[]: DIVide */ +- /* Opcode range: 0x62 */ +- /* Stack: f26.6 f26.6 --> f26.6 */ ++ /* JROF[]: Jump Relative On False */ ++ /* Opcode range: 0x79 */ ++ /* Stack: StkElt int32 --> */ + /* */ + static void +- Ins_DIV( TT_ExecContext exc, +- FT_Long* args ) ++ Ins_JROF( TT_ExecContext exc, ++ FT_Long* args ) + { + if ( args[1] == 0 ) +- exc->error = FT_THROW( Divide_By_Zero ); +- else +- args[0] = FT_MulDiv_No_Round( args[0], 64L, args[1] ); ++ Ins_JMPR( exc, args ); + } + + + /*************************************************************************/ + /* */ +- /* MUL[]: MULtiply */ +- /* Opcode range: 0x63 */ +- /* Stack: f26.6 f26.6 --> f26.6 */ +- /* */ +- static void +- Ins_MUL( FT_Long* args ) +- { +- args[0] = FT_MulDiv( args[0], args[1], 64L ); +- } +- +- +- /*************************************************************************/ +- /* */ +- /* ABS[]: ABSolute value */ +- /* Opcode range: 0x64 */ +- /* Stack: f26.6 --> f26.6 */ +- /* */ +- static void +- Ins_ABS( FT_Long* args ) +- { +- args[0] = FT_ABS( args[0] ); +- } +- +- +- /*************************************************************************/ +- /* */ +- /* NEG[]: NEGate */ +- /* Opcode range: 0x65 */ +- /* Stack: f26.6 --> f26.6 */ ++ /* DEFINING AND USING FUNCTIONS AND INSTRUCTIONS */ + /* */ +- static void +- Ins_NEG( FT_Long* args ) +- { +- args[0] = -args[0]; +- } +- +- + /*************************************************************************/ +- /* */ +- /* FLOOR[]: FLOOR */ +- /* Opcode range: 0x66 */ +- /* Stack: f26.6 --> f26.6 */ +- /* */ +- static void +- Ins_FLOOR( FT_Long* args ) +- { +- args[0] = FT_PIX_FLOOR( args[0] ); +- } + + + /*************************************************************************/ + /* */ +- /* CEILING[]: CEILING */ +- /* Opcode range: 0x67 */ +- /* Stack: f26.6 --> f26.6 */ ++ /* FDEF[]: Function DEFinition */ ++ /* Opcode range: 0x2C */ ++ /* Stack: uint32 --> */ + /* */ + static void +- Ins_CEILING( FT_Long* args ) ++ Ins_FDEF( TT_ExecContext exc, ++ FT_Long* args ) + { +- args[0] = FT_PIX_CEIL( args[0] ); +- } +- ++ FT_ULong n; ++ TT_DefRecord* rec; ++ TT_DefRecord* limit; + +- /*************************************************************************/ +- /* */ +- /* RS[]: Read Store */ +- /* Opcode range: 0x43 */ +- /* Stack: uint32 --> uint32 */ +- /* */ +- static void +- Ins_RS( TT_ExecContext exc, +- FT_Long* args ) +- { + #ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING ++ /* arguments to opcodes are skipped by `SKIP_Code' */ ++ FT_Byte opcode_pattern[9][12] = { ++ /* #0 inline delta function 1 */ ++ { ++ 0x4B, /* PPEM */ ++ 0x53, /* GTEQ */ ++ 0x23, /* SWAP */ ++ 0x4B, /* PPEM */ ++ 0x51, /* LTEQ */ ++ 0x5A, /* AND */ ++ 0x58, /* IF */ ++ 0x38, /* SHPIX */ ++ 0x1B, /* ELSE */ ++ 0x21, /* POP */ ++ 0x21, /* POP */ ++ 0x59 /* EIF */ ++ }, ++ /* #1 inline delta function 2 */ ++ { ++ 0x4B, /* PPEM */ ++ 0x54, /* EQ */ ++ 0x58, /* IF */ ++ 0x38, /* SHPIX */ ++ 0x1B, /* ELSE */ ++ 0x21, /* POP */ ++ 0x21, /* POP */ ++ 0x59 /* EIF */ ++ }, ++ /* #2 diagonal stroke function */ ++ { ++ 0x20, /* DUP */ ++ 0x20, /* DUP */ ++ 0xB0, /* PUSHB_1 */ ++ /* 1 */ ++ 0x60, /* ADD */ ++ 0x46, /* GC_cur */ ++ 0xB0, /* PUSHB_1 */ ++ /* 64 */ ++ 0x23, /* SWAP */ ++ 0x42 /* WS */ ++ }, ++ /* #3 VacuFormRound function */ ++ { ++ 0x45, /* RCVT */ ++ 0x23, /* SWAP */ ++ 0x46, /* GC_cur */ ++ 0x60, /* ADD */ ++ 0x20, /* DUP */ ++ 0xB0 /* PUSHB_1 */ ++ /* 38 */ ++ }, ++ /* #4 TTFautohint bytecode (old) */ ++ { ++ 0x20, /* DUP */ ++ 0x64, /* ABS */ ++ 0xB0, /* PUSHB_1 */ ++ /* 32 */ ++ 0x60, /* ADD */ ++ 0x66, /* FLOOR */ ++ 0x23, /* SWAP */ ++ 0xB0 /* PUSHB_1 */ ++ }, ++ /* #5 spacing function 1 */ ++ { ++ 0x01, /* SVTCA_x */ ++ 0xB0, /* PUSHB_1 */ ++ /* 24 */ ++ 0x43, /* RS */ ++ 0x58 /* IF */ ++ }, ++ /* #6 spacing function 2 */ ++ { ++ 0x01, /* SVTCA_x */ ++ 0x18, /* RTG */ ++ 0xB0, /* PUSHB_1 */ ++ /* 24 */ ++ 0x43, /* RS */ ++ 0x58 /* IF */ ++ }, ++ /* #7 TypeMan Talk DiagEndCtrl function */ ++ { ++ 0x01, /* SVTCA_x */ ++ 0x20, /* DUP */ ++ 0xB0, /* PUSHB_1 */ ++ /* 3 */ ++ 0x25, /* CINDEX */ ++ }, ++ /* #8 TypeMan Talk Align */ ++ { ++ 0x06, /* SPVTL */ ++ 0x7D, /* RDTG */ ++ }, ++ }; ++ FT_UShort opcode_patterns = 9; ++ FT_UShort opcode_pointer[9] = { 0, 0, 0, 0, 0, 0, 0, 0, 0 }; ++ FT_UShort opcode_size[9] = { 12, 8, 8, 6, 7, 4, 5, 4, 2 }; ++ FT_UShort i; ++#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ + +- FT_ULong I = (FT_ULong)args[0]; + ++ /* some font programs are broken enough to redefine functions! */ ++ /* We will then parse the current table. */ + +- if ( BOUNDSL( I, exc->storeSize ) ) +- { +- if ( exc->pedantic_hinting ) +- ARRAY_BOUND_ERROR; +- else +- args[0] = 0; +- } +- else ++ rec = exc->FDefs; ++ limit = rec + exc->numFDefs; ++ n = args[0]; ++ ++ for ( ; rec < limit; rec++ ) + { +- /* subpixel hinting - avoid Typeman Dstroke and */ +- /* IStroke and Vacuform rounds */ +- if ( SUBPIXEL_HINTING && +- exc->ignore_x_mode && +- ( ( I == 24 && +- ( exc->face->sph_found_func_flags & +- ( SPH_FDEF_SPACING_1 | +- SPH_FDEF_SPACING_2 ) ) ) || +- ( I == 22 && +- ( exc->sph_in_func_flags & +- SPH_FDEF_TYPEMAN_STROKES ) ) || +- ( I == 8 && +- ( exc->face->sph_found_func_flags & +- SPH_FDEF_VACUFORM_ROUND_1 ) && +- exc->iup_called ) ) ) +- args[0] = 0; +- else +- args[0] = exc->storage[I]; ++ if ( rec->opc == n ) ++ break; + } + +-#else /* !TT_CONFIG_OPTION_SUBPIXEL_HINTING */ +- +- FT_ULong I = (FT_ULong)args[0]; +- +- +- if ( BOUNDSL( I, exc->storeSize ) ) ++ if ( rec == limit ) + { +- if ( exc->pedantic_hinting ) +- ARRAY_BOUND_ERROR; +- else +- args[0] = 0; ++ /* check that there is enough room for new functions */ ++ if ( exc->numFDefs >= exc->maxFDefs ) ++ { ++ exc->error = FT_THROW( Too_Many_Function_Defs ); ++ return; ++ } ++ exc->numFDefs++; + } +- else +- args[0] = exc->storage[I]; +- +-#endif /* !TT_CONFIG_OPTION_SUBPIXEL_HINTING */ +- } +- +- +- /*************************************************************************/ +- /* */ +- /* WS[]: Write Store */ +- /* Opcode range: 0x42 */ +- /* Stack: uint32 uint32 --> */ +- /* */ +- static void +- Ins_WS( TT_ExecContext exc, +- FT_Long* args ) +- { +- FT_ULong I = (FT_ULong)args[0]; + +- +- if ( BOUNDSL( I, exc->storeSize ) ) ++ /* Although FDEF takes unsigned 32-bit integer, */ ++ /* func # must be within unsigned 16-bit integer */ ++ if ( n > 0xFFFFU ) + { +- if ( exc->pedantic_hinting ) +- ARRAY_BOUND_ERROR; ++ exc->error = FT_THROW( Too_Many_Function_Defs ); ++ return; + } +- else +- exc->storage[I] = args[1]; +- } + ++ rec->range = exc->curRange; ++ rec->opc = (FT_UInt16)n; ++ rec->start = exc->IP + 1; ++ rec->active = TRUE; ++ rec->inline_delta = FALSE; ++ rec->sph_fdef_flags = 0x0000; + +- /*************************************************************************/ +- /* */ +- /* WCVTP[]: Write CVT in Pixel units */ +- /* Opcode range: 0x44 */ +- /* Stack: f26.6 uint32 --> */ +- /* */ +- static void +- Ins_WCVTP( TT_ExecContext exc, +- FT_Long* args ) +- { +- FT_ULong I = (FT_ULong)args[0]; ++ if ( n > exc->maxFunc ) ++ exc->maxFunc = (FT_UInt16)n; ++ ++#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING ++ /* We don't know for sure these are typeman functions, */ ++ /* however they are only active when RS 22 is called */ ++ if ( n >= 64 && n <= 66 ) ++ rec->sph_fdef_flags |= SPH_FDEF_TYPEMAN_STROKES; ++#endif + ++ /* Now skip the whole function definition. */ ++ /* We don't allow nested IDEFS & FDEFs. */ + +- if ( BOUNDSL( I, exc->cvtSize ) ) ++ while ( SkipCode( exc ) == SUCCESS ) + { +- if ( exc->pedantic_hinting ) +- ARRAY_BOUND_ERROR; +- } +- else +- exc->func_write_cvt( exc, I, args[1] ); +- } + ++#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING + +- /*************************************************************************/ +- /* */ +- /* WCVTF[]: Write CVT in Funits */ +- /* Opcode range: 0x70 */ +- /* Stack: uint32 uint32 --> */ +- /* */ +- static void +- Ins_WCVTF( TT_ExecContext exc, +- FT_Long* args ) +- { +- FT_ULong I = (FT_ULong)args[0]; ++ if ( SUBPIXEL_HINTING ) ++ { ++ for ( i = 0; i < opcode_patterns; i++ ) ++ { ++ if ( opcode_pointer[i] < opcode_size[i] && ++ exc->opcode == opcode_pattern[i][opcode_pointer[i]] ) ++ { ++ opcode_pointer[i] += 1; + ++ if ( opcode_pointer[i] == opcode_size[i] ) ++ { ++ FT_TRACE7(( "sph: Function %d, opcode ptrn: %d, %s %s\n", ++ i, n, ++ exc->face->root.family_name, ++ exc->face->root.style_name )); + +- if ( BOUNDSL( I, exc->cvtSize ) ) +- { +- if ( exc->pedantic_hinting ) +- ARRAY_BOUND_ERROR; +- } +- else +- exc->cvt[I] = FT_MulFix( args[1], exc->tt_metrics.scale ); +- } ++ switch ( i ) ++ { ++ case 0: ++ rec->sph_fdef_flags |= SPH_FDEF_INLINE_DELTA_1; ++ exc->face->sph_found_func_flags |= SPH_FDEF_INLINE_DELTA_1; ++ break; + ++ case 1: ++ rec->sph_fdef_flags |= SPH_FDEF_INLINE_DELTA_2; ++ exc->face->sph_found_func_flags |= SPH_FDEF_INLINE_DELTA_2; ++ break; + +- /*************************************************************************/ +- /* */ +- /* RCVT[]: Read CVT */ +- /* Opcode range: 0x45 */ +- /* Stack: uint32 --> f26.6 */ +- /* */ +- static void +- Ins_RCVT( TT_ExecContext exc, +- FT_Long* args ) +- { +- FT_ULong I = (FT_ULong)args[0]; ++ case 2: ++ switch ( n ) ++ { ++ /* needs to be implemented still */ ++ case 58: ++ rec->sph_fdef_flags |= SPH_FDEF_DIAGONAL_STROKE; ++ exc->face->sph_found_func_flags |= SPH_FDEF_DIAGONAL_STROKE; ++ } ++ break; + ++ case 3: ++ switch ( n ) ++ { ++ case 0: ++ rec->sph_fdef_flags |= SPH_FDEF_VACUFORM_ROUND_1; ++ exc->face->sph_found_func_flags |= SPH_FDEF_VACUFORM_ROUND_1; ++ } ++ break; + +- if ( BOUNDSL( I, exc->cvtSize ) ) +- { +- if ( exc->pedantic_hinting ) +- ARRAY_BOUND_ERROR; +- else +- args[0] = 0; +- } +- else +- args[0] = exc->func_read_cvt( exc, I ); +- } ++ case 4: ++ /* probably not necessary to detect anymore */ ++ rec->sph_fdef_flags |= SPH_FDEF_TTFAUTOHINT_1; ++ exc->face->sph_found_func_flags |= SPH_FDEF_TTFAUTOHINT_1; ++ break; + ++ case 5: ++ switch ( n ) ++ { ++ case 0: ++ case 1: ++ case 2: ++ case 4: ++ case 7: ++ case 8: ++ rec->sph_fdef_flags |= SPH_FDEF_SPACING_1; ++ exc->face->sph_found_func_flags |= SPH_FDEF_SPACING_1; ++ } ++ break; + +- /*************************************************************************/ +- /* */ +- /* AA[]: Adjust Angle */ +- /* Opcode range: 0x7F */ +- /* Stack: uint32 --> */ +- /* */ +- static void +- Ins_AA( void ) +- { +- /* intentionally no longer supported */ +- } ++ case 6: ++ switch ( n ) ++ { ++ case 0: ++ case 1: ++ case 2: ++ case 4: ++ case 7: ++ case 8: ++ rec->sph_fdef_flags |= SPH_FDEF_SPACING_2; ++ exc->face->sph_found_func_flags |= SPH_FDEF_SPACING_2; ++ } ++ break; + ++ case 7: ++ rec->sph_fdef_flags |= SPH_FDEF_TYPEMAN_DIAGENDCTRL; ++ exc->face->sph_found_func_flags |= SPH_FDEF_TYPEMAN_DIAGENDCTRL; ++ break; + +- /*************************************************************************/ +- /* */ +- /* DEBUG[]: DEBUG. Unsupported. */ +- /* Opcode range: 0x4F */ +- /* Stack: uint32 --> */ +- /* */ +- /* Note: The original instruction pops a value from the stack. */ +- /* */ +- static void +- Ins_DEBUG( TT_ExecContext exc ) +- { +- exc->error = FT_THROW( Debug_OpCode ); +- } ++ case 8: ++#if 0 ++ rec->sph_fdef_flags |= SPH_FDEF_TYPEMAN_DIAGENDCTRL; ++ exc->face->sph_found_func_flags |= SPH_FDEF_TYPEMAN_DIAGENDCTRL; ++#endif ++ break; ++ } ++ opcode_pointer[i] = 0; ++ } ++ } + ++ else ++ opcode_pointer[i] = 0; ++ } + +- /*************************************************************************/ +- /* */ +- /* ROUND[ab]: ROUND value */ +- /* Opcode range: 0x68-0x6B */ +- /* Stack: f26.6 --> f26.6 */ +- /* */ +- static void +- Ins_ROUND( TT_ExecContext exc, +- FT_Long* args ) +- { +- args[0] = exc->func_round( +- exc, +- args[0], +- exc->tt_metrics.compensations[exc->opcode - 0x68] ); +- } ++ /* Set sph_compatibility_mode only when deltas are detected */ ++ exc->face->sph_compatibility_mode = ++ ( ( exc->face->sph_found_func_flags & SPH_FDEF_INLINE_DELTA_1 ) | ++ ( exc->face->sph_found_func_flags & SPH_FDEF_INLINE_DELTA_2 ) ); ++ } + ++#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ + +- /*************************************************************************/ +- /* */ +- /* NROUND[ab]: No ROUNDing of value */ +- /* Opcode range: 0x6C-0x6F */ +- /* Stack: f26.6 --> f26.6 */ +- /* */ +- static void +- Ins_NROUND( TT_ExecContext exc, +- FT_Long* args ) +- { +- args[0] = Round_None( +- exc, +- args[0], +- exc->tt_metrics.compensations[exc->opcode - 0x6C] ); ++ switch ( exc->opcode ) ++ { ++ case 0x89: /* IDEF */ ++ case 0x2C: /* FDEF */ ++ exc->error = FT_THROW( Nested_DEFS ); ++ return; ++ ++ case 0x2D: /* ENDF */ ++ rec->end = exc->IP; ++ return; ++ } ++ } + } + + + /*************************************************************************/ + /* */ +- /* MAX[]: MAXimum */ +- /* Opcode range: 0x68 */ +- /* Stack: int32? int32? --> int32 */ ++ /* ENDF[]: END Function definition */ ++ /* Opcode range: 0x2D */ ++ /* Stack: --> */ + /* */ + static void +- Ins_MAX( FT_Long* args ) ++ Ins_ENDF( TT_ExecContext exc ) + { +- if ( args[1] > args[0] ) +- args[0] = args[1]; +- } ++ TT_CallRec* pRec; + + +- /*************************************************************************/ +- /* */ +- /* MIN[]: MINimum */ +- /* Opcode range: 0x69 */ +- /* Stack: int32? int32? --> int32 */ +- /* */ +- static void +- Ins_MIN( FT_Long* args ) +- { +- if ( args[1] < args[0] ) +- args[0] = args[1]; +- } ++#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING ++ exc->sph_in_func_flags = 0x0000; ++#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ + ++ if ( exc->callTop <= 0 ) /* We encountered an ENDF without a call */ ++ { ++ exc->error = FT_THROW( ENDF_In_Exec_Stream ); ++ return; ++ } + +- /*************************************************************************/ +- /* */ +- /* MINDEX[]: Move INDEXed element */ +- /* Opcode range: 0x26 */ +- /* Stack: int32? --> StkElt */ +- /* */ +- static void +- Ins_MINDEX( TT_ExecContext exc, +- FT_Long* args ) +- { +- FT_Long L, K; ++ exc->callTop--; + ++ pRec = &exc->callStack[exc->callTop]; + +- L = args[0]; ++ pRec->Cur_Count--; + +- if ( L <= 0 || L > exc->args ) ++ exc->step_ins = FALSE; ++ ++ if ( pRec->Cur_Count > 0 ) + { +- if ( exc->pedantic_hinting ) +- exc->error = FT_THROW( Invalid_Reference ); ++ exc->callTop++; ++ exc->IP = pRec->Def->start; + } + else +- { +- K = exc->stack[exc->args - L]; ++ /* Loop through the current function */ ++ Ins_Goto_CodeRange( exc, pRec->Caller_Range, pRec->Caller_IP ); + +- FT_ARRAY_MOVE( &exc->stack[exc->args - L ], +- &exc->stack[exc->args - L + 1], +- ( L - 1 ) ); ++ /* Exit the current call frame. */ + +- exc->stack[exc->args - 1] = K; +- } ++ /* NOTE: If the last instruction of a program is a */ ++ /* CALL or LOOPCALL, the return address is */ ++ /* always out of the code range. This is a */ ++ /* valid address, and it is why we do not test */ ++ /* the result of Ins_Goto_CodeRange() here! */ + } + + + /*************************************************************************/ + /* */ +- /* ROLL[]: ROLL top three elements */ +- /* Opcode range: 0x8A */ +- /* Stack: 3 * StkElt --> 3 * StkElt */ ++ /* CALL[]: CALL function */ ++ /* Opcode range: 0x2B */ ++ /* Stack: uint32? --> */ + /* */ + static void +- Ins_ROLL( FT_Long* args ) ++ Ins_CALL( TT_ExecContext exc, ++ FT_Long* args ) + { +- FT_Long A, B, C; +- +- +- A = args[2]; +- B = args[1]; +- C = args[0]; ++ FT_ULong F; ++ TT_CallRec* pCrec; ++ TT_DefRecord* def; + +- args[2] = C; +- args[1] = A; +- args[0] = B; +- } + ++ /* first of all, check the index */ + +- /*************************************************************************/ +- /* */ +- /* MANAGING THE FLOW OF CONTROL */ +- /* */ +- /* Instructions appear in the specification's order. */ +- /* */ +- /*************************************************************************/ ++ F = args[0]; ++ if ( BOUNDSL( F, exc->maxFunc + 1 ) ) ++ goto Fail; + ++ /* Except for some old Apple fonts, all functions in a TrueType */ ++ /* font are defined in increasing order, starting from 0. This */ ++ /* means that we normally have */ ++ /* */ ++ /* exc->maxFunc+1 == exc->numFDefs */ ++ /* exc->FDefs[n].opc == n for n in 0..exc->maxFunc */ ++ /* */ ++ /* If this isn't true, we need to look up the function table. */ + +- static FT_Bool +- SkipCode( TT_ExecContext exc ) +- { +- exc->IP += exc->length; ++ def = exc->FDefs + F; ++ if ( exc->maxFunc + 1 != exc->numFDefs || def->opc != F ) ++ { ++ /* look up the FDefs table */ ++ TT_DefRecord* limit; + +- if ( exc->IP < exc->codeSize ) +- { +- exc->opcode = exc->code[exc->IP]; + +- exc->length = opcode_length[exc->opcode]; +- if ( exc->length < 0 ) +- { +- if ( exc->IP + 1 >= exc->codeSize ) +- goto Fail_Overflow; +- exc->length = 2 - exc->length * exc->code[exc->IP + 1]; +- } ++ def = exc->FDefs; ++ limit = def + exc->numFDefs; + +- if ( exc->IP + exc->length <= exc->codeSize ) +- return SUCCESS; ++ while ( def < limit && def->opc != F ) ++ def++; ++ ++ if ( def == limit ) ++ goto Fail; + } + +- Fail_Overflow: +- exc->error = FT_THROW( Code_Overflow ); +- return FAILURE; +- } ++ /* check that the function is active */ ++ if ( !def->active ) ++ goto Fail; + ++#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING ++ if ( SUBPIXEL_HINTING && ++ exc->ignore_x_mode && ++ ( ( exc->iup_called && ++ ( exc->sph_tweak_flags & SPH_TWEAK_NO_CALL_AFTER_IUP ) ) || ++ ( def->sph_fdef_flags & SPH_FDEF_VACUFORM_ROUND_1 ) ) ) ++ goto Fail; ++ else ++ exc->sph_in_func_flags = def->sph_fdef_flags; ++#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ + +- /*************************************************************************/ +- /* */ +- /* IF[]: IF test */ +- /* Opcode range: 0x58 */ +- /* Stack: StkElt --> */ +- /* */ +- static void +- Ins_IF( TT_ExecContext exc, +- FT_Long* args ) +- { +- FT_Int nIfs; +- FT_Bool Out; ++ /* check the call stack */ ++ if ( exc->callTop >= exc->callSize ) ++ { ++ exc->error = FT_THROW( Stack_Overflow ); ++ return; ++ } + ++ pCrec = exc->callStack + exc->callTop; + +- if ( args[0] != 0 ) +- return; ++ pCrec->Caller_Range = exc->curRange; ++ pCrec->Caller_IP = exc->IP + 1; ++ pCrec->Cur_Count = 1; ++ pCrec->Def = def; + +- nIfs = 1; +- Out = 0; ++ exc->callTop++; + +- do +- { +- if ( SkipCode( exc ) == FAILURE ) +- return; ++ Ins_Goto_CodeRange( exc, def->range, def->start ); + +- switch ( exc->opcode ) +- { +- case 0x58: /* IF */ +- nIfs++; +- break; ++ exc->step_ins = FALSE; + +- case 0x1B: /* ELSE */ +- Out = FT_BOOL( nIfs == 1 ); +- break; ++ return; + +- case 0x59: /* EIF */ +- nIfs--; +- Out = FT_BOOL( nIfs == 0 ); +- break; +- } +- } while ( Out == 0 ); ++ Fail: ++ exc->error = FT_THROW( Invalid_Reference ); + } + + + /*************************************************************************/ + /* */ +- /* ELSE[]: ELSE */ +- /* Opcode range: 0x1B */ +- /* Stack: --> */ ++ /* LOOPCALL[]: LOOP and CALL function */ ++ /* Opcode range: 0x2A */ ++ /* Stack: uint32? Eint16? --> */ + /* */ + static void +- Ins_ELSE( TT_ExecContext exc ) ++ Ins_LOOPCALL( TT_ExecContext exc, ++ FT_Long* args ) + { +- FT_Int nIfs; +- +- +- nIfs = 1; +- +- do +- { +- if ( SkipCode( exc ) == FAILURE ) +- return; ++ FT_ULong F; ++ TT_CallRec* pCrec; ++ TT_DefRecord* def; + +- switch ( exc->opcode ) +- { +- case 0x58: /* IF */ +- nIfs++; +- break; + +- case 0x59: /* EIF */ +- nIfs--; +- break; +- } +- } while ( nIfs != 0 ); +- } ++ /* first of all, check the index */ ++ F = args[1]; ++ if ( BOUNDSL( F, exc->maxFunc + 1 ) ) ++ goto Fail; + ++ /* Except for some old Apple fonts, all functions in a TrueType */ ++ /* font are defined in increasing order, starting from 0. This */ ++ /* means that we normally have */ ++ /* */ ++ /* exc->maxFunc+1 == exc->numFDefs */ ++ /* exc->FDefs[n].opc == n for n in 0..exc->maxFunc */ ++ /* */ ++ /* If this isn't true, we need to look up the function table. */ + +- /*************************************************************************/ +- /* */ +- /* DEFINING AND USING FUNCTIONS AND INSTRUCTIONS */ +- /* */ +- /* Instructions appear in the specification's order. */ +- /* */ +- /*************************************************************************/ ++ def = exc->FDefs + F; ++ if ( exc->maxFunc + 1 != exc->numFDefs || def->opc != F ) ++ { ++ /* look up the FDefs table */ ++ TT_DefRecord* limit; + + +- /*************************************************************************/ +- /* */ +- /* FDEF[]: Function DEFinition */ +- /* Opcode range: 0x2C */ +- /* Stack: uint32 --> */ +- /* */ +- static void +- Ins_FDEF( TT_ExecContext exc, +- FT_Long* args ) +- { +- FT_ULong n; +- TT_DefRecord* rec; +- TT_DefRecord* limit; ++ def = exc->FDefs; ++ limit = def + exc->numFDefs; + +-#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING +- /* arguments to opcodes are skipped by `SKIP_Code' */ +- FT_Byte opcode_pattern[9][12] = { +- /* #0 inline delta function 1 */ +- { +- 0x4B, /* PPEM */ +- 0x53, /* GTEQ */ +- 0x23, /* SWAP */ +- 0x4B, /* PPEM */ +- 0x51, /* LTEQ */ +- 0x5A, /* AND */ +- 0x58, /* IF */ +- 0x38, /* SHPIX */ +- 0x1B, /* ELSE */ +- 0x21, /* POP */ +- 0x21, /* POP */ +- 0x59 /* EIF */ +- }, +- /* #1 inline delta function 2 */ +- { +- 0x4B, /* PPEM */ +- 0x54, /* EQ */ +- 0x58, /* IF */ +- 0x38, /* SHPIX */ +- 0x1B, /* ELSE */ +- 0x21, /* POP */ +- 0x21, /* POP */ +- 0x59 /* EIF */ +- }, +- /* #2 diagonal stroke function */ +- { +- 0x20, /* DUP */ +- 0x20, /* DUP */ +- 0xB0, /* PUSHB_1 */ +- /* 1 */ +- 0x60, /* ADD */ +- 0x46, /* GC_cur */ +- 0xB0, /* PUSHB_1 */ +- /* 64 */ +- 0x23, /* SWAP */ +- 0x42 /* WS */ +- }, +- /* #3 VacuFormRound function */ +- { +- 0x45, /* RCVT */ +- 0x23, /* SWAP */ +- 0x46, /* GC_cur */ +- 0x60, /* ADD */ +- 0x20, /* DUP */ +- 0xB0 /* PUSHB_1 */ +- /* 38 */ +- }, +- /* #4 TTFautohint bytecode (old) */ +- { +- 0x20, /* DUP */ +- 0x64, /* ABS */ +- 0xB0, /* PUSHB_1 */ +- /* 32 */ +- 0x60, /* ADD */ +- 0x66, /* FLOOR */ +- 0x23, /* SWAP */ +- 0xB0 /* PUSHB_1 */ +- }, +- /* #5 spacing function 1 */ +- { +- 0x01, /* SVTCA_x */ +- 0xB0, /* PUSHB_1 */ +- /* 24 */ +- 0x43, /* RS */ +- 0x58 /* IF */ +- }, +- /* #6 spacing function 2 */ +- { +- 0x01, /* SVTCA_x */ +- 0x18, /* RTG */ +- 0xB0, /* PUSHB_1 */ +- /* 24 */ +- 0x43, /* RS */ +- 0x58 /* IF */ +- }, +- /* #7 TypeMan Talk DiagEndCtrl function */ +- { +- 0x01, /* SVTCA_x */ +- 0x20, /* DUP */ +- 0xB0, /* PUSHB_1 */ +- /* 3 */ +- 0x25, /* CINDEX */ +- }, +- /* #8 TypeMan Talk Align */ +- { +- 0x06, /* SPVTL */ +- 0x7D, /* RDTG */ +- }, +- }; +- FT_UShort opcode_patterns = 9; +- FT_UShort opcode_pointer[9] = { 0, 0, 0, 0, 0, 0, 0, 0, 0 }; +- FT_UShort opcode_size[9] = { 12, 8, 8, 6, 7, 4, 5, 4, 2 }; +- FT_UShort i; +-#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ ++ while ( def < limit && def->opc != F ) ++ def++; + ++ if ( def == limit ) ++ goto Fail; ++ } + +- /* some font programs are broken enough to redefine functions! */ +- /* We will then parse the current table. */ ++ /* check that the function is active */ ++ if ( !def->active ) ++ goto Fail; + +- rec = exc->FDefs; +- limit = rec + exc->numFDefs; +- n = args[0]; ++#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING ++ if ( SUBPIXEL_HINTING && ++ exc->ignore_x_mode && ++ ( def->sph_fdef_flags & SPH_FDEF_VACUFORM_ROUND_1 ) ) ++ goto Fail; ++ else ++ exc->sph_in_func_flags = def->sph_fdef_flags; ++#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ + +- for ( ; rec < limit; rec++ ) ++ /* check stack */ ++ if ( exc->callTop >= exc->callSize ) + { +- if ( rec->opc == n ) +- break; ++ exc->error = FT_THROW( Stack_Overflow ); ++ return; + } + +- if ( rec == limit ) ++ if ( args[0] > 0 ) + { +- /* check that there is enough room for new functions */ +- if ( exc->numFDefs >= exc->maxFDefs ) ++ pCrec = exc->callStack + exc->callTop; ++ ++ pCrec->Caller_Range = exc->curRange; ++ pCrec->Caller_IP = exc->IP + 1; ++ pCrec->Cur_Count = (FT_Int)args[0]; ++ pCrec->Def = def; ++ ++ exc->callTop++; ++ ++ Ins_Goto_CodeRange( exc, def->range, def->start ); ++ ++ exc->step_ins = FALSE; ++ } ++ ++ return; ++ ++ Fail: ++ exc->error = FT_THROW( Invalid_Reference ); ++ } ++ ++ ++ /*************************************************************************/ ++ /* */ ++ /* IDEF[]: Instruction DEFinition */ ++ /* Opcode range: 0x89 */ ++ /* Stack: Eint8 --> */ ++ /* */ ++ static void ++ Ins_IDEF( TT_ExecContext exc, ++ FT_Long* args ) ++ { ++ TT_DefRecord* def; ++ TT_DefRecord* limit; ++ ++ ++ /* First of all, look for the same function in our table */ ++ ++ def = exc->IDefs; ++ limit = def + exc->numIDefs; ++ ++ for ( ; def < limit; def++ ) ++ if ( def->opc == (FT_ULong)args[0] ) ++ break; ++ ++ if ( def == limit ) ++ { ++ /* check that there is enough room for a new instruction */ ++ if ( exc->numIDefs >= exc->maxIDefs ) + { +- exc->error = FT_THROW( Too_Many_Function_Defs ); ++ exc->error = FT_THROW( Too_Many_Instruction_Defs ); + return; + } +- exc->numFDefs++; ++ exc->numIDefs++; + } + +- /* Although FDEF takes unsigned 32-bit integer, */ +- /* func # must be within unsigned 16-bit integer */ +- if ( n > 0xFFFFU ) ++ /* opcode must be unsigned 8-bit integer */ ++ if ( 0 > args[0] || args[0] > 0x00FF ) + { +- exc->error = FT_THROW( Too_Many_Function_Defs ); ++ exc->error = FT_THROW( Too_Many_Instruction_Defs ); + return; + } + +- rec->range = exc->curRange; +- rec->opc = (FT_UInt16)n; +- rec->start = exc->IP + 1; +- rec->active = TRUE; +- rec->inline_delta = FALSE; +- rec->sph_fdef_flags = 0x0000; +- +- if ( n > exc->maxFunc ) +- exc->maxFunc = (FT_UInt16)n; ++ def->opc = (FT_Byte)args[0]; ++ def->start = exc->IP + 1; ++ def->range = exc->curRange; ++ def->active = TRUE; + +-#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING +- /* We don't know for sure these are typeman functions, */ +- /* however they are only active when RS 22 is called */ +- if ( n >= 64 && n <= 66 ) +- rec->sph_fdef_flags |= SPH_FDEF_TYPEMAN_STROKES; +-#endif ++ if ( (FT_ULong)args[0] > exc->maxIns ) ++ exc->maxIns = (FT_Byte)args[0]; + + /* Now skip the whole function definition. */ +- /* We don't allow nested IDEFS & FDEFs. */ ++ /* We don't allow nested IDEFs & FDEFs. */ + + while ( SkipCode( exc ) == SUCCESS ) + { +- +-#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING +- +- if ( SUBPIXEL_HINTING ) ++ switch ( exc->opcode ) + { +- for ( i = 0; i < opcode_patterns; i++ ) +- { +- if ( opcode_pointer[i] < opcode_size[i] && +- exc->opcode == opcode_pattern[i][opcode_pointer[i]] ) +- { +- opcode_pointer[i] += 1; +- +- if ( opcode_pointer[i] == opcode_size[i] ) +- { +- FT_TRACE7(( "sph: Function %d, opcode ptrn: %d, %s %s\n", +- i, n, +- exc->face->root.family_name, +- exc->face->root.style_name )); ++ case 0x89: /* IDEF */ ++ case 0x2C: /* FDEF */ ++ exc->error = FT_THROW( Nested_DEFS ); ++ return; ++ case 0x2D: /* ENDF */ ++ return; ++ } ++ } ++ } + +- switch ( i ) +- { +- case 0: +- rec->sph_fdef_flags |= SPH_FDEF_INLINE_DELTA_1; +- exc->face->sph_found_func_flags |= SPH_FDEF_INLINE_DELTA_1; +- break; + +- case 1: +- rec->sph_fdef_flags |= SPH_FDEF_INLINE_DELTA_2; +- exc->face->sph_found_func_flags |= SPH_FDEF_INLINE_DELTA_2; +- break; ++ /*************************************************************************/ ++ /* */ ++ /* PUSHING DATA ONTO THE INTERPRETER STACK */ ++ /* */ ++ /*************************************************************************/ + +- case 2: +- switch ( n ) +- { +- /* needs to be implemented still */ +- case 58: +- rec->sph_fdef_flags |= SPH_FDEF_DIAGONAL_STROKE; +- exc->face->sph_found_func_flags |= SPH_FDEF_DIAGONAL_STROKE; +- } +- break; + +- case 3: +- switch ( n ) +- { +- case 0: +- rec->sph_fdef_flags |= SPH_FDEF_VACUFORM_ROUND_1; +- exc->face->sph_found_func_flags |= SPH_FDEF_VACUFORM_ROUND_1; +- } +- break; ++ /*************************************************************************/ ++ /* */ ++ /* NPUSHB[]: PUSH N Bytes */ ++ /* Opcode range: 0x40 */ ++ /* Stack: --> uint32... */ ++ /* */ ++ static void ++ Ins_NPUSHB( TT_ExecContext exc, ++ FT_Long* args ) ++ { ++ FT_UShort L, K; + +- case 4: +- /* probably not necessary to detect anymore */ +- rec->sph_fdef_flags |= SPH_FDEF_TTFAUTOHINT_1; +- exc->face->sph_found_func_flags |= SPH_FDEF_TTFAUTOHINT_1; +- break; + +- case 5: +- switch ( n ) +- { +- case 0: +- case 1: +- case 2: +- case 4: +- case 7: +- case 8: +- rec->sph_fdef_flags |= SPH_FDEF_SPACING_1; +- exc->face->sph_found_func_flags |= SPH_FDEF_SPACING_1; +- } +- break; ++ L = (FT_UShort)exc->code[exc->IP + 1]; + +- case 6: +- switch ( n ) +- { +- case 0: +- case 1: +- case 2: +- case 4: +- case 7: +- case 8: +- rec->sph_fdef_flags |= SPH_FDEF_SPACING_2; +- exc->face->sph_found_func_flags |= SPH_FDEF_SPACING_2; +- } +- break; ++ if ( BOUNDS( L, exc->stackSize + 1 - exc->top ) ) ++ { ++ exc->error = FT_THROW( Stack_Overflow ); ++ return; ++ } + +- case 7: +- rec->sph_fdef_flags |= SPH_FDEF_TYPEMAN_DIAGENDCTRL; +- exc->face->sph_found_func_flags |= SPH_FDEF_TYPEMAN_DIAGENDCTRL; +- break; ++ for ( K = 1; K <= L; K++ ) ++ args[K - 1] = exc->code[exc->IP + K + 1]; + +- case 8: +-#if 0 +- rec->sph_fdef_flags |= SPH_FDEF_TYPEMAN_DIAGENDCTRL; +- exc->face->sph_found_func_flags |= SPH_FDEF_TYPEMAN_DIAGENDCTRL; +-#endif +- break; +- } +- opcode_pointer[i] = 0; +- } +- } ++ exc->new_top += L; ++ } + +- else +- opcode_pointer[i] = 0; +- } + +- /* Set sph_compatibility_mode only when deltas are detected */ +- exc->face->sph_compatibility_mode = +- ( ( exc->face->sph_found_func_flags & SPH_FDEF_INLINE_DELTA_1 ) | +- ( exc->face->sph_found_func_flags & SPH_FDEF_INLINE_DELTA_2 ) ); +- } ++ /*************************************************************************/ ++ /* */ ++ /* NPUSHW[]: PUSH N Words */ ++ /* Opcode range: 0x41 */ ++ /* Stack: --> int32... */ ++ /* */ ++ static void ++ Ins_NPUSHW( TT_ExecContext exc, ++ FT_Long* args ) ++ { ++ FT_UShort L, K; + +-#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ + +- switch ( exc->opcode ) +- { +- case 0x89: /* IDEF */ +- case 0x2C: /* FDEF */ +- exc->error = FT_THROW( Nested_DEFS ); +- return; ++ L = (FT_UShort)exc->code[exc->IP + 1]; + +- case 0x2D: /* ENDF */ +- rec->end = exc->IP; +- return; +- } ++ if ( BOUNDS( L, exc->stackSize + 1 - exc->top ) ) ++ { ++ exc->error = FT_THROW( Stack_Overflow ); ++ return; + } ++ ++ exc->IP += 2; ++ ++ for ( K = 0; K < L; K++ ) ++ args[K] = GetShortIns( exc ); ++ ++ exc->step_ins = FALSE; ++ exc->new_top += L; + } + + + /*************************************************************************/ + /* */ +- /* ENDF[]: END Function definition */ +- /* Opcode range: 0x2D */ +- /* Stack: --> */ ++ /* PUSHB[abc]: PUSH Bytes */ ++ /* Opcode range: 0xB0-0xB7 */ ++ /* Stack: --> uint32... */ + /* */ + static void +- Ins_ENDF( TT_ExecContext exc ) ++ Ins_PUSHB( TT_ExecContext exc, ++ FT_Long* args ) + { +- TT_CallRec* pRec; ++ FT_UShort L, K; + + +-#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING +- exc->sph_in_func_flags = 0x0000; +-#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ ++ L = (FT_UShort)( exc->opcode - 0xB0 + 1 ); + +- if ( exc->callTop <= 0 ) /* We encountered an ENDF without a call */ ++ if ( BOUNDS( L, exc->stackSize + 1 - exc->top ) ) + { +- exc->error = FT_THROW( ENDF_In_Exec_Stream ); ++ exc->error = FT_THROW( Stack_Overflow ); + return; + } + +- exc->callTop--; ++ for ( K = 1; K <= L; K++ ) ++ args[K - 1] = exc->code[exc->IP + K]; ++ } + +- pRec = &exc->callStack[exc->callTop]; + +- pRec->Cur_Count--; ++ /*************************************************************************/ ++ /* */ ++ /* PUSHW[abc]: PUSH Words */ ++ /* Opcode range: 0xB8-0xBF */ ++ /* Stack: --> int32... */ ++ /* */ ++ static void ++ Ins_PUSHW( TT_ExecContext exc, ++ FT_Long* args ) ++ { ++ FT_UShort L, K; + +- exc->step_ins = FALSE; + +- if ( pRec->Cur_Count > 0 ) ++ L = (FT_UShort)( exc->opcode - 0xB8 + 1 ); ++ ++ if ( BOUNDS( L, exc->stackSize + 1 - exc->top ) ) + { +- exc->callTop++; +- exc->IP = pRec->Def->start; ++ exc->error = FT_THROW( Stack_Overflow ); ++ return; + } +- else +- /* Loop through the current function */ +- Ins_Goto_CodeRange( exc, pRec->Caller_Range, pRec->Caller_IP ); + +- /* Exit the current call frame. */ ++ exc->IP++; + +- /* NOTE: If the last instruction of a program is a */ +- /* CALL or LOOPCALL, the return address is */ +- /* always out of the code range. This is a */ +- /* valid address, and it is why we do not test */ +- /* the result of Ins_Goto_CodeRange() here! */ ++ for ( K = 0; K < L; K++ ) ++ args[K] = GetShortIns( exc ); ++ ++ exc->step_ins = FALSE; + } + + + /*************************************************************************/ + /* */ +- /* CALL[]: CALL function */ +- /* Opcode range: 0x2B */ +- /* Stack: uint32? --> */ ++ /* MANAGING THE GRAPHICS STATE */ + /* */ +- static void +- Ins_CALL( TT_ExecContext exc, +- FT_Long* args ) +- { +- FT_ULong F; +- TT_CallRec* pCrec; +- TT_DefRecord* def; ++ /*************************************************************************/ + + +- /* first of all, check the index */ ++ static FT_Bool ++ Ins_SxVTL( TT_ExecContext exc, ++ FT_UShort aIdx1, ++ FT_UShort aIdx2, ++ FT_UnitVector* Vec ) ++ { ++ FT_Long A, B, C; ++ FT_Vector* p1; ++ FT_Vector* p2; + +- F = args[0]; +- if ( BOUNDSL( F, exc->maxFunc + 1 ) ) +- goto Fail; ++ FT_Byte opcode = exc->opcode; + +- /* Except for some old Apple fonts, all functions in a TrueType */ +- /* font are defined in increasing order, starting from 0. This */ +- /* means that we normally have */ +- /* */ +- /* exc->maxFunc+1 == exc->numFDefs */ +- /* exc->FDefs[n].opc == n for n in 0..exc->maxFunc */ +- /* */ +- /* If this isn't true, we need to look up the function table. */ + +- def = exc->FDefs + F; +- if ( exc->maxFunc + 1 != exc->numFDefs || def->opc != F ) ++ if ( BOUNDS( aIdx1, exc->zp2.n_points ) || ++ BOUNDS( aIdx2, exc->zp1.n_points ) ) + { +- /* look up the FDefs table */ +- TT_DefRecord* limit; ++ if ( exc->pedantic_hinting ) ++ exc->error = FT_THROW( Invalid_Reference ); ++ return FAILURE; ++ } + ++ p1 = exc->zp1.cur + aIdx2; ++ p2 = exc->zp2.cur + aIdx1; + +- def = exc->FDefs; +- limit = def + exc->numFDefs; ++ A = p1->x - p2->x; ++ B = p1->y - p2->y; + +- while ( def < limit && def->opc != F ) +- def++; ++ /* If p1 == p2, SPvTL and SFvTL behave the same as */ ++ /* SPvTCA[X] and SFvTCA[X], respectively. */ ++ /* */ ++ /* Confirmed by Greg Hitchcock. */ + +- if ( def == limit ) +- goto Fail; ++ if ( A == 0 && B == 0 ) ++ { ++ A = 0x4000; ++ opcode = 0; + } + +- /* check that the function is active */ +- if ( !def->active ) +- goto Fail; ++ if ( ( opcode & 1 ) != 0 ) ++ { ++ C = B; /* counter clockwise rotation */ ++ B = A; ++ A = -C; ++ } + +-#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING +- if ( SUBPIXEL_HINTING && +- exc->ignore_x_mode && +- ( ( exc->iup_called && +- ( exc->sph_tweak_flags & SPH_TWEAK_NO_CALL_AFTER_IUP ) ) || +- ( def->sph_fdef_flags & SPH_FDEF_VACUFORM_ROUND_1 ) ) ) +- goto Fail; ++ Normalize( A, B, Vec ); ++ ++ return SUCCESS; ++ } ++ ++ ++ /*************************************************************************/ ++ /* */ ++ /* SVTCA[a]: Set (F and P) Vectors to Coordinate Axis */ ++ /* Opcode range: 0x00-0x01 */ ++ /* Stack: --> */ ++ /* */ ++ /* SPvTCA[a]: Set PVector to Coordinate Axis */ ++ /* Opcode range: 0x02-0x03 */ ++ /* Stack: --> */ ++ /* */ ++ /* SFvTCA[a]: Set FVector to Coordinate Axis */ ++ /* Opcode range: 0x04-0x05 */ ++ /* Stack: --> */ ++ /* */ ++ static void ++ Ins_SxyTCA( TT_ExecContext exc ) ++ { ++ FT_Short AA, BB; ++ ++ FT_Byte opcode = exc->opcode; ++ ++ ++ AA = (FT_Short)( ( opcode & 1 ) << 14 ); ++ BB = (FT_Short)( AA ^ 0x4000 ); ++ ++ if ( opcode < 4 ) ++ { ++ exc->GS.projVector.x = AA; ++ exc->GS.projVector.y = BB; ++ ++ exc->GS.dualVector.x = AA; ++ exc->GS.dualVector.y = BB; ++ } + else +- exc->sph_in_func_flags = def->sph_fdef_flags; +-#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ ++ GUESS_VECTOR( projVector ); + +- /* check the call stack */ +- if ( exc->callTop >= exc->callSize ) ++ if ( ( opcode & 2 ) == 0 ) + { +- exc->error = FT_THROW( Stack_Overflow ); +- return; ++ exc->GS.freeVector.x = AA; ++ exc->GS.freeVector.y = BB; ++ } ++ else ++ GUESS_VECTOR( freeVector ); ++ ++ Compute_Funcs( exc ); ++ } ++ ++ ++ /*************************************************************************/ ++ /* */ ++ /* SPvTL[a]: Set PVector To Line */ ++ /* Opcode range: 0x06-0x07 */ ++ /* Stack: uint32 uint32 --> */ ++ /* */ ++ static void ++ Ins_SPVTL( TT_ExecContext exc, ++ FT_Long* args ) ++ { ++ if ( Ins_SxVTL( exc, ++ (FT_UShort)args[1], ++ (FT_UShort)args[0], ++ &exc->GS.projVector ) == SUCCESS ) ++ { ++ exc->GS.dualVector = exc->GS.projVector; ++ GUESS_VECTOR( freeVector ); ++ Compute_Funcs( exc ); ++ } ++ } ++ ++ ++ /*************************************************************************/ ++ /* */ ++ /* SFvTL[a]: Set FVector To Line */ ++ /* Opcode range: 0x08-0x09 */ ++ /* Stack: uint32 uint32 --> */ ++ /* */ ++ static void ++ Ins_SFVTL( TT_ExecContext exc, ++ FT_Long* args ) ++ { ++ if ( Ins_SxVTL( exc, ++ (FT_UShort)args[1], ++ (FT_UShort)args[0], ++ &exc->GS.freeVector ) == SUCCESS ) ++ { ++ GUESS_VECTOR( projVector ); ++ Compute_Funcs( exc ); + } ++ } + +- pCrec = exc->callStack + exc->callTop; +- +- pCrec->Caller_Range = exc->curRange; +- pCrec->Caller_IP = exc->IP + 1; +- pCrec->Cur_Count = 1; +- pCrec->Def = def; +- +- exc->callTop++; +- +- Ins_Goto_CodeRange( exc, def->range, def->start ); +- +- exc->step_ins = FALSE; +- +- return; + +- Fail: +- exc->error = FT_THROW( Invalid_Reference ); ++ /*************************************************************************/ ++ /* */ ++ /* SFvTPv[]: Set FVector To PVector */ ++ /* Opcode range: 0x0E */ ++ /* Stack: --> */ ++ /* */ ++ static void ++ Ins_SFVTPV( TT_ExecContext exc ) ++ { ++ GUESS_VECTOR( projVector ); ++ exc->GS.freeVector = exc->GS.projVector; ++ Compute_Funcs( exc ); + } + + + /*************************************************************************/ + /* */ +- /* LOOPCALL[]: LOOP and CALL function */ +- /* Opcode range: 0x2A */ +- /* Stack: uint32? Eint16? --> */ ++ /* SPvFS[]: Set PVector From Stack */ ++ /* Opcode range: 0x0A */ ++ /* Stack: f2.14 f2.14 --> */ + /* */ + static void +- Ins_LOOPCALL( TT_ExecContext exc, +- FT_Long* args ) ++ Ins_SPVFS( TT_ExecContext exc, ++ FT_Long* args ) + { +- FT_ULong F; +- TT_CallRec* pCrec; +- TT_DefRecord* def; ++ FT_Short S; ++ FT_Long X, Y; + + +- /* first of all, check the index */ +- F = args[1]; +- if ( BOUNDSL( F, exc->maxFunc + 1 ) ) +- goto Fail; ++ /* Only use low 16bits, then sign extend */ ++ S = (FT_Short)args[1]; ++ Y = (FT_Long)S; ++ S = (FT_Short)args[0]; ++ X = (FT_Long)S; + +- /* Except for some old Apple fonts, all functions in a TrueType */ +- /* font are defined in increasing order, starting from 0. This */ +- /* means that we normally have */ +- /* */ +- /* exc->maxFunc+1 == exc->numFDefs */ +- /* exc->FDefs[n].opc == n for n in 0..exc->maxFunc */ +- /* */ +- /* If this isn't true, we need to look up the function table. */ ++ Normalize( X, Y, &exc->GS.projVector ); + +- def = exc->FDefs + F; +- if ( exc->maxFunc + 1 != exc->numFDefs || def->opc != F ) +- { +- /* look up the FDefs table */ +- TT_DefRecord* limit; ++ exc->GS.dualVector = exc->GS.projVector; ++ GUESS_VECTOR( freeVector ); ++ Compute_Funcs( exc ); ++ } + + +- def = exc->FDefs; +- limit = def + exc->numFDefs; ++ /*************************************************************************/ ++ /* */ ++ /* SFvFS[]: Set FVector From Stack */ ++ /* Opcode range: 0x0B */ ++ /* Stack: f2.14 f2.14 --> */ ++ /* */ ++ static void ++ Ins_SFVFS( TT_ExecContext exc, ++ FT_Long* args ) ++ { ++ FT_Short S; ++ FT_Long X, Y; + +- while ( def < limit && def->opc != F ) +- def++; + +- if ( def == limit ) +- goto Fail; +- } ++ /* Only use low 16bits, then sign extend */ ++ S = (FT_Short)args[1]; ++ Y = (FT_Long)S; ++ S = (FT_Short)args[0]; ++ X = S; + +- /* check that the function is active */ +- if ( !def->active ) +- goto Fail; ++ Normalize( X, Y, &exc->GS.freeVector ); ++ GUESS_VECTOR( projVector ); ++ Compute_Funcs( exc ); ++ } + +-#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING +- if ( SUBPIXEL_HINTING && +- exc->ignore_x_mode && +- ( def->sph_fdef_flags & SPH_FDEF_VACUFORM_ROUND_1 ) ) +- goto Fail; +- else +- exc->sph_in_func_flags = def->sph_fdef_flags; +-#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ + +- /* check stack */ +- if ( exc->callTop >= exc->callSize ) ++ /*************************************************************************/ ++ /* */ ++ /* GPv[]: Get Projection Vector */ ++ /* Opcode range: 0x0C */ ++ /* Stack: ef2.14 --> ef2.14 */ ++ /* */ ++ static void ++ Ins_GPV( TT_ExecContext exc, ++ FT_Long* args ) ++ { ++#ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING ++ if ( exc->face->unpatented_hinting ) + { +- exc->error = FT_THROW( Stack_Overflow ); +- return; ++ args[0] = exc->GS.both_x_axis ? 0x4000 : 0; ++ args[1] = exc->GS.both_x_axis ? 0 : 0x4000; + } +- +- if ( args[0] > 0 ) ++ else + { +- pCrec = exc->callStack + exc->callTop; +- +- pCrec->Caller_Range = exc->curRange; +- pCrec->Caller_IP = exc->IP + 1; +- pCrec->Cur_Count = (FT_Int)args[0]; +- pCrec->Def = def; +- +- exc->callTop++; +- +- Ins_Goto_CodeRange( exc, def->range, def->start ); +- +- exc->step_ins = FALSE; ++ args[0] = exc->GS.projVector.x; ++ args[1] = exc->GS.projVector.y; + } +- +- return; +- +- Fail: +- exc->error = FT_THROW( Invalid_Reference ); ++#else ++ args[0] = exc->GS.projVector.x; ++ args[1] = exc->GS.projVector.y; ++#endif + } + + + /*************************************************************************/ + /* */ +- /* IDEF[]: Instruction DEFinition */ +- /* Opcode range: 0x89 */ +- /* Stack: Eint8 --> */ ++ /* GFv[]: Get Freedom Vector */ ++ /* Opcode range: 0x0D */ ++ /* Stack: ef2.14 --> ef2.14 */ + /* */ + static void +- Ins_IDEF( TT_ExecContext exc, +- FT_Long* args ) ++ Ins_GFV( TT_ExecContext exc, ++ FT_Long* args ) + { +- TT_DefRecord* def; +- TT_DefRecord* limit; +- +- +- /* First of all, look for the same function in our table */ +- +- def = exc->IDefs; +- limit = def + exc->numIDefs; +- +- for ( ; def < limit; def++ ) +- if ( def->opc == (FT_ULong)args[0] ) +- break; +- +- if ( def == limit ) ++#ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING ++ if ( exc->face->unpatented_hinting ) + { +- /* check that there is enough room for a new instruction */ +- if ( exc->numIDefs >= exc->maxIDefs ) +- { +- exc->error = FT_THROW( Too_Many_Instruction_Defs ); +- return; +- } +- exc->numIDefs++; ++ args[0] = exc->GS.both_x_axis ? 0x4000 : 0; ++ args[1] = exc->GS.both_x_axis ? 0 : 0x4000; + } +- +- /* opcode must be unsigned 8-bit integer */ +- if ( 0 > args[0] || args[0] > 0x00FF ) ++ else + { +- exc->error = FT_THROW( Too_Many_Instruction_Defs ); +- return; ++ args[0] = exc->GS.freeVector.x; ++ args[1] = exc->GS.freeVector.y; + } ++#else ++ args[0] = exc->GS.freeVector.x; ++ args[1] = exc->GS.freeVector.y; ++#endif ++ } + +- def->opc = (FT_Byte)args[0]; +- def->start = exc->IP + 1; +- def->range = exc->curRange; +- def->active = TRUE; + +- if ( (FT_ULong)args[0] > exc->maxIns ) +- exc->maxIns = (FT_Byte)args[0]; ++ /*************************************************************************/ ++ /* */ ++ /* SRP0[]: Set Reference Point 0 */ ++ /* Opcode range: 0x10 */ ++ /* Stack: uint32 --> */ ++ /* */ ++ static void ++ Ins_SRP0( TT_ExecContext exc, ++ FT_Long* args ) ++ { ++ exc->GS.rp0 = (FT_UShort)args[0]; ++ } + +- /* Now skip the whole function definition. */ +- /* We don't allow nested IDEFs & FDEFs. */ + +- while ( SkipCode( exc ) == SUCCESS ) +- { +- switch ( exc->opcode ) +- { +- case 0x89: /* IDEF */ +- case 0x2C: /* FDEF */ +- exc->error = FT_THROW( Nested_DEFS ); +- return; +- case 0x2D: /* ENDF */ +- return; +- } +- } ++ /*************************************************************************/ ++ /* */ ++ /* SRP1[]: Set Reference Point 1 */ ++ /* Opcode range: 0x11 */ ++ /* Stack: uint32 --> */ ++ /* */ ++ static void ++ Ins_SRP1( TT_ExecContext exc, ++ FT_Long* args ) ++ { ++ exc->GS.rp1 = (FT_UShort)args[0]; ++ } ++ ++ ++ /*************************************************************************/ ++ /* */ ++ /* SRP2[]: Set Reference Point 2 */ ++ /* Opcode range: 0x12 */ ++ /* Stack: uint32 --> */ ++ /* */ ++ static void ++ Ins_SRP2( TT_ExecContext exc, ++ FT_Long* args ) ++ { ++ exc->GS.rp2 = (FT_UShort)args[0]; + } + + + /*************************************************************************/ + /* */ +- /* PUSHING DATA ONTO THE INTERPRETER STACK */ +- /* */ +- /* Instructions appear in the specification's order. */ ++ /* SMD[]: Set Minimum Distance */ ++ /* Opcode range: 0x1A */ ++ /* Stack: f26.6 --> */ + /* */ +- /*************************************************************************/ ++ static void ++ Ins_SMD( TT_ExecContext exc, ++ FT_Long* args ) ++ { ++ exc->GS.minimum_distance = args[0]; ++ } + + + /*************************************************************************/ + /* */ +- /* NPUSHB[]: PUSH N Bytes */ +- /* Opcode range: 0x40 */ +- /* Stack: --> uint32... */ ++ /* SCVTCI[]: Set Control Value Table Cut In */ ++ /* Opcode range: 0x1D */ ++ /* Stack: f26.6 --> */ + /* */ + static void +- Ins_NPUSHB( TT_ExecContext exc, ++ Ins_SCVTCI( TT_ExecContext exc, + FT_Long* args ) + { +- FT_UShort L, K; +- +- +- L = (FT_UShort)exc->code[exc->IP + 1]; +- +- if ( BOUNDS( L, exc->stackSize + 1 - exc->top ) ) +- { +- exc->error = FT_THROW( Stack_Overflow ); +- return; +- } ++ exc->GS.control_value_cutin = (FT_F26Dot6)args[0]; ++ } + +- for ( K = 1; K <= L; K++ ) +- args[K - 1] = exc->code[exc->IP + K + 1]; + +- exc->new_top += L; ++ /*************************************************************************/ ++ /* */ ++ /* SSWCI[]: Set Single Width Cut In */ ++ /* Opcode range: 0x1E */ ++ /* Stack: f26.6 --> */ ++ /* */ ++ static void ++ Ins_SSWCI( TT_ExecContext exc, ++ FT_Long* args ) ++ { ++ exc->GS.single_width_cutin = (FT_F26Dot6)args[0]; + } + + + /*************************************************************************/ + /* */ +- /* NPUSHW[]: PUSH N Words */ +- /* Opcode range: 0x41 */ +- /* Stack: --> int32... */ ++ /* SSW[]: Set Single Width */ ++ /* Opcode range: 0x1F */ ++ /* Stack: int32? --> */ + /* */ + static void +- Ins_NPUSHW( TT_ExecContext exc, +- FT_Long* args ) ++ Ins_SSW( TT_ExecContext exc, ++ FT_Long* args ) + { +- FT_UShort L, K; ++ exc->GS.single_width_value = FT_MulFix( args[0], ++ exc->tt_metrics.scale ); ++ } + + +- L = (FT_UShort)exc->code[exc->IP + 1]; ++ /*************************************************************************/ ++ /* */ ++ /* FLIPON[]: Set auto-FLIP to ON */ ++ /* Opcode range: 0x4D */ ++ /* Stack: --> */ ++ /* */ ++ static void ++ Ins_FLIPON( TT_ExecContext exc ) ++ { ++ exc->GS.auto_flip = TRUE; ++ } + +- if ( BOUNDS( L, exc->stackSize + 1 - exc->top ) ) +- { +- exc->error = FT_THROW( Stack_Overflow ); +- return; +- } + +- exc->IP += 2; ++ /*************************************************************************/ ++ /* */ ++ /* FLIPOFF[]: Set auto-FLIP to OFF */ ++ /* Opcode range: 0x4E */ ++ /* Stack: --> */ ++ /* */ ++ static void ++ Ins_FLIPOFF( TT_ExecContext exc ) ++ { ++ exc->GS.auto_flip = FALSE; ++ } + +- for ( K = 0; K < L; K++ ) +- args[K] = GetShortIns( exc ); + +- exc->step_ins = FALSE; +- exc->new_top += L; ++ /*************************************************************************/ ++ /* */ ++ /* SANGW[]: Set ANGle Weight */ ++ /* Opcode range: 0x7E */ ++ /* Stack: uint32 --> */ ++ /* */ ++ static void ++ Ins_SANGW( void ) ++ { ++ /* instruction not supported anymore */ + } + + + /*************************************************************************/ + /* */ +- /* PUSHB[abc]: PUSH Bytes */ +- /* Opcode range: 0xB0-0xB7 */ +- /* Stack: --> uint32... */ ++ /* SDB[]: Set Delta Base */ ++ /* Opcode range: 0x5E */ ++ /* Stack: uint32 --> */ + /* */ + static void +- Ins_PUSHB( TT_ExecContext exc, +- FT_Long* args ) ++ Ins_SDB( TT_ExecContext exc, ++ FT_Long* args ) + { +- FT_UShort L, K; ++ exc->GS.delta_base = (FT_UShort)args[0]; ++ } + + +- L = (FT_UShort)( exc->opcode - 0xB0 + 1 ); ++ /*************************************************************************/ ++ /* */ ++ /* SDS[]: Set Delta Shift */ ++ /* Opcode range: 0x5F */ ++ /* Stack: uint32 --> */ ++ /* */ ++ static void ++ Ins_SDS( TT_ExecContext exc, ++ FT_Long* args ) ++ { ++ if ( (FT_ULong)args[0] > 6UL ) ++ exc->error = FT_THROW( Bad_Argument ); ++ else ++ exc->GS.delta_shift = (FT_UShort)args[0]; ++ } + +- if ( BOUNDS( L, exc->stackSize + 1 - exc->top ) ) +- { +- exc->error = FT_THROW( Stack_Overflow ); +- return; +- } + +- for ( K = 1; K <= L; K++ ) +- args[K - 1] = exc->code[exc->IP + K]; ++ /*************************************************************************/ ++ /* */ ++ /* RTHG[]: Round To Half Grid */ ++ /* Opcode range: 0x19 */ ++ /* Stack: --> */ ++ /* */ ++ static void ++ Ins_RTHG( TT_ExecContext exc ) ++ { ++ exc->GS.round_state = TT_Round_To_Half_Grid; ++ exc->func_round = (TT_Round_Func)Round_To_Half_Grid; + } + + + /*************************************************************************/ + /* */ +- /* PUSHW[abc]: PUSH Words */ +- /* Opcode range: 0xB8-0xBF */ +- /* Stack: --> int32... */ ++ /* RTG[]: Round To Grid */ ++ /* Opcode range: 0x18 */ ++ /* Stack: --> */ + /* */ + static void +- Ins_PUSHW( TT_ExecContext exc, +- FT_Long* args ) ++ Ins_RTG( TT_ExecContext exc ) + { +- FT_UShort L, K; ++ exc->GS.round_state = TT_Round_To_Grid; ++ exc->func_round = (TT_Round_Func)Round_To_Grid; ++ } + + +- L = (FT_UShort)( exc->opcode - 0xB8 + 1 ); ++ /*************************************************************************/ ++ /* RTDG[]: Round To Double Grid */ ++ /* Opcode range: 0x3D */ ++ /* Stack: --> */ ++ /* */ ++ static void ++ Ins_RTDG( TT_ExecContext exc ) ++ { ++ exc->GS.round_state = TT_Round_To_Double_Grid; ++ exc->func_round = (TT_Round_Func)Round_To_Double_Grid; ++ } + +- if ( BOUNDS( L, exc->stackSize + 1 - exc->top ) ) +- { +- exc->error = FT_THROW( Stack_Overflow ); +- return; +- } + +- exc->IP++; ++ /*************************************************************************/ ++ /* RUTG[]: Round Up To Grid */ ++ /* Opcode range: 0x7C */ ++ /* Stack: --> */ ++ /* */ ++ static void ++ Ins_RUTG( TT_ExecContext exc ) ++ { ++ exc->GS.round_state = TT_Round_Up_To_Grid; ++ exc->func_round = (TT_Round_Func)Round_Up_To_Grid; ++ } + +- for ( K = 0; K < L; K++ ) +- args[K] = GetShortIns( exc ); + +- exc->step_ins = FALSE; ++ /*************************************************************************/ ++ /* */ ++ /* RDTG[]: Round Down To Grid */ ++ /* Opcode range: 0x7D */ ++ /* Stack: --> */ ++ /* */ ++ static void ++ Ins_RDTG( TT_ExecContext exc ) ++ { ++ exc->GS.round_state = TT_Round_Down_To_Grid; ++ exc->func_round = (TT_Round_Func)Round_Down_To_Grid; + } + + + /*************************************************************************/ + /* */ +- /* MANAGING THE GRAPHICS STATE */ ++ /* ROFF[]: Round OFF */ ++ /* Opcode range: 0x7A */ ++ /* Stack: --> */ ++ /* */ ++ static void ++ Ins_ROFF( TT_ExecContext exc ) ++ { ++ exc->GS.round_state = TT_Round_Off; ++ exc->func_round = (TT_Round_Func)Round_None; ++ } ++ ++ ++ /*************************************************************************/ + /* */ +- /* Instructions appear in the specs' order. */ ++ /* SROUND[]: Super ROUND */ ++ /* Opcode range: 0x76 */ ++ /* Stack: Eint8 --> */ + /* */ ++ static void ++ Ins_SROUND( TT_ExecContext exc, ++ FT_Long* args ) ++ { ++ SetSuperRound( exc, 0x4000, args[0] ); ++ ++ exc->GS.round_state = TT_Round_Super; ++ exc->func_round = (TT_Round_Func)Round_Super; ++ } ++ ++ + /*************************************************************************/ ++ /* */ ++ /* S45ROUND[]: Super ROUND 45 degrees */ ++ /* Opcode range: 0x77 */ ++ /* Stack: uint32 --> */ ++ /* */ ++ static void ++ Ins_S45ROUND( TT_ExecContext exc, ++ FT_Long* args ) ++ { ++ SetSuperRound( exc, 0x2D41, args[0] ); ++ ++ exc->GS.round_state = TT_Round_Super_45; ++ exc->func_round = (TT_Round_Func)Round_Super_45; ++ } + + + /*************************************************************************/ +@@ -5267,8 +5259,6 @@ + /* */ + /* MANAGING OUTLINES */ + /* */ +- /* Instructions appear in the specification's order. */ +- /* */ + /*************************************************************************/ + + +@@ -7473,8 +7463,6 @@ + /* */ + /* THIS IS THE INTERPRETER'S MAIN LOOP. */ + /* */ +- /* Instructions appear in the specification's order. */ +- /* */ + /*************************************************************************/ + + +-- +2.2.2 + +From 36d03c9f583f4c4b2ad2870784e2fe50814820c9 Mon Sep 17 00:00:00 2001 +From: Werner Lemberg <wl@gnu.org> +Date: Mon, 12 Jan 2015 11:26:30 +0100 +Subject: [PATCH] Fix Savannah bug #43976. + +Assure that FreeType's internal include directories are found before +`CPPFLAGS' (which might be set by the user in the environment), and +`CPPFLAGS' before `CFLAGS'. + +* builds/freetype.mk (FT_CFLAGS): Don't add `INCLUDE_FLAGS'. +(FT_COMPILE): Make this a special variable for compiling only the +files handled in `freetype.mk'. +(.c.$O): Removed, unused. + +* src/*/rules.mk (*_COMPILE): Fix order of include directories. +--- + ChangeLog | 15 +++++++++++++++ + builds/freetype.mk | 9 +++------ + src/autofit/rules.mk | 5 ++++- + src/base/rules.mk | 5 ++++- + src/bdf/rules.mk | 5 ++++- + src/bzip2/rules.mk | 4 +++- + src/cache/rules.mk | 7 ++++++- + src/cff/rules.mk | 5 ++++- + src/cid/rules.mk | 5 ++++- + src/gxvalid/rules.mk | 5 ++++- + src/gzip/rules.mk | 9 +++++++-- + src/lzw/rules.mk | 5 ++++- + src/otvalid/rules.mk | 5 ++++- + src/pcf/rules.mk | 5 ++++- + src/pfr/rules.mk | 5 ++++- + src/psaux/rules.mk | 5 ++++- + src/pshinter/rules.mk | 5 ++++- + src/psnames/rules.mk | 5 ++++- + src/raster/rules.mk | 5 ++++- + src/sfnt/rules.mk | 5 ++++- + src/smooth/rules.mk | 6 +++++- + src/truetype/rules.mk | 5 ++++- + src/type1/rules.mk | 5 ++++- + src/type42/rules.mk | 5 ++++- + src/winfonts/rules.mk | 5 ++++- + 25 files changed, 115 insertions(+), 30 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index 084f67d..027a293 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,3 +1,18 @@ ++2015-01-12 Werner Lemberg <wl@gnu.org> ++ ++ Fix Savannah bug #43976. ++ ++ Assure that FreeType's internal include directories are found before ++ `CPPFLAGS' (which might be set by the user in the environment), and ++ `CPPFLAGS' before `CFLAGS'. ++ ++ * builds/freetype.mk (FT_CFLAGS): Don't add `INCLUDE_FLAGS'. ++ (FT_COMPILE): Make this a special variable for compiling only the ++ files handled in `freetype.mk'. ++ (.c.$O): Removed, unused. ++ ++ * src/*/rules.mk (*_COMPILE): Fix order of include directories. ++ + 2015-01-11 Werner Lemberg <wl@gnu.org> + + [truetype] Prettyfing. +diff --git a/builds/freetype.mk b/builds/freetype.mk +index 8b2e2ea..5e874ac 100644 +--- a/builds/freetype.mk ++++ b/builds/freetype.mk +@@ -155,15 +155,13 @@ ifneq ($(wildcard $(OBJ_DIR)/ftoption.h),) + FTOPTION_FLAG := $DFT_CONFIG_OPTIONS_H="<ftoption.h>" + endif + +-# Note that a build with the `configure' script uses $(CFLAGS) only. ++# `CPPFLAGS' might be specified by the user in the environment. + # + FT_CFLAGS = $(CPPFLAGS) \ +- $(INCLUDE_FLAGS) \ + $(CFLAGS) \ + $DFT2_BUILD_LIBRARY \ + $DFT_CONFIG_MODULES_H="<ftmodule.h>" \ + $(FTOPTION_FLAG) +-FT_COMPILE = $(CC) $(ANSIFLAGS) $(FT_CFLAGS) + + + # Include the `exports' rules file. +@@ -195,6 +193,8 @@ DEVEL_H := $(wildcard $(TOP_DIR)/devel/*.h) + FREETYPE_H := $(PUBLIC_H) $(INTERNAL_H) $(CONFIG_H) $(DEVEL_H) + + ++FT_COMPILE := $(CC) $(ANSIFLAGS) $(INCLUDE_FLAGS) $(FT_CFLAGS) ++ + # ftsystem component + # + FTSYS_SRC ?= $(BASE_DIR)/ftsystem.c +@@ -270,9 +270,6 @@ objects: $(OBJECTS_LIST) + + library: $(PROJECT_LIBRARY) + +-.c.$O: +- $(FT_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $<) +- + + ifneq ($(findstring refdoc,$(MAKECMDGOALS)),) + # poor man's `sed' emulation with make's built-in string functions +diff --git a/src/autofit/rules.mk b/src/autofit/rules.mk +index 658f04e..5849cbe 100644 +--- a/src/autofit/rules.mk ++++ b/src/autofit/rules.mk +@@ -20,7 +20,10 @@ AUTOF_DIR := $(SRC_DIR)/autofit + + # compilation flags for the driver + # +-AUTOF_COMPILE := $(FT_COMPILE) $I$(subst /,$(COMPILER_SEP),$(AUTOF_DIR)) ++AUTOF_COMPILE := $(CC) $(ANSIFLAGS) \ ++ $I$(subst /,$(COMPILER_SEP),$(AUTOF_DIR)) \ ++ $(INCLUDE_FLAGS) \ ++ $(FT_CFLAGS) + + + # AUTOF driver sources (i.e., C files) +diff --git a/src/base/rules.mk b/src/base/rules.mk +index cbd8107..640ab6d 100644 +--- a/src/base/rules.mk ++++ b/src/base/rules.mk +@@ -23,7 +23,10 @@ + # layer proper. + + +-BASE_COMPILE := $(FT_COMPILE) $I$(subst /,$(COMPILER_SEP),$(SRC_DIR)/base) ++BASE_COMPILE := $(CC) $(ANSIFLAGS) \ ++ $I$(subst /,$(COMPILER_SEP),$(BASE_DIR)) \ ++ $(INCLUDE_FLAGS) \ ++ $(FT_CFLAGS) + + + # Base layer sources +diff --git a/src/bdf/rules.mk b/src/bdf/rules.mk +index 6ff1614..d1dd76b 100644 +--- a/src/bdf/rules.mk ++++ b/src/bdf/rules.mk +@@ -32,7 +32,10 @@ + BDF_DIR := $(SRC_DIR)/bdf + + +-BDF_COMPILE := $(FT_COMPILE) $I$(subst /,$(COMPILER_SEP),$(BDF_DIR)) ++BDF_COMPILE := $(CC) $(ANSIFLAGS) \ ++ $I$(subst /,$(COMPILER_SEP),$(BDF_DIR)) \ ++ $(INCLUDE_FLAGS) \ ++ $(FT_CFLAGS) + + + # bdf driver sources (i.e., C files) +diff --git a/src/bzip2/rules.mk b/src/bzip2/rules.mk +index 0ff2628..845066d 100644 +--- a/src/bzip2/rules.mk ++++ b/src/bzip2/rules.mk +@@ -22,7 +22,9 @@ BZIP2_DIR := $(SRC_DIR)/bzip2 + + # compilation flags for the driver + # +-BZIP2_COMPILE := $(FT_COMPILE) ++BZIP2_COMPILE := $(CC) $(ANSIFLAGS) \ ++ $(INCLUDE_FLAGS) \ ++ $(FT_CFLAGS) + + + # BZIP2 support sources (i.e., C files) +diff --git a/src/cache/rules.mk b/src/cache/rules.mk +index ed75a6a..d64d9bc 100644 +--- a/src/cache/rules.mk ++++ b/src/cache/rules.mk +@@ -17,9 +17,13 @@ + # + CACHE_DIR := $(SRC_DIR)/cache + ++ + # compilation flags for the driver + # +-CACHE_COMPILE := $(FT_COMPILE) $I$(subst /,$(COMPILER_SEP),$(CACHE_DIR)) ++CACHE_COMPILE := $(CC) $(ANSIFLAGS) \ ++ $I$(subst /,$(COMPILER_SEP),$(CACHE_DIR)) \ ++ $(INCLUDE_FLAGS) \ ++ $(FT_CFLAGS) + + + # Cache driver sources (i.e., C files) +@@ -33,6 +37,7 @@ CACHE_DRV_SRC := $(CACHE_DIR)/ftcbasic.c \ + $(CACHE_DIR)/ftcmru.c \ + $(CACHE_DIR)/ftcsbits.c + ++ + # Cache driver headers + # + CACHE_DRV_H := $(CACHE_DIR)/ftccache.h \ +diff --git a/src/cff/rules.mk b/src/cff/rules.mk +index 13115c2..23b4730 100644 +--- a/src/cff/rules.mk ++++ b/src/cff/rules.mk +@@ -18,7 +18,10 @@ + CFF_DIR := $(SRC_DIR)/cff + + +-CFF_COMPILE := $(FT_COMPILE) $I$(subst /,$(COMPILER_SEP),$(CFF_DIR)) ++CFF_COMPILE := $(CC) $(ANSIFLAGS) \ ++ $I$(subst /,$(COMPILER_SEP),$(CFF_DIR)) \ ++ $(INCLUDE_FLAGS) \ ++ $(FT_CFLAGS) + + + # CFF driver sources (i.e., C files) +diff --git a/src/cid/rules.mk b/src/cid/rules.mk +index f362744..9926c8a 100644 +--- a/src/cid/rules.mk ++++ b/src/cid/rules.mk +@@ -18,7 +18,10 @@ + CID_DIR := $(SRC_DIR)/cid + + +-CID_COMPILE := $(FT_COMPILE) $I$(subst /,$(COMPILER_SEP),$(CID_DIR)) ++CID_COMPILE := $(CC) $(ANSIFLAGS) \ ++ $I$(subst /,$(COMPILER_SEP),$(CID_DIR)) \ ++ $(INCLUDE_FLAGS) \ ++ $(FT_CFLAGS) + + + # CID driver sources (i.e., C files) +diff --git a/src/gxvalid/rules.mk b/src/gxvalid/rules.mk +index 57bc082..c4bd4c8 100644 +--- a/src/gxvalid/rules.mk ++++ b/src/gxvalid/rules.mk +@@ -20,7 +20,10 @@ GXV_DIR := $(SRC_DIR)/gxvalid + + # compilation flags for the driver + # +-GXV_COMPILE := $(FT_COMPILE) $I$(subst /,$(COMPILER_SEP),$(GXV_DIR)) ++GXV_COMPILE := $(CC) $(ANSIFLAGS) \ ++ $I$(subst /,$(COMPILER_SEP),$(GXV_DIR)) \ ++ $(INCLUDE_FLAGS) \ ++ $(FT_CFLAGS) + + + # GXV driver sources (i.e., C files) +diff --git a/src/gzip/rules.mk b/src/gzip/rules.mk +index 37cd991..23222a1 100644 +--- a/src/gzip/rules.mk ++++ b/src/gzip/rules.mk +@@ -21,9 +21,14 @@ GZIP_DIR := $(SRC_DIR)/gzip + # compilation flags for the driver + # + ifeq ($(SYSTEM_ZLIB),) +- GZIP_COMPILE := $(FT_COMPILE) $I$(subst /,$(COMPILER_SEP),$(GZIP_DIR)) ++ GZIP_COMPILE := $(CC) $(ANSIFLAGS) \ ++ $I$(subst /,$(COMPILER_SEP),$(GZIP_DIR)) \ ++ $(INCLUDE_FLAGS) \ ++ $(FT_CFLAGS) + else +- GZIP_COMPILE := $(FT_COMPILE) ++ GZIP_COMPILE := $(CC) $(ANSIFLAGS) \ ++ $(INCLUDE_FLAGS) \ ++ $(FT_CFLAGS) + endif + + +diff --git a/src/lzw/rules.mk b/src/lzw/rules.mk +index 5550a48..4362939 100644 +--- a/src/lzw/rules.mk ++++ b/src/lzw/rules.mk +@@ -23,7 +23,10 @@ LZW_DIR := $(SRC_DIR)/lzw + + # compilation flags for the driver + # +-LZW_COMPILE := $(FT_COMPILE) $I$(subst /,$(COMPILER_SEP),$(LZW_DIR)) ++LZW_COMPILE := $(CC) $(ANSIFLAGS) \ ++ $I$(subst /,$(COMPILER_SEP),$(LZW_DIR)) \ ++ $(INCLUDE_FLAGS) \ ++ $(FT_CFLAGS) + + + # LZW support sources (i.e., C files) +diff --git a/src/otvalid/rules.mk b/src/otvalid/rules.mk +index 53bd41e..7454335 100644 +--- a/src/otvalid/rules.mk ++++ b/src/otvalid/rules.mk +@@ -20,7 +20,10 @@ OTV_DIR := $(SRC_DIR)/otvalid + + # compilation flags for the driver + # +-OTV_COMPILE := $(FT_COMPILE) $I$(subst /,$(COMPILER_SEP),$(OTV_DIR)) ++OTV_COMPILE := $(CC) $(ANSIFLAGS) \ ++ $I$(subst /,$(COMPILER_SEP),$(OTV_DIR)) \ ++ $(INCLUDE_FLAGS) \ ++ $(FT_CFLAGS) + + + # OTV driver sources (i.e., C files) +diff --git a/src/pcf/rules.mk b/src/pcf/rules.mk +index 7864152..1b55daf 100644 +--- a/src/pcf/rules.mk ++++ b/src/pcf/rules.mk +@@ -30,7 +30,10 @@ + PCF_DIR := $(SRC_DIR)/pcf + + +-PCF_COMPILE := $(FT_COMPILE) $I$(subst /,$(COMPILER_SEP),$(PCF_DIR)) ++PCF_COMPILE := $(CC) $(ANSIFLAGS) \ ++ $I$(subst /,$(COMPILER_SEP),$(PCF_DIR)) \ ++ $(INCLUDE_FLAGS) \ ++ $(FT_CFLAGS) + + + # pcf driver sources (i.e., C files) +diff --git a/src/pfr/rules.mk b/src/pfr/rules.mk +index 60b96c7..01f44f1 100644 +--- a/src/pfr/rules.mk ++++ b/src/pfr/rules.mk +@@ -20,7 +20,10 @@ PFR_DIR := $(SRC_DIR)/pfr + + # compilation flags for the driver + # +-PFR_COMPILE := $(FT_COMPILE) $I$(subst /,$(COMPILER_SEP),$(PFR_DIR)) ++PFR_COMPILE := $(CC) $(ANSIFLAGS) \ ++ $I$(subst /,$(COMPILER_SEP),$(PFR_DIR)) \ ++ $(INCLUDE_FLAGS) \ ++ $(FT_CFLAGS) + + + # pfr driver sources (i.e., C files) +diff --git a/src/psaux/rules.mk b/src/psaux/rules.mk +index 7a1be37..788d813 100644 +--- a/src/psaux/rules.mk ++++ b/src/psaux/rules.mk +@@ -20,7 +20,10 @@ PSAUX_DIR := $(SRC_DIR)/psaux + + # compilation flags for the driver + # +-PSAUX_COMPILE := $(FT_COMPILE) $I$(subst /,$(COMPILER_SEP),$(PSAUX_DIR)) ++PSAUX_COMPILE := $(CC) $(ANSIFLAGS) \ ++ $I$(subst /,$(COMPILER_SEP),$(PSAUX_DIR)) \ ++ $(INCLUDE_FLAGS) \ ++ $(FT_CFLAGS) + + + # PSAUX driver sources (i.e., C files) +diff --git a/src/pshinter/rules.mk b/src/pshinter/rules.mk +index 888ece1..afc4a40 100644 +--- a/src/pshinter/rules.mk ++++ b/src/pshinter/rules.mk +@@ -20,7 +20,10 @@ PSHINTER_DIR := $(SRC_DIR)/pshinter + + # compilation flags for the driver + # +-PSHINTER_COMPILE := $(FT_COMPILE) $I$(subst /,$(COMPILER_SEP),$(PSHINTER_DIR)) ++PSHINTER_COMPILE := $(CC) $(ANSIFLAGS) \ ++ $I$(subst /,$(COMPILER_SEP),$(PSHINTER_DIR)) \ ++ $(INCLUDE_FLAGS) \ ++ $(FT_CFLAGS) + + + # PSHINTER driver sources (i.e., C files) +diff --git a/src/psnames/rules.mk b/src/psnames/rules.mk +index f321de2..278f659 100644 +--- a/src/psnames/rules.mk ++++ b/src/psnames/rules.mk +@@ -20,7 +20,10 @@ PSNAMES_DIR := $(SRC_DIR)/psnames + + # compilation flags for the driver + # +-PSNAMES_COMPILE := $(FT_COMPILE) $I$(subst /,$(COMPILER_SEP),$(PSNAMES_DIR)) ++PSNAMES_COMPILE := $(CC) $(ANSIFLAGS) \ ++ $I$(subst /,$(COMPILER_SEP),$(PSNAMES_DIR)) \ ++ $(INCLUDE_FLAGS) \ ++ $(FT_CFLAGS) + + + # PSNames driver sources (i.e., C files) +diff --git a/src/raster/rules.mk b/src/raster/rules.mk +index 0e0b5e4..6683ed7 100644 +--- a/src/raster/rules.mk ++++ b/src/raster/rules.mk +@@ -19,7 +19,10 @@ RASTER_DIR := $(SRC_DIR)/raster + + # compilation flags for the driver + # +-RASTER_COMPILE := $(FT_COMPILE) $I$(subst /,$(COMPILER_SEP),$(RASTER_DIR)) ++RASTER_COMPILE := $(CC) $(ANSIFLAGS) \ ++ $I$(subst /,$(COMPILER_SEP),$(RASTER_DIR)) \ ++ $(INCLUDE_FLAGS) \ ++ $(FT_CFLAGS) + + + # raster driver sources (i.e., C files) +diff --git a/src/sfnt/rules.mk b/src/sfnt/rules.mk +index a6c956a..b6e5aa0 100644 +--- a/src/sfnt/rules.mk ++++ b/src/sfnt/rules.mk +@@ -20,7 +20,10 @@ SFNT_DIR := $(SRC_DIR)/sfnt + + # compilation flags for the driver + # +-SFNT_COMPILE := $(FT_COMPILE) $I$(subst /,$(COMPILER_SEP),$(SFNT_DIR)) ++SFNT_COMPILE := $(CC) $(ANSIFLAGS) \ ++ $I$(subst /,$(COMPILER_SEP),$(SFNT_DIR)) \ ++ $(INCLUDE_FLAGS) \ ++ $(FT_CFLAGS) + + + # SFNT driver sources (i.e., C files) +diff --git a/src/smooth/rules.mk b/src/smooth/rules.mk +index 88d0aa5..c8ac81c 100644 +--- a/src/smooth/rules.mk ++++ b/src/smooth/rules.mk +@@ -17,9 +17,13 @@ + # + SMOOTH_DIR := $(SRC_DIR)/smooth + ++ + # compilation flags for the driver + # +-SMOOTH_COMPILE := $(FT_COMPILE) $I$(subst /,$(COMPILER_SEP),$(SMOOTH_DIR)) ++SMOOTH_COMPILE := $(CC) $(ANSIFLAGS) \ ++ $I$(subst /,$(COMPILER_SEP),$(SMOOTH_DIR)) \ ++ $(INCLUDE_FLAGS) \ ++ $(FT_CFLAGS) + + + # smooth driver sources (i.e., C files) +diff --git a/src/truetype/rules.mk b/src/truetype/rules.mk +index d4b69f5..e39235b 100644 +--- a/src/truetype/rules.mk ++++ b/src/truetype/rules.mk +@@ -20,7 +20,10 @@ TT_DIR := $(SRC_DIR)/truetype + + # compilation flags for the driver + # +-TT_COMPILE := $(FT_COMPILE) $I$(subst /,$(COMPILER_SEP),$(TT_DIR)) ++TT_COMPILE := $(CC) $(ANSIFLAGS) \ ++ $I$(subst /,$(COMPILER_SEP),$(TT_DIR)) \ ++ $(INCLUDE_FLAGS) \ ++ $(FT_CFLAGS) + + + # TrueType driver sources (i.e., C files) +diff --git a/src/type1/rules.mk b/src/type1/rules.mk +index 15087b0..160946a 100644 +--- a/src/type1/rules.mk ++++ b/src/type1/rules.mk +@@ -20,7 +20,10 @@ T1_DIR := $(SRC_DIR)/type1 + + # compilation flags for the driver + # +-T1_COMPILE := $(FT_COMPILE) $I$(subst /,$(COMPILER_SEP),$(T1_DIR)) ++T1_COMPILE := $(CC) $(ANSIFLAGS) \ ++ $I$(subst /,$(COMPILER_SEP),$(T1_DIR)) \ ++ $(INCLUDE_FLAGS) \ ++ $(FT_CFLAGS) + + + # Type1 driver sources (i.e., C files) +diff --git a/src/type42/rules.mk b/src/type42/rules.mk +index eac1081..34a31e8 100644 +--- a/src/type42/rules.mk ++++ b/src/type42/rules.mk +@@ -20,7 +20,10 @@ T42_DIR := $(SRC_DIR)/type42 + + # compilation flags for the driver + # +-T42_COMPILE := $(FT_COMPILE) $I$(subst /,$(COMPILER_SEP),$(T42_DIR)) ++T42_COMPILE := $(CC) $(ANSIFLAGS) \ ++ $I$(subst /,$(COMPILER_SEP),$(T42_DIR)) \ ++ $(INCLUDE_FLAGS) \ ++ $(FT_CFLAGS) + + + # Type42 driver source +diff --git a/src/winfonts/rules.mk b/src/winfonts/rules.mk +index 71a7df2..1a78171 100644 +--- a/src/winfonts/rules.mk ++++ b/src/winfonts/rules.mk +@@ -18,7 +18,10 @@ + FNT_DIR := $(SRC_DIR)/winfonts + + +-FNT_COMPILE := $(FT_COMPILE) $I$(subst /,$(COMPILER_SEP),$(FNT_DIR)) ++FNT_COMPILE := $(CC) $(ANSIFLAGS) \ ++ $I$(subst /,$(COMPILER_SEP),$(FNT_DIR)) \ ++ $(INCLUDE_FLAGS) \ ++ $(FT_CFLAGS) + + + # Windows driver sources (i.e., C files) +-- +2.2.2 + +From 3f9b3d882d0b1050450f0f1b3e77c9b5ab3e8c4d Mon Sep 17 00:00:00 2001 +From: Behdad Esfahbod <behdad@behdad.org> +Date: Wed, 14 Jan 2015 15:48:12 +0100 +Subject: [PATCH] * src/type42/t42objs.h (T42_DriverRec): Remove unused member. + +--- + ChangeLog | 4 ++++ + src/type42/t42objs.h | 1 - + 2 files changed, 4 insertions(+), 1 deletion(-) + +diff --git a/ChangeLog b/ChangeLog +index 027a293..9de08bb 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,3 +1,7 @@ ++2015-01-14 Behdad Esfahbod <behdad@behdad.org> ++ ++ * src/type42/t42objs.h (T42_DriverRec): Remove unused member. ++ + 2015-01-12 Werner Lemberg <wl@gnu.org> + + Fix Savannah bug #43976. +diff --git a/src/type42/t42objs.h b/src/type42/t42objs.h +index 02d1325..a93fa39 100644 +--- a/src/type42/t42objs.h ++++ b/src/type42/t42objs.h +@@ -55,7 +55,6 @@ FT_BEGIN_HEADER + { + FT_DriverRec root; + FT_Driver_Class ttclazz; +- void* extension_component; + + } T42_DriverRec, *T42_Driver; + +-- +2.2.2 + +From 89bc8d4de7bf93336e182bd42507851f5b46f66f Mon Sep 17 00:00:00 2001 +From: Behdad Esfahbod <behdad@behdad.org> +Date: Wed, 14 Jan 2015 16:01:19 +0100 +Subject: [PATCH] [autofit] Allocate AF_Loader on the stack instead of + AF_Module. + +Stop sharing a global `AF_Loader'. Allocate one on the stack during +glyph load. + +Right now this results in about 25% slowdown, to be fixed in a +following commit. + +With this patch loading glyphs from different faces from different +threads doesn't immediately crash in the autohinting loader code. + +Bugs: + + https://bugzilla.redhat.com/show_bug.cgi?id=1164941 + +* src/autofit/afloader.c (af_loader_init): Pass +`AF_Loader' and `FT_Memory' instead of `AF_Module' as arguments. +(af_loader_reset, af_loader_load_glyph): Also pass `loader' as +argument. +(af_loader_done): Use `AF_Loader' instead of `AF_Module' as +argument. + +* src/autofit/afmodule.c (af_autofitter_init): Don't call +`af_loader_init'. +(af_autofitter_done): Don't call `af_loader_done'. +(af_autofitter_load_glyph): Use a local `AF_Loader' object. + +* src/autofit/afloader.h: Include `afmodule.h'. +Update prototypes. +Move typedef for `AF_Module' to... + +* src/autofit/afmodule.h: ... this place. +No longer include `afloader.h'. +--- + ChangeLog | 36 ++++++++++++++++++++++++++++++++++++ + src/autofit/afloader.c | 24 +++++++++--------------- + src/autofit/afloader.h | 14 ++++++++------ + src/autofit/afmodule.c | 21 +++++++++++++++------ + src/autofit/afmodule.h | 10 ++-------- + 5 files changed, 70 insertions(+), 35 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index 9de08bb..bc8c725 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,5 +1,41 @@ + 2015-01-14 Behdad Esfahbod <behdad@behdad.org> + ++ [autofit] Allocate AF_Loader on the stack instead of AF_Module. ++ ++ Stop sharing a global `AF_Loader'. Allocate one on the stack during ++ glyph load. ++ ++ Right now this results in about 25% slowdown, to be fixed in a ++ following commit. ++ ++ With this patch loading glyphs from different faces from different ++ threads doesn't immediately crash in the autohinting loader code. ++ ++ Bugs: ++ ++ https://bugzilla.redhat.com/show_bug.cgi?id=1164941 ++ ++ * src/autofit/afloader.c (af_loader_init): Pass ++ `AF_Loader' and `FT_Memory' instead of `AF_Module' as arguments. ++ (af_loader_reset, af_loader_load_glyph): Also pass `loader' as ++ argument. ++ (af_loader_done): Use `AF_Loader' instead of `AF_Module' as ++ argument. ++ ++ * src/autofit/afmodule.c (af_autofitter_init): Don't call ++ `af_loader_init'. ++ (af_autofitter_done): Don't call `af_loader_done'. ++ (af_autofitter_load_glyph): Use a local `AF_Loader' object. ++ ++ * src/autofit/afloader.h: Include `afmodule.h'. ++ Update prototypes. ++ Move typedef for `AF_Module' to... ++ ++ * src/autofit/afmodule.h: ... this place. ++ No longer include `afloader.h'. ++ ++2015-01-14 Behdad Esfahbod <behdad@behdad.org> ++ + * src/type42/t42objs.h (T42_DriverRec): Remove unused member. + + 2015-01-12 Werner Lemberg <wl@gnu.org> +diff --git a/src/autofit/afloader.c b/src/autofit/afloader.c +index fb15c87..612103c 100644 +--- a/src/autofit/afloader.c ++++ b/src/autofit/afloader.c +@@ -27,12 +27,9 @@ + /* Initialize glyph loader. */ + + FT_LOCAL_DEF( FT_Error ) +- af_loader_init( AF_Module module ) ++ af_loader_init( AF_Loader loader, ++ FT_Memory memory ) + { +- AF_Loader loader = module->loader; +- FT_Memory memory = module->root.library->memory; +- +- + FT_ZERO( loader ); + + af_glyph_hints_init( &loader->hints, memory ); +@@ -46,11 +43,11 @@ + /* Reset glyph loader and compute globals if necessary. */ + + FT_LOCAL_DEF( FT_Error ) +- af_loader_reset( AF_Module module, ++ af_loader_reset( AF_Loader loader, ++ AF_Module module, + FT_Face face ) + { +- FT_Error error = FT_Err_Ok; +- AF_Loader loader = module->loader; ++ FT_Error error = FT_Err_Ok; + + + loader->face = face; +@@ -77,11 +74,8 @@ + /* Finalize glyph loader. */ + + FT_LOCAL_DEF( void ) +- af_loader_done( AF_Module module ) ++ af_loader_done( AF_Loader loader ) + { +- AF_Loader loader = module->loader; +- +- + af_glyph_hints_done( &loader->hints ); + + loader->face = NULL; +@@ -496,14 +490,14 @@ + /* Load a glyph. */ + + FT_LOCAL_DEF( FT_Error ) +- af_loader_load_glyph( AF_Module module, ++ af_loader_load_glyph( AF_Loader loader, ++ AF_Module module, + FT_Face face, + FT_UInt gindex, + FT_Int32 load_flags ) + { + FT_Error error; + FT_Size size = face->size; +- AF_Loader loader = module->loader; + AF_ScalerRec scaler; + + +@@ -521,7 +515,7 @@ + scaler.render_mode = FT_LOAD_TARGET_MODE( load_flags ); + scaler.flags = 0; /* XXX: fix this */ + +- error = af_loader_reset( module, face ); ++ error = af_loader_reset( loader, module, face ); + if ( !error ) + { + AF_StyleMetrics metrics; +diff --git a/src/autofit/afloader.h b/src/autofit/afloader.h +index 9601e24..5987b27 100644 +--- a/src/autofit/afloader.h ++++ b/src/autofit/afloader.h +@@ -20,13 +20,12 @@ + #define __AFLOADER_H__ + + #include "afhints.h" ++#include "afmodule.h" + #include "afglobal.h" + + + FT_BEGIN_HEADER + +- typedef struct AF_ModuleRec_* AF_Module; +- + /* + * The autofitter module's (global) data structure to communicate with + * actual fonts. If necessary, `local' data like the current face, the +@@ -56,20 +55,23 @@ FT_BEGIN_HEADER + + + FT_LOCAL( FT_Error ) +- af_loader_init( AF_Module module ); ++ af_loader_init( AF_Loader loader, ++ FT_Memory memory ); + + + FT_LOCAL( FT_Error ) +- af_loader_reset( AF_Module module, ++ af_loader_reset( AF_Loader loader, ++ AF_Module module, + FT_Face face ); + + + FT_LOCAL( void ) +- af_loader_done( AF_Module module ); ++ af_loader_done( AF_Loader loader ); + + + FT_LOCAL( FT_Error ) +- af_loader_load_glyph( AF_Module module, ++ af_loader_load_glyph( AF_Loader loader, ++ AF_Module module, + FT_Face face, + FT_UInt gindex, + FT_Int32 load_flags ); +diff --git a/src/autofit/afmodule.c b/src/autofit/afmodule.c +index 641e03e..77e4849 100644 +--- a/src/autofit/afmodule.c ++++ b/src/autofit/afmodule.c +@@ -253,7 +253,7 @@ + module->fallback_style = AF_STYLE_FALLBACK; + module->default_script = AF_SCRIPT_DEFAULT; + +- return af_loader_init( module ); ++ return FT_Err_Ok; + } + + +@@ -261,9 +261,6 @@ + af_autofitter_done( FT_Module ft_module ) /* AF_Module */ + { + AF_Module module = (AF_Module)ft_module; +- +- +- af_loader_done( module ); + } + + +@@ -274,10 +271,22 @@ + FT_UInt glyph_index, + FT_Int32 load_flags ) + { ++ FT_Error error = FT_Err_Ok; ++ AF_LoaderRec loader[1]; ++ + FT_UNUSED( size ); + +- return af_loader_load_glyph( module, slot->face, +- glyph_index, load_flags ); ++ ++ error = af_loader_init( loader, module->root.library->memory ); ++ if ( error ) ++ return error; ++ ++ error = af_loader_load_glyph( loader, module, slot->face, ++ glyph_index, load_flags ); ++ ++ af_loader_done( loader ); ++ ++ return error; + } + + +diff --git a/src/autofit/afmodule.h b/src/autofit/afmodule.h +index 20b7b9f..4f73d1d 100644 +--- a/src/autofit/afmodule.h ++++ b/src/autofit/afmodule.h +@@ -23,17 +23,13 @@ + #include FT_INTERNAL_OBJECTS_H + #include FT_MODULE_H + +-#include "afloader.h" +- + + FT_BEGIN_HEADER + + + /* + * This is the `extended' FT_Module structure which holds the +- * autofitter's global data. Right before hinting a glyph, the data +- * specific to the glyph's face (blue zones, stem widths, etc.) are +- * loaded into `loader' (see function `af_loader_reset'). ++ * autofitter's global data. + */ + + typedef struct AF_ModuleRec_ +@@ -43,9 +39,7 @@ FT_BEGIN_HEADER + FT_UInt fallback_style; + FT_UInt default_script; + +- AF_LoaderRec loader[1]; +- +- } AF_ModuleRec; ++ } AF_ModuleRec, *AF_Module; + + + FT_DECLARE_MODULE(autofit_module_class) +-- +2.2.2 + +From 531d463aed365b9790f6065b98e94b9bb14289bb Mon Sep 17 00:00:00 2001 +From: Behdad Esfahbod <behdad@behdad.org> +Date: Wed, 14 Jan 2015 17:46:55 +0100 +Subject: [PATCH] [truetype] Allocate TT_ExecContext in TT_Size instead of + TT_Driver. + +Previously the code had stipulation for using a per-TT_Size exec +context if `size->debug' was true. But there was no way that +`size->debug' could *ever* be true. As such, the code was always +using the singleton `TT_ExecContext' that was stored in `TT_Driver'. +This was, clearly, not threadsafe. + +With this patch, loading glyphs from different faces from different +threads doesn't crash in the bytecode loader code. + +* src/truetype/ttobjs.h (TT_SizeRec): Remove `debug' member. +(TT_DriverRec): Remove `context' member. + +* src/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep): Remove +`TT_ExecContext' code related to a global `TT_Driver' object. + +(tt_driver_done): Don't remove `TT_ExecContext' object here but ... +(tt_size_done_bytecode): ... here. + +(tt_driver_init): Don't create `TT_ExecContext' object here but ... +(tt_size_init_bytecode): ... here, only on demand. + +* src/truetype/ttinterp.c (TT_Run_Context): Remove defunct debug +code. +(TT_New_Context): Remove `TT_ExecContext' code related to a global +`TT_Driver' object. + +* src/truetype/ttinterp.h: Updated. + +* src/truetype/ttgload.c (TT_Hint_Glyph, tt_loader_init): Updated. +--- + ChangeLog | 34 +++++++++++++++++++++++++++++++++ + src/truetype/ttgload.c | 9 ++------- + src/truetype/ttinterp.c | 44 ++++++++++++------------------------------- + src/truetype/ttinterp.h | 4 ++-- + src/truetype/ttobjs.c | 50 ++++++++----------------------------------------- + src/truetype/ttobjs.h | 8 -------- + 6 files changed, 58 insertions(+), 91 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index bc8c725..5f34ee4 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,5 +1,39 @@ + 2015-01-14 Behdad Esfahbod <behdad@behdad.org> + ++ [truetype] Allocate TT_ExecContext in TT_Size instead of TT_Driver. ++ ++ Previously the code had stipulation for using a per-TT_Size exec ++ context if `size->debug' was true. But there was no way that ++ `size->debug' could *ever* be true. As such, the code was always ++ using the singleton `TT_ExecContext' that was stored in `TT_Driver'. ++ This was, clearly, not threadsafe. ++ ++ With this patch, loading glyphs from different faces from different ++ threads doesn't crash in the bytecode loader code. ++ ++ * src/truetype/ttobjs.h (TT_SizeRec): Remove `debug' member. ++ (TT_DriverRec): Remove `context' member. ++ ++ * src/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep): Remove ++ `TT_ExecContext' code related to a global `TT_Driver' object. ++ ++ (tt_driver_done): Don't remove `TT_ExecContext' object here but ... ++ (tt_size_done_bytecode): ... here. ++ ++ (tt_driver_init): Don't create `TT_ExecContext' object here but ... ++ (tt_size_init_bytecode): ... here, only on demand. ++ ++ * src/truetype/ttinterp.c (TT_Run_Context): Remove defunct debug ++ code. ++ (TT_New_Context): Remove `TT_ExecContext' code related to a global ++ `TT_Driver' object. ++ ++ * src/truetype/ttinterp.h: Updated. ++ ++ * src/truetype/ttgload.c (TT_Hint_Glyph, tt_loader_init): Updated. ++ ++2015-01-14 Behdad Esfahbod <behdad@behdad.org> ++ + [autofit] Allocate AF_Loader on the stack instead of AF_Module. + + Stop sharing a global `AF_Loader'. Allocate one on the stack during +diff --git a/src/truetype/ttgload.c b/src/truetype/ttgload.c +index c5841c3..c780275 100644 +--- a/src/truetype/ttgload.c ++++ b/src/truetype/ttgload.c +@@ -794,7 +794,6 @@ + + if ( n_ins > 0 ) + { +- FT_Bool debug; + FT_Error error; + + FT_GlyphLoader gloader = loader->gloader; +@@ -807,10 +806,7 @@ + loader->exec->is_composite = is_composite; + loader->exec->pts = *zone; + +- debug = FT_BOOL( !( loader->load_flags & FT_LOAD_NO_SCALE ) && +- ((TT_Size)loader->size)->debug ); +- +- error = TT_Run_Context( loader->exec, debug ); ++ error = TT_Run_Context( loader->exec ); + if ( error && loader->exec->pedantic_hinting ) + return error; + +@@ -2137,8 +2133,7 @@ + return size->cvt_ready; + + /* query new execution context */ +- exec = size->debug ? size->context +- : ( (TT_Driver)FT_FACE_DRIVER( face ) )->context; ++ exec = size->context; + if ( !exec ) + return FT_THROW( Could_Not_Find_Context ); + +diff --git a/src/truetype/ttinterp.c b/src/truetype/ttinterp.c +index 293af9d..feaf8c7 100644 +--- a/src/truetype/ttinterp.c ++++ b/src/truetype/ttinterp.c +@@ -544,12 +544,8 @@ + /* <Return> */ + /* TrueType error code. 0 means success. */ + /* */ +- /* <Note> */ +- /* Only the glyph loader and debugger should call this function. */ +- /* */ + FT_LOCAL_DEF( FT_Error ) +- TT_Run_Context( TT_ExecContext exec, +- FT_Bool debug ) ++ TT_Run_Context( TT_ExecContext exec ) + { + TT_Goto_CodeRange( exec, tt_coderange_glyph, 0 ); + +@@ -579,16 +575,7 @@ + exec->top = 0; + exec->callTop = 0; + +-#if 1 +- FT_UNUSED( debug ); +- + return exec->face->interpreter( exec ); +-#else +- if ( !debug ) +- return TT_RunIns( exec ); +- else +- return FT_Err_Ok; +-#endif + } + + +@@ -622,6 +609,9 @@ + TT_New_Context( TT_Driver driver ) + { + FT_Memory memory; ++ FT_Error error; ++ ++ TT_ExecContext exec; + + + if ( !driver ) +@@ -629,26 +619,16 @@ + + memory = driver->root.root.memory; + +- if ( !driver->context ) +- { +- FT_Error error; +- TT_ExecContext exec; +- +- +- /* allocate object */ +- if ( FT_NEW( exec ) ) +- goto Fail; +- +- /* initialize it; in case of error this deallocates `exec' too */ +- error = Init_Context( exec, memory ); +- if ( error ) +- goto Fail; ++ /* allocate object */ ++ if ( FT_NEW( exec ) ) ++ goto Fail; + +- /* store it into the driver */ +- driver->context = exec; +- } ++ /* initialize it; in case of error this deallocates `exec' too */ ++ error = Init_Context( exec, memory ); ++ if ( error ) ++ goto Fail; + +- return driver->context; ++ return exec; + + Fail: + return NULL; +diff --git a/src/truetype/ttinterp.h b/src/truetype/ttinterp.h +index 2893c56..8f213be 100644 +--- a/src/truetype/ttinterp.h ++++ b/src/truetype/ttinterp.h +@@ -327,6 +327,7 @@ FT_BEGIN_HEADER + /* */ + /* <Note> */ + /* Only the glyph loader and debugger should call this function. */ ++ /* (And right now only the glyph loader uses it.) */ + /* */ + FT_EXPORT( TT_ExecContext ) + TT_New_Context( TT_Driver driver ); +@@ -346,8 +347,7 @@ FT_BEGIN_HEADER + TT_Size ins ); + + FT_LOCAL( FT_Error ) +- TT_Run_Context( TT_ExecContext exec, +- FT_Bool debug ); ++ TT_Run_Context( TT_ExecContext exec ); + #endif /* TT_USE_BYTECODE_INTERPRETER */ + + +diff --git a/src/truetype/ttobjs.c b/src/truetype/ttobjs.c +index 4707dfe..8877c4d 100644 +--- a/src/truetype/ttobjs.c ++++ b/src/truetype/ttobjs.c +@@ -751,14 +751,7 @@ + FT_Error error; + + +- /* debugging instances have their own context */ +- if ( size->debug ) +- exec = size->context; +- else +- exec = ( (TT_Driver)FT_FACE_DRIVER( face ) )->context; +- +- if ( !exec ) +- return FT_THROW( Could_Not_Find_Context ); ++ exec = size->context; + + error = TT_Load_Context( exec, face, size ); + if ( error ) +@@ -845,14 +838,7 @@ + FT_Error error; + + +- /* debugging instances have their own context */ +- if ( size->debug ) +- exec = size->context; +- else +- exec = ( (TT_Driver)FT_FACE_DRIVER( face ) )->context; +- +- if ( !exec ) +- return FT_THROW( Could_Not_Find_Context ); ++ exec = size->context; + + error = TT_Load_Context( exec, face, size ); + if ( error ) +@@ -876,12 +862,9 @@ + { + TT_Goto_CodeRange( exec, tt_coderange_cvt, 0 ); + +- if ( !size->debug ) +- { +- FT_TRACE4(( "Executing `prep' table.\n" )); ++ FT_TRACE4(( "Executing `prep' table.\n" )); + +- error = face->interpreter( exec ); +- } ++ error = face->interpreter( exec ); + } + else + error = FT_Err_Ok; +@@ -924,12 +907,10 @@ + TT_Face face = (TT_Face)ftsize->face; + FT_Memory memory = face->root.memory; + +- +- if ( size->debug ) ++ if ( size->context ) + { +- /* the debug context must be deleted by the debugger itself */ ++ TT_Done_Context( size->context ); + size->context = NULL; +- size->debug = FALSE; + } + + FT_FREE( size->cvt ); +@@ -976,6 +957,8 @@ + size->bytecode_ready = -1; + size->cvt_ready = -1; + ++ size->context = TT_New_Context( (TT_Driver)face->root.driver ); ++ + size->max_function_defs = maxp->maxFunctionDefs; + size->max_instruction_defs = maxp->maxInstructionDefs; + +@@ -1259,10 +1242,6 @@ + + TT_Driver driver = (TT_Driver)ttdriver; + +- +- if ( !TT_New_Context( driver ) ) +- return FT_THROW( Could_Not_Find_Context ); +- + #ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING + driver->interpreter_version = TT_INTERPRETER_VERSION_38; + #else +@@ -1293,20 +1272,7 @@ + FT_LOCAL_DEF( void ) + tt_driver_done( FT_Module ttdriver ) /* TT_Driver */ + { +-#ifdef TT_USE_BYTECODE_INTERPRETER +- TT_Driver driver = (TT_Driver)ttdriver; +- +- +- /* destroy the execution context */ +- if ( driver->context ) +- { +- TT_Done_Context( driver->context ); +- driver->context = NULL; +- } +-#else + FT_UNUSED( ttdriver ); +-#endif +- + } + + +diff --git a/src/truetype/ttobjs.h b/src/truetype/ttobjs.h +index 859164f..782255c 100644 +--- a/src/truetype/ttobjs.h ++++ b/src/truetype/ttobjs.h +@@ -324,13 +324,6 @@ FT_BEGIN_HEADER + + TT_GlyphZoneRec twilight; /* The instance's twilight zone */ + +- /* debugging variables */ +- +- /* When using the debugger, we must keep the */ +- /* execution context tied to the instance */ +- /* object rather than asking it on demand. */ +- +- FT_Bool debug; + TT_ExecContext context; + + /* if negative, `fpgm' (resp. `prep'), wasn't executed yet; */ +@@ -351,7 +344,6 @@ FT_BEGIN_HEADER + { + FT_DriverRec root; + +- TT_ExecContext context; /* execution context */ + TT_GlyphZoneRec zone; /* glyph loader points zone */ + + FT_UInt interpreter_version; +-- +2.2.2 + +From 747ae2c8aa3d8d3a5b731caf6aca9aae4ffb74fb Mon Sep 17 00:00:00 2001 +From: Behdad Esfahbod <behdad@behdad.org> +Date: Wed, 14 Jan 2015 17:54:26 +0100 +Subject: [PATCH] [smooth] Allocate render pool for smooth rasterizer on the + stack. + +Instead of using the `render_pool' member of `FT_Library' that is +provided down to the rasterizer, completely ignore that and allocate +needed objects on the stack instead. + +With this patch, rasterizing glyphs from different faces from +different threads doesn't crash in the smooth rasterizer. + +Bugs: + + https://bugzilla.redhat.com/show_bug.cgi?id=678397 + https://bugzilla.redhat.com/show_bug.cgi?id=1004315 + https://bugzilla.redhat.com/show_bug.cgi?id=1165471 + https://bugs.freedesktop.org/show_bug.cgi?id=69034 + +* src/smooth/ftgrays.c (gray_TRaster): Remove `buffer', +`buffer_size', `band_size', and `worker' members. + +(gray_raster_render): Create `buffer', `buffer_size', and +`band_size' locally. +(gray_raster_reset): Updated. +--- + ChangeLog | 25 ++++++++++++++++++++++++ + src/smooth/ftgrays.c | 54 ++++++++++++++-------------------------------------- + 2 files changed, 39 insertions(+), 40 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index 5f34ee4..a85fbad 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,5 +1,30 @@ + 2015-01-14 Behdad Esfahbod <behdad@behdad.org> + ++ [smooth] Allocate render pool for smooth rasterizer on the stack. ++ ++ Instead of using the `render_pool' member of `FT_Library' that is ++ provided down to the rasterizer, completely ignore that and allocate ++ needed objects on the stack instead. ++ ++ With this patch, rasterizing glyphs from different faces from ++ different threads doesn't crash in the smooth rasterizer. ++ ++ Bugs: ++ ++ https://bugzilla.redhat.com/show_bug.cgi?id=678397 ++ https://bugzilla.redhat.com/show_bug.cgi?id=1004315 ++ https://bugzilla.redhat.com/show_bug.cgi?id=1165471 ++ https://bugs.freedesktop.org/show_bug.cgi?id=69034 ++ ++ * src/smooth/ftgrays.c (gray_TRaster): Remove `buffer', ++ `buffer_size', `band_size', and `worker' members. ++ ++ (gray_raster_render): Create `buffer', `buffer_size', and ++ `band_size' locally. ++ (gray_raster_reset): Updated. ++ ++2015-01-14 Behdad Esfahbod <behdad@behdad.org> ++ + [truetype] Allocate TT_ExecContext in TT_Size instead of TT_Driver. + + Previously the code had stipulation for using a per-TT_Size exec +diff --git a/src/smooth/ftgrays.c b/src/smooth/ftgrays.c +index 131ad27..65eb64c 100644 +--- a/src/smooth/ftgrays.c ++++ b/src/smooth/ftgrays.c +@@ -464,11 +464,7 @@ typedef ptrdiff_t FT_PtrDist; + + typedef struct gray_TRaster_ + { +- void* buffer; +- long buffer_size; +- int band_size; + void* memory; +- gray_PWorker worker; + + } gray_TRaster, *gray_PRaster; + +@@ -1918,12 +1914,17 @@ typedef ptrdiff_t FT_PtrDist; + gray_raster_render( gray_PRaster raster, + const FT_Raster_Params* params ) + { +- const FT_Outline* outline = (const FT_Outline*)params->source; +- const FT_Bitmap* target_map = params->target; +- gray_PWorker worker; ++ const FT_Outline* outline = (const FT_Outline*)params->source; ++ const FT_Bitmap* target_map = params->target; + ++ gray_TWorker worker[1]; + +- if ( !raster || !raster->buffer || !raster->buffer_size ) ++ TCell buffer[FT_MAX( FT_RENDER_POOL_SIZE, 2048 ) / sizeof ( TCell )]; ++ long buffer_size = sizeof ( buffer ); ++ int band_size = (int)( buffer_size / ( sizeof ( TCell ) * 8 ) ); ++ ++ ++ if ( !raster ) + return FT_THROW( Invalid_Argument ); + + if ( !outline ) +@@ -1940,8 +1941,6 @@ typedef ptrdiff_t FT_PtrDist; + outline->contours[outline->n_contours - 1] + 1 ) + return FT_THROW( Invalid_Outline ); + +- worker = raster->worker; +- + /* if direct mode is not set, we must have a target bitmap */ + if ( !( params->flags & FT_RASTER_FLAG_DIRECT ) ) + { +@@ -1979,12 +1978,12 @@ typedef ptrdiff_t FT_PtrDist; + ras.clip_box.yMax = 32767L; + } + +- gray_init_cells( RAS_VAR_ raster->buffer, raster->buffer_size ); ++ gray_init_cells( RAS_VAR_ buffer, buffer_size ); + + ras.outline = *outline; + ras.num_cells = 0; + ras.invalid = 1; +- ras.band_size = raster->band_size; ++ ras.band_size = band_size; + ras.num_gray_spans = 0; + + if ( params->flags & FT_RASTER_FLAG_DIRECT ) +@@ -2069,34 +2068,9 @@ typedef ptrdiff_t FT_PtrDist; + char* pool_base, + long pool_size ) + { +- gray_PRaster rast = (gray_PRaster)raster; +- +- +- if ( raster ) +- { +- if ( pool_base && pool_size >= (long)sizeof ( gray_TWorker ) + 2048 ) +- { +- gray_PWorker worker = (gray_PWorker)pool_base; +- +- +- rast->worker = worker; +- rast->buffer = pool_base + +- ( ( sizeof ( gray_TWorker ) + +- sizeof ( TCell ) - 1 ) & +- ~( sizeof ( TCell ) - 1 ) ); +- rast->buffer_size = (long)( ( pool_base + pool_size ) - +- (char*)rast->buffer ) & +- ~( sizeof ( TCell ) - 1 ); +- rast->band_size = (int)( rast->buffer_size / +- ( sizeof ( TCell ) * 8 ) ); +- } +- else +- { +- rast->buffer = NULL; +- rast->buffer_size = 0; +- rast->worker = NULL; +- } +- } ++ FT_UNUSED( raster ); ++ FT_UNUSED( pool_base ); ++ FT_UNUSED( pool_size ); + } + + +-- +2.2.2 + +From 8dc863587440d0a1d2eec2a7973a8eda99d2767d Mon Sep 17 00:00:00 2001 +From: Behdad Esfahbod <behdad@behdad.org> +Date: Wed, 14 Jan 2015 18:06:22 +0100 +Subject: [PATCH] [raster] Remove 5-level gray AA mode from monochrome + rasterizer. + +It was off by default and couldn't be turned on at runtime. And the +smooth rasterizer superceded it over ten years ago. No point in +keeping. Comments suggested that it was there for compatibility +with FreeType 1. + +550 lines down. + +* src/raster/ftraster.c (FT_RASTER_OPTION_ANTI_ALIASING, +RASTER_GRAY_LINES): Remove macros and all associated code. + +(black_TWorker): Remove `gray_min_x' and `gray_max_x'. +(black_TRaster): Remove `grays' and `gray_width'. + +(Vertical_Sweep_Init, Vertical_Sweep_Span, Vertical_Sweep_Drop, +ft_black_render): Updated. + +* src/raster/ftrend1.c (ft_raster1_render): Simplify code. +(ft_raster5_renderer_class): Removed. +--- + ChangeLog | 23 +++ + include/ftrender.h | 9 +- + src/raster/ftraster.c | 490 +------------------------------------------------- + src/raster/ftrend1.c | 60 +------ + 4 files changed, 28 insertions(+), 554 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index a85fbad..5808490 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,5 +1,28 @@ + 2015-01-14 Behdad Esfahbod <behdad@behdad.org> + ++ [raster] Remove 5-level gray AA mode from monochrome rasterizer. ++ ++ It was off by default and couldn't be turned on at runtime. And the ++ smooth rasterizer superceded it over ten years ago. No point in ++ keeping. Comments suggested that it was there for compatibility ++ with FreeType 1. ++ ++ 550 lines down. ++ ++ * src/raster/ftraster.c (FT_RASTER_OPTION_ANTI_ALIASING, ++ RASTER_GRAY_LINES): Remove macros and all associated code. ++ ++ (black_TWorker): Remove `gray_min_x' and `gray_max_x'. ++ (black_TRaster): Remove `grays' and `gray_width'. ++ ++ (Vertical_Sweep_Init, Vertical_Sweep_Span, Vertical_Sweep_Drop, ++ ft_black_render): Updated. ++ ++ * src/raster/ftrend1.c (ft_raster1_render): Simplify code. ++ (ft_raster5_renderer_class): Removed. ++ ++2015-01-14 Behdad Esfahbod <behdad@behdad.org> ++ + [smooth] Allocate render pool for smooth rasterizer on the stack. + + Instead of using the `render_pool' member of `FT_Library' that is +diff --git a/include/ftrender.h b/include/ftrender.h +index e8d3636..58a9716 100644 +--- a/include/ftrender.h ++++ b/include/ftrender.h +@@ -212,13 +212,8 @@ FT_BEGIN_HEADER + /* */ + /* This doesn't change the current renderer for other formats. */ + /* */ +- /* Currently, only the B/W renderer, if compiled with */ +- /* FT_RASTER_OPTION_ANTI_ALIASING (providing a 5-levels */ +- /* anti-aliasing mode; this option must be set directly in */ +- /* `ftraster.c' and is undefined by default) accepts a single tag */ +- /* `pal5' to set its gray palette as a character string with */ +- /* 5~elements. Consequently, the third and fourth argument are zero */ +- /* normally. */ ++ /* Currently, no FreeType renderer module uses `parameters'; you */ ++ /* should thus always pass NULL as the value. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Set_Renderer( FT_Library library, +diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c +index b06ac33..54fb579 100644 +--- a/src/raster/ftraster.c ++++ b/src/raster/ftraster.c +@@ -150,14 +150,6 @@ + /* define DEBUG_RASTER if you want to compile a debugging version */ + /* #define DEBUG_RASTER */ + +- /* define FT_RASTER_OPTION_ANTI_ALIASING if you want to support */ +- /* 5-levels anti-aliasing */ +-/* #define FT_RASTER_OPTION_ANTI_ALIASING */ +- +- /* The size of the two-lines intermediate bitmap used */ +- /* for anti-aliasing, in bytes. */ +-#define RASTER_GRAY_LINES 2048 +- + + /*************************************************************************/ + /*************************************************************************/ +@@ -514,9 +506,6 @@ + + Short traceIncr; /* sweep's increment in target bitmap */ + +- Short gray_min_x; /* current min x during gray rendering */ +- Short gray_max_x; /* current max x during gray rendering */ +- + /* dispatch variables */ + + Function_Sweep_Init* Proc_Sweep_Init; +@@ -529,34 +518,13 @@ + Bool second_pass; /* indicates whether a horizontal pass */ + /* should be performed to control */ + /* drop-out accurately when calling */ +- /* Render_Glyph. Note that there is */ +- /* no horizontal pass during gray */ +- /* rendering. */ ++ /* Render_Glyph. */ + + TPoint arcs[3 * MaxBezier + 1]; /* The Bezier stack */ + + black_TBand band_stack[16]; /* band stack used for sub-banding */ + Int band_top; /* band stack top */ + +-#ifdef FT_RASTER_OPTION_ANTI_ALIASING +- +- Byte* grays; +- +- Byte gray_lines[RASTER_GRAY_LINES]; +- /* Intermediate table used to render the */ +- /* graylevels pixmaps. */ +- /* gray_lines is a buffer holding two */ +- /* monochrome scanlines */ +- +- Short gray_width; /* width in bytes of one monochrome */ +- /* intermediate scanline of gray_lines. */ +- /* Each gray pixel takes 2 bits long there */ +- +- /* The gray_lines must hold 2 lines, thus with size */ +- /* in bytes of at least `gray_width*2'. */ +- +-#endif /* FT_RASTER_ANTI_ALIASING */ +- + }; + + +@@ -566,8 +534,6 @@ + long buffer_size; + void* memory; + black_PWorker worker; +- Byte grays[5]; +- Short gray_width; + + } black_TRaster, *black_PRaster; + +@@ -583,70 +549,6 @@ + #endif /* !FT_STATIC_RASTER */ + + +-#ifdef FT_RASTER_OPTION_ANTI_ALIASING +- +- /* A lookup table used to quickly count set bits in four gray 2x2 */ +- /* cells. The values of the table have been produced with the */ +- /* following code: */ +- /* */ +- /* for ( i = 0; i < 256; i++ ) */ +- /* { */ +- /* l = 0; */ +- /* j = i; */ +- /* */ +- /* for ( c = 0; c < 4; c++ ) */ +- /* { */ +- /* l <<= 4; */ +- /* */ +- /* if ( j & 0x80 ) l++; */ +- /* if ( j & 0x40 ) l++; */ +- /* */ +- /* j = ( j << 2 ) & 0xFF; */ +- /* } */ +- /* printf( "0x%04X", l ); */ +- /* } */ +- /* */ +- +- static const short count_table[256] = +- { +- 0x0000, 0x0001, 0x0001, 0x0002, 0x0010, 0x0011, 0x0011, 0x0012, +- 0x0010, 0x0011, 0x0011, 0x0012, 0x0020, 0x0021, 0x0021, 0x0022, +- 0x0100, 0x0101, 0x0101, 0x0102, 0x0110, 0x0111, 0x0111, 0x0112, +- 0x0110, 0x0111, 0x0111, 0x0112, 0x0120, 0x0121, 0x0121, 0x0122, +- 0x0100, 0x0101, 0x0101, 0x0102, 0x0110, 0x0111, 0x0111, 0x0112, +- 0x0110, 0x0111, 0x0111, 0x0112, 0x0120, 0x0121, 0x0121, 0x0122, +- 0x0200, 0x0201, 0x0201, 0x0202, 0x0210, 0x0211, 0x0211, 0x0212, +- 0x0210, 0x0211, 0x0211, 0x0212, 0x0220, 0x0221, 0x0221, 0x0222, +- 0x1000, 0x1001, 0x1001, 0x1002, 0x1010, 0x1011, 0x1011, 0x1012, +- 0x1010, 0x1011, 0x1011, 0x1012, 0x1020, 0x1021, 0x1021, 0x1022, +- 0x1100, 0x1101, 0x1101, 0x1102, 0x1110, 0x1111, 0x1111, 0x1112, +- 0x1110, 0x1111, 0x1111, 0x1112, 0x1120, 0x1121, 0x1121, 0x1122, +- 0x1100, 0x1101, 0x1101, 0x1102, 0x1110, 0x1111, 0x1111, 0x1112, +- 0x1110, 0x1111, 0x1111, 0x1112, 0x1120, 0x1121, 0x1121, 0x1122, +- 0x1200, 0x1201, 0x1201, 0x1202, 0x1210, 0x1211, 0x1211, 0x1212, +- 0x1210, 0x1211, 0x1211, 0x1212, 0x1220, 0x1221, 0x1221, 0x1222, +- 0x1000, 0x1001, 0x1001, 0x1002, 0x1010, 0x1011, 0x1011, 0x1012, +- 0x1010, 0x1011, 0x1011, 0x1012, 0x1020, 0x1021, 0x1021, 0x1022, +- 0x1100, 0x1101, 0x1101, 0x1102, 0x1110, 0x1111, 0x1111, 0x1112, +- 0x1110, 0x1111, 0x1111, 0x1112, 0x1120, 0x1121, 0x1121, 0x1122, +- 0x1100, 0x1101, 0x1101, 0x1102, 0x1110, 0x1111, 0x1111, 0x1112, +- 0x1110, 0x1111, 0x1111, 0x1112, 0x1120, 0x1121, 0x1121, 0x1122, +- 0x1200, 0x1201, 0x1201, 0x1202, 0x1210, 0x1211, 0x1211, 0x1212, +- 0x1210, 0x1211, 0x1211, 0x1212, 0x1220, 0x1221, 0x1221, 0x1222, +- 0x2000, 0x2001, 0x2001, 0x2002, 0x2010, 0x2011, 0x2011, 0x2012, +- 0x2010, 0x2011, 0x2011, 0x2012, 0x2020, 0x2021, 0x2021, 0x2022, +- 0x2100, 0x2101, 0x2101, 0x2102, 0x2110, 0x2111, 0x2111, 0x2112, +- 0x2110, 0x2111, 0x2111, 0x2112, 0x2120, 0x2121, 0x2121, 0x2122, +- 0x2100, 0x2101, 0x2101, 0x2102, 0x2110, 0x2111, 0x2111, 0x2112, +- 0x2110, 0x2111, 0x2111, 0x2112, 0x2120, 0x2121, 0x2121, 0x2122, +- 0x2200, 0x2201, 0x2201, 0x2202, 0x2210, 0x2211, 0x2211, 0x2212, +- 0x2210, 0x2211, 0x2211, 0x2212, 0x2220, 0x2221, 0x2221, 0x2222 +- }; +- +-#endif /* FT_RASTER_OPTION_ANTI_ALIASING */ +- +- +- + /*************************************************************************/ + /*************************************************************************/ + /** **/ +@@ -2268,9 +2170,6 @@ + ras.traceOfs = -*min * pitch; + if ( pitch > 0 ) + ras.traceOfs += ( ras.target.rows - 1 ) * pitch; +- +- ras.gray_min_x = 0; +- ras.gray_max_x = 0; + } + + +@@ -2318,11 +2217,6 @@ + f1 = (Byte) ( 0xFF >> ( e1 & 7 ) ); + f2 = (Byte) ~( 0x7F >> ( e2 & 7 ) ); + +- if ( ras.gray_min_x > c1 ) +- ras.gray_min_x = (short)c1; +- if ( ras.gray_max_x < c2 ) +- ras.gray_max_x = (short)c2; +- + target = ras.bTarget + ras.traceOfs + c1; + c2 -= c1; + +@@ -2486,11 +2380,6 @@ + c1 = (Short)( e1 >> 3 ); + f1 = (Short)( e1 & 7 ); + +- if ( ras.gray_min_x > c1 ) +- ras.gray_min_x = c1; +- if ( ras.gray_max_x < c1 ) +- ras.gray_max_x = c1; +- + ras.bTarget[ras.traceOfs + c1] |= (char)( 0x80 >> f1 ); + } + } +@@ -2695,249 +2584,6 @@ + } + + +-#ifdef FT_RASTER_OPTION_ANTI_ALIASING +- +- +- /*************************************************************************/ +- /* */ +- /* Vertical Gray Sweep Procedure Set */ +- /* */ +- /* These two routines are used during the vertical gray-levels sweep */ +- /* phase by the generic Draw_Sweep() function. */ +- /* */ +- /* NOTES */ +- /* */ +- /* - The target pixmap's width *must* be a multiple of 4. */ +- /* */ +- /* - You have to use the function Vertical_Sweep_Span() for the gray */ +- /* span call. */ +- /* */ +- /*************************************************************************/ +- +- static void +- Vertical_Gray_Sweep_Init( RAS_ARGS Short* min, +- Short* max ) +- { +- Long pitch, byte_len; +- +- +- *min = *min & -2; +- *max = ( *max + 3 ) & -2; +- +- ras.traceOfs = 0; +- pitch = ras.target.pitch; +- byte_len = -pitch; +- ras.traceIncr = (Short)byte_len; +- ras.traceG = ( *min / 2 ) * byte_len; +- +- if ( pitch > 0 ) +- { +- ras.traceG += ( ras.target.rows - 1 ) * pitch; +- byte_len = -byte_len; +- } +- +- ras.gray_min_x = (Short)byte_len; +- ras.gray_max_x = -(Short)byte_len; +- } +- +- +- static void +- Vertical_Gray_Sweep_Step( RAS_ARG ) +- { +- short* count = (short*)count_table; +- Byte* grays; +- +- +- ras.traceOfs += ras.gray_width; +- +- if ( ras.traceOfs > ras.gray_width ) +- { +- PByte pix; +- +- +- pix = ras.gTarget + ras.traceG + ras.gray_min_x * 4; +- grays = ras.grays; +- +- if ( ras.gray_max_x >= 0 ) +- { +- Long last_pixel = ras.target.width - 1; +- Int last_cell = last_pixel >> 2; +- Int last_bit = last_pixel & 3; +- Bool over = 0; +- +- Int c1, c2; +- PByte bit, bit2; +- +- +- if ( ras.gray_max_x >= last_cell && last_bit != 3 ) +- { +- ras.gray_max_x = last_cell - 1; +- over = 1; +- } +- +- if ( ras.gray_min_x < 0 ) +- ras.gray_min_x = 0; +- +- bit = ras.bTarget + ras.gray_min_x; +- bit2 = bit + ras.gray_width; +- +- c1 = ras.gray_max_x - ras.gray_min_x; +- +- while ( c1 >= 0 ) +- { +- c2 = count[*bit] + count[*bit2]; +- +- if ( c2 ) +- { +- pix[0] = grays[(c2 >> 12) & 0x000F]; +- pix[1] = grays[(c2 >> 8 ) & 0x000F]; +- pix[2] = grays[(c2 >> 4 ) & 0x000F]; +- pix[3] = grays[ c2 & 0x000F]; +- +- *bit = 0; +- *bit2 = 0; +- } +- +- bit++; +- bit2++; +- pix += 4; +- c1--; +- } +- +- if ( over ) +- { +- c2 = count[*bit] + count[*bit2]; +- if ( c2 ) +- { +- switch ( last_bit ) +- { +- case 2: +- pix[2] = grays[(c2 >> 4 ) & 0x000F]; +- case 1: +- pix[1] = grays[(c2 >> 8 ) & 0x000F]; +- default: +- pix[0] = grays[(c2 >> 12) & 0x000F]; +- } +- +- *bit = 0; +- *bit2 = 0; +- } +- } +- } +- +- ras.traceOfs = 0; +- ras.traceG += ras.traceIncr; +- +- ras.gray_min_x = 32000; +- ras.gray_max_x = -32000; +- } +- } +- +- +- static void +- Horizontal_Gray_Sweep_Span( RAS_ARGS Short y, +- FT_F26Dot6 x1, +- FT_F26Dot6 x2, +- PProfile left, +- PProfile right ) +- { +- /* nothing, really */ +- FT_UNUSED_RASTER; +- FT_UNUSED( y ); +- FT_UNUSED( x1 ); +- FT_UNUSED( x2 ); +- FT_UNUSED( left ); +- FT_UNUSED( right ); +- } +- +- +- static void +- Horizontal_Gray_Sweep_Drop( RAS_ARGS Short y, +- FT_F26Dot6 x1, +- FT_F26Dot6 x2, +- PProfile left, +- PProfile right ) +- { +- Long e1, e2; +- PByte pixel; +- +- +- /* During the horizontal sweep, we only take care of drop-outs */ +- +- e1 = CEILING( x1 ); +- e2 = FLOOR ( x2 ); +- +- if ( e1 > e2 ) +- { +- Int dropOutControl = left->flags & 7; +- +- +- if ( e1 == e2 + ras.precision ) +- { +- switch ( dropOutControl ) +- { +- case 0: /* simple drop-outs including stubs */ +- e1 = e2; +- break; +- +- case 4: /* smart drop-outs including stubs */ +- e1 = FLOOR( ( x1 + x2 - 1 ) / 2 + ras.precision_half ); +- break; +- +- case 1: /* simple drop-outs excluding stubs */ +- case 5: /* smart drop-outs excluding stubs */ +- /* see Vertical_Sweep_Drop for details */ +- +- /* rightmost stub test */ +- if ( left->next == right && left->height <= 0 ) +- return; +- +- /* leftmost stub test */ +- if ( right->next == left && left->start == y ) +- return; +- +- if ( dropOutControl == 1 ) +- e1 = e2; +- else +- e1 = FLOOR( ( x1 + x2 - 1 ) / 2 + ras.precision_half ); +- +- break; +- +- default: /* modes 2, 3, 6, 7 */ +- return; /* no drop-out control */ +- } +- } +- else +- return; +- } +- +- if ( e1 >= 0 ) +- { +- Byte color; +- +- +- if ( x2 - x1 >= ras.precision_half ) +- color = ras.grays[2]; +- else +- color = ras.grays[1]; +- +- e1 = TRUNC( e1 ) / 2; +- if ( e1 < ras.target.rows ) +- { +- pixel = ras.gTarget - e1 * ras.target.pitch + y / 2; +- if ( ras.target.pitch > 0 ) +- pixel += ( ras.target.rows - 1 ) * ras.target.pitch; +- +- if ( pixel[0] == ras.grays[0] ) +- pixel[0] = color; +- } +- } +- } +- +- +-#endif /* FT_RASTER_OPTION_ANTI_ALIASING */ +- +- + /*************************************************************************/ + /* */ + /* Generic Sweep Drawing routine */ +@@ -3332,118 +2978,10 @@ + } + + +-#ifdef FT_RASTER_OPTION_ANTI_ALIASING +- +- /*************************************************************************/ +- /* */ +- /* <Function> */ +- /* Render_Gray_Glyph */ +- /* */ +- /* <Description> */ +- /* Render a glyph with grayscaling. Sub-banding if needed. */ +- /* */ +- /* <Return> */ +- /* FreeType error code. 0 means success. */ +- /* */ +- FT_LOCAL_DEF( FT_Error ) +- Render_Gray_Glyph( RAS_ARG ) +- { +- Long pixel_width; +- FT_Error error; +- +- +- Set_High_Precision( RAS_VARS ras.outline.flags & +- FT_OUTLINE_HIGH_PRECISION ); +- ras.scale_shift = ras.precision_shift + 1; +- +- if ( ras.outline.flags & FT_OUTLINE_IGNORE_DROPOUTS ) +- ras.dropOutControl = 2; +- else +- { +- if ( ras.outline.flags & FT_OUTLINE_SMART_DROPOUTS ) +- ras.dropOutControl = 4; +- else +- ras.dropOutControl = 0; +- +- if ( !( ras.outline.flags & FT_OUTLINE_INCLUDE_STUBS ) ) +- ras.dropOutControl += 1; +- } +- +- ras.second_pass = !( ras.outline.flags & FT_OUTLINE_SINGLE_PASS ); +- +- /* Vertical Sweep */ +- +- ras.band_top = 0; +- ras.band_stack[0].y_min = 0; +- ras.band_stack[0].y_max = 2 * ras.target.rows - 1; +- +- ras.bWidth = ras.gray_width; +- pixel_width = 2 * ( ( ras.target.width + 3 ) >> 2 ); +- +- if ( ras.bWidth > pixel_width ) +- ras.bWidth = pixel_width; +- +- ras.bWidth = ras.bWidth * 8; +- ras.bTarget = (Byte*)ras.gray_lines; +- ras.gTarget = (Byte*)ras.target.buffer; +- +- ras.Proc_Sweep_Init = Vertical_Gray_Sweep_Init; +- ras.Proc_Sweep_Span = Vertical_Sweep_Span; +- ras.Proc_Sweep_Drop = Vertical_Sweep_Drop; +- ras.Proc_Sweep_Step = Vertical_Gray_Sweep_Step; +- +- error = Render_Single_Pass( RAS_VARS 0 ); +- if ( error ) +- return error; +- +- /* Horizontal Sweep */ +- if ( ras.second_pass && ras.dropOutControl != 2 ) +- { +- ras.Proc_Sweep_Init = Horizontal_Sweep_Init; +- ras.Proc_Sweep_Span = Horizontal_Gray_Sweep_Span; +- ras.Proc_Sweep_Drop = Horizontal_Gray_Sweep_Drop; +- ras.Proc_Sweep_Step = Horizontal_Sweep_Step; +- +- ras.band_top = 0; +- ras.band_stack[0].y_min = 0; +- ras.band_stack[0].y_max = ras.target.width * 2 - 1; +- +- error = Render_Single_Pass( RAS_VARS 1 ); +- if ( error ) +- return error; +- } +- +- return Raster_Err_None; +- } +- +-#else /* !FT_RASTER_OPTION_ANTI_ALIASING */ +- +- FT_LOCAL_DEF( FT_Error ) +- Render_Gray_Glyph( RAS_ARG ) +- { +- FT_UNUSED_RASTER; +- +- return FT_THROW( Unsupported ); +- } +- +-#endif /* !FT_RASTER_OPTION_ANTI_ALIASING */ +- +- + static void + ft_black_init( black_PRaster raster ) + { +-#ifdef FT_RASTER_OPTION_ANTI_ALIASING +- FT_UInt n; +- +- +- /* set default 5-levels gray palette */ +- for ( n = 0; n < 5; n++ ) +- raster->grays[n] = n * 255 / 4; +- +- raster->gray_width = RASTER_GRAY_LINES / 2; +-#else + FT_UNUSED( raster ); +-#endif + } + + +@@ -3547,26 +3085,10 @@ + unsigned long mode, + const char* palette ) + { +-#ifdef FT_RASTER_OPTION_ANTI_ALIASING +- +- if ( mode == FT_MAKE_TAG( 'p', 'a', 'l', '5' ) ) +- { +- /* set 5-levels gray palette */ +- raster->grays[0] = palette[0]; +- raster->grays[1] = palette[1]; +- raster->grays[2] = palette[2]; +- raster->grays[3] = palette[3]; +- raster->grays[4] = palette[4]; +- } +- +-#else +- + FT_UNUSED( raster ); + FT_UNUSED( mode ); + FT_UNUSED( palette ); + +-#endif +- + return 0; + } + +@@ -3619,16 +3141,8 @@ + worker->buff = (PLong) raster->buffer; + worker->sizeBuff = worker->buff + + raster->buffer_size / sizeof ( Long ); +-#ifdef FT_RASTER_OPTION_ANTI_ALIASING +- worker->grays = raster->grays; +- worker->gray_width = raster->gray_width; +- +- FT_MEM_ZERO( worker->gray_lines, worker->gray_width * 2 ); +-#endif + +- return ( params->flags & FT_RASTER_FLAG_AA ) +- ? Render_Gray_Glyph( RAS_VAR ) +- : Render_Glyph( RAS_VAR ); ++ return Render_Glyph( RAS_VAR ); + } + + +diff --git a/src/raster/ftrend1.c b/src/raster/ftrend1.c +index aa7f6d5..8a468a8 100644 +--- a/src/raster/ftrend1.c ++++ b/src/raster/ftrend1.c +@@ -120,38 +120,11 @@ + } + + /* check rendering mode */ +-#ifndef FT_CONFIG_OPTION_PIC + if ( mode != FT_RENDER_MODE_MONO ) + { + /* raster1 is only capable of producing monochrome bitmaps */ +- if ( render->clazz == &ft_raster1_renderer_class ) +- return FT_THROW( Cannot_Render_Glyph ); ++ return FT_THROW( Cannot_Render_Glyph ); + } +- else +- { +- /* raster5 is only capable of producing 5-gray-levels bitmaps */ +- if ( render->clazz == &ft_raster5_renderer_class ) +- return FT_THROW( Cannot_Render_Glyph ); +- } +-#else /* FT_CONFIG_OPTION_PIC */ +- /* When PIC is enabled, we cannot get to the class object */ +- /* so instead we check the final character in the class name */ +- /* ("raster5" or "raster1"). Yes this is a hack. */ +- /* The "correct" thing to do is have different render function */ +- /* for each of the classes. */ +- if ( mode != FT_RENDER_MODE_MONO ) +- { +- /* raster1 is only capable of producing monochrome bitmaps */ +- if ( render->clazz->root.module_name[6] == '1' ) +- return FT_THROW( Cannot_Render_Glyph ); +- } +- else +- { +- /* raster5 is only capable of producing 5-gray-levels bitmaps */ +- if ( render->clazz->root.module_name[6] == '5' ) +- return FT_THROW( Cannot_Render_Glyph ); +- } +-#endif /* FT_CONFIG_OPTION_PIC */ + + outline = &slot->outline; + +@@ -272,35 +245,4 @@ + ) + + +- /* This renderer is _NOT_ part of the default modules; you will need */ +- /* to register it by hand in your application. It should only be */ +- /* used for backwards-compatibility with FT 1.x anyway. */ +- /* */ +- FT_DEFINE_RENDERER( ft_raster5_renderer_class, +- +- FT_MODULE_RENDERER, +- sizeof ( FT_RendererRec ), +- +- "raster5", +- 0x10000L, +- 0x20000L, +- +- 0, /* module specific interface */ +- +- (FT_Module_Constructor)ft_raster1_init, +- (FT_Module_Destructor) 0, +- (FT_Module_Requester) 0 +- , +- +- FT_GLYPH_FORMAT_OUTLINE, +- +- (FT_Renderer_RenderFunc) ft_raster1_render, +- (FT_Renderer_TransformFunc)ft_raster1_transform, +- (FT_Renderer_GetCBoxFunc) ft_raster1_get_cbox, +- (FT_Renderer_SetModeFunc) ft_raster1_set_mode, +- +- (FT_Raster_Funcs*) &FT_STANDARD_RASTER_GET +- ) +- +- + /* END */ +-- +2.2.2 + +From a773c3041e024975241d110989f617f032c4b7e3 Mon Sep 17 00:00:00 2001 +From: Behdad Esfahbod <behdad@behdad.org> +Date: Wed, 14 Jan 2015 18:16:20 +0100 +Subject: [PATCH] [raster] Allocate render pool for mono rasterizer on the + stack. + +Instead of using the `render_pool' member of `FT_Library' that is +provided down to the rasterizer, completely ignore that and allocate +needed objects on the stack instead. + +With this patch, rasterizing glyphs from different faces from +different threads doesn't crash in the monochrome rasterizer. + +* src/raster/ftraster.c (black_TRaster): Remove `buffer', +`buffer_size', and `worker' members. + +(ft_black_render): Create `buffer' locally. +(ft_black_reset): Updated. +--- + ChangeLog | 17 +++++++++++++++++ + src/raster/ftraster.c | 39 ++++++++++----------------------------- + 2 files changed, 27 insertions(+), 29 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index 5808490..51d05a2 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,5 +1,22 @@ + 2015-01-14 Behdad Esfahbod <behdad@behdad.org> + ++ [raster] Allocate render pool for mono rasterizer on the stack. ++ ++ Instead of using the `render_pool' member of `FT_Library' that is ++ provided down to the rasterizer, completely ignore that and allocate ++ needed objects on the stack instead. ++ ++ With this patch, rasterizing glyphs from different faces from ++ different threads doesn't crash in the monochrome rasterizer. ++ ++ * src/raster/ftraster.c (black_TRaster): Remove `buffer', ++ `buffer_size', and `worker' members. ++ ++ (ft_black_render): Create `buffer' locally. ++ (ft_black_reset): Updated. ++ ++2015-01-14 Behdad Esfahbod <behdad@behdad.org> ++ + [raster] Remove 5-level gray AA mode from monochrome rasterizer. + + It was off by default and couldn't be turned on at runtime. And the +diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c +index 54fb579..552a568 100644 +--- a/src/raster/ftraster.c ++++ b/src/raster/ftraster.c +@@ -530,10 +530,7 @@ + + typedef struct black_TRaster_ + { +- char* buffer; +- long buffer_size; + void* memory; +- black_PWorker worker; + + } black_TRaster, *black_PRaster; + +@@ -3058,25 +3055,9 @@ + char* pool_base, + long pool_size ) + { +- if ( raster ) +- { +- if ( pool_base && pool_size >= (long)sizeof ( black_TWorker ) + 2048 ) +- { +- black_PWorker worker = (black_PWorker)pool_base; +- +- +- raster->buffer = pool_base + ( ( sizeof ( *worker ) + 7 ) & ~7 ); +- raster->buffer_size = (long)( pool_base + pool_size - +- (char*)raster->buffer ); +- raster->worker = worker; +- } +- else +- { +- raster->buffer = NULL; +- raster->buffer_size = 0; +- raster->worker = NULL; +- } +- } ++ FT_UNUSED( raster ); ++ FT_UNUSED( pool_base ); ++ FT_UNUSED( pool_size ); + } + + +@@ -3099,10 +3080,13 @@ + { + const FT_Outline* outline = (const FT_Outline*)params->source; + const FT_Bitmap* target_map = params->target; +- black_PWorker worker; + ++ black_TWorker worker[1]; + +- if ( !raster || !raster->buffer || !raster->buffer_size ) ++ Long buffer[FT_MAX( FT_RENDER_POOL_SIZE, 2048 ) / sizeof ( Long )]; ++ ++ ++ if ( !raster ) + return FT_THROW( Not_Ini ); + + if ( !outline ) +@@ -3119,8 +3103,6 @@ + outline->contours[outline->n_contours - 1] + 1 ) + return FT_THROW( Invalid ); + +- worker = raster->worker; +- + /* this version of the raster does not support direct rendering, sorry */ + if ( params->flags & FT_RASTER_FLAG_DIRECT ) + return FT_THROW( Unsupported ); +@@ -3138,9 +3120,8 @@ + ras.outline = *outline; + ras.target = *target_map; + +- worker->buff = (PLong) raster->buffer; +- worker->sizeBuff = worker->buff + +- raster->buffer_size / sizeof ( Long ); ++ worker->buff = buffer; ++ worker->sizeBuff = (&buffer)[1]; /* Points to right after buffer. */ + + return Render_Glyph( RAS_VAR ); + } +-- +2.2.2 + +From 6dfdaf4d99e435250eb18582fa60b59dc3bbc427 Mon Sep 17 00:00:00 2001 +From: Behdad Esfahbod <behdad@behdad.org> +Date: Wed, 14 Jan 2015 18:21:13 +0100 +Subject: [PATCH] [base] Do not reorder library->renderers upon use. + +Instead of keeping `library->renderers' in a MRU order, just leave +it as-is. The MRU machinery wasn't thread-safe. + +With this patch, rasterizing glyphs from different faces from +different threads doesn't fail choosing rasterizer +(FT_Err_Cannot_Render_Glyph). + +Easiest to see that crash was to add a `printf' (or otherwise let +thread yield in FT_Throw with debugging enabled). + +* src/base/ftobjs.c (FT_Render_Glyph_Internal), src/base/ftoutln.c +(FT_Outline_Render): Don't call `FT_Set_Renderer'. +--- + ChangeLog | 17 +++++++++++++++++ + src/base/ftobjs.c | 13 +------------ + src/base/ftoutln.c | 7 ------- + 3 files changed, 18 insertions(+), 19 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index 51d05a2..b1b6ba8 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,5 +1,22 @@ + 2015-01-14 Behdad Esfahbod <behdad@behdad.org> + ++ [base] Do not reorder library->renderers upon use. ++ ++ Instead of keeping `library->renderers' in a MRU order, just leave ++ it as-is. The MRU machinery wasn't thread-safe. ++ ++ With this patch, rasterizing glyphs from different faces from ++ different threads doesn't fail choosing rasterizer ++ (FT_Err_Cannot_Render_Glyph). ++ ++ Easiest to see that crash was to add a `printf' (or otherwise let ++ thread yield in FT_Throw with debugging enabled). ++ ++ * src/base/ftobjs.c (FT_Render_Glyph_Internal), src/base/ftoutln.c ++ (FT_Outline_Render): Don't call `FT_Set_Renderer'. ++ ++2015-01-14 Behdad Esfahbod <behdad@behdad.org> ++ + [raster] Allocate render pool for mono rasterizer on the stack. + + Instead of using the `render_pool' member of `FT_Library' that is +diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c +index ee15a01..6d685b5 100644 +--- a/src/base/ftobjs.c ++++ b/src/base/ftobjs.c +@@ -4084,8 +4084,7 @@ + + default: + { +- FT_ListNode node = 0; +- FT_Bool update = 0; ++ FT_ListNode node = 0; + + + /* small shortcut for the very common case */ +@@ -4112,16 +4111,6 @@ + /* now, look for another renderer that supports the same */ + /* format. */ + renderer = FT_Lookup_Renderer( library, slot->format, &node ); +- update = 1; +- } +- +- /* if we changed the current renderer for the glyph image format */ +- /* we need to select it as the next current one */ +- if ( !error && update && renderer ) +- { +- error = FT_Set_Renderer( library, renderer, 0, 0 ); +- if ( error ) +- break; + } + } + } +diff --git a/src/base/ftoutln.c b/src/base/ftoutln.c +index 8749d64..45f074c 100644 +--- a/src/base/ftoutln.c ++++ b/src/base/ftoutln.c +@@ -612,7 +612,6 @@ + FT_Raster_Params* params ) + { + FT_Error error; +- FT_Bool update = FALSE; + FT_Renderer renderer; + FT_ListNode node; + +@@ -646,14 +645,8 @@ + /* format */ + renderer = FT_Lookup_Renderer( library, FT_GLYPH_FORMAT_OUTLINE, + &node ); +- update = TRUE; + } + +- /* if we changed the current renderer for the glyph image format */ +- /* we need to select it as the next current one */ +- if ( !error && update && renderer ) +- error = FT_Set_Renderer( library, renderer, 0, 0 ); +- + return error; + } + +-- +2.2.2 + +From 516342534468565abf0dafbd5bbb2891bfc19990 Mon Sep 17 00:00:00 2001 +From: Behdad Esfahbod <behdad@behdad.org> +Date: Wed, 14 Jan 2015 18:30:59 +0100 +Subject: [PATCH] [base] Don't allocate `library->raster_pool' anymore. + +It's unused after the following commits: + + [raster] Allocate render pool for mono rasterizer on the stack. + [raster] Remove 5-level gray AA mode from monochrome rasterizer. + +The value of FT_RENDER_POOL_SIZE still serves the purpose it used to +serve, which is, to adjust the pool size. But the pool is now +allocated on the stack on demand. + +* src/base/ftobjs.c (FT_New_Library, FT_Done_Library): Implement. +--- + ChangeLog | 15 +++++++++++++++ + devel/ftoption.h | 4 ---- + include/config/ftoption.h | 4 ---- + include/ftimage.h | 13 ++++++------- + src/base/ftobjs.c | 13 +++---------- + 5 files changed, 24 insertions(+), 25 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index b1b6ba8..6aca637 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,5 +1,20 @@ + 2015-01-14 Behdad Esfahbod <behdad@behdad.org> + ++ [base] Don't allocate `library->raster_pool' anymore. ++ ++ It's unused after the following commits: ++ ++ [raster] Allocate render pool for mono rasterizer on the stack. ++ [raster] Remove 5-level gray AA mode from monochrome rasterizer. ++ ++ The value of FT_RENDER_POOL_SIZE still serves the purpose it used to ++ serve, which is, to adjust the pool size. But the pool is now ++ allocated on the stack on demand. ++ ++ * src/base/ftobjs.c (FT_New_Library, FT_Done_Library): Implement. ++ ++2015-01-14 Behdad Esfahbod <behdad@behdad.org> ++ + [base] Do not reorder library->renderers upon use. + + Instead of keeping `library->renderers' in a MRU order, just leave +diff --git a/devel/ftoption.h b/devel/ftoption.h +index 5984601..3d0c77d 100644 +--- a/devel/ftoption.h ++++ b/devel/ftoption.h +@@ -378,10 +378,6 @@ FT_BEGIN_HEADER + /* The size in bytes of the render pool used by the scan-line converter */ + /* to do all of its work. */ + /* */ +- /* This must be greater than 4KByte if you use FreeType to rasterize */ +- /* glyphs; otherwise, you may set it to zero to avoid unnecessary */ +- /* allocation of the render pool. */ +- /* */ + #define FT_RENDER_POOL_SIZE 16384L + + +diff --git a/include/config/ftoption.h b/include/config/ftoption.h +index a40e88c..c85519d 100644 +--- a/include/config/ftoption.h ++++ b/include/config/ftoption.h +@@ -378,10 +378,6 @@ FT_BEGIN_HEADER + /* The size in bytes of the render pool used by the scan-line converter */ + /* to do all of its work. */ + /* */ +- /* This must be greater than 4KByte if you use FreeType to rasterize */ +- /* glyphs; otherwise, you may set it to zero to avoid unnecessary */ +- /* allocation of the render pool. */ +- /* */ + #define FT_RENDER_POOL_SIZE 16384L + + +diff --git a/include/ftimage.h b/include/ftimage.h +index 2f7ca2a..42815c0 100644 +--- a/include/ftimage.h ++++ b/include/ftimage.h +@@ -1078,10 +1078,10 @@ FT_BEGIN_HEADER + /* FT_Raster_ResetFunc */ + /* */ + /* <Description> */ +- /* FreeType provides an area of memory called the `render pool', */ +- /* available to all registered rasters. This pool can be freely used */ +- /* during a given scan-conversion but is shared by all rasters. Its */ +- /* content is thus transient. */ ++ /* FreeType used to provide an area of memory called the `render */ ++ /* pool' available to all registered rasters. This was not thread */ ++ /* safe however and now FreeType never allocates this pool. NULL */ ++ /* is always passed in as pool_base. */ + /* */ + /* This function is called each time the render pool changes, or just */ + /* after a new raster object is created. */ +@@ -1094,10 +1094,9 @@ FT_BEGIN_HEADER + /* pool_size :: The size in bytes of the render pool. */ + /* */ + /* <Note> */ +- /* Rasters can ignore the render pool and rely on dynamic memory */ ++ /* Rasters should ignore the render pool and rely on dynamic or stack */ + /* allocation if they want to (a handle to the memory allocator is */ +- /* passed to the raster constructor). However, this is not */ +- /* recommended for efficiency purposes. */ ++ /* passed to the raster constructor). */ + /* */ + typedef void + (*FT_Raster_ResetFunc)( FT_Raster raster, +diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c +index 6d685b5..ba5a24b 100644 +--- a/src/base/ftobjs.c ++++ b/src/base/ftobjs.c +@@ -4666,12 +4666,9 @@ + goto Fail; + #endif + +- /* allocate the render pool */ +- library->raster_pool_size = FT_RENDER_POOL_SIZE; +-#if FT_RENDER_POOL_SIZE > 0 +- if ( FT_ALLOC( library->raster_pool, FT_RENDER_POOL_SIZE ) ) +- goto Fail; +-#endif ++ /* we don't use raster_pool anymore. */ ++ library->raster_pool_size = 0; ++ library->raster_pool = NULL; + + library->version_major = FREETYPE_MAJOR; + library->version_minor = FREETYPE_MINOR; +@@ -4820,10 +4817,6 @@ + } + #endif + +- /* Destroy raster objects */ +- FT_FREE( library->raster_pool ); +- library->raster_pool_size = 0; +- + #ifdef FT_CONFIG_OPTION_PIC + /* Destroy pic container contents */ + ft_pic_container_destroy( library ); +-- +2.2.2 + +From 603292d7b0b2f391bcb11785a74a0b26fd727595 Mon Sep 17 00:00:00 2001 +From: Behdad Esfahbod <behdad@behdad.org> +Date: Wed, 14 Jan 2015 18:35:56 +0100 +Subject: [PATCH] [base] Don't initialize unused `driver->glyph_loader'. + +* src/base/ftobjs.c (Destroy_Driver): Don't call +`FT_GlyphLoader_Done'. +(FT_Add_Module): Don't call `FT_GlyphLoader_New'. +--- + ChangeLog | 8 ++++++++ + include/internal/ftobjs.h | 5 ++--- + src/base/ftobjs.c | 20 -------------------- + 3 files changed, 10 insertions(+), 23 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index 6aca637..62bb099 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,5 +1,13 @@ + 2015-01-14 Behdad Esfahbod <behdad@behdad.org> + ++ [base] Don't initialize unused `driver->glyph_loader'. ++ ++ * src/base/ftobjs.c (Destroy_Driver): Don't call ++ `FT_GlyphLoader_Done'. ++ (FT_Add_Module): Don't call `FT_GlyphLoader_New'. ++ ++2015-01-14 Behdad Esfahbod <behdad@behdad.org> ++ + [base] Don't allocate `library->raster_pool' anymore. + + It's unused after the following commits: +diff --git a/include/internal/ftobjs.h b/include/internal/ftobjs.h +index b45a5ed..2014a95 100644 +--- a/include/internal/ftobjs.h ++++ b/include/internal/ftobjs.h +@@ -740,9 +740,8 @@ FT_BEGIN_HEADER + /* faces_list :: The list of faces currently opened by this */ + /* driver. */ + /* */ +- /* glyph_loader :: The glyph loader for all faces managed by this */ +- /* driver. This object isn't defined for unscalable */ +- /* formats. */ ++ /* glyph_loader :: Unused. Used to be glyph loader for all faces */ ++ /* managed by this driver. */ + /* */ + typedef struct FT_DriverRec_ + { +diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c +index ba5a24b..d3a1209 100644 +--- a/src/base/ftobjs.c ++++ b/src/base/ftobjs.c +@@ -968,10 +968,6 @@ + (FT_List_Destructor)destroy_face, + driver->root.memory, + driver ); +- +- /* check whether we need to drop the driver's glyph loader */ +- if ( FT_DRIVER_USES_OUTLINES( driver ) ) +- FT_GlyphLoader_Done( driver->glyph_loader ); + } + + +@@ -4313,17 +4309,10 @@ + /* if the module is a font driver */ + if ( FT_MODULE_IS_DRIVER( module ) ) + { +- /* allocate glyph loader if needed */ + FT_Driver driver = FT_DRIVER( module ); + + + driver->clazz = (FT_Driver_Class)module->clazz; +- if ( FT_DRIVER_USES_OUTLINES( driver ) ) +- { +- error = FT_GlyphLoader_New( memory, &driver->glyph_loader ); +- if ( error ) +- goto Fail; +- } + } + + if ( clazz->module_init ) +@@ -4340,15 +4329,6 @@ + return error; + + Fail: +- if ( FT_MODULE_IS_DRIVER( module ) ) +- { +- FT_Driver driver = FT_DRIVER( module ); +- +- +- if ( FT_DRIVER_USES_OUTLINES( driver ) ) +- FT_GlyphLoader_Done( driver->glyph_loader ); +- } +- + if ( FT_MODULE_IS_RENDERER( module ) ) + { + FT_Renderer renderer = FT_RENDERER( module ); +-- +2.2.2 + +From b2ba68665f93be2b03b6b27aa30dc9f190cf3fef Mon Sep 17 00:00:00 2001 +From: Behdad Esfahbod <behdad@behdad.org> +Date: Wed, 14 Jan 2015 18:43:13 +0100 +Subject: [PATCH] [smooth] Fix uninitialized memory access. + +Looks like `ras.span_y' could always be used without initialization. +This was never detected by valgrind before because the library-wide +`raster_pool' was used for the worker object and `raster_pool' was +originally zero'ed. But subsequent reuses of it were using `span_y' +uninitialized. With the recent change to not use `render_pool' and +allocate worker and buffer on the stack, valgrind now detects this +uninitialized access. + +* src/smooth/ftgrays.c (gray_raster_render): Initialize +`ras.span_y'. +--- + ChangeLog | 15 +++++++++++++++ + src/smooth/ftgrays.c | 1 + + 2 files changed, 16 insertions(+) + +diff --git a/ChangeLog b/ChangeLog +index 62bb099..ee91e3e 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,5 +1,20 @@ + 2015-01-14 Behdad Esfahbod <behdad@behdad.org> + ++ [smooth] Fix uninitialized memory access. ++ ++ Looks like `ras.span_y' could always be used without initialization. ++ This was never detected by valgrind before because the library-wide ++ `raster_pool' was used for the worker object and `raster_pool' was ++ originally zero'ed. But subsequent reuses of it were using `span_y' ++ uninitialized. With the recent change to not use `render_pool' and ++ allocate worker and buffer on the stack, valgrind now detects this ++ uninitialized access. ++ ++ * src/smooth/ftgrays.c (gray_raster_render): Initialize ++ `ras.span_y'. ++ ++2015-01-14 Behdad Esfahbod <behdad@behdad.org> ++ + [base] Don't initialize unused `driver->glyph_loader'. + + * src/base/ftobjs.c (Destroy_Driver): Don't call +diff --git a/src/smooth/ftgrays.c b/src/smooth/ftgrays.c +index 65eb64c..4240b01 100644 +--- a/src/smooth/ftgrays.c ++++ b/src/smooth/ftgrays.c +@@ -1985,6 +1985,7 @@ typedef ptrdiff_t FT_PtrDist; + ras.invalid = 1; + ras.band_size = band_size; + ras.num_gray_spans = 0; ++ ras.span_y = 0; + + if ( params->flags & FT_RASTER_FLAG_DIRECT ) + { +-- +2.2.2 + +From c242fe41ec634af32845cd17bcd1a0ee2653feb9 Mon Sep 17 00:00:00 2001 +From: Behdad Esfahbod <behdad@behdad.org> +Date: Wed, 14 Jan 2015 18:48:14 +0100 +Subject: [PATCH] [raster] Fix uninitialized memory access. + +Apparently `ras.cProfile' might be uninitialized. This will be the +case if `ras.top == ras.cProfile->offset', as can be seen in +`End_Profile'. The overshoot code introduced in a change `Fix B/W +rasterization of subglyphs with different drop-out modes.' (from +2009-06-18) violated this, accessing `ras.cProfile->flags' +unconditionally just before calling `End_Profile' (which then +detected that `cProfile' is uninitialized and didn't touch it). + +This was harmless, and was not detected by valgrind before because +the objects were allocated on the `raster_pool', which was always +initialized. With recent change to allocate raster buffers on the +stack, valgrind now reported this invalid access. + +* src/raster/ftraster.c (Convert_Glyph): Don't access an +uninitialized `cProfile'. +--- + ChangeLog | 20 ++++++++++++++++++++ + src/raster/ftraster.c | 3 ++- + 2 files changed, 22 insertions(+), 1 deletion(-) + +diff --git a/ChangeLog b/ChangeLog +index ee91e3e..72e4a7c 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,5 +1,25 @@ + 2015-01-14 Behdad Esfahbod <behdad@behdad.org> + ++ [raster] Fix uninitialized memory access. ++ ++ Apparently `ras.cProfile' might be uninitialized. This will be the ++ case if `ras.top == ras.cProfile->offset', as can be seen in ++ `End_Profile'. The overshoot code introduced in a change `Fix B/W ++ rasterization of subglyphs with different drop-out modes.' (from ++ 2009-06-18) violated this, accessing `ras.cProfile->flags' ++ unconditionally just before calling `End_Profile' (which then ++ detected that `cProfile' is uninitialized and didn't touch it). ++ ++ This was harmless, and was not detected by valgrind before because ++ the objects were allocated on the `raster_pool', which was always ++ initialized. With recent change to allocate raster buffers on the ++ stack, valgrind now reported this invalid access. ++ ++ * src/raster/ftraster.c (Convert_Glyph): Don't access an ++ uninitialized `cProfile'. ++ ++2015-01-14 Behdad Esfahbod <behdad@behdad.org> ++ + [smooth] Fix uninitialized memory access. + + Looks like `ras.span_y' could always be used without initialization. +diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c +index 552a568..2b182f7 100644 +--- a/src/raster/ftraster.c ++++ b/src/raster/ftraster.c +@@ -1982,7 +1982,8 @@ + /* to be drawn. */ + + lastProfile = ras.cProfile; +- if ( ras.cProfile->flags & Flow_Up ) ++ if ( ras.top != ras.cProfile->offset && ++ ( ras.cProfile->flags & Flow_Up ) ) + o = IS_TOP_OVERSHOOT( ras.lastY ); + else + o = IS_BOTTOM_OVERSHOOT( ras.lastY ); +-- +2.2.2 + +From ae6699f86c42d3f81626eca1833d0537356f196a Mon Sep 17 00:00:00 2001 +From: Behdad Esfahbod <behdad@behdad.org> +Date: Wed, 14 Jan 2015 18:55:39 +0100 +Subject: [PATCH] [autofit] Remove (unused) support for composite glyphs. + +We never have to deal with composite glyphs in the autohinter, as +those will be loaded into FORMAT_OUTLINE by the recursed +`FT_Load_Glyph' function. + +In the rare cases that FT_LOAD_NO_RECURSE is set, it will imply +FT_LOAD_NO_SCALE as per `FT_Load_Glyph', which then implies +FT_LOAD_NO_HINTING: + + /* resolve load flags dependencies */ + + if ( load_flags & FT_LOAD_NO_RECURSE ) + load_flags |= FT_LOAD_NO_SCALE | + FT_LOAD_IGNORE_TRANSFORM; + + if ( load_flags & FT_LOAD_NO_SCALE ) + { + load_flags |= FT_LOAD_NO_HINTING | + FT_LOAD_NO_BITMAP; + + load_flags &= ~FT_LOAD_RENDER; + } + +and as such the auto-hinter is never called. Thus, the recursion in +`af_loader_load_g' never actually happens. So remove the depth +counter as well. + +* src/autofit/afloader.c (af_loader_load_g): Remove `depth' +parameter. +<FT_GLYPH_FORMAT_COMPOSITE>: Remove associated code. +(af_loader_load_glyph): Updated. +--- + ChangeLog | 35 +++++++++++++ + src/autofit/afloader.c | 134 +++---------------------------------------------- + 2 files changed, 42 insertions(+), 127 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index 72e4a7c..ba8c3ee 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,5 +1,40 @@ + 2015-01-14 Behdad Esfahbod <behdad@behdad.org> + ++ [autofit] Remove (unused) support for composite glyphs. ++ ++ We never have to deal with composite glyphs in the autohinter, as ++ those will be loaded into FORMAT_OUTLINE by the recursed ++ `FT_Load_Glyph' function. ++ ++ In the rare cases that FT_LOAD_NO_RECURSE is set, it will imply ++ FT_LOAD_NO_SCALE as per `FT_Load_Glyph', which then implies ++ FT_LOAD_NO_HINTING: ++ ++ /* resolve load flags dependencies */ ++ ++ if ( load_flags & FT_LOAD_NO_RECURSE ) ++ load_flags |= FT_LOAD_NO_SCALE | ++ FT_LOAD_IGNORE_TRANSFORM; ++ ++ if ( load_flags & FT_LOAD_NO_SCALE ) ++ { ++ load_flags |= FT_LOAD_NO_HINTING | ++ FT_LOAD_NO_BITMAP; ++ ++ load_flags &= ~FT_LOAD_RENDER; ++ } ++ ++ and as such the auto-hinter is never called. Thus, the recursion in ++ `af_loader_load_g' never actually happens. So remove the depth ++ counter as well. ++ ++ * src/autofit/afloader.c (af_loader_load_g): Remove `depth' ++ parameter. ++ <FT_GLYPH_FORMAT_COMPOSITE>: Remove associated code. ++ (af_loader_load_glyph): Updated. ++ ++2015-01-14 Behdad Esfahbod <behdad@behdad.org> ++ + [raster] Fix uninitialized memory access. + + Apparently `ras.cProfile' might be uninitialized. This will be the +diff --git a/src/autofit/afloader.c b/src/autofit/afloader.c +index 612103c..a4c4968 100644 +--- a/src/autofit/afloader.c ++++ b/src/autofit/afloader.c +@@ -89,16 +89,17 @@ + } + + +- /* Load a single glyph component. This routine calls itself */ +- /* recursively, if necessary, and does the main work of */ +- /* `af_loader_load_glyph.' */ ++ /* Do the main work of `af_loader_load_glyph'. Note that we never */ ++ /* have to deal with composite glyphs as those get loaded into */ ++ /* FT_GLYPH_FORMAT_OUTLINE by the recursed `FT_Load_Glyph' function. */ ++ /* In the rare cases where FT_LOAD_NO_RECURSE is set, it implies */ ++ /* FT_LOAD_NO_SCALE and as such the auto-hinter is never called. */ + + static FT_Error + af_loader_load_g( AF_Loader loader, + AF_Scaler scaler, + FT_UInt glyph_index, +- FT_Int32 load_flags, +- FT_UInt depth ) ++ FT_Int32 load_flags ) + { + FT_Error error; + FT_Face face = loader->face; +@@ -265,133 +266,12 @@ + FT_GlyphLoader_Add( gloader ); + break; + +- case FT_GLYPH_FORMAT_COMPOSITE: +- { +- FT_UInt nn, num_subglyphs = slot->num_subglyphs; +- FT_UInt num_base_subgs, start_point; +- FT_SubGlyph subglyph; +- +- +- start_point = gloader->base.outline.n_points; +- +- /* first of all, copy the subglyph descriptors in the glyph loader */ +- error = FT_GlyphLoader_CheckSubGlyphs( gloader, num_subglyphs ); +- if ( error ) +- goto Exit; +- +- FT_ARRAY_COPY( gloader->current.subglyphs, +- slot->subglyphs, +- num_subglyphs ); +- +- gloader->current.num_subglyphs = num_subglyphs; +- num_base_subgs = gloader->base.num_subglyphs; +- +- /* now read each subglyph independently */ +- for ( nn = 0; nn < num_subglyphs; nn++ ) +- { +- FT_Vector pp1, pp2; +- FT_Pos x, y; +- FT_UInt num_points, num_new_points, num_base_points; +- +- +- /* gloader.current.subglyphs can change during glyph loading due */ +- /* to re-allocation -- we must recompute the current subglyph on */ +- /* each iteration */ +- subglyph = gloader->base.subglyphs + num_base_subgs + nn; +- +- pp1 = loader->pp1; +- pp2 = loader->pp2; +- +- num_base_points = gloader->base.outline.n_points; +- +- error = af_loader_load_g( loader, scaler, subglyph->index, +- load_flags, depth + 1 ); +- if ( error ) +- goto Exit; +- +- /* recompute subglyph pointer */ +- subglyph = gloader->base.subglyphs + num_base_subgs + nn; +- +- if ( !( subglyph->flags & FT_SUBGLYPH_FLAG_USE_MY_METRICS ) ) +- { +- loader->pp1 = pp1; +- loader->pp2 = pp2; +- } +- +- num_points = gloader->base.outline.n_points; +- num_new_points = num_points - num_base_points; +- +- /* now perform the transformation required for this subglyph */ +- +- if ( subglyph->flags & ( FT_SUBGLYPH_FLAG_SCALE | +- FT_SUBGLYPH_FLAG_XY_SCALE | +- FT_SUBGLYPH_FLAG_2X2 ) ) +- { +- FT_Vector* cur = gloader->base.outline.points + +- num_base_points; +- FT_Vector* limit = cur + num_new_points; +- +- +- for ( ; cur < limit; cur++ ) +- FT_Vector_Transform( cur, &subglyph->transform ); +- } +- +- /* apply offset */ +- +- if ( !( subglyph->flags & FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES ) ) +- { +- FT_Int k = subglyph->arg1; +- FT_UInt l = subglyph->arg2; +- FT_Vector* p1; +- FT_Vector* p2; +- +- +- if ( start_point + k >= num_base_points || +- l >= (FT_UInt)num_new_points ) +- { +- error = FT_THROW( Invalid_Composite ); +- goto Exit; +- } +- +- l += num_base_points; +- +- /* for now, only use the current point coordinates; */ +- /* we eventually may consider another approach */ +- p1 = gloader->base.outline.points + start_point + k; +- p2 = gloader->base.outline.points + start_point + l; +- +- x = p1->x - p2->x; +- y = p1->y - p2->y; +- } +- else +- { +- x = FT_MulFix( subglyph->arg1, hints->x_scale ) + hints->x_delta; +- y = FT_MulFix( subglyph->arg2, hints->y_scale ) + hints->y_delta; +- +- x = FT_PIX_ROUND( x ); +- y = FT_PIX_ROUND( y ); +- } +- +- { +- FT_Outline dummy = gloader->base.outline; +- +- +- dummy.points += num_base_points; +- dummy.n_points = (short)num_new_points; +- +- FT_Outline_Translate( &dummy, x, y ); +- } +- } +- } +- break; +- + default: + /* we don't support other formats (yet?) */ + error = FT_THROW( Unimplemented_Feature ); + } + + Hint_Metrics: +- if ( depth == 0 ) + { + FT_BBox bbox; + FT_Vector vvector; +@@ -558,7 +438,7 @@ + goto Exit; + } + +- error = af_loader_load_g( loader, &scaler, gindex, load_flags, 0 ); ++ error = af_loader_load_g( loader, &scaler, gindex, load_flags ); + } + } + Exit: +-- +2.2.2 + +From a4117fbda7399e201d4e438d301ab588d28dcea7 Mon Sep 17 00:00:00 2001 +From: Behdad Esfahbod <behdad@behdad.org> +Date: Wed, 14 Jan 2015 19:07:54 +0100 +Subject: [PATCH] [autofit] Reuse slot glyph loader. + +No need to create a new glyph loader; we can reuse the one from +`slot->internal->loader'. It's hard to tell why it was written that +way originally, but new code looks sound and correct to me, and +avoids lots of allocations. + +* src/autofit/afloader.c (af_loader_init): Change return type to +`void'. +Don't call `FT_GlyphLoader_New'. +(af_loader_reset): Don't call `FT_GlyphLoader_Rewind'. +(af_loader_load_g): Update code to use `internal->loader', which +doesn't need copying of data. + +* src/autofit/afloader.h (AF_LoaderRec): Remove `gloader' member. +Update prototype. + +* src/autofit/afmodule.c (af_autofitter_load_glyph): Updated. +--- + ChangeLog | 21 +++++++++++++++++++++ + src/autofit/afloader.c | 44 +++++--------------------------------------- + src/autofit/afloader.h | 3 +-- + src/autofit/afmodule.c | 4 +--- + 4 files changed, 28 insertions(+), 44 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index ba8c3ee..dcd6861 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,5 +1,26 @@ + 2015-01-14 Behdad Esfahbod <behdad@behdad.org> + ++ [autofit] Reuse slot glyph loader. ++ ++ No need to create a new glyph loader; we can reuse the one from ++ `slot->internal->loader'. It's hard to tell why it was written that ++ way originally, but new code looks sound and correct to me, and ++ avoids lots of allocations. ++ ++ * src/autofit/afloader.c (af_loader_init): Change return type to ++ `void'. ++ Don't call `FT_GlyphLoader_New'. ++ (af_loader_reset): Don't call `FT_GlyphLoader_Rewind'. ++ (af_loader_load_g): Update code to use `internal->loader', which ++ doesn't need copying of data. ++ ++ * src/autofit/afloader.h (AF_LoaderRec): Remove `gloader' member. ++ Update prototype. ++ ++ * src/autofit/afmodule.c (af_autofitter_load_glyph): Updated. ++ ++2015-01-14 Behdad Esfahbod <behdad@behdad.org> ++ + [autofit] Remove (unused) support for composite glyphs. + + We never have to deal with composite glyphs in the autohinter, as +diff --git a/src/autofit/afloader.c b/src/autofit/afloader.c +index a4c4968..c407c18 100644 +--- a/src/autofit/afloader.c ++++ b/src/autofit/afloader.c +@@ -26,7 +26,7 @@ + + /* Initialize glyph loader. */ + +- FT_LOCAL_DEF( FT_Error ) ++ FT_LOCAL_DEF( void ) + af_loader_init( AF_Loader loader, + FT_Memory memory ) + { +@@ -36,7 +36,6 @@ + #ifdef FT_DEBUG_AUTOFIT + _af_debug_hints = &loader->hints; + #endif +- return FT_GlyphLoader_New( memory, &loader->gloader ); + } + + +@@ -53,8 +52,6 @@ + loader->face = face; + loader->globals = (AF_FaceGlobals)face->autohint.data; + +- FT_GlyphLoader_Rewind( loader->gloader ); +- + if ( loader->globals == NULL ) + { + error = af_face_globals_new( face, &loader->globals, module ); +@@ -84,8 +81,6 @@ + #ifdef FT_DEBUG_AUTOFIT + _af_debug_hints = NULL; + #endif +- FT_GlyphLoader_Done( loader->gloader ); +- loader->gloader = NULL; + } + + +@@ -103,11 +98,11 @@ + { + FT_Error error; + FT_Face face = loader->face; +- FT_GlyphLoader gloader = loader->gloader; + AF_StyleMetrics metrics = loader->metrics; + AF_GlyphHints hints = &loader->hints; + FT_GlyphSlot slot = face->glyph; + FT_Slot_Internal internal = slot->internal; ++ FT_GlyphLoader gloader = internal->loader; + FT_Int32 flags; + + +@@ -139,29 +134,6 @@ + loader->trans_delta.x, + loader->trans_delta.y ); + +- /* copy the outline points in the loader's current */ +- /* extra points which are used to keep original glyph coordinates */ +- error = FT_GLYPHLOADER_CHECK_POINTS( gloader, +- slot->outline.n_points + 4, +- slot->outline.n_contours ); +- if ( error ) +- goto Exit; +- +- FT_ARRAY_COPY( gloader->current.outline.points, +- slot->outline.points, +- slot->outline.n_points ); +- +- FT_ARRAY_COPY( gloader->current.outline.contours, +- slot->outline.contours, +- slot->outline.n_contours ); +- +- FT_ARRAY_COPY( gloader->current.outline.tags, +- slot->outline.tags, +- slot->outline.n_points ); +- +- gloader->current.outline.n_points = slot->outline.n_points; +- gloader->current.outline.n_contours = slot->outline.n_contours; +- + /* compute original horizontal phantom points (and ignore */ + /* vertical ones) */ + loader->pp1.x = hints->x_delta; +@@ -187,7 +159,7 @@ + + if ( writing_system_class->style_hints_apply ) + writing_system_class->style_hints_apply( hints, +- &gloader->current.outline, ++ &gloader->base.outline, + metrics ); + } + +@@ -262,8 +234,6 @@ + slot->rsb_delta = loader->pp2.x - pp2x; + } + +- /* good, we simply add the glyph to our loader's base */ +- FT_GlyphLoader_Add( gloader ); + break; + + default: +@@ -346,18 +316,14 @@ + slot->metrics.horiAdvance = FT_PIX_ROUND( slot->metrics.horiAdvance ); + slot->metrics.vertAdvance = FT_PIX_ROUND( slot->metrics.vertAdvance ); + +- /* now copy outline into glyph slot */ +- FT_GlyphLoader_Rewind( internal->loader ); +- error = FT_GlyphLoader_CopyPoints( internal->loader, gloader ); +- if ( error ) +- goto Exit; +- ++#if 0 + /* reassign all outline fields except flags to protect them */ + slot->outline.n_contours = internal->loader->base.outline.n_contours; + slot->outline.n_points = internal->loader->base.outline.n_points; + slot->outline.points = internal->loader->base.outline.points; + slot->outline.tags = internal->loader->base.outline.tags; + slot->outline.contours = internal->loader->base.outline.contours; ++#endif + + slot->format = FT_GLYPH_FORMAT_OUTLINE; + } +diff --git a/src/autofit/afloader.h b/src/autofit/afloader.h +index 5987b27..3005d00 100644 +--- a/src/autofit/afloader.h ++++ b/src/autofit/afloader.h +@@ -41,7 +41,6 @@ FT_BEGIN_HEADER + AF_FaceGlobals globals; + + /* current glyph data */ +- FT_GlyphLoader gloader; + AF_GlyphHintsRec hints; + AF_StyleMetrics metrics; + FT_Bool transformed; +@@ -54,7 +53,7 @@ FT_BEGIN_HEADER + } AF_LoaderRec, *AF_Loader; + + +- FT_LOCAL( FT_Error ) ++ FT_LOCAL( void ) + af_loader_init( AF_Loader loader, + FT_Memory memory ); + +diff --git a/src/autofit/afmodule.c b/src/autofit/afmodule.c +index 77e4849..1eec5bb 100644 +--- a/src/autofit/afmodule.c ++++ b/src/autofit/afmodule.c +@@ -277,9 +277,7 @@ + FT_UNUSED( size ); + + +- error = af_loader_init( loader, module->root.library->memory ); +- if ( error ) +- return error; ++ af_loader_init( loader, module->root.library->memory ); + + error = af_loader_load_glyph( loader, module, slot->face, + glyph_index, load_flags ); +-- +2.2.2 + +From c27336567bf9ec18734506f68fc03e328c479bc9 Mon Sep 17 00:00:00 2001 +From: Behdad Esfahbod <behdad@behdad.org> +Date: Wed, 14 Jan 2015 19:16:12 +0100 +Subject: [PATCH] [autofit] Allocate hints object on the stack. + +This avoids one malloc per load. + +* src/autofit/afloader.h (AF_LoaderRec): Change type of `hints' to +`AF_GlyphHints'. +Update prototype. + +* src/autofit/afloader.c (af_loader_init): Use `AF_GlyphHints' +parameter instead of `FT_Memory'. +(af_loader_done): Directly reset `load_hints'. +(af_loader_load_g): Updated. + +* src/autofit/afmodule.c (af_autofitter_load_glyph): Use local +`hints' object. +--- + ChangeLog | 18 ++++++++++++++++++ + src/autofit/afloader.c | 15 +++++++-------- + src/autofit/afloader.h | 6 +++--- + src/autofit/afmodule.c | 11 ++++++++--- + 4 files changed, 36 insertions(+), 14 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index dcd6861..d2afb85 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,5 +1,23 @@ + 2015-01-14 Behdad Esfahbod <behdad@behdad.org> + ++ [autofit] Allocate hints object on the stack. ++ ++ This avoids one malloc per load. ++ ++ * src/autofit/afloader.h (AF_LoaderRec): Change type of `hints' to ++ `AF_GlyphHints'. ++ Update prototype. ++ ++ * src/autofit/afloader.c (af_loader_init): Use `AF_GlyphHints' ++ parameter instead of `FT_Memory'. ++ (af_loader_done): Directly reset `load_hints'. ++ (af_loader_load_g): Updated. ++ ++ * src/autofit/afmodule.c (af_autofitter_load_glyph): Use local ++ `hints' object. ++ ++2015-01-14 Behdad Esfahbod <behdad@behdad.org> ++ + [autofit] Reuse slot glyph loader. + + No need to create a new glyph loader; we can reuse the one from +diff --git a/src/autofit/afloader.c b/src/autofit/afloader.c +index c407c18..c6be5ac 100644 +--- a/src/autofit/afloader.c ++++ b/src/autofit/afloader.c +@@ -27,14 +27,14 @@ + /* Initialize glyph loader. */ + + FT_LOCAL_DEF( void ) +- af_loader_init( AF_Loader loader, +- FT_Memory memory ) ++ af_loader_init( AF_Loader loader, ++ AF_GlyphHints hints ) + { + FT_ZERO( loader ); + +- af_glyph_hints_init( &loader->hints, memory ); ++ loader->hints = hints; + #ifdef FT_DEBUG_AUTOFIT +- _af_debug_hints = &loader->hints; ++ _af_debug_hints = loader->hints; + #endif + } + +@@ -73,10 +73,9 @@ + FT_LOCAL_DEF( void ) + af_loader_done( AF_Loader loader ) + { +- af_glyph_hints_done( &loader->hints ); +- + loader->face = NULL; + loader->globals = NULL; ++ loader->hints = NULL; + + #ifdef FT_DEBUG_AUTOFIT + _af_debug_hints = NULL; +@@ -99,7 +98,7 @@ + FT_Error error; + FT_Face face = loader->face; + AF_StyleMetrics metrics = loader->metrics; +- AF_GlyphHints hints = &loader->hints; ++ AF_GlyphHints hints = loader->hints; + FT_GlyphSlot slot = face->glyph; + FT_Slot_Internal internal = slot->internal; + FT_GlyphLoader gloader = internal->loader; +@@ -398,7 +397,7 @@ + + if ( writing_system_class->style_hints_init ) + { +- error = writing_system_class->style_hints_init( &loader->hints, ++ error = writing_system_class->style_hints_init( loader->hints, + metrics ); + if ( error ) + goto Exit; +diff --git a/src/autofit/afloader.h b/src/autofit/afloader.h +index 3005d00..b7eff53 100644 +--- a/src/autofit/afloader.h ++++ b/src/autofit/afloader.h +@@ -41,7 +41,7 @@ FT_BEGIN_HEADER + AF_FaceGlobals globals; + + /* current glyph data */ +- AF_GlyphHintsRec hints; ++ AF_GlyphHints hints; + AF_StyleMetrics metrics; + FT_Bool transformed; + FT_Matrix trans_matrix; +@@ -54,8 +54,8 @@ FT_BEGIN_HEADER + + + FT_LOCAL( void ) +- af_loader_init( AF_Loader loader, +- FT_Memory memory ); ++ af_loader_init( AF_Loader loader, ++ AF_GlyphHints hints ); + + + FT_LOCAL( FT_Error ) +diff --git a/src/autofit/afmodule.c b/src/autofit/afmodule.c +index 1eec5bb..24e0228 100644 +--- a/src/autofit/afmodule.c ++++ b/src/autofit/afmodule.c +@@ -271,18 +271,23 @@ + FT_UInt glyph_index, + FT_Int32 load_flags ) + { +- FT_Error error = FT_Err_Ok; +- AF_LoaderRec loader[1]; ++ FT_Error error = FT_Err_Ok; ++ FT_Memory memory = module->root.library->memory; ++ ++ AF_GlyphHintsRec hints[1]; ++ AF_LoaderRec loader[1]; + + FT_UNUSED( size ); + + +- af_loader_init( loader, module->root.library->memory ); ++ af_glyph_hints_init( hints, memory ); ++ af_loader_init( loader, hints ); + + error = af_loader_load_glyph( loader, module, slot->face, + glyph_index, load_flags ); + + af_loader_done( loader ); ++ af_glyph_hints_done( hints ); + + return error; + } +-- +2.2.2 + +From 6f16b10019d7699aff4d5bbc64999a5fd1ce7457 Mon Sep 17 00:00:00 2001 +From: Behdad Esfahbod <behdad@behdad.org> +Date: Wed, 14 Jan 2015 19:26:49 +0100 +Subject: [PATCH] [autofit] Add embedded arrays for points and contours. + +This avoids at least two malloc calls for typical glyphs. + +* src/autofit/afhints.h (AF_POINTS_EMBEDDED, AF_CONTOURS_EMBEDDED): +New macros. +(AF_GlyphHintsRec): Add two arrays for contours and points. + +* src/autofit/afhints.c (af_glyph_hints_init, af_glyph_hints_done): +Updated. +(af_glyph_hints_reload): Only allocate data if number of contours or +points exceeds given threshold values. +--- + ChangeLog | 15 +++++++++++++++ + src/autofit/afhints.c | 27 +++++++++++++++++++++------ + src/autofit/afhints.h | 11 +++++++++++ + 3 files changed, 47 insertions(+), 6 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index d2afb85..0ee008e 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,5 +1,20 @@ + 2015-01-14 Behdad Esfahbod <behdad@behdad.org> + ++ [autofit] Add embedded arrays for points and contours. ++ ++ This avoids at least two malloc calls for typical glyphs. ++ ++ * src/autofit/afhints.h (AF_POINTS_EMBEDDED, AF_CONTOURS_EMBEDDED): ++ New macros. ++ (AF_GlyphHintsRec): Add two arrays for contours and points. ++ ++ * src/autofit/afhints.c (af_glyph_hints_init, af_glyph_hints_done): ++ Updated. ++ (af_glyph_hints_reload): Only allocate data if number of contours or ++ points exceeds given threshold values. ++ ++2015-01-14 Behdad Esfahbod <behdad@behdad.org> ++ + [autofit] Allocate hints object on the stack. + + This avoids one malloc per load. +diff --git a/src/autofit/afhints.c b/src/autofit/afhints.c +index f3cc50f..32e445b 100644 +--- a/src/autofit/afhints.c ++++ b/src/autofit/afhints.c +@@ -488,7 +488,8 @@ + af_glyph_hints_init( AF_GlyphHints hints, + FT_Memory memory ) + { +- FT_ZERO( hints ); ++ /* no need to initialize the embedded items */ ++ FT_MEM_ZERO( hints, sizeof ( *hints ) - sizeof ( hints->embedded ) ); + hints->memory = memory; + } + +@@ -521,13 +522,15 @@ + FT_FREE( axis->edges ); + } + +- FT_FREE( hints->contours ); ++ if ( hints->contours != hints->embedded.contours ) ++ FT_FREE( hints->contours ); + hints->max_contours = 0; + hints->num_contours = 0; + +- FT_FREE( hints->points ); +- hints->num_points = 0; ++ if ( hints->points != hints->embedded.points ) ++ FT_FREE( hints->points ); + hints->max_points = 0; ++ hints->num_points = 0; + + hints->memory = NULL; + } +@@ -572,8 +575,14 @@ + /* first of all, reallocate the contours array if necessary */ + new_max = (FT_UInt)outline->n_contours; + old_max = hints->max_contours; +- if ( new_max > old_max ) ++ ++ if ( new_max <= AF_CONTOURS_EMBEDDED ) ++ hints->contours = hints->embedded.contours; ++ else if ( new_max > old_max ) + { ++ if ( hints->contours == hints->embedded.contours ) ++ hints->contours = NULL; ++ + new_max = ( new_max + 3 ) & ~3; /* round up to a multiple of 4 */ + + if ( FT_RENEW_ARRAY( hints->contours, old_max, new_max ) ) +@@ -589,8 +598,14 @@ + */ + new_max = (FT_UInt)( outline->n_points + 2 ); + old_max = hints->max_points; +- if ( new_max > old_max ) ++ ++ if ( new_max <= AF_POINTS_EMBEDDED ) ++ hints->points = hints->embedded.points; ++ else if ( new_max > old_max ) + { ++ if ( hints->points == hints->embedded.points ) ++ hints->points = NULL; ++ + new_max = ( new_max + 2 + 7 ) & ~7; /* round up to a multiple of 8 */ + + if ( FT_RENEW_ARRAY( hints->points, old_max, new_max ) ) +diff --git a/src/autofit/afhints.h b/src/autofit/afhints.h +index 92101de..01e9d70 100644 +--- a/src/autofit/afhints.h ++++ b/src/autofit/afhints.h +@@ -324,6 +324,9 @@ FT_BEGIN_HEADER + } AF_AxisHintsRec, *AF_AxisHints; + + ++#define AF_POINTS_EMBEDDED 96 /* number of embedded points */ ++#define AF_CONTOURS_EMBEDDED 8 /* number of embedded contours */ ++ + typedef struct AF_GlyphHintsRec_ + { + FT_Memory memory; +@@ -352,6 +355,14 @@ FT_BEGIN_HEADER + FT_Pos xmin_delta; /* used for warping */ + FT_Pos xmax_delta; + ++ /* Two arrays to avoid allocation penalty. */ ++ /* The `embedded' structure must be the last element! */ ++ struct ++ { ++ AF_Point contours[AF_CONTOURS_EMBEDDED]; ++ AF_PointRec points[AF_POINTS_EMBEDDED]; ++ } embedded; ++ + } AF_GlyphHintsRec; + + +-- +2.2.2 + +From 56ddafa01ce251d2f1f3adde3b0f72dd8ff7a405 Mon Sep 17 00:00:00 2001 +From: Behdad Esfahbod <behdad@behdad.org> +Date: Wed, 14 Jan 2015 19:36:02 +0100 +Subject: [PATCH] [autofit] Add embedded array of segments and edges. + +Avoids multiple mallocs per typical glyphs. + +With this and recent changes to avoid mallocs, the thread-safe +stack-based loader is now as fast as the previous model that had one +cached singleton. + +* src/autofit/afhints.h (AF_SEGMENTS_EMBEDDED, AF_EDGES_EMBEDDED): +New macros. +(AF_AxisHintsRec): Add two arrays for segments and edges. + +* src/autofit/afhints.c (af_axis_hints_new_segment): Only allocate +data if number of segments exceeds given threshold value. +(af_axis_hints_new_edge): Only allocate data if number of edges +exceeds given threshold value. +(af_glyph_hints_done): Updated. +--- + ChangeLog | 20 +++++++++++++++++++ + src/autofit/afhints.c | 54 +++++++++++++++++++++++++++++++++++++++++++-------- + src/autofit/afhints.h | 10 ++++++++++ + 3 files changed, 76 insertions(+), 8 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index 0ee008e..6eaa010 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,5 +1,25 @@ + 2015-01-14 Behdad Esfahbod <behdad@behdad.org> + ++ [autofit] Add embedded array of segments and edges. ++ ++ Avoids multiple mallocs per typical glyphs. ++ ++ With this and recent changes to avoid mallocs, the thread-safe ++ stack-based loader is now as fast as the previous model that had one ++ cached singleton. ++ ++ * src/autofit/afhints.h (AF_SEGMENTS_EMBEDDED, AF_EDGES_EMBEDDED): ++ New macros. ++ (AF_AxisHintsRec): Add two arrays for segments and edges. ++ ++ * src/autofit/afhints.c (af_axis_hints_new_segment): Only allocate ++ data if number of segments exceeds given threshold value. ++ (af_axis_hints_new_edge): Only allocate data if number of edges ++ exceeds given threshold value. ++ (af_glyph_hints_done): Updated. ++ ++2015-01-14 Behdad Esfahbod <behdad@behdad.org> ++ + [autofit] Add embedded arrays for points and contours. + + This avoids at least two malloc calls for typical glyphs. +diff --git a/src/autofit/afhints.c b/src/autofit/afhints.c +index 32e445b..eb3b4ff 100644 +--- a/src/autofit/afhints.c ++++ b/src/autofit/afhints.c +@@ -43,7 +43,15 @@ + AF_Segment segment = NULL; + + +- if ( axis->num_segments >= axis->max_segments ) ++ if ( axis->num_segments < AF_SEGMENTS_EMBEDDED ) ++ { ++ if ( axis->segments == NULL ) ++ { ++ axis->segments = axis->embedded.segments; ++ axis->max_segments = AF_SEGMENTS_EMBEDDED; ++ } ++ } ++ else if ( axis->num_segments >= axis->max_segments ) + { + FT_Int old_max = axis->max_segments; + FT_Int new_max = old_max; +@@ -60,8 +68,18 @@ + if ( new_max < old_max || new_max > big_max ) + new_max = big_max; + +- if ( FT_RENEW_ARRAY( axis->segments, old_max, new_max ) ) +- goto Exit; ++ if ( axis->segments == axis->embedded.segments ) ++ { ++ if ( FT_NEW_ARRAY( axis->segments, new_max ) ) ++ goto Exit; ++ ft_memcpy( axis->segments, axis->embedded.segments, ++ sizeof ( axis->embedded.segments ) ); ++ } ++ else ++ { ++ if ( FT_RENEW_ARRAY( axis->segments, old_max, new_max ) ) ++ goto Exit; ++ } + + axis->max_segments = new_max; + } +@@ -89,7 +107,15 @@ + AF_Edge edges; + + +- if ( axis->num_edges >= axis->max_edges ) ++ if ( axis->num_edges < AF_EDGES_EMBEDDED ) ++ { ++ if ( axis->edges == NULL ) ++ { ++ axis->edges = axis->embedded.edges; ++ axis->max_edges = AF_EDGES_EMBEDDED; ++ } ++ } ++ else if ( axis->num_edges >= axis->max_edges ) + { + FT_Int old_max = axis->max_edges; + FT_Int new_max = old_max; +@@ -106,8 +132,18 @@ + if ( new_max < old_max || new_max > big_max ) + new_max = big_max; + +- if ( FT_RENEW_ARRAY( axis->edges, old_max, new_max ) ) +- goto Exit; ++ if ( axis->edges == axis->embedded.edges ) ++ { ++ if ( FT_NEW_ARRAY( axis->edges, new_max ) ) ++ goto Exit; ++ ft_memcpy( axis->edges, axis->embedded.edges, ++ sizeof ( axis->embedded.edges ) ); ++ } ++ else ++ { ++ if ( FT_RENEW_ARRAY( axis->edges, old_max, new_max ) ) ++ goto Exit; ++ } + + axis->max_edges = new_max; + } +@@ -515,11 +551,13 @@ + + axis->num_segments = 0; + axis->max_segments = 0; +- FT_FREE( axis->segments ); ++ if ( axis->segments != axis->embedded.segments ) ++ FT_FREE( axis->segments ); + + axis->num_edges = 0; + axis->max_edges = 0; +- FT_FREE( axis->edges ); ++ if ( axis->edges != axis->embedded.edges ) ++ FT_FREE( axis->edges ); + } + + if ( hints->contours != hints->embedded.contours ) +diff --git a/src/autofit/afhints.h b/src/autofit/afhints.h +index 01e9d70..4796466 100644 +--- a/src/autofit/afhints.h ++++ b/src/autofit/afhints.h +@@ -305,6 +305,8 @@ FT_BEGIN_HEADER + + } AF_EdgeRec; + ++#define AF_SEGMENTS_EMBEDDED 18 /* number of embedded segments */ ++#define AF_EDGES_EMBEDDED 12 /* number of embedded edges */ + + typedef struct AF_AxisHintsRec_ + { +@@ -321,6 +323,14 @@ FT_BEGIN_HEADER + + AF_Direction major_dir; /* either vertical or horizontal */ + ++ /* two arrays to avoid allocation penalty */ ++ struct ++ { ++ AF_SegmentRec segments[AF_SEGMENTS_EMBEDDED]; ++ AF_EdgeRec edges[AF_EDGES_EMBEDDED]; ++ } embedded; ++ ++ + } AF_AxisHintsRec, *AF_AxisHints; + + +-- +2.2.2 + +From 48c86628deafc87a23a1dc92d3a073fe30b1f1bb Mon Sep 17 00:00:00 2001 +From: Behdad Esfahbod <behdad@behdad.org> +Date: Wed, 14 Jan 2015 19:38:36 +0100 +Subject: [PATCH] * src/autofit/afmodule.c (af_autofitter_done): Fix compiler + warning. + +--- + ChangeLog | 4 ++++ + src/autofit/afmodule.c | 2 +- + 2 files changed, 5 insertions(+), 1 deletion(-) + +diff --git a/ChangeLog b/ChangeLog +index 6eaa010..0ae7f74 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,5 +1,9 @@ + 2015-01-14 Behdad Esfahbod <behdad@behdad.org> + ++ * src/autofit/afmodule.c (af_autofitter_done): Fix compiler warning. ++ ++2015-01-14 Behdad Esfahbod <behdad@behdad.org> ++ + [autofit] Add embedded array of segments and edges. + + Avoids multiple mallocs per typical glyphs. +diff --git a/src/autofit/afmodule.c b/src/autofit/afmodule.c +index 24e0228..6ed8b02 100644 +--- a/src/autofit/afmodule.c ++++ b/src/autofit/afmodule.c +@@ -260,7 +260,7 @@ + FT_CALLBACK_DEF( void ) + af_autofitter_done( FT_Module ft_module ) /* AF_Module */ + { +- AF_Module module = (AF_Module)ft_module; ++ FT_UNUSED( ft_module ); + } + + +-- +2.2.2 + +From 4eff854c27728aa21751af2c4f3c5f0afe83ebd1 Mon Sep 17 00:00:00 2001 +From: Werner Lemberg <wl@gnu.org> +Date: Wed, 14 Jan 2015 20:06:19 +0100 +Subject: [PATCH] * docs/CHANGES: Updated, using a description from Behdad. + +--- + ChangeLog | 4 ++++ + docs/CHANGES | 25 +++++++++++++++++++++++++ + include/freetype.h | 19 +++++++++++++++---- + 3 files changed, 44 insertions(+), 4 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index 0ae7f74..f68af52 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,3 +1,7 @@ ++2015-01-14 Werner Lemberg <wl@gnu.org> ++ ++ * docs/CHANGES: Updated, using a description from Behdad. ++ + 2015-01-14 Behdad Esfahbod <behdad@behdad.org> + + * src/autofit/afmodule.c (af_autofitter_done): Fix compiler warning. +diff --git a/docs/CHANGES b/docs/CHANGES +index bbc3110..1d2d339 100644 +--- a/docs/CHANGES ++++ b/docs/CHANGES +@@ -1,4 +1,29 @@ + ++CHANGES BETWEEN 2.5.5 and 2.5.6 ++ ++ II. IMPORTANT CHANGES ++ ++ - Behdad Esfahbod contributed code for improved thread-safety, ++ which results in the following model. ++ ++ * An `FT_Face' object can only be safely used from one thread at ++ a time. ++ ++ * An `FT_Library' object can now be used without modification ++ from multiple threads at the same time. ++ ++ * `FT_Face' creation and destruction with the same `FT_Library' ++ object can only be done from one thread at a time. ++ ++ One can use a single `FT_Library' object across threads as long ++ as a mutex lock is used around `FT_New_Face' and `FT_Done_Face'. ++ Any calls to `FT_Load_Glyph' and similar API are safe and do not ++ need the lock to be held as long as the same `FT_Face' is not ++ used from multiple threads at the same time. ++ ++ ++====================================================================== ++ + CHANGES BETWEEN 2.5.4 and 2.5.5 + + I. IMPORTANT BUG FIXES +diff --git a/include/freetype.h b/include/freetype.h +index 27fd44b..1022719 100644 +--- a/include/freetype.h ++++ b/include/freetype.h +@@ -394,8 +394,11 @@ FT_BEGIN_HEADER + /* It also embeds a memory manager (see @FT_Memory), as well as a */ + /* scan-line converter object (see @FT_Raster). */ + /* */ +- /* In multi-threaded applications, make sure that the same FT_Library */ +- /* object or any of its children doesn't get accessed in parallel. */ ++ /* In multi-threaded applications it is easiest to use one */ ++ /* `FT_Library' object per thread. In case this is too cumbersome, */ ++ /* a single `FT_Library' object across threads is possible also */ ++ /* (since FreeType version 2.5.6), as long as a mutex lock is used */ ++ /* around @FT_New_Face and @FT_Done_Face. */ + /* */ + /* <Note> */ + /* Library objects are normally created by @FT_Init_FreeType, and */ +@@ -477,6 +480,14 @@ FT_BEGIN_HEADER + /* */ + /* Use @FT_Done_Face to destroy it (along with its slot and sizes). */ + /* */ ++ /* An `FT_Face' object can only be safely used from one thread at a */ ++ /* time. Similarly, creation and destruction of `FT_Face' with the */ ++ /* same @FT_Library object can only be done from one thread at a */ ++ /* time. On the other hand, functions like @FT_Load_Glyph and its */ ++ /* siblings are thread-safe and do not need the lock to be held as */ ++ /* long as the same `FT_Face' object is not used from multiple */ ++ /* threads at the same time. */ ++ /* */ + /* <Also> */ + /* See @FT_FaceRec for the publicly accessible fields of a given face */ + /* object. */ +@@ -1769,8 +1780,8 @@ FT_BEGIN_HEADER + /* use @FT_New_Library instead, followed by a call to */ + /* @FT_Add_Default_Modules (or a series of calls to @FT_Add_Module). */ + /* */ +- /* For multi-threading applications each thread should have its own */ +- /* FT_Library object. */ ++ /* See the documentation of @FT_Library and @FT_Face for */ ++ /* multi-threading issues. */ + /* */ + /* If you need reference-counting (cf. @FT_Reference_Library), use */ + /* @FT_New_Library and @FT_Done_Library. */ +-- +2.2.2 + +From f796cf6c6bfead0f527cd79329f26d4ec7ab43d4 Mon Sep 17 00:00:00 2001 +From: Werner Lemberg <wl@gnu.org> +Date: Sat, 17 Jan 2015 20:11:10 +0100 +Subject: [PATCH] Normalize copyright notice format. + +--- + docs/INSTALL | 4 ++-- + docs/INSTALL.CROSS | 4 ++-- + include/ftcid.h | 3 ++- + include/internal/services/svcid.h | 3 ++- + include/internal/services/svttglyf.h | 3 ++- + src/base/ftcid.c | 3 ++- + src/base/ftpatent.c | 3 ++- + src/gxvalid/gxvalid.c | 3 ++- + src/gxvalid/gxvalid.h | 3 ++- + src/gxvalid/gxvbsln.c | 3 ++- + src/gxvalid/gxvcommn.c | 4 ++-- + src/gxvalid/gxvcommn.h | 4 ++-- + src/gxvalid/gxverror.h | 4 ++-- + src/gxvalid/gxvfeat.h | 3 ++- + src/gxvalid/gxvfgen.c | 3 ++- + src/gxvalid/gxvjust.c | 3 ++- + src/gxvalid/gxvkern.c | 4 ++-- + src/gxvalid/gxvlcar.c | 3 ++- + src/gxvalid/gxvmod.c | 4 ++-- + src/gxvalid/gxvmod.h | 3 ++- + src/gxvalid/gxvmort.c | 3 ++- + src/gxvalid/gxvmort.h | 3 ++- + src/gxvalid/gxvmort0.c | 3 ++- + src/gxvalid/gxvmort1.c | 3 ++- + src/gxvalid/gxvmort2.c | 3 ++- + src/gxvalid/gxvmort4.c | 3 ++- + src/gxvalid/gxvmort5.c | 3 ++- + src/gxvalid/gxvmorx.h | 3 ++- + src/gxvalid/gxvmorx0.c | 3 ++- + src/gxvalid/gxvmorx1.c | 3 ++- + src/gxvalid/gxvmorx2.c | 3 ++- + src/gxvalid/gxvmorx4.c | 3 ++- + src/gxvalid/gxvmorx5.c | 3 ++- + src/gxvalid/gxvopbd.c | 3 ++- + src/gxvalid/gxvprop.c | 3 ++- + src/gxvalid/gxvtrak.c | 3 ++- + src/gxvalid/module.mk | 6 +++--- + src/gxvalid/rules.mk | 3 ++- + src/lzw/ftzopen.c | 3 ++- + src/lzw/ftzopen.h | 3 ++- + src/sfnt/pngshim.c | 3 ++- + src/sfnt/pngshim.h | 3 ++- + src/truetype/ttgload.c | 2 +- + src/truetype/ttinterp.c | 4 ++-- + src/truetype/ttobjs.c | 2 +- + src/type42/t42drivr.h | 3 ++- + src/type42/t42objs.c | 4 ++-- + src/type42/t42objs.h | 3 ++- + src/type42/t42parse.h | 3 ++- + src/type42/t42types.h | 3 ++- + 50 files changed, 99 insertions(+), 61 deletions(-) + +diff --git a/docs/INSTALL b/docs/INSTALL +index 456b76d..5bf8d65 100644 +--- a/docs/INSTALL ++++ b/docs/INSTALL +@@ -75,8 +75,8 @@ II. Custom builds of the library + + ---------------------------------------------------------------------- + +-Copyright 2000-2008, 2010-2011, 2013 +-by David Turner, Robert Wilhelm, and Werner Lemberg. ++Copyright 2000-2008, 2010-2011, 2013 by ++David Turner, Robert Wilhelm, and Werner Lemberg. + + This file is part of the FreeType project, and may only be used, + modified, and distributed under the terms of the FreeType project +diff --git a/docs/INSTALL.CROSS b/docs/INSTALL.CROSS +index d372adc..8745613 100644 +--- a/docs/INSTALL.CROSS ++++ b/docs/INSTALL.CROSS +@@ -163,8 +163,8 @@ procedure. + + ---------------------------------------------------------------------- + +-Copyright 2006, 2008, 2012, 2014 by suzuki toshiya +-David Turner, Robert Wilhelm, and Werner Lemberg. ++Copyright 2006, 2008, 2012, 2014 by ++suzuki toshiya, David Turner, Robert Wilhelm, and Werner Lemberg. + + + This file is part of the FreeType project, and may only be used, +diff --git a/include/ftcid.h b/include/ftcid.h +index 17550d8..01b4832 100644 +--- a/include/ftcid.h ++++ b/include/ftcid.h +@@ -4,7 +4,8 @@ + /* */ + /* FreeType API for accessing CID font information (specification). */ + /* */ +-/* Copyright 2007, 2009 by Dereg Clegg, Michael Toftdal. */ ++/* Copyright 2007, 2009 by */ ++/* Dereg Clegg and Michael Toftdal. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ + /* modified, and distributed under the terms of the FreeType project */ +diff --git a/include/internal/services/svcid.h b/include/internal/services/svcid.h +index 6be3f93..e0944d6 100644 +--- a/include/internal/services/svcid.h ++++ b/include/internal/services/svcid.h +@@ -4,7 +4,8 @@ + /* */ + /* The FreeType CID font services (specification). */ + /* */ +-/* Copyright 2007, 2009, 2012 by Derek Clegg, Michael Toftdal. */ ++/* Copyright 2007, 2009, 2012 by */ ++/* Derek Clegg and Michael Toftdal. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ + /* modified, and distributed under the terms of the FreeType project */ +diff --git a/include/internal/services/svttglyf.h b/include/internal/services/svttglyf.h +index 369eb84..3ba8a1f 100644 +--- a/include/internal/services/svttglyf.h ++++ b/include/internal/services/svttglyf.h +@@ -4,7 +4,8 @@ + /* */ + /* The FreeType TrueType glyph service. */ + /* */ +-/* Copyright 2007, 2009, 2012 by David Turner. */ ++/* Copyright 2007, 2009, 2012 by */ ++/* David Turner. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ + /* modified, and distributed under the terms of the FreeType project */ +diff --git a/src/base/ftcid.c b/src/base/ftcid.c +index 741879d..747039c 100644 +--- a/src/base/ftcid.c ++++ b/src/base/ftcid.c +@@ -4,7 +4,8 @@ + /* */ + /* FreeType API for accessing CID font information. */ + /* */ +-/* Copyright 2007, 2009, 2013 by Derek Clegg, Michael Toftdal. */ ++/* Copyright 2007, 2009, 2013 by */ ++/* Derek Clegg and Michael Toftdal. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ + /* modified, and distributed under the terms of the FreeType project */ +diff --git a/src/base/ftpatent.c b/src/base/ftpatent.c +index 82b42f0..dc2470d 100644 +--- a/src/base/ftpatent.c ++++ b/src/base/ftpatent.c +@@ -5,7 +5,8 @@ + /* FreeType API for checking patented TrueType bytecode instructions */ + /* (body). */ + /* */ +-/* Copyright 2007, 2008, 2010 by David Turner. */ ++/* Copyright 2007, 2008, 2010 by */ ++/* David Turner. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ + /* modified, and distributed under the terms of the FreeType project */ +diff --git a/src/gxvalid/gxvalid.c b/src/gxvalid/gxvalid.c +index bc36e67..f066355 100644 +--- a/src/gxvalid/gxvalid.c ++++ b/src/gxvalid/gxvalid.c +@@ -4,7 +4,8 @@ + /* */ + /* FreeType validator for TrueTypeGX/AAT tables (body only). */ + /* */ +-/* Copyright 2005 by suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ ++/* Copyright 2005 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, */ +diff --git a/src/gxvalid/gxvalid.h b/src/gxvalid/gxvalid.h +index 27be9ec..3ed646c 100644 +--- a/src/gxvalid/gxvalid.h ++++ b/src/gxvalid/gxvalid.h +@@ -4,7 +4,8 @@ + /* */ + /* TrueTyeeGX/AAT table validation (specification only). */ + /* */ +-/* Copyright 2005 by suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ ++/* Copyright 2005 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, */ +diff --git a/src/gxvalid/gxvbsln.c b/src/gxvalid/gxvbsln.c +index d165118..03ef6cc 100644 +--- a/src/gxvalid/gxvbsln.c ++++ b/src/gxvalid/gxvbsln.c +@@ -4,7 +4,8 @@ + /* */ + /* TrueTypeGX/AAT bsln table validation (body). */ + /* */ +-/* Copyright 2004, 2005 by suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ ++/* Copyright 2004, 2005 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, */ +diff --git a/src/gxvalid/gxvcommn.c b/src/gxvalid/gxvcommn.c +index 8e72a72..c6cdb9e 100644 +--- a/src/gxvalid/gxvcommn.c ++++ b/src/gxvalid/gxvcommn.c +@@ -4,8 +4,8 @@ + /* */ + /* TrueTypeGX/AAT common tables validation (body). */ + /* */ +-/* Copyright 2004, 2005, 2009, 2010, 2013 */ +-/* by suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ ++/* Copyright 2004, 2005, 2009, 2010, 2013 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, */ +diff --git a/src/gxvalid/gxvcommn.h b/src/gxvalid/gxvcommn.h +index f114345..6594165 100644 +--- a/src/gxvalid/gxvcommn.h ++++ b/src/gxvalid/gxvcommn.h +@@ -4,8 +4,8 @@ + /* */ + /* TrueTypeGX/AAT common tables validation (specification). */ + /* */ +-/* Copyright 2004, 2005, 2012, 2014 */ +-/* by suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ ++/* Copyright 2004, 2005, 2012, 2014 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, */ +diff --git a/src/gxvalid/gxverror.h b/src/gxvalid/gxverror.h +index c573b72..d33de4a 100644 +--- a/src/gxvalid/gxverror.h ++++ b/src/gxvalid/gxverror.h +@@ -4,8 +4,8 @@ + /* */ + /* TrueTypeGX/AAT validation module error codes (specification only). */ + /* */ +-/* Copyright 2004, 2005, 2012-2013 */ +-/* by suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ ++/* Copyright 2004, 2005, 2012-2013 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, */ +diff --git a/src/gxvalid/gxvfeat.h b/src/gxvalid/gxvfeat.h +index 049d23a..636fa66 100644 +--- a/src/gxvalid/gxvfeat.h ++++ b/src/gxvalid/gxvfeat.h +@@ -4,7 +4,8 @@ + /* */ + /* TrueTypeGX/AAT feat table validation (specification). */ + /* */ +-/* Copyright 2004, 2005 by suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ ++/* Copyright 2004, 2005 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, */ +diff --git a/src/gxvalid/gxvfgen.c b/src/gxvalid/gxvfgen.c +index e48778a..06e3f9c 100644 +--- a/src/gxvalid/gxvfgen.c ++++ b/src/gxvalid/gxvfgen.c +@@ -5,7 +5,8 @@ + /* Generate feature registry data for gxv `feat' validator. */ + /* This program is derived from gxfeatreg.c in gxlayout. */ + /* */ +-/* Copyright 2004, 2005, 2006 by Masatake YAMATO and Redhat K.K. */ ++/* Copyright 2004, 2005, 2006 by */ ++/* Masatake YAMATO and Redhat K.K. */ + /* */ + /* This file may only be used, */ + /* modified, and distributed under the terms of the FreeType project */ +diff --git a/src/gxvalid/gxvjust.c b/src/gxvalid/gxvjust.c +index 24c26a5..9610697 100644 +--- a/src/gxvalid/gxvjust.c ++++ b/src/gxvalid/gxvjust.c +@@ -4,7 +4,8 @@ + /* */ + /* TrueTypeGX/AAT just table validation (body). */ + /* */ +-/* Copyright 2005, 2014 by suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ ++/* Copyright 2005, 2014 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, */ +diff --git a/src/gxvalid/gxvkern.c b/src/gxvalid/gxvkern.c +index 787e3db..c346619 100644 +--- a/src/gxvalid/gxvkern.c ++++ b/src/gxvalid/gxvkern.c +@@ -4,8 +4,8 @@ + /* */ + /* TrueTypeGX/AAT kern table validation (body). */ + /* */ +-/* Copyright 2004-2007, 2013 */ +-/* by suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ ++/* Copyright 2004-2007, 2013 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, */ +diff --git a/src/gxvalid/gxvlcar.c b/src/gxvalid/gxvlcar.c +index 48308b0..c0542e6 100644 +--- a/src/gxvalid/gxvlcar.c ++++ b/src/gxvalid/gxvlcar.c +@@ -4,7 +4,8 @@ + /* */ + /* TrueTypeGX/AAT lcar table validation (body). */ + /* */ +-/* Copyright 2004, 2005 by suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ ++/* Copyright 2004, 2005 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, */ +diff --git a/src/gxvalid/gxvmod.c b/src/gxvalid/gxvmod.c +index 278d476..19865c0 100644 +--- a/src/gxvalid/gxvmod.c ++++ b/src/gxvalid/gxvmod.c +@@ -4,8 +4,8 @@ + /* */ + /* FreeType's TrueTypeGX/AAT validation module implementation (body). */ + /* */ +-/* Copyright 2004-2006, 2013 */ +-/* by suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ ++/* Copyright 2004-2006, 2013 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, */ +diff --git a/src/gxvalid/gxvmod.h b/src/gxvalid/gxvmod.h +index 22732ba..6f303a1 100644 +--- a/src/gxvalid/gxvmod.h ++++ b/src/gxvalid/gxvmod.h +@@ -5,7 +5,8 @@ + /* FreeType's TrueTypeGX/AAT validation module implementation */ + /* (specification). */ + /* */ +-/* Copyright 2004, 2005 by suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ ++/* Copyright 2004, 2005 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, */ +diff --git a/src/gxvalid/gxvmort.c b/src/gxvalid/gxvmort.c +index 55ff5a8..52bfade 100644 +--- a/src/gxvalid/gxvmort.c ++++ b/src/gxvalid/gxvmort.c +@@ -4,7 +4,8 @@ + /* */ + /* TrueTypeGX/AAT mort table validation (body). */ + /* */ +-/* Copyright 2005, 2013 by suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ ++/* Copyright 2005, 2013 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, */ +diff --git a/src/gxvalid/gxvmort.h b/src/gxvalid/gxvmort.h +index 8e62e52..9bc4a13 100644 +--- a/src/gxvalid/gxvmort.h ++++ b/src/gxvalid/gxvmort.h +@@ -4,7 +4,8 @@ + /* */ + /* TrueTypeGX/AAT common definition for mort table (specification). */ + /* */ +-/* Copyright 2004, 2005 by suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ ++/* Copyright 2004, 2005 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, */ +diff --git a/src/gxvalid/gxvmort0.c b/src/gxvalid/gxvmort0.c +index f19016e..c66655e 100644 +--- a/src/gxvalid/gxvmort0.c ++++ b/src/gxvalid/gxvmort0.c +@@ -5,7 +5,8 @@ + /* TrueTypeGX/AAT mort table validation */ + /* body for type0 (Indic Script Rearrangement) subtable. */ + /* */ +-/* Copyright 2005 by suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ ++/* Copyright 2005 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, */ +diff --git a/src/gxvalid/gxvmort1.c b/src/gxvalid/gxvmort1.c +index 0189504..902dd7a 100644 +--- a/src/gxvalid/gxvmort1.c ++++ b/src/gxvalid/gxvmort1.c +@@ -5,7 +5,8 @@ + /* TrueTypeGX/AAT mort table validation */ + /* body for type1 (Contextual Substitution) subtable. */ + /* */ +-/* Copyright 2005, 2007 by suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ ++/* Copyright 2005, 2007 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, */ +diff --git a/src/gxvalid/gxvmort2.c b/src/gxvalid/gxvmort2.c +index 099ffd4..0b0d423 100644 +--- a/src/gxvalid/gxvmort2.c ++++ b/src/gxvalid/gxvmort2.c +@@ -5,7 +5,8 @@ + /* TrueTypeGX/AAT mort table validation */ + /* body for type2 (Ligature Substitution) subtable. */ + /* */ +-/* Copyright 2005 by suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ ++/* Copyright 2005 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, */ +diff --git a/src/gxvalid/gxvmort4.c b/src/gxvalid/gxvmort4.c +index 9e86af4..3189a63 100644 +--- a/src/gxvalid/gxvmort4.c ++++ b/src/gxvalid/gxvmort4.c +@@ -5,7 +5,8 @@ + /* TrueTypeGX/AAT mort table validation */ + /* body for type4 (Non-Contextual Glyph Substitution) subtable. */ + /* */ +-/* Copyright 2005 by suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ ++/* Copyright 2005 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, */ +diff --git a/src/gxvalid/gxvmort5.c b/src/gxvalid/gxvmort5.c +index 9498b10..49eb44f 100644 +--- a/src/gxvalid/gxvmort5.c ++++ b/src/gxvalid/gxvmort5.c +@@ -5,7 +5,8 @@ + /* TrueTypeGX/AAT mort table validation */ + /* body for type5 (Contextual Glyph Insertion) subtable. */ + /* */ +-/* Copyright 2005 by suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ ++/* Copyright 2005 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, */ +diff --git a/src/gxvalid/gxvmorx.h b/src/gxvalid/gxvmorx.h +index 9ed907a..be3334e 100644 +--- a/src/gxvalid/gxvmorx.h ++++ b/src/gxvalid/gxvmorx.h +@@ -4,7 +4,8 @@ + /* */ + /* TrueTypeGX/AAT common definition for morx table (specification). */ + /* */ +-/* Copyright 2005 by suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ ++/* Copyright 2005 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, */ +diff --git a/src/gxvalid/gxvmorx0.c b/src/gxvalid/gxvmorx0.c +index db165f4..c42e732 100644 +--- a/src/gxvalid/gxvmorx0.c ++++ b/src/gxvalid/gxvmorx0.c +@@ -5,7 +5,8 @@ + /* TrueTypeGX/AAT morx table validation */ + /* body for type0 (Indic Script Rearrangement) subtable. */ + /* */ +-/* Copyright 2005 by suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ ++/* Copyright 2005 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, */ +diff --git a/src/gxvalid/gxvmorx1.c b/src/gxvalid/gxvmorx1.c +index 49f53d1..039f500 100644 +--- a/src/gxvalid/gxvmorx1.c ++++ b/src/gxvalid/gxvmorx1.c +@@ -5,7 +5,8 @@ + /* TrueTypeGX/AAT morx table validation */ + /* body for type1 (Contextual Substitution) subtable. */ + /* */ +-/* Copyright 2005, 2007 by suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ ++/* Copyright 2005, 2007 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, */ +diff --git a/src/gxvalid/gxvmorx2.c b/src/gxvalid/gxvmorx2.c +index e44445d..94e2767 100644 +--- a/src/gxvalid/gxvmorx2.c ++++ b/src/gxvalid/gxvmorx2.c +@@ -5,7 +5,8 @@ + /* TrueTypeGX/AAT morx table validation */ + /* body for type2 (Ligature Substitution) subtable. */ + /* */ +-/* Copyright 2005, 2013 by suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ ++/* Copyright 2005, 2013 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, */ +diff --git a/src/gxvalid/gxvmorx4.c b/src/gxvalid/gxvmorx4.c +index 68ab678..f6de8b4 100644 +--- a/src/gxvalid/gxvmorx4.c ++++ b/src/gxvalid/gxvmorx4.c +@@ -5,7 +5,8 @@ + /* TrueTypeGX/AAT morx table validation */ + /* body for "morx" type4 (Non-Contextual Glyph Substitution) subtable. */ + /* */ +-/* Copyright 2005 by suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ ++/* Copyright 2005 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, */ +diff --git a/src/gxvalid/gxvmorx5.c b/src/gxvalid/gxvmorx5.c +index 5e095dd..88ca59f 100644 +--- a/src/gxvalid/gxvmorx5.c ++++ b/src/gxvalid/gxvmorx5.c +@@ -5,7 +5,8 @@ + /* TrueTypeGX/AAT morx table validation */ + /* body for type5 (Contextual Glyph Insertion) subtable. */ + /* */ +-/* Copyright 2005, 2007 by suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ ++/* Copyright 2005, 2007 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, */ +diff --git a/src/gxvalid/gxvopbd.c b/src/gxvalid/gxvopbd.c +index ab0cd72..34c48f4 100644 +--- a/src/gxvalid/gxvopbd.c ++++ b/src/gxvalid/gxvopbd.c +@@ -4,7 +4,8 @@ + /* */ + /* TrueTypeGX/AAT opbd table validation (body). */ + /* */ +-/* Copyright 2004, 2005 by suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ ++/* Copyright 2004, 2005 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, */ +diff --git a/src/gxvalid/gxvprop.c b/src/gxvalid/gxvprop.c +index aa5c8ee..0bb7ace 100644 +--- a/src/gxvalid/gxvprop.c ++++ b/src/gxvalid/gxvprop.c +@@ -4,7 +4,8 @@ + /* */ + /* TrueTypeGX/AAT prop table validation (body). */ + /* */ +-/* Copyright 2004, 2005 by suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ ++/* Copyright 2004, 2005 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, */ +diff --git a/src/gxvalid/gxvtrak.c b/src/gxvalid/gxvtrak.c +index 3ec1a56..2c8e1e1 100644 +--- a/src/gxvalid/gxvtrak.c ++++ b/src/gxvalid/gxvtrak.c +@@ -4,7 +4,8 @@ + /* */ + /* TrueTypeGX/AAT trak table validation (body). */ + /* */ +-/* Copyright 2004, 2005 by suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ ++/* Copyright 2004, 2005 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, */ +diff --git a/src/gxvalid/module.mk b/src/gxvalid/module.mk +index 9fd098e..0d6b5d9 100644 +--- a/src/gxvalid/module.mk ++++ b/src/gxvalid/module.mk +@@ -2,9 +2,9 @@ + # FreeType 2 gxvalid module definition + # + +-# Copyright 2004, 2005, 2006 +-# by suzuki toshiya, Masatake YAMATO, Red Hat K.K., +-# David Turner, Robert Wilhelm, and Werner Lemberg. ++# 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, modified, + # and distributed under the terms of the FreeType project license, +diff --git a/src/gxvalid/rules.mk b/src/gxvalid/rules.mk +index c4bd4c8..7d487b5 100644 +--- a/src/gxvalid/rules.mk ++++ b/src/gxvalid/rules.mk +@@ -3,7 +3,8 @@ + # + + +-# Copyright 2004, 2005 by suzuki toshiya, Masatake YAMATO, Red Hat K.K., ++# Copyright 2004, 2005 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, modified, +diff --git a/src/lzw/ftzopen.c b/src/lzw/ftzopen.c +index d7a6457..c020eeb 100644 +--- a/src/lzw/ftzopen.c ++++ b/src/lzw/ftzopen.c +@@ -8,7 +8,8 @@ + /* be used to parse compressed PCF fonts, as found with many X11 server */ + /* distributions. */ + /* */ +-/* Copyright 2005-2007, 2009, 2011 by David Turner. */ ++/* Copyright 2005-2007, 2009, 2011 by */ ++/* David Turner. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ + /* modified, and distributed under the terms of the FreeType project */ +diff --git a/src/lzw/ftzopen.h b/src/lzw/ftzopen.h +index cdc8fd7..e9cc792 100644 +--- a/src/lzw/ftzopen.h ++++ b/src/lzw/ftzopen.h +@@ -8,7 +8,8 @@ + /* be used to parse compressed PCF fonts, as found with many X11 server */ + /* distributions. */ + /* */ +-/* Copyright 2005, 2006, 2007, 2008 by David Turner. */ ++/* Copyright 2005, 2006, 2007, 2008 by */ ++/* David Turner. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ + /* modified, and distributed under the terms of the FreeType project */ +diff --git a/src/sfnt/pngshim.c b/src/sfnt/pngshim.c +index 9bfcc2a..fb7ce99 100644 +--- a/src/sfnt/pngshim.c ++++ b/src/sfnt/pngshim.c +@@ -4,7 +4,8 @@ + /* */ + /* PNG Bitmap glyph support. */ + /* */ +-/* Copyright 2013, 2014 by Google, Inc. */ ++/* Copyright 2013, 2014 by */ ++/* Google, Inc. */ + /* Written by Stuart Gill and Behdad Esfahbod. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/sfnt/pngshim.h b/src/sfnt/pngshim.h +index dc9ecaf..0b8cff7 100644 +--- a/src/sfnt/pngshim.h ++++ b/src/sfnt/pngshim.h +@@ -4,7 +4,8 @@ + /* */ + /* PNG Bitmap glyph support. */ + /* */ +-/* Copyright 2013 by Google, Inc. */ ++/* Copyright 2013 by */ ++/* Google, Inc. */ + /* Written by Stuart Gill and Behdad Esfahbod. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/truetype/ttgload.c b/src/truetype/ttgload.c +index c780275..537e979 100644 +--- a/src/truetype/ttgload.c ++++ b/src/truetype/ttgload.c +@@ -4,7 +4,7 @@ + /* */ + /* TrueType Glyph Loader (body). */ + /* */ +-/* Copyright 1996-2014 */ ++/* Copyright 1996-2014 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/truetype/ttinterp.c b/src/truetype/ttinterp.c +index feaf8c7..8ac2974 100644 +--- a/src/truetype/ttinterp.c ++++ b/src/truetype/ttinterp.c +@@ -4,8 +4,8 @@ + /* */ + /* TrueType bytecode interpreter (body). */ + /* */ +-/* Copyright 1996-2014 */ +-/* by David Turner, Robert Wilhelm, and Werner Lemberg. */ ++/* Copyright 1996-2014 by */ ++/* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ + /* modified, and distributed under the terms of the FreeType project */ +diff --git a/src/truetype/ttobjs.c b/src/truetype/ttobjs.c +index 8877c4d..82d95e1 100644 +--- a/src/truetype/ttobjs.c ++++ b/src/truetype/ttobjs.c +@@ -4,7 +4,7 @@ + /* */ + /* Objects manager (body). */ + /* */ +-/* Copyright 1996-2013 */ ++/* Copyright 1996-2013 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/type42/t42drivr.h b/src/type42/t42drivr.h +index 9a1e97e..78ae2ab 100644 +--- a/src/type42/t42drivr.h ++++ b/src/type42/t42drivr.h +@@ -4,7 +4,8 @@ + /* */ + /* High-level Type 42 driver interface (specification). */ + /* */ +-/* Copyright 2002 by Roberto Alameda. */ ++/* Copyright 2002 by */ ++/* Roberto Alameda. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ + /* modified, and distributed under the terms of the FreeType project */ +diff --git a/src/type42/t42objs.c b/src/type42/t42objs.c +index 915e81f..e86ca78 100644 +--- a/src/type42/t42objs.c ++++ b/src/type42/t42objs.c +@@ -4,8 +4,8 @@ + /* */ + /* Type 42 objects manager (body). */ + /* */ +-/* Copyright 2002-2009, 2011, 2013 */ +-/* by Roberto Alameda. */ ++/* Copyright 2002-2009, 2011, 2013 by */ ++/* Roberto Alameda. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ + /* modified, and distributed under the terms of the FreeType project */ +diff --git a/src/type42/t42objs.h b/src/type42/t42objs.h +index a93fa39..4c31ee8 100644 +--- a/src/type42/t42objs.h ++++ b/src/type42/t42objs.h +@@ -4,7 +4,8 @@ + /* */ + /* Type 42 objects manager (specification). */ + /* */ +-/* Copyright 2002, 2003, 2006, 2007, 2011 by Roberto Alameda. */ ++/* Copyright 2002, 2003, 2006, 2007, 2011 by */ ++/* Roberto Alameda. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ + /* modified, and distributed under the terms of the FreeType project */ +diff --git a/src/type42/t42parse.h b/src/type42/t42parse.h +index f77ec4a..fa10edd 100644 +--- a/src/type42/t42parse.h ++++ b/src/type42/t42parse.h +@@ -4,7 +4,8 @@ + /* */ + /* Type 42 font parser (specification). */ + /* */ +-/* Copyright 2002, 2003 by Roberto Alameda. */ ++/* Copyright 2002, 2003 by */ ++/* Roberto Alameda. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ + /* modified, and distributed under the terms of the FreeType project */ +diff --git a/src/type42/t42types.h b/src/type42/t42types.h +index c7c2db4..7c3b758 100644 +--- a/src/type42/t42types.h ++++ b/src/type42/t42types.h +@@ -4,7 +4,8 @@ + /* */ + /* Type 42 font data types (specification only). */ + /* */ +-/* Copyright 2002, 2003, 2006, 2008 by Roberto Alameda. */ ++/* Copyright 2002, 2003, 2006, 2008 by */ ++/* Roberto Alameda. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ + /* modified, and distributed under the terms of the FreeType project */ +-- +2.2.2 + +From 50be00d3b33fdf5628f38a9cd459c6e9804e4657 Mon Sep 17 00:00:00 2001 +From: Werner Lemberg <wl@gnu.org> +Date: Sat, 17 Jan 2015 20:38:31 +0100 +Subject: [PATCH] Add some tools to handle yearly copyright notice updates. + +We are now following the GNU guidelines: A new release automatically +means that the copyright year of all affected files gets updated; it +is no longer used to track years of modification changes. + +* src/tools/update-copyright-year: New Perl script. +* src/tools/update-copyright: New shell script that calls +`update-copyright-year' on all files. +* src/tools/no-copyright: Exceptions that should not be handled by +`update-copyright' +--- + ChangeLog | 14 +++++ + src/tools/no-copyright | 62 ++++++++++++++++++ + src/tools/update-copyright | 14 +++++ + src/tools/update-copyright-year | 135 ++++++++++++++++++++++++++++++++++++++++ + 4 files changed, 225 insertions(+) + create mode 100644 src/tools/no-copyright + create mode 100755 src/tools/update-copyright + create mode 100755 src/tools/update-copyright-year + +diff --git a/ChangeLog b/ChangeLog +index f68af52..1274f95 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,3 +1,17 @@ ++2015-01-17 Werner Lemberg <wl@gnu.org> ++ ++ Add some tools to handle yearly copyright notice updates. ++ ++ We are now following the GNU guidelines: A new release automatically ++ means that the copyright year of all affected files gets updated; it ++ is no longer used to track years of modification changes. ++ ++ * src/tools/update-copyright-year: New Perl script. ++ * src/tools/update-copyright: New shell script that calls ++ `update-copyright-year' on all files. ++ * src/tools/no-copyright: Exceptions that should not be handled by ++ `update-copyright' ++ + 2015-01-14 Werner Lemberg <wl@gnu.org> + + * docs/CHANGES: Updated, using a description from Behdad. +diff --git a/src/tools/no-copyright b/src/tools/no-copyright +new file mode 100644 +index 0000000..464ece0 +--- /dev/null ++++ b/src/tools/no-copyright +@@ -0,0 +1,62 @@ ++# Files that don't get a copyright, or which are taken from elsewhere. ++# ++# All lines in this file are patterns, including the comment lines; this ++# means that e.g. `FTL.TXT' matches all files that have this string in ++# the file name (including the path relative to the current directory, ++# always starting with `./'). ++# ++# Don't put empty lines into this file! ++# ++.gitignore ++# ++builds/unix/pkg.m4 ++# ++docs/FTL.TXT ++docs/GPLv2.TXT ++# ++src/base/md5.c ++src/base/md5.h ++# ++src/bdf/bdf.c ++src/bdf/bdf.h ++src/bdf/bdfdrivr.c ++src/bdf/bdfdrivr.h ++src/bdf/bdferror.h ++src/bdf/bdflib.c ++src/bdf/module.mk ++src/bdf/README ++src/bdf/rules.mk ++README ++# ++src/pcf/module.mk ++src/pcf/pcf.c ++src/pcf/pcf.h ++src/pcf/pcfdrivr.c ++src/pcf/pcfdrivr.h ++src/pcf/pcferror.h ++src/pcf/pcfread.c ++src/pcf/pcfread.h ++src/pcf/pcfutil.c ++src/pcf/pcfutil.h ++src/pcf/README ++src/pcf/rules.mk ++# ++src/gzip/adler32.c ++src/gzip/infblock.c ++src/gzip/infblock.h ++src/gzip/infcodes.c ++src/gzip/infcodes.h ++src/gzip/inffixed.h ++src/gzip/inflate.c ++src/gzip/inftrees.c ++src/gzip/inftrees.h ++src/gzip/infutil.c ++src/gzip/infutil.h ++src/gzip/zconf.h ++src/gzip/zlib.h ++src/gzip/zutil.c ++src/gzip/zutil.h ++# ++src/tools/ftrandom/ftrandom.c ++# ++# EOF +diff --git a/src/tools/update-copyright b/src/tools/update-copyright +new file mode 100755 +index 0000000..81add0a +--- /dev/null ++++ b/src/tools/update-copyright +@@ -0,0 +1,14 @@ ++#!/bin/sh ++ ++# Run the `update-copyright-year' script on all files in the git repository, ++# taking care of exceptions stored in file `no-copyright'. ++ ++topdir=`git rev-parse --show-toplevel` ++toolsdir=$topdir/src/tools ++ ++git ls-files $topdir \ ++| sed 's|^|./|' \ ++| grep -vFf $toolsdir/no-copyright \ ++| xargs $toolsdir/update-copyright-year ++ ++# EOF +diff --git a/src/tools/update-copyright-year b/src/tools/update-copyright-year +new file mode 100755 +index 0000000..1077541 +--- /dev/null ++++ b/src/tools/update-copyright-year +@@ -0,0 +1,135 @@ ++eval '(exit $?0)' && eval 'exec perl -wS -i "$0" ${1+"$@"}' ++ & eval 'exec perl -wS -i "$0" $argv:q' ++ if 0; ++ ++# Copyright 2015 by ++# Werner Lemberg. ++# ++# This file is part of the FreeType project, and may only be used, modified, ++# and distributed under the terms of the FreeType project license, ++# LICENSE.TXT. By continuing to use, modify, or distribute this file you ++# indicate that you have read the license and understand and accept it ++# fully. ++ ++# [Note: This script is expected to be called by the shell, which in turn ++# calls perl automatically. The nifty start-up code above is based on ++# gnulib's `update-copyright' script; it is a more portable replacement for ++# the shebang, using the first `perl' program in the shell's path instead.] ++ ++# Usage: ++# ++# update-copyright-year file1 [file2 ...] ++ ++ ++# This script handles copyright entries like ++# ++# Copyright 2000 by ++# foobar ++# ++# or ++# ++# /* Copyright 2000, 2001, 2004-2007 by */ ++# /* foobar */ ++# ++# and replaces them uniformly with ++# ++# Copyright 2000-2015 ++# foobar ++# ++# and ++# ++# /* Copyright 2000-2015 by */ ++# /* foobar */ ++# ++# (assuming that the current year is 2015). As can be seen, the line length ++# is retained if there is non-whitespace after the word `by' on the same ++# line. ++ ++use strict; ++ ++ ++my (undef, undef, undef, ++ undef, undef, $year, ++ undef, undef, undef) = localtime(time); ++$year += 1900; ++ ++my $replaced = 0; ++ ++ ++# Loop over all input files; option `-i' (issued at the very beginning of ++# this script) makes perl edit them in-place. ++while (<>) ++{ ++ # Only handle the first copyright notice in a file. ++ if (!$replaced) ++ { ++ # First try: Search multiple copyright years. ++ s { ++ (?<begin>.*) ++ Copyright ++ (?<space1>\ +) ++ (?<first>[12][0-9][0-9][0-9]) ++ (?<middle>.+) ++ (?<last>[12][0-9][0-9][0-9]) ++ (?<space2>\ +) ++ by ++ (?<space3>\ *) ++ (?<end>.*) ++ } ++ { ++ # Fill line to the same length (if appropriate); we skip the middle ++ # part but insert two spaces and `-'. ++ my $space = length($+{space1}) - 1 ++ + length($+{middle}) - 1 ++ + length($+{space2}) - 1 ++ + length($+{space3}); ++ ++ print "$+{begin}"; ++ print "Copyright\ $+{first}-$year\ by"; ++ print ' ' x $space if length($+{end}); ++ print "$+{end}\n"; ++ $replaced = 1; ++ }ex ++ || ++ # Second try: Search a single copyright year. ++ s { ++ (?<begin>.*) ++ Copyright ++ (?<space1>\ +) ++ (?<first>[12][0-9][0-9][0-9]) ++ (?<space2>\ +) ++ by ++ (?<space3>\ *) ++ (?<end>.*) ++ } ++ { ++ # Fill line to the same length (if appropriate); we insert two ++ # spaces, a `-', and the current year. ++ my $space = length($+{space1}) - 1 ++ + length($+{space2}) - 1 ++ + length($+{space3}) ++ - (length($year) + 1); ++ ++ print "$+{begin}"; ++ print "Copyright $+{first}-$year by"; ++ # If $space is negative this inserts nothing. ++ print ' ' x $space if length($+{end}); ++ print "$+{end}\n"; ++ $replaced = 1; ++ }ex ++ || ++ # Otherwise print line unaltered. ++ print; ++ } ++ else ++ { ++ print; ++ } ++} ++continue ++{ ++ # Reset $replaced before processing the next file. ++ $replaced = 0 if eof; ++} ++ ++# EOF +-- +2.2.2 + +From f57fc59e016217687362b6fbbc4842fab932175c Mon Sep 17 00:00:00 2001 +From: Werner Lemberg <wl@gnu.org> +Date: Sat, 17 Jan 2015 20:41:43 +0100 +Subject: [PATCH] Run `src/tools/update-copyright'. + +--- + CMakeLists.txt | 2 +- + ChangeLog | 2 +- + ChangeLog.20 | 2 +- + ChangeLog.21 | 2 +- + ChangeLog.22 | 2 +- + ChangeLog.23 | 2 +- + ChangeLog.24 | 2 +- + Jamfile | 2 +- + Jamrules | 2 +- + Makefile | 2 +- + autogen.sh | 2 +- + builds/amiga/include/config/ftconfig.h | 2 +- + builds/amiga/include/config/ftmodule.h | 2 +- + builds/amiga/makefile | 2 +- + builds/amiga/makefile.os4 | 2 +- + builds/amiga/smakefile | 2 +- + builds/amiga/src/base/ftdebug.c | 2 +- + builds/amiga/src/base/ftsystem.c | 2 +- + builds/ansi/ansi-def.mk | 2 +- + builds/ansi/ansi.mk | 2 +- + builds/beos/beos-def.mk | 2 +- + builds/beos/beos.mk | 2 +- + builds/beos/detect.mk | 2 +- + builds/cmake/iOS.cmake | 2 +- + builds/compiler/ansi-cc.mk | 2 +- + builds/compiler/bcc-dev.mk | 2 +- + builds/compiler/bcc.mk | 2 +- + builds/compiler/emx.mk | 2 +- + builds/compiler/gcc-dev.mk | 2 +- + builds/compiler/gcc.mk | 2 +- + builds/compiler/intelc.mk | 2 +- + builds/compiler/unix-lcc.mk | 2 +- + builds/compiler/visualage.mk | 2 +- + builds/compiler/visualc.mk | 2 +- + builds/compiler/watcom.mk | 2 +- + builds/compiler/win-lcc.mk | 2 +- + builds/detect.mk | 2 +- + builds/dos/detect.mk | 2 +- + builds/dos/dos-def.mk | 2 +- + builds/dos/dos-emx.mk | 2 +- + builds/dos/dos-gcc.mk | 2 +- + builds/dos/dos-wat.mk | 2 +- + builds/exports.mk | 2 +- + builds/freetype.mk | 2 +- + builds/link_dos.mk | 2 +- + builds/link_std.mk | 2 +- + builds/mac/ftmac.c | 2 +- + builds/modules.mk | 2 +- + builds/os2/detect.mk | 2 +- + builds/os2/os2-def.mk | 2 +- + builds/os2/os2-dev.mk | 2 +- + builds/os2/os2-gcc.mk | 2 +- + builds/symbian/bld.inf | 2 +- + builds/symbian/freetype.mmp | 2 +- + builds/toplevel.mk | 2 +- + builds/unix/configure.raw | 2 +- + builds/unix/detect.mk | 2 +- + builds/unix/freetype-config.in | 2 +- + builds/unix/freetype2.m4 | 2 +- + builds/unix/ft-munmap.m4 | 2 +- + builds/unix/ftconfig.in | 2 +- + builds/unix/ftsystem.c | 2 +- + builds/unix/install.mk | 2 +- + builds/unix/unix-cc.in | 2 +- + builds/unix/unix-def.in | 2 +- + builds/unix/unix-dev.mk | 2 +- + builds/unix/unix-lcc.mk | 2 +- + builds/unix/unix.mk | 2 +- + builds/unix/unixddef.mk | 2 +- + builds/vms/ftconfig.h | 2 +- + builds/vms/ftsystem.c | 2 +- + builds/wince/ftdebug.c | 2 +- + builds/windows/detect.mk | 2 +- + builds/windows/ftdebug.c | 2 +- + builds/windows/w32-bcc.mk | 2 +- + builds/windows/w32-bccd.mk | 2 +- + builds/windows/w32-dev.mk | 2 +- + builds/windows/w32-gcc.mk | 2 +- + builds/windows/w32-icc.mk | 2 +- + builds/windows/w32-intl.mk | 2 +- + builds/windows/w32-lcc.mk | 2 +- + builds/windows/w32-mingw32.mk | 2 +- + builds/windows/w32-vcc.mk | 2 +- + builds/windows/w32-wat.mk | 2 +- + builds/windows/win32-def.mk | 2 +- + configure | 2 +- + devel/ft2build.h | 2 +- + devel/ftoption.h | 2 +- + docs/CHANGES | 2 +- + docs/CUSTOMIZE | 2 +- + docs/DEBUG | 2 +- + docs/INSTALL | 2 +- + docs/INSTALL.ANY | 2 +- + docs/INSTALL.CROSS | 2 +- + docs/INSTALL.GNU | 2 +- + docs/INSTALL.UNIX | 2 +- + docs/INSTALL.VMS | 2 +- + docs/TODO | 2 +- + docs/VERSION.DLL | 2 +- + docs/formats.txt | 2 +- + docs/raster.txt | 2 +- + docs/release | 2 +- + include/config/ftconfig.h | 2 +- + include/config/ftheader.h | 2 +- + include/config/ftoption.h | 2 +- + include/config/ftstdlib.h | 2 +- + include/freetype.h | 2 +- + include/ft2build.h | 2 +- + include/ftadvanc.h | 2 +- + include/ftautoh.h | 2 +- + include/ftbbox.h | 2 +- + include/ftbdf.h | 2 +- + include/ftbitmap.h | 2 +- + include/ftbzip2.h | 2 +- + include/ftcache.h | 2 +- + include/ftcffdrv.h | 2 +- + include/ftcid.h | 2 +- + include/fterrdef.h | 2 +- + include/fterrors.h | 2 +- + include/ftgasp.h | 2 +- + include/ftglyph.h | 2 +- + include/ftgxval.h | 2 +- + include/ftgzip.h | 2 +- + include/ftimage.h | 2 +- + include/ftincrem.h | 2 +- + include/ftlcdfil.h | 2 +- + include/ftlist.h | 2 +- + include/ftlzw.h | 2 +- + include/ftmac.h | 2 +- + include/ftmm.h | 2 +- + include/ftmodapi.h | 2 +- + include/ftmoderr.h | 2 +- + include/ftotval.h | 2 +- + include/ftoutln.h | 2 +- + include/ftpfr.h | 2 +- + include/ftrender.h | 2 +- + include/ftsizes.h | 2 +- + include/ftsnames.h | 2 +- + include/ftstroke.h | 2 +- + include/ftsynth.h | 2 +- + include/ftsystem.h | 2 +- + include/fttrigon.h | 2 +- + include/ftttdrv.h | 2 +- + include/fttypes.h | 2 +- + include/ftwinfnt.h | 2 +- + include/ftxf86.h | 2 +- + include/internal/autohint.h | 2 +- + include/internal/ftcalc.h | 2 +- + include/internal/ftdebug.h | 2 +- + include/internal/ftdriver.h | 2 +- + include/internal/ftgloadr.h | 2 +- + include/internal/ftmemory.h | 2 +- + include/internal/ftobjs.h | 2 +- + include/internal/ftpic.h | 2 +- + include/internal/ftrfork.h | 2 +- + include/internal/ftserv.h | 2 +- + include/internal/ftstream.h | 2 +- + include/internal/fttrace.h | 2 +- + include/internal/ftvalid.h | 2 +- + include/internal/internal.h | 2 +- + include/internal/psaux.h | 2 +- + include/internal/pshints.h | 2 +- + include/internal/services/svbdf.h | 2 +- + include/internal/services/svcid.h | 2 +- + include/internal/services/svgldict.h | 2 +- + include/internal/services/svgxval.h | 2 +- + include/internal/services/svkern.h | 2 +- + include/internal/services/svmm.h | 2 +- + include/internal/services/svotval.h | 2 +- + include/internal/services/svpfr.h | 2 +- + include/internal/services/svpostnm.h | 2 +- + include/internal/services/svprop.h | 2 +- + include/internal/services/svpscmap.h | 2 +- + include/internal/services/svpsinfo.h | 2 +- + include/internal/services/svsfnt.h | 2 +- + include/internal/services/svttcmap.h | 2 +- + include/internal/services/svtteng.h | 2 +- + include/internal/services/svttglyf.h | 2 +- + include/internal/services/svwinfnt.h | 2 +- + include/internal/services/svxf86nm.h | 2 +- + include/internal/sfnt.h | 2 +- + include/internal/t1types.h | 2 +- + include/internal/tttypes.h | 2 +- + include/t1tables.h | 2 +- + include/ttnameid.h | 2 +- + include/tttables.h | 2 +- + include/tttags.h | 2 +- + include/ttunpat.h | 2 +- + modules.cfg | 2 +- + src/Jamfile | 2 +- + src/autofit/Jamfile | 2 +- + src/autofit/afangles.c | 2 +- + src/autofit/afblue.c | 2 +- + src/autofit/afblue.cin | 2 +- + src/autofit/afblue.dat | 2 +- + src/autofit/afblue.h | 2 +- + src/autofit/afblue.hin | 2 +- + src/autofit/afcjk.c | 2 +- + src/autofit/afcjk.h | 2 +- + src/autofit/afcover.h | 2 +- + src/autofit/afdummy.c | 2 +- + src/autofit/afdummy.h | 2 +- + src/autofit/aferrors.h | 2 +- + src/autofit/afglobal.c | 2 +- + src/autofit/afglobal.h | 2 +- + src/autofit/afhints.c | 2 +- + src/autofit/afhints.h | 2 +- + src/autofit/afindic.c | 2 +- + src/autofit/afindic.h | 2 +- + src/autofit/aflatin.c | 2 +- + src/autofit/aflatin.h | 2 +- + src/autofit/aflatin2.c | 2 +- + src/autofit/aflatin2.h | 2 +- + src/autofit/afloader.c | 2 +- + src/autofit/afloader.h | 2 +- + src/autofit/afmodule.c | 2 +- + src/autofit/afmodule.h | 2 +- + src/autofit/afpic.c | 2 +- + src/autofit/afpic.h | 2 +- + src/autofit/afranges.c | 2 +- + src/autofit/afranges.h | 2 +- + src/autofit/afscript.h | 2 +- + src/autofit/afstyles.h | 2 +- + src/autofit/aftypes.h | 2 +- + src/autofit/afwarp.c | 2 +- + src/autofit/afwarp.h | 2 +- + src/autofit/afwrtsys.h | 2 +- + src/autofit/autofit.c | 2 +- + src/autofit/hbshim.c | 2 +- + src/autofit/hbshim.h | 2 +- + src/autofit/module.mk | 2 +- + src/autofit/rules.mk | 2 +- + src/base/Jamfile | 2 +- + src/base/basepic.c | 2 +- + src/base/basepic.h | 2 +- + src/base/ftadvanc.c | 2 +- + src/base/ftapi.c | 2 +- + src/base/ftbase.c | 2 +- + src/base/ftbase.h | 2 +- + src/base/ftbbox.c | 2 +- + src/base/ftbdf.c | 2 +- + src/base/ftbitmap.c | 2 +- + src/base/ftcalc.c | 2 +- + src/base/ftcid.c | 2 +- + src/base/ftdbgmem.c | 2 +- + src/base/ftdebug.c | 2 +- + src/base/ftfstype.c | 2 +- + src/base/ftgasp.c | 2 +- + src/base/ftgloadr.c | 2 +- + src/base/ftglyph.c | 2 +- + src/base/ftgxval.c | 2 +- + src/base/ftinit.c | 2 +- + src/base/ftlcdfil.c | 2 +- + src/base/ftmac.c | 2 +- + src/base/ftmm.c | 2 +- + src/base/ftobjs.c | 2 +- + src/base/ftotval.c | 2 +- + src/base/ftoutln.c | 2 +- + src/base/ftpatent.c | 2 +- + src/base/ftpfr.c | 2 +- + src/base/ftpic.c | 2 +- + src/base/ftrfork.c | 2 +- + src/base/ftsnames.c | 2 +- + src/base/ftstream.c | 2 +- + src/base/ftstroke.c | 2 +- + src/base/ftsynth.c | 2 +- + src/base/ftsystem.c | 2 +- + src/base/fttrigon.c | 2 +- + src/base/fttype1.c | 2 +- + src/base/ftutil.c | 2 +- + src/base/ftwinfnt.c | 2 +- + src/base/ftxf86.c | 2 +- + src/base/rules.mk | 2 +- + src/bdf/Jamfile | 2 +- + src/bzip2/Jamfile | 2 +- + src/bzip2/ftbzip2.c | 2 +- + src/bzip2/rules.mk | 2 +- + src/cache/Jamfile | 2 +- + src/cache/ftcache.c | 2 +- + src/cache/ftcbasic.c | 2 +- + src/cache/ftccache.c | 2 +- + src/cache/ftccache.h | 2 +- + src/cache/ftccback.h | 2 +- + src/cache/ftccmap.c | 2 +- + src/cache/ftcerror.h | 2 +- + src/cache/ftcglyph.c | 2 +- + src/cache/ftcglyph.h | 2 +- + src/cache/ftcimage.c | 2 +- + src/cache/ftcimage.h | 2 +- + src/cache/ftcmanag.c | 2 +- + src/cache/ftcmanag.h | 2 +- + src/cache/ftcmru.c | 2 +- + src/cache/ftcmru.h | 2 +- + src/cache/ftcsbits.c | 2 +- + src/cache/ftcsbits.h | 2 +- + src/cache/rules.mk | 2 +- + src/cff/Jamfile | 2 +- + src/cff/cff.c | 2 +- + src/cff/cffcmap.c | 2 +- + src/cff/cffcmap.h | 2 +- + src/cff/cffdrivr.c | 2 +- + src/cff/cffdrivr.h | 2 +- + src/cff/cfferrs.h | 2 +- + src/cff/cffgload.c | 2 +- + src/cff/cffgload.h | 2 +- + src/cff/cffload.c | 2 +- + src/cff/cffload.h | 2 +- + src/cff/cffobjs.c | 2 +- + src/cff/cffobjs.h | 2 +- + src/cff/cffparse.c | 2 +- + src/cff/cffparse.h | 2 +- + src/cff/cffpic.c | 2 +- + src/cff/cffpic.h | 2 +- + src/cff/cfftoken.h | 2 +- + src/cff/cfftypes.h | 2 +- + src/cff/module.mk | 2 +- + src/cff/rules.mk | 2 +- + src/cid/Jamfile | 2 +- + src/cid/ciderrs.h | 2 +- + src/cid/cidgload.c | 2 +- + src/cid/cidgload.h | 2 +- + src/cid/cidload.c | 2 +- + src/cid/cidload.h | 2 +- + src/cid/cidobjs.c | 2 +- + src/cid/cidobjs.h | 2 +- + src/cid/cidparse.c | 2 +- + src/cid/cidparse.h | 2 +- + src/cid/cidriver.c | 2 +- + src/cid/cidriver.h | 2 +- + src/cid/cidtoken.h | 2 +- + src/cid/module.mk | 2 +- + src/cid/rules.mk | 2 +- + src/cid/type1cid.c | 2 +- + src/gxvalid/Jamfile | 2 +- + src/gxvalid/gxvalid.c | 2 +- + src/gxvalid/gxvalid.h | 2 +- + src/gxvalid/gxvbsln.c | 2 +- + src/gxvalid/gxvcommn.c | 2 +- + src/gxvalid/gxvcommn.h | 2 +- + src/gxvalid/gxverror.h | 2 +- + src/gxvalid/gxvfeat.c | 2 +- + src/gxvalid/gxvfeat.h | 2 +- + src/gxvalid/gxvfgen.c | 2 +- + src/gxvalid/gxvjust.c | 2 +- + src/gxvalid/gxvkern.c | 2 +- + src/gxvalid/gxvlcar.c | 2 +- + src/gxvalid/gxvmod.c | 2 +- + src/gxvalid/gxvmod.h | 2 +- + src/gxvalid/gxvmort.c | 2 +- + src/gxvalid/gxvmort.h | 2 +- + src/gxvalid/gxvmort0.c | 2 +- + src/gxvalid/gxvmort1.c | 2 +- + src/gxvalid/gxvmort2.c | 2 +- + src/gxvalid/gxvmort4.c | 2 +- + src/gxvalid/gxvmort5.c | 2 +- + src/gxvalid/gxvmorx.c | 2 +- + src/gxvalid/gxvmorx.h | 2 +- + src/gxvalid/gxvmorx0.c | 2 +- + src/gxvalid/gxvmorx1.c | 2 +- + src/gxvalid/gxvmorx2.c | 2 +- + src/gxvalid/gxvmorx4.c | 2 +- + src/gxvalid/gxvmorx5.c | 2 +- + src/gxvalid/gxvopbd.c | 2 +- + src/gxvalid/gxvprop.c | 2 +- + src/gxvalid/gxvtrak.c | 2 +- + src/gxvalid/module.mk | 2 +- + src/gxvalid/rules.mk | 2 +- + src/gzip/Jamfile | 2 +- + src/gzip/ftgzip.c | 2 +- + src/gzip/rules.mk | 2 +- + src/lzw/Jamfile | 2 +- + src/lzw/ftlzw.c | 2 +- + src/lzw/ftzopen.c | 2 +- + src/lzw/ftzopen.h | 2 +- + src/lzw/rules.mk | 2 +- + src/otvalid/Jamfile | 2 +- + src/otvalid/module.mk | 2 +- + src/otvalid/otvalid.c | 2 +- + src/otvalid/otvalid.h | 2 +- + src/otvalid/otvbase.c | 2 +- + src/otvalid/otvcommn.c | 2 +- + src/otvalid/otvcommn.h | 2 +- + src/otvalid/otverror.h | 2 +- + src/otvalid/otvgdef.c | 2 +- + src/otvalid/otvgpos.c | 2 +- + src/otvalid/otvgpos.h | 2 +- + src/otvalid/otvgsub.c | 2 +- + src/otvalid/otvjstf.c | 2 +- + src/otvalid/otvmath.c | 2 +- + src/otvalid/otvmod.c | 2 +- + src/otvalid/otvmod.h | 2 +- + src/otvalid/rules.mk | 2 +- + src/pcf/Jamfile | 2 +- + src/pfr/Jamfile | 2 +- + src/pfr/module.mk | 2 +- + src/pfr/pfr.c | 2 +- + src/pfr/pfrcmap.c | 2 +- + src/pfr/pfrcmap.h | 2 +- + src/pfr/pfrdrivr.c | 2 +- + src/pfr/pfrdrivr.h | 2 +- + src/pfr/pfrerror.h | 2 +- + src/pfr/pfrgload.c | 2 +- + src/pfr/pfrgload.h | 2 +- + src/pfr/pfrload.c | 2 +- + src/pfr/pfrload.h | 2 +- + src/pfr/pfrobjs.c | 2 +- + src/pfr/pfrobjs.h | 2 +- + src/pfr/pfrsbit.c | 2 +- + src/pfr/pfrsbit.h | 2 +- + src/pfr/pfrtypes.h | 2 +- + src/pfr/rules.mk | 2 +- + src/psaux/Jamfile | 2 +- + src/psaux/afmparse.c | 2 +- + src/psaux/afmparse.h | 2 +- + src/psaux/module.mk | 2 +- + src/psaux/psaux.c | 2 +- + src/psaux/psauxerr.h | 2 +- + src/psaux/psauxmod.c | 2 +- + src/psaux/psauxmod.h | 2 +- + src/psaux/psconv.c | 2 +- + src/psaux/psconv.h | 2 +- + src/psaux/psobjs.c | 2 +- + src/psaux/psobjs.h | 2 +- + src/psaux/rules.mk | 2 +- + src/psaux/t1cmap.c | 2 +- + src/psaux/t1cmap.h | 2 +- + src/psaux/t1decode.c | 2 +- + src/psaux/t1decode.h | 2 +- + src/pshinter/Jamfile | 2 +- + src/pshinter/module.mk | 2 +- + src/pshinter/pshalgo.c | 2 +- + src/pshinter/pshalgo.h | 2 +- + src/pshinter/pshglob.c | 2 +- + src/pshinter/pshglob.h | 2 +- + src/pshinter/pshinter.c | 2 +- + src/pshinter/pshmod.c | 2 +- + src/pshinter/pshmod.h | 2 +- + src/pshinter/pshnterr.h | 2 +- + src/pshinter/pshpic.c | 2 +- + src/pshinter/pshpic.h | 2 +- + src/pshinter/pshrec.c | 2 +- + src/pshinter/pshrec.h | 2 +- + src/pshinter/rules.mk | 2 +- + src/psnames/Jamfile | 2 +- + src/psnames/module.mk | 2 +- + src/psnames/psmodule.c | 2 +- + src/psnames/psmodule.h | 2 +- + src/psnames/psnamerr.h | 2 +- + src/psnames/psnames.c | 2 +- + src/psnames/pspic.c | 2 +- + src/psnames/pspic.h | 2 +- + src/psnames/pstables.h | 2 +- + src/psnames/rules.mk | 2 +- + src/raster/Jamfile | 2 +- + src/raster/ftmisc.h | 2 +- + src/raster/ftraster.c | 2 +- + src/raster/ftraster.h | 2 +- + src/raster/ftrend1.c | 2 +- + src/raster/ftrend1.h | 2 +- + src/raster/module.mk | 2 +- + src/raster/raster.c | 2 +- + src/raster/rasterrs.h | 2 +- + src/raster/rastpic.c | 2 +- + src/raster/rastpic.h | 2 +- + src/raster/rules.mk | 2 +- + src/sfnt/Jamfile | 2 +- + src/sfnt/module.mk | 2 +- + src/sfnt/pngshim.c | 2 +- + src/sfnt/pngshim.h | 2 +- + src/sfnt/rules.mk | 2 +- + src/sfnt/sfdriver.c | 2 +- + src/sfnt/sfdriver.h | 2 +- + src/sfnt/sferrors.h | 2 +- + src/sfnt/sfnt.c | 2 +- + src/sfnt/sfntpic.c | 2 +- + src/sfnt/sfntpic.h | 2 +- + src/sfnt/sfobjs.c | 2 +- + src/sfnt/sfobjs.h | 2 +- + src/sfnt/ttbdf.c | 2 +- + src/sfnt/ttbdf.h | 2 +- + src/sfnt/ttcmap.c | 2 +- + src/sfnt/ttcmap.h | 2 +- + src/sfnt/ttcmapc.h | 2 +- + src/sfnt/ttkern.c | 2 +- + src/sfnt/ttkern.h | 2 +- + src/sfnt/ttload.c | 2 +- + src/sfnt/ttload.h | 2 +- + src/sfnt/ttmtx.c | 2 +- + src/sfnt/ttmtx.h | 2 +- + src/sfnt/ttpost.c | 2 +- + src/sfnt/ttpost.h | 2 +- + src/sfnt/ttsbit.c | 2 +- + src/sfnt/ttsbit.h | 2 +- + src/smooth/Jamfile | 2 +- + src/smooth/ftgrays.c | 2 +- + src/smooth/ftgrays.h | 2 +- + src/smooth/ftsmerrs.h | 2 +- + src/smooth/ftsmooth.c | 2 +- + src/smooth/ftsmooth.h | 2 +- + src/smooth/ftspic.c | 2 +- + src/smooth/ftspic.h | 2 +- + src/smooth/module.mk | 2 +- + src/smooth/rules.mk | 2 +- + src/smooth/smooth.c | 2 +- + src/tools/afblue.pl | 2 +- + src/tools/docmaker/content.py | 2 +- + src/tools/docmaker/docmaker.py | 2 +- + src/tools/docmaker/formatter.py | 2 +- + src/tools/docmaker/sources.py | 2 +- + src/tools/docmaker/tohtml.py | 2 +- + src/tools/docmaker/utils.py | 2 +- + src/tools/glnames.py | 2 +- + src/truetype/Jamfile | 2 +- + src/truetype/module.mk | 2 +- + src/truetype/rules.mk | 2 +- + src/truetype/truetype.c | 2 +- + src/truetype/ttdriver.c | 2 +- + src/truetype/ttdriver.h | 2 +- + src/truetype/tterrors.h | 2 +- + src/truetype/ttgload.c | 2 +- + src/truetype/ttgload.h | 2 +- + src/truetype/ttgxvar.c | 2 +- + src/truetype/ttgxvar.h | 2 +- + src/truetype/ttinterp.c | 2 +- + src/truetype/ttinterp.h | 2 +- + src/truetype/ttobjs.c | 2 +- + src/truetype/ttobjs.h | 2 +- + src/truetype/ttpic.c | 2 +- + src/truetype/ttpic.h | 2 +- + src/truetype/ttpload.c | 2 +- + src/truetype/ttpload.h | 2 +- + src/truetype/ttsubpix.c | 2 +- + src/truetype/ttsubpix.h | 2 +- + src/type1/Jamfile | 2 +- + src/type1/module.mk | 2 +- + src/type1/rules.mk | 2 +- + src/type1/t1afm.c | 2 +- + src/type1/t1afm.h | 2 +- + src/type1/t1driver.c | 2 +- + src/type1/t1driver.h | 2 +- + src/type1/t1errors.h | 2 +- + src/type1/t1gload.c | 2 +- + src/type1/t1gload.h | 2 +- + src/type1/t1load.c | 2 +- + src/type1/t1load.h | 2 +- + src/type1/t1objs.c | 2 +- + src/type1/t1objs.h | 2 +- + src/type1/t1parse.c | 2 +- + src/type1/t1parse.h | 2 +- + src/type1/t1tokens.h | 2 +- + src/type1/type1.c | 2 +- + src/type42/Jamfile | 2 +- + src/type42/module.mk | 2 +- + src/type42/rules.mk | 2 +- + src/type42/t42drivr.c | 2 +- + src/type42/t42drivr.h | 2 +- + src/type42/t42error.h | 2 +- + src/type42/t42objs.c | 2 +- + src/type42/t42objs.h | 2 +- + src/type42/t42parse.c | 2 +- + src/type42/t42parse.h | 2 +- + src/type42/t42types.h | 2 +- + src/type42/type42.c | 2 +- + src/winfonts/Jamfile | 2 +- + src/winfonts/fnterrs.h | 2 +- + src/winfonts/module.mk | 2 +- + src/winfonts/rules.mk | 2 +- + src/winfonts/winfnt.c | 2 +- + src/winfonts/winfnt.h | 2 +- + vms_make.com | 2 +- + 570 files changed, 570 insertions(+), 570 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 8b859a5..6954dc9 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,6 +1,6 @@ + # CMakeLists.txt + # +-# Copyright 2013, 2014 by ++# Copyright 2013-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # Written by John Cary <cary@txcorp.com> +diff --git a/ChangeLog b/ChangeLog +index 1274f95..84eee06 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -5618,7 +5618,7 @@ + + ---------------------------------------------------------------------------- + +-Copyright 2013-2014 by ++Copyright 2013-2015 by + David Turner, Robert Wilhelm, and Werner Lemberg. + + This file is part of the FreeType project, and may only be used, modified, +diff --git a/ChangeLog.20 b/ChangeLog.20 +index 8fcc5e7..6dae58e 100644 +--- a/ChangeLog.20 ++++ b/ChangeLog.20 +@@ -2597,7 +2597,7 @@ + + ---------------------------------------------------------------------------- + +-Copyright 2000, 2001, 2002, 2007 by ++Copyright 2000-2015 by + David Turner, Robert Wilhelm, and Werner Lemberg. + + This file is part of the FreeType project, and may only be used, modified, +diff --git a/ChangeLog.21 b/ChangeLog.21 +index 300a094..a6f8be7 100644 +--- a/ChangeLog.21 ++++ b/ChangeLog.21 +@@ -9423,7 +9423,7 @@ + + ---------------------------------------------------------------------------- + +-Copyright 2002, 2003, 2004, 2005, 2007, 2008 by ++Copyright 2002-2015 by + David Turner, Robert Wilhelm, and Werner Lemberg. + + This file is part of the FreeType project, and may only be used, modified, +diff --git a/ChangeLog.22 b/ChangeLog.22 +index 4144288..08c5877 100644 +--- a/ChangeLog.22 ++++ b/ChangeLog.22 +@@ -2821,7 +2821,7 @@ + + ---------------------------------------------------------------------------- + +-Copyright 2005, 2006, 2007, 2008 by ++Copyright 2005-2015 by + David Turner, Robert Wilhelm, and Werner Lemberg. + + This file is part of the FreeType project, and may only be used, modified, +diff --git a/ChangeLog.23 b/ChangeLog.23 +index 1a23848..93fd33c 100644 +--- a/ChangeLog.23 ++++ b/ChangeLog.23 +@@ -7932,7 +7932,7 @@ + + ---------------------------------------------------------------------------- + +-Copyright 2006, 2007, 2008, 2009, 2010 by ++Copyright 2006-2015 by + David Turner, Robert Wilhelm, and Werner Lemberg. + + This file is part of the FreeType project, and may only be used, modified, +diff --git a/ChangeLog.24 b/ChangeLog.24 +index 01eb3b7..df2119d 100644 +--- a/ChangeLog.24 ++++ b/ChangeLog.24 +@@ -6344,7 +6344,7 @@ + + ---------------------------------------------------------------------------- + +-Copyright 2010-2013 by ++Copyright 2010-2015 by + David Turner, Robert Wilhelm, and Werner Lemberg. + + This file is part of the FreeType project, and may only be used, modified, +diff --git a/Jamfile b/Jamfile +index 16e097e..e96bede 100644 +--- a/Jamfile ++++ b/Jamfile +@@ -1,6 +1,6 @@ + # FreeType 2 top Jamfile. + # +-# Copyright 2001-2014 by ++# Copyright 2001-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/Jamrules b/Jamrules +index d8d1c7e..91d1966 100644 +--- a/Jamrules ++++ b/Jamrules +@@ -1,6 +1,6 @@ + # FreeType 2 JamRules. + # +-# Copyright 2001, 2002, 2003 by ++# Copyright 2001-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/Makefile b/Makefile +index c1fa16c..c807b0b 100644 +--- a/Makefile ++++ b/Makefile +@@ -3,7 +3,7 @@ + # + + +-# Copyright 1996-2000, 2002, 2006 by ++# Copyright 1996-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/autogen.sh b/autogen.sh +index cc0e661..9729af4 100755 +--- a/autogen.sh ++++ b/autogen.sh +@@ -1,6 +1,6 @@ + #!/bin/sh + +-# Copyright 2005-2010, 2013 by ++# Copyright 2005-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/builds/amiga/include/config/ftconfig.h b/builds/amiga/include/config/ftconfig.h +index a73ace6..790eeec 100644 +--- a/builds/amiga/include/config/ftconfig.h ++++ b/builds/amiga/include/config/ftconfig.h +@@ -4,7 +4,7 @@ + /* */ + /* Amiga-specific configuration file (specification only). */ + /* */ +-/* Copyright 2005-2007, 2013 by */ ++/* Copyright 2005-2015 by */ + /* Werner Lemberg and Detlef Würkner. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/builds/amiga/include/config/ftmodule.h b/builds/amiga/include/config/ftmodule.h +index 5873bab..77a66db 100644 +--- a/builds/amiga/include/config/ftmodule.h ++++ b/builds/amiga/include/config/ftmodule.h +@@ -4,7 +4,7 @@ + /* */ + /* Amiga-specific FreeType module selection. */ + /* */ +-/* Copyright 2005 by */ ++/* Copyright 2005-2015 by */ + /* Werner Lemberg and Detlef Würkner. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/builds/amiga/makefile b/builds/amiga/makefile +index 8a1e4c6..89e3e77 100644 +--- a/builds/amiga/makefile ++++ b/builds/amiga/makefile +@@ -5,7 +5,7 @@ + # + + +-# Copyright 2005-2007, 2009, 2013 by ++# Copyright 2005-2015 by + # Werner Lemberg and Detlef Würkner. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/builds/amiga/makefile.os4 b/builds/amiga/makefile.os4 +index a2e6ffc..f602e73 100644 +--- a/builds/amiga/makefile.os4 ++++ b/builds/amiga/makefile.os4 +@@ -4,7 +4,7 @@ + # + + +-# Copyright 2005-2007, 2009, 2013 by ++# Copyright 2005-2015 by + # Werner Lemberg and Detlef Würkner. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/builds/amiga/smakefile b/builds/amiga/smakefile +index aee7fb9..2b82ac6 100644 +--- a/builds/amiga/smakefile ++++ b/builds/amiga/smakefile +@@ -3,7 +3,7 @@ + # + + +-# Copyright 2005-2007, 2009, 2013 by ++# Copyright 2005-2015 by + # Werner Lemberg and Detlef Würkner. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/builds/amiga/src/base/ftdebug.c b/builds/amiga/src/base/ftdebug.c +index 39688af..891a597 100644 +--- a/builds/amiga/src/base/ftdebug.c ++++ b/builds/amiga/src/base/ftdebug.c +@@ -4,7 +4,7 @@ + /* */ + /* Debugging and logging component for amiga (body). */ + /* */ +-/* Copyright 1996-2002, 2004, 2005, 2013 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, Werner Lemberg and Detlef Würkner. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/builds/amiga/src/base/ftsystem.c b/builds/amiga/src/base/ftsystem.c +index 42a552d..bb3ccfd 100644 +--- a/builds/amiga/src/base/ftsystem.c ++++ b/builds/amiga/src/base/ftsystem.c +@@ -4,7 +4,7 @@ + /* */ + /* Amiga-specific FreeType low-level system interface (body). */ + /* */ +-/* Copyright 1996-2002, 2005-2007, 2010, 2013 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, Werner Lemberg and Detlef Würkner. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/builds/ansi/ansi-def.mk b/builds/ansi/ansi-def.mk +index 2c58572..35b9f32 100644 +--- a/builds/ansi/ansi-def.mk ++++ b/builds/ansi/ansi-def.mk +@@ -3,7 +3,7 @@ + # + + +-# Copyright 1996-2000, 2003, 2006 by ++# Copyright 1996-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/builds/ansi/ansi.mk b/builds/ansi/ansi.mk +index 32b3bac..2816e14 100644 +--- a/builds/ansi/ansi.mk ++++ b/builds/ansi/ansi.mk +@@ -3,7 +3,7 @@ + # + + +-# Copyright 1996-2000 by ++# Copyright 1996-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/builds/beos/beos-def.mk b/builds/beos/beos-def.mk +index 4371a30..5ddedc0 100644 +--- a/builds/beos/beos-def.mk ++++ b/builds/beos/beos-def.mk +@@ -5,7 +5,7 @@ + # + + +-# Copyright 1996-2000, 2003, 2006 by ++# Copyright 1996-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/builds/beos/beos.mk b/builds/beos/beos.mk +index b5c8bda..6c7fca1 100644 +--- a/builds/beos/beos.mk ++++ b/builds/beos/beos.mk +@@ -2,7 +2,7 @@ + # FreeType 2 configuration rules for a BeOS system + # + +-# Copyright 1996-2000, 2002, 2005 by ++# Copyright 1996-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/builds/beos/detect.mk b/builds/beos/detect.mk +index 24a0878..b23f94e 100644 +--- a/builds/beos/detect.mk ++++ b/builds/beos/detect.mk +@@ -3,7 +3,7 @@ + # + + +-# Copyright 1996-2000, 2003, 2006 by ++# Copyright 1996-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/builds/cmake/iOS.cmake b/builds/cmake/iOS.cmake +index a41a7ac..7970f2b 100644 +--- a/builds/cmake/iOS.cmake ++++ b/builds/cmake/iOS.cmake +@@ -1,6 +1,6 @@ + # iOS.cmake + # +-# Copyright 2014 by ++# Copyright 2014-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # Written by David Wimsey <david@wimsey.us> +diff --git a/builds/compiler/ansi-cc.mk b/builds/compiler/ansi-cc.mk +index 3b668e2..c9f6608 100644 +--- a/builds/compiler/ansi-cc.mk ++++ b/builds/compiler/ansi-cc.mk +@@ -3,7 +3,7 @@ + # + + +-# Copyright 1996-2000, 2003, 2006 by ++# Copyright 1996-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/builds/compiler/bcc-dev.mk b/builds/compiler/bcc-dev.mk +index 42a99b0..8ab957e 100644 +--- a/builds/compiler/bcc-dev.mk ++++ b/builds/compiler/bcc-dev.mk +@@ -3,7 +3,7 @@ + # + + +-# Copyright 1996-2000, 2003, 2006 by ++# Copyright 1996-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/builds/compiler/bcc.mk b/builds/compiler/bcc.mk +index 855edad..f383840 100644 +--- a/builds/compiler/bcc.mk ++++ b/builds/compiler/bcc.mk +@@ -3,7 +3,7 @@ + # + + +-# Copyright 1996-2000, 2003, 2006 by ++# Copyright 1996-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/builds/compiler/emx.mk b/builds/compiler/emx.mk +index c237005..62fe35d 100644 +--- a/builds/compiler/emx.mk ++++ b/builds/compiler/emx.mk +@@ -3,7 +3,7 @@ + # + + +-# Copyright 2003, 2006 by ++# Copyright 2003-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/builds/compiler/gcc-dev.mk b/builds/compiler/gcc-dev.mk +index c63e126..fd789af 100644 +--- a/builds/compiler/gcc-dev.mk ++++ b/builds/compiler/gcc-dev.mk +@@ -3,7 +3,7 @@ + # + + +-# Copyright 1996-2000, 2003, 2004, 2005, 2006 by ++# Copyright 1996-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/builds/compiler/gcc.mk b/builds/compiler/gcc.mk +index f6b7101..0970d1c 100644 +--- a/builds/compiler/gcc.mk ++++ b/builds/compiler/gcc.mk +@@ -3,7 +3,7 @@ + # + + +-# Copyright 1996-2000, 2003, 2005, 2006, 2009 by ++# Copyright 1996-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/builds/compiler/intelc.mk b/builds/compiler/intelc.mk +index 413ce5b..19e5962 100644 +--- a/builds/compiler/intelc.mk ++++ b/builds/compiler/intelc.mk +@@ -3,7 +3,7 @@ + # + + +-# Copyright 1996-2000, 2003, 2006 by ++# Copyright 1996-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/builds/compiler/unix-lcc.mk b/builds/compiler/unix-lcc.mk +index d79f508..ebe3306 100644 +--- a/builds/compiler/unix-lcc.mk ++++ b/builds/compiler/unix-lcc.mk +@@ -3,7 +3,7 @@ + # + + +-# Copyright 1996-2000, 2003, 2006 by ++# Copyright 1996-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/builds/compiler/visualage.mk b/builds/compiler/visualage.mk +index c109659..db997fa 100644 +--- a/builds/compiler/visualage.mk ++++ b/builds/compiler/visualage.mk +@@ -3,7 +3,7 @@ + # + + +-# Copyright 1996-2000, 2003, 2006 by ++# Copyright 1996-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/builds/compiler/visualc.mk b/builds/compiler/visualc.mk +index 2e19ef8..900c8be 100644 +--- a/builds/compiler/visualc.mk ++++ b/builds/compiler/visualc.mk +@@ -3,7 +3,7 @@ + # + + +-# Copyright 1996-2000, 2003, 2005, 2006, 2008 by ++# Copyright 1996-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/builds/compiler/watcom.mk b/builds/compiler/watcom.mk +index 4db1e7f..f83425e 100644 +--- a/builds/compiler/watcom.mk ++++ b/builds/compiler/watcom.mk +@@ -3,7 +3,7 @@ + # + + +-# Copyright 1996-2000, 2003, 2006 by ++# Copyright 1996-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/builds/compiler/win-lcc.mk b/builds/compiler/win-lcc.mk +index 5d02d82..9e4f79d 100644 +--- a/builds/compiler/win-lcc.mk ++++ b/builds/compiler/win-lcc.mk +@@ -3,7 +3,7 @@ + # + + +-# Copyright 1996-2000, 2003, 2006 by ++# Copyright 1996-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/builds/detect.mk b/builds/detect.mk +index ff4045d..4b789d3 100644 +--- a/builds/detect.mk ++++ b/builds/detect.mk +@@ -3,7 +3,7 @@ + # + + +-# Copyright 1996-2003, 2006, 2008, 2013, 2014 by ++# Copyright 1996-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/builds/dos/detect.mk b/builds/dos/detect.mk +index 3e5e967..e49ba98 100644 +--- a/builds/dos/detect.mk ++++ b/builds/dos/detect.mk +@@ -3,7 +3,7 @@ + # + + +-# Copyright 1996-2000, 2003, 2004, 2006, 2014 by ++# Copyright 1996-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/builds/dos/dos-def.mk b/builds/dos/dos-def.mk +index 950f581..ac0be5e 100644 +--- a/builds/dos/dos-def.mk ++++ b/builds/dos/dos-def.mk +@@ -3,7 +3,7 @@ + # + + +-# Copyright 1996-2000, 2003, 2005, 2006 by ++# Copyright 1996-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/builds/dos/dos-emx.mk b/builds/dos/dos-emx.mk +index 6ea8f6d..c421674 100644 +--- a/builds/dos/dos-emx.mk ++++ b/builds/dos/dos-emx.mk +@@ -3,7 +3,7 @@ + # + + +-# Copyright 2003 by ++# Copyright 2003-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/builds/dos/dos-gcc.mk b/builds/dos/dos-gcc.mk +index e14255c..991fb64 100644 +--- a/builds/dos/dos-gcc.mk ++++ b/builds/dos/dos-gcc.mk +@@ -3,7 +3,7 @@ + # + + +-# Copyright 1996-2000, 2003 by ++# Copyright 1996-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/builds/dos/dos-wat.mk b/builds/dos/dos-wat.mk +index c763b16..0c34a0d 100644 +--- a/builds/dos/dos-wat.mk ++++ b/builds/dos/dos-wat.mk +@@ -3,7 +3,7 @@ + # + + +-# Copyright 2003 by ++# Copyright 2003-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/builds/exports.mk b/builds/exports.mk +index 96b10db..687ced7 100644 +--- a/builds/exports.mk ++++ b/builds/exports.mk +@@ -3,7 +3,7 @@ + # + + +-# Copyright 2005, 2006 by ++# Copyright 2005-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/builds/freetype.mk b/builds/freetype.mk +index 5e874ac..8c2f353 100644 +--- a/builds/freetype.mk ++++ b/builds/freetype.mk +@@ -3,7 +3,7 @@ + # + + +-# Copyright 1996-2006, 2008, 2013, 2014 by ++# Copyright 1996-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/builds/link_dos.mk b/builds/link_dos.mk +index c37ac7e..694845b 100644 +--- a/builds/link_dos.mk ++++ b/builds/link_dos.mk +@@ -3,7 +3,7 @@ + # + + +-# Copyright 1996-2000 by ++# Copyright 1996-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/builds/link_std.mk b/builds/link_std.mk +index 0bd2163..886b2e6 100644 +--- a/builds/link_std.mk ++++ b/builds/link_std.mk +@@ -3,7 +3,7 @@ + # + + +-# Copyright 1996-2000 by ++# Copyright 1996-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/builds/mac/ftmac.c b/builds/mac/ftmac.c +index 27b5511..7e2f292 100644 +--- a/builds/mac/ftmac.c ++++ b/builds/mac/ftmac.c +@@ -5,7 +5,7 @@ + /* Mac FOND support. Written by just@letterror.com. */ + /* Heavily Fixed by mpsuzuki, George Williams and Sean McBride */ + /* */ +-/* Copyright 1996-2008, 2013, 2014 by */ ++/* Copyright 1996-2015 by */ + /* Just van Rossum, David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/builds/modules.mk b/builds/modules.mk +index 3c1b083..0b8b0c1 100644 +--- a/builds/modules.mk ++++ b/builds/modules.mk +@@ -3,7 +3,7 @@ + # + + +-# Copyright 1996-2000, 2003, 2006, 2008, 2014 by ++# Copyright 1996-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/builds/os2/detect.mk b/builds/os2/detect.mk +index 47a40a2..fde9327 100644 +--- a/builds/os2/detect.mk ++++ b/builds/os2/detect.mk +@@ -3,7 +3,7 @@ + # + + +-# Copyright 1996-2000, 2003, 2006 by ++# Copyright 1996-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/builds/os2/os2-def.mk b/builds/os2/os2-def.mk +index 01cda92..691036f 100644 +--- a/builds/os2/os2-def.mk ++++ b/builds/os2/os2-def.mk +@@ -3,7 +3,7 @@ + # + + +-# Copyright 1996-2000, 2003, 2005, 2006 by ++# Copyright 1996-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/builds/os2/os2-dev.mk b/builds/os2/os2-dev.mk +index 83da8de..eacf58f 100644 +--- a/builds/os2/os2-dev.mk ++++ b/builds/os2/os2-dev.mk +@@ -5,7 +5,7 @@ + # + + +-# Copyright 1996-2000, 2003, 2006 by ++# Copyright 1996-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/builds/os2/os2-gcc.mk b/builds/os2/os2-gcc.mk +index 446073e..8390a36 100644 +--- a/builds/os2/os2-gcc.mk ++++ b/builds/os2/os2-gcc.mk +@@ -3,7 +3,7 @@ + # + + +-# Copyright 1996-2000 by ++# Copyright 1996-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/builds/symbian/bld.inf b/builds/symbian/bld.inf +index bc8c160..2ab4228 100644 +--- a/builds/symbian/bld.inf ++++ b/builds/symbian/bld.inf +@@ -2,7 +2,7 @@ + // FreeType 2 project for the symbian platform + // + +-// Copyright 2008, 2009, 2013 by ++// Copyright 2008-2015 by + // David Turner, Robert Wilhelm, and Werner Lemberg. + // + // This file is part of the FreeType project, and may only be used, modified, +diff --git a/builds/symbian/freetype.mmp b/builds/symbian/freetype.mmp +index cb0008c..9ccdb68 100644 +--- a/builds/symbian/freetype.mmp ++++ b/builds/symbian/freetype.mmp +@@ -2,7 +2,7 @@ + // FreeType 2 makefile for the symbian platform + // + +-// Copyright 2008, 2009 by ++// Copyright 2008-2015 by + // David Turner, Robert Wilhelm, and Werner Lemberg. + // + // This file is part of the FreeType project, and may only be used, modified, +diff --git a/builds/toplevel.mk b/builds/toplevel.mk +index 16d4be8..7716068 100644 +--- a/builds/toplevel.mk ++++ b/builds/toplevel.mk +@@ -3,7 +3,7 @@ + # + + +-# Copyright 1996-2001, 2003, 2006, 2008-2010, 2012-2014 by ++# Copyright 1996-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/builds/unix/configure.raw b/builds/unix/configure.raw +index 72543cf..5d11598 100644 +--- a/builds/unix/configure.raw ++++ b/builds/unix/configure.raw +@@ -2,7 +2,7 @@ + # + # Process this file with autoconf to produce a configure script. + # +-# Copyright 2001-2014 by ++# Copyright 2001-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/builds/unix/detect.mk b/builds/unix/detect.mk +index 0506e7d..c9986df 100644 +--- a/builds/unix/detect.mk ++++ b/builds/unix/detect.mk +@@ -3,7 +3,7 @@ + # + + +-# Copyright 1996-2000, 2002-2004, 2006, 2013 by ++# Copyright 1996-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/builds/unix/freetype-config.in b/builds/unix/freetype-config.in +index ebc311f..269356c 100644 +--- a/builds/unix/freetype-config.in ++++ b/builds/unix/freetype-config.in +@@ -1,6 +1,6 @@ + #! /bin/sh + # +-# Copyright 2000-2005, 2008, 2009, 2013, 2014 by ++# Copyright 2000-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/builds/unix/freetype2.m4 b/builds/unix/freetype2.m4 +index 3a806d9..3dc8807 100644 +--- a/builds/unix/freetype2.m4 ++++ b/builds/unix/freetype2.m4 +@@ -1,7 +1,7 @@ + # Configure paths for FreeType2 + # Marcelo Magallon 2001-10-26, based on gtk.m4 by Owen Taylor + # +-# Copyright 2001, 2003, 2007, 2009, 2014 by ++# Copyright 2001-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/builds/unix/ft-munmap.m4 b/builds/unix/ft-munmap.m4 +index 68b3361..72b0864 100644 +--- a/builds/unix/ft-munmap.m4 ++++ b/builds/unix/ft-munmap.m4 +@@ -1,6 +1,6 @@ + ## FreeType specific autoconf tests + # +-# Copyright 2002, 2003, 2004 by ++# Copyright 2002-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/builds/unix/ftconfig.in b/builds/unix/ftconfig.in +index e66f3ea..6d28b61 100644 +--- a/builds/unix/ftconfig.in ++++ b/builds/unix/ftconfig.in +@@ -4,7 +4,7 @@ + /* */ + /* UNIX-specific configuration file (specification only). */ + /* */ +-/* Copyright 1996-2004, 2006-2009, 2011, 2013, 2014 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/builds/unix/ftsystem.c b/builds/unix/ftsystem.c +index 7f7b3ac..d7513d9 100644 +--- a/builds/unix/ftsystem.c ++++ b/builds/unix/ftsystem.c +@@ -4,7 +4,7 @@ + /* */ + /* Unix-specific FreeType low-level system interface (body). */ + /* */ +-/* Copyright 1996-2002, 2004-2008, 2013 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/builds/unix/install.mk b/builds/unix/install.mk +index 83525ee..35cff20 100644 +--- a/builds/unix/install.mk ++++ b/builds/unix/install.mk +@@ -3,7 +3,7 @@ + # + + +-# Copyright 1996-2000, 2002, 2003, 2006, 2013, 2014 by ++# Copyright 1996-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/builds/unix/unix-cc.in b/builds/unix/unix-cc.in +index b84bc5d..d53b25f 100644 +--- a/builds/unix/unix-cc.in ++++ b/builds/unix/unix-cc.in +@@ -2,7 +2,7 @@ + # FreeType 2 template for Unix-specific compiler definitions + # + +-# Copyright 1996-2000, 2002, 2003, 2005, 2006 by ++# Copyright 1996-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/builds/unix/unix-def.in b/builds/unix/unix-def.in +index 4c06a05..ed9fd1e 100644 +--- a/builds/unix/unix-def.in ++++ b/builds/unix/unix-def.in +@@ -3,7 +3,7 @@ + # + + +-# Copyright 1996-2000, 2002, 2004, 2006, 2008, 2013, 2014 by ++# Copyright 1996-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/builds/unix/unix-dev.mk b/builds/unix/unix-dev.mk +index 76bae38..62de344 100644 +--- a/builds/unix/unix-dev.mk ++++ b/builds/unix/unix-dev.mk +@@ -6,7 +6,7 @@ + # + + +-# Copyright 1996-2000, 2003, 2006 by ++# Copyright 1996-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/builds/unix/unix-lcc.mk b/builds/unix/unix-lcc.mk +index 6038e52..328cc80 100644 +--- a/builds/unix/unix-lcc.mk ++++ b/builds/unix/unix-lcc.mk +@@ -6,7 +6,7 @@ + # + + +-# Copyright 1996-2000 by ++# Copyright 1996-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/builds/unix/unix.mk b/builds/unix/unix.mk +index 7f9d9a3..542aa7f 100644 +--- a/builds/unix/unix.mk ++++ b/builds/unix/unix.mk +@@ -3,7 +3,7 @@ + # + + +-# Copyright 1996-2000, 2002, 2004, 2006 by ++# Copyright 1996-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/builds/unix/unixddef.mk b/builds/unix/unixddef.mk +index 130d6b0..f333640 100644 +--- a/builds/unix/unixddef.mk ++++ b/builds/unix/unixddef.mk +@@ -4,7 +4,7 @@ + # + + +-# Copyright 1996-2000, 2003, 2006 by ++# Copyright 1996-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/builds/vms/ftconfig.h b/builds/vms/ftconfig.h +index b309651..0e05028 100644 +--- a/builds/vms/ftconfig.h ++++ b/builds/vms/ftconfig.h +@@ -4,7 +4,7 @@ + /* */ + /* VMS-specific configuration file (specification only). */ + /* */ +-/* Copyright 1996-2004, 2006-2008, 2011, 2013, 2014 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/builds/vms/ftsystem.c b/builds/vms/ftsystem.c +index 5c2819e..74d3392 100644 +--- a/builds/vms/ftsystem.c ++++ b/builds/vms/ftsystem.c +@@ -4,7 +4,7 @@ + /* */ + /* VMS-specific FreeType low-level system interface (body). */ + /* */ +-/* Copyright 1996-2002, 2005, 2010, 2013 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/builds/wince/ftdebug.c b/builds/wince/ftdebug.c +index 24f9658..74c73b5 100644 +--- a/builds/wince/ftdebug.c ++++ b/builds/wince/ftdebug.c +@@ -4,7 +4,7 @@ + /* */ + /* Debugging and logging component for WinCE (body). */ + /* */ +-/* Copyright 1996-2002, 2005, 2008, 2009, 2013 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/builds/windows/detect.mk b/builds/windows/detect.mk +index 9dca261..26297f2 100644 +--- a/builds/windows/detect.mk ++++ b/builds/windows/detect.mk +@@ -3,7 +3,7 @@ + # + + +-# Copyright 1996-2000, 2003, 2004, 2006, 2007, 2014 by ++# Copyright 1996-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/builds/windows/ftdebug.c b/builds/windows/ftdebug.c +index dd2c2ad..2adcc52 100644 +--- a/builds/windows/ftdebug.c ++++ b/builds/windows/ftdebug.c +@@ -4,7 +4,7 @@ + /* */ + /* Debugging and logging component for Win32 (body). */ + /* */ +-/* Copyright 1996-2002, 2005, 2008, 2009, 2013 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/builds/windows/w32-bcc.mk b/builds/windows/w32-bcc.mk +index 87d8ea3..d483df5 100644 +--- a/builds/windows/w32-bcc.mk ++++ b/builds/windows/w32-bcc.mk +@@ -3,7 +3,7 @@ + # + + +-# Copyright 1996-2000, 2003, 2005, 2013 by ++# Copyright 1996-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/builds/windows/w32-bccd.mk b/builds/windows/w32-bccd.mk +index dd21edd..bd72ca1 100644 +--- a/builds/windows/w32-bccd.mk ++++ b/builds/windows/w32-bccd.mk +@@ -3,7 +3,7 @@ + # + + +-# Copyright 1996-2000, 2003, 2006, 2013 by ++# Copyright 1996-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/builds/windows/w32-dev.mk b/builds/windows/w32-dev.mk +index 3561229..11d1afd 100644 +--- a/builds/windows/w32-dev.mk ++++ b/builds/windows/w32-dev.mk +@@ -5,7 +5,7 @@ + # + + +-# Copyright 1996-2000, 2003, 2006, 2013 by ++# Copyright 1996-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/builds/windows/w32-gcc.mk b/builds/windows/w32-gcc.mk +index 3bbdd3c..1092fb7 100644 +--- a/builds/windows/w32-gcc.mk ++++ b/builds/windows/w32-gcc.mk +@@ -3,7 +3,7 @@ + # + + +-# Copyright 1996-2000, 2003, 2005, 2013 by ++# Copyright 1996-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/builds/windows/w32-icc.mk b/builds/windows/w32-icc.mk +index 44d26bd..b2dcbe5 100644 +--- a/builds/windows/w32-icc.mk ++++ b/builds/windows/w32-icc.mk +@@ -3,7 +3,7 @@ + # + + +-# Copyright 1996-2000, 2005, 2013 by ++# Copyright 1996-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/builds/windows/w32-intl.mk b/builds/windows/w32-intl.mk +index 0f3e22b..de9912f 100644 +--- a/builds/windows/w32-intl.mk ++++ b/builds/windows/w32-intl.mk +@@ -3,7 +3,7 @@ + # + + +-# Copyright 1996-2000, 2003, 2005, 2013 by ++# Copyright 1996-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/builds/windows/w32-lcc.mk b/builds/windows/w32-lcc.mk +index 8bd5b56..75979f3 100644 +--- a/builds/windows/w32-lcc.mk ++++ b/builds/windows/w32-lcc.mk +@@ -3,7 +3,7 @@ + # + + +-# Copyright 1996-2000, 2013 by ++# Copyright 1996-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/builds/windows/w32-mingw32.mk b/builds/windows/w32-mingw32.mk +index b35dbb0..1300a44 100644 +--- a/builds/windows/w32-mingw32.mk ++++ b/builds/windows/w32-mingw32.mk +@@ -3,7 +3,7 @@ + # + + +-# Copyright 1996-2000, 2003, 2005, 2013 by ++# Copyright 1996-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/builds/windows/w32-vcc.mk b/builds/windows/w32-vcc.mk +index 95f7685..fcf1aa0 100644 +--- a/builds/windows/w32-vcc.mk ++++ b/builds/windows/w32-vcc.mk +@@ -3,7 +3,7 @@ + # + + +-# Copyright 1996-2000, 2003, 2005, 2013 by ++# Copyright 1996-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/builds/windows/w32-wat.mk b/builds/windows/w32-wat.mk +index e1ddf66..cc5eaf0 100644 +--- a/builds/windows/w32-wat.mk ++++ b/builds/windows/w32-wat.mk +@@ -3,7 +3,7 @@ + # + + +-# Copyright 1996-2000, 2003, 2005, 2013 by ++# Copyright 1996-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/builds/windows/win32-def.mk b/builds/windows/win32-def.mk +index 61af5df..516c5cd 100644 +--- a/builds/windows/win32-def.mk ++++ b/builds/windows/win32-def.mk +@@ -3,7 +3,7 @@ + # + + +-# Copyright 1996-2000, 2003, 2005, 2006, 2013, 2014 by ++# Copyright 1996-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/configure b/configure +index 4d8a945..fd52581 100755 +--- a/configure ++++ b/configure +@@ -1,6 +1,6 @@ + #!/bin/sh + # +-# Copyright 2002-2006, 2008-2010, 2013 by ++# Copyright 2002-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/devel/ft2build.h b/devel/ft2build.h +index 6cc34b7..8e9653d 100644 +--- a/devel/ft2build.h ++++ b/devel/ft2build.h +@@ -4,7 +4,7 @@ + /* */ + /* FreeType 2 build and setup macros (development version). */ + /* */ +-/* Copyright 1996-2001, 2003, 2006, 2013 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/devel/ftoption.h b/devel/ftoption.h +index 3d0c77d..9dca321 100644 +--- a/devel/ftoption.h ++++ b/devel/ftoption.h +@@ -4,7 +4,7 @@ + /* */ + /* User-selectable configuration macros (specification only). */ + /* */ +-/* Copyright 1996-2014 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/docs/CHANGES b/docs/CHANGES +index 1d2d339..3a0dcd2 100644 +--- a/docs/CHANGES ++++ b/docs/CHANGES +@@ -4184,7 +4184,7 @@ Extensions support: + + ------------------------------------------------------------------------ + +-Copyright 2000-2013 by ++Copyright 2000-2015 by + David Turner, Robert Wilhelm, and Werner Lemberg. + + This file is part of the FreeType project, and may only be used, +diff --git a/docs/CUSTOMIZE b/docs/CUSTOMIZE +index dfadb46..831edf6 100644 +--- a/docs/CUSTOMIZE ++++ b/docs/CUSTOMIZE +@@ -138,7 +138,7 @@ IV. Overriding default configuration and module headers + + ---------------------------------------------------------------------- + +-Copyright 2003, 2005, 2006, 2012, 2013 by ++Copyright 2003-2015 by + David Turner, Robert Wilhelm, and Werner Lemberg. + + This file is part of the FreeType project, and may only be used, +diff --git a/docs/DEBUG b/docs/DEBUG +index d8c79d1..ab2c769 100644 +--- a/docs/DEBUG ++++ b/docs/DEBUG +@@ -191,7 +191,7 @@ behaviour of FreeType at runtime. + + ------------------------------------------------------------------------ + +-Copyright 2002-2005, 2009, 2013 by ++Copyright 2002-2015 by + David Turner, Robert Wilhelm, and Werner Lemberg. + + This file is part of the FreeType project, and may only be used, +diff --git a/docs/INSTALL b/docs/INSTALL +index 5bf8d65..193c530 100644 +--- a/docs/INSTALL ++++ b/docs/INSTALL +@@ -75,7 +75,7 @@ II. Custom builds of the library + + ---------------------------------------------------------------------- + +-Copyright 2000-2008, 2010-2011, 2013 by ++Copyright 2000-2015 by + David Turner, Robert Wilhelm, and Werner Lemberg. + + This file is part of the FreeType project, and may only be used, +diff --git a/docs/INSTALL.ANY b/docs/INSTALL.ANY +index 8aa394f..9249b23 100644 +--- a/docs/INSTALL.ANY ++++ b/docs/INSTALL.ANY +@@ -143,7 +143,7 @@ II. Support for flat-directory compilation + + ---------------------------------------------------------------------- + +-Copyright 2003, 2005, 2006, 2009, 2010, 2013 by ++Copyright 2003-2015 by + David Turner, Robert Wilhelm, and Werner Lemberg. + + This file is part of the FreeType project, and may only be used, +diff --git a/docs/INSTALL.CROSS b/docs/INSTALL.CROSS +index 8745613..a83638d 100644 +--- a/docs/INSTALL.CROSS ++++ b/docs/INSTALL.CROSS +@@ -163,7 +163,7 @@ procedure. + + ---------------------------------------------------------------------- + +-Copyright 2006, 2008, 2012, 2014 by ++Copyright 2006-2015 by + suzuki toshiya, David Turner, Robert Wilhelm, and Werner Lemberg. + + +diff --git a/docs/INSTALL.GNU b/docs/INSTALL.GNU +index 3b9e0a2..1a7c097 100644 +--- a/docs/INSTALL.GNU ++++ b/docs/INSTALL.GNU +@@ -148,7 +148,7 @@ instructions in the file `INSTALL.UNIX' instead. + + ---------------------------------------------------------------------- + +-Copyright 2003-2006, 2008, 2013, 2014 by ++Copyright 2003-2015 by + David Turner, Robert Wilhelm, and Werner Lemberg. + + This file is part of the FreeType project, and may only be used, +diff --git a/docs/INSTALL.UNIX b/docs/INSTALL.UNIX +index 251c749..0dab2c6 100644 +--- a/docs/INSTALL.UNIX ++++ b/docs/INSTALL.UNIX +@@ -102,7 +102,7 @@ or MSys on Win32: + + ---------------------------------------------------------------------- + +-Copyright 2003-2007, 2013, 2014 by ++Copyright 2003-2015 by + David Turner, Robert Wilhelm, and Werner Lemberg. + + This file is part of the FreeType project, and may only be used, +diff --git a/docs/INSTALL.VMS b/docs/INSTALL.VMS +index 994e566..48a323e 100644 +--- a/docs/INSTALL.VMS ++++ b/docs/INSTALL.VMS +@@ -49,7 +49,7 @@ V7.2-1. + + ------------------------------------------------------------------------ + +-Copyright 2000, 2004 by ++Copyright 2000-2015 by + David Turner, Robert Wilhelm, and Werner Lemberg. + + This file is part of the FreeType project, and may only be used, +diff --git a/docs/TODO b/docs/TODO +index be60d6f..43eeae3 100644 +--- a/docs/TODO ++++ b/docs/TODO +@@ -27,7 +27,7 @@ Other bugs have been registered at the savannah bugzilla of FreeType. + + ------------------------------------------------------------------------ + +-Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007 by ++Copyright 2001-2015 by + David Turner, Robert Wilhelm, and Werner Lemberg. + + This file is part of the FreeType project, and may only be used, +diff --git a/docs/VERSION.DLL b/docs/VERSION.DLL +index dd49261..dcc4579 100644 +--- a/docs/VERSION.DLL ++++ b/docs/VERSION.DLL +@@ -115,7 +115,7 @@ other release numbers. + + ------------------------------------------------------------------------ + +-Copyright 2002-2014 by ++Copyright 2002-2015 by + David Turner, Robert Wilhelm, and Werner Lemberg. + + This file is part of the FreeType project, and may only be used, +diff --git a/docs/formats.txt b/docs/formats.txt +index aed885c..4ffc97c 100644 +--- a/docs/formats.txt ++++ b/docs/formats.txt +@@ -161,7 +161,7 @@ MAC --- PS TYPE_1 --- type1 T1_SPEC.pdf + + ------------------------------------------------------------------------ + +-Copyright 2004, 2005, 2008, 2009, 2010 by ++Copyright 2004-2015 by + David Turner, Robert Wilhelm, and Werner Lemberg. + + This file is part of the FreeType project, and may only be used, +diff --git a/docs/raster.txt b/docs/raster.txt +index 95d9e24..dc55d64 100644 +--- a/docs/raster.txt ++++ b/docs/raster.txt +@@ -618,7 +618,7 @@ II. Rendering Technology + + ------------------------------------------------------------------------ + +-Copyright 2003, 2007 by ++Copyright 2003-2015 by + David Turner, Robert Wilhelm, and Werner Lemberg. + + This file is part of the FreeType project, and may only be used, +diff --git a/docs/release b/docs/release +index 98f16cd..bd92b23 100644 +--- a/docs/release ++++ b/docs/release +@@ -189,7 +189,7 @@ How to prepare a new release + + ---------------------------------------------------------------------- + +-Copyright 2003, 2005-2007, 2009, 2011-2014 by ++Copyright 2003-2015 by + David Turner, Robert Wilhelm, and Werner Lemberg. + + This file is part of the FreeType project, and may only be used, +diff --git a/include/config/ftconfig.h b/include/config/ftconfig.h +index 22d70fd..c165fa5 100644 +--- a/include/config/ftconfig.h ++++ b/include/config/ftconfig.h +@@ -4,7 +4,7 @@ + /* */ + /* ANSI-specific configuration file (specification only). */ + /* */ +-/* Copyright 1996-2004, 2006-2008, 2010-2011, 2013, 2014 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/include/config/ftheader.h b/include/config/ftheader.h +index b623629..0a9fcd3 100644 +--- a/include/config/ftheader.h ++++ b/include/config/ftheader.h +@@ -4,7 +4,7 @@ + /* */ + /* Build macros of the FreeType 2 library. */ + /* */ +-/* Copyright 1996-2008, 2010, 2012, 2013 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/include/config/ftoption.h b/include/config/ftoption.h +index c85519d..86de36b 100644 +--- a/include/config/ftoption.h ++++ b/include/config/ftoption.h +@@ -4,7 +4,7 @@ + /* */ + /* User-selectable configuration macros (specification only). */ + /* */ +-/* Copyright 1996-2014 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/include/config/ftstdlib.h b/include/config/ftstdlib.h +index b940efc..af7aaaf 100644 +--- a/include/config/ftstdlib.h ++++ b/include/config/ftstdlib.h +@@ -5,7 +5,7 @@ + /* ANSI-specific library and header configuration file (specification */ + /* only). */ + /* */ +-/* Copyright 2002-2007, 2009, 2011-2012 by */ ++/* Copyright 2002-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/include/freetype.h b/include/freetype.h +index 1022719..15455c6 100644 +--- a/include/freetype.h ++++ b/include/freetype.h +@@ -4,7 +4,7 @@ + /* */ + /* FreeType high-level API and common types (specification only). */ + /* */ +-/* Copyright 1996-2014 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/include/ft2build.h b/include/ft2build.h +index 6f8eb7f..09c19d4 100644 +--- a/include/ft2build.h ++++ b/include/ft2build.h +@@ -4,7 +4,7 @@ + /* */ + /* FreeType 2 build and setup macros. */ + /* */ +-/* Copyright 1996-2001, 2006, 2013 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/include/ftadvanc.h b/include/ftadvanc.h +index 955f93f..05fcd16 100644 +--- a/include/ftadvanc.h ++++ b/include/ftadvanc.h +@@ -4,7 +4,7 @@ + /* */ + /* Quick computation of advance widths (specification only). */ + /* */ +-/* Copyright 2008, 2013, 2014 by */ ++/* Copyright 2008-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/include/ftautoh.h b/include/ftautoh.h +index 59191ab..06941da 100644 +--- a/include/ftautoh.h ++++ b/include/ftautoh.h +@@ -4,7 +4,7 @@ + /* */ + /* FreeType API for controlling the auto-hinter (specification only). */ + /* */ +-/* Copyright 2012, 2013 by */ ++/* Copyright 2012-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/include/ftbbox.h b/include/ftbbox.h +index d6800e2..9d9d040 100644 +--- a/include/ftbbox.h ++++ b/include/ftbbox.h +@@ -4,7 +4,7 @@ + /* */ + /* FreeType exact bbox computation (specification). */ + /* */ +-/* Copyright 1996-2001, 2003, 2007, 2011, 2013 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/include/ftbdf.h b/include/ftbdf.h +index 6d262e4..0bdabf4 100644 +--- a/include/ftbdf.h ++++ b/include/ftbdf.h +@@ -4,7 +4,7 @@ + /* */ + /* FreeType API for accessing BDF-specific strings (specification). */ + /* */ +-/* Copyright 2002-2004, 2006, 2009, 2014 by */ ++/* Copyright 2002-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/include/ftbitmap.h b/include/ftbitmap.h +index eae7169..4a1e83c 100644 +--- a/include/ftbitmap.h ++++ b/include/ftbitmap.h +@@ -4,7 +4,7 @@ + /* */ + /* FreeType utility functions for bitmaps (specification). */ + /* */ +-/* Copyright 2004-2006, 2008, 2013, 2014 by */ ++/* Copyright 2004-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/include/ftbzip2.h b/include/ftbzip2.h +index 4dce161..c25f946 100644 +--- a/include/ftbzip2.h ++++ b/include/ftbzip2.h +@@ -4,7 +4,7 @@ + /* */ + /* Bzip2-compressed stream support. */ + /* */ +-/* Copyright 2010 by */ ++/* Copyright 2010-2015 by */ + /* Joel Klinghed. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/include/ftcache.h b/include/ftcache.h +index a30e925..c1a7555 100644 +--- a/include/ftcache.h ++++ b/include/ftcache.h +@@ -4,7 +4,7 @@ + /* */ + /* FreeType Cache subsystem (specification). */ + /* */ +-/* Copyright 1996-2008, 2010, 2013, 2014 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/include/ftcffdrv.h b/include/ftcffdrv.h +index f7031bc..6c8e416 100644 +--- a/include/ftcffdrv.h ++++ b/include/ftcffdrv.h +@@ -4,7 +4,7 @@ + /* */ + /* FreeType API for controlling the CFF driver (specification only). */ + /* */ +-/* Copyright 2013, 2014 by */ ++/* Copyright 2013-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/include/ftcid.h b/include/ftcid.h +index 01b4832..05741c8 100644 +--- a/include/ftcid.h ++++ b/include/ftcid.h +@@ -4,7 +4,7 @@ + /* */ + /* FreeType API for accessing CID font information (specification). */ + /* */ +-/* Copyright 2007, 2009 by */ ++/* Copyright 2007-2015 by */ + /* Dereg Clegg and Michael Toftdal. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/include/fterrdef.h b/include/fterrdef.h +index 99b2fad..1bf0751 100644 +--- a/include/fterrdef.h ++++ b/include/fterrdef.h +@@ -4,7 +4,7 @@ + /* */ + /* FreeType error codes (specification). */ + /* */ +-/* Copyright 2002, 2004, 2006, 2007, 2010-2013 by */ ++/* Copyright 2002-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/include/fterrors.h b/include/fterrors.h +index 0fa3e4d..376bee6 100644 +--- a/include/fterrors.h ++++ b/include/fterrors.h +@@ -4,7 +4,7 @@ + /* */ + /* FreeType error code handling (specification). */ + /* */ +-/* Copyright 1996-2002, 2004, 2007, 2013 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/include/ftgasp.h b/include/ftgasp.h +index 3f3d765..9a9b632 100644 +--- a/include/ftgasp.h ++++ b/include/ftgasp.h +@@ -4,7 +4,7 @@ + /* */ + /* Access of TrueType's `gasp' table (specification). */ + /* */ +-/* Copyright 2007, 2008, 2011 by */ ++/* Copyright 2007-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/include/ftglyph.h b/include/ftglyph.h +index 15fa6a9..803ad39 100644 +--- a/include/ftglyph.h ++++ b/include/ftglyph.h +@@ -4,7 +4,7 @@ + /* */ + /* FreeType convenience functions to handle glyphs (specification). */ + /* */ +-/* Copyright 1996-2003, 2006, 2008, 2009, 2011, 2013, 2014 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/include/ftgxval.h b/include/ftgxval.h +index 88c3d93..0e9ac1d 100644 +--- a/include/ftgxval.h ++++ b/include/ftgxval.h +@@ -4,7 +4,7 @@ + /* */ + /* FreeType API for validating TrueTypeGX/AAT tables (specification). */ + /* */ +-/* Copyright 2004-2006, 2013 by */ ++/* Copyright 2004-2015 by */ + /* Masatake YAMATO, Redhat K.K, */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ +diff --git a/include/ftgzip.h b/include/ftgzip.h +index eb346c6..b3a532d 100644 +--- a/include/ftgzip.h ++++ b/include/ftgzip.h +@@ -4,7 +4,7 @@ + /* */ + /* Gzip-compressed stream support. */ + /* */ +-/* Copyright 2002-2004, 2006, 2013 by */ ++/* Copyright 2002-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/include/ftimage.h b/include/ftimage.h +index 42815c0..6b15b2d 100644 +--- a/include/ftimage.h ++++ b/include/ftimage.h +@@ -5,7 +5,7 @@ + /* FreeType glyph image formats and default raster interface */ + /* (specification). */ + /* */ +-/* Copyright 1996-2010, 2013, 2014 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/include/ftincrem.h b/include/ftincrem.h +index 4c0246c..840af25 100644 +--- a/include/ftincrem.h ++++ b/include/ftincrem.h +@@ -4,7 +4,7 @@ + /* */ + /* FreeType incremental loading (specification). */ + /* */ +-/* Copyright 2002, 2003, 2006-2008, 2010, 2014 by */ ++/* Copyright 2002-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/include/ftlcdfil.h b/include/ftlcdfil.h +index e8679c1..4cd999a 100644 +--- a/include/ftlcdfil.h ++++ b/include/ftlcdfil.h +@@ -5,7 +5,7 @@ + /* FreeType API for color filtering of subpixel bitmap glyphs */ + /* (specification). */ + /* */ +-/* Copyright 2006-2008, 2010, 2013, 2014 by */ ++/* Copyright 2006-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/include/ftlist.h b/include/ftlist.h +index 9950a27..12b48c7 100644 +--- a/include/ftlist.h ++++ b/include/ftlist.h +@@ -4,7 +4,7 @@ + /* */ + /* Generic list support for FreeType (specification). */ + /* */ +-/* Copyright 1996-2001, 2003, 2007, 2010, 2013, 2014 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/include/ftlzw.h b/include/ftlzw.h +index 857c0c5..d3ec28e 100644 +--- a/include/ftlzw.h ++++ b/include/ftlzw.h +@@ -4,7 +4,7 @@ + /* */ + /* LZW-compressed stream support. */ + /* */ +-/* Copyright 2004, 2006 by */ ++/* Copyright 2004-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/include/ftmac.h b/include/ftmac.h +index 42874fe..14c55cf 100644 +--- a/include/ftmac.h ++++ b/include/ftmac.h +@@ -4,7 +4,7 @@ + /* */ + /* Additional Mac-specific API. */ + /* */ +-/* Copyright 1996-2001, 2004, 2006, 2007, 2013 by */ ++/* Copyright 1996-2015 by */ + /* Just van Rossum, David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/include/ftmm.h b/include/ftmm.h +index 2dcfd67..7d079f6 100644 +--- a/include/ftmm.h ++++ b/include/ftmm.h +@@ -4,7 +4,7 @@ + /* */ + /* FreeType Multiple Master font interface (specification). */ + /* */ +-/* Copyright 1996-2001, 2003, 2004, 2006, 2009, 2013 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/include/ftmodapi.h b/include/ftmodapi.h +index 980f15d..95aef3a 100644 +--- a/include/ftmodapi.h ++++ b/include/ftmodapi.h +@@ -4,7 +4,7 @@ + /* */ + /* FreeType modules public interface (specification). */ + /* */ +-/* Copyright 1996-2003, 2006, 2008-2010, 2012, 2013 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/include/ftmoderr.h b/include/ftmoderr.h +index 5a27db1..9d7f981 100644 +--- a/include/ftmoderr.h ++++ b/include/ftmoderr.h +@@ -4,7 +4,7 @@ + /* */ + /* FreeType module error offsets (specification). */ + /* */ +-/* Copyright 2001-2005, 2010, 2013 by */ ++/* Copyright 2001-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/include/ftotval.h b/include/ftotval.h +index 75ba03e..e744b71 100644 +--- a/include/ftotval.h ++++ b/include/ftotval.h +@@ -4,7 +4,7 @@ + /* */ + /* FreeType API for validating OpenType tables (specification). */ + /* */ +-/* Copyright 2004-2007, 2013, 2014 by */ ++/* Copyright 2004-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/include/ftoutln.h b/include/ftoutln.h +index d3b8fbd..106cfde 100644 +--- a/include/ftoutln.h ++++ b/include/ftoutln.h +@@ -5,7 +5,7 @@ + /* Support for the FT_Outline type used to store glyph shapes of */ + /* most scalable font formats (specification). */ + /* */ +-/* Copyright 1996-2003, 2005-2014 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/include/ftpfr.h b/include/ftpfr.h +index 7d50353..a1c02a2 100644 +--- a/include/ftpfr.h ++++ b/include/ftpfr.h +@@ -4,7 +4,7 @@ + /* */ + /* FreeType API for accessing PFR-specific data (specification only). */ + /* */ +-/* Copyright 2002, 2003, 2004, 2006, 2008, 2009 by */ ++/* Copyright 2002-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/include/ftrender.h b/include/ftrender.h +index 58a9716..ec8da70 100644 +--- a/include/ftrender.h ++++ b/include/ftrender.h +@@ -4,7 +4,7 @@ + /* */ + /* FreeType renderer modules public interface (specification). */ + /* */ +-/* Copyright 1996-2001, 2005, 2006, 2010 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/include/ftsizes.h b/include/ftsizes.h +index 4167045..bef8424 100644 +--- a/include/ftsizes.h ++++ b/include/ftsizes.h +@@ -4,7 +4,7 @@ + /* */ + /* FreeType size objects management (specification). */ + /* */ +-/* Copyright 1996-2001, 2003, 2004, 2006, 2009, 2013 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/include/ftsnames.h b/include/ftsnames.h +index 88af440..0f7fbe1 100644 +--- a/include/ftsnames.h ++++ b/include/ftsnames.h +@@ -7,7 +7,7 @@ + /* */ + /* This is _not_ used to retrieve glyph names! */ + /* */ +-/* Copyright 1996-2003, 2006, 2009, 2010, 2013 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/include/ftstroke.h b/include/ftstroke.h +index bd31170..7ebb1e7 100644 +--- a/include/ftstroke.h ++++ b/include/ftstroke.h +@@ -4,7 +4,7 @@ + /* */ + /* FreeType path stroker (specification). */ + /* */ +-/* Copyright 2002-2006, 2008, 2009, 2011-2012, 2014 by */ ++/* Copyright 2002-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/include/ftsynth.h b/include/ftsynth.h +index d0ea730..ca7f2c7 100644 +--- a/include/ftsynth.h ++++ b/include/ftsynth.h +@@ -5,7 +5,7 @@ + /* FreeType synthesizing code for emboldening and slanting */ + /* (specification). */ + /* */ +-/* Copyright 2000-2001, 2003, 2006, 2008, 2012, 2013 by */ ++/* Copyright 2000-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/include/ftsystem.h b/include/ftsystem.h +index 7436ed2..2bc9999 100644 +--- a/include/ftsystem.h ++++ b/include/ftsystem.h +@@ -4,7 +4,7 @@ + /* */ + /* FreeType low-level system interface definition (specification). */ + /* */ +-/* Copyright 1996-2001, 2002, 2005, 2010, 2014 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/include/fttrigon.h b/include/fttrigon.h +index 9c7b543..3d821ba 100644 +--- a/include/fttrigon.h ++++ b/include/fttrigon.h +@@ -4,7 +4,7 @@ + /* */ + /* FreeType trigonometric functions (specification). */ + /* */ +-/* Copyright 2001, 2003, 2005, 2007, 2013 by */ ++/* Copyright 2001-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/include/ftttdrv.h b/include/ftttdrv.h +index 3588413..f1a7714 100644 +--- a/include/ftttdrv.h ++++ b/include/ftttdrv.h +@@ -5,7 +5,7 @@ + /* FreeType API for controlling the TrueType driver */ + /* (specification only). */ + /* */ +-/* Copyright 2013 by */ ++/* Copyright 2013-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/include/fttypes.h b/include/fttypes.h +index 2c01e87..706a1be 100644 +--- a/include/fttypes.h ++++ b/include/fttypes.h +@@ -4,7 +4,7 @@ + /* */ + /* FreeType simple types definitions (specification only). */ + /* */ +-/* Copyright 1996-2002, 2004, 2006-2009, 2012-2014 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/include/ftwinfnt.h b/include/ftwinfnt.h +index 5026158..356a710 100644 +--- a/include/ftwinfnt.h ++++ b/include/ftwinfnt.h +@@ -4,7 +4,7 @@ + /* */ + /* FreeType API for accessing Windows fnt-specific data. */ + /* */ +-/* Copyright 2003, 2004, 2008 by */ ++/* Copyright 2003-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/include/ftxf86.h b/include/ftxf86.h +index 89d1993..2269b4e 100644 +--- a/include/ftxf86.h ++++ b/include/ftxf86.h +@@ -4,7 +4,7 @@ + /* */ + /* Support functions for X11. */ + /* */ +-/* Copyright 2002-2004, 2006, 2007, 2013 by */ ++/* Copyright 2002-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/include/internal/autohint.h b/include/internal/autohint.h +index 545de93..8d5a977 100644 +--- a/include/internal/autohint.h ++++ b/include/internal/autohint.h +@@ -4,7 +4,7 @@ + /* */ + /* High-level `autohint' module-specific interface (specification). */ + /* */ +-/* Copyright 1996-2002, 2007, 2009, 2012 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/include/internal/ftcalc.h b/include/internal/ftcalc.h +index 14ec37b..75752c3 100644 +--- a/include/internal/ftcalc.h ++++ b/include/internal/ftcalc.h +@@ -4,7 +4,7 @@ + /* */ + /* Arithmetic computations (specification). */ + /* */ +-/* Copyright 1996-2006, 2008, 2009, 2012-2014 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/include/internal/ftdebug.h b/include/internal/ftdebug.h +index 58a3916..edd3b49 100644 +--- a/include/internal/ftdebug.h ++++ b/include/internal/ftdebug.h +@@ -4,7 +4,7 @@ + /* */ + /* Debugging and logging component (specification). */ + /* */ +-/* Copyright 1996-2002, 2004, 2006-2009, 2013 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/include/internal/ftdriver.h b/include/internal/ftdriver.h +index 940218e..16856d3 100644 +--- a/include/internal/ftdriver.h ++++ b/include/internal/ftdriver.h +@@ -4,7 +4,7 @@ + /* */ + /* FreeType font driver interface (specification). */ + /* */ +-/* Copyright 1996-2003, 2006, 2008, 2011-2013 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/include/internal/ftgloadr.h b/include/internal/ftgloadr.h +index f70774f..2364937 100644 +--- a/include/internal/ftgloadr.h ++++ b/include/internal/ftgloadr.h +@@ -4,7 +4,7 @@ + /* */ + /* The FreeType glyph loader (specification). */ + /* */ +-/* Copyright 2002, 2003, 2005, 2006 by */ ++/* Copyright 2002-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/include/internal/ftmemory.h b/include/internal/ftmemory.h +index 3d51aee..87577af 100644 +--- a/include/internal/ftmemory.h ++++ b/include/internal/ftmemory.h +@@ -4,7 +4,7 @@ + /* */ + /* The FreeType memory management macros (specification). */ + /* */ +-/* Copyright 1996-2002, 2004-2007, 2010, 2013 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/include/internal/ftobjs.h b/include/internal/ftobjs.h +index 2014a95..f08b8fa 100644 +--- a/include/internal/ftobjs.h ++++ b/include/internal/ftobjs.h +@@ -4,7 +4,7 @@ + /* */ + /* The FreeType private base classes (specification). */ + /* */ +-/* Copyright 1996-2006, 2008, 2010, 2012-2013 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/include/internal/ftpic.h b/include/internal/ftpic.h +index 485ce7a..7f9154f 100644 +--- a/include/internal/ftpic.h ++++ b/include/internal/ftpic.h +@@ -4,7 +4,7 @@ + /* */ + /* The FreeType position independent code services (declaration). */ + /* */ +-/* Copyright 2009, 2012 by */ ++/* Copyright 2009-2015 by */ + /* Oran Agra and Mickey Gabel. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/include/internal/ftrfork.h b/include/internal/ftrfork.h +index d750cbe..5885dcd 100644 +--- a/include/internal/ftrfork.h ++++ b/include/internal/ftrfork.h +@@ -4,7 +4,7 @@ + /* */ + /* Embedded resource forks accessor (specification). */ + /* */ +-/* Copyright 2004, 2006, 2007, 2012, 2013 by */ ++/* Copyright 2004-2015 by */ + /* Masatake YAMATO and Redhat K.K. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/include/internal/ftserv.h b/include/internal/ftserv.h +index 1203ec8..af9690d 100644 +--- a/include/internal/ftserv.h ++++ b/include/internal/ftserv.h +@@ -4,7 +4,7 @@ + /* */ + /* The FreeType services (specification only). */ + /* */ +-/* Copyright 2003-2007, 2009, 2012, 2013 by */ ++/* Copyright 2003-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/include/internal/ftstream.h b/include/internal/ftstream.h +index 2661858..b37e7fa 100644 +--- a/include/internal/ftstream.h ++++ b/include/internal/ftstream.h +@@ -4,7 +4,7 @@ + /* */ + /* Stream handling (specification). */ + /* */ +-/* Copyright 1996-2002, 2004-2006, 2011, 2013 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/include/internal/fttrace.h b/include/internal/fttrace.h +index d5253db..9d28d21 100644 +--- a/include/internal/fttrace.h ++++ b/include/internal/fttrace.h +@@ -4,7 +4,7 @@ + /* */ + /* Tracing handling (specification only). */ + /* */ +-/* Copyright 2002, 2004-2007, 2009, 2011-2014 by */ ++/* Copyright 2002-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/include/internal/ftvalid.h b/include/internal/ftvalid.h +index c281b14..9cda6ee 100644 +--- a/include/internal/ftvalid.h ++++ b/include/internal/ftvalid.h +@@ -4,7 +4,7 @@ + /* */ + /* FreeType validation support (specification). */ + /* */ +-/* Copyright 2004, 2013, 2014 by */ ++/* Copyright 2004-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/include/internal/internal.h b/include/internal/internal.h +index e0ddb06..1c1fd0e 100644 +--- a/include/internal/internal.h ++++ b/include/internal/internal.h +@@ -4,7 +4,7 @@ + /* */ + /* Internal header files (specification only). */ + /* */ +-/* Copyright 1996-2004, 2013 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/include/internal/psaux.h b/include/internal/psaux.h +index e903114..4f36111 100644 +--- a/include/internal/psaux.h ++++ b/include/internal/psaux.h +@@ -5,7 +5,7 @@ + /* Auxiliary functions and data structures related to PostScript fonts */ + /* (specification). */ + /* */ +-/* Copyright 1996-2004, 2006, 2008, 2009, 2012 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/include/internal/pshints.h b/include/internal/pshints.h +index f05ea68..21e4466 100644 +--- a/include/internal/pshints.h ++++ b/include/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-2003, 2005-2007, 2009, 2012, 2014 by */ ++/* Copyright 2001-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/include/internal/services/svbdf.h b/include/internal/services/svbdf.h +index 0974752..865b536 100644 +--- a/include/internal/services/svbdf.h ++++ b/include/internal/services/svbdf.h +@@ -4,7 +4,7 @@ + /* */ + /* The FreeType BDF services (specification). */ + /* */ +-/* Copyright 2003, 2009, 2012 by */ ++/* Copyright 2003-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/include/internal/services/svcid.h b/include/internal/services/svcid.h +index e0944d6..4a535a6 100644 +--- a/include/internal/services/svcid.h ++++ b/include/internal/services/svcid.h +@@ -4,7 +4,7 @@ + /* */ + /* The FreeType CID font services (specification). */ + /* */ +-/* Copyright 2007, 2009, 2012 by */ ++/* Copyright 2007-2015 by */ + /* Derek Clegg and Michael Toftdal. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/include/internal/services/svgldict.h b/include/internal/services/svgldict.h +index 1d12534..f78bca5 100644 +--- a/include/internal/services/svgldict.h ++++ b/include/internal/services/svgldict.h +@@ -4,7 +4,7 @@ + /* */ + /* The FreeType glyph dictionary services (specification). */ + /* */ +-/* Copyright 2003, 2009, 2012 by */ ++/* Copyright 2003-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/include/internal/services/svgxval.h b/include/internal/services/svgxval.h +index 2cdab50..59cc3b7 100644 +--- a/include/internal/services/svgxval.h ++++ b/include/internal/services/svgxval.h +@@ -4,7 +4,7 @@ + /* */ + /* FreeType API for validating TrueTypeGX/AAT tables (specification). */ + /* */ +-/* Copyright 2004, 2005 by */ ++/* Copyright 2004-2015 by */ + /* Masatake YAMATO, Red Hat K.K., */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ +diff --git a/include/internal/services/svkern.h b/include/internal/services/svkern.h +index 1488adf..bc26f15 100644 +--- a/include/internal/services/svkern.h ++++ b/include/internal/services/svkern.h +@@ -4,7 +4,7 @@ + /* */ + /* The FreeType Kerning service (specification). */ + /* */ +-/* Copyright 2006 by */ ++/* Copyright 2006-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/include/internal/services/svmm.h b/include/internal/services/svmm.h +index b08a663..f2cecfb 100644 +--- a/include/internal/services/svmm.h ++++ b/include/internal/services/svmm.h +@@ -4,7 +4,7 @@ + /* */ + /* The FreeType Multiple Masters and GX var services (specification). */ + /* */ +-/* Copyright 2003, 2004, 2009, 2012 by */ ++/* Copyright 2003-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/include/internal/services/svotval.h b/include/internal/services/svotval.h +index 970bbd5..a82a642 100644 +--- a/include/internal/services/svotval.h ++++ b/include/internal/services/svotval.h +@@ -4,7 +4,7 @@ + /* */ + /* The FreeType OpenType validation service (specification). */ + /* */ +-/* Copyright 2004, 2006 by */ ++/* Copyright 2004-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/include/internal/services/svpfr.h b/include/internal/services/svpfr.h +index 462786f..d4eb169 100644 +--- a/include/internal/services/svpfr.h ++++ b/include/internal/services/svpfr.h +@@ -4,7 +4,7 @@ + /* */ + /* Internal PFR service functions (specification). */ + /* */ +-/* Copyright 2003, 2006 by */ ++/* Copyright 2003-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/include/internal/services/svpostnm.h b/include/internal/services/svpostnm.h +index a76b4fe..a89f79e 100644 +--- a/include/internal/services/svpostnm.h ++++ b/include/internal/services/svpostnm.h +@@ -4,7 +4,7 @@ + /* */ + /* The FreeType PostScript name services (specification). */ + /* */ +-/* Copyright 2003, 2007, 2009, 2012 by */ ++/* Copyright 2003-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/include/internal/services/svprop.h b/include/internal/services/svprop.h +index 22da0bb..c9f07ce 100644 +--- a/include/internal/services/svprop.h ++++ b/include/internal/services/svprop.h +@@ -4,7 +4,7 @@ + /* */ + /* The FreeType property service (specification). */ + /* */ +-/* Copyright 2012 by */ ++/* Copyright 2012-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/include/internal/services/svpscmap.h b/include/internal/services/svpscmap.h +index 030948e..66da6e1 100644 +--- a/include/internal/services/svpscmap.h ++++ b/include/internal/services/svpscmap.h +@@ -4,7 +4,7 @@ + /* */ + /* The FreeType PostScript charmap service (specification). */ + /* */ +-/* Copyright 2003, 2006, 2009, 2012 by */ ++/* Copyright 2003-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/include/internal/services/svpsinfo.h b/include/internal/services/svpsinfo.h +index 4bfb506..752a266 100644 +--- a/include/internal/services/svpsinfo.h ++++ b/include/internal/services/svpsinfo.h +@@ -4,7 +4,7 @@ + /* */ + /* The FreeType PostScript info service (specification). */ + /* */ +-/* Copyright 2003, 2004, 2009, 2011, 2012 by */ ++/* Copyright 2003-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/include/internal/services/svsfnt.h b/include/internal/services/svsfnt.h +index d3835aa..252ae1c 100644 +--- a/include/internal/services/svsfnt.h ++++ b/include/internal/services/svsfnt.h +@@ -4,7 +4,7 @@ + /* */ + /* The FreeType SFNT table loading service (specification). */ + /* */ +-/* Copyright 2003, 2004, 2009, 2012 by */ ++/* Copyright 2003-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/include/internal/services/svttcmap.h b/include/internal/services/svttcmap.h +index 4370f4c..ed31843 100644 +--- a/include/internal/services/svttcmap.h ++++ b/include/internal/services/svttcmap.h +@@ -4,7 +4,7 @@ + /* */ + /* The FreeType TrueType/sfnt cmap extra information service. */ + /* */ +-/* Copyright 2003 by */ ++/* Copyright 2003-2015 by */ + /* Masatake YAMATO, Redhat K.K. */ + /* */ + /* Copyright 2003, 2008, 2009, 2012, 2013 by */ +diff --git a/include/internal/services/svtteng.h b/include/internal/services/svtteng.h +index 58e02a6..272ee8c 100644 +--- a/include/internal/services/svtteng.h ++++ b/include/internal/services/svtteng.h +@@ -4,7 +4,7 @@ + /* */ + /* The FreeType TrueType engine query service (specification). */ + /* */ +-/* Copyright 2006 by */ ++/* Copyright 2006-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/include/internal/services/svttglyf.h b/include/internal/services/svttglyf.h +index 3ba8a1f..f5cb76a 100644 +--- a/include/internal/services/svttglyf.h ++++ b/include/internal/services/svttglyf.h +@@ -4,7 +4,7 @@ + /* */ + /* The FreeType TrueType glyph service. */ + /* */ +-/* Copyright 2007, 2009, 2012 by */ ++/* Copyright 2007-2015 by */ + /* David Turner. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/include/internal/services/svwinfnt.h b/include/internal/services/svwinfnt.h +index 57f7765..0036929 100644 +--- a/include/internal/services/svwinfnt.h ++++ b/include/internal/services/svwinfnt.h +@@ -4,7 +4,7 @@ + /* */ + /* The FreeType Windows FNT/FONT service (specification). */ + /* */ +-/* Copyright 2003 by */ ++/* Copyright 2003-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/include/internal/services/svxf86nm.h b/include/internal/services/svxf86nm.h +index ca5d884..fd447ee 100644 +--- a/include/internal/services/svxf86nm.h ++++ b/include/internal/services/svxf86nm.h +@@ -4,7 +4,7 @@ + /* */ + /* The FreeType XFree86 services (specification only). */ + /* */ +-/* Copyright 2003 by */ ++/* Copyright 2003-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/include/internal/sfnt.h b/include/internal/sfnt.h +index d558e86..97ce390 100644 +--- a/include/internal/sfnt.h ++++ b/include/internal/sfnt.h +@@ -4,7 +4,7 @@ + /* */ + /* High-level `sfnt' driver interface (specification). */ + /* */ +-/* Copyright 1996-2006, 2009, 2012-2014 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/include/internal/t1types.h b/include/internal/t1types.h +index e20237c..7dec4fc 100644 +--- a/include/internal/t1types.h ++++ b/include/internal/t1types.h +@@ -5,7 +5,7 @@ + /* Basic Type1/Type2 type definitions and interface (specification */ + /* only). */ + /* */ +-/* Copyright 1996-2004, 2006, 2008, 2009, 2011, 2013 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/include/internal/tttypes.h b/include/internal/tttypes.h +index ad302b8..6c1b52b 100644 +--- a/include/internal/tttypes.h ++++ b/include/internal/tttypes.h +@@ -5,7 +5,7 @@ + /* Basic SFNT/TrueType type definitions and interface (specification */ + /* only). */ + /* */ +-/* Copyright 1996-2002, 2004-2008, 2012-2013 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/include/t1tables.h b/include/t1tables.h +index 61aefdd..632be5a 100644 +--- a/include/t1tables.h ++++ b/include/t1tables.h +@@ -5,7 +5,7 @@ + /* Basic Type 1/Type 2 tables definitions and interface (specification */ + /* only). */ + /* */ +-/* Copyright 1996-2004, 2006, 2008, 2009, 2011, 2014 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/include/ttnameid.h b/include/ttnameid.h +index e65b558..873b266 100644 +--- a/include/ttnameid.h ++++ b/include/ttnameid.h +@@ -4,7 +4,7 @@ + /* */ + /* TrueType name ID definitions (specification only). */ + /* */ +-/* Copyright 1996-2004, 2006-2008, 2012-2014 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/include/tttables.h b/include/tttables.h +index e1d8b05..ec0070a 100644 +--- a/include/tttables.h ++++ b/include/tttables.h +@@ -5,7 +5,7 @@ + /* Basic SFNT/TrueType tables definitions and interface */ + /* (specification only). */ + /* */ +-/* Copyright 1996-2005, 2008-2014 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/include/tttags.h b/include/tttags.h +index d59aa19..3836c7b 100644 +--- a/include/tttags.h ++++ b/include/tttags.h +@@ -4,7 +4,7 @@ + /* */ + /* Tags for TrueType and OpenType tables (specification only). */ + /* */ +-/* Copyright 1996-2001, 2004, 2005, 2007, 2008, 2013 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/include/ttunpat.h b/include/ttunpat.h +index bf53ddd..8ea5568 100644 +--- a/include/ttunpat.h ++++ b/include/ttunpat.h +@@ -4,7 +4,7 @@ + /* */ + /* Definitions for the unpatented TrueType hinting system */ + /* */ +-/* Copyright 2003, 2006 by */ ++/* Copyright 2003-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* Written by Graham Asher <graham.asher@btinternet.com> */ +diff --git a/modules.cfg b/modules.cfg +index 4e52594..ccb18d5 100644 +--- a/modules.cfg ++++ b/modules.cfg +@@ -1,6 +1,6 @@ + # modules.cfg + # +-# Copyright 2005-2007, 2009-2011, 2013 by ++# Copyright 2005-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/src/Jamfile b/src/Jamfile +index 1cc0685..7a9ee96 100644 +--- a/src/Jamfile ++++ b/src/Jamfile +@@ -1,6 +1,6 @@ + # FreeType 2 src Jamfile + # +-# Copyright 2001, 2002, 2013 by ++# Copyright 2001-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/src/autofit/Jamfile b/src/autofit/Jamfile +index 2714765..6600a34 100644 +--- a/src/autofit/Jamfile ++++ b/src/autofit/Jamfile +@@ -1,6 +1,6 @@ + # FreeType 2 src/autofit Jamfile + # +-# Copyright 2003, 2004, 2005, 2006, 2007, 2009 by ++# Copyright 2003-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/src/autofit/afangles.c b/src/autofit/afangles.c +index f8b095b..a35c9b3 100644 +--- a/src/autofit/afangles.c ++++ b/src/autofit/afangles.c +@@ -5,7 +5,7 @@ + /* Routines used to compute vector angles with limited accuracy */ + /* and very high speed. It also contains sorting routines (body). */ + /* */ +-/* Copyright 2003-2006, 2011-2012 by */ ++/* Copyright 2003-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/autofit/afblue.c b/src/autofit/afblue.c +index 811226e..03c276c 100644 +--- a/src/autofit/afblue.c ++++ b/src/autofit/afblue.c +@@ -7,7 +7,7 @@ + /* */ + /* Auto-fitter data for blue strings (body). */ + /* */ +-/* Copyright 2013 by */ ++/* Copyright 2013-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/autofit/afblue.cin b/src/autofit/afblue.cin +index c6762be..b303a4b 100644 +--- a/src/autofit/afblue.cin ++++ b/src/autofit/afblue.cin +@@ -4,7 +4,7 @@ + /* */ + /* Auto-fitter data for blue strings (body). */ + /* */ +-/* Copyright 2013 by */ ++/* Copyright 2013-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/autofit/afblue.dat b/src/autofit/afblue.dat +index 3f98c13..4d811a4 100644 +--- a/src/autofit/afblue.dat ++++ b/src/autofit/afblue.dat +@@ -2,7 +2,7 @@ + // + // Auto-fitter data for blue strings. + // +-// Copyright 2013, 2014 by ++// Copyright 2013-2015 by + // David Turner, Robert Wilhelm, and Werner Lemberg. + // + // This file is part of the FreeType project, and may only be used, +diff --git a/src/autofit/afblue.h b/src/autofit/afblue.h +index a861841..6119266 100644 +--- a/src/autofit/afblue.h ++++ b/src/autofit/afblue.h +@@ -7,7 +7,7 @@ + /* */ + /* Auto-fitter data for blue strings (specification). */ + /* */ +-/* Copyright 2013, 2014 by */ ++/* Copyright 2013-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/autofit/afblue.hin b/src/autofit/afblue.hin +index 0b4b48d..7cdd430 100644 +--- a/src/autofit/afblue.hin ++++ b/src/autofit/afblue.hin +@@ -4,7 +4,7 @@ + /* */ + /* Auto-fitter data for blue strings (specification). */ + /* */ +-/* Copyright 2013, 2014 by */ ++/* Copyright 2013-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/autofit/afcjk.c b/src/autofit/afcjk.c +index 048e0e7..f4715c6 100644 +--- a/src/autofit/afcjk.c ++++ b/src/autofit/afcjk.c +@@ -4,7 +4,7 @@ + /* */ + /* Auto-fitter hinting routines for CJK writing system (body). */ + /* */ +-/* Copyright 2006-2014 by */ ++/* Copyright 2006-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/autofit/afcjk.h b/src/autofit/afcjk.h +index 4dd4f39..47fac87 100644 +--- a/src/autofit/afcjk.h ++++ b/src/autofit/afcjk.h +@@ -4,7 +4,7 @@ + /* */ + /* Auto-fitter hinting routines for CJK writing system (specification). */ + /* */ +-/* Copyright 2006, 2007, 2011-2014 by */ ++/* Copyright 2006-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/autofit/afcover.h b/src/autofit/afcover.h +index d5ac969..520e8a4 100644 +--- a/src/autofit/afcover.h ++++ b/src/autofit/afcover.h +@@ -4,7 +4,7 @@ + /* */ + /* Auto-fitter coverages (specification only). */ + /* */ +-/* Copyright 2013, 2014 by */ ++/* Copyright 2013-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/autofit/afdummy.c b/src/autofit/afdummy.c +index f8702a1..03ca25f 100644 +--- a/src/autofit/afdummy.c ++++ b/src/autofit/afdummy.c +@@ -5,7 +5,7 @@ + /* Auto-fitter dummy routines to be used if no hinting should be */ + /* performed (body). */ + /* */ +-/* Copyright 2003-2005, 2011, 2013 by */ ++/* Copyright 2003-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/autofit/afdummy.h b/src/autofit/afdummy.h +index ad1b0d3..b4fdc78 100644 +--- a/src/autofit/afdummy.h ++++ b/src/autofit/afdummy.h +@@ -5,7 +5,7 @@ + /* Auto-fitter dummy routines to be used if no hinting should be */ + /* performed (specification). */ + /* */ +-/* Copyright 2003-2005, 2011, 2013 by */ ++/* Copyright 2003-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/autofit/aferrors.h b/src/autofit/aferrors.h +index 50e1a22..7b416e4 100644 +--- a/src/autofit/aferrors.h ++++ b/src/autofit/aferrors.h +@@ -4,7 +4,7 @@ + /* */ + /* Autofitter error codes (specification only). */ + /* */ +-/* Copyright 2005, 2012 by */ ++/* Copyright 2005-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/autofit/afglobal.c b/src/autofit/afglobal.c +index a54c20c..2d5fe26 100644 +--- a/src/autofit/afglobal.c ++++ b/src/autofit/afglobal.c +@@ -4,7 +4,7 @@ + /* */ + /* Auto-fitter routines to compute global hinting values (body). */ + /* */ +-/* Copyright 2003-2014 by */ ++/* Copyright 2003-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/autofit/afglobal.h b/src/autofit/afglobal.h +index 38d8d69..9bbb687 100644 +--- a/src/autofit/afglobal.h ++++ b/src/autofit/afglobal.h +@@ -5,7 +5,7 @@ + /* Auto-fitter routines to compute global hinting values */ + /* (specification). */ + /* */ +-/* Copyright 2003-2005, 2007, 2009, 2011-2014 by */ ++/* Copyright 2003-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/autofit/afhints.c b/src/autofit/afhints.c +index eb3b4ff..56bc386 100644 +--- a/src/autofit/afhints.c ++++ b/src/autofit/afhints.c +@@ -4,7 +4,7 @@ + /* */ + /* Auto-fitter hinting routines (body). */ + /* */ +-/* Copyright 2003-2007, 2009-2014 by */ ++/* Copyright 2003-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/autofit/afhints.h b/src/autofit/afhints.h +index 4796466..1da9849 100644 +--- a/src/autofit/afhints.h ++++ b/src/autofit/afhints.h +@@ -4,7 +4,7 @@ + /* */ + /* Auto-fitter hinting routines (specification). */ + /* */ +-/* Copyright 2003-2008, 2010-2012, 2014 by */ ++/* Copyright 2003-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/autofit/afindic.c b/src/autofit/afindic.c +index 197881b..7412cd1 100644 +--- a/src/autofit/afindic.c ++++ b/src/autofit/afindic.c +@@ -4,7 +4,7 @@ + /* */ + /* Auto-fitter hinting routines for Indic writing system (body). */ + /* */ +-/* Copyright 2007, 2011-2013 by */ ++/* Copyright 2007-2015 by */ + /* Rahul Bhalerao <rahul.bhalerao@redhat.com>, <b.rahul.pm@gmail.com>. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/autofit/afindic.h b/src/autofit/afindic.h +index 9e13cf7..4c36908 100644 +--- a/src/autofit/afindic.h ++++ b/src/autofit/afindic.h +@@ -5,7 +5,7 @@ + /* Auto-fitter hinting routines for Indic writing system */ + /* (specification). */ + /* */ +-/* Copyright 2007, 2012, 2013 by */ ++/* Copyright 2007-2015 by */ + /* Rahul Bhalerao <rahul.bhalerao@redhat.com>, <b.rahul.pm@gmail.com>. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/autofit/aflatin.c b/src/autofit/aflatin.c +index 36a3689..17cb093 100644 +--- a/src/autofit/aflatin.c ++++ b/src/autofit/aflatin.c +@@ -4,7 +4,7 @@ + /* */ + /* Auto-fitter hinting routines for latin writing system (body). */ + /* */ +-/* Copyright 2003-2014 by */ ++/* Copyright 2003-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/autofit/aflatin.h b/src/autofit/aflatin.h +index 2c0bfca..2c4a7e2 100644 +--- a/src/autofit/aflatin.h ++++ b/src/autofit/aflatin.h +@@ -5,7 +5,7 @@ + /* Auto-fitter hinting routines for latin writing system */ + /* (specification). */ + /* */ +-/* Copyright 2003-2007, 2009, 2011-2014 by */ ++/* Copyright 2003-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/autofit/aflatin2.c b/src/autofit/aflatin2.c +index 07590b3..2f5f379 100644 +--- a/src/autofit/aflatin2.c ++++ b/src/autofit/aflatin2.c +@@ -4,7 +4,7 @@ + /* */ + /* Auto-fitter hinting routines for latin writing system (body). */ + /* */ +-/* Copyright 2003-2014 by */ ++/* Copyright 2003-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/autofit/aflatin2.h b/src/autofit/aflatin2.h +index b5d252a..9326753 100644 +--- a/src/autofit/aflatin2.h ++++ b/src/autofit/aflatin2.h +@@ -5,7 +5,7 @@ + /* Auto-fitter hinting routines for latin writing system */ + /* (specification). */ + /* */ +-/* Copyright 2003-2007, 2012, 2013 by */ ++/* Copyright 2003-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/autofit/afloader.c b/src/autofit/afloader.c +index c6be5ac..5f68c8c 100644 +--- a/src/autofit/afloader.c ++++ b/src/autofit/afloader.c +@@ -4,7 +4,7 @@ + /* */ + /* Auto-fitter glyph loading routines (body). */ + /* */ +-/* Copyright 2003-2009, 2011-2014 by */ ++/* Copyright 2003-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/autofit/afloader.h b/src/autofit/afloader.h +index b7eff53..37cfd14 100644 +--- a/src/autofit/afloader.h ++++ b/src/autofit/afloader.h +@@ -4,7 +4,7 @@ + /* */ + /* Auto-fitter glyph loading routines (specification). */ + /* */ +-/* Copyright 2003-2005, 2011-2013 by */ ++/* Copyright 2003-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/autofit/afmodule.c b/src/autofit/afmodule.c +index 6ed8b02..35ce6ad 100644 +--- a/src/autofit/afmodule.c ++++ b/src/autofit/afmodule.c +@@ -4,7 +4,7 @@ + /* */ + /* Auto-fitter module implementation (body). */ + /* */ +-/* Copyright 2003-2006, 2009, 2011-2014 by */ ++/* Copyright 2003-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/autofit/afmodule.h b/src/autofit/afmodule.h +index 4f73d1d..b3c5979 100644 +--- a/src/autofit/afmodule.h ++++ b/src/autofit/afmodule.h +@@ -4,7 +4,7 @@ + /* */ + /* Auto-fitter module implementation (specification). */ + /* */ +-/* Copyright 2003-2005, 2009, 2012, 2013 by */ ++/* Copyright 2003-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/autofit/afpic.c b/src/autofit/afpic.c +index cb29fd7..5589e61 100644 +--- a/src/autofit/afpic.c ++++ b/src/autofit/afpic.c +@@ -4,7 +4,7 @@ + /* */ + /* The FreeType position independent code services for autofit module. */ + /* */ +-/* Copyright 2009-2014 by */ ++/* Copyright 2009-2015 by */ + /* Oran Agra and Mickey Gabel. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/autofit/afpic.h b/src/autofit/afpic.h +index 9a68b4a..25071e3 100644 +--- a/src/autofit/afpic.h ++++ b/src/autofit/afpic.h +@@ -4,7 +4,7 @@ + /* */ + /* The FreeType position independent code services for autofit module. */ + /* */ +-/* Copyright 2009, 2011-2013 by */ ++/* Copyright 2009-2015 by */ + /* Oran Agra and Mickey Gabel. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/autofit/afranges.c b/src/autofit/afranges.c +index b2c504d..45fdc50 100644 +--- a/src/autofit/afranges.c ++++ b/src/autofit/afranges.c +@@ -4,7 +4,7 @@ + /* */ + /* Auto-fitter Unicode script ranges (body). */ + /* */ +-/* Copyright 2013, 2014 by */ ++/* Copyright 2013-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/autofit/afranges.h b/src/autofit/afranges.h +index fe5b2aa..7c78ab0 100644 +--- a/src/autofit/afranges.h ++++ b/src/autofit/afranges.h +@@ -4,7 +4,7 @@ + /* */ + /* Auto-fitter Unicode script ranges (specification). */ + /* */ +-/* Copyright 2013, 2014 by */ ++/* Copyright 2013-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/autofit/afscript.h b/src/autofit/afscript.h +index efe8754..79f9b7b 100644 +--- a/src/autofit/afscript.h ++++ b/src/autofit/afscript.h +@@ -4,7 +4,7 @@ + /* */ + /* Auto-fitter scripts (specification only). */ + /* */ +-/* Copyright 2013, 2014 by */ ++/* Copyright 2013-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/autofit/afstyles.h b/src/autofit/afstyles.h +index f14d354..20e721c 100644 +--- a/src/autofit/afstyles.h ++++ b/src/autofit/afstyles.h +@@ -4,7 +4,7 @@ + /* */ + /* Auto-fitter styles (specification only). */ + /* */ +-/* Copyright 2013, 2014 by */ ++/* Copyright 2013-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/autofit/aftypes.h b/src/autofit/aftypes.h +index 61badd1..8c7ea7d 100644 +--- a/src/autofit/aftypes.h ++++ b/src/autofit/aftypes.h +@@ -4,7 +4,7 @@ + /* */ + /* Auto-fitter types (specification only). */ + /* */ +-/* Copyright 2003-2009, 2011-2014 by */ ++/* Copyright 2003-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/autofit/afwarp.c b/src/autofit/afwarp.c +index 34a97ff..7cb7ee2 100644 +--- a/src/autofit/afwarp.c ++++ b/src/autofit/afwarp.c +@@ -4,7 +4,7 @@ + /* */ + /* Auto-fitter warping algorithm (body). */ + /* */ +-/* Copyright 2006, 2007, 2011 by */ ++/* Copyright 2006-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/autofit/afwarp.h b/src/autofit/afwarp.h +index 7343fdd..3b1c87a 100644 +--- a/src/autofit/afwarp.h ++++ b/src/autofit/afwarp.h +@@ -4,7 +4,7 @@ + /* */ + /* Auto-fitter warping algorithm (specification). */ + /* */ +-/* Copyright 2006, 2007 by */ ++/* Copyright 2006-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/autofit/afwrtsys.h b/src/autofit/afwrtsys.h +index 8aa2ed9..4aa89d2 100644 +--- a/src/autofit/afwrtsys.h ++++ b/src/autofit/afwrtsys.h +@@ -4,7 +4,7 @@ + /* */ + /* Auto-fitter writing systems (specification only). */ + /* */ +-/* Copyright 2013 by */ ++/* Copyright 2013-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/autofit/autofit.c b/src/autofit/autofit.c +index e2b9934..b6ed4a0 100644 +--- a/src/autofit/autofit.c ++++ b/src/autofit/autofit.c +@@ -4,7 +4,7 @@ + /* */ + /* Auto-fitter module (body). */ + /* */ +-/* Copyright 2003-2007, 2011, 2013 by */ ++/* Copyright 2003-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/autofit/hbshim.c b/src/autofit/hbshim.c +index a705cef..9a60001 100644 +--- a/src/autofit/hbshim.c ++++ b/src/autofit/hbshim.c +@@ -4,7 +4,7 @@ + /* */ + /* HarfBuzz interface for accessing OpenType features (body). */ + /* */ +-/* Copyright 2013, 2014 by */ ++/* Copyright 2013-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/autofit/hbshim.h b/src/autofit/hbshim.h +index 02f1513..5636ca6 100644 +--- a/src/autofit/hbshim.h ++++ b/src/autofit/hbshim.h +@@ -4,7 +4,7 @@ + /* */ + /* HarfBuzz interface for accessing OpenType features (specification). */ + /* */ +-/* Copyright 2013 by */ ++/* Copyright 2013-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/autofit/module.mk b/src/autofit/module.mk +index 6ec6091..3321438 100644 +--- a/src/autofit/module.mk ++++ b/src/autofit/module.mk +@@ -3,7 +3,7 @@ + # + + +-# Copyright 2003, 2004, 2005, 2006 by ++# Copyright 2003-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/src/autofit/rules.mk b/src/autofit/rules.mk +index 5849cbe..6ef959f 100644 +--- a/src/autofit/rules.mk ++++ b/src/autofit/rules.mk +@@ -3,7 +3,7 @@ + # + + +-# Copyright 2003-2007, 2011, 2013 by ++# Copyright 2003-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/src/base/Jamfile b/src/base/Jamfile +index 832e8b8..ce8114d 100644 +--- a/src/base/Jamfile ++++ b/src/base/Jamfile +@@ -1,6 +1,6 @@ + # FreeType 2 src/base Jamfile + # +-# Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by ++# Copyright 2001-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/src/base/basepic.c b/src/base/basepic.c +index aeb6fd5..9850ed9 100644 +--- a/src/base/basepic.c ++++ b/src/base/basepic.c +@@ -4,7 +4,7 @@ + /* */ + /* The FreeType position independent code services for base. */ + /* */ +-/* Copyright 2009, 2012, 2013 by */ ++/* Copyright 2009-2015 by */ + /* Oran Agra and Mickey Gabel. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/base/basepic.h b/src/base/basepic.h +index 329d7c8..51ecf9e 100644 +--- a/src/base/basepic.h ++++ b/src/base/basepic.h +@@ -4,7 +4,7 @@ + /* */ + /* The FreeType position independent code services for base. */ + /* */ +-/* Copyright 2009 by */ ++/* Copyright 2009-2015 by */ + /* Oran Agra and Mickey Gabel. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/base/ftadvanc.c b/src/base/ftadvanc.c +index 18884ef..f12908f 100644 +--- a/src/base/ftadvanc.c ++++ b/src/base/ftadvanc.c +@@ -4,7 +4,7 @@ + /* */ + /* Quick computation of advance widths (body). */ + /* */ +-/* Copyright 2008, 2009, 2011, 2013, 2014 by */ ++/* Copyright 2008-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/base/ftapi.c b/src/base/ftapi.c +index 8914d1f..f22a181 100644 +--- a/src/base/ftapi.c ++++ b/src/base/ftapi.c +@@ -4,7 +4,7 @@ + /* */ + /* The FreeType compatibility functions (body). */ + /* */ +-/* Copyright 2002 by */ ++/* Copyright 2002-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/base/ftbase.c b/src/base/ftbase.c +index 5e5d70e..253dfb7 100644 +--- a/src/base/ftbase.c ++++ b/src/base/ftbase.c +@@ -4,7 +4,7 @@ + /* */ + /* Single object library component (body only). */ + /* */ +-/* Copyright 1996-2001, 2002, 2003, 2004, 2006, 2007, 2008, 2009 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/base/ftbase.h b/src/base/ftbase.h +index 51a1db1..cb57f96 100644 +--- a/src/base/ftbase.h ++++ b/src/base/ftbase.h +@@ -4,7 +4,7 @@ + /* */ + /* The FreeType private functions used in base module (specification). */ + /* */ +-/* Copyright 2008, 2010 by */ ++/* Copyright 2008-2015 by */ + /* David Turner, Robert Wilhelm, Werner Lemberg, and suzuki toshiya. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/base/ftbbox.c b/src/base/ftbbox.c +index f9a1751..ee1763b 100644 +--- a/src/base/ftbbox.c ++++ b/src/base/ftbbox.c +@@ -4,7 +4,7 @@ + /* */ + /* FreeType bbox computation (body). */ + /* */ +-/* Copyright 1996-2002, 2004, 2006, 2010, 2013, 2014 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used */ +diff --git a/src/base/ftbdf.c b/src/base/ftbdf.c +index d9dcbad..aa72ddc 100644 +--- a/src/base/ftbdf.c ++++ b/src/base/ftbdf.c +@@ -4,7 +4,7 @@ + /* */ + /* FreeType API for accessing BDF-specific strings (body). */ + /* */ +-/* Copyright 2002-2004, 2013, 2014 by */ ++/* Copyright 2002-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/base/ftbitmap.c b/src/base/ftbitmap.c +index 19a1a80..98d49a3 100644 +--- a/src/base/ftbitmap.c ++++ b/src/base/ftbitmap.c +@@ -4,7 +4,7 @@ + /* */ + /* FreeType utility functions for bitmaps (body). */ + /* */ +-/* Copyright 2004-2009, 2011, 2013, 2014 by */ ++/* Copyright 2004-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/base/ftcalc.c b/src/base/ftcalc.c +index 57f7968..ccc3b4a 100644 +--- a/src/base/ftcalc.c ++++ b/src/base/ftcalc.c +@@ -4,7 +4,7 @@ + /* */ + /* Arithmetic computations (body). */ + /* */ +-/* Copyright 1996-2006, 2008, 2012-2014 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/base/ftcid.c b/src/base/ftcid.c +index 747039c..0734881 100644 +--- a/src/base/ftcid.c ++++ b/src/base/ftcid.c +@@ -4,7 +4,7 @@ + /* */ + /* FreeType API for accessing CID font information. */ + /* */ +-/* Copyright 2007, 2009, 2013 by */ ++/* Copyright 2007-2015 by */ + /* Derek Clegg and Michael Toftdal. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/base/ftdbgmem.c b/src/base/ftdbgmem.c +index 6fb86fe..82cedc1 100644 +--- a/src/base/ftdbgmem.c ++++ b/src/base/ftdbgmem.c +@@ -4,7 +4,7 @@ + /* */ + /* Memory debugger (body). */ + /* */ +-/* Copyright 2001-2006, 2009, 2013 by */ ++/* Copyright 2001-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/base/ftdebug.c b/src/base/ftdebug.c +index 39ac6ad..2cdb7c2 100644 +--- a/src/base/ftdebug.c ++++ b/src/base/ftdebug.c +@@ -4,7 +4,7 @@ + /* */ + /* Debugging and logging component (body). */ + /* */ +-/* Copyright 1996-2001, 2002, 2004, 2008, 2013 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/base/ftfstype.c b/src/base/ftfstype.c +index 6b49ef8..cd3458f 100644 +--- a/src/base/ftfstype.c ++++ b/src/base/ftfstype.c +@@ -4,7 +4,7 @@ + /* */ + /* FreeType utility file to access FSType data (body). */ + /* */ +-/* Copyright 2008, 2009, 2014 by */ ++/* Copyright 2008-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/base/ftgasp.c b/src/base/ftgasp.c +index 8485d29..bbd257c 100644 +--- a/src/base/ftgasp.c ++++ b/src/base/ftgasp.c +@@ -4,7 +4,7 @@ + /* */ + /* Access of TrueType's `gasp' table (body). */ + /* */ +-/* Copyright 2007 by */ ++/* Copyright 2007-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/base/ftgloadr.c b/src/base/ftgloadr.c +index 3cc5c7a..1b32d8b 100644 +--- a/src/base/ftgloadr.c ++++ b/src/base/ftgloadr.c +@@ -4,7 +4,7 @@ + /* */ + /* The FreeType glyph loader (body). */ + /* */ +-/* Copyright 2002-2006, 2010, 2013 by */ ++/* Copyright 2002-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/base/ftglyph.c b/src/base/ftglyph.c +index ac178c4..1817c49 100644 +--- a/src/base/ftglyph.c ++++ b/src/base/ftglyph.c +@@ -4,7 +4,7 @@ + /* */ + /* FreeType convenience functions to handle glyphs (body). */ + /* */ +-/* Copyright 1996-2005, 2007, 2008, 2010, 2012-2014 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/base/ftgxval.c b/src/base/ftgxval.c +index a65f4c8..58868f2 100644 +--- a/src/base/ftgxval.c ++++ b/src/base/ftgxval.c +@@ -4,7 +4,7 @@ + /* */ + /* FreeType API for validating TrueTyepGX/AAT tables (body). */ + /* */ +-/* Copyright 2004-2006, 2010, 2013, 2014 by */ ++/* Copyright 2004-2015 by */ + /* Masatake YAMATO, Redhat K.K, */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ +diff --git a/src/base/ftinit.c b/src/base/ftinit.c +index c4c8820..6a41f96 100644 +--- a/src/base/ftinit.c ++++ b/src/base/ftinit.c +@@ -4,7 +4,7 @@ + /* */ + /* FreeType initialization layer (body). */ + /* */ +-/* Copyright 1996-2002, 2005, 2007, 2009, 2012-2014 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/base/ftlcdfil.c b/src/base/ftlcdfil.c +index d8bcbbf..787f6b8 100644 +--- a/src/base/ftlcdfil.c ++++ b/src/base/ftlcdfil.c +@@ -4,7 +4,7 @@ + /* */ + /* FreeType API for color filtering of subpixel bitmap glyphs (body). */ + /* */ +-/* Copyright 2006, 2008-2010, 2013, 2014 by */ ++/* Copyright 2006-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/base/ftmac.c b/src/base/ftmac.c +index 5301ab4..446a23a 100644 +--- a/src/base/ftmac.c ++++ b/src/base/ftmac.c +@@ -8,7 +8,7 @@ + /* This file is for Mac OS X only; see builds/mac/ftoldmac.c for */ + /* classic platforms built by MPW. */ + /* */ +-/* Copyright 1996-2009, 2013, 2014 by */ ++/* Copyright 1996-2015 by */ + /* Just van Rossum, David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/base/ftmm.c b/src/base/ftmm.c +index 056680b..7c012aa 100644 +--- a/src/base/ftmm.c ++++ b/src/base/ftmm.c +@@ -4,7 +4,7 @@ + /* */ + /* Multiple Master font support (body). */ + /* */ +-/* Copyright 1996-2001, 2003, 2004, 2009, 2013, 2014 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c +index d3a1209..e7e0c4f 100644 +--- a/src/base/ftobjs.c ++++ b/src/base/ftobjs.c +@@ -4,7 +4,7 @@ + /* */ + /* The FreeType private base classes (body). */ + /* */ +-/* Copyright 1996-2014 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/base/ftotval.c b/src/base/ftotval.c +index 5fc73d7..786457b 100644 +--- a/src/base/ftotval.c ++++ b/src/base/ftotval.c +@@ -4,7 +4,7 @@ + /* */ + /* FreeType API for validating OpenType tables (body). */ + /* */ +-/* Copyright 2004, 2006, 2008, 2010, 2013 by */ ++/* Copyright 2004-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/base/ftoutln.c b/src/base/ftoutln.c +index 45f074c..c2b2029 100644 +--- a/src/base/ftoutln.c ++++ b/src/base/ftoutln.c +@@ -4,7 +4,7 @@ + /* */ + /* FreeType outline management (body). */ + /* */ +-/* Copyright 1996-2008, 2010, 2012-2014 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/base/ftpatent.c b/src/base/ftpatent.c +index dc2470d..bf2b085 100644 +--- a/src/base/ftpatent.c ++++ b/src/base/ftpatent.c +@@ -5,7 +5,7 @@ + /* FreeType API for checking patented TrueType bytecode instructions */ + /* (body). */ + /* */ +-/* Copyright 2007, 2008, 2010 by */ ++/* Copyright 2007-2015 by */ + /* David Turner. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/base/ftpfr.c b/src/base/ftpfr.c +index 7425abe..39f089e 100644 +--- a/src/base/ftpfr.c ++++ b/src/base/ftpfr.c +@@ -4,7 +4,7 @@ + /* */ + /* FreeType API for accessing PFR-specific data (body). */ + /* */ +-/* Copyright 2002-2004, 2008, 2010, 2013, 2014 by */ ++/* Copyright 2002-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/base/ftpic.c b/src/base/ftpic.c +index 9bd92f7..6c4b1cd 100644 +--- a/src/base/ftpic.c ++++ b/src/base/ftpic.c +@@ -4,7 +4,7 @@ + /* */ + /* The FreeType position independent code services (body). */ + /* */ +-/* Copyright 2009, 2013 by */ ++/* Copyright 2009-2015 by */ + /* Oran Agra and Mickey Gabel. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/base/ftrfork.c b/src/base/ftrfork.c +index efe24d6..4ee0ba3 100644 +--- a/src/base/ftrfork.c ++++ b/src/base/ftrfork.c +@@ -4,7 +4,7 @@ + /* */ + /* Embedded resource forks accessor (body). */ + /* */ +-/* Copyright 2004-2010, 2013, 2014 by */ ++/* Copyright 2004-2015 by */ + /* Masatake YAMATO and Redhat K.K. */ + /* */ + /* FT_Raccess_Get_HeaderInfo() and raccess_guess_darwin_hfsplus() are */ +diff --git a/src/base/ftsnames.c b/src/base/ftsnames.c +index 260e91c..80304e5 100644 +--- a/src/base/ftsnames.c ++++ b/src/base/ftsnames.c +@@ -7,7 +7,7 @@ + /* */ + /* This is _not_ used to retrieve glyph names! */ + /* */ +-/* Copyright 1996-2001, 2002, 2009 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/base/ftstream.c b/src/base/ftstream.c +index 759fd8f..e115674 100644 +--- a/src/base/ftstream.c ++++ b/src/base/ftstream.c +@@ -4,7 +4,7 @@ + /* */ + /* I/O stream support (body). */ + /* */ +-/* Copyright 2000-2002, 2004-2006, 2008-2011, 2013 by */ ++/* Copyright 2000-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/base/ftstroke.c b/src/base/ftstroke.c +index 5fc41fc..69a403f 100644 +--- a/src/base/ftstroke.c ++++ b/src/base/ftstroke.c +@@ -4,7 +4,7 @@ + /* */ + /* FreeType path stroker (body). */ + /* */ +-/* Copyright 2002-2006, 2008-2011, 2013, 2014 by */ ++/* Copyright 2002-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/base/ftsynth.c b/src/base/ftsynth.c +index 0567bd5..cd68533 100644 +--- a/src/base/ftsynth.c ++++ b/src/base/ftsynth.c +@@ -4,7 +4,7 @@ + /* */ + /* FreeType synthesizing code for emboldening and slanting (body). */ + /* */ +-/* Copyright 2000-2006, 2010, 2012-2014 by */ ++/* Copyright 2000-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/base/ftsystem.c b/src/base/ftsystem.c +index 2c6ddac..10e245d 100644 +--- a/src/base/ftsystem.c ++++ b/src/base/ftsystem.c +@@ -4,7 +4,7 @@ + /* */ + /* ANSI-specific FreeType low-level system interface (body). */ + /* */ +-/* Copyright 1996-2002, 2006, 2008-2011, 2013 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/base/fttrigon.c b/src/base/fttrigon.c +index 22b7ecf..bdbc77b 100644 +--- a/src/base/fttrigon.c ++++ b/src/base/fttrigon.c +@@ -4,7 +4,7 @@ + /* */ + /* FreeType trigonometric functions (body). */ + /* */ +-/* Copyright 2001-2005, 2012-2014 by */ ++/* Copyright 2001-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/base/fttype1.c b/src/base/fttype1.c +index 47af19a..c549382 100644 +--- a/src/base/fttype1.c ++++ b/src/base/fttype1.c +@@ -4,7 +4,7 @@ + /* */ + /* FreeType utility file for PS names support (body). */ + /* */ +-/* Copyright 2002-2004, 2011, 2014 by */ ++/* Copyright 2002-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/base/ftutil.c b/src/base/ftutil.c +index 56e2800..221ce27 100644 +--- a/src/base/ftutil.c ++++ b/src/base/ftutil.c +@@ -4,7 +4,7 @@ + /* */ + /* FreeType utility file for memory and list management (body). */ + /* */ +-/* Copyright 2002, 2004-2007, 2013 by */ ++/* Copyright 2002-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/base/ftwinfnt.c b/src/base/ftwinfnt.c +index 8e337fb..76a19af 100644 +--- a/src/base/ftwinfnt.c ++++ b/src/base/ftwinfnt.c +@@ -4,7 +4,7 @@ + /* */ + /* FreeType API for accessing Windows FNT specific info (body). */ + /* */ +-/* Copyright 2003, 2004, 2014 by */ ++/* Copyright 2003-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/base/ftxf86.c b/src/base/ftxf86.c +index a4bf767..a0f2558 100644 +--- a/src/base/ftxf86.c ++++ b/src/base/ftxf86.c +@@ -4,7 +4,7 @@ + /* */ + /* FreeType utility file for X11 support (body). */ + /* */ +-/* Copyright 2002, 2003, 2004 by */ ++/* Copyright 2002-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/base/rules.mk b/src/base/rules.mk +index 640ab6d..1852e08 100644 +--- a/src/base/rules.mk ++++ b/src/base/rules.mk +@@ -3,7 +3,7 @@ + # + + +-# Copyright 1996-2000, 2002-2009, 2013 by ++# Copyright 1996-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/src/bdf/Jamfile b/src/bdf/Jamfile +index da23ccd..006843c 100644 +--- a/src/bdf/Jamfile ++++ b/src/bdf/Jamfile +@@ -1,6 +1,6 @@ + # FreeType 2 src/bdf Jamfile + # +-# Copyright 2002 by ++# Copyright 2002-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/src/bzip2/Jamfile b/src/bzip2/Jamfile +index 3da986d..9ae502d 100644 +--- a/src/bzip2/Jamfile ++++ b/src/bzip2/Jamfile +@@ -1,6 +1,6 @@ + # FreeType 2 src/bzip2 Jamfile + # +-# Copyright 2010 by ++# Copyright 2010-2015 by + # Joel Klinghed + # + # Based on src/lzw/Jamfile, Copyright 2004, 2006 by +diff --git a/src/bzip2/ftbzip2.c b/src/bzip2/ftbzip2.c +index 7e406b1..a0de1c4 100644 +--- a/src/bzip2/ftbzip2.c ++++ b/src/bzip2/ftbzip2.c +@@ -8,7 +8,7 @@ + /* parse compressed PCF fonts, as found with many X11 server */ + /* distributions. */ + /* */ +-/* Copyright 2010, 2012-2014 by */ ++/* Copyright 2010-2015 by */ + /* Joel Klinghed. */ + /* */ + /* Based on src/gzip/ftgzip.c, Copyright 2002 - 2010 by */ +diff --git a/src/bzip2/rules.mk b/src/bzip2/rules.mk +index 845066d..707369e 100644 +--- a/src/bzip2/rules.mk ++++ b/src/bzip2/rules.mk +@@ -2,7 +2,7 @@ + # FreeType 2 BZIP2 support configuration rules + # + +-# Copyright 2010 by ++# Copyright 2010-2015 by + # Joel Klinghed. + # + # Based on src/lzw/rules.mk, Copyright 2004-2006 by +diff --git a/src/cache/Jamfile b/src/cache/Jamfile +index 6563991..75d8997 100644 +--- a/src/cache/Jamfile ++++ b/src/cache/Jamfile +@@ -1,6 +1,6 @@ + # FreeType 2 src/cache Jamfile + # +-# Copyright 2001, 2003, 2004, 2013 by ++# Copyright 2001-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/src/cache/ftcache.c b/src/cache/ftcache.c +index d41e91e..8de527a 100644 +--- a/src/cache/ftcache.c ++++ b/src/cache/ftcache.c +@@ -4,7 +4,7 @@ + /* */ + /* The FreeType Caching sub-system (body only). */ + /* */ +-/* Copyright 2000-2001, 2003 by */ ++/* Copyright 2000-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/cache/ftcbasic.c b/src/cache/ftcbasic.c +index 6bad39d..2233821 100644 +--- a/src/cache/ftcbasic.c ++++ b/src/cache/ftcbasic.c +@@ -4,7 +4,7 @@ + /* */ + /* The FreeType basic cache interface (body). */ + /* */ +-/* Copyright 2003-2007, 2009-2011, 2013, 2014 by */ ++/* Copyright 2003-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/cache/ftccache.c b/src/cache/ftccache.c +index f20dd45..e1d52fa 100644 +--- a/src/cache/ftccache.c ++++ b/src/cache/ftccache.c +@@ -4,7 +4,7 @@ + /* */ + /* The FreeType internal cache interface (body). */ + /* */ +-/* Copyright 2000-2007, 2009-2011, 2013 by */ ++/* Copyright 2000-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/cache/ftccache.h b/src/cache/ftccache.h +index 4155f32..ba1dfee 100644 +--- a/src/cache/ftccache.h ++++ b/src/cache/ftccache.h +@@ -4,7 +4,7 @@ + /* */ + /* FreeType internal cache interface (specification). */ + /* */ +-/* Copyright 2000-2007, 2009-2011, 2013 by */ ++/* Copyright 2000-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/cache/ftccback.h b/src/cache/ftccback.h +index 9528279..b3237d5 100644 +--- a/src/cache/ftccback.h ++++ b/src/cache/ftccback.h +@@ -4,7 +4,7 @@ + /* */ + /* Callback functions of the caching sub-system (specification only). */ + /* */ +-/* Copyright 2004-2006, 2011, 2013 by */ ++/* Copyright 2004-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/cache/ftccmap.c b/src/cache/ftccmap.c +index ab22366..0ef4423 100644 +--- a/src/cache/ftccmap.c ++++ b/src/cache/ftccmap.c +@@ -4,7 +4,7 @@ + /* */ + /* FreeType CharMap cache (body) */ + /* */ +-/* Copyright 2000-2014 by */ ++/* Copyright 2000-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/cache/ftcerror.h b/src/cache/ftcerror.h +index 0e05570..15adec5 100644 +--- a/src/cache/ftcerror.h ++++ b/src/cache/ftcerror.h +@@ -4,7 +4,7 @@ + /* */ + /* Caching sub-system error codes (specification only). */ + /* */ +-/* Copyright 2001, 2012 by */ ++/* Copyright 2001-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/cache/ftcglyph.c b/src/cache/ftcglyph.c +index 441e177..edb745f 100644 +--- a/src/cache/ftcglyph.c ++++ b/src/cache/ftcglyph.c +@@ -4,7 +4,7 @@ + /* */ + /* FreeType Glyph Image (FT_Glyph) cache (body). */ + /* */ +-/* Copyright 2000-2001, 2003, 2004, 2006, 2009, 2011 by */ ++/* Copyright 2000-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/cache/ftcglyph.h b/src/cache/ftcglyph.h +index 5fed19c..af4d0ce 100644 +--- a/src/cache/ftcglyph.h ++++ b/src/cache/ftcglyph.h +@@ -4,7 +4,7 @@ + /* */ + /* FreeType abstract glyph cache (specification). */ + /* */ +-/* Copyright 2000-2001, 2003, 2004, 2006, 2007, 2011 by */ ++/* Copyright 2000-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/cache/ftcimage.c b/src/cache/ftcimage.c +index c242ece..88dc901 100644 +--- a/src/cache/ftcimage.c ++++ b/src/cache/ftcimage.c +@@ -4,7 +4,7 @@ + /* */ + /* FreeType Image cache (body). */ + /* */ +-/* Copyright 2000-2001, 2003, 2004, 2006, 2010 by */ ++/* Copyright 2000-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/cache/ftcimage.h b/src/cache/ftcimage.h +index 20d5d3e..b312eaa 100644 +--- a/src/cache/ftcimage.h ++++ b/src/cache/ftcimage.h +@@ -4,7 +4,7 @@ + /* */ + /* FreeType Generic Image cache (specification) */ + /* */ +-/* Copyright 2000-2001, 2002, 2003, 2006 by */ ++/* Copyright 2000-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/cache/ftcmanag.c b/src/cache/ftcmanag.c +index fff7a08..5d70090 100644 +--- a/src/cache/ftcmanag.c ++++ b/src/cache/ftcmanag.c +@@ -4,7 +4,7 @@ + /* */ + /* FreeType Cache Manager (body). */ + /* */ +-/* Copyright 2000-2006, 2008-2010, 2013, 2014 by */ ++/* Copyright 2000-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/cache/ftcmanag.h b/src/cache/ftcmanag.h +index 0aec33c..c6787b7 100644 +--- a/src/cache/ftcmanag.h ++++ b/src/cache/ftcmanag.h +@@ -4,7 +4,7 @@ + /* */ + /* FreeType Cache Manager (specification). */ + /* */ +-/* Copyright 2000-2001, 2003, 2004, 2006, 2010, 2013 by */ ++/* Copyright 2000-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/cache/ftcmru.c b/src/cache/ftcmru.c +index dc8b4cc..10ce4f3 100644 +--- a/src/cache/ftcmru.c ++++ b/src/cache/ftcmru.c +@@ -4,7 +4,7 @@ + /* */ + /* FreeType MRU support (body). */ + /* */ +-/* Copyright 2003, 2004, 2006, 2009 by */ ++/* Copyright 2003-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/cache/ftcmru.h b/src/cache/ftcmru.h +index 6fccf11..c0c35f9 100644 +--- a/src/cache/ftcmru.h ++++ b/src/cache/ftcmru.h +@@ -4,7 +4,7 @@ + /* */ + /* Simple MRU list-cache (specification). */ + /* */ +-/* Copyright 2000-2001, 2003-2006, 2010, 2013 by */ ++/* Copyright 2000-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/cache/ftcsbits.c b/src/cache/ftcsbits.c +index 59727d1..0945f2b 100644 +--- a/src/cache/ftcsbits.c ++++ b/src/cache/ftcsbits.c +@@ -4,7 +4,7 @@ + /* */ + /* FreeType sbits manager (body). */ + /* */ +-/* Copyright 2000-2006, 2009-2011, 2013, 2014 by */ ++/* Copyright 2000-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/cache/ftcsbits.h b/src/cache/ftcsbits.h +index df55dca..5a2fa1a 100644 +--- a/src/cache/ftcsbits.h ++++ b/src/cache/ftcsbits.h +@@ -4,7 +4,7 @@ + /* */ + /* A small-bitmap cache (specification). */ + /* */ +-/* Copyright 2000-2001, 2002, 2003, 2006, 2011 by */ ++/* Copyright 2000-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/cache/rules.mk b/src/cache/rules.mk +index d64d9bc..6d5cf34 100644 +--- a/src/cache/rules.mk ++++ b/src/cache/rules.mk +@@ -3,7 +3,7 @@ + # + + +-# Copyright 2000, 2001, 2003, 2004, 2006, 2008 by ++# Copyright 2000-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/src/cff/Jamfile b/src/cff/Jamfile +index 6705d3c..8ffb79c 100644 +--- a/src/cff/Jamfile ++++ b/src/cff/Jamfile +@@ -1,6 +1,6 @@ + # FreeType 2 src/cff Jamfile + # +-# Copyright 2001, 2002 by ++# Copyright 2001-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/src/cff/cff.c b/src/cff/cff.c +index c3840b5..bb2cfb5 100644 +--- a/src/cff/cff.c ++++ b/src/cff/cff.c +@@ -4,7 +4,7 @@ + /* */ + /* FreeType OpenType driver component (body only). */ + /* */ +-/* Copyright 1996-2001, 2002, 2013 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/cff/cffcmap.c b/src/cff/cffcmap.c +index 52248b2..e7538e9 100644 +--- a/src/cff/cffcmap.c ++++ b/src/cff/cffcmap.c +@@ -4,7 +4,7 @@ + /* */ + /* CFF character mapping table (cmap) support (body). */ + /* */ +-/* Copyright 2002-2007, 2010, 2013 by */ ++/* Copyright 2002-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/cff/cffcmap.h b/src/cff/cffcmap.h +index 3f7f67b..6eaed63 100644 +--- a/src/cff/cffcmap.h ++++ b/src/cff/cffcmap.h +@@ -4,7 +4,7 @@ + /* */ + /* CFF character mapping table (cmap) support (specification). */ + /* */ +-/* Copyright 2002, 2003, 2006 by */ ++/* Copyright 2002-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/cff/cffdrivr.c b/src/cff/cffdrivr.c +index 3e8898e..851dcbf 100644 +--- a/src/cff/cffdrivr.c ++++ b/src/cff/cffdrivr.c +@@ -4,7 +4,7 @@ + /* */ + /* OpenType font driver implementation (body). */ + /* */ +-/* Copyright 1996-2014 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/cff/cffdrivr.h b/src/cff/cffdrivr.h +index 50e8138..9527f5e 100644 +--- a/src/cff/cffdrivr.h ++++ b/src/cff/cffdrivr.h +@@ -4,7 +4,7 @@ + /* */ + /* High-level OpenType driver interface (specification). */ + /* */ +-/* Copyright 1996-2001, 2002 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/cff/cfferrs.h b/src/cff/cfferrs.h +index 801d73e..543bdb0 100644 +--- a/src/cff/cfferrs.h ++++ b/src/cff/cfferrs.h +@@ -4,7 +4,7 @@ + /* */ + /* CFF error codes (specification only). */ + /* */ +-/* Copyright 2001, 2012 by */ ++/* Copyright 2001-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/cff/cffgload.c b/src/cff/cffgload.c +index 758a3d3..89abb1f 100644 +--- a/src/cff/cffgload.c ++++ b/src/cff/cffgload.c +@@ -4,7 +4,7 @@ + /* */ + /* OpenType Glyph Loader (body). */ + /* */ +-/* Copyright 1996-2014 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/cff/cffgload.h b/src/cff/cffgload.h +index 41df7db..5c52d43 100644 +--- a/src/cff/cffgload.h ++++ b/src/cff/cffgload.h +@@ -4,7 +4,7 @@ + /* */ + /* OpenType Glyph Loader (specification). */ + /* */ +-/* Copyright 1996-2004, 2006-2009, 2013 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/cff/cffload.c b/src/cff/cffload.c +index d9bec59..71ebaac 100644 +--- a/src/cff/cffload.c ++++ b/src/cff/cffload.c +@@ -4,7 +4,7 @@ + /* */ + /* OpenType and CFF data/program tables loader (body). */ + /* */ +-/* Copyright 1996-2014 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/cff/cffload.h b/src/cff/cffload.h +index 8049619..459e7b0 100644 +--- a/src/cff/cffload.h ++++ b/src/cff/cffload.h +@@ -4,7 +4,7 @@ + /* */ + /* OpenType & CFF data/program tables loader (specification). */ + /* */ +-/* Copyright 1996-2001, 2002, 2003, 2007, 2008, 2010 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/cff/cffobjs.c b/src/cff/cffobjs.c +index da3d019..65dc9b6 100644 +--- a/src/cff/cffobjs.c ++++ b/src/cff/cffobjs.c +@@ -4,7 +4,7 @@ + /* */ + /* OpenType objects manager (body). */ + /* */ +-/* Copyright 1996-2014 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/cff/cffobjs.h b/src/cff/cffobjs.h +index dfbf9a9..3cc9531 100644 +--- a/src/cff/cffobjs.h ++++ b/src/cff/cffobjs.h +@@ -4,7 +4,7 @@ + /* */ + /* OpenType objects manager (specification). */ + /* */ +-/* Copyright 1996-2004, 2006-2008, 2013 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/cff/cffparse.c b/src/cff/cffparse.c +index c79ab62..9a2d811 100644 +--- a/src/cff/cffparse.c ++++ b/src/cff/cffparse.c +@@ -4,7 +4,7 @@ + /* */ + /* CFF token stream parser (body) */ + /* */ +-/* Copyright 1996-2004, 2007-2014 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/cff/cffparse.h b/src/cff/cffparse.h +index 61d91ed..8ad02ea 100644 +--- a/src/cff/cffparse.h ++++ b/src/cff/cffparse.h +@@ -4,7 +4,7 @@ + /* */ + /* CFF token stream parser (specification) */ + /* */ +-/* Copyright 1996-2003, 2011 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/cff/cffpic.c b/src/cff/cffpic.c +index f22e4f0..d40dec5 100644 +--- a/src/cff/cffpic.c ++++ b/src/cff/cffpic.c +@@ -4,7 +4,7 @@ + /* */ + /* The FreeType position independent code services for cff module. */ + /* */ +-/* Copyright 2009, 2010, 2012, 2013 by */ ++/* Copyright 2009-2015 by */ + /* Oran Agra and Mickey Gabel. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/cff/cffpic.h b/src/cff/cffpic.h +index 50bab4c..a29620e 100644 +--- a/src/cff/cffpic.h ++++ b/src/cff/cffpic.h +@@ -4,7 +4,7 @@ + /* */ + /* The FreeType position independent code services for cff module. */ + /* */ +-/* Copyright 2009, 2012, 2013 by */ ++/* Copyright 2009-2015 by */ + /* Oran Agra and Mickey Gabel. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/cff/cfftoken.h b/src/cff/cfftoken.h +index bcb4276..5b32076 100644 +--- a/src/cff/cfftoken.h ++++ b/src/cff/cfftoken.h +@@ -4,7 +4,7 @@ + /* */ + /* CFF token definitions (specification only). */ + /* */ +-/* Copyright 1996-2003, 2011 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/cff/cfftypes.h b/src/cff/cfftypes.h +index 8727446..de8a5ee 100644 +--- a/src/cff/cfftypes.h ++++ b/src/cff/cfftypes.h +@@ -5,7 +5,7 @@ + /* Basic OpenType/CFF type definitions and interface (specification */ + /* only). */ + /* */ +-/* Copyright 1996-2003, 2006-2008, 2010-2011, 2013 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/cff/module.mk b/src/cff/module.mk +index ef1391c..ba08ebc 100644 +--- a/src/cff/module.mk ++++ b/src/cff/module.mk +@@ -3,7 +3,7 @@ + # + + +-# Copyright 1996-2000, 2006 by ++# Copyright 1996-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/src/cff/rules.mk b/src/cff/rules.mk +index 23b4730..7f6e857 100644 +--- a/src/cff/rules.mk ++++ b/src/cff/rules.mk +@@ -3,7 +3,7 @@ + # + + +-# Copyright 1996-2001, 2003, 2011, 2013 by ++# Copyright 1996-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/src/cid/Jamfile b/src/cid/Jamfile +index ebeaed5..af00180 100644 +--- a/src/cid/Jamfile ++++ b/src/cid/Jamfile +@@ -1,6 +1,6 @@ + # FreeType 2 src/cid Jamfile + # +-# Copyright 2001 by ++# Copyright 2001-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/src/cid/ciderrs.h b/src/cid/ciderrs.h +index ef13155..5e0e776 100644 +--- a/src/cid/ciderrs.h ++++ b/src/cid/ciderrs.h +@@ -4,7 +4,7 @@ + /* */ + /* CID error codes (specification only). */ + /* */ +-/* Copyright 2001, 2012 by */ ++/* Copyright 2001-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/cid/cidgload.c b/src/cid/cidgload.c +index 7febab8..07e2d6f 100644 +--- a/src/cid/cidgload.c ++++ b/src/cid/cidgload.c +@@ -4,7 +4,7 @@ + /* */ + /* CID-keyed Type1 Glyph Loader (body). */ + /* */ +-/* Copyright 1996-2007, 2009, 2010, 2013 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/cid/cidgload.h b/src/cid/cidgload.h +index a0a91bf..4a10ce5 100644 +--- a/src/cid/cidgload.h ++++ b/src/cid/cidgload.h +@@ -4,7 +4,7 @@ + /* */ + /* OpenType Glyph Loader (specification). */ + /* */ +-/* Copyright 1996-2001, 2002, 2004 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/cid/cidload.c b/src/cid/cidload.c +index 1cda0ee..4f8009f 100644 +--- a/src/cid/cidload.c ++++ b/src/cid/cidload.c +@@ -4,7 +4,7 @@ + /* */ + /* CID-keyed Type1 font loader (body). */ + /* */ +-/* Copyright 1996-2006, 2009, 2011-2014 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/cid/cidload.h b/src/cid/cidload.h +index 8c172ff..fab41f9 100644 +--- a/src/cid/cidload.h ++++ b/src/cid/cidload.h +@@ -4,7 +4,7 @@ + /* */ + /* CID-keyed Type1 font loader (specification). */ + /* */ +-/* Copyright 1996-2001, 2002, 2003, 2004 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/cid/cidobjs.c b/src/cid/cidobjs.c +index 5932ffa..a63130d 100644 +--- a/src/cid/cidobjs.c ++++ b/src/cid/cidobjs.c +@@ -4,7 +4,7 @@ + /* */ + /* CID objects manager (body). */ + /* */ +-/* Copyright 1996-2006, 2008, 2010-2011, 2013 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/cid/cidobjs.h b/src/cid/cidobjs.h +index aee346d..e9095ca 100644 +--- a/src/cid/cidobjs.h ++++ b/src/cid/cidobjs.h +@@ -4,7 +4,7 @@ + /* */ + /* CID objects manager (specification). */ + /* */ +-/* Copyright 1996-2001, 2002, 2004, 2006 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/cid/cidparse.c b/src/cid/cidparse.c +index d8476cd..4c8beff 100644 +--- a/src/cid/cidparse.c ++++ b/src/cid/cidparse.c +@@ -4,7 +4,7 @@ + /* */ + /* CID-keyed Type1 parser (body). */ + /* */ +-/* Copyright 1996-2007, 2009, 2013, 2014 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/cid/cidparse.h b/src/cid/cidparse.h +index f27be65..93318f2 100644 +--- a/src/cid/cidparse.h ++++ b/src/cid/cidparse.h +@@ -4,7 +4,7 @@ + /* */ + /* CID-keyed Type1 parser (specification). */ + /* */ +-/* Copyright 1996-2004, 2014 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/cid/cidriver.c b/src/cid/cidriver.c +index 6132a27..4e86151 100644 +--- a/src/cid/cidriver.c ++++ b/src/cid/cidriver.c +@@ -4,7 +4,7 @@ + /* */ + /* CID driver interface (body). */ + /* */ +-/* Copyright 1996-2004, 2006, 2008, 2009, 2011, 2013 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/cid/cidriver.h b/src/cid/cidriver.h +index 3c45e06..e5b8678 100644 +--- a/src/cid/cidriver.h ++++ b/src/cid/cidriver.h +@@ -4,7 +4,7 @@ + /* */ + /* High-level CID driver interface (specification). */ + /* */ +-/* Copyright 1996-2001, 2002 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/cid/cidtoken.h b/src/cid/cidtoken.h +index 904cb09..82eae0c 100644 +--- a/src/cid/cidtoken.h ++++ b/src/cid/cidtoken.h +@@ -4,7 +4,7 @@ + /* */ + /* CID token definitions (specification only). */ + /* */ +-/* Copyright 1996-2001, 2002, 2003, 2006, 2008, 2009 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/cid/module.mk b/src/cid/module.mk +index ce30bfd..e312a3c 100644 +--- a/src/cid/module.mk ++++ b/src/cid/module.mk +@@ -3,7 +3,7 @@ + # + + +-# Copyright 1996-2000, 2006 by ++# Copyright 1996-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/src/cid/rules.mk b/src/cid/rules.mk +index 9926c8a..282f2aa 100644 +--- a/src/cid/rules.mk ++++ b/src/cid/rules.mk +@@ -3,7 +3,7 @@ + # + + +-# Copyright 1996-2000, 2001, 2003 by ++# Copyright 1996-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/src/cid/type1cid.c b/src/cid/type1cid.c +index 0b866e9..0d54ca7 100644 +--- a/src/cid/type1cid.c ++++ b/src/cid/type1cid.c +@@ -4,7 +4,7 @@ + /* */ + /* FreeType OpenType driver component (body only). */ + /* */ +-/* Copyright 1996-2001 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/gxvalid/Jamfile b/src/gxvalid/Jamfile +index 88049a6..9419067 100644 +--- a/src/gxvalid/Jamfile ++++ b/src/gxvalid/Jamfile +@@ -1,6 +1,6 @@ + # FreeType 2 src/gxvalid Jamfile + # +-# Copyright 2005 by ++# Copyright 2005-2015 by + # suzuki toshiya, Masatake YAMATO and Red Hat K.K. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/src/gxvalid/gxvalid.c b/src/gxvalid/gxvalid.c +index f066355..7b5b091 100644 +--- a/src/gxvalid/gxvalid.c ++++ b/src/gxvalid/gxvalid.c +@@ -4,7 +4,7 @@ + /* */ + /* FreeType validator for TrueTypeGX/AAT tables (body only). */ + /* */ +-/* Copyright 2005 by */ ++/* Copyright 2005-2015 by */ + /* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ +diff --git a/src/gxvalid/gxvalid.h b/src/gxvalid/gxvalid.h +index 3ed646c..8c227d0 100644 +--- a/src/gxvalid/gxvalid.h ++++ b/src/gxvalid/gxvalid.h +@@ -4,7 +4,7 @@ + /* */ + /* TrueTyeeGX/AAT table validation (specification only). */ + /* */ +-/* Copyright 2005 by */ ++/* Copyright 2005-2015 by */ + /* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ +diff --git a/src/gxvalid/gxvbsln.c b/src/gxvalid/gxvbsln.c +index 03ef6cc..cc20219 100644 +--- a/src/gxvalid/gxvbsln.c ++++ b/src/gxvalid/gxvbsln.c +@@ -4,7 +4,7 @@ + /* */ + /* TrueTypeGX/AAT bsln table validation (body). */ + /* */ +-/* Copyright 2004, 2005 by */ ++/* Copyright 2004-2015 by */ + /* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ +diff --git a/src/gxvalid/gxvcommn.c b/src/gxvalid/gxvcommn.c +index c6cdb9e..8ee0ce1 100644 +--- a/src/gxvalid/gxvcommn.c ++++ b/src/gxvalid/gxvcommn.c +@@ -4,7 +4,7 @@ + /* */ + /* TrueTypeGX/AAT common tables validation (body). */ + /* */ +-/* Copyright 2004, 2005, 2009, 2010, 2013 by */ ++/* Copyright 2004-2015 by */ + /* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ +diff --git a/src/gxvalid/gxvcommn.h b/src/gxvalid/gxvcommn.h +index 6594165..9ec9956 100644 +--- a/src/gxvalid/gxvcommn.h ++++ b/src/gxvalid/gxvcommn.h +@@ -4,7 +4,7 @@ + /* */ + /* TrueTypeGX/AAT common tables validation (specification). */ + /* */ +-/* Copyright 2004, 2005, 2012, 2014 by */ ++/* Copyright 2004-2015 by */ + /* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ +diff --git a/src/gxvalid/gxverror.h b/src/gxvalid/gxverror.h +index d33de4a..6bbc23a 100644 +--- a/src/gxvalid/gxverror.h ++++ b/src/gxvalid/gxverror.h +@@ -4,7 +4,7 @@ + /* */ + /* TrueTypeGX/AAT validation module error codes (specification only). */ + /* */ +-/* Copyright 2004, 2005, 2012-2013 by */ ++/* Copyright 2004-2015 by */ + /* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ +diff --git a/src/gxvalid/gxvfeat.c b/src/gxvalid/gxvfeat.c +index 69298b2..0da9777 100644 +--- a/src/gxvalid/gxvfeat.c ++++ b/src/gxvalid/gxvfeat.c +@@ -4,7 +4,7 @@ + /* */ + /* TrueTypeGX/AAT feat table validation (body). */ + /* */ +-/* Copyright 2004, 2005, 2008, 2012 by */ ++/* Copyright 2004-2015 by */ + /* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ +diff --git a/src/gxvalid/gxvfeat.h b/src/gxvalid/gxvfeat.h +index 636fa66..b617df5 100644 +--- a/src/gxvalid/gxvfeat.h ++++ b/src/gxvalid/gxvfeat.h +@@ -4,7 +4,7 @@ + /* */ + /* TrueTypeGX/AAT feat table validation (specification). */ + /* */ +-/* Copyright 2004, 2005 by */ ++/* Copyright 2004-2015 by */ + /* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ +diff --git a/src/gxvalid/gxvfgen.c b/src/gxvalid/gxvfgen.c +index 06e3f9c..75c5e20 100644 +--- a/src/gxvalid/gxvfgen.c ++++ b/src/gxvalid/gxvfgen.c +@@ -5,7 +5,7 @@ + /* Generate feature registry data for gxv `feat' validator. */ + /* This program is derived from gxfeatreg.c in gxlayout. */ + /* */ +-/* Copyright 2004, 2005, 2006 by */ ++/* Copyright 2004-2015 by */ + /* Masatake YAMATO and Redhat K.K. */ + /* */ + /* This file may only be used, */ +diff --git a/src/gxvalid/gxvjust.c b/src/gxvalid/gxvjust.c +index 9610697..8caa05b 100644 +--- a/src/gxvalid/gxvjust.c ++++ b/src/gxvalid/gxvjust.c +@@ -4,7 +4,7 @@ + /* */ + /* TrueTypeGX/AAT just table validation (body). */ + /* */ +-/* Copyright 2005, 2014 by */ ++/* Copyright 2005-2015 by */ + /* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ +diff --git a/src/gxvalid/gxvkern.c b/src/gxvalid/gxvkern.c +index c346619..1adb04e 100644 +--- a/src/gxvalid/gxvkern.c ++++ b/src/gxvalid/gxvkern.c +@@ -4,7 +4,7 @@ + /* */ + /* TrueTypeGX/AAT kern table validation (body). */ + /* */ +-/* Copyright 2004-2007, 2013 by */ ++/* Copyright 2004-2015 by */ + /* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ +diff --git a/src/gxvalid/gxvlcar.c b/src/gxvalid/gxvlcar.c +index c0542e6..51db676 100644 +--- a/src/gxvalid/gxvlcar.c ++++ b/src/gxvalid/gxvlcar.c +@@ -4,7 +4,7 @@ + /* */ + /* TrueTypeGX/AAT lcar table validation (body). */ + /* */ +-/* Copyright 2004, 2005 by */ ++/* Copyright 2004-2015 by */ + /* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ +diff --git a/src/gxvalid/gxvmod.c b/src/gxvalid/gxvmod.c +index 19865c0..17a02e7 100644 +--- a/src/gxvalid/gxvmod.c ++++ b/src/gxvalid/gxvmod.c +@@ -4,7 +4,7 @@ + /* */ + /* FreeType's TrueTypeGX/AAT validation module implementation (body). */ + /* */ +-/* Copyright 2004-2006, 2013 by */ ++/* Copyright 2004-2015 by */ + /* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ +diff --git a/src/gxvalid/gxvmod.h b/src/gxvalid/gxvmod.h +index 6f303a1..1ff2cfc 100644 +--- a/src/gxvalid/gxvmod.h ++++ b/src/gxvalid/gxvmod.h +@@ -5,7 +5,7 @@ + /* FreeType's TrueTypeGX/AAT validation module implementation */ + /* (specification). */ + /* */ +-/* Copyright 2004, 2005 by */ ++/* Copyright 2004-2015 by */ + /* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ +diff --git a/src/gxvalid/gxvmort.c b/src/gxvalid/gxvmort.c +index 52bfade..042d0d1 100644 +--- a/src/gxvalid/gxvmort.c ++++ b/src/gxvalid/gxvmort.c +@@ -4,7 +4,7 @@ + /* */ + /* TrueTypeGX/AAT mort table validation (body). */ + /* */ +-/* Copyright 2005, 2013 by */ ++/* Copyright 2005-2015 by */ + /* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ +diff --git a/src/gxvalid/gxvmort.h b/src/gxvalid/gxvmort.h +index 9bc4a13..c95391b 100644 +--- a/src/gxvalid/gxvmort.h ++++ b/src/gxvalid/gxvmort.h +@@ -4,7 +4,7 @@ + /* */ + /* TrueTypeGX/AAT common definition for mort table (specification). */ + /* */ +-/* Copyright 2004, 2005 by */ ++/* Copyright 2004-2015 by */ + /* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ +diff --git a/src/gxvalid/gxvmort0.c b/src/gxvalid/gxvmort0.c +index c66655e..0cace35 100644 +--- a/src/gxvalid/gxvmort0.c ++++ b/src/gxvalid/gxvmort0.c +@@ -5,7 +5,7 @@ + /* TrueTypeGX/AAT mort table validation */ + /* body for type0 (Indic Script Rearrangement) subtable. */ + /* */ +-/* Copyright 2005 by */ ++/* Copyright 2005-2015 by */ + /* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ +diff --git a/src/gxvalid/gxvmort1.c b/src/gxvalid/gxvmort1.c +index 902dd7a..f1012e2 100644 +--- a/src/gxvalid/gxvmort1.c ++++ b/src/gxvalid/gxvmort1.c +@@ -5,7 +5,7 @@ + /* TrueTypeGX/AAT mort table validation */ + /* body for type1 (Contextual Substitution) subtable. */ + /* */ +-/* Copyright 2005, 2007 by */ ++/* Copyright 2005-2015 by */ + /* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ +diff --git a/src/gxvalid/gxvmort2.c b/src/gxvalid/gxvmort2.c +index 0b0d423..0775d09 100644 +--- a/src/gxvalid/gxvmort2.c ++++ b/src/gxvalid/gxvmort2.c +@@ -5,7 +5,7 @@ + /* TrueTypeGX/AAT mort table validation */ + /* body for type2 (Ligature Substitution) subtable. */ + /* */ +-/* Copyright 2005 by */ ++/* Copyright 2005-2015 by */ + /* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ +diff --git a/src/gxvalid/gxvmort4.c b/src/gxvalid/gxvmort4.c +index 3189a63..535f377 100644 +--- a/src/gxvalid/gxvmort4.c ++++ b/src/gxvalid/gxvmort4.c +@@ -5,7 +5,7 @@ + /* TrueTypeGX/AAT mort table validation */ + /* body for type4 (Non-Contextual Glyph Substitution) subtable. */ + /* */ +-/* Copyright 2005 by */ ++/* Copyright 2005-2015 by */ + /* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ +diff --git a/src/gxvalid/gxvmort5.c b/src/gxvalid/gxvmort5.c +index 49eb44f..fb2f915 100644 +--- a/src/gxvalid/gxvmort5.c ++++ b/src/gxvalid/gxvmort5.c +@@ -5,7 +5,7 @@ + /* TrueTypeGX/AAT mort table validation */ + /* body for type5 (Contextual Glyph Insertion) subtable. */ + /* */ +-/* Copyright 2005 by */ ++/* Copyright 2005-2015 by */ + /* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ +diff --git a/src/gxvalid/gxvmorx.c b/src/gxvalid/gxvmorx.c +index 96dba63..4dac129 100644 +--- a/src/gxvalid/gxvmorx.c ++++ b/src/gxvalid/gxvmorx.c +@@ -4,7 +4,7 @@ + /* */ + /* TrueTypeGX/AAT morx table validation (body). */ + /* */ +-/* Copyright 2005, 2008, 2013 by */ ++/* Copyright 2005-2015 by */ + /* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ +diff --git a/src/gxvalid/gxvmorx.h b/src/gxvalid/gxvmorx.h +index be3334e..60efdfd 100644 +--- a/src/gxvalid/gxvmorx.h ++++ b/src/gxvalid/gxvmorx.h +@@ -4,7 +4,7 @@ + /* */ + /* TrueTypeGX/AAT common definition for morx table (specification). */ + /* */ +-/* Copyright 2005 by */ ++/* Copyright 2005-2015 by */ + /* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ +diff --git a/src/gxvalid/gxvmorx0.c b/src/gxvalid/gxvmorx0.c +index c42e732..e340baa 100644 +--- a/src/gxvalid/gxvmorx0.c ++++ b/src/gxvalid/gxvmorx0.c +@@ -5,7 +5,7 @@ + /* TrueTypeGX/AAT morx table validation */ + /* body for type0 (Indic Script Rearrangement) subtable. */ + /* */ +-/* Copyright 2005 by */ ++/* Copyright 2005-2015 by */ + /* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ +diff --git a/src/gxvalid/gxvmorx1.c b/src/gxvalid/gxvmorx1.c +index 039f500..6f4e67f 100644 +--- a/src/gxvalid/gxvmorx1.c ++++ b/src/gxvalid/gxvmorx1.c +@@ -5,7 +5,7 @@ + /* TrueTypeGX/AAT morx table validation */ + /* body for type1 (Contextual Substitution) subtable. */ + /* */ +-/* Copyright 2005, 2007 by */ ++/* Copyright 2005-2015 by */ + /* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ +diff --git a/src/gxvalid/gxvmorx2.c b/src/gxvalid/gxvmorx2.c +index 94e2767..bc5fef8 100644 +--- a/src/gxvalid/gxvmorx2.c ++++ b/src/gxvalid/gxvmorx2.c +@@ -5,7 +5,7 @@ + /* TrueTypeGX/AAT morx table validation */ + /* body for type2 (Ligature Substitution) subtable. */ + /* */ +-/* Copyright 2005, 2013 by */ ++/* Copyright 2005-2015 by */ + /* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ +diff --git a/src/gxvalid/gxvmorx4.c b/src/gxvalid/gxvmorx4.c +index f6de8b4..c42677d 100644 +--- a/src/gxvalid/gxvmorx4.c ++++ b/src/gxvalid/gxvmorx4.c +@@ -5,7 +5,7 @@ + /* TrueTypeGX/AAT morx table validation */ + /* body for "morx" type4 (Non-Contextual Glyph Substitution) subtable. */ + /* */ +-/* Copyright 2005 by */ ++/* Copyright 2005-2015 by */ + /* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ +diff --git a/src/gxvalid/gxvmorx5.c b/src/gxvalid/gxvmorx5.c +index 88ca59f..7ac872f 100644 +--- a/src/gxvalid/gxvmorx5.c ++++ b/src/gxvalid/gxvmorx5.c +@@ -5,7 +5,7 @@ + /* TrueTypeGX/AAT morx table validation */ + /* body for type5 (Contextual Glyph Insertion) subtable. */ + /* */ +-/* Copyright 2005, 2007 by */ ++/* Copyright 2005-2015 by */ + /* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ +diff --git a/src/gxvalid/gxvopbd.c b/src/gxvalid/gxvopbd.c +index 34c48f4..98ddd13 100644 +--- a/src/gxvalid/gxvopbd.c ++++ b/src/gxvalid/gxvopbd.c +@@ -4,7 +4,7 @@ + /* */ + /* TrueTypeGX/AAT opbd table validation (body). */ + /* */ +-/* Copyright 2004, 2005 by */ ++/* Copyright 2004-2015 by */ + /* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ +diff --git a/src/gxvalid/gxvprop.c b/src/gxvalid/gxvprop.c +index 0bb7ace..7f39309 100644 +--- a/src/gxvalid/gxvprop.c ++++ b/src/gxvalid/gxvprop.c +@@ -4,7 +4,7 @@ + /* */ + /* TrueTypeGX/AAT prop table validation (body). */ + /* */ +-/* Copyright 2004, 2005 by */ ++/* Copyright 2004-2015 by */ + /* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ +diff --git a/src/gxvalid/gxvtrak.c b/src/gxvalid/gxvtrak.c +index 2c8e1e1..a8074a2 100644 +--- a/src/gxvalid/gxvtrak.c ++++ b/src/gxvalid/gxvtrak.c +@@ -4,7 +4,7 @@ + /* */ + /* TrueTypeGX/AAT trak table validation (body). */ + /* */ +-/* Copyright 2004, 2005 by */ ++/* Copyright 2004-2015 by */ + /* suzuki toshiya, Masatake YAMATO, Red Hat K.K., */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ +diff --git a/src/gxvalid/module.mk b/src/gxvalid/module.mk +index 0d6b5d9..1d76494 100644 +--- a/src/gxvalid/module.mk ++++ b/src/gxvalid/module.mk +@@ -2,7 +2,7 @@ + # FreeType 2 gxvalid module definition + # + +-# Copyright 2004, 2005, 2006 by ++# Copyright 2004-2015 by + # suzuki toshiya, Masatake YAMATO, Red Hat K.K., + # David Turner, Robert Wilhelm, and Werner Lemberg. + # +diff --git a/src/gxvalid/rules.mk b/src/gxvalid/rules.mk +index 7d487b5..44a2d43 100644 +--- a/src/gxvalid/rules.mk ++++ b/src/gxvalid/rules.mk +@@ -3,7 +3,7 @@ + # + + +-# Copyright 2004, 2005 by ++# Copyright 2004-2015 by + # suzuki toshiya, Masatake YAMATO, Red Hat K.K., + # David Turner, Robert Wilhelm, and Werner Lemberg. + # +diff --git a/src/gzip/Jamfile b/src/gzip/Jamfile +index a7aafa0..0944a5f 100644 +--- a/src/gzip/Jamfile ++++ b/src/gzip/Jamfile +@@ -1,6 +1,6 @@ + # FreeType 2 src/gzip Jamfile + # +-# Copyright 2001 by ++# Copyright 2001-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/src/gzip/ftgzip.c b/src/gzip/ftgzip.c +index 2d4200d..74144d2 100644 +--- a/src/gzip/ftgzip.c ++++ b/src/gzip/ftgzip.c +@@ -8,7 +8,7 @@ + /* parse compressed PCF fonts, as found with many X11 server */ + /* distributions. */ + /* */ +-/* Copyright 2002-2006, 2009-2014 by */ ++/* Copyright 2002-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/gzip/rules.mk b/src/gzip/rules.mk +index 23222a1..a8f74ec 100644 +--- a/src/gzip/rules.mk ++++ b/src/gzip/rules.mk +@@ -3,7 +3,7 @@ + # + + +-# Copyright 2002, 2003, 2013 by ++# Copyright 2002-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/src/lzw/Jamfile b/src/lzw/Jamfile +index 6f1f516..91effe2 100644 +--- a/src/lzw/Jamfile ++++ b/src/lzw/Jamfile +@@ -1,6 +1,6 @@ + # FreeType 2 src/lzw Jamfile + # +-# Copyright 2004, 2006 by ++# Copyright 2004-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/src/lzw/ftlzw.c b/src/lzw/ftlzw.c +index e1b3564..50fc44f 100644 +--- a/src/lzw/ftlzw.c ++++ b/src/lzw/ftlzw.c +@@ -8,7 +8,7 @@ + /* be used to parse compressed PCF fonts, as found with many X11 server */ + /* distributions. */ + /* */ +-/* Copyright 2004-2006, 2009, 2010, 2012-2014 by */ ++/* Copyright 2004-2015 by */ + /* Albert Chin-A-Young. */ + /* */ + /* Based on code in src/gzip/ftgzip.c, Copyright 2004 by */ +diff --git a/src/lzw/ftzopen.c b/src/lzw/ftzopen.c +index c020eeb..29b3c86 100644 +--- a/src/lzw/ftzopen.c ++++ b/src/lzw/ftzopen.c +@@ -8,7 +8,7 @@ + /* be used to parse compressed PCF fonts, as found with many X11 server */ + /* distributions. */ + /* */ +-/* Copyright 2005-2007, 2009, 2011 by */ ++/* Copyright 2005-2015 by */ + /* David Turner. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/lzw/ftzopen.h b/src/lzw/ftzopen.h +index e9cc792..ae60fbe 100644 +--- a/src/lzw/ftzopen.h ++++ b/src/lzw/ftzopen.h +@@ -8,7 +8,7 @@ + /* be used to parse compressed PCF fonts, as found with many X11 server */ + /* distributions. */ + /* */ +-/* Copyright 2005, 2006, 2007, 2008 by */ ++/* Copyright 2005-2015 by */ + /* David Turner. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/lzw/rules.mk b/src/lzw/rules.mk +index 4362939..c98c0fd 100644 +--- a/src/lzw/rules.mk ++++ b/src/lzw/rules.mk +@@ -3,7 +3,7 @@ + # + + +-# Copyright 2004, 2005, 2006 by ++# Copyright 2004-2015 by + # Albert Chin-A-Young. + # + # Based on src/lzw/rules.mk, Copyright 2002 by +diff --git a/src/otvalid/Jamfile b/src/otvalid/Jamfile +index b457143..dbc2395 100644 +--- a/src/otvalid/Jamfile ++++ b/src/otvalid/Jamfile +@@ -1,6 +1,6 @@ + # FreeType 2 src/otvalid Jamfile + # +-# Copyright 2004 by ++# Copyright 2004-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/src/otvalid/module.mk b/src/otvalid/module.mk +index 9cadde5..3d8c0d9 100644 +--- a/src/otvalid/module.mk ++++ b/src/otvalid/module.mk +@@ -3,7 +3,7 @@ + # + + +-# Copyright 2004, 2006 by ++# Copyright 2004-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/src/otvalid/otvalid.c b/src/otvalid/otvalid.c +index d5c2b75..ca597d7 100644 +--- a/src/otvalid/otvalid.c ++++ b/src/otvalid/otvalid.c +@@ -4,7 +4,7 @@ + /* */ + /* FreeType validator for OpenType tables (body only). */ + /* */ +-/* Copyright 2004, 2007 by */ ++/* Copyright 2004-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/otvalid/otvalid.h b/src/otvalid/otvalid.h +index eb99b9c..3475deb 100644 +--- a/src/otvalid/otvalid.h ++++ b/src/otvalid/otvalid.h +@@ -4,7 +4,7 @@ + /* */ + /* OpenType table validation (specification only). */ + /* */ +-/* Copyright 2004, 2008 by */ ++/* Copyright 2004-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/otvalid/otvbase.c b/src/otvalid/otvbase.c +index 4f9d2fa..24038c6 100644 +--- a/src/otvalid/otvbase.c ++++ b/src/otvalid/otvbase.c +@@ -4,7 +4,7 @@ + /* */ + /* OpenType BASE table validation (body). */ + /* */ +-/* Copyright 2004, 2007 by */ ++/* Copyright 2004-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/otvalid/otvcommn.c b/src/otvalid/otvcommn.c +index 3c3de63..bf51460 100644 +--- a/src/otvalid/otvcommn.c ++++ b/src/otvalid/otvcommn.c +@@ -4,7 +4,7 @@ + /* */ + /* OpenType common tables validation (body). */ + /* */ +-/* Copyright 2004, 2005, 2006, 2007 by */ ++/* Copyright 2004-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/otvalid/otvcommn.h b/src/otvalid/otvcommn.h +index 5c93ba7..3aebf02 100644 +--- a/src/otvalid/otvcommn.h ++++ b/src/otvalid/otvcommn.h +@@ -4,7 +4,7 @@ + /* */ + /* OpenType common tables validation (specification). */ + /* */ +-/* Copyright 2004, 2005, 2007, 2009, 2014 by */ ++/* Copyright 2004-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/otvalid/otverror.h b/src/otvalid/otverror.h +index b6f00c9..214795e 100644 +--- a/src/otvalid/otverror.h ++++ b/src/otvalid/otverror.h +@@ -4,7 +4,7 @@ + /* */ + /* OpenType validation module error codes (specification only). */ + /* */ +-/* Copyright 2004, 2005, 2012, 2013 by */ ++/* Copyright 2004-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/otvalid/otvgdef.c b/src/otvalid/otvgdef.c +index e60ef36..8936ba8 100644 +--- a/src/otvalid/otvgdef.c ++++ b/src/otvalid/otvgdef.c +@@ -4,7 +4,7 @@ + /* */ + /* OpenType GDEF table validation (body). */ + /* */ +-/* Copyright 2004, 2005, 2007 by */ ++/* Copyright 2004-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/otvalid/otvgpos.c b/src/otvalid/otvgpos.c +index 1a9dbaa..6c09b93 100644 +--- a/src/otvalid/otvgpos.c ++++ b/src/otvalid/otvgpos.c +@@ -4,7 +4,7 @@ + /* */ + /* OpenType GPOS table validation (body). */ + /* */ +-/* Copyright 2002, 2004, 2005, 2006, 2007, 2008 by */ ++/* Copyright 2002-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/otvalid/otvgpos.h b/src/otvalid/otvgpos.h +index 14ca408..a792bd9 100644 +--- a/src/otvalid/otvgpos.h ++++ b/src/otvalid/otvgpos.h +@@ -4,7 +4,7 @@ + /* */ + /* OpenType GPOS table validator (specification). */ + /* */ +-/* Copyright 2004 by */ ++/* Copyright 2004-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/otvalid/otvgsub.c b/src/otvalid/otvgsub.c +index 024b8ca..7049022 100644 +--- a/src/otvalid/otvgsub.c ++++ b/src/otvalid/otvgsub.c +@@ -4,7 +4,7 @@ + /* */ + /* OpenType GSUB table validation (body). */ + /* */ +-/* Copyright 2004, 2005, 2007 by */ ++/* Copyright 2004-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/otvalid/otvjstf.c b/src/otvalid/otvjstf.c +index f273be8..fe68a60 100644 +--- a/src/otvalid/otvjstf.c ++++ b/src/otvalid/otvjstf.c +@@ -4,7 +4,7 @@ + /* */ + /* OpenType JSTF table validation (body). */ + /* */ +-/* Copyright 2004, 2007 by */ ++/* Copyright 2004-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/otvalid/otvmath.c b/src/otvalid/otvmath.c +index d1791f8..b0d4fc0 100644 +--- a/src/otvalid/otvmath.c ++++ b/src/otvalid/otvmath.c +@@ -4,7 +4,7 @@ + /* */ + /* OpenType MATH table validation (body). */ + /* */ +-/* Copyright 2007, 2008 by */ ++/* Copyright 2007-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* Written by George Williams. */ +diff --git a/src/otvalid/otvmod.c b/src/otvalid/otvmod.c +index 37c6e86..92f8513 100644 +--- a/src/otvalid/otvmod.c ++++ b/src/otvalid/otvmod.c +@@ -4,7 +4,7 @@ + /* */ + /* FreeType's OpenType validation module implementation (body). */ + /* */ +-/* Copyright 2004-2008, 2013 by */ ++/* Copyright 2004-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/otvalid/otvmod.h b/src/otvalid/otvmod.h +index f7e1550..c3a0234 100644 +--- a/src/otvalid/otvmod.h ++++ b/src/otvalid/otvmod.h +@@ -5,7 +5,7 @@ + /* FreeType's OpenType validation module implementation */ + /* (specification). */ + /* */ +-/* Copyright 2004 by */ ++/* Copyright 2004-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/otvalid/rules.mk b/src/otvalid/rules.mk +index 7454335..56d749c 100644 +--- a/src/otvalid/rules.mk ++++ b/src/otvalid/rules.mk +@@ -3,7 +3,7 @@ + # + + +-# Copyright 2004, 2007 by ++# Copyright 2004-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/src/pcf/Jamfile b/src/pcf/Jamfile +index 752fcac..8cd90e4 100644 +--- a/src/pcf/Jamfile ++++ b/src/pcf/Jamfile +@@ -1,6 +1,6 @@ + # FreeType 2 src/pcf Jamfile + # +-# Copyright 2001, 2003 by ++# Copyright 2001-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/src/pfr/Jamfile b/src/pfr/Jamfile +index 9e2f2b8..2064bcd 100644 +--- a/src/pfr/Jamfile ++++ b/src/pfr/Jamfile +@@ -1,6 +1,6 @@ + # FreeType 2 src/pfr Jamfile + # +-# Copyright 2002 by ++# Copyright 2002-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/src/pfr/module.mk b/src/pfr/module.mk +index 8d1d28a..3f5a47e 100644 +--- a/src/pfr/module.mk ++++ b/src/pfr/module.mk +@@ -3,7 +3,7 @@ + # + + +-# Copyright 2002, 2006 by ++# Copyright 2002-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/src/pfr/pfr.c b/src/pfr/pfr.c +index eb2c4ed..96e6730 100644 +--- a/src/pfr/pfr.c ++++ b/src/pfr/pfr.c +@@ -4,7 +4,7 @@ + /* */ + /* FreeType PFR driver component. */ + /* */ +-/* Copyright 2002 by */ ++/* Copyright 2002-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/pfr/pfrcmap.c b/src/pfr/pfrcmap.c +index 90ba010..88ff55a 100644 +--- a/src/pfr/pfrcmap.c ++++ b/src/pfr/pfrcmap.c +@@ -4,7 +4,7 @@ + /* */ + /* FreeType PFR cmap handling (body). */ + /* */ +-/* Copyright 2002, 2007, 2009, 2013 by */ ++/* Copyright 2002-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/pfr/pfrcmap.h b/src/pfr/pfrcmap.h +index a626953..87e1e5b 100644 +--- a/src/pfr/pfrcmap.h ++++ b/src/pfr/pfrcmap.h +@@ -4,7 +4,7 @@ + /* */ + /* FreeType PFR cmap handling (specification). */ + /* */ +-/* Copyright 2002 by */ ++/* Copyright 2002-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/pfr/pfrdrivr.c b/src/pfr/pfrdrivr.c +index db66281..9d344d1 100644 +--- a/src/pfr/pfrdrivr.c ++++ b/src/pfr/pfrdrivr.c +@@ -4,7 +4,7 @@ + /* */ + /* FreeType PFR driver interface (body). */ + /* */ +-/* Copyright 2002-2004, 2006, 2008, 2010, 2011, 2013, 2014 by */ ++/* Copyright 2002-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/pfr/pfrdrivr.h b/src/pfr/pfrdrivr.h +index 75f86c5..b5be470 100644 +--- a/src/pfr/pfrdrivr.h ++++ b/src/pfr/pfrdrivr.h +@@ -4,7 +4,7 @@ + /* */ + /* High-level Type PFR driver interface (specification). */ + /* */ +-/* Copyright 2002 by */ ++/* Copyright 2002-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/pfr/pfrerror.h b/src/pfr/pfrerror.h +index 94dc8c5..978e7b2 100644 +--- a/src/pfr/pfrerror.h ++++ b/src/pfr/pfrerror.h +@@ -4,7 +4,7 @@ + /* */ + /* PFR error codes (specification only). */ + /* */ +-/* Copyright 2002, 2012 by */ ++/* Copyright 2002-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/pfr/pfrgload.c b/src/pfr/pfrgload.c +index 2ce0937..1d27437 100644 +--- a/src/pfr/pfrgload.c ++++ b/src/pfr/pfrgload.c +@@ -4,7 +4,7 @@ + /* */ + /* FreeType PFR glyph loader (body). */ + /* */ +-/* Copyright 2002, 2003, 2005, 2007, 2010, 2013 by */ ++/* Copyright 2002-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/pfr/pfrgload.h b/src/pfr/pfrgload.h +index 7cc7a87..c7c8da1 100644 +--- a/src/pfr/pfrgload.h ++++ b/src/pfr/pfrgload.h +@@ -4,7 +4,7 @@ + /* */ + /* FreeType PFR glyph loader (specification). */ + /* */ +-/* Copyright 2002 by */ ++/* Copyright 2002-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/pfr/pfrload.c b/src/pfr/pfrload.c +index f68d016..9831662 100644 +--- a/src/pfr/pfrload.c ++++ b/src/pfr/pfrload.c +@@ -4,7 +4,7 @@ + /* */ + /* FreeType PFR loader (body). */ + /* */ +-/* Copyright 2002-2005, 2007, 2009, 2010, 2013, 2014 by */ ++/* Copyright 2002-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/pfr/pfrload.h b/src/pfr/pfrload.h +index ed01071..c5b8d66 100644 +--- a/src/pfr/pfrload.h ++++ b/src/pfr/pfrload.h +@@ -4,7 +4,7 @@ + /* */ + /* FreeType PFR loader (specification). */ + /* */ +-/* Copyright 2002 by */ ++/* Copyright 2002-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/pfr/pfrobjs.c b/src/pfr/pfrobjs.c +index 0c89242..1c8683e 100644 +--- a/src/pfr/pfrobjs.c ++++ b/src/pfr/pfrobjs.c +@@ -4,7 +4,7 @@ + /* */ + /* FreeType PFR object methods (body). */ + /* */ +-/* Copyright 2002-2008, 2010-2011, 2013, 2014 by */ ++/* Copyright 2002-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/pfr/pfrobjs.h b/src/pfr/pfrobjs.h +index f6aa8b4..e990b45 100644 +--- a/src/pfr/pfrobjs.h ++++ b/src/pfr/pfrobjs.h +@@ -4,7 +4,7 @@ + /* */ + /* FreeType PFR object methods (specification). */ + /* */ +-/* Copyright 2002, 2003, 2004 by */ ++/* Copyright 2002-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/pfr/pfrsbit.c b/src/pfr/pfrsbit.c +index 979bf78..280cf2a 100644 +--- a/src/pfr/pfrsbit.c ++++ b/src/pfr/pfrsbit.c +@@ -4,7 +4,7 @@ + /* */ + /* FreeType PFR bitmap loader (body). */ + /* */ +-/* Copyright 2002, 2003, 2006, 2009, 2010, 2013 by */ ++/* Copyright 2002-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/pfr/pfrsbit.h b/src/pfr/pfrsbit.h +index 015e9e6..0db2cd5 100644 +--- a/src/pfr/pfrsbit.h ++++ b/src/pfr/pfrsbit.h +@@ -4,7 +4,7 @@ + /* */ + /* FreeType PFR bitmap loader (specification). */ + /* */ +-/* Copyright 2002 by */ ++/* Copyright 2002-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/pfr/pfrtypes.h b/src/pfr/pfrtypes.h +index 9183108..9af906e 100644 +--- a/src/pfr/pfrtypes.h ++++ b/src/pfr/pfrtypes.h +@@ -4,7 +4,7 @@ + /* */ + /* FreeType PFR data structures (specification only). */ + /* */ +-/* Copyright 2002, 2003, 2005, 2007 by */ ++/* Copyright 2002-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/pfr/rules.mk b/src/pfr/rules.mk +index 01f44f1..e665460 100644 +--- a/src/pfr/rules.mk ++++ b/src/pfr/rules.mk +@@ -3,7 +3,7 @@ + # + + +-# Copyright 2002, 2003 by ++# Copyright 2002-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/src/psaux/Jamfile b/src/psaux/Jamfile +index faeded9..d7c2e6c 100644 +--- a/src/psaux/Jamfile ++++ b/src/psaux/Jamfile +@@ -1,6 +1,6 @@ + # FreeType 2 src/psaux Jamfile + # +-# Copyright 2001, 2002 by ++# Copyright 2001-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/src/psaux/afmparse.c b/src/psaux/afmparse.c +index 6a40e11..c9bcfcf 100644 +--- a/src/psaux/afmparse.c ++++ b/src/psaux/afmparse.c +@@ -4,7 +4,7 @@ + /* */ + /* AFM parser (body). */ + /* */ +-/* Copyright 2006-2010, 2012, 2013 by */ ++/* Copyright 2006-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/psaux/afmparse.h b/src/psaux/afmparse.h +index 35d9604..155eb40 100644 +--- a/src/psaux/afmparse.h ++++ b/src/psaux/afmparse.h +@@ -4,7 +4,7 @@ + /* */ + /* AFM parser (specification). */ + /* */ +-/* Copyright 2006 by */ ++/* Copyright 2006-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/psaux/module.mk b/src/psaux/module.mk +index 42bf6f5..1d90e14 100644 +--- a/src/psaux/module.mk ++++ b/src/psaux/module.mk +@@ -3,7 +3,7 @@ + # + + +-# Copyright 1996-2000, 2006 by ++# Copyright 1996-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/src/psaux/psaux.c b/src/psaux/psaux.c +index a4b9c5c..7f1d9aa 100644 +--- a/src/psaux/psaux.c ++++ b/src/psaux/psaux.c +@@ -4,7 +4,7 @@ + /* */ + /* FreeType auxiliary PostScript driver component (body only). */ + /* */ +-/* Copyright 1996-2001, 2002, 2006 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/psaux/psauxerr.h b/src/psaux/psauxerr.h +index d52375f..97712f0 100644 +--- a/src/psaux/psauxerr.h ++++ b/src/psaux/psauxerr.h +@@ -4,7 +4,7 @@ + /* */ + /* PS auxiliary module error codes (specification only). */ + /* */ +-/* Copyright 2001, 2012 by */ ++/* Copyright 2001-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/psaux/psauxmod.c b/src/psaux/psauxmod.c +index 4b1249d..06fcab0 100644 +--- a/src/psaux/psauxmod.c ++++ b/src/psaux/psauxmod.c +@@ -4,7 +4,7 @@ + /* */ + /* FreeType auxiliary PostScript module implementation (body). */ + /* */ +-/* Copyright 2000-2001, 2002, 2003, 2006 by */ ++/* Copyright 2000-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/psaux/psauxmod.h b/src/psaux/psauxmod.h +index 1217236..ae6a8f9 100644 +--- a/src/psaux/psauxmod.h ++++ b/src/psaux/psauxmod.h +@@ -4,7 +4,7 @@ + /* */ + /* FreeType auxiliary PostScript module implementation (specification). */ + /* */ +-/* Copyright 2000-2001 by */ ++/* Copyright 2000-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/psaux/psconv.c b/src/psaux/psconv.c +index 22e8cf2..ca3eec4 100644 +--- a/src/psaux/psconv.c ++++ b/src/psaux/psconv.c +@@ -4,7 +4,7 @@ + /* */ + /* Some convenience conversions (body). */ + /* */ +-/* Copyright 2006, 2008, 2009, 2012-2013 by */ ++/* Copyright 2006-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/psaux/psconv.h b/src/psaux/psconv.h +index d91c762..10f1ff7 100644 +--- a/src/psaux/psconv.h ++++ b/src/psaux/psconv.h +@@ -4,7 +4,7 @@ + /* */ + /* Some convenience conversions (specification). */ + /* */ +-/* Copyright 2006, 2012 by */ ++/* Copyright 2006-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/psaux/psobjs.c b/src/psaux/psobjs.c +index 7ec3b4c..1c3ff72 100644 +--- a/src/psaux/psobjs.c ++++ b/src/psaux/psobjs.c +@@ -4,7 +4,7 @@ + /* */ + /* Auxiliary functions for PostScript fonts (body). */ + /* */ +-/* Copyright 1996-2014 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/psaux/psobjs.h b/src/psaux/psobjs.h +index e380c60..aa2d739 100644 +--- a/src/psaux/psobjs.h ++++ b/src/psaux/psobjs.h +@@ -4,7 +4,7 @@ + /* */ + /* Auxiliary functions for PostScript fonts (specification). */ + /* */ +-/* Copyright 1996-2001, 2002, 2003 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/psaux/rules.mk b/src/psaux/rules.mk +index 788d813..0d2118c 100644 +--- a/src/psaux/rules.mk ++++ b/src/psaux/rules.mk +@@ -3,7 +3,7 @@ + # + + +-# Copyright 1996-2000, 2002, 2003, 2006 by ++# Copyright 1996-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/src/psaux/t1cmap.c b/src/psaux/t1cmap.c +index fb1353a..f9b5ea2 100644 +--- a/src/psaux/t1cmap.c ++++ b/src/psaux/t1cmap.c +@@ -4,7 +4,7 @@ + /* */ + /* Type 1 character map support (body). */ + /* */ +-/* Copyright 2002, 2003, 2006, 2007, 2012 by */ ++/* Copyright 2002-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/psaux/t1cmap.h b/src/psaux/t1cmap.h +index 7ae65d2..b8ba06c 100644 +--- a/src/psaux/t1cmap.h ++++ b/src/psaux/t1cmap.h +@@ -4,7 +4,7 @@ + /* */ + /* Type 1 character map support (specification). */ + /* */ +-/* Copyright 2002, 2003, 2006 by */ ++/* Copyright 2002-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/psaux/t1decode.c b/src/psaux/t1decode.c +index d67a05e..a8274f1 100644 +--- a/src/psaux/t1decode.c ++++ b/src/psaux/t1decode.c +@@ -4,7 +4,7 @@ + /* */ + /* PostScript Type 1 decoding routines (body). */ + /* */ +-/* Copyright 2000-2014 by */ ++/* Copyright 2000-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/psaux/t1decode.h b/src/psaux/t1decode.h +index 00728db..e83078f 100644 +--- a/src/psaux/t1decode.h ++++ b/src/psaux/t1decode.h +@@ -4,7 +4,7 @@ + /* */ + /* PostScript Type 1 decoding routines (specification). */ + /* */ +-/* Copyright 2000-2001, 2002, 2003 by */ ++/* Copyright 2000-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/pshinter/Jamfile b/src/pshinter/Jamfile +index 779f1b0..e763c47 100644 +--- a/src/pshinter/Jamfile ++++ b/src/pshinter/Jamfile +@@ -1,6 +1,6 @@ + # FreeType 2 src/pshinter Jamfile + # +-# Copyright 2001, 2003 by ++# Copyright 2001-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/src/pshinter/module.mk b/src/pshinter/module.mk +index ed24eb7..1fd8e55 100644 +--- a/src/pshinter/module.mk ++++ b/src/pshinter/module.mk +@@ -3,7 +3,7 @@ + # + + +-# Copyright 1996-2001, 2006 by ++# Copyright 1996-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/src/pshinter/pshalgo.c b/src/pshinter/pshalgo.c +index 644c76d..e62b9e9 100644 +--- a/src/pshinter/pshalgo.c ++++ b/src/pshinter/pshalgo.c +@@ -4,7 +4,7 @@ + /* */ + /* PostScript hinting algorithm (body). */ + /* */ +-/* Copyright 2001-2010, 2012-2014 by */ ++/* Copyright 2001-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used */ +diff --git a/src/pshinter/pshalgo.h b/src/pshinter/pshalgo.h +index c70f31e..3751aca 100644 +--- a/src/pshinter/pshalgo.h ++++ b/src/pshinter/pshalgo.h +@@ -4,7 +4,7 @@ + /* */ + /* PostScript hinting algorithm (specification). */ + /* */ +-/* Copyright 2001-2003, 2008, 2013 by */ ++/* Copyright 2001-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/pshinter/pshglob.c b/src/pshinter/pshglob.c +index 1bcc481..652e091 100644 +--- a/src/pshinter/pshglob.c ++++ b/src/pshinter/pshglob.c +@@ -5,7 +5,7 @@ + /* PostScript hinter global hinting management (body). */ + /* Inspired by the new auto-hinter module. */ + /* */ +-/* Copyright 2001-2004, 2006, 2010, 2012-2014 by */ ++/* Copyright 2001-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used */ +diff --git a/src/pshinter/pshglob.h b/src/pshinter/pshglob.h +index 94d972a..c376df7 100644 +--- a/src/pshinter/pshglob.h ++++ b/src/pshinter/pshglob.h +@@ -4,7 +4,7 @@ + /* */ + /* PostScript hinter global hinting management. */ + /* */ +-/* Copyright 2001, 2002, 2003, 2014 by */ ++/* Copyright 2001-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/pshinter/pshinter.c b/src/pshinter/pshinter.c +index b35a2a9..9e65fe2 100644 +--- a/src/pshinter/pshinter.c ++++ b/src/pshinter/pshinter.c +@@ -4,7 +4,7 @@ + /* */ + /* FreeType PostScript Hinting module */ + /* */ +-/* Copyright 2001, 2003 by */ ++/* Copyright 2001-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/pshinter/pshmod.c b/src/pshinter/pshmod.c +index cdeaca1..961b468 100644 +--- a/src/pshinter/pshmod.c ++++ b/src/pshinter/pshmod.c +@@ -4,7 +4,7 @@ + /* */ + /* FreeType PostScript hinter module implementation (body). */ + /* */ +-/* Copyright 2001, 2002, 2007, 2009, 2012 by */ ++/* Copyright 2001-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/pshinter/pshmod.h b/src/pshinter/pshmod.h +index 0ae7e96..a58d856 100644 +--- a/src/pshinter/pshmod.h ++++ b/src/pshinter/pshmod.h +@@ -4,7 +4,7 @@ + /* */ + /* PostScript hinter module interface (specification). */ + /* */ +-/* Copyright 2001 by */ ++/* Copyright 2001-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/pshinter/pshnterr.h b/src/pshinter/pshnterr.h +index 7cc180f..ce790a8 100644 +--- a/src/pshinter/pshnterr.h ++++ b/src/pshinter/pshnterr.h +@@ -4,7 +4,7 @@ + /* */ + /* PS Hinter error codes (specification only). */ + /* */ +-/* Copyright 2003, 2012 by */ ++/* Copyright 2003-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/pshinter/pshpic.c b/src/pshinter/pshpic.c +index 568f4ac..afd8fb9 100644 +--- a/src/pshinter/pshpic.c ++++ b/src/pshinter/pshpic.c +@@ -4,7 +4,7 @@ + /* */ + /* The FreeType position independent code services for pshinter module. */ + /* */ +-/* Copyright 2009, 2010, 2012, 2013 by */ ++/* Copyright 2009-2015 by */ + /* Oran Agra and Mickey Gabel. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/pshinter/pshpic.h b/src/pshinter/pshpic.h +index b46f853..62de457 100644 +--- a/src/pshinter/pshpic.h ++++ b/src/pshinter/pshpic.h +@@ -4,7 +4,7 @@ + /* */ + /* The FreeType position independent code services for pshinter module. */ + /* */ +-/* Copyright 2009, 2012, 2013 by */ ++/* Copyright 2009-2015 by */ + /* Oran Agra and Mickey Gabel. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/pshinter/pshrec.c b/src/pshinter/pshrec.c +index 73a18ff..51f2361 100644 +--- a/src/pshinter/pshrec.c ++++ b/src/pshinter/pshrec.c +@@ -4,7 +4,7 @@ + /* */ + /* FreeType PostScript hints recorder (body). */ + /* */ +-/* Copyright 2001-2004, 2007, 2009, 2013, 2014 by */ ++/* Copyright 2001-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/pshinter/pshrec.h b/src/pshinter/pshrec.h +index a88fe6e..9106bc8 100644 +--- a/src/pshinter/pshrec.h ++++ b/src/pshinter/pshrec.h +@@ -4,7 +4,7 @@ + /* */ + /* Postscript (Type1/Type2) hints recorder (specification). */ + /* */ +-/* Copyright 2001, 2002, 2003, 2006, 2008, 2014 by */ ++/* Copyright 2001-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/pshinter/rules.mk b/src/pshinter/rules.mk +index afc4a40..7838e67 100644 +--- a/src/pshinter/rules.mk ++++ b/src/pshinter/rules.mk +@@ -3,7 +3,7 @@ + # + + +-# Copyright 2001, 2003, 2011 by ++# Copyright 2001-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/src/psnames/Jamfile b/src/psnames/Jamfile +index 06c0dda..b9fe235 100644 +--- a/src/psnames/Jamfile ++++ b/src/psnames/Jamfile +@@ -1,6 +1,6 @@ + # FreeType 2 src/psnames Jamfile + # +-# Copyright 2001 by ++# Copyright 2001-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/src/psnames/module.mk b/src/psnames/module.mk +index a6e9082..3708f60 100644 +--- a/src/psnames/module.mk ++++ b/src/psnames/module.mk +@@ -3,7 +3,7 @@ + # + + +-# Copyright 1996-2000, 2006 by ++# Copyright 1996-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/src/psnames/psmodule.c b/src/psnames/psmodule.c +index 42c9aff..448be1e 100644 +--- a/src/psnames/psmodule.c ++++ b/src/psnames/psmodule.c +@@ -4,7 +4,7 @@ + /* */ + /* PSNames module implementation (body). */ + /* */ +-/* Copyright 1996-2003, 2005-2008, 2012-2014 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/psnames/psmodule.h b/src/psnames/psmodule.h +index 28fa148..f85f322 100644 +--- a/src/psnames/psmodule.h ++++ b/src/psnames/psmodule.h +@@ -4,7 +4,7 @@ + /* */ + /* High-level PSNames module interface (specification). */ + /* */ +-/* Copyright 1996-2001 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/psnames/psnamerr.h b/src/psnames/psnamerr.h +index acda7f9..09cc247 100644 +--- a/src/psnames/psnamerr.h ++++ b/src/psnames/psnamerr.h +@@ -4,7 +4,7 @@ + /* */ + /* PS names module error codes (specification only). */ + /* */ +-/* Copyright 2001, 2012 by */ ++/* Copyright 2001-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/psnames/psnames.c b/src/psnames/psnames.c +index 1ede225..a438596 100644 +--- a/src/psnames/psnames.c ++++ b/src/psnames/psnames.c +@@ -4,7 +4,7 @@ + /* */ + /* FreeType PSNames module component (body only). */ + /* */ +-/* Copyright 1996-2001 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/psnames/pspic.c b/src/psnames/pspic.c +index 3820f65..1394f97 100644 +--- a/src/psnames/pspic.c ++++ b/src/psnames/pspic.c +@@ -4,7 +4,7 @@ + /* */ + /* The FreeType position independent code services for psnames module. */ + /* */ +-/* Copyright 2009, 2010, 2012, 2013 by */ ++/* Copyright 2009-2015 by */ + /* Oran Agra and Mickey Gabel. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/psnames/pspic.h b/src/psnames/pspic.h +index 6ff002c..88ccda3 100644 +--- a/src/psnames/pspic.h ++++ b/src/psnames/pspic.h +@@ -4,7 +4,7 @@ + /* */ + /* The FreeType position independent code services for psnames module. */ + /* */ +-/* Copyright 2009, 2012 by */ ++/* Copyright 2009-2015 by */ + /* Oran Agra and Mickey Gabel. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/psnames/pstables.h b/src/psnames/pstables.h +index 0a6637f..3f31c31 100644 +--- a/src/psnames/pstables.h ++++ b/src/psnames/pstables.h +@@ -4,7 +4,7 @@ + /* */ + /* PostScript glyph names. */ + /* */ +-/* Copyright 2005, 2008, 2011 by */ ++/* Copyright 2005-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/psnames/rules.mk b/src/psnames/rules.mk +index 278f659..3c77486 100644 +--- a/src/psnames/rules.mk ++++ b/src/psnames/rules.mk +@@ -3,7 +3,7 @@ + # + + +-# Copyright 1996-2001, 2003, 2011, 2013 by ++# Copyright 1996-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/src/raster/Jamfile b/src/raster/Jamfile +index 4f60e87..f03ed32 100644 +--- a/src/raster/Jamfile ++++ b/src/raster/Jamfile +@@ -1,6 +1,6 @@ + # FreeType 2 src/raster Jamfile + # +-# Copyright 2001 by ++# Copyright 2001-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/src/raster/ftmisc.h b/src/raster/ftmisc.h +index 703155a..19be4ca 100644 +--- a/src/raster/ftmisc.h ++++ b/src/raster/ftmisc.h +@@ -5,7 +5,7 @@ + /* Miscellaneous macros for stand-alone rasterizer (specification */ + /* only). */ + /* */ +-/* Copyright 2005, 2009, 2010 by */ ++/* Copyright 2005-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used */ +diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c +index 2b182f7..65ba454 100644 +--- a/src/raster/ftraster.c ++++ b/src/raster/ftraster.c +@@ -4,7 +4,7 @@ + /* */ + /* The FreeType glyph rasterizer (body). */ + /* */ +-/* Copyright 1996-2003, 2005, 2007-2014 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/raster/ftraster.h b/src/raster/ftraster.h +index 80fe46d..a270d48 100644 +--- a/src/raster/ftraster.h ++++ b/src/raster/ftraster.h +@@ -4,7 +4,7 @@ + /* */ + /* The FreeType glyph rasterizer (specification). */ + /* */ +-/* Copyright 1996-2001 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used */ +diff --git a/src/raster/ftrend1.c b/src/raster/ftrend1.c +index 8a468a8..437996b 100644 +--- a/src/raster/ftrend1.c ++++ b/src/raster/ftrend1.c +@@ -4,7 +4,7 @@ + /* */ + /* The FreeType glyph rasterizer interface (body). */ + /* */ +-/* Copyright 1996-2003, 2005, 2006, 2011, 2013 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/raster/ftrend1.h b/src/raster/ftrend1.h +index 4cf1286..c367260 100644 +--- a/src/raster/ftrend1.h ++++ b/src/raster/ftrend1.h +@@ -4,7 +4,7 @@ + /* */ + /* The FreeType glyph rasterizer interface (specification). */ + /* */ +-/* Copyright 1996-2001 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/raster/module.mk b/src/raster/module.mk +index cbff5df..75ea107 100644 +--- a/src/raster/module.mk ++++ b/src/raster/module.mk +@@ -3,7 +3,7 @@ + # + + +-# Copyright 1996-2000, 2006 by ++# Copyright 1996-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/src/raster/raster.c b/src/raster/raster.c +index 1202a11..21bb16d 100644 +--- a/src/raster/raster.c ++++ b/src/raster/raster.c +@@ -4,7 +4,7 @@ + /* */ + /* FreeType monochrome rasterer module component (body only). */ + /* */ +-/* Copyright 1996-2001 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/raster/rasterrs.h b/src/raster/rasterrs.h +index ab85c00..e7f00bc 100644 +--- a/src/raster/rasterrs.h ++++ b/src/raster/rasterrs.h +@@ -4,7 +4,7 @@ + /* */ + /* monochrome renderer error codes (specification only). */ + /* */ +-/* Copyright 2001, 2012 by */ ++/* Copyright 2001-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/raster/rastpic.c b/src/raster/rastpic.c +index 5e9f7cc..fe58c99 100644 +--- a/src/raster/rastpic.c ++++ b/src/raster/rastpic.c +@@ -4,7 +4,7 @@ + /* */ + /* The FreeType position independent code services for raster module. */ + /* */ +-/* Copyright 2009, 2010, 2012, 2013 by */ ++/* Copyright 2009-2015 by */ + /* Oran Agra and Mickey Gabel. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/raster/rastpic.h b/src/raster/rastpic.h +index e0ddba6..a875884 100644 +--- a/src/raster/rastpic.h ++++ b/src/raster/rastpic.h +@@ -4,7 +4,7 @@ + /* */ + /* The FreeType position independent code services for raster module. */ + /* */ +-/* Copyright 2009 by */ ++/* Copyright 2009-2015 by */ + /* Oran Agra and Mickey Gabel. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/raster/rules.mk b/src/raster/rules.mk +index 6683ed7..c214b35 100644 +--- a/src/raster/rules.mk ++++ b/src/raster/rules.mk +@@ -3,7 +3,7 @@ + # + + +-# Copyright 1996-2000, 2001, 2003, 2008, 2009, 2011 by ++# Copyright 1996-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/src/sfnt/Jamfile b/src/sfnt/Jamfile +index cb20b1b..73c6e15 100644 +--- a/src/sfnt/Jamfile ++++ b/src/sfnt/Jamfile +@@ -1,6 +1,6 @@ + # FreeType 2 src/sfnt Jamfile + # +-# Copyright 2001, 2002, 2004, 2005 by ++# Copyright 2001-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/src/sfnt/module.mk b/src/sfnt/module.mk +index 95fd6a3..535fe22 100644 +--- a/src/sfnt/module.mk ++++ b/src/sfnt/module.mk +@@ -3,7 +3,7 @@ + # + + +-# Copyright 1996-2000, 2006 by ++# Copyright 1996-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/src/sfnt/pngshim.c b/src/sfnt/pngshim.c +index fb7ce99..473d396 100644 +--- a/src/sfnt/pngshim.c ++++ b/src/sfnt/pngshim.c +@@ -4,7 +4,7 @@ + /* */ + /* PNG Bitmap glyph support. */ + /* */ +-/* Copyright 2013, 2014 by */ ++/* Copyright 2013-2015 by */ + /* Google, Inc. */ + /* Written by Stuart Gill and Behdad Esfahbod. */ + /* */ +diff --git a/src/sfnt/pngshim.h b/src/sfnt/pngshim.h +index 0b8cff7..4cc5c2b 100644 +--- a/src/sfnt/pngshim.h ++++ b/src/sfnt/pngshim.h +@@ -4,7 +4,7 @@ + /* */ + /* PNG Bitmap glyph support. */ + /* */ +-/* Copyright 2013 by */ ++/* Copyright 2013-2015 by */ + /* Google, Inc. */ + /* Written by Stuart Gill and Behdad Esfahbod. */ + /* */ +diff --git a/src/sfnt/rules.mk b/src/sfnt/rules.mk +index b6e5aa0..3cc76b3 100644 +--- a/src/sfnt/rules.mk ++++ b/src/sfnt/rules.mk +@@ -3,7 +3,7 @@ + # + + +-# Copyright 1996-2000, 2002-2007, 2009, 2011, 2013 by ++# Copyright 1996-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/src/sfnt/sfdriver.c b/src/sfnt/sfdriver.c +index badb159..14d8c23 100644 +--- a/src/sfnt/sfdriver.c ++++ b/src/sfnt/sfdriver.c +@@ -4,7 +4,7 @@ + /* */ + /* High-level SFNT driver interface (body). */ + /* */ +-/* Copyright 1996-2007, 2009-2014 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/sfnt/sfdriver.h b/src/sfnt/sfdriver.h +index 5de25d5..944119c 100644 +--- a/src/sfnt/sfdriver.h ++++ b/src/sfnt/sfdriver.h +@@ -4,7 +4,7 @@ + /* */ + /* High-level SFNT driver interface (specification). */ + /* */ +-/* Copyright 1996-2001 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/sfnt/sferrors.h b/src/sfnt/sferrors.h +index e981e1d..e3bef3f 100644 +--- a/src/sfnt/sferrors.h ++++ b/src/sfnt/sferrors.h +@@ -4,7 +4,7 @@ + /* */ + /* SFNT error codes (specification only). */ + /* */ +-/* Copyright 2001, 2004, 2012, 2013 by */ ++/* Copyright 2001-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/sfnt/sfnt.c b/src/sfnt/sfnt.c +index d62ed4e..0b8b5f4 100644 +--- a/src/sfnt/sfnt.c ++++ b/src/sfnt/sfnt.c +@@ -4,7 +4,7 @@ + /* */ + /* Single object library component. */ + /* */ +-/* Copyright 1996-2006, 2013 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/sfnt/sfntpic.c b/src/sfnt/sfntpic.c +index b3fb24b..2aaf4bc 100644 +--- a/src/sfnt/sfntpic.c ++++ b/src/sfnt/sfntpic.c +@@ -4,7 +4,7 @@ + /* */ + /* The FreeType position independent code services for sfnt module. */ + /* */ +-/* Copyright 2009, 2010, 2012, 2013 by */ ++/* Copyright 2009-2015 by */ + /* Oran Agra and Mickey Gabel. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/sfnt/sfntpic.h b/src/sfnt/sfntpic.h +index b09a914..563d634 100644 +--- a/src/sfnt/sfntpic.h ++++ b/src/sfnt/sfntpic.h +@@ -4,7 +4,7 @@ + /* */ + /* The FreeType position independent code services for sfnt module. */ + /* */ +-/* Copyright 2009, 2012 by */ ++/* Copyright 2009-2015 by */ + /* Oran Agra and Mickey Gabel. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/sfnt/sfobjs.c b/src/sfnt/sfobjs.c +index 70b988d..d0fc5b8 100644 +--- a/src/sfnt/sfobjs.c ++++ b/src/sfnt/sfobjs.c +@@ -4,7 +4,7 @@ + /* */ + /* SFNT object management (base). */ + /* */ +-/* Copyright 1996-2008, 2010-2014 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/sfnt/sfobjs.h b/src/sfnt/sfobjs.h +index 6241c93..77c7d92 100644 +--- a/src/sfnt/sfobjs.h ++++ b/src/sfnt/sfobjs.h +@@ -4,7 +4,7 @@ + /* */ + /* SFNT object management (specification). */ + /* */ +-/* Copyright 1996-2001, 2002 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/sfnt/ttbdf.c b/src/sfnt/ttbdf.c +index 9401dae..098b781 100644 +--- a/src/sfnt/ttbdf.c ++++ b/src/sfnt/ttbdf.c +@@ -4,7 +4,7 @@ + /* */ + /* TrueType and OpenType embedded BDF properties (body). */ + /* */ +-/* Copyright 2005, 2006, 2010, 2013 by */ ++/* Copyright 2005-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/sfnt/ttbdf.h b/src/sfnt/ttbdf.h +index 48a10d6..fe4ba48 100644 +--- a/src/sfnt/ttbdf.h ++++ b/src/sfnt/ttbdf.h +@@ -4,7 +4,7 @@ + /* */ + /* TrueType and OpenType embedded BDF properties (specification). */ + /* */ +-/* Copyright 2005 by */ ++/* Copyright 2005-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/sfnt/ttcmap.c b/src/sfnt/ttcmap.c +index f54de70..cb062b7 100644 +--- a/src/sfnt/ttcmap.c ++++ b/src/sfnt/ttcmap.c +@@ -4,7 +4,7 @@ + /* */ + /* TrueType character mapping table (cmap) support (body). */ + /* */ +-/* Copyright 2002-2010, 2012-2014 by */ ++/* Copyright 2002-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/sfnt/ttcmap.h b/src/sfnt/ttcmap.h +index 0fde167..b7ea8ee 100644 +--- a/src/sfnt/ttcmap.h ++++ b/src/sfnt/ttcmap.h +@@ -4,7 +4,7 @@ + /* */ + /* TrueType character mapping table (cmap) support (specification). */ + /* */ +-/* Copyright 2002-2005, 2009, 2012 by */ ++/* Copyright 2002-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/sfnt/ttcmapc.h b/src/sfnt/ttcmapc.h +index 2ea2043..4a48940 100644 +--- a/src/sfnt/ttcmapc.h ++++ b/src/sfnt/ttcmapc.h +@@ -4,7 +4,7 @@ + /* */ + /* TT CMAP classes definitions (specification only). */ + /* */ +-/* Copyright 2009 by */ ++/* Copyright 2009-2015 by */ + /* Oran Agra and Mickey Gabel. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/sfnt/ttkern.c b/src/sfnt/ttkern.c +index 455e7b5..6c4f2cb 100644 +--- a/src/sfnt/ttkern.c ++++ b/src/sfnt/ttkern.c +@@ -5,7 +5,7 @@ + /* Load the basic TrueType kerning table. This doesn't handle */ + /* kerning data within the GPOS table at the moment. */ + /* */ +-/* Copyright 1996-2007, 2009, 2010, 2013 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/sfnt/ttkern.h b/src/sfnt/ttkern.h +index df1da9b..89cb24f 100644 +--- a/src/sfnt/ttkern.h ++++ b/src/sfnt/ttkern.h +@@ -5,7 +5,7 @@ + /* Load the basic TrueType kerning table. This doesn't handle */ + /* kerning data within the GPOS table at the moment. */ + /* */ +-/* Copyright 1996-2001, 2002, 2005, 2007 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/sfnt/ttload.c b/src/sfnt/ttload.c +index 8338150..8606e85 100644 +--- a/src/sfnt/ttload.c ++++ b/src/sfnt/ttload.c +@@ -5,7 +5,7 @@ + /* Load the basic TrueType tables, i.e., tables that can be either in */ + /* TTF or OTF fonts (body). */ + /* */ +-/* Copyright 1996-2010, 2012-2014 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/sfnt/ttload.h b/src/sfnt/ttload.h +index 49a1aee..a6d91c5 100644 +--- a/src/sfnt/ttload.h ++++ b/src/sfnt/ttload.h +@@ -5,7 +5,7 @@ + /* Load the basic TrueType tables, i.e., tables that can be either in */ + /* TTF or OTF fonts (specification). */ + /* */ +-/* Copyright 1996-2001, 2002, 2005, 2006 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/sfnt/ttmtx.c b/src/sfnt/ttmtx.c +index bb31957..58309aa 100644 +--- a/src/sfnt/ttmtx.c ++++ b/src/sfnt/ttmtx.c +@@ -4,7 +4,7 @@ + /* */ + /* Load the metrics tables common to TTF and OTF fonts (body). */ + /* */ +-/* Copyright 2006-2009, 2011-2014 by */ ++/* Copyright 2006-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/sfnt/ttmtx.h b/src/sfnt/ttmtx.h +index fb04039..096ee06 100644 +--- a/src/sfnt/ttmtx.h ++++ b/src/sfnt/ttmtx.h +@@ -4,7 +4,7 @@ + /* */ + /* Load the metrics tables common to TTF and OTF fonts (specification). */ + /* */ +-/* Copyright 2006, 2014 by */ ++/* Copyright 2006-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/sfnt/ttpost.c b/src/sfnt/ttpost.c +index 99d8005..b9fafe4 100644 +--- a/src/sfnt/ttpost.c ++++ b/src/sfnt/ttpost.c +@@ -5,7 +5,7 @@ + /* Postcript name table processing for TrueType and OpenType fonts */ + /* (body). */ + /* */ +-/* Copyright 1996-2003, 2006-2010, 2013, 2014 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/sfnt/ttpost.h b/src/sfnt/ttpost.h +index 6f06d75..e3eca02 100644 +--- a/src/sfnt/ttpost.h ++++ b/src/sfnt/ttpost.h +@@ -5,7 +5,7 @@ + /* Postcript name table processing for TrueType and OpenType fonts */ + /* (specification). */ + /* */ +-/* Copyright 1996-2001, 2002 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/sfnt/ttsbit.c b/src/sfnt/ttsbit.c +index c2db96c..53b0b13 100644 +--- a/src/sfnt/ttsbit.c ++++ b/src/sfnt/ttsbit.c +@@ -4,7 +4,7 @@ + /* */ + /* TrueType and OpenType embedded bitmap support (body). */ + /* */ +-/* Copyright 2005-2009, 2013, 2014 by */ ++/* Copyright 2005-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* Copyright 2013 by Google, Inc. */ +diff --git a/src/sfnt/ttsbit.h b/src/sfnt/ttsbit.h +index 695d0d8..d4e13ae 100644 +--- a/src/sfnt/ttsbit.h ++++ b/src/sfnt/ttsbit.h +@@ -4,7 +4,7 @@ + /* */ + /* TrueType and OpenType embedded bitmap support (specification). */ + /* */ +-/* Copyright 1996-2008, 2013 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/smooth/Jamfile b/src/smooth/Jamfile +index a8496aa..73b29d6 100644 +--- a/src/smooth/Jamfile ++++ b/src/smooth/Jamfile +@@ -1,6 +1,6 @@ + # FreeType 2 src/smooth Jamfile + # +-# Copyright 2001 by ++# Copyright 2001-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/src/smooth/ftgrays.c b/src/smooth/ftgrays.c +index 4240b01..1347141 100644 +--- a/src/smooth/ftgrays.c ++++ b/src/smooth/ftgrays.c +@@ -4,7 +4,7 @@ + /* */ + /* A new `perfect' anti-aliasing renderer (body). */ + /* */ +-/* Copyright 2000-2003, 2005-2014 by */ ++/* Copyright 2000-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/smooth/ftgrays.h b/src/smooth/ftgrays.h +index f20f55f..1b57603 100644 +--- a/src/smooth/ftgrays.h ++++ b/src/smooth/ftgrays.h +@@ -4,7 +4,7 @@ + /* */ + /* FreeType smooth renderer declaration */ + /* */ +-/* Copyright 1996-2001 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/smooth/ftsmerrs.h b/src/smooth/ftsmerrs.h +index 413d2f1..cc38aa1 100644 +--- a/src/smooth/ftsmerrs.h ++++ b/src/smooth/ftsmerrs.h +@@ -4,7 +4,7 @@ + /* */ + /* smooth renderer error codes (specification only). */ + /* */ +-/* Copyright 2001, 2012 by */ ++/* Copyright 2001-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/smooth/ftsmooth.c b/src/smooth/ftsmooth.c +index 4e2dee5..4430cc1 100644 +--- a/src/smooth/ftsmooth.c ++++ b/src/smooth/ftsmooth.c +@@ -4,7 +4,7 @@ + /* */ + /* Anti-aliasing renderer interface (body). */ + /* */ +-/* Copyright 2000-2006, 2009-2013 by */ ++/* Copyright 2000-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/smooth/ftsmooth.h b/src/smooth/ftsmooth.h +index 3708790..765018c 100644 +--- a/src/smooth/ftsmooth.h ++++ b/src/smooth/ftsmooth.h +@@ -4,7 +4,7 @@ + /* */ + /* Anti-aliasing renderer interface (specification). */ + /* */ +-/* Copyright 1996-2001 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/smooth/ftspic.c b/src/smooth/ftspic.c +index 67a2b83..8e6ed57 100644 +--- a/src/smooth/ftspic.c ++++ b/src/smooth/ftspic.c +@@ -4,7 +4,7 @@ + /* */ + /* The FreeType position independent code services for smooth module. */ + /* */ +-/* Copyright 2009, 2010, 2012, 2013 by */ ++/* Copyright 2009-2015 by */ + /* Oran Agra and Mickey Gabel. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/smooth/ftspic.h b/src/smooth/ftspic.h +index 334b51c..99b9f0e 100644 +--- a/src/smooth/ftspic.h ++++ b/src/smooth/ftspic.h +@@ -4,7 +4,7 @@ + /* */ + /* The FreeType position independent code services for smooth module. */ + /* */ +-/* Copyright 2009 by */ ++/* Copyright 2009-2015 by */ + /* Oran Agra and Mickey Gabel. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/smooth/module.mk b/src/smooth/module.mk +index 47f6c04..740936f 100644 +--- a/src/smooth/module.mk ++++ b/src/smooth/module.mk +@@ -3,7 +3,7 @@ + # + + +-# Copyright 1996-2000, 2006 by ++# Copyright 1996-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/src/smooth/rules.mk b/src/smooth/rules.mk +index c8ac81c..f00ebd5 100644 +--- a/src/smooth/rules.mk ++++ b/src/smooth/rules.mk +@@ -3,7 +3,7 @@ + # + + +-# Copyright 1996-2000, 2001, 2003, 2011 by ++# Copyright 1996-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/src/smooth/smooth.c b/src/smooth/smooth.c +index a8ac51f..4ca4344 100644 +--- a/src/smooth/smooth.c ++++ b/src/smooth/smooth.c +@@ -4,7 +4,7 @@ + /* */ + /* FreeType anti-aliasing rasterer module component (body only). */ + /* */ +-/* Copyright 1996-2001 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/tools/afblue.pl b/src/tools/afblue.pl +index 60fe696..56b6452 100644 +--- a/src/tools/afblue.pl ++++ b/src/tools/afblue.pl +@@ -5,7 +5,7 @@ + # + # Process a blue zone character data file. + # +-# Copyright 2013, 2014 by ++# Copyright 2013-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, +diff --git a/src/tools/docmaker/content.py b/src/tools/docmaker/content.py +index adea6f1..6887f0b 100644 +--- a/src/tools/docmaker/content.py ++++ b/src/tools/docmaker/content.py +@@ -3,7 +3,7 @@ + # + # Parse comment blocks to build content blocks (library file). + # +-# Copyright 2002, 2004, 2006-2009, 2012-2014 by ++# Copyright 2002-2015 by + # David Turner. + # + # This file is part of the FreeType project, and may only be used, +diff --git a/src/tools/docmaker/docmaker.py b/src/tools/docmaker/docmaker.py +index 4fb1abf..de82d93 100644 +--- a/src/tools/docmaker/docmaker.py ++++ b/src/tools/docmaker/docmaker.py +@@ -4,7 +4,7 @@ + # + # Convert source code markup to HTML documentation. + # +-# Copyright 2002, 2004, 2008, 2013, 2014 by ++# Copyright 2002-2015 by + # David Turner. + # + # This file is part of the FreeType project, and may only be used, +diff --git a/src/tools/docmaker/formatter.py b/src/tools/docmaker/formatter.py +index 7152c01..f0a8808 100644 +--- a/src/tools/docmaker/formatter.py ++++ b/src/tools/docmaker/formatter.py +@@ -3,7 +3,7 @@ + # + # Convert parsed content blocks to a structured document (library file). + # +-# Copyright 2002, 2004, 2007, 2008, 2014 by ++# Copyright 2002-2015 by + # David Turner. + # + # This file is part of the FreeType project, and may only be used, +diff --git a/src/tools/docmaker/sources.py b/src/tools/docmaker/sources.py +index 61ecc22..0cf21ce 100644 +--- a/src/tools/docmaker/sources.py ++++ b/src/tools/docmaker/sources.py +@@ -3,7 +3,7 @@ + # + # Convert source code comments to multi-line blocks (library file). + # +-# Copyright 2002-2004, 2006-2009, 2012-2014 by ++# Copyright 2002-2015 by + # David Turner. + # + # This file is part of the FreeType project, and may only be used, +diff --git a/src/tools/docmaker/tohtml.py b/src/tools/docmaker/tohtml.py +index 05fc08a..bc6bcf0 100644 +--- a/src/tools/docmaker/tohtml.py ++++ b/src/tools/docmaker/tohtml.py +@@ -3,7 +3,7 @@ + # + # A sub-class container of the `Formatter' class to produce HTML. + # +-# Copyright 2002, 2003, 2005-2008, 2013, 2014 by ++# Copyright 2002-2015 by + # David Turner. + # + # This file is part of the FreeType project, and may only be used, +diff --git a/src/tools/docmaker/utils.py b/src/tools/docmaker/utils.py +index b35823a..52af17a 100644 +--- a/src/tools/docmaker/utils.py ++++ b/src/tools/docmaker/utils.py +@@ -3,7 +3,7 @@ + # + # Auxiliary functions for the `docmaker' tool (library file). + # +-# Copyright 2002, 2004, 2007, 2008, 2014 by ++# Copyright 2002-2015 by + # David Turner. + # + # This file is part of the FreeType project, and may only be used, +diff --git a/src/tools/glnames.py b/src/tools/glnames.py +index 8810bf5..bca7fb1 100644 +--- a/src/tools/glnames.py ++++ b/src/tools/glnames.py +@@ -6,7 +6,7 @@ + # + + +-# Copyright 1996-2000, 2003, 2005, 2007, 2008, 2011 by ++# Copyright 1996-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/src/truetype/Jamfile b/src/truetype/Jamfile +index a8cccfe..55a60af 100644 +--- a/src/truetype/Jamfile ++++ b/src/truetype/Jamfile +@@ -1,6 +1,6 @@ + # FreeType 2 src/truetype Jamfile + # +-# Copyright 2001, 2004 by ++# Copyright 2001-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/src/truetype/module.mk b/src/truetype/module.mk +index baee81a..c6dc6fa 100644 +--- a/src/truetype/module.mk ++++ b/src/truetype/module.mk +@@ -3,7 +3,7 @@ + # + + +-# Copyright 1996-2000, 2006 by ++# Copyright 1996-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/src/truetype/rules.mk b/src/truetype/rules.mk +index e39235b..1db16ba 100644 +--- a/src/truetype/rules.mk ++++ b/src/truetype/rules.mk +@@ -3,7 +3,7 @@ + # + + +-# Copyright 1996-2001, 2003-2004, 2011-2012 by ++# Copyright 1996-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/src/truetype/truetype.c b/src/truetype/truetype.c +index 576912b..f929437 100644 +--- a/src/truetype/truetype.c ++++ b/src/truetype/truetype.c +@@ -4,7 +4,7 @@ + /* */ + /* FreeType TrueType driver component (body only). */ + /* */ +-/* Copyright 1996-2001, 2004, 2006, 2012 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/truetype/ttdriver.c b/src/truetype/ttdriver.c +index ecf4cdc..a151637 100644 +--- a/src/truetype/ttdriver.c ++++ b/src/truetype/ttdriver.c +@@ -4,7 +4,7 @@ + /* */ + /* TrueType font driver implementation (body). */ + /* */ +-/* Copyright 1996-2014 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/truetype/ttdriver.h b/src/truetype/ttdriver.h +index aae00f2..6cacd60 100644 +--- a/src/truetype/ttdriver.h ++++ b/src/truetype/ttdriver.h +@@ -4,7 +4,7 @@ + /* */ + /* High-level TrueType driver interface (specification). */ + /* */ +-/* Copyright 1996-2001, 2002 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/truetype/tterrors.h b/src/truetype/tterrors.h +index 78d138f..ba32cf7 100644 +--- a/src/truetype/tterrors.h ++++ b/src/truetype/tterrors.h +@@ -4,7 +4,7 @@ + /* */ + /* TrueType error codes (specification only). */ + /* */ +-/* Copyright 2001, 2012 by */ ++/* Copyright 2001-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/truetype/ttgload.c b/src/truetype/ttgload.c +index 537e979..9431a51 100644 +--- a/src/truetype/ttgload.c ++++ b/src/truetype/ttgload.c +@@ -4,7 +4,7 @@ + /* */ + /* TrueType Glyph Loader (body). */ + /* */ +-/* Copyright 1996-2014 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/truetype/ttgload.h b/src/truetype/ttgload.h +index 3f1699e..8e3255e 100644 +--- a/src/truetype/ttgload.h ++++ b/src/truetype/ttgload.h +@@ -4,7 +4,7 @@ + /* */ + /* TrueType Glyph Loader (specification). */ + /* */ +-/* Copyright 1996-2006, 2008, 2011 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/truetype/ttgxvar.c b/src/truetype/ttgxvar.c +index 1b35539..9168019 100644 +--- a/src/truetype/ttgxvar.c ++++ b/src/truetype/ttgxvar.c +@@ -4,7 +4,7 @@ + /* */ + /* TrueType GX Font Variation loader */ + /* */ +-/* Copyright 2004-2014 by */ ++/* Copyright 2004-2015 by */ + /* David Turner, Robert Wilhelm, Werner Lemberg, and George Williams. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/truetype/ttgxvar.h b/src/truetype/ttgxvar.h +index 82dfc44..9b69f7b 100644 +--- a/src/truetype/ttgxvar.h ++++ b/src/truetype/ttgxvar.h +@@ -4,7 +4,7 @@ + /* */ + /* TrueType GX Font Variation loader (specification) */ + /* */ +-/* Copyright 2004 by */ ++/* Copyright 2004-2015 by */ + /* David Turner, Robert Wilhelm, Werner Lemberg and George Williams. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/truetype/ttinterp.c b/src/truetype/ttinterp.c +index 8ac2974..3709b8c 100644 +--- a/src/truetype/ttinterp.c ++++ b/src/truetype/ttinterp.c +@@ -4,7 +4,7 @@ + /* */ + /* TrueType bytecode interpreter (body). */ + /* */ +-/* Copyright 1996-2014 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/truetype/ttinterp.h b/src/truetype/ttinterp.h +index 8f213be..832e4f6 100644 +--- a/src/truetype/ttinterp.h ++++ b/src/truetype/ttinterp.h +@@ -4,7 +4,7 @@ + /* */ + /* TrueType bytecode interpreter (specification). */ + /* */ +-/* Copyright 1996-2007, 2010, 2012-2014 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/truetype/ttobjs.c b/src/truetype/ttobjs.c +index 82d95e1..9e10e16 100644 +--- a/src/truetype/ttobjs.c ++++ b/src/truetype/ttobjs.c +@@ -4,7 +4,7 @@ + /* */ + /* Objects manager (body). */ + /* */ +-/* Copyright 1996-2013 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/truetype/ttobjs.h b/src/truetype/ttobjs.h +index 782255c..769cf7c 100644 +--- a/src/truetype/ttobjs.h ++++ b/src/truetype/ttobjs.h +@@ -4,7 +4,7 @@ + /* */ + /* Objects manager (specification). */ + /* */ +-/* Copyright 1996-2009, 2011-2014 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/truetype/ttpic.c b/src/truetype/ttpic.c +index edefae7..242a6b7 100644 +--- a/src/truetype/ttpic.c ++++ b/src/truetype/ttpic.c +@@ -4,7 +4,7 @@ + /* */ + /* The FreeType position independent code services for truetype module. */ + /* */ +-/* Copyright 2009, 2010, 2012, 2013 by */ ++/* Copyright 2009-2015 by */ + /* Oran Agra and Mickey Gabel. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/truetype/ttpic.h b/src/truetype/ttpic.h +index cfb4ee6..48ba4aa 100644 +--- a/src/truetype/ttpic.h ++++ b/src/truetype/ttpic.h +@@ -4,7 +4,7 @@ + /* */ + /* The FreeType position independent code services for truetype module. */ + /* */ +-/* Copyright 2009, 2012, 2013 by */ ++/* Copyright 2009-2015 by */ + /* Oran Agra and Mickey Gabel. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/truetype/ttpload.c b/src/truetype/ttpload.c +index 9991925..caf6cf1 100644 +--- a/src/truetype/ttpload.c ++++ b/src/truetype/ttpload.c +@@ -4,7 +4,7 @@ + /* */ + /* TrueType-specific tables loader (body). */ + /* */ +-/* Copyright 1996-2002, 2004-2013 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/truetype/ttpload.h b/src/truetype/ttpload.h +index f61ac07..bc92369 100644 +--- a/src/truetype/ttpload.h ++++ b/src/truetype/ttpload.h +@@ -4,7 +4,7 @@ + /* */ + /* TrueType-specific tables loader (specification). */ + /* */ +-/* Copyright 1996-2001, 2002, 2005, 2006 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/truetype/ttsubpix.c b/src/truetype/ttsubpix.c +index ca60451..a1d79e8 100644 +--- a/src/truetype/ttsubpix.c ++++ b/src/truetype/ttsubpix.c +@@ -4,7 +4,7 @@ + /* */ + /* TrueType Subpixel Hinting. */ + /* */ +-/* Copyright 2010-2013 by */ ++/* Copyright 2010-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/truetype/ttsubpix.h b/src/truetype/ttsubpix.h +index 8a54fc7..7bffd11 100644 +--- a/src/truetype/ttsubpix.h ++++ b/src/truetype/ttsubpix.h +@@ -4,7 +4,7 @@ + /* */ + /* TrueType Subpixel Hinting. */ + /* */ +-/* Copyright 2010-2013 by */ ++/* Copyright 2010-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/type1/Jamfile b/src/type1/Jamfile +index 8e366ba..5d7b62c 100644 +--- a/src/type1/Jamfile ++++ b/src/type1/Jamfile +@@ -1,6 +1,6 @@ + # FreeType 2 src/type1 Jamfile + # +-# Copyright 2001 by ++# Copyright 2001-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/src/type1/module.mk b/src/type1/module.mk +index ade0210..feb3459 100644 +--- a/src/type1/module.mk ++++ b/src/type1/module.mk +@@ -3,7 +3,7 @@ + # + + +-# Copyright 1996-2000, 2006 by ++# Copyright 1996-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/src/type1/rules.mk b/src/type1/rules.mk +index 160946a..fbd0543 100644 +--- a/src/type1/rules.mk ++++ b/src/type1/rules.mk +@@ -3,7 +3,7 @@ + # + + +-# Copyright 1996-2000, 2001, 2003 by ++# Copyright 1996-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/src/type1/t1afm.c b/src/type1/t1afm.c +index de9c199..35f67e8 100644 +--- a/src/type1/t1afm.c ++++ b/src/type1/t1afm.c +@@ -4,7 +4,7 @@ + /* */ + /* AFM support for Type 1 fonts (body). */ + /* */ +-/* Copyright 1996-2011, 2013 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/type1/t1afm.h b/src/type1/t1afm.h +index 8eb1764..0f42f3e 100644 +--- a/src/type1/t1afm.h ++++ b/src/type1/t1afm.h +@@ -4,7 +4,7 @@ + /* */ + /* AFM support for Type 1 fonts (specification). */ + /* */ +-/* Copyright 1996-2001, 2002, 2006 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/type1/t1driver.c b/src/type1/t1driver.c +index 2602bdb..4524ab2 100644 +--- a/src/type1/t1driver.c ++++ b/src/type1/t1driver.c +@@ -4,7 +4,7 @@ + /* */ + /* Type 1 driver interface (body). */ + /* */ +-/* Copyright 1996-2004, 2006, 2007, 2009, 2011, 2013, 2014 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/type1/t1driver.h b/src/type1/t1driver.h +index 639cd4a..34bcf81 100644 +--- a/src/type1/t1driver.h ++++ b/src/type1/t1driver.h +@@ -4,7 +4,7 @@ + /* */ + /* High-level Type 1 driver interface (specification). */ + /* */ +-/* Copyright 1996-2001, 2002 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/type1/t1errors.h b/src/type1/t1errors.h +index 8740530..fc7a9bd 100644 +--- a/src/type1/t1errors.h ++++ b/src/type1/t1errors.h +@@ -4,7 +4,7 @@ + /* */ + /* Type 1 error codes (specification only). */ + /* */ +-/* Copyright 2001, 2012 by */ ++/* Copyright 2001-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/type1/t1gload.c b/src/type1/t1gload.c +index af102fd..546f3e1 100644 +--- a/src/type1/t1gload.c ++++ b/src/type1/t1gload.c +@@ -4,7 +4,7 @@ + /* */ + /* Type 1 Glyph Loader (body). */ + /* */ +-/* Copyright 1996-2006, 2008-2010, 2013, 2014 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/type1/t1gload.h b/src/type1/t1gload.h +index 0bdea3a..05f60d5 100644 +--- a/src/type1/t1gload.h ++++ b/src/type1/t1gload.h +@@ -4,7 +4,7 @@ + /* */ + /* Type 1 Glyph Loader (specification). */ + /* */ +-/* Copyright 1996-2001, 2002, 2003, 2008, 2011 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/type1/t1load.c b/src/type1/t1load.c +index 22b3f6b..b3721d4 100644 +--- a/src/type1/t1load.c ++++ b/src/type1/t1load.c +@@ -4,7 +4,7 @@ + /* */ + /* Type 1 font loader (body). */ + /* */ +-/* Copyright 1996-2014 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/type1/t1load.h b/src/type1/t1load.h +index 546fc33..de422e7 100644 +--- a/src/type1/t1load.h ++++ b/src/type1/t1load.h +@@ -4,7 +4,7 @@ + /* */ + /* Type 1 font loader (specification). */ + /* */ +-/* Copyright 1996-2001, 2002, 2004, 2006, 2007 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/type1/t1objs.c b/src/type1/t1objs.c +index e11770f..74fb4fa 100644 +--- a/src/type1/t1objs.c ++++ b/src/type1/t1objs.c +@@ -4,7 +4,7 @@ + /* */ + /* Type 1 objects manager (body). */ + /* */ +-/* Copyright 1996-2009, 2011, 2013 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/type1/t1objs.h b/src/type1/t1objs.h +index 54ccbb9..6b4f3cb 100644 +--- a/src/type1/t1objs.h ++++ b/src/type1/t1objs.h +@@ -4,7 +4,7 @@ + /* */ + /* Type 1 objects manager (specification). */ + /* */ +-/* Copyright 1996-2001, 2002, 2006, 2011 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/type1/t1parse.c b/src/type1/t1parse.c +index ccf9f4c..40ffd07 100644 +--- a/src/type1/t1parse.c ++++ b/src/type1/t1parse.c +@@ -4,7 +4,7 @@ + /* */ + /* Type 1 parser (body). */ + /* */ +-/* Copyright 1996-2005, 2008, 2009, 2012-2014 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/type1/t1parse.h b/src/type1/t1parse.h +index fb1c8a8..ef8eef0 100644 +--- a/src/type1/t1parse.h ++++ b/src/type1/t1parse.h +@@ -4,7 +4,7 @@ + /* */ + /* Type 1 parser (specification). */ + /* */ +-/* Copyright 1996-2001, 2002, 2003, 2008 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/type1/t1tokens.h b/src/type1/t1tokens.h +index e37276b..3992652 100644 +--- a/src/type1/t1tokens.h ++++ b/src/type1/t1tokens.h +@@ -4,7 +4,7 @@ + /* */ + /* Type 1 tokenizer (specification). */ + /* */ +-/* Copyright 1996-2001, 2002, 2003, 2004, 2006, 2008, 2009 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/type1/type1.c b/src/type1/type1.c +index ccc12be..4c70ea7 100644 +--- a/src/type1/type1.c ++++ b/src/type1/type1.c +@@ -4,7 +4,7 @@ + /* */ + /* FreeType Type 1 driver component (body only). */ + /* */ +-/* Copyright 1996-2001 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/type42/Jamfile b/src/type42/Jamfile +index 00371d5..e0db3cc 100644 +--- a/src/type42/Jamfile ++++ b/src/type42/Jamfile +@@ -1,6 +1,6 @@ + # FreeType 2 src/type42 Jamfile + # +-# Copyright 2002 by ++# Copyright 2002-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/src/type42/module.mk b/src/type42/module.mk +index b3f10a8..af7e651 100644 +--- a/src/type42/module.mk ++++ b/src/type42/module.mk +@@ -3,7 +3,7 @@ + # + + +-# Copyright 2002, 2006 by ++# Copyright 2002-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/src/type42/rules.mk b/src/type42/rules.mk +index 34a31e8..4a8efca 100644 +--- a/src/type42/rules.mk ++++ b/src/type42/rules.mk +@@ -3,7 +3,7 @@ + # + + +-# Copyright 2002, 2003, 2008 by ++# Copyright 2002-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/src/type42/t42drivr.c b/src/type42/t42drivr.c +index 3ad1bde..768d7f3 100644 +--- a/src/type42/t42drivr.c ++++ b/src/type42/t42drivr.c +@@ -4,7 +4,7 @@ + /* */ + /* High-level Type 42 driver interface (body). */ + /* */ +-/* Copyright 2002-2004, 2006, 2007, 2009, 2011, 2013 by */ ++/* Copyright 2002-2015 by */ + /* Roberto Alameda. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/type42/t42drivr.h b/src/type42/t42drivr.h +index 78ae2ab..b4d1753 100644 +--- a/src/type42/t42drivr.h ++++ b/src/type42/t42drivr.h +@@ -4,7 +4,7 @@ + /* */ + /* High-level Type 42 driver interface (specification). */ + /* */ +-/* Copyright 2002 by */ ++/* Copyright 2002-2015 by */ + /* Roberto Alameda. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/type42/t42error.h b/src/type42/t42error.h +index 217ae8b..cddaf9e 100644 +--- a/src/type42/t42error.h ++++ b/src/type42/t42error.h +@@ -4,7 +4,7 @@ + /* */ + /* Type 42 error codes (specification only). */ + /* */ +-/* Copyright 2002, 2003, 2012 by */ ++/* Copyright 2002-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/type42/t42objs.c b/src/type42/t42objs.c +index e86ca78..d0a05d6 100644 +--- a/src/type42/t42objs.c ++++ b/src/type42/t42objs.c +@@ -4,7 +4,7 @@ + /* */ + /* Type 42 objects manager (body). */ + /* */ +-/* Copyright 2002-2009, 2011, 2013 by */ ++/* Copyright 2002-2015 by */ + /* Roberto Alameda. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/type42/t42objs.h b/src/type42/t42objs.h +index 4c31ee8..3722c67 100644 +--- a/src/type42/t42objs.h ++++ b/src/type42/t42objs.h +@@ -4,7 +4,7 @@ + /* */ + /* Type 42 objects manager (specification). */ + /* */ +-/* Copyright 2002, 2003, 2006, 2007, 2011 by */ ++/* Copyright 2002-2015 by */ + /* Roberto Alameda. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/type42/t42parse.c b/src/type42/t42parse.c +index 5070853..7d9ccb6 100644 +--- a/src/type42/t42parse.c ++++ b/src/type42/t42parse.c +@@ -4,7 +4,7 @@ + /* */ + /* Type 42 font parser (body). */ + /* */ +-/* Copyright 2002-2014 by */ ++/* Copyright 2002-2015 by */ + /* Roberto Alameda. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/type42/t42parse.h b/src/type42/t42parse.h +index fa10edd..2fd6414 100644 +--- a/src/type42/t42parse.h ++++ b/src/type42/t42parse.h +@@ -4,7 +4,7 @@ + /* */ + /* Type 42 font parser (specification). */ + /* */ +-/* Copyright 2002, 2003 by */ ++/* Copyright 2002-2015 by */ + /* Roberto Alameda. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/type42/t42types.h b/src/type42/t42types.h +index 7c3b758..c829224 100644 +--- a/src/type42/t42types.h ++++ b/src/type42/t42types.h +@@ -4,7 +4,7 @@ + /* */ + /* Type 42 font data types (specification only). */ + /* */ +-/* Copyright 2002, 2003, 2006, 2008 by */ ++/* Copyright 2002-2015 by */ + /* Roberto Alameda. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/type42/type42.c b/src/type42/type42.c +index d13df56..3332b7b 100644 +--- a/src/type42/type42.c ++++ b/src/type42/type42.c +@@ -4,7 +4,7 @@ + /* */ + /* FreeType Type 42 driver component. */ + /* */ +-/* Copyright 2002 by */ ++/* Copyright 2002-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/winfonts/Jamfile b/src/winfonts/Jamfile +index 71cf567..86ee668 100644 +--- a/src/winfonts/Jamfile ++++ b/src/winfonts/Jamfile +@@ -1,6 +1,6 @@ + # FreeType 2 src/winfonts Jamfile + # +-# Copyright 2001 by ++# Copyright 2001-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/src/winfonts/fnterrs.h b/src/winfonts/fnterrs.h +index 463ba77..0bf4d09 100644 +--- a/src/winfonts/fnterrs.h ++++ b/src/winfonts/fnterrs.h +@@ -4,7 +4,7 @@ + /* */ + /* Win FNT/FON error codes (specification only). */ + /* */ +-/* Copyright 2001, 2012 by */ ++/* Copyright 2001-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* */ + /* This file is part of the FreeType project, and may only be used, */ +diff --git a/src/winfonts/module.mk b/src/winfonts/module.mk +index b44d7f0..8ba6d75 100644 +--- a/src/winfonts/module.mk ++++ b/src/winfonts/module.mk +@@ -3,7 +3,7 @@ + # + + +-# Copyright 1996-2000, 2006 by ++# Copyright 1996-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/src/winfonts/rules.mk b/src/winfonts/rules.mk +index 1a78171..4535f54 100644 +--- a/src/winfonts/rules.mk ++++ b/src/winfonts/rules.mk +@@ -3,7 +3,7 @@ + # + + +-# Copyright 1996-2000, 2001, 2003 by ++# Copyright 1996-2015 by + # David Turner, Robert Wilhelm, and Werner Lemberg. + # + # This file is part of the FreeType project, and may only be used, modified, +diff --git a/src/winfonts/winfnt.c b/src/winfonts/winfnt.c +index 4705c53..c71b853 100644 +--- a/src/winfonts/winfnt.c ++++ b/src/winfonts/winfnt.c +@@ -4,7 +4,7 @@ + /* */ + /* FreeType font driver for Windows FNT/FON files */ + /* */ +-/* Copyright 1996-2004, 2006-2014 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* Copyright 2003 Huw D M Davies for Codeweavers */ + /* Copyright 2007 Dmitry Timoshkov for Codeweavers */ +diff --git a/src/winfonts/winfnt.h b/src/winfonts/winfnt.h +index b7a8073..a39d26f 100644 +--- a/src/winfonts/winfnt.h ++++ b/src/winfonts/winfnt.h +@@ -4,7 +4,7 @@ + /* */ + /* FreeType font driver for Windows FNT/FON files */ + /* */ +-/* Copyright 1996-2001, 2002, 2003, 2004, 2007 by */ ++/* Copyright 1996-2015 by */ + /* David Turner, Robert Wilhelm, and Werner Lemberg. */ + /* Copyright 2007 Dmitry Timoshkov for Codeweavers */ + /* */ +diff --git a/vms_make.com b/vms_make.com +index 8d8fdf7..5b7da39 100644 +--- a/vms_make.com ++++ b/vms_make.com +@@ -1,6 +1,6 @@ + $! make Freetype2 under OpenVMS + $! +-$! Copyright 2003, 2004, 2006, 2007, 2013 by ++$! Copyright 2003-2015 by + $! David Turner, Robert Wilhelm, and Werner Lemberg. + $! + $! This file is part of the FreeType project, and may only be used, modified, +-- +2.2.2 + +From 942aa5fff46abad9216d2943f1ffaf9e83e32c29 Mon Sep 17 00:00:00 2001 +From: Chris Liddell <chris.liddell@artifex.com> +Date: Sun, 18 Jan 2015 07:29:48 +0100 +Subject: [PATCH] [raster] Fix Savannah bug #44022. + +Add fallback for glyphs with degenerate bounding boxes. + +If a glyph has only one very narrow feature, the bbox can end up +with either the width or height of the bbox being 0, in which case +no raster memory is allocated and no attempt is made to render the +glyph. This is less than ideal when the drop-out compensation in +the rendering code would actually result in the glyph being +rendered. + +This problem can be observed with the `I' glyph (gid 47) in the +Autodesk RomanS TrueType font. + +* src/raster/ftrend1.c (ft_raster1_render): Add a fallback if either +dimension is zero to explicitly round up/down (instead of simply +round). +--- + ChangeLog | 20 ++++++++++++++++++++ + src/raster/ftrend1.c | 32 ++++++++++++++++++++++++++------ + 2 files changed, 46 insertions(+), 6 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index 84eee06..268e4b5 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,3 +1,23 @@ ++2015-01-18 Chris Liddell <chris.liddell@artifex.com> ++ ++ [raster] Fix Savannah bug #44022. ++ ++ Add fallback for glyphs with degenerate bounding boxes. ++ ++ If a glyph has only one very narrow feature, the bbox can end up ++ with either the width or height of the bbox being 0, in which case ++ no raster memory is allocated and no attempt is made to render the ++ glyph. This is less than ideal when the drop-out compensation in ++ the rendering code would actually result in the glyph being ++ rendered. ++ ++ This problem can be observed with the `I' glyph (gid 47) in the ++ Autodesk RomanS TrueType font. ++ ++ * src/raster/ftrend1.c (ft_raster1_render): Add a fallback if either ++ dimension is zero to explicitly round up/down (instead of simply ++ round). ++ + 2015-01-17 Werner Lemberg <wl@gnu.org> + + Add some tools to handle yearly copyright notice updates. +diff --git a/src/raster/ftrend1.c b/src/raster/ftrend1.c +index 437996b..dc03b34 100644 +--- a/src/raster/ftrend1.c ++++ b/src/raster/ftrend1.c +@@ -104,7 +104,7 @@ + { + FT_Error error; + FT_Outline* outline; +- FT_BBox cbox; ++ FT_BBox cbox, cbox0; + FT_UInt width, height, pitch; + FT_Bitmap* bitmap; + FT_Memory memory; +@@ -133,14 +133,14 @@ + FT_Outline_Translate( outline, origin->x, origin->y ); + + /* compute the control box, and grid fit it */ +- FT_Outline_Get_CBox( outline, &cbox ); ++ FT_Outline_Get_CBox( outline, &cbox0 ); + + /* undocumented but confirmed: bbox values get rounded */ + #if 1 +- cbox.xMin = FT_PIX_ROUND( cbox.xMin ); +- cbox.yMin = FT_PIX_ROUND( cbox.yMin ); +- cbox.xMax = FT_PIX_ROUND( cbox.xMax ); +- cbox.yMax = FT_PIX_ROUND( cbox.yMax ); ++ cbox.xMin = FT_PIX_ROUND( cbox0.xMin ); ++ cbox.yMin = FT_PIX_ROUND( cbox0.yMin ); ++ cbox.xMax = FT_PIX_ROUND( cbox0.xMax ); ++ cbox.yMax = FT_PIX_ROUND( cbox0.yMax ); + #else + cbox.xMin = FT_PIX_FLOOR( cbox.xMin ); + cbox.yMin = FT_PIX_FLOOR( cbox.yMin ); +@@ -148,8 +148,28 @@ + cbox.yMax = FT_PIX_CEIL( cbox.yMax ); + #endif + ++ /* If either `width' or `height' round to 0, try */ ++ /* explicitly rounding up/down. In the case of */ ++ /* glyphs containing only one very narrow feature, */ ++ /* this gives the drop-out compensation in the scan */ ++ /* conversion code a chance to do its stuff. */ + width = (FT_UInt)( ( cbox.xMax - cbox.xMin ) >> 6 ); ++ if ( width == 0 ) ++ { ++ cbox.xMin = FT_PIX_FLOOR( cbox0.xMin ); ++ cbox.xMax = FT_PIX_CEIL( cbox0.xMax ); ++ ++ width = (FT_UInt)( ( cbox.xMax - cbox.xMin ) >> 6 ); ++ } ++ + height = (FT_UInt)( ( cbox.yMax - cbox.yMin ) >> 6 ); ++ if ( height == 0 ) ++ { ++ cbox.yMin = FT_PIX_FLOOR( cbox0.yMin ); ++ cbox.yMax = FT_PIX_CEIL( cbox0.yMax ); ++ ++ height = (FT_UInt)( ( cbox.yMax - cbox.yMin ) >> 6 ); ++ } + + if ( width > FT_USHORT_MAX || height > FT_USHORT_MAX ) + { +-- +2.2.2 + +From 79a5ac603a29ba316d4d5d824a014589eb8879e4 Mon Sep 17 00:00:00 2001 +From: Werner Lemberg <wl@gnu.org> +Date: Sun, 18 Jan 2015 07:30:04 +0100 +Subject: [PATCH] * src/base/ftobjs.c (FT_New_Library): Fix compiler warning. + +--- + ChangeLog | 4 ++++ + src/base/ftobjs.c | 2 +- + 2 files changed, 5 insertions(+), 1 deletion(-) + +diff --git a/ChangeLog b/ChangeLog +index 268e4b5..334a439 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,3 +1,7 @@ ++2015-01-18 Werner Lemberg <wl@gnu.org> ++ ++ * src/base/ftobjs.c (FT_New_Library): Fix compiler warning. ++ + 2015-01-18 Chris Liddell <chris.liddell@artifex.com> + + [raster] Fix Savannah bug #44022. +diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c +index e7e0c4f..8e14243 100644 +--- a/src/base/ftobjs.c ++++ b/src/base/ftobjs.c +@@ -4661,8 +4661,8 @@ + + return FT_Err_Ok; + +- Fail: + #ifdef FT_CONFIG_OPTION_PIC ++ Fail: + ft_pic_container_destroy( library ); + #endif + FT_FREE( library ); +-- +2.2.2 + +From 1a42f3253d73b7a738335cca2c359d14b80a245f Mon Sep 17 00:00:00 2001 +From: Werner Lemberg <wl@gnu.org> +Date: Thu, 22 Jan 2015 07:56:24 +0100 +Subject: [PATCH] Clarify meaning of FT_ENCODING_MS_SYMBOL. + +--- + include/freetype.h | 9 ++++++--- + 1 file changed, 6 insertions(+), 3 deletions(-) + +diff --git a/include/freetype.h b/include/freetype.h +index 15455c6..9f2c453 100644 +--- a/include/freetype.h ++++ b/include/freetype.h +@@ -642,9 +642,12 @@ FT_BEGIN_HEADER + /* */ + /* FT_ENCODING_MS_SYMBOL :: */ + /* Corresponds to the Microsoft Symbol encoding, used to encode */ +- /* mathematical symbols in the 32..255 character code range. For */ +- /* more information, see */ +- /* `http://www.kostis.net/charsets/symbol.htm'. */ ++ /* mathematical symbols and wingdings. For more information, see */ ++ /* `http://www.kostis.net/charsets/symbol.htm' and */ ++ /* `http://www.kostis.net/charsets/wingding.htm'. */ ++ /* */ ++ /* This encoding uses character codes from the PUA (Private Unicode */ ++ /* Area) in the range U+F020-U+F0FF. */ + /* */ + /* FT_ENCODING_SJIS :: */ + /* Corresponds to Japanese SJIS encoding. More info at */ +-- +2.2.2 + +From 0bd564a94d5109397e578a0d62e8ca48b346e05f Mon Sep 17 00:00:00 2001 +From: Werner Lemberg <wl@gnu.org> +Date: Thu, 22 Jan 2015 08:26:48 +0100 +Subject: [PATCH] Add another link to cmap information. + +--- + include/freetype.h | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/include/freetype.h b/include/freetype.h +index 9f2c453..7c46a77 100644 +--- a/include/freetype.h ++++ b/include/freetype.h +@@ -643,7 +643,8 @@ FT_BEGIN_HEADER + /* FT_ENCODING_MS_SYMBOL :: */ + /* Corresponds to the Microsoft Symbol encoding, used to encode */ + /* mathematical symbols and wingdings. For more information, see */ +- /* `http://www.kostis.net/charsets/symbol.htm' and */ ++ /* `http://www.microsoft.com/typography/otspec/recom.htm', */ ++ /* `http://www.kostis.net/charsets/symbol.htm', and */ + /* `http://www.kostis.net/charsets/wingding.htm'. */ + /* */ + /* This encoding uses character codes from the PUA (Private Unicode */ +-- +2.2.2 + +From 264b5e46c0d166c11360eb6c29edf2c178bb87c7 Mon Sep 17 00:00:00 2001 +From: Behdad Esfahbod <behdad@behdad.org> +Date: Fri, 23 Jan 2015 21:23:55 +0100 +Subject: [PATCH] [raster] Handle `FT_RASTER_FLAG_AA' correctly. + +This fixes a breakage caused by the commit `[raster] Remove +5-level gray AA mode from monochrome rasterizer.'. + +Problem reported by Markus Trippelsdorf <markus@trippelsdorf.de> and +octoploid <octoploid@yandex.com>. + +* src/raster/ftraster.c (ft_black_render): Handle +`FT_RASTER_FLAG_AA'. + +* src/raster/ftrend1.c (ft_raster1_render): Remove gray AA mode +remnants. +--- + ChangeLog | 16 ++++++++++++++++ + src/raster/ftraster.c | 3 +++ + src/raster/ftrend1.c | 18 ++---------------- + 3 files changed, 21 insertions(+), 16 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index 334a439..be6cc7a 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,3 +1,19 @@ ++2015-01-23 Behdad Esfahbod <behdad@behdad.org> ++ ++ [raster] Handle `FT_RASTER_FLAG_AA' correctly. ++ ++ This fixes a breakage caused by the commit `[raster] Remove ++ 5-level gray AA mode from monochrome rasterizer.'. ++ ++ Problem reported by Markus Trippelsdorf <markus@trippelsdorf.de> and ++ octoploid <octoploid@yandex.com>. ++ ++ * src/raster/ftraster.c (ft_black_render): Handle ++ `FT_RASTER_FLAG_AA'. ++ ++ * src/raster/ftrend1.c (ft_raster1_render): Remove gray AA mode ++ remnants. ++ + 2015-01-18 Werner Lemberg <wl@gnu.org> + + * src/base/ftobjs.c (FT_New_Library): Fix compiler warning. +diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c +index 65ba454..fd0481b 100644 +--- a/src/raster/ftraster.c ++++ b/src/raster/ftraster.c +@@ -3108,6 +3108,9 @@ + if ( params->flags & FT_RASTER_FLAG_DIRECT ) + return FT_THROW( Unsupported ); + ++ if ( params->flags & FT_RASTER_FLAG_AA ) ++ return FT_THROW( Unsupported ); ++ + if ( !target_map ) + return FT_THROW( Invalid ); + +diff --git a/src/raster/ftrend1.c b/src/raster/ftrend1.c +index dc03b34..718d632 100644 +--- a/src/raster/ftrend1.c ++++ b/src/raster/ftrend1.c +@@ -187,19 +187,8 @@ + slot->internal->flags &= ~FT_GLYPH_OWN_BITMAP; + } + +- /* allocate new one, depends on pixel format */ +- if ( !( mode & FT_RENDER_MODE_MONO ) ) +- { +- /* we pad to 32 bits, only for backwards compatibility with FT 1.x */ +- pitch = FT_PAD_CEIL( width, 4 ); +- bitmap->pixel_mode = FT_PIXEL_MODE_GRAY; +- bitmap->num_grays = 256; +- } +- else +- { +- pitch = ( ( width + 15 ) >> 4 ) << 1; +- bitmap->pixel_mode = FT_PIXEL_MODE_MONO; +- } ++ pitch = ( ( width + 15 ) >> 4 ) << 1; ++ bitmap->pixel_mode = FT_PIXEL_MODE_MONO; + + bitmap->width = width; + bitmap->rows = height; +@@ -218,9 +207,6 @@ + params.source = outline; + params.flags = 0; + +- if ( bitmap->pixel_mode == FT_PIXEL_MODE_GRAY ) +- params.flags |= FT_RASTER_FLAG_AA; +- + /* render outline into the bitmap */ + error = render->raster_render( render->raster, ¶ms ); + +-- +2.2.2 + +From d2c531ede8340dd52b09afcbc8706d1ce1ddb2bd Mon Sep 17 00:00:00 2001 +From: Werner Lemberg <wl@gnu.org> +Date: Fri, 23 Jan 2015 22:37:42 +0100 +Subject: [PATCH] Minor. + +--- + ChangeLog | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index be6cc7a..8229981 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -5,8 +5,7 @@ + This fixes a breakage caused by the commit `[raster] Remove + 5-level gray AA mode from monochrome rasterizer.'. + +- Problem reported by Markus Trippelsdorf <markus@trippelsdorf.de> and +- octoploid <octoploid@yandex.com>. ++ Problem reported by Markus Trippelsdorf <markus@trippelsdorf.de>. + + * src/raster/ftraster.c (ft_black_render): Handle + `FT_RASTER_FLAG_AA'. +-- +2.2.2 + diff --git a/testing/freetype-infinality/infinality-2.5.3-2014.10.08.patch b/testing/freetype-infinality/04-infinality-2.5.5-2015.01.23.patch index 9e117d9fae..e92139e4d1 100644 --- a/testing/freetype-infinality/infinality-2.5.3-2014.10.08.patch +++ b/testing/freetype-infinality/04-infinality-2.5.5-2015.01.23.patch @@ -11,7 +11,7 @@ # respect GNUMAKE environment variable for backwards compatibility --- a/devel/ftoption.h 2013-12-21 21:39:04.000000000 +0100 +++ b/devel/ftoption.h 2014-03-07 19:21:57.066654119 +0100 -@@ -609,6 +609,17 @@ FT_BEGIN_HEADER +@@ -605,6 +605,17 @@ FT_BEGIN_HEADER /*************************************************************************/ /* */ @@ -41,7 +41,7 @@ /*************************************************************************/ -@@ -604,11 +604,22 @@ FT_BEGIN_HEADER +@@ -600,11 +600,22 @@ FT_BEGIN_HEADER /* This option requires TT_CONFIG_OPTION_BYTECODE_INTERPRETER to be */ /* defined. */ /* */ @@ -66,8 +66,8 @@ /* of the TrueType bytecode interpreter is used that doesn't implement */ /* any of the patented opcodes and algorithms. The patents related to */ ---- a/src/autofit/aflatin.c 2014-09-14 11:35:20.946193837 -0500 -+++ b/src/autofit/aflatin.c 2014-09-14 11:58:37.726708173 -0500 +--- a/src/autofit/aflatin.c 2014-11-19 16:53:15.576938625 +0100 ++++ b/src/autofit/aflatin.c 2014-11-19 16:53:42.147096030 +0100 @@ -24,6 +24,7 @@ #include "afpic.h" #include "aflatin.h" @@ -171,7 +171,7 @@ #endif -@@ -1916,7 +1962,10 @@ +@@ -1913,7 +1959,10 @@ dist = edge->fpos - blue->shoot.org; if ( dist < 0 ) dist = -dist; @@ -183,7 +183,7 @@ dist = FT_MulFix( dist, scale ); if ( dist < best_dist ) { -@@ -2082,8 +2131,31 @@ +@@ -2079,8 +2128,31 @@ FT_Pos dist = width; FT_Int sign = 0; FT_Int vertical = ( dim == AF_DIMENSION_VERT ); @@ -215,7 +215,7 @@ if ( !AF_LATIN_HINTS_DO_STEM_ADJUST( hints ) || axis->extra_light ) return width; -@@ -2093,9 +2165,73 @@ +@@ -2090,9 +2162,73 @@ dist = -width; sign = 1; } @@ -290,7 +290,7 @@ { /* smooth hinting process: very lightly quantize the stem width */ -@@ -2155,6 +2291,9 @@ +@@ -2152,6 +2288,9 @@ } } else @@ -300,7 +300,7 @@ { /* strong hinting process: snap the stem width to integer pixels */ -@@ -2162,7 +2301,10 @@ +@@ -2159,7 +2298,10 @@ dist = af_latin_snap_width( axis->widths, axis->width_count, dist ); @@ -312,7 +312,7 @@ if ( vertical ) { /* in the case of vertical hinting, always round */ -@@ -2225,6 +2367,32 @@ +@@ -2222,6 +2364,32 @@ } Done_Width: @@ -345,7 +345,7 @@ if ( sign ) dist = -dist; -@@ -2247,6 +2415,8 @@ +@@ -2244,6 +2412,8 @@ (AF_Edge_Flags)base_edge->flags, (AF_Edge_Flags)stem_edge->flags ); @@ -354,7 +354,7 @@ stem_edge->pos = base_edge->pos + fitted_width; -@@ -2810,8 +2980,32 @@ +@@ -2807,8 +2977,32 @@ int dim; AF_LatinAxis axis; @@ -388,7 +388,7 @@ error = af_glyph_hints_reload( hints, outline ); if ( error ) goto Exit; -@@ -2877,7 +3071,11 @@ +@@ -2874,7 +3068,11 @@ } af_glyph_hints_save( hints, outline ); @@ -401,8 +401,8 @@ Exit: return error; } ---- a/src/base/ftlcdfil.c 2014-07-07 23:10:20.720076929 +0200 -+++ b/src/base/ftlcdfil.c 2014-07-07 23:35:53.756803457 +0200 +--- a/src/base/ftlcdfil.c 2014-11-25 22:31:38.852289541 +0100 ++++ b/src/base/ftlcdfil.c 2014-11-25 22:32:42.963771758 +0100 @@ -23,6 +23,9 @@ #include FT_IMAGE_H #include FT_INTERNAL_OBJECTS_H @@ -413,7 +413,7 @@ #ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING -@@ -290,10 +293,53 @@ +@@ -309,10 +312,53 @@ { 0x00, 0x55, 0x56, 0x55, 0x00 }; /* the values here sum up to a value larger than 256, */ /* providing a cheap gamma correction */ @@ -466,10 +466,10 @@ + } +#endif if ( !library ) - return FT_THROW( Invalid_Argument ); + return FT_THROW( Invalid_Library_Handle ); ---- a/src/base/ftobjs.c 2014-09-14 12:35:03.207593493 -0500 -+++ b/src/base/ftobjs.c 2014-09-14 15:15:51.604552925 -0500 +--- a/src/base/ftobjs.c 2014-12-01 22:41:50.032792254 +0100 ++++ b/src/base/ftobjs.c 2014-12-01 22:42:27.714056361 +0100 @@ -67,6 +67,11 @@ #define GRID_FIT_METRICS @@ -482,7 +482,7 @@ FT_BASE_DEF( FT_Pointer ) ft_service_list_lookup( FT_ServiceDesc service_descriptors, -@@ -538,6 +543,25 @@ +@@ -543,6 +548,25 @@ ft_lookup_glyph_renderer( FT_GlyphSlot slot ); @@ -508,7 +508,7 @@ #ifdef GRID_FIT_METRICS static void ft_glyphslot_grid_fit_metrics( FT_GlyphSlot slot, -@@ -596,8 +620,40 @@ +@@ -601,8 +625,40 @@ FT_Bool autohint = FALSE; FT_Module hinter; TT_Face ttface = (TT_Face)face; @@ -549,7 +549,7 @@ if ( !face || !face->size || !face->glyph ) return FT_THROW( Invalid_Face_Handle ); -@@ -685,6 +741,18 @@ +@@ -690,6 +746,18 @@ { FT_AutoHinter_Interface hinting; @@ -568,7 +568,7 @@ /* try to load embedded bitmaps first if available */ /* */ -@@ -730,6 +798,18 @@ +@@ -735,6 +803,18 @@ if ( error ) goto Exit; @@ -587,9 +587,9 @@ if ( slot->format == FT_GLYPH_FORMAT_OUTLINE ) { /* check that the loaded outline is correct */ ---- a/src/base/ftoutln.c 2014-02-08 13:29:55.000000000 +0100 -+++ b/src/base/ftoutln.c 2014-03-07 19:21:57.073320788 +0100 -@@ -908,7 +908,34 @@ +--- a/src/base/ftoutln.c 2014-12-01 22:40:34.438380192 +0100 ++++ b/src/base/ftoutln.c 2014-12-01 22:43:55.562934868 +0100 +@@ -910,7 +910,34 @@ FT_Vector v_prev, v_first, v_next, v_cur; FT_Int c, n, first; FT_Int orientation; @@ -623,12 +623,11 @@ +#endif if ( !outline ) - return FT_THROW( Invalid_Argument ); - ---- a/src/base/ftsynth.c 2013-09-20 07:20:13.000000000 +0200 -+++ b/src/base/ftsynth.c 2014-03-07 19:21:57.073320788 +0100 -@@ -88,7 +88,32 @@ - FT_Face face = slot->face; + return FT_THROW( Invalid_Outline ); +--- a/src/base/ftsynth.c 2014-12-01 22:54:33.836922242 +0100 ++++ b/src/base/ftsynth.c 2014-12-01 22:54:37.193688546 +0100 +@@ -93,7 +93,32 @@ + FT_Face face; FT_Error error; FT_Pos xstr, ystr; +#ifdef FT_CONFIG_OPTION_INFINALITY_PATCHSET @@ -658,12 +657,13 @@ + } +#endif - if ( slot->format != FT_GLYPH_FORMAT_OUTLINE && - slot->format != FT_GLYPH_FORMAT_BITMAP ) -@@ -101,6 +126,13 @@ + if ( !slot ) + return; +@@ -111,8 +136,16 @@ + ystr = xstr; if ( slot->format == FT_GLYPH_FORMAT_OUTLINE ) - { ++ { +#ifdef FT_CONFIG_OPTION_INFINALITY_PATCHSET + if ( use_various_tweaks ) + (void)FT_Outline_EmboldenXY( &slot->outline, @@ -671,10 +671,13 @@ + FT_PIX_FLOOR( ystr ) ); + else +#endif - /* ignore error */ - (void)FT_Outline_EmboldenXY( &slot->outline, xstr, ystr ); - } -@@ -141,6 +173,9 @@ + FT_Outline_EmboldenXY( &slot->outline, xstr, ystr ); +- ++ } + else /* slot->format == FT_GLYPH_FORMAT_BITMAP */ + { + /* round to full pixels */ +@@ -150,6 +183,9 @@ slot->metrics.width += xstr; slot->metrics.height += ystr; @@ -684,9 +687,8 @@ slot->metrics.horiAdvance += xstr; slot->metrics.vertAdvance += ystr; slot->metrics.horiBearingY += ystr; - ---- a/src/smooth/ftsmooth.c 2013-06-05 05:12:47.000000000 -0500 -+++ b/src/smooth/ftsmooth.c 2014-09-14 11:55:39.848343363 -0500 +--- a/src/smooth/ftsmooth.c 2014-12-04 23:07:46.585780090 +0100 ++++ b/src/smooth/ftsmooth.c 2014-12-04 23:08:41.802156790 +0100 @@ -26,6 +26,17 @@ #include "ftsmerrs.h" @@ -4302,9 +4304,9 @@ cbox.yMax = FT_PIX_CEIL( cbox.yMax ); +#endif - if ( cbox.xMin < 0 && cbox.xMax > FT_INT_MAX + cbox.xMin ) - { -@@ -227,6 +3796,9 @@ + width = (FT_ULong)( cbox.xMax - cbox.xMin ) >> 6; + height = (FT_ULong)( cbox.yMax - cbox.yMin ) >> 6; +@@ -208,6 +3777,9 @@ y_top += extra >> 1; } } @@ -4314,7 +4316,7 @@ #endif -@@ -251,8 +3823,15 @@ +@@ -228,8 +3800,15 @@ bitmap->pitch = pitch; /* translate outline to render it into the bitmap */ @@ -4330,7 +4332,7 @@ if ( FT_ALLOC( bitmap->buffer, (FT_ULong)pitch * height ) ) goto Exit; -@@ -306,9 +3885,153 @@ +@@ -283,9 +3862,153 @@ if ( error ) goto Exit; @@ -4484,75 +4486,6 @@ #else /* !FT_CONFIG_OPTION_SUBPIXEL_RENDERING */ /* render outline into bitmap */ ---- a/src/truetype/ttinterp.c 2014-09-14 23:02:01.616685627 +0200 -+++ b/src/truetype/ttinterp.c 2014-09-14 23:02:59.846685964 +0200 -@@ -4886,6 +4886,10 @@ - CUR.sph_in_func_flags = 0x0000; - #endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ - -+#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING -+ CUR.sph_in_func_flags = 0x0000; -+#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ -+ - if ( CUR.callTop <= 0 ) /* We encountered an ENDF without a call */ - { - CUR.error = FT_THROW( ENDF_In_Exec_Stream ); -@@ -6231,6 +6235,12 @@ - ( CUR.sph_in_func_flags & SPH_FDEF_INLINE_DELTA_2 ) ) ) - goto Skip; - -+ /* skip post-iup deltas */ -+ if ( CUR.iup_called && -+ ( ( CUR.sph_in_func_flags & SPH_FDEF_INLINE_DELTA_1 ) || -+ ( CUR.sph_in_func_flags & SPH_FDEF_INLINE_DELTA_2 ) ) ) -+ goto Skip; -+ - if ( !( CUR.sph_tweak_flags & SPH_TWEAK_ALWAYS_SKIP_DELTAP ) && - ( ( CUR.is_composite && CUR.GS.freeVector.y != 0 ) || - ( CUR.zp2.tags[point] & FT_CURVE_TAG_TOUCH_Y ) || -@@ -6520,6 +6530,7 @@ - if ( SUBPIXEL_HINTING && - CUR.ignore_x_mode && - CUR.GS.freeVector.x != 0 && -+ CUR.GS.freeVector.y == 0 && - !( CUR.sph_tweak_flags & SPH_TWEAK_NORMAL_ROUND ) ) - minimum_distance = 0; - #endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ -@@ -8382,6 +8393,34 @@ - - #endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ - -+#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING -+ for ( i = 0; i < opcode_patterns; i++ ) -+ { -+ if ( opcode_pointer[i] < opcode_size[i] && -+ CUR.opcode == opcode_pattern[i][opcode_pointer[i]] ) -+ { -+ opcode_pointer[i] += 1; -+ -+ if ( opcode_pointer[i] == opcode_size[i] ) -+ { -+ FT_TRACE7(( "sph: opcode ptrn: %d, %s %s\n", -+ i, -+ CUR.face->root.family_name, -+ CUR.face->root.style_name )); -+ -+ switch ( i ) -+ { -+ case 0: -+ break; -+ } -+ opcode_pointer[i] = 0; -+ } -+ } -+ else -+ opcode_pointer[i] = 0; -+ } -+#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ -+ - #ifdef TT_CONFIG_OPTION_INTERPRETER_SWITCH - - { --- a/src/autofit/aflatin.h 2014-09-14 11:18:00.268465365 -0500 +++ b/src/autofit/aflatin.h 2014-09-14 11:23:45.223942422 -0500 @@ -62,6 +62,9 @@ diff --git a/testing/freetype-infinality/APKBUILD b/testing/freetype-infinality/APKBUILD index 8bfd971bc0..bedca47039 100644 --- a/testing/freetype-infinality/APKBUILD +++ b/testing/freetype-infinality/APKBUILD @@ -1,7 +1,7 @@ # Contributor: Carlo Landmeter <clandmeter@gmail.com> # Maintainer: pkgname=freetype-infinality -pkgver=2.5.3 +pkgver=2.5.5 pkgrel=0 pkgdesc="TrueType font rendering library with infinality patch" url="ttp://www.infinality.net/blog/infinality-freetype-patches/" @@ -14,10 +14,11 @@ install="" replaces="freetype" subpackages="$pkgname-dev" source="http://downloads.sourceforge.net/sourceforge/freetype/freetype-${pkgver}.tar.bz2 - upstream-2014.10.08.patch - freetype-2.5.3-enable-valid.patch - infinality-2.5.3-2014.10.08.patch - infinality-settings.sh" + infinality-settings.sh + 01-freetype-2.5.5-enable-valid.patch + 02-ftsmooth-2.5.5.patch + 03-upstream-2015.01.23.patch + 04-infinality-2.5.5-2015.01.23.patch" _builddir=$srcdir/freetype-$pkgver @@ -53,18 +54,21 @@ package() { rm -f "$pkgdir"/usr/lib/*.la } -md5sums="d6b60f06bfc046e43ab2a6cbfd171d65 freetype-2.5.3.tar.bz2 -bd394dec102e48b34689869765b912c9 upstream-2014.10.08.patch -aa55f7eae584dec7463930ab71ad3dc2 freetype-2.5.3-enable-valid.patch -20dcb30fe4669b7239188e091708dfc6 infinality-2.5.3-2014.10.08.patch -1b79263b344e4ca1e412f33da8399dbc infinality-settings.sh" -sha256sums="c0848b29d52ef3ca27ad92e08351f023c5e24ce8cea7d8fe69fc96358e65f75e freetype-2.5.3.tar.bz2 -e63212a4e032470ac46fa459480fadf0dbee190e5d7040f1181d9465127053dd upstream-2014.10.08.patch -086c9874ba5217dab419ac03dbc5ad6480aaa67b3c9d802f7181d8a3e007f8eb freetype-2.5.3-enable-valid.patch -27199bfe792992f9db67a2f9776bde12efc0e809af7f538ac897991705d8853b infinality-2.5.3-2014.10.08.patch -ec0cd975d5f5a4dd3363c6b92a49673ffad1460e48ddcddf5afeb2a3a9d60d9b infinality-settings.sh" -sha512sums="bdd779dc11e9fdb52dfa87839ccc40293df3ea417da0232feadf0e711caa3e62ff145e9afdfd9c3d158df0bc69a805cfbf05b18af8ae7ab5a65213e9c66d242e freetype-2.5.3.tar.bz2 -7c4613849436096bfdb620ac7fd52859c083868f01c43c9f59a3407bda4fce826f657a4432653c4339b7bffbb7616e6f86bb40e642f6a02166622247a31973bd upstream-2014.10.08.patch -1cefdab6a2de6dbae84140007b47a644bd2de72c112f7b0e9c17810df8897c768b8ce584863e9643405df27ffb4476830dd9a295af02b5ac2379e1bb9b1bb21f freetype-2.5.3-enable-valid.patch -d041f3cf0413be82802dac4d48c25db808c95e94fa63c63bef148afe9d77393011cc2fae77e7dd5c83d6259070131a77a693e30f949337e59e1cb42250ed3611 infinality-2.5.3-2014.10.08.patch -0d19740d71e8d1f283db3db1e0d66a2d500ea644155b02ee7fe0ec0cdd20146b07cba497594590157df8afee9ffb729f13fc6867f10322fba87e9c31a34ec318 infinality-settings.sh" +md5sums="2a7a314927011d5030903179cf183be0 freetype-2.5.5.tar.bz2 +1ed3a98a323ddb959c65d3d850338130 infinality-settings.sh +aa55f7eae584dec7463930ab71ad3dc2 01-freetype-2.5.5-enable-valid.patch +59560ee36b22a597144b231d27157563 02-ftsmooth-2.5.5.patch +edbc6f0d7869e3674f19a037ed60590f 03-upstream-2015.01.23.patch +9b787d22ea6acf8b5c50af63c203eca5 04-infinality-2.5.5-2015.01.23.patch" +sha256sums="387bcc4b780b12484aa2ec9f7db1a55d8286eb5639f45fbc0fbba7a4e5a1afb9 freetype-2.5.5.tar.bz2 +21192ce47be46ccd44e8aeea99754d4e5e38cb52717f752d67c319c74fea2716 infinality-settings.sh +086c9874ba5217dab419ac03dbc5ad6480aaa67b3c9d802f7181d8a3e007f8eb 01-freetype-2.5.5-enable-valid.patch +149ed6ec6fbcdffe01077432295fbbfd179a9c23312562e822a3bdd1fbf6aec8 02-ftsmooth-2.5.5.patch +f6032257ef106a6d6d4cab1b2c154f60407af1e54c2941b4c14459fa64cdc40d 03-upstream-2015.01.23.patch +85f7168bb4ab56042db175f7a8d3a7ce23669c8f44c2c7860d2b53d673c047b9 04-infinality-2.5.5-2015.01.23.patch" +sha512sums="1fc72d24da1744a6a5faf3338e49912c81ce83f30def1e80a2a15b50e7f83893a4fe24a70ef88b65ecc217bed1c15d85804c364eba221b35e25531c727fe8559 freetype-2.5.5.tar.bz2 +a4a0461bdd9efbf4ec5d2f1de41ff354f4d485a1dee6f6fac1d1ab912b08daeb99cffc0ff2cc81e3023d5f15baf2dbcb6bf6341ebe69b84cbb0037be3393548c infinality-settings.sh +1cefdab6a2de6dbae84140007b47a644bd2de72c112f7b0e9c17810df8897c768b8ce584863e9643405df27ffb4476830dd9a295af02b5ac2379e1bb9b1bb21f 01-freetype-2.5.5-enable-valid.patch +cf5a848ff54cc22f81d2abbb5033706aea466b4924ef033930a50d3bfef21096a0d5142ab5d4a47fee163a5b3700d1881ef21bfb557fc1446ef3d7f927ad1bfc 02-ftsmooth-2.5.5.patch +06539b6da251bc01465ff216fed1e337894131fc0a9b35b8890b3d32d5c77cd75177329f14b5309244b932c0e5caf05fe45bb17aed4081ef46cccba00f869efc 03-upstream-2015.01.23.patch +da449943778c6e31e65e677237863814cbbd1523d32f4a8d46e3816bf8243a23a78f63c041da9700fa4eec3b05705c4b300e3e4b5056fcb20859f410e360296f 04-infinality-2.5.5-2015.01.23.patch" diff --git a/testing/freetype-infinality/infinality-settings.sh b/testing/freetype-infinality/infinality-settings.sh index a23b993143..f293c652ea 100644 --- a/testing/freetype-infinality/infinality-settings.sh +++ b/testing/freetype-infinality/infinality-settings.sh @@ -1,7 +1,5 @@ -#!/bin/sh - ### freetype2-infinality-ultimate settings ### -### rev. 0.4.8.1, for freetype2 v.2.5.x ### +### rev. 0.4.8.3, for freetype2 v.2.5.x ### ### ### ### Copyright (c) 2014 bohoomil ### ### The MIT License (MIT) http://opensource.org/licenses/MIT ### @@ -41,8 +39,10 @@ elif [ "$USE_STYLE" = "5" ]; then export INFINALITY_FT_FILTER_PARAMS="12 28 42 28 12" fi -export INFINALITY_FT_FRINGE_FILTER_STRENGTH="50" +export INFINALITY_FT_FRINGE_FILTER_STRENGTH="25" export INFINALITY_FT_USE_VARIOUS_TWEAKS="true" -export INFINALITY_FT_CHROMEOS_STYLE_SHARPENING_STRENGTH="20" +export INFINALITY_FT_WINDOWS_STYLE_SHARPENING_STRENGTH="25" +export INFINALITY_FT_STEM_ALIGNMENT_STRENGTH="15" +export INFINALITY_FT_STEM_FITTING_STRENGTH="15" # vim:ft=sh: diff --git a/testing/freetype-infinality/upstream-2014.10.08.patch b/testing/freetype-infinality/upstream-2014.10.08.patch deleted file mode 100644 index a519118860..0000000000 --- a/testing/freetype-infinality/upstream-2014.10.08.patch +++ /dev/null @@ -1,6990 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index a4e583d..df77d96 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -16,11 +16,16 @@ - # - # cmake CMakeLists.txt - # --# to create a Makefile that builds a static version of the library. For a --# dynamic library, use -+# to create a Makefile that builds a static version of the library. -+# -+# For a dynamic library, use - # - # cmake CMakeLists.txt -DBUILD_SHARED_LIBS:BOOL=true - # -+# For a framework on OS X, use -+# -+# cmake CMakeLists.txt -DBUILD_FRAMEWORK:BOOL=true -G Xcode -+# - # instead. Please refer to the cmake manual for further options, in - # particular, how to modify compilation and linking parameters. - # -@@ -39,6 +44,14 @@ cmake_minimum_required(VERSION 2.6) - - project(freetype) - -+if (BUILD_FRAMEWORK) -+ if (NOT "${CMAKE_GENERATOR}" STREQUAL "Xcode") -+ message(FATAL_ERROR "You should use Xcode generator with BUILD_FRAMEWORK enabled") -+ endif () -+ set(CMAKE_OSX_ARCHITECTURES "$(ARCHS_STANDARD_32_64_BIT)") -+ set(BUILD_SHARED_LIBS ON) -+endif () -+ - set(VERSION_MAJOR "2") - set(VERSION_MINOR "5") - set(VERSION_PATCH "3") -@@ -51,22 +64,27 @@ add_definitions(-DFT2_BUILD_LIBRARY) - include_directories("${PROJECT_SOURCE_DIR}/include") - - # Create the configuration file --message(STATUS "Creating directory, ${PROJECT_BINARY_DIR}/include.") --file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/include) -+message(STATUS "Creating directory, ${PROJECT_BINARY_DIR}/include/freetype2.") -+file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/include/freetype2) - - # For the auto-generated ftconfig.h file --include_directories("${PROJECT_BINARY_DIR}/include") --message(STATUS "Creating ${PROJECT_BINARY_DIR}/include/ftconfig.h.") -+include_directories(BEFORE "${PROJECT_BINARY_DIR}/include/freetype2") -+message(STATUS "Creating ${PROJECT_BINARY_DIR}/include/freetype2/ftconfig.h.") - execute_process( - COMMAND sed -e "s/FT_CONFIG_OPTIONS_H/<ftoption.h>/" -e "s/FT_CONFIG_STANDARD_LIBRARY_H/<ftstdlib.h>/" -e "s?/undef ?#undef ?" - INPUT_FILE ${PROJECT_SOURCE_DIR}/builds/unix/ftconfig.in -- OUTPUT_FILE ${PROJECT_BINARY_DIR}/include/ftconfig.h -+ OUTPUT_FILE ${PROJECT_BINARY_DIR}/include/freetype2/ftconfig.h - ) - -+file(GLOB PUBLIC_HEADERS "include/*.h") -+file(GLOB PUBLIC_CONFIG_HEADERS "include/config/*.h") -+file(GLOB PRIVATE_HEADERS "include/internal/*.h") -+ - set(BASE_SRCS - src/autofit/autofit.c - src/base/ftadvanc.c - src/base/ftbbox.c -+ src/base/ftbdf.c - src/base/ftbitmap.c - src/base/ftcalc.c - src/base/ftcid.c -@@ -125,7 +143,31 @@ include_directories("src/raster") - include_directories("src/psaux") - include_directories("src/psnames") - --add_library(freetype ${BASE_SRCS}) -+if (BUILD_FRAMEWORK) -+ set(BASE_SRCS -+ ${BASE_SRCS} -+ builds/mac/freetype-Info.plist -+ ) -+endif () -+ -+add_library(freetype -+ ${PUBLIC_HEADERS} -+ ${PUBLIC_CONFIG_HEADERS} -+ ${PRIVATE_HEADERS} -+ ${BASE_SRCS} -+) -+ -+if (BUILD_FRAMEWORK) -+ set_property(SOURCE ${PUBLIC_CONFIG_HEADERS} -+ PROPERTY MACOSX_PACKAGE_LOCATION Headers/config -+ ) -+ set_target_properties(freetype PROPERTIES -+ FRAMEWORK TRUE -+ MACOSX_FRAMEWORK_INFO_PLIST builds/mac/freetype-Info.plist -+ PUBLIC_HEADER "${PUBLIC_HEADERS}" -+ XCODE_ATTRIBUTE_INSTALL_PATH "@rpath" -+ ) -+endif () - - # Installations - # Note the trailing slash in the argument to the `DIRECTORY' directive -@@ -137,6 +179,7 @@ install(TARGETS freetype - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib -+ FRAMEWORK DESTINATION Library/Frameworks - ) - - # Packaging -diff --git a/ChangeLog b/ChangeLog -index ea1eb4a..4e17454 100644 ---- a/ChangeLog -+++ b/ChangeLog -@@ -1,3 +1,703 @@ -+2014-10-02 Alexei Podtelezhnikov <apodtele@gmail.com> -+ -+ [base] Significant optimization of `ft_div64by32' -+ -+ We shift as many bits as we can into the high register, perform -+ 32-bit division with modulo there, then work through the remaining -+ bits with long division. This optimization is especially noticeable -+ for smaller dividends that barely use the high register. -+ -+ * src/base/ftcalc.c (ft_div64by32): Updated. -+ -+2014-10-02 Dave Arnold <darnold@adobe.com> -+ -+ [cff] Fix Savannah bug #43271. -+ -+ * src/cff/cf2font.c (cf2_computeDarkening): Change overflow -+ detection to use logarithms and clamp `scaledStem'. -+ -+2014-10-01 Alexei Podtelezhnikov <apodtele@gmail.com> -+ -+ * src/base/ftcalc.c: Remove miscellaneous type casts. -+ -+2014-10-01 Alexei Podtelezhnikov <apodtele@gmail.com> -+ -+ [base] Use more common `FT_MSB' implementation with masks. -+ -+ * src/base/ftcalc.c (FT_MSB): Updated. -+ -+2014-09-30 Alexei Podtelezhnikov <apodtele@gmail.com> -+ -+ [base] Clean up. -+ -+ * src/base/ftcalc.c (FT_MOVE_SIGN): New macro for frequently used -+ code. -+ -+2014-09-25 Alexei Podtelezhnikov <apodtele@gmail.com> -+ -+ [base] Avoid unnecessary long division. -+ -+ This applies to `FT_MulDiv' but not to `FT_DivFix', where overflows or -+ lack thereof are predicted accurately. -+ -+ * src/base/ftcalc.c (ft_div64by32): Improve readability. -+ (FT_MulDiv, FT_MulDiv_No_Round) [!FT_LONG64]: Use straight division -+ when multiplication stayed within 32 bits. -+ -+2014-09-24 Werner Lemberg <wl@gnu.org> -+ -+ [autofit] Minor clean-ups. -+ -+ * src/autofit/afhints.c (AF_FLAGS): Remove obsolete values. -+ -+ * src/autofit/afhints.c (af_glyph_hints_dump_points, -+ af_glyph_hints_align_strong_points): Updated. -+ -+ * src/autofit/aflatin.c (af_latin_hints_link_segments, -+ af_latin_hints_compute_segments), src/autofit/afcjk.c -+ (af_cjk_hints_link_segments), src/autofit/aflatin2.c -+ (af_latin2_hints_link_segments, af_latin2_hints_compute_segments): -+ There are no longer fake segments since more than 10 years... -+ -+2014-09-22 Werner Lemberg <wl@gnu.org> -+ -+ [autofit] Minor code streamlining. -+ -+ * src/autofit/afhints.c (af_axis_hints_new_edge): Remove redundant -+ initialization. -+ -+2014-09-19 Alexei Podtelezhnikov <apodtele@gmail.com> -+ -+ * src/base/ftcalc.c: Harmonize code. -+ -+2014-09-15 Alexei Podtelezhnikov <apodtele@gmail.com> -+ -+ [base] Tighten the overflow check in `FT_MulDiv'. -+ -+ * src/base/ftcalc.c (FT_MulDiv) [!FT_LONG64]: Updated. -+ -+2014-09-08 Alexei Podtelezhnikov <apodtele@gmail.com> -+ -+ Fix Savannah bug #43153. -+ -+ * src/psaux/psconv.c (PS_Conv_ToFixed): Add protection against -+ overflow in `divider'. -+ -+2014-09-03 Alexei Podtelezhnikov <apodtele@gmail.com> -+ -+ [base] Tighten the overflow check in `FT_DivFix'. -+ -+ This fixes a 13-year old bug. The original overflow check should have -+ been updated when rounding was introduced into this function -+ (c2cd00443b). -+ -+ * src/base/ftcalc.c (FT_DivFix) [!FT_LONG64]: Updated. -+ * include/freetype.h (FT_DivFix): Updated documentation. -+ -+2014-09-03 Alexei Podtelezhnikov <apodtele@gmail.com> -+ -+ [base] Tighten the overflow check in `FT_MulFix'. -+ -+ * src/base/ftcalc.c (FT_MulFix) [!FT_LONG64]: Updated. -+ -+2014-09-02 Alexei Podtelezhnikov <apodtele@gmail.com> -+ -+ [truetype] Shortcut ppem calculations for square pixels. -+ -+ * src/truetype/ttinterp.h (TT_ExecContextRec): New field -+ `cur_ppem_func' with a function pointer. -+ * src/truetype/ttinterp.c (TT_RunIns): Initialize `cur_ppem_func' -+ depending on the pixel geometry to either... -+ (Current_Ppem_Stretched): ... this for stretched pixels. -+ (Current_Ppem): ... or this for square pixels. -+ (DO_MPPEM, DO_MPS, Ins_DELTAP, Ins_DELTAC): Use `cur_ppem_func'. -+ -+2014-08-31 Behdad Esfahbod <behdad@behdad.org> -+ -+ Don't use `register' keyword. Fixes compiler warnings. -+ -+ * src/base/ftcalc.c (FT_Add64) [!FT_LONG64]: Do it. -+ * src/gzip/inftrees.c (huft_build): Ditto. -+ * src/truetype/ttinterp.c (TT_MulFix14_arm): Ditto. -+ -+2014-08-24 Alexei Podtelezhnikov <apodtele@gmail.com> -+ -+ [truetype] Optimize DELTAP and DELTAC. -+ -+ * src/truetype/ttinterp.c (Ins_DELTAP, Ins_DELTAC): Move ppem -+ calculations outside of the loop. -+ -+2014-08-21 Alexei Podtelezhnikov <apodtele@gmail.com> -+ -+ Fix Savannah bug #43033. -+ -+ * include/config/ftconfig.h, builds/unix/ftconfig.in, -+ builds/vms/ftconfig.h [FT_LONG64]: Do not disable the macro when -+ 64-bit type is `long'. -+ -+2014-08-20 Alexei Podtelezhnikov <apodtele@gmail.com> -+ -+ [base] Small optimization of `FT_MulFix'. -+ -+ * src/base/ftcalc.c (FT_MulFix): Loosen up the condition for direct -+ 32-bit calculations. -+ -+2014-08-19 Alexei Podtelezhnikov <apodtele@gmail.com> -+ -+ [base] Use unsigned calculation in `FT_MulDiv'. -+ -+ * src/base/ftcalc.c (FT_MulDiv): Updated to expand 32-bit range. -+ -+2014-08-18 Alexei Podtelezhnikov <apodtele@gmail.com> -+ -+ [base] Remove truncation in `FT_DivFix'. -+ -+ * src/base/ftcalc.c (FT_DivFix): Updated. -+ -+2014-08-14 Alexei Podtelezhnikov <apodtele@gmail.com> -+ -+ Minor refactoring. -+ -+ * src/base/ftcalc.c (FT_MulDiv, FT_MulDiv_No_Round): Updated. -+ -+2014-08-14 Alexei Podtelezhnikov <apodtele@gmail.com> -+ -+ Turn FT_MSB into a macro when using gcc builtins. -+ -+ * src/base/ftcalc.c, include/internal/ftcalc.h: Updated. -+ -+2014-08-12 Alexei Podtelezhnikov <apodtele@gmail.com> -+ -+ [base] Avoid undefined FT_MSB in `BBox_Cubic_Check'. -+ -+ * src/base/ftbbox.c (BBox_Cubic_Check): Update. -+ (update_cubic_max): Repalce with... -+ (cubic_peak): ... this, which now handles upscaling. -+ -+2014-08-11 Alexei Podtelezhnikov <apodtele@gmail.com> -+ -+ [base] Handle collapsed outlines to avoid undefined FT_MSB. -+ -+ * src/base/ftoutln.c (FT_Outline_Get_Orientation): Update. -+ -+2014-08-11 Alexei Podtelezhnikov <apodtele@gmail.com> -+ -+ [base] Restore FT_MulFix inlining. -+ -+ * include/freetype.h (FT_MulFix): Unconditionally defined. -+ -+ * src/base/ftcalc.c [FT_MULFIX_ASSEMBLER]: Move code from here... -+ -+ * include/internal/ftcalc.h [FT_MULFIX_ASSEMBLER]: ... to here, -+ which conditionally replaces the function with an inline version -+ through the macro. -+ -+2014-08-08 Alexei Podtelezhnikov <apodtele@gmail.com> -+ -+ * src/base/ftbitmap.c (ft_gray_for_premultiplied_srgb_bgra): Refactor. -+ -+2014-07-26 Werner Lemberg <wl@gnu.org> -+ -+ [cff] Fix typo. -+ -+ * src/cff/cf2hints.c (cf2_glyphpath_computeOffset): Use correct -+ offsets in third quadrant. -+ -+ Reported by maks <maksqwe1@ukr.net>. -+ -+2014-07-17 Werner Lemberg <wl@gnu.org> -+ -+ Fix Savannah bug #42788. -+ -+ * src/pfr/pfrobjs.c: Include `ftcalc.h'. -+ -+2014-07-16 Alexei Podtelezhnikov <apodtele@gmail.com> -+ -+ Replace `ft_highpow2' function. -+ -+ * src/pfr/pfrobjs.c (pfr_face_get_kerning): Use `FT_MSB' instead of -+ `ft_highpow2'. -+ -+ * src/base/ftutil.c, include/internal/ftobjs.h (ft_highpow2): Remove -+ it. -+ -+2014-07-15 Alexei Podtelezhnikov <apodtele@gmail.com> -+ -+ * src/base/ftcalc.c (FT_MSB): Utilize gcc builtins. -+ -+2014-07-15 Alexei Podtelezhnikov <apodtele@gmail.com> -+ -+ [base] Move assembler code back in the source file. -+ -+ FT_MulFix assembler used to reside in ftcalc.c before f47d263f1b. -+ -+ * include/config/ftconfig.h, builds/unix/ftconfig.in, -+ builds/vms/ftconfig.h [FT_MULFIX_ASSEMBLER]: Move code from here... -+ -+ * src/base/ftcalc.c [FT_MULFIX_ASSEMBLER]: ... to here. -+ -+2014-07-14 Alexei Podtelezhnikov <apodtele@gmail.com> -+ -+ [base] Further clean up color bitmap conversion. -+ -+ * src/base/ftbitmap.c (ft_gray_for_premultiplied_srgb_bgra): Stop -+ using FT_MulFix and FT_DivFix since all calculations fit into 32 bits. -+ -+2014-07-13 Werner Lemberg <wl@gnu.org> -+ -+ [truetype] Improve handling of buggy `prep' tables. -+ -+ In case of an error in the `prep' table, no longer try to execute it -+ again and again. This makes FreeType handle endless loops in buggy -+ fonts much faster. -+ -+ * src/truetype/ttobjs.h (TT_SizeRec): The fields `bytecode_ready' -+ and `cvt_ready' are now negative if not initialized yet, otherwise -+ they indicate the error code of the last run. -+ -+ * src/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep, -+ tt_size_done_bytecode, tt_size_init_bytecode, -+ tt_size_ready_bytecode, tt_size_init, tt_size_done, tt_size_reset): -+ Updated. -+ -+ * src/truetype/ttgload.c (tt_loader_init): Updated. -+ * src/truetype/ttinterp.c (TT_RunIns): Force reexecution of `fpgm' -+ and `prep' only if we are in the `glyf' table. -+ -+2014-07-12 Werner Lemberg <wl@gnu.org> -+ -+ * builds/vms/ftconfig.h: Synchronize. -+ Problem reported by Alexei. -+ -+2014-07-11 Alexei Podtelezhnikov <apodtele@gmail.com> -+ -+ [base] Clean up bitmap conversion. -+ -+ * src/base/ftbitmap.c (ft_gray_for_premultiplied_srgb_bgra): Use -+ appropriate FT_DivFix and remove superfluous upscaling. -+ -+2014-07-04 Alexei Podtelezhnikov <apodtele@gmail.com> -+ -+ [base] Small optimization of the ancient code. -+ -+ * src/base/ftcalc.c (FT_MulDiv, FT_MulDiv_No_Round): Loosen up the -+ condition for direct 32-bit calculations. -+ -+2014-06-27 Werner Lemberg <wl@gnu.org> -+ -+ Fix Apple standard glyph names. -+ -+ * src/sfnt/ttpost.c (tt_post_default_names): Synchronize with -+ `tools/glnames.py' -+ -+ Problem reported by Adam Twardoch <adam@fontlab.com>. -+ -+2014-06-17 Werner Lemberg <wl@gnu.org> -+ -+ Partially revert commit from 2014-06-13. -+ -+ * src/autofit/aflatin.c (af_latin_metrics_init_blues): Move -+ declaration of `p_first' and `p_last' out of the loop. -+ -+2014-06-17 Werner Lemberg <wl@gnu.org> -+ -+ * builds/unix/freetype2.m4: s/AC_PATH_PROG/AC_PATH_TOOL/. -+ -+ This simplifies cross-compiling. -+ -+2014-06-13 Werner Lemberg <wl@gnu.org> -+ -+ Fix more compiler warnings. -+ Reported by Wojciech Mamrak <wmamrak@gmail.com>. -+ -+ * src/autofit/afglobal.c (af_face_globals_compute_style_coverage): -+ Make integer constant unsigned. -+ -+ * src/sfnt/ttsbit.c (tt_face_load_strike_metrics) -+ <TT_SBIT_TABLE_TYPE_SBIX>: Fix types. -+ (tt_sbit_decoder_load_compound, tt_face_load_sbix_image): Add proper -+ casts. -+ -+2014-06-13 Werner Lemberg <wl@gnu.org> -+ -+ Fix compiler warnings. -+ Reported by Wojciech Mamrak <wmamrak@gmail.com>. -+ -+ * src/autofit/afglobal.c (af_face_globals_compute_style_coverage), -+ src/autofit/afmodule.c (af_property_set): Fix `signed' vs. -+ `unsigned' issues. -+ -+ * src/autofit/aflatin.c (af_latin_metrics_init_blues): Make compiler -+ happy. -+ -+ * src/base/ftlcdfil.c (_ft_lcd_filter_fir): Use only four elements -+ for `fir'. -+ Fix `signed' vs. `unsigned' issues. -+ -+ * src/sfnt/sfobjs.c (WRITE_BYTE): Removed, unused. -+ (WRITE_USHORT, WRITE_ULONG): Add proper casts. -+ -+ * src/truetype/ttgload.c (TT_Get_VMetrics): Add proper casts. -+ -+ * src/truetype/ttinterp.c (Ins_DELTAP): Add proper casts for `B1' -+ and `B2'. -+ -+2014-05-16 Alexey Petruchik <alexey.petruchik@gmail.com> -+ -+ [cmake] Add option to build OS X framework. -+ -+ * CMakeLists.txt: Update accordingly. -+ -+ * builds/mac/freetype-Info.plist: New file. -+ -+2014-05-13 Pavel Koshevoy <pkoshevoy@gmail.com> -+ -+ * CMakeLists.txt (BASE_SRCS): Add missing `ftbdf.c'. -+ -+2014-05-11 Werner Lemberg <wl@gnu.org> -+ -+ [autofit] Fix variable initializations. -+ -+ * src/autofit/afhints.c (af_glyph_hints_reload): Assign default -+ values to `in_dir' and `out_dir' for all points. -+ -+2014-05-11 Werner Lemberg <wl@gnu.org> -+ -+ [autofit] Fix crash with font `CabinSketch-Bold.ttf'. -+ -+ Problem reported by Ralf S. Engelschall <rse@engelschall.com>. -+ -+ * src/autofit/afhints.c (af_glyph_hints_reload): Fix threshold for -+ finding first non-near point. -+ Properly initialize non-near point deltas. -+ -+2014-05-01 Werner Lemberg <wl@gnu.org> -+ -+ [autofit] Add blue-zone support for Devanagari. -+ -+ This essentially moves the Devanagari script from the `Indic' hinter -+ to the `Latin' hinter. Thanks to Girish Dalvi -+ <girish.dalvi@gmail.com> for guidance with blue zone characters! -+ -+ * src/autofit/afblue.dat: Add blue zone data for Devanagari. -+ -+ * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. -+ -+ * src/autofit/afscript.h: Add Devanagari standard characters and -+ move data out of AF_CONFIG_OPTION_INDIC block. -+ -+ * src/autofit/afranges.c: Move Devanagari data out of -+ AF_CONFIG_OPTION_INDIC block. -+ Move U+20B9, (new) Rupee sign, from Latin to Devanagari. -+ -+ * src/autofit/afstyles.h: Update Devanagari data; in particular, use -+ AF_WRITING_SYSTEM_LATIN. -+ -+2014-05-01 Werner Lemberg <wl@gnu.org> -+ -+ [autofit] Fix handling of neutral blue zones in stems. -+ -+ * src/autofit/afhints.h (AF_Edge_Flags): New value -+ `AF_EDGE_NEUTRAL'. -+ -+ * src/autofit/aflatin.c (af_latin_hints_compute_blue_edges): Trace -+ neutral blue zones with AF_EDGE_NEUTRAL. -+ (af_latin_hint_edges): Skip neutral blue zones if necessary. -+ -+2014-04-28 Werner Lemberg <wl@gnu.org> -+ -+ [autofit] Introduce neutral blue zones to the latin module. -+ -+ Such blue zones match either the top or the bottom of a contour. We -+ need them for scripts where accent-like elements directly touch the -+ base character (for example, some vowel signs in Devanagari, cf. -+ U+0913 or U+0914). -+ -+ * src/autofit/afblue.hin (AF_BLUE_PROPERTY_LATIN_NEUTRAL): New -+ property. -+ -+ * src/autofit/afblue.h: Regenerated. -+ -+ * src/autofit/aflatin.h (AF_LATIN_IS_NEUTRAL_BLUE): New macro. -+ (AF_LATIN_BLUE_NEUTRAL): New enumeration value. -+ -+ * src/autofit/aflatin.c (af_latin_metrics_init_blues, -+ af_latin_hints_compute_blue_edges): Handle neutral blue zones. -+ -+2014-04-25 Werner Lemberg <wl@gnu.org> -+ -+ * src/autofit/hbshim.c: Partially revert commit from 2014-04-17. -+ -+ Using input glyph coverage data is simply wrong. -+ -+ Problem reported by Nikolaus Waxweiler <madigens@gmail.com> and -+ Mantas MikulÄ—nas <grawity@gmail.com>. -+ -+2014-04-23 Werner Lemberg <wl@gnu.org> -+ -+ * src/raster/ftraster.c (Vertical_Sweep_Span): Use drop-out mode. -+ -+ This spot has been missed while introducing support for various -+ drop-out modes years ago (including no drop-out mode, which this -+ commit fixes). -+ -+ Problem reported by Patrick Thomas <pthomas505@gmail.com>. -+ -+2014-04-22 Werner Lemberg <wl@gnu.org> -+ -+ * src/sfnt/pngshim.c (error_callback): s/longjmp/ft_longjmp/. -+ -+2014-04-20 Werner Lemberg <wl@gnu.org> -+ -+ [autofit] Fix Savannah bug #42148. -+ -+ The adaptation of the cjk auto-hinter module to blue stringsets in -+ 2013-08-25 had three severe bugs. Mea culpa. -+ -+ 1. Contrary to the latin auto-hinter, characters for reference and -+ overshoot values of a blue zone are specified separately. Due to -+ the screwed-up change it didn't work at all. -+ -+ 2. A boolean comparison was erroneously replaced with a cast, -+ causing invalid results with the `^' operator later on. The -+ visual artifact caused by this problem is the topic of the bug -+ report. -+ -+ 3. Two flag values were inverted, causing incorrect assignment of -+ reference and overshoot values. -+ -+ * src/autofit/afblue.dat: Fix CJK bluestrings, introducing a new -+ syntax to have both reference and overshoot characters in a single -+ string. This is error #1. -+ Add extensive comments. -+ -+ * src/autofit/afblue.hin (AF_BLUE_PROPERTY_CJK_FILL): Removed, no -+ longer used. -+ (AF_BLUE_PROPERTY_CJK_TOP, AF_BLUE_PROPERTY_CJK_HORIZ): Fix values. -+ This is error #3. -+ -+ * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. -+ -+ * src/autofit/afcjk.c (af_cjk_metrics_init_blues): Correct error #1. -+ Use character `|' to separate characters for reference and overshoot -+ values. -+ Improve tracing messages, synchronizing them with the latin -+ auto-hinter. -+ (af_cjk_hints_compute_blue_edges): Fix value of `is_top_right_blue'. -+ This is error #2. -+ (af_cjk_align_linked_edge): Add tracing message. -+ -+ * src/autofit/afcjk.h (AF_CJK_IS_FILLED_BLUE): Removed, no longer -+ used. -+ -+2014-04-17 Werner Lemberg <wl@gnu.org> -+ -+ [autofit] More coverage fixes for complex scripts. -+ -+ * src/autofit/hbshim.c (af_get_coverage): Merge input glyph coverage -+ of GSUB lookups into output coverage. Otherwise, ligatures are not -+ handled properly. -+ Don't check blue zone characters for default coverage. -+ -+2014-04-17 Werner Lemberg <wl@gnu.org> -+ -+ Make `FT_Get_SubGlyph_Info' actually work. -+ -+ * src/base/ftobjs.c (FT_Get_SubGlyph_Info): Return FT_Err_Ok -+ if there is no error. -+ -+2014-04-15 Werner Lemberg <wl@gnu.org> -+ -+ [afblue.pl]: Minor improvements. -+ -+ * src/tools/afblue.pl: Allow whitespace before comments. -+ Ignore whitespace in strings. -+ -+2014-04-14 Werner Lemberg <wl@gnu.org> -+ -+ [autofit] Improve coverage handling. -+ -+ * src/autofit/hbshim.c (af_get_coverage): Don't exclude glyphs -+ appearing in the GPOS table if we are processing the default -+ coverage. -+ -+2014-04-13 David Weber <weber.aulendorf@googlemail.com> -+ -+ [smooth] Fix stand-alone compilation. -+ -+ * src/smooth/ftgrays.c (FT_BEGIN_STMNT, FT_END_STMNT): Define. -+ -+2014-04-12 Werner Lemberg <wl@gnu.org> -+ -+ [autofit] Redesign the recognition algorithm of strong points. -+ -+ In particular, local extrema without horizontal or vertical segments -+ are better recognized: -+ -+ + A + D -+ \ / -+ \ / -+ \ / -+ \ / -+ \ + C -+ \ / -+ B +/ -+ -+ If the distances AB and CD are large, point B wasn't previously -+ detected as an extremum since the `ft_corner_is_flat' function -+ `swallowed' BC regardless of its direction, tagging point B as weak. -+ The next iteration started at B and made `ft_corner_is_flat' swallow -+ point C, tagging it as weak also, et voilà . -+ -+ To improve that, another pass gets now performed before calling -+ `ft_corner_is_flat' to improve the `topology' of an outline: A -+ sequence of non-horizontal or non-vertical vectors that point into -+ the same quadrant are handled as a single, large vector. -+ -+ Additionally, distances of near points are now accumulated, which -+ makes the auto-hinter handle them as if they were prepended to the -+ next non-near vector. -+ -+ This generally improves the auto-hinter's rendering results. -+ -+ * src/autofit/afhints.c (af_glyph_hints_reload): Implement it. -+ -+ * src/autofit/afhints.h (AF_FLAGS): Remove no longer used flag -+ `AF_FLAG_NEAR'. -+ -+2014-04-05 Werner Lemberg <wl@gnu.org> -+ -+ [autofit] Improve scoring algorithm for identifying stems. -+ -+ Problem reported by Karsten Lücke <karsten.luecke@kltf.de>. -+ -+ The new algorithm takes care of the width of stems: If the distance -+ between two segments is larger than the largest stem width, the -+ demerits quickly increase for larger distances. This improves -+ hinting of slanted fonts (especially if the inner parts of serifs -+ have non-horizontal `shoulders'), avoiding false stem links. -+ -+ * src/autofit/aflatin.c (af_latin_hints_link_segments): Use largest -+ stem width (if available) to compute better demerits for distances -+ between stems. -+ (af_latin_hints_detect_features): Pass stem width array and array -+ size. -+ (af_latin_metrics_init_widths): Updated to use original algorithm. -+ (af_latin_hints_apply): Updated to use new algorithm. -+ -+ * src/autofit/aflatin.h: Updated. -+ * src/autofit/afcjk.c: Updated. -+ -+2014-04-03 Werner Lemberg <wl@gnu.org> -+ -+ Don't require `gzip' module for `sfnt'. -+ -+ Reported by Preet <prismatic.project@gmail.com>. -+ -+ * src/sfnt/sfobjs.c (woff_open_font): Guard use of -+ FT_Gzip_Uncompress with FT_CONFIG_OPTION_USE_ZLIB. -+ -+2014-03-27 Werner Lemberg <wl@gnu.org> -+ -+ Fix Savannah bug #38235. -+ -+ Work around a bug in pkg-config version 0.28 and earlier: If a -+ variable value gets surrounded by doublequotes (in particular values -+ for the `prefix' variable), the prefix override mechanism fails. -+ -+ * builds/unix/freetype2.in: Don't use doublequotes. -+ * builds/unix/unix-def.in (freetype.pc): Escape spaces in directory -+ names with backslashes. -+ -+2014-03-24 Werner Lemberg <wl@gnu.org> -+ -+ Fix Savannah bug #41946. -+ -+ Based on a patch from Marek KaÅ¡Ãk <mkasik@redhat.com>. -+ -+ * builds/unix/configure.raw (LIBS_CONFIG): Remove. -+ * builds/unix/freetype-config.in (libs): Hard-code value. -+ * builds/unix/unix-def.in: Updated. -+ -+2014-03-22 Werner Lemberg <wl@gnu.org> -+ -+ Another revert for the change from 2014-03-18. -+ -+ Problem reported by Nikolaus Waxweiler <madigens@gmail.com>. -+ -+ * src/base/ftcalc.c (FT_MulFix): Ensure that an `FT_MulFix' symbol -+ gets always exported. -+ -+2014-03-20 Werner Lemberg <wl@gnu.org> -+ -+ CMakeLists.txt: Another fix for include directories. -+ -+ Problem reported by Taylor Holberton <taylorcholberton@gmail.com>. -+ -+2014-03-19 Werner Lemberg <wl@gnu.org> -+ -+ CMakeLists.txt: Fix include directories. -+ -+ Problem reported by Taylor Holberton <taylorcholberton@gmail.com>. -+ -+2014-03-19 Werner Lemberg <wl@gnu.org> -+ -+ Partially revert last commit. -+ -+ Found by Alexei. -+ -+ * src/autofit/aflatin.c (af_latin_metrics_init_blues): Initializing -+ those variables is plain wrong, since we are in a loop. -+ -+2014-03-18 Sean McBride <sean@rogue-research.com> -+ Werner Lemberg <wl@gnu.org> -+ -+ Fix clang warnings. -+ -+ * src/autofit/aflatin.c (af_latin_metrics_init_blues): Initialize -+ some variables. -+ -+ * src/base/ftcalc.c (FT_MulFix): Only use code if -+ `FT_MULFIX_INLINED' is not defined. -+ -+ * src/bdf/bdfdrivr.c (bdf_cmap_class), src/cache/ftcbasic.c -+ (ftc_basic_image_family_class, ftc_basic_image_cache_class, -+ ftc_basic_sbit_family_class, ftc_basic_sbit_cache_class), -+ src/cache/ftccmap.c (ftc_cmap_cache_class), src/cache/ftcmanag.c -+ (ftc_size_list_class, ftc_face_list_class), src/pcf/pcfdrivr.c -+ (pcf_cmap_class), src/pfr/pfrdrivr.c (pfr_metrics_service_rec): Make -+ function static. -+ -+ * src/type1/t1driver.c (t1_ps_get_font_value): Remove redundant -+ code. -+ -+2014-03-17 Werner Lemberg <wl@gnu.org> -+ -+ Fix Savannah bug #41869. -+ -+ This works around a problem with HarfBuzz (<= 0.9.26), which doesn't -+ validate glyph indices returned by -+ `hb_ot_layout_lookup_collect_glyphs'. -+ -+ * src/autofit/hbshim.c (af_get_coverage): Guard `idx'. -+ -+ * docs/CHANGES: Updated. -+ -+2014-03-14 Werner Lemberg <wl@gnu.org> -+ -+ * builds/unix/configure.raw: Don't show error messages of `which'. -+ -+2014-03-09 Alan Coopersmith <alan.coopersmith@oracle.com> -+ -+ Fix cppcheck 1.64 warning. -+ -+ * src/autofit/afglobal.c (af_face_globals_new): Catch NULL pointer -+ dereference in case of error. -+ -+2014-03-09 Sean McBride <sean@rogue-research.com> -+ -+ * src/sfnt/ttcmap.c (tt_face_build_cmaps): Remove clang warning. -+ - 2014-03-06 Werner Lemberg <wl@gnu.org> - - * Version 2.5.3 released. -diff --git a/builds/mac/freetype-Info.plist b/builds/mac/freetype-Info.plist -new file mode 100644 -index 0000000..b3d114d ---- /dev/null -+++ b/builds/mac/freetype-Info.plist -@@ -0,0 +1,36 @@ -+<?xml version="1.0" encoding="UTF-8"?> -+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" -+ "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -+ -+<plist version="1.0"> -+ -+<dict> -+ <key>CFBundleDevelopmentRegion</key> -+ <string>English</string> -+ -+ <key>CFBundleExecutable</key> -+ <string>FreeType</string> -+ -+ <key>CFBundleGetInfoString</key> -+ <string>FreeType ${PROJECT_VERSION}</string> -+ -+ <key>CFBundleInfoDictionaryVersion</key> -+ <string>6.0</string> -+ -+ <key>CFBundleName</key> -+ <string>FreeType</string> -+ -+ <key>CFBundlePackageType</key> -+ <string>FMWK</string> -+ -+ <key>CFBundleShortVersionString</key> -+ <string>${PROJECT_VERSION}</string> -+ -+ <key>CFBundleSignature</key> -+ <string>????</string> -+ -+ <key>CFBundleVersion</key> -+ <string>${PROJECT_VERSION}</string> -+</dict> -+ -+</plist> -diff --git a/builds/unix/configure.raw b/builds/unix/configure.raw -index dd7e576..8a17ffe 100644 ---- a/builds/unix/configure.raw -+++ b/builds/unix/configure.raw -@@ -437,7 +437,7 @@ if test x"$with_png" = xyes -o x"$with_png" = xauto; then - else - # fall back to config script. - AC_MSG_CHECKING([for libpng-config]) -- if which libpng-config > /dev/null; then -+ if which libpng-config > /dev/null 2>&1; then - LIBPNG_CFLAGS=`libpng-config --cflags` - LIBPNG_LIBS=`libpng-config --ldflags` - libpng_libpriv=`libpng-config --static --ldflags` -@@ -656,7 +656,7 @@ else - fi - - --# Whether to use FileManager which is deprecated since Mac OS X 10.4. -+# Whether to use FileManager, which is deprecated since Mac OS X 10.4. - - AC_ARG_WITH([fsspec], - AS_HELP_STRING([--with-fsspec], -@@ -765,7 +765,7 @@ elif test x$with_old_mac_fonts = xyes -a x$with_fsref != x; then - fi - - --# Whether to use QuickDraw API in ToolBox which is deprecated since -+# Whether to use QuickDraw API in ToolBox, which is deprecated since - # Mac OS X 10.4. - - AC_ARG_WITH([quickdraw-toolbox], -@@ -807,7 +807,7 @@ elif test x$with_old_mac_fonts = xyes -a x$with_quickdraw_toolbox != x; then - fi - - --# Whether to use QuickDraw API in Carbon which is deprecated since -+# Whether to use QuickDraw API in Carbon, which is deprecated since - # Mac OS X 10.4. - - AC_ARG_WITH([quickdraw-carbon], -@@ -937,21 +937,6 @@ LIBS_PRIVATE=`echo "$LIBS_PRIVATE" \ - -e 's/ *$//' \ - -e 's/ */ /g'` - --LIBS_CONFIG="-lfreetype \ -- $ZLIB_LIBS \ -- $BZIP2_LIBS \ -- $LIBPNG_LIBS \ -- $HARFBUZZ_LIBS \ -- $ft2_extra_libs" --# remove -L/usr/lib and -L/usr/lib64 since `freetype-config' adds them later --# on if necessary; also beautify --LIBS_CONFIG=`echo "$LIBS_CONFIG" \ -- | sed -e 's|-L */usr/lib64/* | |g' \ -- -e 's|-L */usr/lib/* | |g' \ -- -e 's/^ *//' \ -- -e 's/ *$//' \ -- -e 's/ */ /g'` -- - LIBSSTATIC_CONFIG="-lfreetype \ - $zlib_libstaticconf \ - $bzip2_libstaticconf \ -@@ -971,7 +956,6 @@ LIBSSTATIC_CONFIG=`echo "$LIBSSTATIC_CONFIG" \ - AC_SUBST([ftmac_c]) - AC_SUBST([REQUIRES_PRIVATE]) - AC_SUBST([LIBS_PRIVATE]) --AC_SUBST([LIBS_CONFIG]) - AC_SUBST([LIBSSTATIC_CONFIG]) - - AC_SUBST([hardcode_libdir_flag_spec]) -diff --git a/builds/unix/freetype-config.in b/builds/unix/freetype-config.in -index 41c3a88..ebc311f 100644 ---- a/builds/unix/freetype-config.in -+++ b/builds/unix/freetype-config.in -@@ -142,7 +142,7 @@ if test "$echo_cflags" = "yes" ; then - fi - - if test "$echo_libs" = "yes" ; then -- libs="%LIBS_CONFIG%" -+ libs="-lfreetype" - staticlibs="%LIBSSTATIC_CONFIG%" - if test "$show_static" = "yes" ; then - libs="$staticlibs" -diff --git a/builds/unix/freetype2.in b/builds/unix/freetype2.in -index 6e7fb10..a488d96 100644 ---- a/builds/unix/freetype2.in -+++ b/builds/unix/freetype2.in -@@ -1,7 +1,7 @@ --prefix="%prefix%" --exec_prefix="%exec_prefix%" --libdir="%libdir%" --includedir="%includedir%/freetype2" -+prefix=%prefix% -+exec_prefix=%exec_prefix% -+libdir=%libdir% -+includedir=%includedir%/freetype2 - - Name: FreeType 2 - URL: http://freetype.org -diff --git a/builds/unix/freetype2.m4 b/builds/unix/freetype2.m4 -index 3d0ecb3..3a806d9 100644 ---- a/builds/unix/freetype2.m4 -+++ b/builds/unix/freetype2.m4 -@@ -1,7 +1,7 @@ - # Configure paths for FreeType2 - # Marcelo Magallon 2001-10-26, based on gtk.m4 by Owen Taylor - # --# Copyright 2001, 2003, 2007, 2009 by -+# Copyright 2001, 2003, 2007, 2009, 2014 by - # David Turner, Robert Wilhelm, and Werner Lemberg. - # - # This file is part of the FreeType project, and may only be used, modified, -@@ -15,7 +15,7 @@ - # generated by Autoconf, under the same distribution terms as the rest of - # that program. - # --# serial 3 -+# serial 4 - - # AC_CHECK_FT2([MINIMUM-VERSION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) - # Test for FreeType 2, and define FT2_CFLAGS and FT2_LIBS. -@@ -61,7 +61,7 @@ AC_DEFUN([AC_CHECK_FT2], - fi - - if test "x$FT2_CONFIG" = x ; then -- AC_PATH_PROG([FT2_CONFIG], [freetype-config], [no]) -+ AC_PATH_TOOL([FT2_CONFIG], [freetype-config], [no]) - fi - - min_ft_version=m4_if([$1], [], [7.0.1], [$1]) -diff --git a/builds/unix/ftconfig.in b/builds/unix/ftconfig.in -index 2cf6708..e66f3ea 100644 ---- a/builds/unix/ftconfig.in -+++ b/builds/unix/ftconfig.in -@@ -296,7 +296,16 @@ FT_BEGIN_HEADER - #define FT_INT64 long - #define FT_UINT64 unsigned long - --#elif defined( _MSC_VER ) && _MSC_VER >= 900 /* Visual C++ (and Intel C++) */ -+ /*************************************************************************/ -+ /* */ -+ /* A 64-bit data type may create compilation problems if you compile */ -+ /* in strict ANSI mode. To avoid them, we disable other 64-bit data */ -+ /* types if __STDC__ is defined. You can however ignore this rule */ -+ /* by defining the FT_CONFIG_OPTION_FORCE_INT64 configuration macro. */ -+ /* */ -+#elif !defined( __STDC__ ) || defined( FT_CONFIG_OPTION_FORCE_INT64 ) -+ -+#if defined( _MSC_VER ) && _MSC_VER >= 900 /* Visual C++ (and Intel C++) */ - - /* this compiler provides the __int64 type */ - #define FT_LONG64 -@@ -330,30 +339,9 @@ FT_BEGIN_HEADER - #define FT_INT64 long long int - #define FT_UINT64 unsigned long long int - --#endif /* FT_SIZEOF_LONG == 8 */ -- -- -- /*************************************************************************/ -- /* */ -- /* A 64-bit data type will create compilation problems if you compile */ -- /* in strict ANSI mode. To avoid them, we disable its use if __STDC__ */ -- /* is defined. You can however ignore this rule by defining the */ -- /* FT_CONFIG_OPTION_FORCE_INT64 configuration macro. */ -- /* */ --#if defined( FT_LONG64 ) && !defined( FT_CONFIG_OPTION_FORCE_INT64 ) -- --#ifdef __STDC__ -- -- /* Undefine the 64-bit macros in strict ANSI compilation mode. */ -- /* Since `#undef' doesn't survive in configuration header files */ -- /* we use the postprocessing facility of AC_CONFIG_HEADERS to */ -- /* replace the leading `/' with `#'. */ --/undef FT_LONG64 --/undef FT_INT64 -- --#endif /* __STDC__ */ -+#endif /* _MSC_VER */ - --#endif /* FT_LONG64 && !FT_CONFIG_OPTION_FORCE_INT64 */ -+#endif /* FT_SIZEOF_LONG == 8 */ - - #ifdef FT_LONG64 - typedef FT_INT64 FT_Int64; -@@ -366,219 +354,6 @@ FT_BEGIN_HEADER - #define FT_DUMMY_STMNT FT_BEGIN_STMNT FT_END_STMNT - - --#ifndef FT_CONFIG_OPTION_NO_ASSEMBLER -- /* Provide assembler fragments for performance-critical functions. */ -- /* These must be defined `static __inline__' with GCC. */ -- --#if defined( __CC_ARM ) || defined( __ARMCC__ ) /* RVCT */ -- --#define FT_MULFIX_ASSEMBLER FT_MulFix_arm -- -- /* documentation is in freetype.h */ -- -- static __inline FT_Int32 -- FT_MulFix_arm( FT_Int32 a, -- FT_Int32 b ) -- { -- register FT_Int32 t, t2; -- -- -- __asm -- { -- smull t2, t, b, a /* (lo=t2,hi=t) = a*b */ -- mov a, t, asr #31 /* a = (hi >> 31) */ -- add a, a, #0x8000 /* a += 0x8000 */ -- adds t2, t2, a /* t2 += a */ -- adc t, t, #0 /* t += carry */ -- mov a, t2, lsr #16 /* a = t2 >> 16 */ -- orr a, a, t, lsl #16 /* a |= t << 16 */ -- } -- return a; -- } -- --#endif /* __CC_ARM || __ARMCC__ */ -- -- --#ifdef __GNUC__ -- --#if defined( __arm__ ) && \ -- ( !defined( __thumb__ ) || defined( __thumb2__ ) ) && \ -- !( defined( __CC_ARM ) || defined( __ARMCC__ ) ) -- --#define FT_MULFIX_ASSEMBLER FT_MulFix_arm -- -- /* documentation is in freetype.h */ -- -- static __inline__ FT_Int32 -- FT_MulFix_arm( FT_Int32 a, -- FT_Int32 b ) -- { -- register FT_Int32 t, t2; -- -- -- __asm__ __volatile__ ( -- "smull %1, %2, %4, %3\n\t" /* (lo=%1,hi=%2) = a*b */ -- "mov %0, %2, asr #31\n\t" /* %0 = (hi >> 31) */ --#if defined( __clang__ ) && defined( __thumb2__ ) -- "add.w %0, %0, #0x8000\n\t" /* %0 += 0x8000 */ --#else -- "add %0, %0, #0x8000\n\t" /* %0 += 0x8000 */ --#endif -- "adds %1, %1, %0\n\t" /* %1 += %0 */ -- "adc %2, %2, #0\n\t" /* %2 += carry */ -- "mov %0, %1, lsr #16\n\t" /* %0 = %1 >> 16 */ -- "orr %0, %0, %2, lsl #16\n\t" /* %0 |= %2 << 16 */ -- : "=r"(a), "=&r"(t2), "=&r"(t) -- : "r"(a), "r"(b) -- : "cc" ); -- return a; -- } -- --#endif /* __arm__ && */ -- /* ( __thumb2__ || !__thumb__ ) && */ -- /* !( __CC_ARM || __ARMCC__ ) */ -- -- --#if defined( __i386__ ) -- --#define FT_MULFIX_ASSEMBLER FT_MulFix_i386 -- -- /* documentation is in freetype.h */ -- -- static __inline__ FT_Int32 -- FT_MulFix_i386( FT_Int32 a, -- FT_Int32 b ) -- { -- register FT_Int32 result; -- -- -- __asm__ __volatile__ ( -- "imul %%edx\n" -- "movl %%edx, %%ecx\n" -- "sarl $31, %%ecx\n" -- "addl $0x8000, %%ecx\n" -- "addl %%ecx, %%eax\n" -- "adcl $0, %%edx\n" -- "shrl $16, %%eax\n" -- "shll $16, %%edx\n" -- "addl %%edx, %%eax\n" -- : "=a"(result), "=d"(b) -- : "a"(a), "d"(b) -- : "%ecx", "cc" ); -- return result; -- } -- --#endif /* i386 */ -- --#endif /* __GNUC__ */ -- -- --#ifdef _MSC_VER /* Visual C++ */ -- --#ifdef _M_IX86 -- --#define FT_MULFIX_ASSEMBLER FT_MulFix_i386 -- -- /* documentation is in freetype.h */ -- -- static __inline FT_Int32 -- FT_MulFix_i386( FT_Int32 a, -- FT_Int32 b ) -- { -- register FT_Int32 result; -- -- __asm -- { -- mov eax, a -- mov edx, b -- imul edx -- mov ecx, edx -- sar ecx, 31 -- add ecx, 8000h -- add eax, ecx -- adc edx, 0 -- shr eax, 16 -- shl edx, 16 -- add eax, edx -- mov result, eax -- } -- return result; -- } -- --#endif /* _M_IX86 */ -- --#endif /* _MSC_VER */ -- -- --#if defined( __GNUC__ ) && defined( __x86_64__ ) -- --#define FT_MULFIX_ASSEMBLER FT_MulFix_x86_64 -- -- static __inline__ FT_Int32 -- FT_MulFix_x86_64( FT_Int32 a, -- FT_Int32 b ) -- { -- /* Temporarily disable the warning that C90 doesn't support */ -- /* `long long'. */ --#if ( __GNUC__ > 4 ) || ( ( __GNUC__ == 4 ) && ( __GNUC_MINOR__ >= 6 ) ) --#pragma GCC diagnostic push --#pragma GCC diagnostic ignored "-Wlong-long" --#endif -- --#if 1 -- /* Technically not an assembly fragment, but GCC does a really good */ -- /* job at inlining it and generating good machine code for it. */ -- long long ret, tmp; -- -- -- ret = (long long)a * b; -- tmp = ret >> 63; -- ret += 0x8000 + tmp; -- -- return (FT_Int32)( ret >> 16 ); --#else -- -- /* For some reason, GCC 4.6 on Ubuntu 12.04 generates invalid machine */ -- /* code from the lines below. The main issue is that `wide_a' is not */ -- /* properly initialized by sign-extending `a'. Instead, the generated */ -- /* machine code assumes that the register that contains `a' on input */ -- /* can be used directly as a 64-bit value, which is wrong most of the */ -- /* time. */ -- long long wide_a = (long long)a; -- long long wide_b = (long long)b; -- long long result; -- -- -- __asm__ __volatile__ ( -- "imul %2, %1\n" -- "mov %1, %0\n" -- "sar $63, %0\n" -- "lea 0x8000(%1, %0), %0\n" -- "sar $16, %0\n" -- : "=&r"(result), "=&r"(wide_a) -- : "r"(wide_b) -- : "cc" ); -- -- return (FT_Int32)result; --#endif -- --#if ( __GNUC__ > 4 ) || ( ( __GNUC__ == 4 ) && ( __GNUC_MINOR__ >= 6 ) ) --#pragma GCC diagnostic pop --#endif -- } -- --#endif /* __GNUC__ && __x86_64__ */ -- --#endif /* !FT_CONFIG_OPTION_NO_ASSEMBLER */ -- -- --#ifdef FT_CONFIG_OPTION_INLINE_MULFIX --#ifdef FT_MULFIX_ASSEMBLER --#define FT_MULFIX_INLINED FT_MULFIX_ASSEMBLER --#endif --#endif -- -- - #ifdef FT_MAKE_OPTION_SINGLE_OBJECT - - #define FT_LOCAL( x ) static x -diff --git a/builds/unix/unix-def.in b/builds/unix/unix-def.in -index 35ea9c8..4c06a05 100644 ---- a/builds/unix/unix-def.in -+++ b/builds/unix/unix-def.in -@@ -64,7 +64,6 @@ version_info := @version_info@ - # - REQUIRES_PRIVATE := @REQUIRES_PRIVATE@ - LIBS_PRIVATE := @LIBS_PRIVATE@ --LIBS_CONFIG := @LIBS_CONFIG@ - LIBSSTATIC_CONFIG := @LIBSSTATIC_CONFIG@ - build_libtool_libs := @build_libtool_libs@ - ft_version := @ft_version@ -@@ -102,8 +101,7 @@ NO_OUTPUT := 2> /dev/null - - $(OBJ_BUILD)/freetype-config: $(TOP_DIR)/builds/unix/freetype-config.in - rm -f $@ $@.tmp -- sed -e 's|%LIBS_CONFIG%|$(LIBS_CONFIG)|' \ -- -e 's|%LIBSSTATIC_CONFIG%|$(LIBSSTATIC_CONFIG)|' \ -+ sed -e 's|%LIBSSTATIC_CONFIG%|$(LIBSSTATIC_CONFIG)|' \ - -e 's|%build_libtool_libs%|$(build_libtool_libs)|' \ - -e 's|%exec_prefix%|$(exec_prefix)|' \ - -e 's|%ft_version%|$(ft_version)|' \ -@@ -116,16 +114,29 @@ $(OBJ_BUILD)/freetype-config: $(TOP_DIR)/builds/unix/freetype-config.in - chmod a-w $@.tmp - mv $@.tmp $@ - -+# To support directory names with spaces (as might easily happen on Windows -+# platforms), the right solution would be to surround the pkg-variables in -+# `freetype2.pc' with double quotes. However, doing so ironically disables -+# the prefix override mechanism especially written for Windows. This is a -+# bug in pkg-config version 0.28 and earlier. -+# -+# For this reason, we escape spaces with backslashes. -+ -+exec_prefix_x := $(subst $(space),\\$(space),$(exec_prefix)) -+includedir_x := $(subst $(space),\\$(space),$(includedir)) -+libdir_x := $(subst $(space),\\$(space),$(libdir)) -+prefix_x := $(subst $(space),\\$(space),$(prefix)) -+ - $(OBJ_BUILD)/freetype2.pc: $(TOP_DIR)/builds/unix/freetype2.in - rm -f $@ $@.tmp - sed -e 's|%REQUIRES_PRIVATE%|$(REQUIRES_PRIVATE)|' \ - -e 's|%LIBS_PRIVATE%|$(LIBS_PRIVATE)|' \ - -e 's|%build_libtool_libs%|$(build_libtool_libs)|' \ -- -e 's|%exec_prefix%|$(exec_prefix)|' \ -+ -e 's|%exec_prefix%|$(exec_prefix_x)|' \ - -e 's|%ft_version%|$(ft_version)|' \ -- -e 's|%includedir%|$(includedir)|' \ -- -e 's|%libdir%|$(libdir)|' \ -- -e 's|%prefix%|$(prefix)|' \ -+ -e 's|%includedir%|$(includedir_x)|' \ -+ -e 's|%libdir%|$(libdir_x)|' \ -+ -e 's|%prefix%|$(prefix_x)|' \ - $< \ - > $@.tmp - chmod a-w $@.tmp -diff --git a/builds/vms/ftconfig.h b/builds/vms/ftconfig.h -index 3fb8f84..b309651 100644 ---- a/builds/vms/ftconfig.h -+++ b/builds/vms/ftconfig.h -@@ -4,7 +4,7 @@ - /* */ - /* VMS-specific configuration file (specification only). */ - /* */ --/* Copyright 1996-2004, 2006-2008, 2011, 2013 by */ -+/* Copyright 1996-2004, 2006-2008, 2011, 2013, 2014 by */ - /* David Turner, Robert Wilhelm, and Werner Lemberg. */ - /* */ - /* This file is part of the FreeType project, and may only be used, */ -@@ -239,7 +239,16 @@ FT_BEGIN_HEADER - #define FT_INT64 long - #define FT_UINT64 unsigned long - --#elif defined( _MSC_VER ) && _MSC_VER >= 900 /* Visual C++ (and Intel C++) */ -+ /*************************************************************************/ -+ /* */ -+ /* A 64-bit data type may create compilation problems if you compile */ -+ /* in strict ANSI mode. To avoid them, we disable other 64-bit data */ -+ /* types if __STDC__ is defined. You can however ignore this rule */ -+ /* by defining the FT_CONFIG_OPTION_FORCE_INT64 configuration macro. */ -+ /* */ -+#elif !defined( __STDC__ ) || defined( FT_CONFIG_OPTION_FORCE_INT64 ) -+ -+#if defined( _MSC_VER ) && _MSC_VER >= 900 /* Visual C++ (and Intel C++) */ - - /* this compiler provides the __int64 type */ - #define FT_LONG64 -@@ -273,27 +282,9 @@ FT_BEGIN_HEADER - #define FT_INT64 long long int - #define FT_UINT64 unsigned long long int - --#endif /* FT_SIZEOF_LONG == (64 / FT_CHAR_BIT) */ -- -- -- /*************************************************************************/ -- /* */ -- /* A 64-bit data type will create compilation problems if you compile */ -- /* in strict ANSI mode. To avoid them, we disable its use if __STDC__ */ -- /* is defined. You can however ignore this rule by defining the */ -- /* FT_CONFIG_OPTION_FORCE_INT64 configuration macro. */ -- /* */ --#if defined( FT_LONG64 ) && !defined( FT_CONFIG_OPTION_FORCE_INT64 ) -- --#ifdef __STDC__ -- -- /* undefine the 64-bit macros in strict ANSI compilation mode */ --#undef FT_LONG64 --#undef FT_INT64 -- --#endif /* __STDC__ */ -+#endif /* _MSC_VER */ - --#endif /* FT_LONG64 && !FT_CONFIG_OPTION_FORCE_INT64 */ -+#endif /* FT_SIZEOF_LONG == (64 / FT_CHAR_BIT) */ - - #ifdef FT_LONG64 - typedef FT_INT64 FT_Int64; -@@ -306,215 +297,6 @@ FT_BEGIN_HEADER - #define FT_DUMMY_STMNT FT_BEGIN_STMNT FT_END_STMNT - - --#ifndef FT_CONFIG_OPTION_NO_ASSEMBLER -- /* Provide assembler fragments for performance-critical functions. */ -- /* These must be defined `static __inline__' with GCC. */ -- --#if defined( __CC_ARM ) || defined( __ARMCC__ ) /* RVCT */ -- --#define FT_MULFIX_ASSEMBLER FT_MulFix_arm -- -- /* documentation is in freetype.h */ -- -- static __inline FT_Int32 -- FT_MulFix_arm( FT_Int32 a, -- FT_Int32 b ) -- { -- register FT_Int32 t, t2; -- -- -- __asm -- { -- smull t2, t, b, a /* (lo=t2,hi=t) = a*b */ -- mov a, t, asr #31 /* a = (hi >> 31) */ -- add a, a, #0x8000 /* a += 0x8000 */ -- adds t2, t2, a /* t2 += a */ -- adc t, t, #0 /* t += carry */ -- mov a, t2, lsr #16 /* a = t2 >> 16 */ -- orr a, a, t, lsl #16 /* a |= t << 16 */ -- } -- return a; -- } -- --#endif /* __CC_ARM || __ARMCC__ */ -- -- --#ifdef __GNUC__ -- --#if defined( __arm__ ) && \ -- ( !defined( __thumb__ ) || defined( __thumb2__ ) ) && \ -- !( defined( __CC_ARM ) || defined( __ARMCC__ ) ) -- --#define FT_MULFIX_ASSEMBLER FT_MulFix_arm -- -- /* documentation is in freetype.h */ -- -- static __inline__ FT_Int32 -- FT_MulFix_arm( FT_Int32 a, -- FT_Int32 b ) -- { -- register FT_Int32 t, t2; -- -- -- __asm__ __volatile__ ( -- "smull %1, %2, %4, %3\n\t" /* (lo=%1,hi=%2) = a*b */ -- "mov %0, %2, asr #31\n\t" /* %0 = (hi >> 31) */ -- "add %0, %0, #0x8000\n\t" /* %0 += 0x8000 */ -- "adds %1, %1, %0\n\t" /* %1 += %0 */ -- "adc %2, %2, #0\n\t" /* %2 += carry */ -- "mov %0, %1, lsr #16\n\t" /* %0 = %1 >> 16 */ -- "orr %0, %0, %2, lsl #16\n\t" /* %0 |= %2 << 16 */ -- : "=r"(a), "=&r"(t2), "=&r"(t) -- : "r"(a), "r"(b) -- : "cc" ); -- return a; -- } -- --#endif /* __arm__ && */ -- /* ( __thumb2__ || !__thumb__ ) && */ -- /* !( __CC_ARM || __ARMCC__ ) */ -- -- --#if defined( __i386__ ) -- --#define FT_MULFIX_ASSEMBLER FT_MulFix_i386 -- -- /* documentation is in freetype.h */ -- -- static __inline__ FT_Int32 -- FT_MulFix_i386( FT_Int32 a, -- FT_Int32 b ) -- { -- register FT_Int32 result; -- -- -- __asm__ __volatile__ ( -- "imul %%edx\n" -- "movl %%edx, %%ecx\n" -- "sarl $31, %%ecx\n" -- "addl $0x8000, %%ecx\n" -- "addl %%ecx, %%eax\n" -- "adcl $0, %%edx\n" -- "shrl $16, %%eax\n" -- "shll $16, %%edx\n" -- "addl %%edx, %%eax\n" -- : "=a"(result), "=d"(b) -- : "a"(a), "d"(b) -- : "%ecx", "cc" ); -- return result; -- } -- --#endif /* i386 */ -- --#endif /* __GNUC__ */ -- -- --#ifdef _MSC_VER /* Visual C++ */ -- --#ifdef _M_IX86 -- --#define FT_MULFIX_ASSEMBLER FT_MulFix_i386 -- -- /* documentation is in freetype.h */ -- -- static __inline FT_Int32 -- FT_MulFix_i386( FT_Int32 a, -- FT_Int32 b ) -- { -- register FT_Int32 result; -- -- __asm -- { -- mov eax, a -- mov edx, b -- imul edx -- mov ecx, edx -- sar ecx, 31 -- add ecx, 8000h -- add eax, ecx -- adc edx, 0 -- shr eax, 16 -- shl edx, 16 -- add eax, edx -- mov result, eax -- } -- return result; -- } -- --#endif /* _M_IX86 */ -- --#endif /* _MSC_VER */ -- -- --#if defined( __GNUC__ ) && defined( __x86_64__ ) -- --#define FT_MULFIX_ASSEMBLER FT_MulFix_x86_64 -- -- static __inline__ FT_Int32 -- FT_MulFix_x86_64( FT_Int32 a, -- FT_Int32 b ) -- { -- /* Temporarily disable the warning that C90 doesn't support */ -- /* `long long'. */ --#if ( __GNUC__ > 4 ) || ( ( __GNUC__ == 4 ) && ( __GNUC_MINOR__ >= 6 ) ) --#pragma GCC diagnostic push --#pragma GCC diagnostic ignored "-Wlong-long" --#endif -- --#if 1 -- /* Technically not an assembly fragment, but GCC does a really good */ -- /* job at inlining it and generating good machine code for it. */ -- long long ret, tmp; -- -- -- ret = (long long)a * b; -- tmp = ret >> 63; -- ret += 0x8000 + tmp; -- -- return (FT_Int32)( ret >> 16 ); --#else -- -- /* For some reason, GCC 4.6 on Ubuntu 12.04 generates invalid machine */ -- /* code from the lines below. The main issue is that `wide_a' is not */ -- /* properly initialized by sign-extending `a'. Instead, the generated */ -- /* machine code assumes that the register that contains `a' on input */ -- /* can be used directly as a 64-bit value, which is wrong most of the */ -- /* time. */ -- long long wide_a = (long long)a; -- long long wide_b = (long long)b; -- long long result; -- -- -- __asm__ __volatile__ ( -- "imul %2, %1\n" -- "mov %1, %0\n" -- "sar $63, %0\n" -- "lea 0x8000(%1, %0), %0\n" -- "sar $16, %0\n" -- : "=&r"(result), "=&r"(wide_a) -- : "r"(wide_b) -- : "cc" ); -- -- return (FT_Int32)result; --#endif -- --#if ( __GNUC__ > 4 ) || ( ( __GNUC__ == 4 ) && ( __GNUC_MINOR__ >= 6 ) ) --#pragma GCC diagnostic pop --#endif -- } -- --#endif /* __GNUC__ && __x86_64__ */ -- --#endif /* !FT_CONFIG_OPTION_NO_ASSEMBLER */ -- -- --#ifdef FT_CONFIG_OPTION_INLINE_MULFIX --#ifdef FT_MULFIX_ASSEMBLER --#define FT_MULFIX_INLINED FT_MULFIX_ASSEMBLER --#endif --#endif -- -- - #ifdef FT_MAKE_OPTION_SINGLE_OBJECT - - #define FT_LOCAL( x ) static x -diff --git a/docs/CHANGES b/docs/CHANGES -index 803f02d..51b829c 100644 ---- a/docs/CHANGES -+++ b/docs/CHANGES -@@ -1,11 +1,40 @@ - -+CHANGES BETWEEN 2.5.3 and 2.5.4 -+ -+ I. IMPORTANT BUG FIXES -+ -+ - The new auto-hinter code using HarfBuzz crashed for some invalid -+ fonts. -+ -+ -+ II. IMPORTANT CHANGES -+ -+ - Full auto-hinter support of the Devanagari script. -+ -+ -+ III. MISCELLANEOUS -+ -+ - Improvements to the auto-hinter's algorithm to recognize stems -+ and local extrema. -+ -+ - Function `FT_Get_SubGlyph_Info' always returned an error even in -+ case of success. -+ -+ - Version 2.5.1 introduced major bugs in the cjk part of the -+ auto-hinter, which are now fixed. -+ -+ - `cmake' now supports a build of FreeType as an OS X framework. -+ -+ -+====================================================================== -+ - CHANGES BETWEEN 2.5.2 and 2.5.3 - - I. IMPORTANT BUG FIXES - -- - A vulnerability was identified and fixed in the new CFF driver -- (cf. http://savannah.nongnu.org/bugs/?41697; it doesn't have a -- CVE number yet). All users should upgrade. -+ - A vulnerability (CVE-2014-2240) was identified and fixed in the -+ new CFF driver (cf. http://savannah.nongnu.org/bugs/?41697). -+ All users should upgrade. - - - More bug fixes related to correct positioning of composite - glyphs. -@@ -261,6 +290,9 @@ CHANGES BETWEEN 2.4.12 and 2.5 - it accepts a new command line option `-H' to select the hinting - engine. - -+ - `ftdump's verbose option has been renamed to `-V'. For all demo -+ programs, `-v' now shows version information. -+ - - Another round of TrueType subpixel hinting fixes. - - - The `apinames' tool can now create an import file for NetWare. -diff --git a/include/config/ftconfig.h b/include/config/ftconfig.h -index d98a311..22d70fd 100644 ---- a/include/config/ftconfig.h -+++ b/include/config/ftconfig.h -@@ -266,7 +266,16 @@ FT_BEGIN_HEADER - #define FT_INT64 long - #define FT_UINT64 unsigned long - --#elif defined( _MSC_VER ) && _MSC_VER >= 900 /* Visual C++ (and Intel C++) */ -+ /*************************************************************************/ -+ /* */ -+ /* A 64-bit data type may create compilation problems if you compile */ -+ /* in strict ANSI mode. To avoid them, we disable other 64-bit data */ -+ /* types if __STDC__ is defined. You can however ignore this rule */ -+ /* by defining the FT_CONFIG_OPTION_FORCE_INT64 configuration macro. */ -+ /* */ -+#elif !defined( __STDC__ ) || defined( FT_CONFIG_OPTION_FORCE_INT64 ) -+ -+#if defined( _MSC_VER ) && _MSC_VER >= 900 /* Visual C++ (and Intel C++) */ - - /* this compiler provides the __int64 type */ - #define FT_LONG64 -@@ -300,27 +309,9 @@ FT_BEGIN_HEADER - #define FT_INT64 long long int - #define FT_UINT64 unsigned long long int - --#endif /* FT_SIZEOF_LONG == (64 / FT_CHAR_BIT) */ -- -- -- /*************************************************************************/ -- /* */ -- /* A 64-bit data type will create compilation problems if you compile */ -- /* in strict ANSI mode. To avoid them, we disable its use if __STDC__ */ -- /* is defined. You can however ignore this rule by defining the */ -- /* FT_CONFIG_OPTION_FORCE_INT64 configuration macro. */ -- /* */ --#if defined( FT_LONG64 ) && !defined( FT_CONFIG_OPTION_FORCE_INT64 ) -- --#ifdef __STDC__ -- -- /* undefine the 64-bit macros in strict ANSI compilation mode */ --#undef FT_LONG64 --#undef FT_INT64 -- --#endif /* __STDC__ */ -+#endif /* _MSC_VER */ - --#endif /* FT_LONG64 && !FT_CONFIG_OPTION_FORCE_INT64 */ -+#endif /* FT_SIZEOF_LONG == (64 / FT_CHAR_BIT) */ - - #ifdef FT_LONG64 - typedef FT_INT64 FT_Int64; -@@ -333,219 +324,6 @@ FT_BEGIN_HEADER - #define FT_DUMMY_STMNT FT_BEGIN_STMNT FT_END_STMNT - - --#ifndef FT_CONFIG_OPTION_NO_ASSEMBLER -- /* Provide assembler fragments for performance-critical functions. */ -- /* These must be defined `static __inline__' with GCC. */ -- --#if defined( __CC_ARM ) || defined( __ARMCC__ ) /* RVCT */ -- --#define FT_MULFIX_ASSEMBLER FT_MulFix_arm -- -- /* documentation is in freetype.h */ -- -- static __inline FT_Int32 -- FT_MulFix_arm( FT_Int32 a, -- FT_Int32 b ) -- { -- register FT_Int32 t, t2; -- -- -- __asm -- { -- smull t2, t, b, a /* (lo=t2,hi=t) = a*b */ -- mov a, t, asr #31 /* a = (hi >> 31) */ -- add a, a, #0x8000 /* a += 0x8000 */ -- adds t2, t2, a /* t2 += a */ -- adc t, t, #0 /* t += carry */ -- mov a, t2, lsr #16 /* a = t2 >> 16 */ -- orr a, a, t, lsl #16 /* a |= t << 16 */ -- } -- return a; -- } -- --#endif /* __CC_ARM || __ARMCC__ */ -- -- --#ifdef __GNUC__ -- --#if defined( __arm__ ) && \ -- ( !defined( __thumb__ ) || defined( __thumb2__ ) ) && \ -- !( defined( __CC_ARM ) || defined( __ARMCC__ ) ) -- --#define FT_MULFIX_ASSEMBLER FT_MulFix_arm -- -- /* documentation is in freetype.h */ -- -- static __inline__ FT_Int32 -- FT_MulFix_arm( FT_Int32 a, -- FT_Int32 b ) -- { -- register FT_Int32 t, t2; -- -- -- __asm__ __volatile__ ( -- "smull %1, %2, %4, %3\n\t" /* (lo=%1,hi=%2) = a*b */ -- "mov %0, %2, asr #31\n\t" /* %0 = (hi >> 31) */ --#if defined( __clang__ ) && defined( __thumb2__ ) -- "add.w %0, %0, #0x8000\n\t" /* %0 += 0x8000 */ --#else -- "add %0, %0, #0x8000\n\t" /* %0 += 0x8000 */ --#endif -- "adds %1, %1, %0\n\t" /* %1 += %0 */ -- "adc %2, %2, #0\n\t" /* %2 += carry */ -- "mov %0, %1, lsr #16\n\t" /* %0 = %1 >> 16 */ -- "orr %0, %0, %2, lsl #16\n\t" /* %0 |= %2 << 16 */ -- : "=r"(a), "=&r"(t2), "=&r"(t) -- : "r"(a), "r"(b) -- : "cc" ); -- return a; -- } -- --#endif /* __arm__ && */ -- /* ( __thumb2__ || !__thumb__ ) && */ -- /* !( __CC_ARM || __ARMCC__ ) */ -- -- --#if defined( __i386__ ) -- --#define FT_MULFIX_ASSEMBLER FT_MulFix_i386 -- -- /* documentation is in freetype.h */ -- -- static __inline__ FT_Int32 -- FT_MulFix_i386( FT_Int32 a, -- FT_Int32 b ) -- { -- register FT_Int32 result; -- -- -- __asm__ __volatile__ ( -- "imul %%edx\n" -- "movl %%edx, %%ecx\n" -- "sarl $31, %%ecx\n" -- "addl $0x8000, %%ecx\n" -- "addl %%ecx, %%eax\n" -- "adcl $0, %%edx\n" -- "shrl $16, %%eax\n" -- "shll $16, %%edx\n" -- "addl %%edx, %%eax\n" -- : "=a"(result), "=d"(b) -- : "a"(a), "d"(b) -- : "%ecx", "cc" ); -- return result; -- } -- --#endif /* i386 */ -- --#endif /* __GNUC__ */ -- -- --#ifdef _MSC_VER /* Visual C++ */ -- --#ifdef _M_IX86 -- --#define FT_MULFIX_ASSEMBLER FT_MulFix_i386 -- -- /* documentation is in freetype.h */ -- -- static __inline FT_Int32 -- FT_MulFix_i386( FT_Int32 a, -- FT_Int32 b ) -- { -- register FT_Int32 result; -- -- __asm -- { -- mov eax, a -- mov edx, b -- imul edx -- mov ecx, edx -- sar ecx, 31 -- add ecx, 8000h -- add eax, ecx -- adc edx, 0 -- shr eax, 16 -- shl edx, 16 -- add eax, edx -- mov result, eax -- } -- return result; -- } -- --#endif /* _M_IX86 */ -- --#endif /* _MSC_VER */ -- -- --#if defined( __GNUC__ ) && defined( __x86_64__ ) -- --#define FT_MULFIX_ASSEMBLER FT_MulFix_x86_64 -- -- static __inline__ FT_Int32 -- FT_MulFix_x86_64( FT_Int32 a, -- FT_Int32 b ) -- { -- /* Temporarily disable the warning that C90 doesn't support */ -- /* `long long'. */ --#if ( __GNUC__ > 4 ) || ( ( __GNUC__ == 4 ) && ( __GNUC_MINOR__ >= 6 ) ) --#pragma GCC diagnostic push --#pragma GCC diagnostic ignored "-Wlong-long" --#endif -- --#if 1 -- /* Technically not an assembly fragment, but GCC does a really good */ -- /* job at inlining it and generating good machine code for it. */ -- long long ret, tmp; -- -- -- ret = (long long)a * b; -- tmp = ret >> 63; -- ret += 0x8000 + tmp; -- -- return (FT_Int32)( ret >> 16 ); --#else -- -- /* For some reason, GCC 4.6 on Ubuntu 12.04 generates invalid machine */ -- /* code from the lines below. The main issue is that `wide_a' is not */ -- /* properly initialized by sign-extending `a'. Instead, the generated */ -- /* machine code assumes that the register that contains `a' on input */ -- /* can be used directly as a 64-bit value, which is wrong most of the */ -- /* time. */ -- long long wide_a = (long long)a; -- long long wide_b = (long long)b; -- long long result; -- -- -- __asm__ __volatile__ ( -- "imul %2, %1\n" -- "mov %1, %0\n" -- "sar $63, %0\n" -- "lea 0x8000(%1, %0), %0\n" -- "sar $16, %0\n" -- : "=&r"(result), "=&r"(wide_a) -- : "r"(wide_b) -- : "cc" ); -- -- return (FT_Int32)result; --#endif -- --#if ( __GNUC__ > 4 ) || ( ( __GNUC__ == 4 ) && ( __GNUC_MINOR__ >= 6 ) ) --#pragma GCC diagnostic pop --#endif -- } -- --#endif /* __GNUC__ && __x86_64__ */ -- --#endif /* !FT_CONFIG_OPTION_NO_ASSEMBLER */ -- -- --#ifdef FT_CONFIG_OPTION_INLINE_MULFIX --#ifdef FT_MULFIX_ASSEMBLER --#define FT_MULFIX_INLINED FT_MULFIX_ASSEMBLER --#endif --#endif -- -- - #ifdef FT_MAKE_OPTION_SINGLE_OBJECT - - #define FT_LOCAL( x ) static x -diff --git a/include/freetype.h b/include/freetype.h -index fb62b62..6a31502 100644 ---- a/include/freetype.h -+++ b/include/freetype.h -@@ -1592,7 +1592,6 @@ FT_BEGIN_HEADER - /* This field is only valid for the composite */ - /* glyph format that should normally only be */ - /* loaded with the @FT_LOAD_NO_RECURSE flag. */ -- /* For now this is internal to FreeType. */ - /* */ - /* subglyphs :: An array of subglyph descriptors for */ - /* composite glyphs. There are `num_subglyphs' */ -@@ -2560,14 +2559,11 @@ FT_BEGIN_HEADER - * Ignored. Deprecated. - * - * FT_LOAD_NO_RECURSE :: -- * This flag is only used internally. It merely indicates that the -- * font driver should not load composite glyphs recursively. Instead, -- * it should set the `num_subglyph' and `subglyphs' values of the -- * glyph slot accordingly, and set `glyph->format' to -- * @FT_GLYPH_FORMAT_COMPOSITE. -- * -- * The description of sub-glyphs is not available to client -- * applications for now. -+ * Indicate that the font driver should not load composite glyphs -+ * recursively. Instead, it should set the `num_subglyph' and -+ * `subglyphs' values of the glyph slot accordingly, and set -+ * `glyph->format' to @FT_GLYPH_FORMAT_COMPOSITE. The description of -+ * subglyphs can then be accessed with @FT_Get_SubGlyph_Info. - * - * This flag implies @FT_LOAD_NO_SCALE and @FT_LOAD_IGNORE_TRANSFORM. - * -@@ -3065,9 +3061,8 @@ FT_BEGIN_HEADER - /* glyph index~0 always corresponds to the `missing glyph' (called */ - /* `.notdef'). */ - /* */ -- /* This function is not compiled within the library if the config */ -- /* macro `FT_CONFIG_OPTION_NO_GLYPH_NAMES' is defined in */ -- /* `ftoptions.h'. */ -+ /* This function always returns an error if the config macro */ -+ /* `FT_CONFIG_OPTION_NO_GLYPH_NAMES' is not defined in `ftoptions.h'. */ - /* */ - FT_EXPORT( FT_Error ) - FT_Get_Glyph_Name( FT_Face face, -@@ -3767,12 +3762,6 @@ FT_BEGIN_HEADER - FT_Long c ); - - -- /* */ -- -- /* The following #if 0 ... #endif is for the documentation formatter, */ -- /* hiding the internal `FT_MULFIX_INLINED' macro. */ -- --#if 0 - /*************************************************************************/ - /* */ - /* <Function> */ -@@ -3806,17 +3795,6 @@ FT_BEGIN_HEADER - FT_MulFix( FT_Long a, - FT_Long b ); - -- /* */ --#endif -- --#ifdef FT_MULFIX_INLINED --#define FT_MulFix( a, b ) FT_MULFIX_INLINED( a, b ) --#else -- FT_EXPORT( FT_Long ) -- FT_MulFix( FT_Long a, -- FT_Long b ); --#endif -- - - /*************************************************************************/ - /* */ -@@ -3829,18 +3807,12 @@ FT_BEGIN_HEADER - /* used to divide a given value by a 16.16 fixed-point factor. */ - /* */ - /* <Input> */ -- /* a :: The first multiplier. */ -- /* b :: The second multiplier. Use a 16.16 factor here whenever */ -- /* possible (see note below). */ -+ /* a :: The numerator. */ -+ /* b :: The denominator. Use a 16.16 factor here. */ - /* */ - /* <Return> */ - /* The result of `(a*0x10000)/b'. */ - /* */ -- /* <Note> */ -- /* The optimization for FT_DivFix() is simple: If (a~<<~16) fits in */ -- /* 32~bits, then the division is computed directly. Otherwise, we */ -- /* use a specialized version of @FT_MulDiv. */ -- /* */ - FT_EXPORT( FT_Long ) - FT_DivFix( FT_Long a, - FT_Long b ); -diff --git a/include/fterrdef.h b/include/fterrdef.h -index 76c7b9e..99b2fad 100644 ---- a/include/fterrdef.h -+++ b/include/fterrdef.h -@@ -31,218 +31,218 @@ - - /* generic errors */ - -- FT_NOERRORDEF_( Ok, 0x00, \ -+ FT_NOERRORDEF_( Ok, 0x00, - "no error" ) - -- FT_ERRORDEF_( Cannot_Open_Resource, 0x01, \ -+ FT_ERRORDEF_( Cannot_Open_Resource, 0x01, - "cannot open resource" ) -- FT_ERRORDEF_( Unknown_File_Format, 0x02, \ -+ FT_ERRORDEF_( Unknown_File_Format, 0x02, - "unknown file format" ) -- FT_ERRORDEF_( Invalid_File_Format, 0x03, \ -+ FT_ERRORDEF_( Invalid_File_Format, 0x03, - "broken file" ) -- FT_ERRORDEF_( Invalid_Version, 0x04, \ -+ FT_ERRORDEF_( Invalid_Version, 0x04, - "invalid FreeType version" ) -- FT_ERRORDEF_( Lower_Module_Version, 0x05, \ -+ FT_ERRORDEF_( Lower_Module_Version, 0x05, - "module version is too low" ) -- FT_ERRORDEF_( Invalid_Argument, 0x06, \ -+ FT_ERRORDEF_( Invalid_Argument, 0x06, - "invalid argument" ) -- FT_ERRORDEF_( Unimplemented_Feature, 0x07, \ -+ FT_ERRORDEF_( Unimplemented_Feature, 0x07, - "unimplemented feature" ) -- FT_ERRORDEF_( Invalid_Table, 0x08, \ -+ FT_ERRORDEF_( Invalid_Table, 0x08, - "broken table" ) -- FT_ERRORDEF_( Invalid_Offset, 0x09, \ -+ FT_ERRORDEF_( Invalid_Offset, 0x09, - "broken offset within table" ) -- FT_ERRORDEF_( Array_Too_Large, 0x0A, \ -+ FT_ERRORDEF_( Array_Too_Large, 0x0A, - "array allocation size too large" ) -- FT_ERRORDEF_( Missing_Module, 0x0B, \ -+ FT_ERRORDEF_( Missing_Module, 0x0B, - "missing module" ) -- FT_ERRORDEF_( Missing_Property, 0x0C, \ -+ FT_ERRORDEF_( Missing_Property, 0x0C, - "missing property" ) - - /* glyph/character errors */ - -- FT_ERRORDEF_( Invalid_Glyph_Index, 0x10, \ -+ FT_ERRORDEF_( Invalid_Glyph_Index, 0x10, - "invalid glyph index" ) -- FT_ERRORDEF_( Invalid_Character_Code, 0x11, \ -+ FT_ERRORDEF_( Invalid_Character_Code, 0x11, - "invalid character code" ) -- FT_ERRORDEF_( Invalid_Glyph_Format, 0x12, \ -+ FT_ERRORDEF_( Invalid_Glyph_Format, 0x12, - "unsupported glyph image format" ) -- FT_ERRORDEF_( Cannot_Render_Glyph, 0x13, \ -+ FT_ERRORDEF_( Cannot_Render_Glyph, 0x13, - "cannot render this glyph format" ) -- FT_ERRORDEF_( Invalid_Outline, 0x14, \ -+ FT_ERRORDEF_( Invalid_Outline, 0x14, - "invalid outline" ) -- FT_ERRORDEF_( Invalid_Composite, 0x15, \ -+ FT_ERRORDEF_( Invalid_Composite, 0x15, - "invalid composite glyph" ) -- FT_ERRORDEF_( Too_Many_Hints, 0x16, \ -+ FT_ERRORDEF_( Too_Many_Hints, 0x16, - "too many hints" ) -- FT_ERRORDEF_( Invalid_Pixel_Size, 0x17, \ -+ FT_ERRORDEF_( Invalid_Pixel_Size, 0x17, - "invalid pixel size" ) - - /* handle errors */ - -- FT_ERRORDEF_( Invalid_Handle, 0x20, \ -+ FT_ERRORDEF_( Invalid_Handle, 0x20, - "invalid object handle" ) -- FT_ERRORDEF_( Invalid_Library_Handle, 0x21, \ -+ FT_ERRORDEF_( Invalid_Library_Handle, 0x21, - "invalid library handle" ) -- FT_ERRORDEF_( Invalid_Driver_Handle, 0x22, \ -+ FT_ERRORDEF_( Invalid_Driver_Handle, 0x22, - "invalid module handle" ) -- FT_ERRORDEF_( Invalid_Face_Handle, 0x23, \ -+ FT_ERRORDEF_( Invalid_Face_Handle, 0x23, - "invalid face handle" ) -- FT_ERRORDEF_( Invalid_Size_Handle, 0x24, \ -+ FT_ERRORDEF_( Invalid_Size_Handle, 0x24, - "invalid size handle" ) -- FT_ERRORDEF_( Invalid_Slot_Handle, 0x25, \ -+ FT_ERRORDEF_( Invalid_Slot_Handle, 0x25, - "invalid glyph slot handle" ) -- FT_ERRORDEF_( Invalid_CharMap_Handle, 0x26, \ -+ FT_ERRORDEF_( Invalid_CharMap_Handle, 0x26, - "invalid charmap handle" ) -- FT_ERRORDEF_( Invalid_Cache_Handle, 0x27, \ -+ FT_ERRORDEF_( Invalid_Cache_Handle, 0x27, - "invalid cache manager handle" ) -- FT_ERRORDEF_( Invalid_Stream_Handle, 0x28, \ -+ FT_ERRORDEF_( Invalid_Stream_Handle, 0x28, - "invalid stream handle" ) - - /* driver errors */ - -- FT_ERRORDEF_( Too_Many_Drivers, 0x30, \ -+ FT_ERRORDEF_( Too_Many_Drivers, 0x30, - "too many modules" ) -- FT_ERRORDEF_( Too_Many_Extensions, 0x31, \ -+ FT_ERRORDEF_( Too_Many_Extensions, 0x31, - "too many extensions" ) - - /* memory errors */ - -- FT_ERRORDEF_( Out_Of_Memory, 0x40, \ -+ FT_ERRORDEF_( Out_Of_Memory, 0x40, - "out of memory" ) -- FT_ERRORDEF_( Unlisted_Object, 0x41, \ -+ FT_ERRORDEF_( Unlisted_Object, 0x41, - "unlisted object" ) - - /* stream errors */ - -- FT_ERRORDEF_( Cannot_Open_Stream, 0x51, \ -+ FT_ERRORDEF_( Cannot_Open_Stream, 0x51, - "cannot open stream" ) -- FT_ERRORDEF_( Invalid_Stream_Seek, 0x52, \ -+ FT_ERRORDEF_( Invalid_Stream_Seek, 0x52, - "invalid stream seek" ) -- FT_ERRORDEF_( Invalid_Stream_Skip, 0x53, \ -+ FT_ERRORDEF_( Invalid_Stream_Skip, 0x53, - "invalid stream skip" ) -- FT_ERRORDEF_( Invalid_Stream_Read, 0x54, \ -+ FT_ERRORDEF_( Invalid_Stream_Read, 0x54, - "invalid stream read" ) -- FT_ERRORDEF_( Invalid_Stream_Operation, 0x55, \ -+ FT_ERRORDEF_( Invalid_Stream_Operation, 0x55, - "invalid stream operation" ) -- FT_ERRORDEF_( Invalid_Frame_Operation, 0x56, \ -+ FT_ERRORDEF_( Invalid_Frame_Operation, 0x56, - "invalid frame operation" ) -- FT_ERRORDEF_( Nested_Frame_Access, 0x57, \ -+ FT_ERRORDEF_( Nested_Frame_Access, 0x57, - "nested frame access" ) -- FT_ERRORDEF_( Invalid_Frame_Read, 0x58, \ -+ FT_ERRORDEF_( Invalid_Frame_Read, 0x58, - "invalid frame read" ) - - /* raster errors */ - -- FT_ERRORDEF_( Raster_Uninitialized, 0x60, \ -+ FT_ERRORDEF_( Raster_Uninitialized, 0x60, - "raster uninitialized" ) -- FT_ERRORDEF_( Raster_Corrupted, 0x61, \ -+ FT_ERRORDEF_( Raster_Corrupted, 0x61, - "raster corrupted" ) -- FT_ERRORDEF_( Raster_Overflow, 0x62, \ -+ FT_ERRORDEF_( Raster_Overflow, 0x62, - "raster overflow" ) -- FT_ERRORDEF_( Raster_Negative_Height, 0x63, \ -+ FT_ERRORDEF_( Raster_Negative_Height, 0x63, - "negative height while rastering" ) - - /* cache errors */ - -- FT_ERRORDEF_( Too_Many_Caches, 0x70, \ -+ FT_ERRORDEF_( Too_Many_Caches, 0x70, - "too many registered caches" ) - - /* TrueType and SFNT errors */ - -- FT_ERRORDEF_( Invalid_Opcode, 0x80, \ -+ FT_ERRORDEF_( Invalid_Opcode, 0x80, - "invalid opcode" ) -- FT_ERRORDEF_( Too_Few_Arguments, 0x81, \ -+ FT_ERRORDEF_( Too_Few_Arguments, 0x81, - "too few arguments" ) -- FT_ERRORDEF_( Stack_Overflow, 0x82, \ -+ FT_ERRORDEF_( Stack_Overflow, 0x82, - "stack overflow" ) -- FT_ERRORDEF_( Code_Overflow, 0x83, \ -+ FT_ERRORDEF_( Code_Overflow, 0x83, - "code overflow" ) -- FT_ERRORDEF_( Bad_Argument, 0x84, \ -+ FT_ERRORDEF_( Bad_Argument, 0x84, - "bad argument" ) -- FT_ERRORDEF_( Divide_By_Zero, 0x85, \ -+ FT_ERRORDEF_( Divide_By_Zero, 0x85, - "division by zero" ) -- FT_ERRORDEF_( Invalid_Reference, 0x86, \ -+ FT_ERRORDEF_( Invalid_Reference, 0x86, - "invalid reference" ) -- FT_ERRORDEF_( Debug_OpCode, 0x87, \ -+ FT_ERRORDEF_( Debug_OpCode, 0x87, - "found debug opcode" ) -- FT_ERRORDEF_( ENDF_In_Exec_Stream, 0x88, \ -+ FT_ERRORDEF_( ENDF_In_Exec_Stream, 0x88, - "found ENDF opcode in execution stream" ) -- FT_ERRORDEF_( Nested_DEFS, 0x89, \ -+ FT_ERRORDEF_( Nested_DEFS, 0x89, - "nested DEFS" ) -- FT_ERRORDEF_( Invalid_CodeRange, 0x8A, \ -+ FT_ERRORDEF_( Invalid_CodeRange, 0x8A, - "invalid code range" ) -- FT_ERRORDEF_( Execution_Too_Long, 0x8B, \ -+ FT_ERRORDEF_( Execution_Too_Long, 0x8B, - "execution context too long" ) -- FT_ERRORDEF_( Too_Many_Function_Defs, 0x8C, \ -+ FT_ERRORDEF_( Too_Many_Function_Defs, 0x8C, - "too many function definitions" ) -- FT_ERRORDEF_( Too_Many_Instruction_Defs, 0x8D, \ -+ FT_ERRORDEF_( Too_Many_Instruction_Defs, 0x8D, - "too many instruction definitions" ) -- FT_ERRORDEF_( Table_Missing, 0x8E, \ -+ FT_ERRORDEF_( Table_Missing, 0x8E, - "SFNT font table missing" ) -- FT_ERRORDEF_( Horiz_Header_Missing, 0x8F, \ -+ FT_ERRORDEF_( Horiz_Header_Missing, 0x8F, - "horizontal header (hhea) table missing" ) -- FT_ERRORDEF_( Locations_Missing, 0x90, \ -+ FT_ERRORDEF_( Locations_Missing, 0x90, - "locations (loca) table missing" ) -- FT_ERRORDEF_( Name_Table_Missing, 0x91, \ -+ FT_ERRORDEF_( Name_Table_Missing, 0x91, - "name table missing" ) -- FT_ERRORDEF_( CMap_Table_Missing, 0x92, \ -+ FT_ERRORDEF_( CMap_Table_Missing, 0x92, - "character map (cmap) table missing" ) -- FT_ERRORDEF_( Hmtx_Table_Missing, 0x93, \ -+ FT_ERRORDEF_( Hmtx_Table_Missing, 0x93, - "horizontal metrics (hmtx) table missing" ) -- FT_ERRORDEF_( Post_Table_Missing, 0x94, \ -+ FT_ERRORDEF_( Post_Table_Missing, 0x94, - "PostScript (post) table missing" ) -- FT_ERRORDEF_( Invalid_Horiz_Metrics, 0x95, \ -+ FT_ERRORDEF_( Invalid_Horiz_Metrics, 0x95, - "invalid horizontal metrics" ) -- FT_ERRORDEF_( Invalid_CharMap_Format, 0x96, \ -+ FT_ERRORDEF_( Invalid_CharMap_Format, 0x96, - "invalid character map (cmap) format" ) -- FT_ERRORDEF_( Invalid_PPem, 0x97, \ -+ FT_ERRORDEF_( Invalid_PPem, 0x97, - "invalid ppem value" ) -- FT_ERRORDEF_( Invalid_Vert_Metrics, 0x98, \ -+ FT_ERRORDEF_( Invalid_Vert_Metrics, 0x98, - "invalid vertical metrics" ) -- FT_ERRORDEF_( Could_Not_Find_Context, 0x99, \ -+ FT_ERRORDEF_( Could_Not_Find_Context, 0x99, - "could not find context" ) -- FT_ERRORDEF_( Invalid_Post_Table_Format, 0x9A, \ -+ FT_ERRORDEF_( Invalid_Post_Table_Format, 0x9A, - "invalid PostScript (post) table format" ) -- FT_ERRORDEF_( Invalid_Post_Table, 0x9B, \ -+ FT_ERRORDEF_( Invalid_Post_Table, 0x9B, - "invalid PostScript (post) table" ) - - /* CFF, CID, and Type 1 errors */ - -- FT_ERRORDEF_( Syntax_Error, 0xA0, \ -+ FT_ERRORDEF_( Syntax_Error, 0xA0, - "opcode syntax error" ) -- FT_ERRORDEF_( Stack_Underflow, 0xA1, \ -+ FT_ERRORDEF_( Stack_Underflow, 0xA1, - "argument stack underflow" ) -- FT_ERRORDEF_( Ignore, 0xA2, \ -+ FT_ERRORDEF_( Ignore, 0xA2, - "ignore" ) -- FT_ERRORDEF_( No_Unicode_Glyph_Name, 0xA3, \ -+ FT_ERRORDEF_( No_Unicode_Glyph_Name, 0xA3, - "no Unicode glyph name found" ) -- FT_ERRORDEF_( Glyph_Too_Big, 0xA4, \ -+ FT_ERRORDEF_( Glyph_Too_Big, 0xA4, - "glyph to big for hinting" ) - - /* BDF errors */ - -- FT_ERRORDEF_( Missing_Startfont_Field, 0xB0, \ -+ FT_ERRORDEF_( Missing_Startfont_Field, 0xB0, - "`STARTFONT' field missing" ) -- FT_ERRORDEF_( Missing_Font_Field, 0xB1, \ -+ FT_ERRORDEF_( Missing_Font_Field, 0xB1, - "`FONT' field missing" ) -- FT_ERRORDEF_( Missing_Size_Field, 0xB2, \ -+ FT_ERRORDEF_( Missing_Size_Field, 0xB2, - "`SIZE' field missing" ) -- FT_ERRORDEF_( Missing_Fontboundingbox_Field, 0xB3, \ -+ FT_ERRORDEF_( Missing_Fontboundingbox_Field, 0xB3, - "`FONTBOUNDINGBOX' field missing" ) -- FT_ERRORDEF_( Missing_Chars_Field, 0xB4, \ -+ FT_ERRORDEF_( Missing_Chars_Field, 0xB4, - "`CHARS' field missing" ) -- FT_ERRORDEF_( Missing_Startchar_Field, 0xB5, \ -+ FT_ERRORDEF_( Missing_Startchar_Field, 0xB5, - "`STARTCHAR' field missing" ) -- FT_ERRORDEF_( Missing_Encoding_Field, 0xB6, \ -+ FT_ERRORDEF_( Missing_Encoding_Field, 0xB6, - "`ENCODING' field missing" ) -- FT_ERRORDEF_( Missing_Bbx_Field, 0xB7, \ -+ FT_ERRORDEF_( Missing_Bbx_Field, 0xB7, - "`BBX' field missing" ) -- FT_ERRORDEF_( Bbx_Too_Big, 0xB8, \ -+ FT_ERRORDEF_( Bbx_Too_Big, 0xB8, - "`BBX' too big" ) -- FT_ERRORDEF_( Corrupted_Font_Header, 0xB9, \ -+ FT_ERRORDEF_( Corrupted_Font_Header, 0xB9, - "Font header corrupted or missing fields" ) -- FT_ERRORDEF_( Corrupted_Font_Glyphs, 0xBA, \ -+ FT_ERRORDEF_( Corrupted_Font_Glyphs, 0xBA, - "Font glyphs corrupted or missing fields" ) - - -diff --git a/include/fttrigon.h b/include/fttrigon.h -index 65143cb..9c7b543 100644 ---- a/include/fttrigon.h -+++ b/include/fttrigon.h -@@ -237,7 +237,7 @@ FT_BEGIN_HEADER - * - * @input: - * angle :: -- * The address of angle. -+ * The input angle. - * - */ - FT_EXPORT( void ) -@@ -259,7 +259,7 @@ FT_BEGIN_HEADER - * - * @input: - * angle :: -- * The address of angle. -+ * The input angle. - * - */ - FT_EXPORT( void ) -diff --git a/include/internal/ftcalc.h b/include/internal/ftcalc.h -index 03bd68e..95165bf 100644 ---- a/include/internal/ftcalc.h -+++ b/include/internal/ftcalc.h -@@ -4,7 +4,7 @@ - /* */ - /* Arithmetic computations (specification). */ - /* */ --/* Copyright 1996-2006, 2008, 2009, 2012-2013 by */ -+/* Copyright 1996-2006, 2008, 2009, 2012-2014 by */ - /* David Turner, Robert Wilhelm, and Werner Lemberg. */ - /* */ - /* This file is part of the FreeType project, and may only be used, */ -@@ -27,36 +27,223 @@ - FT_BEGIN_HEADER - - --#if 0 -- - /*************************************************************************/ - /* */ -- /* <Function> */ -- /* FT_SqrtFixed */ -- /* */ -- /* <Description> */ -- /* Computes the square root of a 16.16 fixed-point value. */ -- /* */ -- /* <Input> */ -- /* x :: The value to compute the root for. */ -- /* */ -- /* <Return> */ -- /* The result of `sqrt(x)'. */ -- /* */ -- /* <Note> */ -- /* This function is not very fast. */ -+ /* FT_MulDiv() and FT_MulFix() are declared in freetype.h. */ - /* */ -- FT_BASE( FT_Int32 ) -- FT_SqrtFixed( FT_Int32 x ); -+ /*************************************************************************/ - --#endif /* 0 */ -+#ifndef FT_CONFIG_OPTION_NO_ASSEMBLER -+ /* Provide assembler fragments for performance-critical functions. */ -+ /* These must be defined `static __inline__' with GCC. */ - -+#if defined( __CC_ARM ) || defined( __ARMCC__ ) /* RVCT */ - -- /*************************************************************************/ -- /* */ -- /* FT_MulDiv() and FT_MulFix() are declared in freetype.h. */ -- /* */ -- /*************************************************************************/ -+#define FT_MULFIX_ASSEMBLER FT_MulFix_arm -+ -+ /* documentation is in freetype.h */ -+ -+ static __inline FT_Int32 -+ FT_MulFix_arm( FT_Int32 a, -+ FT_Int32 b ) -+ { -+ register FT_Int32 t, t2; -+ -+ -+ __asm -+ { -+ smull t2, t, b, a /* (lo=t2,hi=t) = a*b */ -+ mov a, t, asr #31 /* a = (hi >> 31) */ -+ add a, a, #0x8000 /* a += 0x8000 */ -+ adds t2, t2, a /* t2 += a */ -+ adc t, t, #0 /* t += carry */ -+ mov a, t2, lsr #16 /* a = t2 >> 16 */ -+ orr a, a, t, lsl #16 /* a |= t << 16 */ -+ } -+ return a; -+ } -+ -+#endif /* __CC_ARM || __ARMCC__ */ -+ -+ -+#ifdef __GNUC__ -+ -+#if defined( __arm__ ) && \ -+ ( !defined( __thumb__ ) || defined( __thumb2__ ) ) && \ -+ !( defined( __CC_ARM ) || defined( __ARMCC__ ) ) -+ -+#define FT_MULFIX_ASSEMBLER FT_MulFix_arm -+ -+ /* documentation is in freetype.h */ -+ -+ static __inline__ FT_Int32 -+ FT_MulFix_arm( FT_Int32 a, -+ FT_Int32 b ) -+ { -+ register FT_Int32 t, t2; -+ -+ -+ __asm__ __volatile__ ( -+ "smull %1, %2, %4, %3\n\t" /* (lo=%1,hi=%2) = a*b */ -+ "mov %0, %2, asr #31\n\t" /* %0 = (hi >> 31) */ -+#if defined( __clang__ ) && defined( __thumb2__ ) -+ "add.w %0, %0, #0x8000\n\t" /* %0 += 0x8000 */ -+#else -+ "add %0, %0, #0x8000\n\t" /* %0 += 0x8000 */ -+#endif -+ "adds %1, %1, %0\n\t" /* %1 += %0 */ -+ "adc %2, %2, #0\n\t" /* %2 += carry */ -+ "mov %0, %1, lsr #16\n\t" /* %0 = %1 >> 16 */ -+ "orr %0, %0, %2, lsl #16\n\t" /* %0 |= %2 << 16 */ -+ : "=r"(a), "=&r"(t2), "=&r"(t) -+ : "r"(a), "r"(b) -+ : "cc" ); -+ return a; -+ } -+ -+#endif /* __arm__ && */ -+ /* ( __thumb2__ || !__thumb__ ) && */ -+ /* !( __CC_ARM || __ARMCC__ ) */ -+ -+ -+#if defined( __i386__ ) -+ -+#define FT_MULFIX_ASSEMBLER FT_MulFix_i386 -+ -+ /* documentation is in freetype.h */ -+ -+ static __inline__ FT_Int32 -+ FT_MulFix_i386( FT_Int32 a, -+ FT_Int32 b ) -+ { -+ register FT_Int32 result; -+ -+ -+ __asm__ __volatile__ ( -+ "imul %%edx\n" -+ "movl %%edx, %%ecx\n" -+ "sarl $31, %%ecx\n" -+ "addl $0x8000, %%ecx\n" -+ "addl %%ecx, %%eax\n" -+ "adcl $0, %%edx\n" -+ "shrl $16, %%eax\n" -+ "shll $16, %%edx\n" -+ "addl %%edx, %%eax\n" -+ : "=a"(result), "=d"(b) -+ : "a"(a), "d"(b) -+ : "%ecx", "cc" ); -+ return result; -+ } -+ -+#endif /* i386 */ -+ -+#endif /* __GNUC__ */ -+ -+ -+#ifdef _MSC_VER /* Visual C++ */ -+ -+#ifdef _M_IX86 -+ -+#define FT_MULFIX_ASSEMBLER FT_MulFix_i386 -+ -+ /* documentation is in freetype.h */ -+ -+ static __inline FT_Int32 -+ FT_MulFix_i386( FT_Int32 a, -+ FT_Int32 b ) -+ { -+ register FT_Int32 result; -+ -+ __asm -+ { -+ mov eax, a -+ mov edx, b -+ imul edx -+ mov ecx, edx -+ sar ecx, 31 -+ add ecx, 8000h -+ add eax, ecx -+ adc edx, 0 -+ shr eax, 16 -+ shl edx, 16 -+ add eax, edx -+ mov result, eax -+ } -+ return result; -+ } -+ -+#endif /* _M_IX86 */ -+ -+#endif /* _MSC_VER */ -+ -+ -+#if defined( __GNUC__ ) && defined( __x86_64__ ) -+ -+#define FT_MULFIX_ASSEMBLER FT_MulFix_x86_64 -+ -+ static __inline__ FT_Int32 -+ FT_MulFix_x86_64( FT_Int32 a, -+ FT_Int32 b ) -+ { -+ /* Temporarily disable the warning that C90 doesn't support */ -+ /* `long long'. */ -+#if ( __GNUC__ > 4 ) || ( ( __GNUC__ == 4 ) && ( __GNUC_MINOR__ >= 6 ) ) -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wlong-long" -+#endif -+ -+#if 1 -+ /* Technically not an assembly fragment, but GCC does a really good */ -+ /* job at inlining it and generating good machine code for it. */ -+ long long ret, tmp; -+ -+ -+ ret = (long long)a * b; -+ tmp = ret >> 63; -+ ret += 0x8000 + tmp; -+ -+ return (FT_Int32)( ret >> 16 ); -+#else -+ -+ /* For some reason, GCC 4.6 on Ubuntu 12.04 generates invalid machine */ -+ /* code from the lines below. The main issue is that `wide_a' is not */ -+ /* properly initialized by sign-extending `a'. Instead, the generated */ -+ /* machine code assumes that the register that contains `a' on input */ -+ /* can be used directly as a 64-bit value, which is wrong most of the */ -+ /* time. */ -+ long long wide_a = (long long)a; -+ long long wide_b = (long long)b; -+ long long result; -+ -+ -+ __asm__ __volatile__ ( -+ "imul %2, %1\n" -+ "mov %1, %0\n" -+ "sar $63, %0\n" -+ "lea 0x8000(%1, %0), %0\n" -+ "sar $16, %0\n" -+ : "=&r"(result), "=&r"(wide_a) -+ : "r"(wide_b) -+ : "cc" ); -+ -+ return (FT_Int32)result; -+#endif -+ -+#if ( __GNUC__ > 4 ) || ( ( __GNUC__ == 4 ) && ( __GNUC_MINOR__ >= 6 ) ) -+#pragma GCC diagnostic pop -+#endif -+ } -+ -+#endif /* __GNUC__ && __x86_64__ */ -+ -+#endif /* !FT_CONFIG_OPTION_NO_ASSEMBLER */ -+ -+ -+#ifdef FT_CONFIG_OPTION_INLINE_MULFIX -+#ifdef FT_MULFIX_ASSEMBLER -+#define FT_MulFix( a, b ) FT_MULFIX_ASSEMBLER( a, b ) -+#endif -+#endif - - - /*************************************************************************/ -@@ -139,9 +326,32 @@ FT_BEGIN_HEADER - /* - * Return the most significant bit index. - */ -+ -+#ifndef FT_CONFIG_OPTION_NO_ASSEMBLER -+#if defined( __GNUC__ ) -+#if ( __GNUC__ > 3 ) || ( ( __GNUC__ == 3 ) && ( __GNUC_MINOR__ >= 4 ) ) -+ -+#if FT_SIZEOF_INT == 4 -+ -+#define FT_MSB( x ) ( 31 - __builtin_clz( x ) ) -+ -+#elif FT_SIZEOF_LONG == 4 -+ -+#define FT_MSB( x ) ( 31 - __builtin_clzl( x ) ) -+ -+#endif -+ -+#endif -+#endif /* __GNUC__ */ -+#endif /* !FT_CONFIG_OPTION_NO_ASSEMBLER */ -+ -+#ifndef FT_MSB -+ - FT_BASE( FT_Int ) - FT_MSB( FT_UInt32 z ); - -+#endif -+ - - /* - * Return sqrt(x*x+y*y), which is the same as `FT_Vector_Length' but uses -@@ -152,6 +362,31 @@ FT_BEGIN_HEADER - FT_Fixed y ); - - -+#if 0 -+ -+ /*************************************************************************/ -+ /* */ -+ /* <Function> */ -+ /* FT_SqrtFixed */ -+ /* */ -+ /* <Description> */ -+ /* Computes the square root of a 16.16 fixed-point value. */ -+ /* */ -+ /* <Input> */ -+ /* x :: The value to compute the root for. */ -+ /* */ -+ /* <Return> */ -+ /* The result of `sqrt(x)'. */ -+ /* */ -+ /* <Note> */ -+ /* This function is not very fast. */ -+ /* */ -+ FT_BASE( FT_Int32 ) -+ FT_SqrtFixed( FT_Int32 x ); -+ -+#endif /* 0 */ -+ -+ - #define INT_TO_F26DOT6( x ) ( (FT_Long)(x) << 6 ) - #define INT_TO_F2DOT14( x ) ( (FT_Long)(x) << 14 ) - #define INT_TO_FIXED( x ) ( (FT_Long)(x) << 16 ) -diff --git a/include/internal/ftobjs.h b/include/internal/ftobjs.h -index 701c850..faa37f8 100644 ---- a/include/internal/ftobjs.h -+++ b/include/internal/ftobjs.h -@@ -83,14 +83,6 @@ FT_BEGIN_HEADER - - - /* -- * Return the highest power of 2 that is <= value; this correspond to -- * the highest bit in a given 32-bit value. -- */ -- FT_BASE( FT_UInt32 ) -- ft_highpow2( FT_UInt32 value ); -- -- -- /* - * character classification functions -- since these are used to parse - * font files, we must not use those in <ctypes.h> which are - * locale-dependent -diff --git a/src/autofit/afblue.c b/src/autofit/afblue.c -index 6e214c8..f3526bf 100644 ---- a/src/autofit/afblue.c -+++ b/src/autofit/afblue.c -@@ -26,15 +26,21 @@ - af_blue_strings[] = - { - /* */ -- 'T', 'H', 'E', 'Z', 'O', 'C', 'Q', 'S', /* THEZOCQS */ -+ '\xD0', '\x91', '\xD0', '\x92', '\xD0', '\x95', '\xD0', '\x9F', '\xD0', '\x97', '\xD0', '\x9E', '\xD0', '\xA1', '\xD0', '\xAD', /* БВЕПЗОСР*/ - '\0', -- 'H', 'E', 'Z', 'L', 'O', 'C', 'U', 'S', /* HEZLOCUS */ -+ '\xD0', '\x91', '\xD0', '\x92', '\xD0', '\x95', '\xD0', '\xA8', '\xD0', '\x97', '\xD0', '\x9E', '\xD0', '\xA1', '\xD0', '\xAD', /* БВЕШЗОСР*/ - '\0', -- 'f', 'i', 'j', 'k', 'd', 'b', 'h', /* fijkdbh */ -+ '\xD1', '\x85', '\xD0', '\xBF', '\xD0', '\xBD', '\xD1', '\x88', '\xD0', '\xB5', '\xD0', '\xB7', '\xD0', '\xBE', '\xD1', '\x81', /* Ñ…Ð¿Ð½ÑˆÐµÐ·Ð¾Ñ */ - '\0', -- 'x', 'z', 'r', 'o', 'e', 's', 'c', /* xzroesc */ -+ '\xD1', '\x80', '\xD1', '\x83', '\xD1', '\x84', /* руф */ - '\0', -- 'p', 'q', 'g', 'j', 'y', /* pqgjy */ -+ '\xE0', '\xA4', '\x95', '\xE0', '\xA4', '\xAE', '\xE0', '\xA4', '\x85', '\xE0', '\xA4', '\x86', '\xE0', '\xA4', '\xA5', '\xE0', '\xA4', '\xA7', '\xE0', '\xA4', '\xAD', '\xE0', '\xA4', '\xB6', /* क म अ आ थ ध ठश */ -+ '\0', -+ '\xE0', '\xA4', '\x88', '\xE0', '\xA4', '\x90', '\xE0', '\xA4', '\x93', '\xE0', '\xA4', '\x94', '\xE0', '\xA4', '\xBF', '\xE0', '\xA5', '\x80', '\xE0', '\xA5', '\x8B', '\xE0', '\xA5', '\x8C', /* ई ठओ औ ि ी ो ौ */ -+ '\0', -+ '\xE0', '\xA4', '\x95', '\xE0', '\xA4', '\xAE', '\xE0', '\xA4', '\x85', '\xE0', '\xA4', '\x86', '\xE0', '\xA4', '\xA5', '\xE0', '\xA4', '\xA7', '\xE0', '\xA4', '\xAD', '\xE0', '\xA4', '\xB6', /* क म अ आ थ ध ठश */ -+ '\0', -+ '\xE0', '\xA5', '\x81', '\xE0', '\xA5', '\x83', /* ॠृ */ - '\0', - '\xCE', '\x93', '\xCE', '\x92', '\xCE', '\x95', '\xCE', '\x96', '\xCE', '\x98', '\xCE', '\x9F', '\xCE', '\xA9', /* ΓΒΕΖΘΟΩ */ - '\0', -@@ -46,26 +52,27 @@ - '\0', - '\xCE', '\xB2', '\xCE', '\xB3', '\xCE', '\xB7', '\xCE', '\xBC', '\xCF', '\x81', '\xCF', '\x86', '\xCF', '\x87', '\xCF', '\x88', /* βγημÏφχψ */ - '\0', -- '\xD0', '\x91', '\xD0', '\x92', '\xD0', '\x95', '\xD0', '\x9F', '\xD0', '\x97', '\xD0', '\x9E', '\xD0', '\xA1', '\xD0', '\xAD', /* БВЕПЗОСР*/ -+ '\xD7', '\x91', '\xD7', '\x93', '\xD7', '\x94', '\xD7', '\x97', '\xD7', '\x9A', '\xD7', '\x9B', '\xD7', '\x9D', '\xD7', '\xA1', /* בדהחךכ×ס */ - '\0', -- '\xD0', '\x91', '\xD0', '\x92', '\xD0', '\x95', '\xD0', '\xA8', '\xD0', '\x97', '\xD0', '\x9E', '\xD0', '\xA1', '\xD0', '\xAD', /* БВЕШЗОСР*/ -+ '\xD7', '\x91', '\xD7', '\x98', '\xD7', '\x9B', '\xD7', '\x9D', '\xD7', '\xA1', '\xD7', '\xA6', /* בטכ×סצ */ - '\0', -- '\xD1', '\x85', '\xD0', '\xBF', '\xD0', '\xBD', '\xD1', '\x88', '\xD0', '\xB5', '\xD0', '\xB7', '\xD0', '\xBE', '\xD1', '\x81', /* Ñ…Ð¿Ð½ÑˆÐµÐ·Ð¾Ñ */ -+ '\xD7', '\xA7', '\xD7', '\x9A', '\xD7', '\x9F', '\xD7', '\xA3', '\xD7', '\xA5', /* קךןףץ */ - '\0', -- '\xD1', '\x80', '\xD1', '\x83', '\xD1', '\x84', /* руф */ -+ 'T', 'H', 'E', 'Z', 'O', 'C', 'Q', 'S', /* THEZOCQS */ - '\0', -- '\xD7', '\x91', '\xD7', '\x93', '\xD7', '\x94', '\xD7', '\x97', '\xD7', '\x9A', '\xD7', '\x9B', '\xD7', '\x9D', '\xD7', '\xA1', /* בדהחךכ×ס */ -+ 'H', 'E', 'Z', 'L', 'O', 'C', 'U', 'S', /* HEZLOCUS */ - '\0', -- '\xD7', '\x91', '\xD7', '\x98', '\xD7', '\x9B', '\xD7', '\x9D', '\xD7', '\xA1', '\xD7', '\xA6', /* בטכ×סצ */ -+ 'f', 'i', 'j', 'k', 'd', 'b', 'h', /* fijkdbh */ - '\0', -- '\xD7', '\xA7', '\xD7', '\x9A', '\xD7', '\x9F', '\xD7', '\xA3', '\xD7', '\xA5', /* קךןףץ */ -+ 'x', 'z', 'r', 'o', 'e', 's', 'c', /* xzroesc */ -+ '\0', -+ 'p', 'q', 'g', 'j', 'y', /* pqgjy */ - #ifdef AF_CONFIG_OPTION_CJK - '\0', - '\xE4', '\xBB', '\x96', '\xE4', '\xBB', '\xAC', '\xE4', '\xBD', '\xA0', '\xE4', '\xBE', '\x86', '\xE5', '\x80', '\x91', '\xE5', '\x88', '\xB0', '\xE5', '\x92', '\x8C', '\xE5', '\x9C', '\xB0', /* ä»–ä»¬ä½ ä¾†å€‘åˆ°å’Œåœ° */ - '\xE5', '\xAF', '\xB9', '\xE5', '\xB0', '\x8D', '\xE5', '\xB0', '\xB1', '\xE5', '\xB8', '\xAD', '\xE6', '\x88', '\x91', '\xE6', '\x97', '\xB6', '\xE6', '\x99', '\x82', '\xE6', '\x9C', '\x83', /* 对å°å°±å¸æˆ‘时時會 */ - '\xE6', '\x9D', '\xA5', '\xE7', '\x82', '\xBA', '\xE8', '\x83', '\xBD', '\xE8', '\x88', '\xB0', '\xE8', '\xAA', '\xAA', '\xE8', '\xAF', '\xB4', '\xE8', '\xBF', '\x99', '\xE9', '\x80', '\x99', /* æ¥ç‚ºèƒ½èˆ°èªªè¯´è¿™é€™ */ -- '\xE9', '\xBD', '\x8A', /* 齊 */ -- '\0', -+ '\xE9', '\xBD', '\x8A', '|', /* 齊 | */ - '\xE5', '\x86', '\x9B', '\xE5', '\x90', '\x8C', '\xE5', '\xB7', '\xB2', '\xE6', '\x84', '\xBF', '\xE6', '\x97', '\xA2', '\xE6', '\x98', '\x9F', '\xE6', '\x98', '\xAF', '\xE6', '\x99', '\xAF', /* 军åŒå·²æ„¿æ—¢æ˜Ÿæ˜¯æ™¯ */ - '\xE6', '\xB0', '\x91', '\xE7', '\x85', '\xA7', '\xE7', '\x8E', '\xB0', '\xE7', '\x8F', '\xBE', '\xE7', '\x90', '\x86', '\xE7', '\x94', '\xA8', '\xE7', '\xBD', '\xAE', '\xE8', '\xA6', '\x81', /* 民照现ç¾ç†ç”¨ç½®è¦ */ - '\xE8', '\xBB', '\x8D', '\xE9', '\x82', '\xA3', '\xE9', '\x85', '\x8D', '\xE9', '\x87', '\x8C', '\xE9', '\x96', '\x8B', '\xE9', '\x9B', '\xB7', '\xE9', '\x9C', '\xB2', '\xE9', '\x9D', '\xA2', /* è»é‚£é…é‡Œé–‹é›·éœ²é¢ */ -@@ -74,8 +81,7 @@ - '\xE4', '\xB8', '\xAA', '\xE4', '\xB8', '\xBA', '\xE4', '\xBA', '\xBA', '\xE4', '\xBB', '\x96', '\xE4', '\xBB', '\xA5', '\xE4', '\xBB', '\xAC', '\xE4', '\xBD', '\xA0', '\xE4', '\xBE', '\x86', /* ä¸ªä¸ºäººä»–ä»¥ä»¬ä½ ä¾† */ - '\xE5', '\x80', '\x8B', '\xE5', '\x80', '\x91', '\xE5', '\x88', '\xB0', '\xE5', '\x92', '\x8C', '\xE5', '\xA4', '\xA7', '\xE5', '\xAF', '\xB9', '\xE5', '\xB0', '\x8D', '\xE5', '\xB0', '\xB1', /* 個們到和大对å°å°± */ - '\xE6', '\x88', '\x91', '\xE6', '\x97', '\xB6', '\xE6', '\x99', '\x82', '\xE6', '\x9C', '\x89', '\xE6', '\x9D', '\xA5', '\xE7', '\x82', '\xBA', '\xE8', '\xA6', '\x81', '\xE8', '\xAA', '\xAA', /* 我时時有æ¥ç‚ºè¦èªª */ -- '\xE8', '\xAF', '\xB4', /* 说 */ -- '\0', -+ '\xE8', '\xAF', '\xB4', '|', /* 说 | */ - '\xE4', '\xB8', '\xBB', '\xE4', '\xBA', '\x9B', '\xE5', '\x9B', '\xA0', '\xE5', '\xAE', '\x83', '\xE6', '\x83', '\xB3', '\xE6', '\x84', '\x8F', '\xE7', '\x90', '\x86', '\xE7', '\x94', '\x9F', /* ä¸»äº›å› å®ƒæƒ³æ„ç†ç”Ÿ */ - '\xE7', '\x95', '\xB6', '\xE7', '\x9C', '\x8B', '\xE7', '\x9D', '\x80', '\xE7', '\xBD', '\xAE', '\xE8', '\x80', '\x85', '\xE8', '\x87', '\xAA', '\xE8', '\x91', '\x97', '\xE8', '\xA3', '\xA1', /* 當看ç€ç½®è€…自著裡 */ - '\xE8', '\xBF', '\x87', '\xE8', '\xBF', '\x98', '\xE8', '\xBF', '\x9B', '\xE9', '\x80', '\xB2', '\xE9', '\x81', '\x8E', '\xE9', '\x81', '\x93', '\xE9', '\x82', '\x84', '\xE9', '\x87', '\x8C', /* 过还进進éŽé“還里 */ -@@ -85,8 +91,7 @@ - '\xE4', '\xBA', '\x9B', '\xE4', '\xBB', '\xAC', '\xE4', '\xBD', '\xA0', '\xE4', '\xBE', '\x86', '\xE5', '\x80', '\x91', '\xE5', '\x88', '\xB0', '\xE5', '\x92', '\x8C', '\xE5', '\x9C', '\xB0', /* äº›ä»¬ä½ ä¾†å€‘åˆ°å’Œåœ° */ - '\xE5', '\xA5', '\xB9', '\xE5', '\xB0', '\x86', '\xE5', '\xB0', '\x87', '\xE5', '\xB0', '\xB1', '\xE5', '\xB9', '\xB4', '\xE5', '\xBE', '\x97', '\xE6', '\x83', '\x85', '\xE6', '\x9C', '\x80', /* 她将將就年得情最 */ - '\xE6', '\xA0', '\xB7', '\xE6', '\xA8', '\xA3', '\xE7', '\x90', '\x86', '\xE8', '\x83', '\xBD', '\xE8', '\xAA', '\xAA', '\xE8', '\xAF', '\xB4', '\xE8', '\xBF', '\x99', '\xE9', '\x80', '\x99', /* æ ·æ¨£ç†èƒ½èªªè¯´è¿™é€™ */ -- '\xE9', '\x80', '\x9A', /* 通 */ -- '\0', -+ '\xE9', '\x80', '\x9A', '|', /* 通 | */ - '\xE5', '\x8D', '\xB3', '\xE5', '\x90', '\x97', '\xE5', '\x90', '\xA7', '\xE5', '\x90', '\xAC', '\xE5', '\x91', '\xA2', '\xE5', '\x93', '\x81', '\xE5', '\x93', '\x8D', '\xE5', '\x97', '\x8E', /* å³å—å§å¬å‘¢å“å“å—Ž */ - '\xE5', '\xB8', '\x88', '\xE5', '\xB8', '\xAB', '\xE6', '\x94', '\xB6', '\xE6', '\x96', '\xAD', '\xE6', '\x96', '\xB7', '\xE6', '\x98', '\x8E', '\xE7', '\x9C', '\xBC', '\xE9', '\x96', '\x93', /* 师師收æ–斷明眼間 */ - '\xE9', '\x97', '\xB4', '\xE9', '\x99', '\x85', '\xE9', '\x99', '\x88', '\xE9', '\x99', '\x90', '\xE9', '\x99', '\xA4', '\xE9', '\x99', '\xB3', '\xE9', '\x9A', '\x8F', '\xE9', '\x9A', '\x9B', /* 间际陈é™é™¤é™³éšéš› */ -@@ -95,8 +100,7 @@ - '\xE4', '\xBA', '\x8B', '\xE5', '\x89', '\x8D', '\xE5', '\xAD', '\xB8', '\xE5', '\xB0', '\x86', '\xE5', '\xB0', '\x87', '\xE6', '\x83', '\x85', '\xE6', '\x83', '\xB3', '\xE6', '\x88', '\x96', /* 事å‰å¸å°†å°‡æƒ…想或 */ - '\xE6', '\x94', '\xBF', '\xE6', '\x96', '\xAF', '\xE6', '\x96', '\xB0', '\xE6', '\xA0', '\xB7', '\xE6', '\xA8', '\xA3', '\xE6', '\xB0', '\x91', '\xE6', '\xB2', '\x92', '\xE6', '\xB2', '\xA1', /* æ”¿æ–¯æ–°æ ·æ¨£æ°‘æ²’æ²¡ */ - '\xE7', '\x84', '\xB6', '\xE7', '\x89', '\xB9', '\xE7', '\x8E', '\xB0', '\xE7', '\x8F', '\xBE', '\xE7', '\x90', '\x83', '\xE7', '\xAC', '\xAC', '\xE7', '\xB6', '\x93', '\xE8', '\xB0', '\x81', /* 然特现ç¾çƒç¬¬ç¶“è° */ -- '\xE8', '\xB5', '\xB7', /* èµ· */ -- '\0', -+ '\xE8', '\xB5', '\xB7', '|', /* èµ· | */ - '\xE4', '\xBE', '\x8B', '\xE5', '\x88', '\xA5', '\xE5', '\x88', '\xAB', '\xE5', '\x88', '\xB6', '\xE5', '\x8A', '\xA8', '\xE5', '\x8B', '\x95', '\xE5', '\x90', '\x97', '\xE5', '\x97', '\x8E', /* 例別别制动動å—å—Ž */ - '\xE5', '\xA2', '\x9E', '\xE6', '\x8C', '\x87', '\xE6', '\x98', '\x8E', '\xE6', '\x9C', '\x9D', '\xE6', '\x9C', '\x9F', '\xE6', '\x9E', '\x84', '\xE7', '\x89', '\xA9', '\xE7', '\xA1', '\xAE', /* 增指明æœæœŸæž„物确 */ - '\xE7', '\xA7', '\x8D', '\xE8', '\xAA', '\xBF', '\xE8', '\xB0', '\x83', '\xE8', '\xB2', '\xBB', '\xE8', '\xB4', '\xB9', '\xE9', '\x82', '\xA3', '\xE9', '\x83', '\xBD', '\xE9', '\x96', '\x93', /* ç§èª¿è°ƒè²»è´¹é‚£éƒ½é–“ */ -@@ -113,14 +117,21 @@ - af_blue_stringsets[] = - { - /* */ -- { AF_BLUE_STRING_LATIN_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, -- { AF_BLUE_STRING_LATIN_CAPITAL_BOTTOM, 0 }, -- { AF_BLUE_STRING_LATIN_SMALL_F_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, -- { AF_BLUE_STRING_LATIN_SMALL, AF_BLUE_PROPERTY_LATIN_TOP | -- AF_BLUE_PROPERTY_LATIN_X_HEIGHT }, -- { AF_BLUE_STRING_LATIN_SMALL, 0 }, -- { AF_BLUE_STRING_LATIN_SMALL_DESCENDER, 0 }, -- { AF_BLUE_STRING_MAX, 0 }, -+ { AF_BLUE_STRING_CYRILLIC_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, -+ { AF_BLUE_STRING_CYRILLIC_CAPITAL_BOTTOM, 0 }, -+ { AF_BLUE_STRING_CYRILLIC_SMALL, AF_BLUE_PROPERTY_LATIN_TOP | -+ AF_BLUE_PROPERTY_LATIN_X_HEIGHT }, -+ { AF_BLUE_STRING_CYRILLIC_SMALL, 0 }, -+ { AF_BLUE_STRING_CYRILLIC_SMALL_DESCENDER, 0 }, -+ { AF_BLUE_STRING_MAX, 0 }, -+ { AF_BLUE_STRING_DEVANAGARI_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, -+ { AF_BLUE_STRING_DEVANAGARI_HEAD, AF_BLUE_PROPERTY_LATIN_TOP }, -+ { AF_BLUE_STRING_DEVANAGARI_BASE, AF_BLUE_PROPERTY_LATIN_TOP | -+ AF_BLUE_PROPERTY_LATIN_NEUTRAL | -+ AF_BLUE_PROPERTY_LATIN_X_HEIGHT }, -+ { AF_BLUE_STRING_DEVANAGARI_BASE, 0 }, -+ { AF_BLUE_STRING_DEVANAGARI_BOTTOM, 0 }, -+ { AF_BLUE_STRING_MAX, 0 }, - { AF_BLUE_STRING_GREEK_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, - { AF_BLUE_STRING_GREEK_CAPITAL_BOTTOM, 0 }, - { AF_BLUE_STRING_GREEK_SMALL_BETA_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, -@@ -129,35 +140,28 @@ - { AF_BLUE_STRING_GREEK_SMALL, 0 }, - { AF_BLUE_STRING_GREEK_SMALL_DESCENDER, 0 }, - { AF_BLUE_STRING_MAX, 0 }, -- { AF_BLUE_STRING_CYRILLIC_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, -- { AF_BLUE_STRING_CYRILLIC_CAPITAL_BOTTOM, 0 }, -- { AF_BLUE_STRING_CYRILLIC_SMALL, AF_BLUE_PROPERTY_LATIN_TOP | -- AF_BLUE_PROPERTY_LATIN_X_HEIGHT }, -- { AF_BLUE_STRING_CYRILLIC_SMALL, 0 }, -- { AF_BLUE_STRING_CYRILLIC_SMALL_DESCENDER, 0 }, -- { AF_BLUE_STRING_MAX, 0 }, - { AF_BLUE_STRING_HEBREW_TOP, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_LONG }, - { AF_BLUE_STRING_HEBREW_BOTTOM, 0 }, - { AF_BLUE_STRING_HEBREW_DESCENDER, 0 }, - { AF_BLUE_STRING_MAX, 0 }, -+ { AF_BLUE_STRING_LATIN_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, -+ { AF_BLUE_STRING_LATIN_CAPITAL_BOTTOM, 0 }, -+ { AF_BLUE_STRING_LATIN_SMALL_F_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, -+ { AF_BLUE_STRING_LATIN_SMALL, AF_BLUE_PROPERTY_LATIN_TOP | -+ AF_BLUE_PROPERTY_LATIN_X_HEIGHT }, -+ { AF_BLUE_STRING_LATIN_SMALL, 0 }, -+ { AF_BLUE_STRING_LATIN_SMALL_DESCENDER, 0 }, -+ { AF_BLUE_STRING_MAX, 0 }, - #ifdef AF_CONFIG_OPTION_CJK -- { AF_BLUE_STRING_CJK_TOP_FILL, AF_BLUE_PROPERTY_CJK_TOP | -- AF_BLUE_PROPERTY_CJK_FILL }, -- { AF_BLUE_STRING_CJK_TOP_UNFILL, AF_BLUE_PROPERTY_CJK_TOP }, -- { AF_BLUE_STRING_CJK_BOTTOM_FILL, AF_BLUE_PROPERTY_CJK_FILL }, -- { AF_BLUE_STRING_CJK_BOTTOM_UNFILL, 0 }, -+ { AF_BLUE_STRING_CJK_TOP, AF_BLUE_PROPERTY_CJK_TOP }, -+ { AF_BLUE_STRING_CJK_BOTTOM, 0 }, - #ifdef AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT -- { AF_BLUE_STRING_CJK_LEFT_FILL, AF_BLUE_PROPERTY_CJK_HORIZ | -- AF_BLUE_PROPERTY_CJK_FILL }, -- { AF_BLUE_STRING_CJK_LEFT_UNFILL, AF_BLUE_PROPERTY_CJK_HORIZ }, -- { AF_BLUE_STRING_CJK_RIGHT_FILL, AF_BLUE_PROPERTY_CJK_HORIZ | -- AF_BLUE_PROPERTY_CJK_RIGHT | -- AF_BLUE_PROPERTY_CJK_FILL }, -- { AF_BLUE_STRING_CJK_RIGHT_UNFILL, AF_BLUE_PROPERTY_CJK_HORIZ | -- AF_BLUE_PROPERTY_CJK_RIGHT }, -+ { AF_BLUE_STRING_CJK_LEFT, AF_BLUE_PROPERTY_CJK_HORIZ }, -+ { AF_BLUE_STRING_CJK_RIGHT, AF_BLUE_PROPERTY_CJK_HORIZ | -+ AF_BLUE_PROPERTY_CJK_RIGHT }, - #endif /* AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT */ -- { AF_BLUE_STRING_MAX, 0 }, -+ { AF_BLUE_STRING_MAX, 0 }, - #endif /* AF_CONFIG_OPTION_CJK */ - - }; -diff --git a/src/autofit/afblue.dat b/src/autofit/afblue.dat -index d488f3f..74a472d 100644 ---- a/src/autofit/afblue.dat -+++ b/src/autofit/afblue.dat -@@ -2,7 +2,7 @@ - // - // Auto-fitter data for blue strings. - // --// Copyright 2013 by -+// Copyright 2013, 2014 by - // David Turner, Robert Wilhelm, and Werner Lemberg. - // - // This file is part of the FreeType project, and may only be used, -@@ -34,11 +34,11 @@ - // using C syntax. There can be only one string per line, thus the - // starting and ending double quote must be the first and last character - // in the line, respectively, ignoring whitespace before and after the --// string. If there are multiple strings (in multiple lines), they are --// concatenated to a single string. In the output, a string gets --// represented as a series of singles bytes, followed by a zero byte. The --// enumeration values simply hold byte offsets to the start of the --// corresponding strings. -+// string. Space characters within the string are ignored too. If there -+// are multiple strings (in multiple lines), they are concatenated to a -+// single string. In the output, a string gets represented as a series of -+// singles bytes, followed by a zero byte. The enumeration values simply -+// hold byte offsets to the start of the corresponding strings. - // - // - Data blocks enclosed in balanced braces, which get copied verbatim and - // which can span multiple lines. The opening brace of a block must be -@@ -63,18 +63,32 @@ - // characters, not bytes. - - -+// The blue zone string data, to be used in the blue stringsets below. -+ - AF_BLUE_STRING_ENUM AF_BLUE_STRINGS_ARRAY AF_BLUE_STRING_MAX_LEN: - -- AF_BLUE_STRING_LATIN_CAPITAL_TOP -- "THEZOCQS" -- AF_BLUE_STRING_LATIN_CAPITAL_BOTTOM -- "HEZLOCUS" -- AF_BLUE_STRING_LATIN_SMALL_F_TOP -- "fijkdbh" -- AF_BLUE_STRING_LATIN_SMALL -- "xzroesc" -- AF_BLUE_STRING_LATIN_SMALL_DESCENDER -- "pqgjy" -+ AF_BLUE_STRING_CYRILLIC_CAPITAL_TOP -+ "БВЕПЗОСÐ" -+ AF_BLUE_STRING_CYRILLIC_CAPITAL_BOTTOM -+ "БВЕШЗОСÐ" -+ AF_BLUE_STRING_CYRILLIC_SMALL -+ "хпншезоÑ" -+ AF_BLUE_STRING_CYRILLIC_SMALL_DESCENDER -+ "руф" -+ -+ // we separate the letters with spaces to avoid ligatures; -+ // this is just for convenience to simplify reading -+ AF_BLUE_STRING_DEVANAGARI_BASE -+ "क म अ आ थ ध ठश" -+ AF_BLUE_STRING_DEVANAGARI_TOP -+ "ई ठओ औ ि ी ो ौ" -+ // note that some fonts have extreme variation in the height of the -+ // round head elements; for this reason we also define the `base' -+ // blue zone, which must be always present -+ AF_BLUE_STRING_DEVANAGARI_HEAD -+ "क म अ आ थ ध ठश" -+ AF_BLUE_STRING_DEVANAGARI_BOTTOM -+ "ॠृ" - - AF_BLUE_STRING_GREEK_CAPITAL_TOP - "ΓΒΕΖΘΟΩ" -@@ -87,15 +101,6 @@ AF_BLUE_STRING_ENUM AF_BLUE_STRINGS_ARRAY AF_BLUE_STRING_MAX_LEN: - AF_BLUE_STRING_GREEK_SMALL_DESCENDER - "βγημÏφχψ" - -- AF_BLUE_STRING_CYRILLIC_CAPITAL_TOP -- "БВЕПЗОСÐ" -- AF_BLUE_STRING_CYRILLIC_CAPITAL_BOTTOM -- "БВЕШЗОСÐ" -- AF_BLUE_STRING_CYRILLIC_SMALL -- "хпншезоÑ" -- AF_BLUE_STRING_CYRILLIC_SMALL_DESCENDER -- "руф" -- - AF_BLUE_STRING_HEBREW_TOP - "בדהחךכ×ס" - AF_BLUE_STRING_HEBREW_BOTTOM -@@ -103,24 +108,33 @@ AF_BLUE_STRING_ENUM AF_BLUE_STRINGS_ARRAY AF_BLUE_STRING_MAX_LEN: - AF_BLUE_STRING_HEBREW_DESCENDER - "קךןףץ" - -+ AF_BLUE_STRING_LATIN_CAPITAL_TOP -+ "THEZOCQS" -+ AF_BLUE_STRING_LATIN_CAPITAL_BOTTOM -+ "HEZLOCUS" -+ AF_BLUE_STRING_LATIN_SMALL_F_TOP -+ "fijkdbh" -+ AF_BLUE_STRING_LATIN_SMALL -+ "xzroesc" -+ AF_BLUE_STRING_LATIN_SMALL_DESCENDER -+ "pqgjy" -+ - #ifdef AF_CONFIG_OPTION_CJK - -- AF_BLUE_STRING_CJK_TOP_FILL -+ AF_BLUE_STRING_CJK_TOP - "ä»–ä»¬ä½ ä¾†å€‘åˆ°å’Œåœ°" - "对å°å°±å¸æˆ‘时時會" - "æ¥ç‚ºèƒ½èˆ°èªªè¯´è¿™é€™" -- "齊" -- AF_BLUE_STRING_CJK_TOP_UNFILL -+ "齊 |" - "军åŒå·²æ„¿æ—¢æ˜Ÿæ˜¯æ™¯" - "民照现ç¾ç†ç”¨ç½®è¦" - "è»é‚£é…里開雷露é¢" - "顾" -- AF_BLUE_STRING_CJK_BOTTOM_FILL -+ AF_BLUE_STRING_CJK_BOTTOM - "ä¸ªä¸ºäººä»–ä»¥ä»¬ä½ ä¾†" - "個們到和大对å°å°±" - "我时時有æ¥ç‚ºè¦èªª" -- "说" -- AF_BLUE_STRING_CJK_BOTTOM_UNFILL -+ "说 |" - "ä¸»äº›å› å®ƒæƒ³æ„ç†ç”Ÿ" - "當看ç€ç½®è€…自著裡" - "过还进進éŽé“還里" -@@ -128,22 +142,20 @@ AF_BLUE_STRING_ENUM AF_BLUE_STRINGS_ARRAY AF_BLUE_STRING_MAX_LEN: - - #ifdef AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT - -- AF_BLUE_STRING_CJK_LEFT_FILL -+ AF_BLUE_STRING_CJK_LEFT - "äº›ä»¬ä½ ä¾†å€‘åˆ°å’Œåœ°" - "她将將就年得情最" - "æ ·æ¨£ç†èƒ½èªªè¯´è¿™é€™" -- "通" -- AF_BLUE_STRING_CJK_LEFT_UNFILL -+ "通 |" - "å³å—å§å¬å‘¢å“å“å—Ž" - "师師收æ–斷明眼間" - "间际陈é™é™¤é™³éšéš›" - "隨" -- AF_BLUE_STRING_CJK_RIGHT_FILL -+ AF_BLUE_STRING_CJK_RIGHT - "事å‰å¸å°†å°‡æƒ…想或" - "æ”¿æ–¯æ–°æ ·æ¨£æ°‘æ²’æ²¡" - "然特现ç¾çƒç¬¬ç¶“è°" -- "èµ·" -- AF_BLUE_STRING_CJK_RIGHT_UNFILL -+ "èµ· |" - "例別别制动動å—å—Ž" - "增指明æœæœŸæž„物确" - "ç§èª¿è°ƒè²»è´¹é‚£éƒ½é–“" -@@ -154,17 +166,118 @@ AF_BLUE_STRING_ENUM AF_BLUE_STRINGS_ARRAY AF_BLUE_STRING_MAX_LEN: - #endif /* AF_CONFIG_OPTION_CJK */ - - -+// The blue zone stringsets, as used in the script styles, cf. `afstyles.h'. -+// -+// The AF_BLUE_PROPERTY_XXX flags are defined in `afblue.h'; here some -+// explanations. -+// -+// A blue zone in general is defined by a reference and an overshoot line. -+// During the hinting process, all coordinate values between those two lines -+// are set equal to the reference value, provided that the blue zone is not -+// wider than 0.75 pixels (otherwise the blue zone gets ignored). All -+// entries must have `AF_BLUE_STRING_MAX' as the final line. -+// -+// During the glyph analysis, edges are sorted from bottom to top, and then -+// sequentially checked, edge by edge, against the blue zones in the order -+// given below. -+// -+// -+// latin auto-hinter -+// ----------------- -+// -+// Characters in a blue string are automatically classified as having a flat -+// (reference) or a round (overshoot) extremum. The blue zone is then set -+// up by the mean values of all flat extrema and all round extrema, -+// respectively. Only horizontal blue zones (i.e., adjusting vertical -+// coordinate values) are supported. -+// -+// For the latin auto-hinter, the overshoot should be larger than the -+// reference for top zones, and vice versa for bottom zones. -+// -+// LATIN_TOP -+// Take the maximum flat and round coordinate values of the blue string -+// characters for computing the blue zone's reference and overshoot -+// values. -+// -+// If not set, take the minimum values. -+// -+// LATIN_NEUTRAL -+// Ignore round extrema and define the blue zone with flat values only. -+// Both top and bottom of contours can match. This is useful for -+// scripts like Devanagari where vowel signs attach to the base -+// character and are implemented as components of composite glyphs. -+// -+// If not set, both round and flat extrema are taken into account. -+// Additionally, only the top or the bottom of a contour can match, -+// depending on the LATIN_TOP flag. -+// -+// Neutral blue zones should always follow non-neutral blue zones. -+// -+// LATIN_X_HEIGHT -+// Scale all glyphs vertically from the corresponding script to make the -+// reference line of this blue zone align on the grid. The scaling -+// takes place before all other blue zones get aligned to the grid. -+// Only one blue character string of a script style can have this flag. -+// -+// LATIN_LONG -+// Apply an additional constraint for blue zone values: Don't -+// necessarily use the extremum as-is but a segment of the topmost (or -+// bottommost) contour that is longer than a heuristic threshold, and -+// which is not too far away vertically from the real extremum. This -+// ensures that small bumps in the outline are ignored (for example, the -+// `vertical serifs' found in many Hebrew glyph designs). -+// -+// The segment must be at least EM/25 font units long, and the distance -+// to the extremum must be smaller than EM/4. -+// -+// -+// cjk auto-hinter -+// --------------- -+// -+// Characters in a blue string are *not* automatically classified. Instead, -+// first come the characters used for the overshoot value, then the -+// character `|', then the characters used for the reference value. The -+// blue zone is then set up by the mean values of all reference values and -+// all overshoot values, respectively. Both horizontal and vertical blue -+// zones (i.e., adjusting vertical and horizontal coordinate values, -+// respectively) are supported. -+// -+// For the cjk auto-hinter, the overshoot should be smaller than the -+// reference for top zones, and vice versa for bottom zones. -+// -+// CJK_TOP -+// Take the maximum flat and round coordinate values of the blue string -+// characters. If not set, take the minimum values. -+// -+// CJK_RIGHT -+// A synonym for CJK_TOP. If CJK_HORIZ is set, this flag indicates the -+// right blue zone, taking horizontal maximum values. -+// -+// CJK_HORIZ -+// Define a blue zone for horizontal hinting (i.e., vertical blue -+// zones). If not set, this is a blue zone for vertical hinting. -+ -+ - AF_BLUE_STRINGSET_ENUM AF_BLUE_STRINGSETS_ARRAY AF_BLUE_STRINGSET_MAX_LEN: - -- AF_BLUE_STRINGSET_LATN -- { AF_BLUE_STRING_LATIN_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP } -- { AF_BLUE_STRING_LATIN_CAPITAL_BOTTOM, 0 } -- { AF_BLUE_STRING_LATIN_SMALL_F_TOP, AF_BLUE_PROPERTY_LATIN_TOP } -- { AF_BLUE_STRING_LATIN_SMALL, AF_BLUE_PROPERTY_LATIN_TOP | -- AF_BLUE_PROPERTY_LATIN_X_HEIGHT } -- { AF_BLUE_STRING_LATIN_SMALL, 0 } -- { AF_BLUE_STRING_LATIN_SMALL_DESCENDER, 0 } -- { AF_BLUE_STRING_MAX, 0 } -+ AF_BLUE_STRINGSET_CYRL -+ { AF_BLUE_STRING_CYRILLIC_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP } -+ { AF_BLUE_STRING_CYRILLIC_CAPITAL_BOTTOM, 0 } -+ { AF_BLUE_STRING_CYRILLIC_SMALL, AF_BLUE_PROPERTY_LATIN_TOP | -+ AF_BLUE_PROPERTY_LATIN_X_HEIGHT } -+ { AF_BLUE_STRING_CYRILLIC_SMALL, 0 } -+ { AF_BLUE_STRING_CYRILLIC_SMALL_DESCENDER, 0 } -+ { AF_BLUE_STRING_MAX, 0 } -+ -+ AF_BLUE_STRINGSET_DEVA -+ { AF_BLUE_STRING_DEVANAGARI_TOP, AF_BLUE_PROPERTY_LATIN_TOP } -+ { AF_BLUE_STRING_DEVANAGARI_HEAD, AF_BLUE_PROPERTY_LATIN_TOP } -+ { AF_BLUE_STRING_DEVANAGARI_BASE, AF_BLUE_PROPERTY_LATIN_TOP | -+ AF_BLUE_PROPERTY_LATIN_NEUTRAL | -+ AF_BLUE_PROPERTY_LATIN_X_HEIGHT } -+ { AF_BLUE_STRING_DEVANAGARI_BASE, 0 } -+ { AF_BLUE_STRING_DEVANAGARI_BOTTOM, 0 } -+ { AF_BLUE_STRING_MAX, 0 } - - AF_BLUE_STRINGSET_GREK - { AF_BLUE_STRING_GREEK_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP } -@@ -176,15 +289,6 @@ AF_BLUE_STRINGSET_ENUM AF_BLUE_STRINGSETS_ARRAY AF_BLUE_STRINGSET_MAX_LEN: - { AF_BLUE_STRING_GREEK_SMALL_DESCENDER, 0 } - { AF_BLUE_STRING_MAX, 0 } - -- AF_BLUE_STRINGSET_CYRL -- { AF_BLUE_STRING_CYRILLIC_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP } -- { AF_BLUE_STRING_CYRILLIC_CAPITAL_BOTTOM, 0 } -- { AF_BLUE_STRING_CYRILLIC_SMALL, AF_BLUE_PROPERTY_LATIN_TOP | -- AF_BLUE_PROPERTY_LATIN_X_HEIGHT } -- { AF_BLUE_STRING_CYRILLIC_SMALL, 0 } -- { AF_BLUE_STRING_CYRILLIC_SMALL_DESCENDER, 0 } -- { AF_BLUE_STRING_MAX, 0 } -- - AF_BLUE_STRINGSET_HEBR - { AF_BLUE_STRING_HEBREW_TOP, AF_BLUE_PROPERTY_LATIN_TOP | - AF_BLUE_PROPERTY_LATIN_LONG } -@@ -192,25 +296,27 @@ AF_BLUE_STRINGSET_ENUM AF_BLUE_STRINGSETS_ARRAY AF_BLUE_STRINGSET_MAX_LEN: - { AF_BLUE_STRING_HEBREW_DESCENDER, 0 } - { AF_BLUE_STRING_MAX, 0 } - -+ AF_BLUE_STRINGSET_LATN -+ { AF_BLUE_STRING_LATIN_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP } -+ { AF_BLUE_STRING_LATIN_CAPITAL_BOTTOM, 0 } -+ { AF_BLUE_STRING_LATIN_SMALL_F_TOP, AF_BLUE_PROPERTY_LATIN_TOP } -+ { AF_BLUE_STRING_LATIN_SMALL, AF_BLUE_PROPERTY_LATIN_TOP | -+ AF_BLUE_PROPERTY_LATIN_X_HEIGHT } -+ { AF_BLUE_STRING_LATIN_SMALL, 0 } -+ { AF_BLUE_STRING_LATIN_SMALL_DESCENDER, 0 } -+ { AF_BLUE_STRING_MAX, 0 } -+ - #ifdef AF_CONFIG_OPTION_CJK - - AF_BLUE_STRINGSET_HANI -- { AF_BLUE_STRING_CJK_TOP_FILL, AF_BLUE_PROPERTY_CJK_TOP | -- AF_BLUE_PROPERTY_CJK_FILL } -- { AF_BLUE_STRING_CJK_TOP_UNFILL, AF_BLUE_PROPERTY_CJK_TOP } -- { AF_BLUE_STRING_CJK_BOTTOM_FILL, AF_BLUE_PROPERTY_CJK_FILL } -- { AF_BLUE_STRING_CJK_BOTTOM_UNFILL, 0 } -+ { AF_BLUE_STRING_CJK_TOP, AF_BLUE_PROPERTY_CJK_TOP } -+ { AF_BLUE_STRING_CJK_BOTTOM, 0 } - #ifdef AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT -- { AF_BLUE_STRING_CJK_LEFT_FILL, AF_BLUE_PROPERTY_CJK_HORIZ | -- AF_BLUE_PROPERTY_CJK_FILL } -- { AF_BLUE_STRING_CJK_LEFT_UNFILL, AF_BLUE_PROPERTY_CJK_HORIZ } -- { AF_BLUE_STRING_CJK_RIGHT_FILL, AF_BLUE_PROPERTY_CJK_HORIZ | -- AF_BLUE_PROPERTY_CJK_RIGHT | -- AF_BLUE_PROPERTY_CJK_FILL } -- { AF_BLUE_STRING_CJK_RIGHT_UNFILL, AF_BLUE_PROPERTY_CJK_HORIZ | -- AF_BLUE_PROPERTY_CJK_RIGHT } -+ { AF_BLUE_STRING_CJK_LEFT, AF_BLUE_PROPERTY_CJK_HORIZ } -+ { AF_BLUE_STRING_CJK_RIGHT, AF_BLUE_PROPERTY_CJK_HORIZ | -+ AF_BLUE_PROPERTY_CJK_RIGHT } - #endif /* AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT */ -- { AF_BLUE_STRING_MAX, 0 } -+ { AF_BLUE_STRING_MAX, 0 } - - #endif /* AF_CONFIG_OPTION_CJK */ - -diff --git a/src/autofit/afblue.h b/src/autofit/afblue.h -index 6f336ab..d239e8e 100644 ---- a/src/autofit/afblue.h -+++ b/src/autofit/afblue.h -@@ -7,7 +7,7 @@ - /* */ - /* Auto-fitter data for blue strings (specification). */ - /* */ --/* Copyright 2013 by */ -+/* Copyright 2013, 2014 by */ - /* David Turner, Robert Wilhelm, and Werner Lemberg. */ - /* */ - /* This file is part of the FreeType project, and may only be used, */ -@@ -67,42 +67,42 @@ FT_BEGIN_HEADER - /* At the bottommost level, we define strings for finding blue zones. */ - - --#define AF_BLUE_STRING_MAX_LEN 25 -+#define AF_BLUE_STRING_MAX_LEN 51 - - /* The AF_Blue_String enumeration values are offsets into the */ - /* `af_blue_strings' array. */ - - typedef enum AF_Blue_String_ - { -- AF_BLUE_STRING_LATIN_CAPITAL_TOP = 0, -- AF_BLUE_STRING_LATIN_CAPITAL_BOTTOM = 9, -- AF_BLUE_STRING_LATIN_SMALL_F_TOP = 18, -- AF_BLUE_STRING_LATIN_SMALL = 26, -- AF_BLUE_STRING_LATIN_SMALL_DESCENDER = 34, -- AF_BLUE_STRING_GREEK_CAPITAL_TOP = 40, -- AF_BLUE_STRING_GREEK_CAPITAL_BOTTOM = 55, -- AF_BLUE_STRING_GREEK_SMALL_BETA_TOP = 68, -- AF_BLUE_STRING_GREEK_SMALL = 81, -- AF_BLUE_STRING_GREEK_SMALL_DESCENDER = 98, -- AF_BLUE_STRING_CYRILLIC_CAPITAL_TOP = 115, -- AF_BLUE_STRING_CYRILLIC_CAPITAL_BOTTOM = 132, -- AF_BLUE_STRING_CYRILLIC_SMALL = 149, -- AF_BLUE_STRING_CYRILLIC_SMALL_DESCENDER = 166, -- AF_BLUE_STRING_HEBREW_TOP = 173, -- AF_BLUE_STRING_HEBREW_BOTTOM = 190, -- AF_BLUE_STRING_HEBREW_DESCENDER = 203, -- af_blue_1_1 = 213, -+ AF_BLUE_STRING_CYRILLIC_CAPITAL_TOP = 0, -+ AF_BLUE_STRING_CYRILLIC_CAPITAL_BOTTOM = 17, -+ AF_BLUE_STRING_CYRILLIC_SMALL = 34, -+ AF_BLUE_STRING_CYRILLIC_SMALL_DESCENDER = 51, -+ AF_BLUE_STRING_DEVANAGARI_BASE = 58, -+ AF_BLUE_STRING_DEVANAGARI_TOP = 83, -+ AF_BLUE_STRING_DEVANAGARI_HEAD = 108, -+ AF_BLUE_STRING_DEVANAGARI_BOTTOM = 133, -+ AF_BLUE_STRING_GREEK_CAPITAL_TOP = 140, -+ AF_BLUE_STRING_GREEK_CAPITAL_BOTTOM = 155, -+ AF_BLUE_STRING_GREEK_SMALL_BETA_TOP = 168, -+ AF_BLUE_STRING_GREEK_SMALL = 181, -+ AF_BLUE_STRING_GREEK_SMALL_DESCENDER = 198, -+ AF_BLUE_STRING_HEBREW_TOP = 215, -+ AF_BLUE_STRING_HEBREW_BOTTOM = 232, -+ AF_BLUE_STRING_HEBREW_DESCENDER = 245, -+ AF_BLUE_STRING_LATIN_CAPITAL_TOP = 256, -+ AF_BLUE_STRING_LATIN_CAPITAL_BOTTOM = 265, -+ AF_BLUE_STRING_LATIN_SMALL_F_TOP = 274, -+ AF_BLUE_STRING_LATIN_SMALL = 282, -+ AF_BLUE_STRING_LATIN_SMALL_DESCENDER = 290, -+ af_blue_1_1 = 295, - #ifdef AF_CONFIG_OPTION_CJK -- AF_BLUE_STRING_CJK_TOP_FILL = af_blue_1_1 + 1, -- AF_BLUE_STRING_CJK_TOP_UNFILL = af_blue_1_1 + 77, -- AF_BLUE_STRING_CJK_BOTTOM_FILL = af_blue_1_1 + 153, -- AF_BLUE_STRING_CJK_BOTTOM_UNFILL = af_blue_1_1 + 229, -+ AF_BLUE_STRING_CJK_TOP = af_blue_1_1 + 1, -+ AF_BLUE_STRING_CJK_BOTTOM = af_blue_1_1 + 153, - af_blue_1_1_1 = af_blue_1_1 + 304, - #ifdef AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT -- AF_BLUE_STRING_CJK_LEFT_FILL = af_blue_1_1_1 + 1, -- AF_BLUE_STRING_CJK_LEFT_UNFILL = af_blue_1_1_1 + 77, -- AF_BLUE_STRING_CJK_RIGHT_FILL = af_blue_1_1_1 + 153, -- AF_BLUE_STRING_CJK_RIGHT_UNFILL = af_blue_1_1_1 + 229, -+ AF_BLUE_STRING_CJK_LEFT = af_blue_1_1_1 + 1, -+ AF_BLUE_STRING_CJK_RIGHT = af_blue_1_1_1 + 153, - af_blue_1_1_2 = af_blue_1_1_1 + 304, - #else - af_blue_1_1_2 = af_blue_1_1_1 + 0, -@@ -136,33 +136,34 @@ FT_BEGIN_HEADER - /* Properties are specific to a writing system. We assume that a given */ - /* blue string can't be used in more than a single writing system, which */ - /* is a safe bet. */ --#define AF_BLUE_PROPERTY_LATIN_TOP ( 1 << 0 ) --#define AF_BLUE_PROPERTY_LATIN_X_HEIGHT ( 1 << 1 ) --#define AF_BLUE_PROPERTY_LATIN_LONG ( 1 << 2 ) -+#define AF_BLUE_PROPERTY_LATIN_TOP ( 1 << 0 ) /* must have value 1 */ -+#define AF_BLUE_PROPERTY_LATIN_NEUTRAL ( 1 << 1 ) -+#define AF_BLUE_PROPERTY_LATIN_X_HEIGHT ( 1 << 2 ) -+#define AF_BLUE_PROPERTY_LATIN_LONG ( 1 << 3 ) - --#define AF_BLUE_PROPERTY_CJK_HORIZ ( 1 << 0 ) --#define AF_BLUE_PROPERTY_CJK_TOP ( 1 << 1 ) --#define AF_BLUE_PROPERTY_CJK_FILL ( 1 << 2 ) -+#define AF_BLUE_PROPERTY_CJK_TOP ( 1 << 0 ) /* must have value 1 */ -+#define AF_BLUE_PROPERTY_CJK_HORIZ ( 1 << 1 ) /* must have value 2 */ - #define AF_BLUE_PROPERTY_CJK_RIGHT AF_BLUE_PROPERTY_CJK_TOP - - --#define AF_BLUE_STRINGSET_MAX_LEN 9 -+#define AF_BLUE_STRINGSET_MAX_LEN 7 - - /* The AF_Blue_Stringset enumeration values are offsets into the */ - /* `af_blue_stringsets' array. */ - - typedef enum AF_Blue_Stringset_ - { -- AF_BLUE_STRINGSET_LATN = 0, -- AF_BLUE_STRINGSET_GREK = 7, -- AF_BLUE_STRINGSET_CYRL = 14, -- AF_BLUE_STRINGSET_HEBR = 20, -- af_blue_2_1 = 24, -+ AF_BLUE_STRINGSET_CYRL = 0, -+ AF_BLUE_STRINGSET_DEVA = 6, -+ AF_BLUE_STRINGSET_GREK = 12, -+ AF_BLUE_STRINGSET_HEBR = 19, -+ AF_BLUE_STRINGSET_LATN = 23, -+ af_blue_2_1 = 30, - #ifdef AF_CONFIG_OPTION_CJK - AF_BLUE_STRINGSET_HANI = af_blue_2_1 + 0, -- af_blue_2_1_1 = af_blue_2_1 + 4, -+ af_blue_2_1_1 = af_blue_2_1 + 2, - #ifdef AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT -- af_blue_2_1_2 = af_blue_2_1_1 + 4, -+ af_blue_2_1_2 = af_blue_2_1_1 + 2, - #else - af_blue_2_1_2 = af_blue_2_1_1 + 0, - #endif /* AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT */ -diff --git a/src/autofit/afblue.hin b/src/autofit/afblue.hin -index 4fc9917..0b4b48d 100644 ---- a/src/autofit/afblue.hin -+++ b/src/autofit/afblue.hin -@@ -4,7 +4,7 @@ - /* */ - /* Auto-fitter data for blue strings (specification). */ - /* */ --/* Copyright 2013 by */ -+/* Copyright 2013, 2014 by */ - /* David Turner, Robert Wilhelm, and Werner Lemberg. */ - /* */ - /* This file is part of the FreeType project, and may only be used, */ -@@ -96,13 +96,13 @@ FT_BEGIN_HEADER - /* Properties are specific to a writing system. We assume that a given */ - /* blue string can't be used in more than a single writing system, which */ - /* is a safe bet. */ --#define AF_BLUE_PROPERTY_LATIN_TOP ( 1 << 0 ) --#define AF_BLUE_PROPERTY_LATIN_X_HEIGHT ( 1 << 1 ) --#define AF_BLUE_PROPERTY_LATIN_LONG ( 1 << 2 ) -+#define AF_BLUE_PROPERTY_LATIN_TOP ( 1 << 0 ) /* must have value 1 */ -+#define AF_BLUE_PROPERTY_LATIN_NEUTRAL ( 1 << 1 ) -+#define AF_BLUE_PROPERTY_LATIN_X_HEIGHT ( 1 << 2 ) -+#define AF_BLUE_PROPERTY_LATIN_LONG ( 1 << 3 ) - --#define AF_BLUE_PROPERTY_CJK_HORIZ ( 1 << 0 ) --#define AF_BLUE_PROPERTY_CJK_TOP ( 1 << 1 ) --#define AF_BLUE_PROPERTY_CJK_FILL ( 1 << 2 ) -+#define AF_BLUE_PROPERTY_CJK_TOP ( 1 << 0 ) /* must have value 1 */ -+#define AF_BLUE_PROPERTY_CJK_HORIZ ( 1 << 1 ) /* must have value 2 */ - #define AF_BLUE_PROPERTY_CJK_RIGHT AF_BLUE_PROPERTY_CJK_TOP - - -diff --git a/src/autofit/afcjk.c b/src/autofit/afcjk.c -index 3a65fc5..048e0e7 100644 ---- a/src/autofit/afcjk.c -+++ b/src/autofit/afcjk.c -@@ -4,7 +4,7 @@ - /* */ - /* Auto-fitter hinting routines for CJK writing system (body). */ - /* */ --/* Copyright 2006-2013 by */ -+/* Copyright 2006-2014 by */ - /* David Turner, Robert Wilhelm, and Werner Lemberg. */ - /* */ - /* This file is part of the FreeType project, and may only be used, */ -@@ -178,6 +178,8 @@ - goto Exit; - - af_latin_hints_link_segments( hints, -+ 0, -+ NULL, - (AF_Dimension)dim ); - - seg = axhints->segments; -@@ -261,6 +263,8 @@ - FT_Int num_fills; - FT_Int num_flats; - -+ FT_Bool fill; -+ - AF_CJKBlue blue; - FT_Error error; - AF_CJKAxis axis; -@@ -271,22 +275,6 @@ - AF_Blue_Stringset bss = sc->blue_stringset; - const AF_Blue_StringRec* bs = &af_blue_stringsets[bss]; - --#ifdef FT_DEBUG_LEVEL_TRACE -- FT_String* cjk_blue_name[4] = -- { -- (FT_String*)"bottom", /* -- , -- */ -- (FT_String*)"top", /* -- , TOP */ -- (FT_String*)"left", /* HORIZ, -- */ -- (FT_String*)"right" /* HORIZ, TOP */ -- }; -- -- FT_String* cjk_blue_type_name[2] = -- { -- (FT_String*)"unfilled", /* -- */ -- (FT_String*)"filled" /* FILL */ -- }; --#endif -- - - /* we walk over the blue character strings as specified in the */ - /* style's entry in the `af_blue_stringset' array, computing its */ -@@ -308,15 +296,29 @@ - else - axis = &metrics->axis[AF_DIMENSION_VERT]; - -- FT_TRACE5(( "blue zone %d:\n", axis->blue_count )); -+#ifdef FT_DEBUG_LEVEL_TRACE -+ { -+ FT_String* cjk_blue_name[4] = -+ { -+ (FT_String*)"bottom", /* -- , -- */ -+ (FT_String*)"top", /* -- , TOP */ -+ (FT_String*)"left", /* HORIZ, -- */ -+ (FT_String*)"right" /* HORIZ, TOP */ -+ }; -+ -+ -+ FT_TRACE5(( "blue zone %d (%s):\n", -+ axis->blue_count, -+ cjk_blue_name[AF_CJK_IS_HORIZ_BLUE( bs ) | -+ AF_CJK_IS_TOP_BLUE( bs ) ] )); -+ } -+#endif /* FT_DEBUG_LEVEL_TRACE */ - - num_fills = 0; - num_flats = 0; - -- FT_TRACE5(( " cjk blue %s/%s\n", -- cjk_blue_name[AF_CJK_IS_HORIZ_BLUE( bs ) | -- AF_CJK_IS_TOP_BLUE( bs ) ], -- cjk_blue_type_name[!!AF_CJK_IS_FILLED_BLUE( bs )] )); -+ fill = 1; /* start with characters that define fill values */ -+ FT_TRACE5(( " [overshoot values]\n" )); - - while ( *p ) - { -@@ -330,6 +332,14 @@ - - GET_UTF8_CHAR( ch, p ); - -+ /* switch to characters that define flat values */ -+ if ( ch == '|' ) -+ { -+ fill = 0; -+ FT_TRACE5(( " [reference values]\n" )); -+ continue; -+ } -+ - /* load the character in the face -- skip unknown or empty ones */ - af_get_char_index( &metrics->root, ch, &glyph_index, &y_offset ); - if ( glyph_index == 0 ) -@@ -417,7 +427,7 @@ - FT_TRACE5(( " U+%04lX: best_pos = %5ld\n", ch, best_pos )); - } - -- if ( AF_CJK_IS_FILLED_BLUE( bs ) ) -+ if ( fill ) - fills[num_fills++] = best_pos; - else - flats[num_flats++] = best_pos; -@@ -429,15 +439,15 @@ - * we couldn't find a single glyph to compute this blue zone, - * we will simply ignore it then - */ -- FT_TRACE5(( " empty\n" )); -+ FT_TRACE5(( " empty\n" )); - continue; - } - -- /* we have computed the contents of the `fill' and `flats' tables, */ -- /* now determine the reference position of the blue zone -- */ -- /* we simply take the median value after a simple sort */ -- af_sort_pos( num_flats, flats ); -+ /* we have computed the contents of the `fill' and `flats' tables, */ -+ /* now determine the reference and overshoot position of the blue -- */ -+ /* we simply take the median value after a simple sort */ - af_sort_pos( num_fills, fills ); -+ af_sort_pos( num_flats, flats ); - - blue = &axis->blues[axis->blue_count]; - blue_ref = &blue->ref.org; -@@ -476,7 +486,7 @@ - *blue_ref = - *blue_shoot = ( shoot + ref ) / 2; - -- FT_TRACE5(( " [overshoot smaller than reference," -+ FT_TRACE5(( " [reference smaller than overshoot," - " taking mean value]\n" )); - } - } -@@ -755,10 +765,6 @@ - /* now compare each segment to the others */ - for ( seg1 = segments; seg1 < segment_limit; seg1++ ) - { -- /* the fake segments are for metrics hinting only */ -- if ( seg1->first == seg1->last ) -- continue; -- - if ( seg1->dir != major_dir ) - continue; - -@@ -1018,10 +1024,11 @@ - - edge->first = seg; - edge->last = seg; -+ edge->dir = seg->dir; - edge->fpos = seg->pos; -- edge->opos = edge->pos = FT_MulFix( seg->pos, scale ); -+ edge->opos = FT_MulFix( seg->pos, scale ); -+ edge->pos = edge->opos; - seg->edge_next = seg; -- edge->dir = seg->dir; - } - else - { -@@ -1230,8 +1237,10 @@ - /* zone, check for left edges */ - /* */ - /* of course, that's for TrueType */ -- is_top_right_blue = FT_BOOL( blue->flags & AF_CJK_BLUE_TOP ); -- is_major_dir = FT_BOOL( edge->dir == axis->major_dir ); -+ is_top_right_blue = -+ (FT_Byte)( ( blue->flags & AF_CJK_BLUE_TOP ) != 0 ); -+ is_major_dir = -+ FT_BOOL( edge->dir == axis->major_dir ); - - /* if it is a top zone, the edge must be against the major */ - /* direction; if it is a bottom zone, it must be in the major */ -@@ -1528,6 +1537,12 @@ - - - stem_edge->pos = base_edge->pos + fitted_width; -+ -+ FT_TRACE5(( " CJKLINK: edge %d @%d (opos=%.2f) linked to %.2f," -+ " dist was %.2f, now %.2f\n", -+ stem_edge - hints->axis[dim].edges, stem_edge->fpos, -+ stem_edge->opos / 64.0, stem_edge->pos / 64.0, -+ dist / 64.0, fitted_width / 64.0 )); - } - - -diff --git a/src/autofit/afcjk.h b/src/autofit/afcjk.h -index a260b09..4dd4f39 100644 ---- a/src/autofit/afcjk.h -+++ b/src/autofit/afcjk.h -@@ -4,7 +4,7 @@ - /* */ - /* Auto-fitter hinting routines for CJK writing system (specification). */ - /* */ --/* Copyright 2006, 2007, 2011-2013 by */ -+/* Copyright 2006, 2007, 2011-2014 by */ - /* David Turner, Robert Wilhelm, and Werner Lemberg. */ - /* */ - /* This file is part of the FreeType project, and may only be used, */ -@@ -50,8 +50,6 @@ FT_BEGIN_HEADER - ( (b)->properties & AF_BLUE_PROPERTY_CJK_TOP ) - #define AF_CJK_IS_HORIZ_BLUE( b ) \ - ( (b)->properties & AF_BLUE_PROPERTY_CJK_HORIZ ) --#define AF_CJK_IS_FILLED_BLUE( b ) \ -- ( (b)->properties & AF_BLUE_PROPERTY_CJK_FILL ) - #define AF_CJK_IS_RIGHT_BLUE AF_CJK_IS_TOP_BLUE - - #define AF_CJK_MAX_WIDTHS 16 -diff --git a/src/autofit/afglobal.c b/src/autofit/afglobal.c -index 7aa2e11..a54c20c 100644 ---- a/src/autofit/afglobal.c -+++ b/src/autofit/afglobal.c -@@ -138,7 +138,7 @@ - FT_Byte* gstyles = globals->glyph_styles; - FT_UInt ss; - FT_UInt i; -- FT_UInt dflt = -1; -+ FT_UInt dflt = ~0U; /* a non-valid value */ - - - /* the value AF_STYLE_UNASSIGNED means `uncovered glyph' */ -@@ -176,7 +176,8 @@ - */ - if ( style_class->coverage == AF_COVERAGE_DEFAULT ) - { -- if ( style_class->script == globals->module->default_script ) -+ if ( (FT_UInt)style_class->script == -+ globals->module->default_script ) - dflt = ss; - - for ( range = script_class->script_uni_ranges; -@@ -332,8 +333,8 @@ - af_face_globals_free( globals ); - globals = NULL; - } -- -- globals->increase_x_height = AF_PROP_INCREASE_X_HEIGHT_MAX; -+ else -+ globals->increase_x_height = AF_PROP_INCREASE_X_HEIGHT_MAX; - - Exit: - *aglobals = globals; -diff --git a/src/autofit/afglobal.h b/src/autofit/afglobal.h -index d2da40e..38d8d69 100644 ---- a/src/autofit/afglobal.h -+++ b/src/autofit/afglobal.h -@@ -66,16 +66,16 @@ FT_BEGIN_HEADER - - /* index of fallback style in `af_style_classes' */ - #ifdef AF_CONFIG_OPTION_CJK --#define AF_STYLE_FALLBACK AF_STYLE_HANI_DFLT -+#define AF_STYLE_FALLBACK AF_STYLE_HANI_DFLT - #else --#define AF_STYLE_FALLBACK AF_STYLE_NONE_DFLT -+#define AF_STYLE_FALLBACK AF_STYLE_NONE_DFLT - #endif - /* default script for OpenType; ignored if HarfBuzz isn't used */ --#define AF_SCRIPT_DEFAULT AF_SCRIPT_LATN -+#define AF_SCRIPT_DEFAULT AF_SCRIPT_LATN - /* a bit mask indicating an uncovered glyph */ - #define AF_STYLE_UNASSIGNED 0x7F - /* if this flag is set, we have an ASCII digit */ --#define AF_DIGIT 0x80 -+#define AF_DIGIT 0x80 - - /* `increase-x-height' property */ - #define AF_PROP_INCREASE_X_HEIGHT_MIN 6 -diff --git a/src/autofit/afhints.c b/src/autofit/afhints.c -index 270a06b..9fbc541 100644 ---- a/src/autofit/afhints.c -+++ b/src/autofit/afhints.c -@@ -74,7 +74,8 @@ - } - - -- /* Get new edge for given axis, direction, and position. */ -+ /* Get new edge for given axis, direction, and position, */ -+ /* without initializing the edge itself. */ - - FT_LOCAL( FT_Error ) - af_axis_hints_new_edge( AF_AxisHints axis, -@@ -130,10 +131,6 @@ - - axis->num_edges++; - -- FT_ZERO( edge ); -- edge->fpos = (FT_Short)fpos; -- edge->dir = (FT_Char)dir; -- - Exit: - *anedge = edge; - return error; -@@ -204,7 +201,7 @@ - - for ( point = points; point < limit; point++ ) - AF_DUMP(( " [ %5d | %5d | %5d | %6.2f | %6.2f" -- " | %5.2f | %5.2f | %c%c%c%c%c%c ]\n", -+ " | %5.2f | %5.2f | %c ]\n", - point - points, - point->fx, - point->fy, -@@ -212,12 +209,7 @@ - point->oy / 64.0, - point->x / 64.0, - point->y / 64.0, -- ( point->flags & AF_FLAG_WEAK_INTERPOLATION ) ? 'w' : ' ', -- ( point->flags & AF_FLAG_INFLECTION ) ? 'i' : ' ', -- ( point->flags & AF_FLAG_EXTREMA_X ) ? '<' : ' ', -- ( point->flags & AF_FLAG_EXTREMA_Y ) ? 'v' : ' ', -- ( point->flags & AF_FLAG_ROUND_X ) ? '(' : ' ', -- ( point->flags & AF_FLAG_ROUND_Y ) ? 'u' : ' ')); -+ ( point->flags & AF_FLAG_WEAK_INTERPOLATION ) ? 'w' : ' ')); - AF_DUMP(( "\n" )); - } - #ifdef __cplusplus -@@ -651,6 +643,9 @@ - - for ( point = points; point < point_limit; point++, vec++, tag++ ) - { -+ point->in_dir = (FT_Char)AF_DIR_NONE; -+ point->out_dir = (FT_Char)AF_DIR_NONE; -+ - point->fx = (FT_Short)vec->x; - point->fy = (FT_Short)vec->y; - point->ox = point->x = FT_MulFix( vec->x, x_scale ) + x_delta; -@@ -698,91 +693,186 @@ - } - } - -- /* compute directions of in & out vectors */ - { -- AF_Point first = points; -- AF_Point prev = NULL; -- FT_Pos in_x = 0; -- FT_Pos in_y = 0; -- AF_Direction in_dir = AF_DIR_NONE; -- -- FT_Pos last_good_in_x = 0; -- FT_Pos last_good_in_y = 0; -- -+ /* -+ * Compute directions of `in' and `out' vectors. -+ * -+ * Note that distances between points that are very near to each -+ * other are accumulated. In other words, the auto-hinter -+ * prepends the small vectors between near points to the first -+ * non-near vector. All intermediate points are tagged as -+ * weak; the directions are adjusted also to be equal to the -+ * accumulated one. -+ */ -+ -+ /* value 20 in `near_limit' is heuristic */ - FT_UInt units_per_em = hints->metrics->scaler.face->units_per_EM; - FT_Int near_limit = 20 * units_per_em / 2048; -+ FT_Int near_limit2 = 2 * near_limit - 1; - -+ AF_Point* contour; -+ AF_Point* contour_limit = hints->contours + hints->num_contours; - -- for ( point = points; point < point_limit; point++ ) -+ -+ for ( contour = hints->contours; contour < contour_limit; contour++ ) - { -- AF_Point next; -- FT_Pos out_x, out_y; -+ AF_Point first = *contour; -+ AF_Point next, prev, curr; -+ -+ FT_Pos out_x, out_y; - -+ FT_Bool is_first; - -- if ( point == first ) -+ -+ /* since the first point of a contour could be part of a */ -+ /* series of near points, go backwards to find the first */ -+ /* non-near point and adjust `first' */ -+ -+ point = first; -+ prev = first->prev; -+ -+ while ( prev != first ) - { -- prev = first->prev; -+ out_x = point->fx - prev->fx; -+ out_y = point->fy - prev->fy; -+ -+ /* -+ * We use Taxicab metrics to measure the vector length. -+ * -+ * Note that the accumulated distances so far could have the -+ * opposite direction of the distance measured here. For this -+ * reason we use `near_limit2' for the comparison to get a -+ * non-near point even in the worst case. -+ */ -+ if ( FT_ABS( out_x ) + FT_ABS( out_y ) >= near_limit2 ) -+ break; -+ -+ point = prev; -+ prev = prev->prev; -+ } - -- in_x = first->fx - prev->fx; -- in_y = first->fy - prev->fy; -+ /* adjust first point */ -+ first = point; - -- last_good_in_x = in_x; -- last_good_in_y = in_y; -+ /* now loop over all points of the contour to get */ -+ /* `in' and `out' vector directions */ - -- if ( FT_ABS( in_x ) + FT_ABS( in_y ) < near_limit ) -- { -- /* search first non-near point to get a good `in_dir' value */ -+ curr = first; - -- AF_Point point_ = prev; -+ /* -+ * We abuse the `u' and `v' fields to store index deltas to the -+ * next and previous non-near point, respectively. -+ * -+ * To avoid problems with not having non-near points, we point to -+ * `first' by default as the next non-near point. -+ * -+ */ -+ curr->u = (FT_Pos)( first - curr ); -+ first->v = -curr->u; - -+ out_x = 0; -+ out_y = 0; - -- while ( point_ != first ) -- { -- AF_Point prev_ = point_->prev; -+ is_first = 1; - -- FT_Pos in_x_ = point_->fx - prev_->fx; -- FT_Pos in_y_ = point_->fy - prev_->fy; -+ for ( point = first; -+ point != first || is_first; -+ point = point->next ) -+ { -+ AF_Direction out_dir; - - -- if ( FT_ABS( in_x_ ) + FT_ABS( in_y_ ) >= near_limit ) -- { -- last_good_in_x = in_x_; -- last_good_in_y = in_y_; -+ is_first = 0; - -- break; -- } -+ next = point->next; - -- point_ = prev_; -- } -+ out_x += next->fx - point->fx; -+ out_y += next->fy - point->fy; -+ -+ if ( FT_ABS( out_x ) + FT_ABS( out_y ) < near_limit ) -+ { -+ next->flags |= AF_FLAG_WEAK_INTERPOLATION; -+ continue; -+ } -+ -+ curr->u = (FT_Pos)( next - curr ); -+ next->v = -curr->u; -+ -+ out_dir = af_direction_compute( out_x, out_y ); -+ -+ /* adjust directions for all points inbetween; */ -+ /* the loop also updates position of `curr' */ -+ curr->out_dir = (FT_Char)out_dir; -+ for ( curr = curr->next; curr != next; curr = curr->next ) -+ { -+ curr->in_dir = (FT_Char)out_dir; -+ curr->out_dir = (FT_Char)out_dir; - } -+ next->in_dir = (FT_Char)out_dir; - -- in_dir = af_direction_compute( in_x, in_y ); -- first = prev + 1; -+ curr->u = (FT_Pos)( first - curr ); -+ first->v = -curr->u; -+ -+ out_x = 0; -+ out_y = 0; - } -+ } - -- point->in_dir = (FT_Char)in_dir; -+ /* -+ * The next step is to `simplify' an outline's topology so that we -+ * can identify local extrema more reliably: A series of -+ * non-horizontal or non-vertical vectors pointing into the same -+ * quadrant are handled as a single, long vector. From a -+ * topological point of the view, the intermediate points are of no -+ * interest and thus tagged as weak. -+ */ - -- /* check whether the current point is near to the previous one */ -- /* (value 20 in `near_limit' is heuristic; we use Taxicab */ -- /* metrics for the test) */ -+ for ( point = points; point < point_limit; point++ ) -+ { -+ if ( point->flags & AF_FLAG_WEAK_INTERPOLATION ) -+ continue; - -- if ( FT_ABS( in_x ) + FT_ABS( in_y ) < near_limit ) -- point->flags |= AF_FLAG_NEAR; -- else -+ if ( point->in_dir == AF_DIR_NONE && -+ point->out_dir == AF_DIR_NONE ) - { -- last_good_in_x = in_x; -- last_good_in_y = in_y; -- } -+ /* check whether both vectors point into the same quadrant */ -+ -+ FT_Pos in_x, in_y; -+ FT_Pos out_x, out_y; -+ -+ AF_Point next_u = point + point->u; -+ AF_Point prev_v = point + point->v; -+ - -- next = point->next; -- out_x = next->fx - point->fx; -- out_y = next->fy - point->fy; -+ in_x = point->fx - prev_v->fx; -+ in_y = point->fy - prev_v->fy; -+ -+ out_x = next_u->fx - point->fx; -+ out_y = next_u->fy - point->fy; -+ -+ if ( ( in_x ^ out_x ) >= 0 && ( in_y ^ out_y ) >= 0 ) -+ { -+ /* yes, so tag current point as weak */ -+ /* and update index deltas */ -+ -+ point->flags |= AF_FLAG_WEAK_INTERPOLATION; -+ -+ prev_v->u = (FT_Pos)( next_u - prev_v ); -+ next_u->v = -prev_v->u; -+ } -+ } -+ } - -- in_dir = af_direction_compute( out_x, out_y ); -- point->out_dir = (FT_Char)in_dir; -+ /* -+ * Finally, check for remaining weak points. Everything else not -+ * collected in edges so far is then implicitly classified as strong -+ * points. -+ */ - -- /* Check for weak points. The remaining points not collected */ -- /* in edges are then implicitly classified as strong points. */ -+ for ( point = points; point < point_limit; point++ ) -+ { -+ if ( point->flags & AF_FLAG_WEAK_INTERPOLATION ) -+ continue; - - if ( point->flags & AF_FLAG_CONTROL ) - { -@@ -799,18 +889,25 @@ - goto Is_Weak_Point; - } - -- /* test whether `in' and `out' direction is approximately */ -- /* the same (and use the last good `in' vector in case */ -- /* the current point is near to the previous one) */ -- if ( ft_corner_is_flat( -- point->flags & AF_FLAG_NEAR ? last_good_in_x : in_x, -- point->flags & AF_FLAG_NEAR ? last_good_in_y : in_y, -- out_x, -- out_y ) ) - { -- /* current point lies on a straight, diagonal line */ -- /* (more or less) */ -- goto Is_Weak_Point; -+ AF_Point next_u = point + point->u; -+ AF_Point prev_v = point + point->v; -+ -+ -+ if ( ft_corner_is_flat( point->fx - prev_v->fx, -+ point->fy - prev_v->fy, -+ next_u->fx - point->fx, -+ next_u->fy - point->fy ) ) -+ { -+ /* either the `in' or the `out' vector is much more */ -+ /* dominant than the other one, so tag current point */ -+ /* as weak and update index deltas */ -+ -+ prev_v->u = (FT_Pos)( next_u - prev_v ); -+ next_u->v = -prev_v->u; -+ -+ goto Is_Weak_Point; -+ } - } - } - else if ( point->in_dir == -point->out_dir ) -@@ -818,9 +915,6 @@ - /* current point forms a spike */ - goto Is_Weak_Point; - } -- -- in_x = out_x; -- in_y = out_y; - } - } - } -@@ -977,8 +1071,7 @@ - /* if this point is candidate to weak interpolation, we */ - /* interpolate it after all strong points have been processed */ - -- if ( ( point->flags & AF_FLAG_WEAK_INTERPOLATION ) && -- !( point->flags & AF_FLAG_INFLECTION ) ) -+ if ( ( point->flags & AF_FLAG_WEAK_INTERPOLATION ) ) - continue; - - if ( dim == AF_DIMENSION_VERT ) -diff --git a/src/autofit/afhints.h b/src/autofit/afhints.h -index 5f1507f..92101de 100644 ---- a/src/autofit/afhints.h -+++ b/src/autofit/afhints.h -@@ -4,7 +4,7 @@ - /* */ - /* Auto-fitter hinting routines (specification). */ - /* */ --/* Copyright 2003-2008, 2010-2012 by */ -+/* Copyright 2003-2008, 2010-2012, 2014 by */ - /* David Turner, Robert Wilhelm, and Werner Lemberg. */ - /* */ - /* This file is part of the FreeType project, and may only be used, */ -@@ -72,13 +72,9 @@ FT_BEGIN_HEADER - * `af_{cjk,latin,...}_hints_compute_segments' are the functions to - * find segments in an outline. - * -- * A segment is a series of consecutive points that are approximately -- * aligned along a coordinate axis. The analysis to do so is specific -- * to a writing system. -- * -- * A segment must have at least two points, except in the case of -- * `fake' segments that are generated to hint metrics appropriately, -- * and which consist of a single point. -+ * A segment is a series of at least two consecutive points that are -+ * approximately aligned along a coordinate axis. The analysis to do -+ * so is specific to a writing system. - * - * - * Edges -@@ -148,7 +144,7 @@ FT_BEGIN_HEADER - * Serifs are detected by `af_{cjk,latin,...}_hint_edges'. - * - * In comparison to a stem, a serif (as handled by the auto-hinter -- * module which takes care of the `latin' writing system) has -+ * module that takes care of the `latin' writing system) has - * - * best segment_1 = segment_2 && best segment_2 != segment_1 - * -@@ -178,19 +174,19 @@ FT_BEGIN_HEADER - * - * Strong Points - * -- * Experience has shown that points which are not part of an edge need -- * to be interpolated linearly between their two closest edges, even if -- * these are not part of the contour of those particular points. -- * Typical candidates for this are -+ * Experience has shown that points not part of an edge need to be -+ * interpolated linearly between their two closest edges, even if these -+ * are not part of the contour of those particular points. Typical -+ * candidates for this are - * - * - angle points (i.e., points where the `in' and `out' direction - * differ greatly) - * - * - inflection points (i.e., where the `in' and `out' angles are the - * same, but the curvature changes sign) [currently, such points -- * aren't handled in the auto-hinter] -+ * aren't handled specially in the auto-hinter] - * -- * `af_glyph_hints_align_strong_points' is the function which takes -+ * `af_glyph_hints_align_strong_points' is the function that takes - * care of such situations; it is equivalent to the TrueType `IP' - * hinting instruction. - * -@@ -220,26 +216,12 @@ FT_BEGIN_HEADER - AF_FLAG_CUBIC = 1 << 1, - AF_FLAG_CONTROL = AF_FLAG_CONIC | AF_FLAG_CUBIC, - -- /* point extremum flags */ -- AF_FLAG_EXTREMA_X = 1 << 2, -- AF_FLAG_EXTREMA_Y = 1 << 3, -- -- /* point roundness flags */ -- AF_FLAG_ROUND_X = 1 << 4, -- AF_FLAG_ROUND_Y = 1 << 5, -- - /* point touch flags */ -- AF_FLAG_TOUCH_X = 1 << 6, -- AF_FLAG_TOUCH_Y = 1 << 7, -+ AF_FLAG_TOUCH_X = 1 << 2, -+ AF_FLAG_TOUCH_Y = 1 << 3, - - /* candidates for weak interpolation have this flag set */ -- AF_FLAG_WEAK_INTERPOLATION = 1 << 8, -- -- /* all inflection points in the outline have this flag set */ -- AF_FLAG_INFLECTION = 1 << 9, -- -- /* the current point is very near to another one */ -- AF_FLAG_NEAR = 1 << 10 -+ AF_FLAG_WEAK_INTERPOLATION = 1 << 4 - - } AF_Flags; - -@@ -247,10 +229,11 @@ FT_BEGIN_HEADER - /* edge hint flags */ - typedef enum AF_Edge_Flags_ - { -- AF_EDGE_NORMAL = 0, -- AF_EDGE_ROUND = 1 << 0, -- AF_EDGE_SERIF = 1 << 1, -- AF_EDGE_DONE = 1 << 2 -+ AF_EDGE_NORMAL = 0, -+ AF_EDGE_ROUND = 1 << 0, -+ AF_EDGE_SERIF = 1 << 1, -+ AF_EDGE_DONE = 1 << 2, -+ AF_EDGE_NEUTRAL = 1 << 3 /* set if edge aligns to a neutral blue zone */ - - } AF_Edge_Flags; - -diff --git a/src/autofit/aflatin.c b/src/autofit/aflatin.c -index e3a7742..36a3689 100644 ---- a/src/autofit/aflatin.c -+++ b/src/autofit/aflatin.c -@@ -171,7 +171,15 @@ - if ( error ) - goto Exit; - -+ /* -+ * We assume that the glyphs selected for the stem width -+ * computation are `featureless' enough so that the linking -+ * algorithm works fine without adjustments of its scoring -+ * function. -+ */ - af_latin_hints_link_segments( hints, -+ 0, -+ NULL, - (AF_Dimension)dim ); - - seg = axhints->segments; -@@ -298,6 +306,14 @@ - have_flag = 1; - } - -+ if ( AF_LATIN_IS_NEUTRAL_BLUE( bs ) ) -+ { -+ if ( have_flag ) -+ FT_TRACE5(( ", " )); -+ FT_TRACE5(( "neutral" )); -+ have_flag = 1; -+ } -+ - if ( AF_LATIN_IS_X_HEIGHT_BLUE( bs ) ) - { - if ( have_flag ) -@@ -520,6 +536,13 @@ - FT_Int last; - FT_Bool hit; - -+ /* we intentionally declare these two variables */ -+ /* outside of the loop since various compilers emit */ -+ /* incorrect warning messages otherwise, talking about */ -+ /* `possibly uninitialized variables' */ -+ FT_Int p_first = 0; /* make compiler happy */ -+ FT_Int p_last = 0; -+ - FT_Bool left2right; - - -@@ -552,7 +575,6 @@ - { - FT_Bool l2r; - FT_Pos d; -- FT_Int p_first, p_last; - - - if ( !hit ) -@@ -688,6 +710,13 @@ - FT_CURVE_TAG( outline.tags[best_segment_last] ) != - FT_CURVE_TAG_ON ); - -+ if ( round && AF_LATIN_IS_NEUTRAL_BLUE( bs ) ) -+ { -+ /* only use flat segments for a neutral blue zone */ -+ FT_TRACE5(( " (round, skipped)\n" )); -+ continue; -+ } -+ - FT_TRACE5(( " (%s)\n", round ? "round" : "flat" )); - } - -@@ -758,6 +787,8 @@ - blue->flags = 0; - if ( AF_LATIN_IS_TOP_BLUE( bs ) ) - blue->flags |= AF_LATIN_BLUE_TOP; -+ if ( AF_LATIN_IS_NEUTRAL_BLUE( bs ) ) -+ blue->flags |= AF_LATIN_BLUE_NEUTRAL; - - /* - * The following flag is used later to adjust the y and x scales -@@ -1262,17 +1293,19 @@ - /* this is the start of a new segment! */ - segment_dir = (AF_Direction)point->out_dir; - -- /* clear all segment fields */ - error = af_axis_hints_new_segment( axis, memory, &segment ); - if ( error ) - goto Exit; - -- segment[0] = seg0; -+ /* clear all segment fields */ -+ segment[0] = seg0; -+ - segment->dir = (FT_Char)segment_dir; - min_pos = max_pos = point->u; - segment->first = point; - segment->last = point; -- on_edge = 1; -+ -+ on_edge = 1; - } - - point = point->next; -@@ -1296,9 +1329,6 @@ - FT_Pos last_v = last->v; - - -- if ( first == last ) -- continue; -- - if ( first_v < last_v ) - { - AF_Point p; -@@ -1337,31 +1367,44 @@ - } - - -- /* Link segments to form stems and serifs. */ -+ /* Link segments to form stems and serifs. If `width_count' and */ -+ /* `widths' are non-zero, use them to fine-tune the scoring function. */ - - FT_LOCAL_DEF( void ) - af_latin_hints_link_segments( AF_GlyphHints hints, -+ FT_UInt width_count, -+ AF_WidthRec* widths, - AF_Dimension dim ) - { - AF_AxisHints axis = &hints->axis[dim]; - AF_Segment segments = axis->segments; - AF_Segment segment_limit = segments + axis->num_segments; -- FT_Pos len_threshold, len_score; -+ FT_Pos len_threshold, len_score, dist_score, max_width; - AF_Segment seg1, seg2; - - -+ if ( width_count ) -+ max_width = widths[width_count - 1].org; -+ else -+ max_width = 0; -+ -+ /* a heuristic value to set up a minimum value for overlapping */ - len_threshold = AF_LATIN_CONSTANT( hints->metrics, 8 ); - if ( len_threshold == 0 ) - len_threshold = 1; - -+ /* a heuristic value to weight lengths */ - len_score = AF_LATIN_CONSTANT( hints->metrics, 6000 ); - -+ /* a heuristic value to weight distances (no call to */ -+ /* AF_LATIN_CONSTANT needed, since we work on multiples */ -+ /* of the stem width) */ -+ dist_score = 3000; -+ - /* now compare each segment to the others */ - for ( seg1 = segments; seg1 < segment_limit; seg1++ ) - { -- /* the fake segments are introduced to hint the metrics -- */ -- /* we must never link them to anything */ -- if ( seg1->dir != axis->major_dir || seg1->first == seg1->last ) -+ if ( seg1->dir != axis->major_dir ) - continue; - - /* search for stems having opposite directions, */ -@@ -1375,10 +1418,9 @@ - if ( seg1->dir + seg2->dir == 0 && pos2 > pos1 ) - { - /* compute distance between the two segments */ -- FT_Pos dist = pos2 - pos1; -- FT_Pos min = seg1->min_coord; -- FT_Pos max = seg1->max_coord; -- FT_Pos len, score; -+ FT_Pos min = seg1->min_coord; -+ FT_Pos max = seg1->max_coord; -+ FT_Pos len; - - - if ( min < seg2->min_coord ) -@@ -1388,15 +1430,49 @@ - max = seg2->max_coord; - - /* compute maximum coordinate difference of the two segments */ -+ /* (this is, how much they overlap) */ - len = max - min; - if ( len >= len_threshold ) - { -- /* small coordinate differences cause a higher score, and */ -- /* segments with a greater distance cause a higher score also */ -- score = dist + len_score / len; -+ /* -+ * The score is the sum of two demerits indicating the -+ * `badness' of a fit, measured along the segments' main axis -+ * and orthogonal to it, respectively. -+ * -+ * o The less overlapping along the main axis, the worse it -+ * is, causing a larger demerit. -+ * -+ * o The nearer the orthogonal distance to a stem width, the -+ * better it is, causing a smaller demerit. For simplicity, -+ * however, we only increase the demerit for values that -+ * exceed the largest stem width. -+ */ -+ -+ FT_Pos dist = pos2 - pos1; -+ -+ FT_Pos dist_demerit, score; -+ -+ -+ if ( max_width ) -+ { -+ /* distance demerits are based on multiples of `max_width'; */ -+ /* we scale by 1024 for getting more precision */ -+ FT_Pos delta = ( dist << 10 ) / max_width - ( 1 << 10 ); -+ -+ -+ if ( delta > 10000 ) -+ dist_demerit = 32000; -+ else if ( delta > 0 ) -+ dist_demerit = delta * delta / dist_score; -+ else -+ dist_demerit = 0; -+ } -+ else -+ dist_demerit = dist; /* default if no widths available */ -+ -+ score = dist_demerit + len_score / len; - - /* and we search for the smallest score */ -- /* of the sum of the two values */ - if ( score < seg1->score ) - { - seg1->score = score; -@@ -1728,6 +1804,8 @@ - - FT_LOCAL_DEF( FT_Error ) - af_latin_hints_detect_features( AF_GlyphHints hints, -+ FT_UInt width_count, -+ AF_WidthRec* widths, - AF_Dimension dim ) - { - FT_Error error; -@@ -1736,7 +1814,7 @@ - error = af_latin_hints_compute_segments( hints, dim ); - if ( !error ) - { -- af_latin_hints_link_segments( hints, dim ); -+ af_latin_hints_link_segments( hints, width_count, widths, dim ); - - error = af_latin_hints_compute_edges( hints, dim ); - } -@@ -1765,8 +1843,9 @@ - for ( ; edge < edge_limit; edge++ ) - { - FT_UInt bb; -- AF_Width best_blue = NULL; -- FT_Pos best_dist; /* initial threshold */ -+ AF_Width best_blue = NULL; -+ FT_Bool best_blue_is_neutral = 0; -+ FT_Pos best_dist; /* initial threshold */ - - - /* compute the initial threshold as a fraction of the EM size */ -@@ -1780,24 +1859,26 @@ - for ( bb = 0; bb < latin->blue_count; bb++ ) - { - AF_LatinBlue blue = latin->blues + bb; -- FT_Bool is_top_blue, is_major_dir; -+ FT_Bool is_top_blue, is_neutral_blue, is_major_dir; - - - /* skip inactive blue zones (i.e., those that are too large) */ - if ( !( blue->flags & AF_LATIN_BLUE_ACTIVE ) ) - continue; - -- /* if it is a top zone, check for right edges -- if it is a bottom */ -- /* zone, check for left edges */ -- /* */ -- /* of course, that's for TrueType */ -- is_top_blue = (FT_Byte)( ( blue->flags & AF_LATIN_BLUE_TOP ) != 0 ); -- is_major_dir = FT_BOOL( edge->dir == axis->major_dir ); -- -- /* if it is a top zone, the edge must be against the major */ -- /* direction; if it is a bottom zone, it must be in the major */ -- /* direction */ -- if ( is_top_blue ^ is_major_dir ) -+ /* if it is a top zone, check for right edges (against the major */ -+ /* direction); if it is a bottom zone, check for left edges (in */ -+ /* the major direction) -- this assumes the TrueType convention */ -+ /* for the orientation of contours */ -+ is_top_blue = -+ (FT_Byte)( ( blue->flags & AF_LATIN_BLUE_TOP ) != 0 ); -+ is_neutral_blue = -+ (FT_Byte)( ( blue->flags & AF_LATIN_BLUE_NEUTRAL ) != 0); -+ is_major_dir = -+ FT_BOOL( edge->dir == axis->major_dir ); -+ -+ /* neutral blue zones are handled for both directions */ -+ if ( is_top_blue ^ is_major_dir || is_neutral_blue ) - { - FT_Pos dist; - -@@ -1810,15 +1891,19 @@ - dist = FT_MulFix( dist, scale ); - if ( dist < best_dist ) - { -- best_dist = dist; -- best_blue = &blue->ref; -+ best_dist = dist; -+ best_blue = &blue->ref; -+ best_blue_is_neutral = is_neutral_blue; - } - - /* now compare it to the overshoot position and check whether */ - /* the edge is rounded, and whether the edge is over the */ - /* reference position of a top zone, or under the reference */ -- /* position of a bottom zone */ -- if ( edge->flags & AF_EDGE_ROUND && dist != 0 ) -+ /* position of a bottom zone (provided we don't have a */ -+ /* neutral blue zone) */ -+ if ( edge->flags & AF_EDGE_ROUND && -+ dist != 0 && -+ !is_neutral_blue ) - { - FT_Bool is_under_ref = FT_BOOL( edge->fpos < blue->ref.org ); - -@@ -1832,8 +1917,9 @@ - dist = FT_MulFix( dist, scale ); - if ( dist < best_dist ) - { -- best_dist = dist; -- best_blue = &blue->shoot; -+ best_dist = dist; -+ best_blue = &blue->shoot; -+ best_blue_is_neutral = is_neutral_blue; - } - } - } -@@ -1841,7 +1927,11 @@ - } - - if ( best_blue ) -+ { - edge->blue_edge = best_blue; -+ if ( best_blue_is_neutral ) -+ edge->flags |= AF_EDGE_NEUTRAL; -+ } - } - } - -@@ -2159,7 +2249,7 @@ - - FT_TRACE5(( " LINK: edge %d (opos=%.2f) linked to %.2f," - " dist was %.2f, now %.2f\n", -- stem_edge-hints->axis[dim].edges, stem_edge->opos / 64.0, -+ stem_edge - hints->axis[dim].edges, stem_edge->opos / 64.0, - stem_edge->pos / 64.0, dist / 64.0, fitted_width / 64.0 )); - } - -@@ -2226,14 +2316,41 @@ - if ( edge->flags & AF_EDGE_DONE ) - continue; - -- blue = edge->blue_edge; - edge1 = NULL; - edge2 = edge->link; - -+ /* -+ * If a stem contains both a neutral and a non-neutral blue zone, -+ * skip the neutral one. Otherwise, outlines with different -+ * directions might be incorrectly aligned at the same vertical -+ * position. -+ * -+ * If we have two neutral blue zones, skip one of them. -+ * -+ */ -+ if ( edge->blue_edge && edge2 && edge2->blue_edge ) -+ { -+ FT_Byte neutral = edge->flags & AF_EDGE_NEUTRAL; -+ FT_Byte neutral2 = edge2->flags & AF_EDGE_NEUTRAL; -+ -+ -+ if ( ( neutral && neutral2 ) || neutral2 ) -+ { -+ edge2->blue_edge = NULL; -+ edge2->flags &= ~AF_EDGE_NEUTRAL; -+ } -+ else if ( neutral ) -+ { -+ edge->blue_edge = NULL; -+ edge->flags &= ~AF_EDGE_NEUTRAL; -+ } -+ } -+ -+ blue = edge->blue_edge; - if ( blue ) - edge1 = edge; - -- /* flip edges if the other stem is aligned to a blue zone */ -+ /* flip edges if the other edge is aligned to a blue zone */ - else if ( edge2 && edge2->blue_edge ) - { - blue = edge2->blue_edge; -@@ -2300,7 +2417,7 @@ - /* this should not happen, but it's better to be safe */ - if ( edge2->blue_edge ) - { -- FT_TRACE5(( " ASSERTION FAILED for edge %d\n", edge2-edges )); -+ FT_TRACE5(( " ASSERTION FAILED for edge %d\n", edge2 - edges )); - - af_latin_align_linked_edge( hints, dim, edge2, edge ); - edge->flags |= AF_EDGE_DONE; -@@ -2689,6 +2806,8 @@ - FT_Error error; - int dim; - -+ AF_LatinAxis axis; -+ - - error = af_glyph_hints_reload( hints, outline ); - if ( error ) -@@ -2702,14 +2821,22 @@ - if ( AF_HINTS_DO_HORIZONTAL( hints ) ) - #endif - { -- error = af_latin_hints_detect_features( hints, AF_DIMENSION_HORZ ); -+ axis = &metrics->axis[AF_DIMENSION_HORZ]; -+ error = af_latin_hints_detect_features( hints, -+ axis->width_count, -+ axis->widths, -+ AF_DIMENSION_HORZ ); - if ( error ) - goto Exit; - } - - if ( AF_HINTS_DO_VERTICAL( hints ) ) - { -- error = af_latin_hints_detect_features( hints, AF_DIMENSION_VERT ); -+ axis = &metrics->axis[AF_DIMENSION_VERT]; -+ error = af_latin_hints_detect_features( hints, -+ axis->width_count, -+ axis->widths, -+ AF_DIMENSION_VERT ); - if ( error ) - goto Exit; - -diff --git a/src/autofit/aflatin.h b/src/autofit/aflatin.h -index a958af3..2c0bfca 100644 ---- a/src/autofit/aflatin.h -+++ b/src/autofit/aflatin.h -@@ -5,7 +5,7 @@ - /* Auto-fitter hinting routines for latin writing system */ - /* (specification). */ - /* */ --/* Copyright 2003-2007, 2009, 2011-2013 by */ -+/* Copyright 2003-2007, 2009, 2011-2014 by */ - /* David Turner, Robert Wilhelm, and Werner Lemberg. */ - /* */ - /* This file is part of the FreeType project, and may only be used, */ -@@ -53,6 +53,8 @@ FT_BEGIN_HEADER - - #define AF_LATIN_IS_TOP_BLUE( b ) \ - ( (b)->properties & AF_BLUE_PROPERTY_LATIN_TOP ) -+#define AF_LATIN_IS_NEUTRAL_BLUE( b ) \ -+ ( (b)->properties & AF_BLUE_PROPERTY_LATIN_NEUTRAL ) - #define AF_LATIN_IS_X_HEIGHT_BLUE( b ) \ - ( (b)->properties & AF_BLUE_PROPERTY_LATIN_X_HEIGHT ) - #define AF_LATIN_IS_LONG_BLUE( b ) \ -@@ -63,10 +65,11 @@ FT_BEGIN_HEADER - - enum - { -- AF_LATIN_BLUE_ACTIVE = 1 << 0, /* set if zone height is <= 3/4px */ -- AF_LATIN_BLUE_TOP = 1 << 1, /* result of AF_LATIN_IS_TOP_BLUE */ -- AF_LATIN_BLUE_ADJUSTMENT = 1 << 2, /* used for scale adjustment */ -- /* optimization */ -+ AF_LATIN_BLUE_ACTIVE = 1 << 0, /* set if zone height is <= 3/4px */ -+ AF_LATIN_BLUE_TOP = 1 << 1, /* set if we have a top blue zone */ -+ AF_LATIN_BLUE_NEUTRAL = 1 << 2, /* set if we have neutral blue zone */ -+ AF_LATIN_BLUE_ADJUSTMENT = 1 << 3, /* used for scale adjustment */ -+ /* optimization */ - AF_LATIN_BLUE_FLAG_MAX - }; - -@@ -169,6 +172,8 @@ FT_BEGIN_HEADER - - FT_LOCAL( void ) - af_latin_hints_link_segments( AF_GlyphHints hints, -+ FT_UInt width_count, -+ AF_WidthRec* widths, - AF_Dimension dim ); - - FT_LOCAL( FT_Error ) -@@ -177,6 +182,8 @@ FT_BEGIN_HEADER - - FT_LOCAL( FT_Error ) - af_latin_hints_detect_features( AF_GlyphHints hints, -+ FT_UInt width_count, -+ AF_WidthRec* widths, - AF_Dimension dim ); - - /* */ -diff --git a/src/autofit/aflatin2.c b/src/autofit/aflatin2.c -index 930fa98..07590b3 100644 ---- a/src/autofit/aflatin2.c -+++ b/src/autofit/aflatin2.c -@@ -4,7 +4,7 @@ - /* */ - /* Auto-fitter hinting routines for latin writing system (body). */ - /* */ --/* Copyright 2003-2013 by */ -+/* Copyright 2003-2014 by */ - /* David Turner, Robert Wilhelm, and Werner Lemberg. */ - /* */ - /* This file is part of the FreeType project, and may only be used, */ -@@ -890,9 +890,6 @@ - FT_Pos last_v = last->v; - - -- if ( first == last ) -- continue; -- - if ( first_v < last_v ) - { - p = first->prev; -@@ -984,7 +981,7 @@ - #ifdef AF_SORT_SEGMENTS - for ( seg1 = segments; seg1 < segment_mid; seg1++ ) - { -- if ( seg1->dir != axis->major_dir || seg1->first == seg1->last ) -+ if ( seg1->dir != axis->major_dir ) - continue; - - for ( seg2 = segment_mid; seg2 < segment_limit; seg2++ ) -@@ -992,9 +989,7 @@ - /* now compare each segment to the others */ - for ( seg1 = segments; seg1 < segment_limit; seg1++ ) - { -- /* the fake segments are introduced to hint the metrics -- */ -- /* we must never link them to anything */ -- if ( seg1->dir != axis->major_dir || seg1->first == seg1->last ) -+ if ( seg1->dir != axis->major_dir ) - continue; - - for ( seg2 = segments; seg2 < segment_limit; seg2++ ) -@@ -1194,9 +1189,10 @@ - - edge->first = seg; - edge->last = seg; -- edge->fpos = seg->pos; - edge->dir = seg->dir; -- edge->opos = edge->pos = FT_MulFix( seg->pos, scale ); -+ edge->fpos = seg->pos; -+ edge->opos = FT_MulFix( seg->pos, scale ); -+ edge->pos = edge->opos; - seg->edge_next = seg; - } - else -diff --git a/src/autofit/afmodule.c b/src/autofit/afmodule.c -index 73bf832..181cf55 100644 ---- a/src/autofit/afmodule.c -+++ b/src/autofit/afmodule.c -@@ -103,8 +103,8 @@ - AF_StyleClass style_class = AF_STYLE_CLASSES_GET[ss]; - - -- if ( style_class->script == *fallback_script && -- style_class->coverage == AF_COVERAGE_DEFAULT ) -+ if ( (FT_UInt)style_class->script == *fallback_script && -+ style_class->coverage == AF_COVERAGE_DEFAULT ) - { - module->fallback_style = ss; - break; -diff --git a/src/autofit/afranges.c b/src/autofit/afranges.c -index 3d919b5..139a4c1 100644 ---- a/src/autofit/afranges.c -+++ b/src/autofit/afranges.c -@@ -21,51 +21,59 @@ - - const AF_Script_UniRangeRec af_cyrl_uniranges[] = - { -- AF_UNIRANGE_REC( 0x0400UL, 0x04FFUL ), /* Cyrillic */ -+ AF_UNIRANGE_REC( 0x0400UL, 0x04FFUL ), /* Cyrillic */ - AF_UNIRANGE_REC( 0x0500UL, 0x052FUL ), /* Cyrillic Supplement */ - AF_UNIRANGE_REC( 0x2DE0UL, 0x2DFFUL ), /* Cyrillic Extended-A */ - AF_UNIRANGE_REC( 0xA640UL, 0xA69FUL ), /* Cyrillic Extended-B */ - AF_UNIRANGE_REC( 0UL, 0UL ) - }; - -+ const AF_Script_UniRangeRec af_deva_uniranges[] = -+ { -+ AF_UNIRANGE_REC( 0x0900UL, 0x097FUL ), /* Devanagari */ -+ AF_UNIRANGE_REC( 0x20B9UL, 0x20B9UL ), /* (new) Rupee sign */ -+ AF_UNIRANGE_REC( 0UL, 0UL ) -+ }; -+ - const AF_Script_UniRangeRec af_grek_uniranges[] = - { - AF_UNIRANGE_REC( 0x0370UL, 0x03FFUL ), /* Greek and Coptic */ -- AF_UNIRANGE_REC( 0x1F00UL, 0x1FFFUL ), /* Greek Extended */ -+ AF_UNIRANGE_REC( 0x1F00UL, 0x1FFFUL ), /* Greek Extended */ - AF_UNIRANGE_REC( 0UL, 0UL ) - }; - - const AF_Script_UniRangeRec af_hebr_uniranges[] = - { -- AF_UNIRANGE_REC( 0x0590UL, 0x05FFUL ), /* Hebrew */ -+ AF_UNIRANGE_REC( 0x0590UL, 0x05FFUL ), /* Hebrew */ - AF_UNIRANGE_REC( 0xFB1DUL, 0xFB4FUL ), /* Alphab. Present. Forms (Hebrew) */ - AF_UNIRANGE_REC( 0UL, 0UL ) - }; - - const AF_Script_UniRangeRec af_latn_uniranges[] = - { -- AF_UNIRANGE_REC( 0x0020UL, 0x007FUL ), /* Basic Latin (no control chars) */ -- AF_UNIRANGE_REC( 0x00A0UL, 0x00FFUL ), /* Latin-1 Supplement (no control chars) */ -- AF_UNIRANGE_REC( 0x0100UL, 0x017FUL ), /* Latin Extended-A */ -- AF_UNIRANGE_REC( 0x0180UL, 0x024FUL ), /* Latin Extended-B */ -- AF_UNIRANGE_REC( 0x0250UL, 0x02AFUL ), /* IPA Extensions */ -- AF_UNIRANGE_REC( 0x02B0UL, 0x02FFUL ), /* Spacing Modifier Letters */ -- AF_UNIRANGE_REC( 0x0300UL, 0x036FUL ), /* Combining Diacritical Marks */ -- AF_UNIRANGE_REC( 0x1D00UL, 0x1D7FUL ), /* Phonetic Extensions */ -- AF_UNIRANGE_REC( 0x1D80UL, 0x1DBFUL ), /* Phonetic Extensions Supplement */ -+ AF_UNIRANGE_REC( 0x0020UL, 0x007FUL ), /* Basic Latin (no control chars) */ -+ AF_UNIRANGE_REC( 0x00A0UL, 0x00FFUL ), /* Latin-1 Supplement (no control chars) */ -+ AF_UNIRANGE_REC( 0x0100UL, 0x017FUL ), /* Latin Extended-A */ -+ AF_UNIRANGE_REC( 0x0180UL, 0x024FUL ), /* Latin Extended-B */ -+ AF_UNIRANGE_REC( 0x0250UL, 0x02AFUL ), /* IPA Extensions */ -+ AF_UNIRANGE_REC( 0x02B0UL, 0x02FFUL ), /* Spacing Modifier Letters */ -+ AF_UNIRANGE_REC( 0x0300UL, 0x036FUL ), /* Combining Diacritical Marks */ -+ AF_UNIRANGE_REC( 0x1D00UL, 0x1D7FUL ), /* Phonetic Extensions */ -+ AF_UNIRANGE_REC( 0x1D80UL, 0x1DBFUL ), /* Phonetic Extensions Supplement */ - AF_UNIRANGE_REC( 0x1DC0UL, 0x1DFFUL ), /* Combining Diacritical Marks Supplement */ -- AF_UNIRANGE_REC( 0x1E00UL, 0x1EFFUL ), /* Latin Extended Additional */ -- AF_UNIRANGE_REC( 0x2000UL, 0x206FUL ), /* General Punctuation */ -- AF_UNIRANGE_REC( 0x2070UL, 0x209FUL ), /* Superscripts and Subscripts */ -- AF_UNIRANGE_REC( 0x20A0UL, 0x20CFUL ), /* Currency Symbols */ -- AF_UNIRANGE_REC( 0x2150UL, 0x218FUL ), /* Number Forms */ -- AF_UNIRANGE_REC( 0x2460UL, 0x24FFUL ), /* Enclosed Alphanumerics */ -- AF_UNIRANGE_REC( 0x2C60UL, 0x2C7FUL ), /* Latin Extended-C */ -- AF_UNIRANGE_REC( 0x2E00UL, 0x2E7FUL ), /* Supplemental Punctuation */ -- AF_UNIRANGE_REC( 0xA720UL, 0xA7FFUL ), /* Latin Extended-D */ -- AF_UNIRANGE_REC( 0xFB00UL, 0xFB06UL ), /* Alphab. Present. Forms (Latin Ligs) */ -- AF_UNIRANGE_REC( 0x1D400UL, 0x1D7FFUL ), /* Mathematical Alphanumeric Symbols */ -- AF_UNIRANGE_REC( 0x1F100UL, 0x1F1FFUL ), /* Enclosed Alphanumeric Supplement */ -+ AF_UNIRANGE_REC( 0x1E00UL, 0x1EFFUL ), /* Latin Extended Additional */ -+ AF_UNIRANGE_REC( 0x2000UL, 0x206FUL ), /* General Punctuation */ -+ AF_UNIRANGE_REC( 0x2070UL, 0x209FUL ), /* Superscripts and Subscripts */ -+ AF_UNIRANGE_REC( 0x20A0UL, 0x20B8UL ), /* Currency Symbols ... */ -+ AF_UNIRANGE_REC( 0x20BAUL, 0x20CFUL ), /* ... except new Rupee sign */ -+ AF_UNIRANGE_REC( 0x2150UL, 0x218FUL ), /* Number Forms */ -+ AF_UNIRANGE_REC( 0x2460UL, 0x24FFUL ), /* Enclosed Alphanumerics */ -+ AF_UNIRANGE_REC( 0x2C60UL, 0x2C7FUL ), /* Latin Extended-C */ -+ AF_UNIRANGE_REC( 0x2E00UL, 0x2E7FUL ), /* Supplemental Punctuation */ -+ AF_UNIRANGE_REC( 0xA720UL, 0xA7FFUL ), /* Latin Extended-D */ -+ AF_UNIRANGE_REC( 0xFB00UL, 0xFB06UL ), /* Alphab. Present. Forms (Latin Ligs) */ -+ AF_UNIRANGE_REC( 0x1D400UL, 0x1D7FFUL ), /* Mathematical Alphanumeric Symbols */ -+ AF_UNIRANGE_REC( 0x1F100UL, 0x1F1FFUL ), /* Enclosed Alphanumeric Supplement */ - AF_UNIRANGE_REC( 0UL, 0UL ) - }; - -@@ -82,12 +90,6 @@ - AF_UNIRANGE_REC( 0UL, 0UL ) - }; - -- const AF_Script_UniRangeRec af_deva_uniranges[] = -- { -- AF_UNIRANGE_REC( 0x0900UL, 0x097FUL ), /* Devanagari */ -- AF_UNIRANGE_REC( 0UL, 0UL ) -- }; -- - const AF_Script_UniRangeRec af_gujr_uniranges[] = - { - AF_UNIRANGE_REC( 0x0A80UL, 0x0AFFUL ), /* Gujarati */ -diff --git a/src/autofit/afscript.h b/src/autofit/afscript.h -index ae20932..a418b05 100644 ---- a/src/autofit/afscript.h -+++ b/src/autofit/afscript.h -@@ -31,6 +31,11 @@ - HB_SCRIPT_CYRILLIC, - 0x43E, 0x41E, 0x0 ) /* оО */ - -+ SCRIPT( deva, DEVA, -+ "Devanagari", -+ HB_SCRIPT_DEVANAGARI, -+ 0x920, 0x935, 0x91F ) /* ठव ट */ -+ - SCRIPT( grek, GREK, - "Greek", - HB_SCRIPT_GREEK, -@@ -58,11 +63,6 @@ - HB_SCRIPT_BENGALI, - 'o', 0x0, 0x0 ) /* XXX */ - -- SCRIPT( deva, DEVA, -- "Devanagari", -- HB_SCRIPT_DEVANAGARI, -- 'o', 0x0, 0x0 ) /* XXX */ -- - SCRIPT( gujr, GUJR, - "Gujarati", - HB_SCRIPT_GUJARATI, -diff --git a/src/autofit/afstyles.h b/src/autofit/afstyles.h -index 429da76..27fdd2e 100644 ---- a/src/autofit/afstyles.h -+++ b/src/autofit/afstyles.h -@@ -81,7 +81,9 @@ - DEFAULT ) - - META_STYLE_LATIN( cyrl, CYRL, "Cyrillic" ) -+ - META_STYLE_LATIN( grek, GREK, "Greek" ) -+ - STYLE( hebr_dflt, HEBR_DFLT, - "Hebrew default style", - AF_WRITING_SYSTEM_LATIN, -@@ -90,6 +92,13 @@ - AF_COVERAGE_DEFAULT ) - META_STYLE_LATIN( latn, LATN, "Latin" ) - -+ STYLE( deva_dflt, DEVA_DFLT, -+ "Devanagari default style", -+ AF_WRITING_SYSTEM_LATIN, -+ AF_SCRIPT_DEVA, -+ AF_BLUE_STRINGSET_DEVA, -+ AF_COVERAGE_DEFAULT ) -+ - #ifdef FT_OPTION_AUTOFIT2 - STYLE( ltn2_dflt, LTN2_DFLT, - "Latin 2 default style", -@@ -119,7 +128,6 @@ - AF_COVERAGE_DEFAULT ) - - STYLE_DEFAULT_INDIC( beng, BENG, "Bengali" ) -- STYLE_DEFAULT_INDIC( deva, DEVA, "Devanagari" ) - STYLE_DEFAULT_INDIC( gujr, GUJR, "Gujarati" ) - STYLE_DEFAULT_INDIC( guru, GURU, "Gurmukhi" ) - STYLE_DEFAULT_INDIC( knda, KNDA, "Kannada" ) -diff --git a/src/autofit/hbshim.c b/src/autofit/hbshim.c -index 11fb743..cc04815 100644 ---- a/src/autofit/hbshim.c -+++ b/src/autofit/hbshim.c -@@ -247,6 +247,7 @@ - * (this is, not a single character is covered), we skip this coverage. - * - */ -+ if ( style_class->coverage != AF_COVERAGE_DEFAULT ) - { - AF_Blue_Stringset bss = style_class->blue_stringset; - const AF_Blue_StringRec* bs = &af_blue_stringsets[bss]; -@@ -328,8 +329,15 @@ - * out whether a glyph gets shifted vertically, but this is something I - * would like to avoid if not really necessary. - * -+ * Note that we don't follow this logic for the default coverage. -+ * Complex scripts like Devanagari have mandatory GPOS features to -+ * position many glyph elements, using mark-to-base or mark-to-ligature -+ * tables; the number of glyphs missed due to condition (b) would be far -+ * too large. -+ * - */ -- hb_set_subtract( gsub_glyphs, gpos_glyphs ); -+ if ( style_class->coverage != AF_COVERAGE_DEFAULT ) -+ hb_set_subtract( gsub_glyphs, gpos_glyphs ); - - #ifdef FT_DEBUG_LEVEL_TRACE - FT_TRACE4(( " glyphs without GPOS data (`*' means already assigned)" )); -@@ -347,6 +355,12 @@ - count++; - #endif - -+ /* glyph indices returned by `hb_ot_layout_lookup_collect_glyphs' */ -+ /* can be arbitrary: some fonts use fake indices for processing */ -+ /* internal to GSUB or GPOS, which is fully valid */ -+ if ( idx >= (hb_codepoint_t)globals->glyph_count ) -+ continue; -+ - if ( gstyles[idx] == AF_STYLE_UNASSIGNED ) - gstyles[idx] = (FT_Byte)style_class->style; - #ifdef FT_DEBUG_LEVEL_TRACE -diff --git a/src/base/ftbbox.c b/src/base/ftbbox.c -index 8d3f383..349cb95 100644 ---- a/src/base/ftbbox.c -+++ b/src/base/ftbbox.c -@@ -203,15 +203,48 @@ - /* max :: The address of the current maximum. */ - /* */ - static FT_Pos -- update_cubic_max( FT_Pos q1, -- FT_Pos q2, -- FT_Pos q3, -- FT_Pos q4, -- FT_Pos max ) -+ cubic_peak( FT_Pos q1, -+ FT_Pos q2, -+ FT_Pos q3, -+ FT_Pos q4 ) - { -- /* for a cubic segment to possibly reach new maximum, at least */ -- /* one of its off-points must stay above the current value */ -- while ( q2 > max || q3 > max ) -+ FT_Pos peak = 0; -+ FT_Int shift; -+ -+ /* This function finds a peak of a cubic segment if it is above 0 */ -+ /* using iterative bisection of the segment, or returns 0. */ -+ /* The fixed-point arithmetic of bisection is inherently stable */ -+ /* but may loose accuracy in the two lowest bits. To compensate, */ -+ /* we upscale the segment if there is room. Large values may need */ -+ /* to be downscaled to avoid overflows during bisection. */ -+ /* It is called with either q2 or q3 positive, which is necessary */ -+ /* for the peak to exist and avoids undefined FT_MSB. */ -+ -+ shift = 27 - -+ FT_MSB( FT_ABS( q1 ) | FT_ABS( q2 ) | FT_ABS( q3 ) | FT_ABS( q4 ) ); -+ -+ if ( shift > 0 ) -+ { -+ /* upscaling too much just wastes time */ -+ if ( shift > 2 ) -+ shift = 2; -+ -+ q1 <<= shift; -+ q2 <<= shift; -+ q3 <<= shift; -+ q4 <<= shift; -+ } -+ else -+ { -+ q1 >>= -shift; -+ q2 >>= -shift; -+ q3 >>= -shift; -+ q4 >>= -shift; -+ } -+ -+ /* for a peak to exist above 0, the cubic segment must have */ -+ /* at least one of its control off-points above 0. */ -+ while ( q2 > 0 || q3 > 0 ) - { - /* determine which half contains the maximum and split */ - if ( q1 + q2 > q3 + q4 ) /* first half */ -@@ -240,17 +273,22 @@ - /* check whether either end reached the maximum */ - if ( q1 == q2 && q1 >= q3 ) - { -- max = q1; -+ peak = q1; - break; - } - if ( q3 == q4 && q2 <= q4 ) - { -- max = q4; -+ peak = q4; - break; - } - } - -- return max; -+ if ( shift > 0 ) -+ peak >>= shift; -+ else -+ peak <<= -shift; -+ -+ return peak; - } - - -@@ -262,65 +300,17 @@ - FT_Pos* min, - FT_Pos* max ) - { -- FT_Pos nmin, nmax; -- FT_Int shift; -- -- - /* This function is only called when a control off-point is outside */ -- /* the bbox that contains all on-points. It finds a local extremum */ -- /* within the segment using iterative bisection of the segment. */ -- /* The fixed-point arithmetic of bisection is inherently stable */ -- /* but may loose accuracy in the two lowest bits. To compensate, */ -- /* we upscale the segment if there is room. Large values may need */ -- /* to be downscaled to avoid overflows during bisection. */ -- /* The control off-point outside the bbox is likely to have the top */ -- /* absolute value among arguments. */ -- -- shift = 27 - FT_MSB( FT_ABS( p2 ) | FT_ABS( p3 ) ); -- -- if ( shift > 0 ) -- { -- /* upscaling too much just wastes time */ -- if ( shift > 2 ) -- shift = 2; -- -- p1 <<= shift; -- p2 <<= shift; -- p3 <<= shift; -- p4 <<= shift; -- nmin = *min << shift; -- nmax = *max << shift; -- } -- else -- { -- p1 >>= -shift; -- p2 >>= -shift; -- p3 >>= -shift; -- p4 >>= -shift; -- nmin = *min >> -shift; -- nmax = *max >> -shift; -- } -+ /* the bbox that contains all on-points. So at least one of the */ -+ /* conditions below holds and cubic_peak is called with at least one */ -+ /* non-zero argument. */ - -- nmax = update_cubic_max( p1, p2, p3, p4, nmax ); -+ if ( p2 > *max || p3 > *max ) -+ *max += cubic_peak( p1 - *max, p2 - *max, p3 - *max, p4 - *max ); - - /* now flip the signs to update the minimum */ -- nmin = -update_cubic_max( -p1, -p2, -p3, -p4, -nmin ); -- -- if ( shift > 0 ) -- { -- nmin >>= shift; -- nmax >>= shift; -- } -- else -- { -- nmin <<= -shift; -- nmax <<= -shift; -- } -- -- if ( nmin < *min ) -- *min = nmin; -- if ( nmax > *max ) -- *max = nmax; -+ if ( p2 < *min || p3 < *min ) -+ *min -= cubic_peak( *min - p1, *min - p2, *min - p3, *min - p4 ); - } - - -diff --git a/src/base/ftbitmap.c b/src/base/ftbitmap.c -index 5606745..158a428 100644 ---- a/src/base/ftbitmap.c -+++ b/src/base/ftbitmap.c -@@ -378,11 +378,8 @@ - static FT_Byte - ft_gray_for_premultiplied_srgb_bgra( const FT_Byte* bgra ) - { -- FT_Long a = bgra[3]; -- FT_Long b = bgra[0]; -- FT_Long g = bgra[1]; -- FT_Long r = bgra[2]; -- FT_Long l; -+ FT_UInt a = bgra[3]; -+ FT_UInt l; - - - /* Short-circuit transparent color to avoid div-by-zero. */ -@@ -397,38 +394,30 @@ - * - * http://accessibility.kde.org/hsl-adjusted.php - * -- * We do the computation with integers only. -+ * We do the computation with integers only, applying a gamma of 2.0. -+ * We guarantee 32-bit arithmetic to avoid overflow but the resulting -+ * luminosity fits into 16 bits. -+ * - */ - -- /* Undo premultification, get the number in a 16.16 form. */ -- b = FT_MulDiv( b, 65536, a ); -- g = FT_MulDiv( g, 65536, a ); -- r = FT_MulDiv( r, 65536, a ); -- a = a * 256; -- -- /* Apply gamma of 2.0 instead of 2.2. */ -- b = FT_MulFix( b, b ); -- g = FT_MulFix( g, g ); -- r = FT_MulFix( r, r ); -- -- /* Apply coefficients. */ -- b = FT_MulFix( b, 4731 /* 0.0722 * 65536 */ ); -- g = FT_MulFix( g, 46871 /* 0.7152 * 65536 */ ); -- r = FT_MulFix( r, 13933 /* 0.2126 * 65536 */ ); -- -- l = r + g + b; -+ l = ( 4732UL /* 0.0722 * 65536 */ * bgra[0] * bgra[0] + -+ 46871UL /* 0.7152 * 65536 */ * bgra[1] * bgra[1] + -+ 13933UL /* 0.2126 * 65536 */ * bgra[2] * bgra[2] ) >> 16; - - /* -- * Final transparency can be determined this way: -+ * Final transparency can be determined as follows. - * - * - If alpha is zero, we want 0. - * - If alpha is zero and luminosity is zero, we want 255. - * - If alpha is zero and luminosity is one, we want 0. - * -- * So the formula is a * (1 - l). -+ * So the formula is a * (1 - l) = a - l * a. -+ * -+ * We still need to undo premultiplication by dividing l by a*a. -+ * - */ - -- return (FT_Byte)( FT_MulFix( 65535 - l, a ) >> 8 ); -+ return (FT_Byte)( a - l / a ); - } - - -diff --git a/src/base/ftcalc.c b/src/base/ftcalc.c -index 6e65583..d0c43e0 100644 ---- a/src/base/ftcalc.c -+++ b/src/base/ftcalc.c -@@ -39,7 +39,8 @@ - #include FT_INTERNAL_DEBUG_H - #include FT_INTERNAL_OBJECTS_H - --#ifdef FT_MULFIX_INLINED -+ -+#ifdef FT_MULFIX_ASSEMBLER - #undef FT_MulFix - #endif - -@@ -67,6 +68,16 @@ - #define FT_COMPONENT trace_calc - - -+ /* transfer sign leaving a positive number */ -+#define FT_MOVE_SIGN( x, s ) \ -+ FT_BEGIN_STMNT \ -+ if ( x < 0 ) \ -+ { \ -+ x = -x; \ -+ s = -s; \ -+ } \ -+ FT_END_STMNT -+ - /* The following three functions are available regardless of whether */ - /* FT_LONG64 is defined. */ - -@@ -99,6 +110,7 @@ - : -((-a) & ~0xFFFFL ); - } - -+#ifndef FT_MSB - - FT_BASE_DEF ( FT_Int ) - FT_MSB( FT_UInt32 z ) -@@ -106,27 +118,27 @@ - FT_Int shift = 0; - - /* determine msb bit index in `shift' */ -- if ( z >= ( 1L << 16 ) ) -+ if ( z & 0xFFFF0000U ) - { - z >>= 16; - shift += 16; - } -- if ( z >= ( 1L << 8 ) ) -+ if ( z & 0x0000FF00U ) - { - z >>= 8; - shift += 8; - } -- if ( z >= ( 1L << 4 ) ) -+ if ( z & 0x000000F0U ) - { - z >>= 4; - shift += 4; - } -- if ( z >= ( 1L << 2 ) ) -+ if ( z & 0x0000000CU ) - { - z >>= 2; - shift += 2; - } -- if ( z >= ( 1L << 1 ) ) -+ if ( z & 0x00000002U ) - { - /* z >>= 1; */ - shift += 1; -@@ -135,6 +147,8 @@ - return shift; - } - -+#endif /* !FT_MSB */ -+ - - /* documentation is in ftcalc.h */ - -@@ -162,14 +176,13 @@ - FT_Long b, - FT_Long c ) - { -- FT_Int s; -+ FT_Int s = 1; - FT_Long d; - - -- s = 1; -- if ( a < 0 ) { a = -a; s = -1; } -- if ( b < 0 ) { b = -b; s = -s; } -- if ( c < 0 ) { c = -c; s = -s; } -+ FT_MOVE_SIGN( a, s ); -+ FT_MOVE_SIGN( b, s ); -+ FT_MOVE_SIGN( c, s ); - - d = (FT_Long)( c > 0 ? ( (FT_Int64)a * b + ( c >> 1 ) ) / c - : 0x7FFFFFFFL ); -@@ -185,14 +198,13 @@ - FT_Long b, - FT_Long c ) - { -- FT_Int s; -+ FT_Int s = 1; - FT_Long d; - - -- s = 1; -- if ( a < 0 ) { a = -a; s = -1; } -- if ( b < 0 ) { b = -b; s = -s; } -- if ( c < 0 ) { c = -c; s = -s; } -+ FT_MOVE_SIGN( a, s ); -+ FT_MOVE_SIGN( b, s ); -+ FT_MOVE_SIGN( c, s ); - - d = (FT_Long)( c > 0 ? (FT_Int64)a * b / c - : 0x7FFFFFFFL ); -@@ -217,17 +229,8 @@ - FT_Long c; - - -- if ( a < 0 ) -- { -- a = -a; -- s = -1; -- } -- -- if ( b < 0 ) -- { -- b = -b; -- s = -s; -- } -+ FT_MOVE_SIGN( a, s ); -+ FT_MOVE_SIGN( b, s ); - - c = (FT_Long)( ( (FT_Int64)a * b + 0x8000L ) >> 16 ); - -@@ -243,30 +246,17 @@ - FT_DivFix( FT_Long a, - FT_Long b ) - { -- FT_Int32 s; -- FT_UInt32 q; -+ FT_Int s = 1; -+ FT_Long q; - - -- s = 1; -- if ( a < 0 ) -- { -- a = -a; -- s = -1; -- } -- if ( b < 0 ) -- { -- b = -b; -- s = -s; -- } -+ FT_MOVE_SIGN( a, s ); -+ FT_MOVE_SIGN( b, s ); - -- if ( b == 0 ) -- /* check for division by 0 */ -- q = 0x7FFFFFFFL; -- else -- /* compute result directly */ -- q = (FT_UInt32)( ( ( (FT_UInt64)a << 16 ) + ( b >> 1 ) ) / b ); -+ q = (FT_Long)( b > 0 ? ( ( (FT_UInt64)a << 16 ) + ( b >> 1 ) ) / b -+ : 0x7FFFFFFFL ); - -- return ( s < 0 ? -(FT_Long)q : (FT_Long)q ); -+ return ( s < 0 ? -q : q ); - } - - -@@ -314,25 +304,30 @@ - FT_Int i; - - -- q = 0; -- r = hi; -- -- if ( r >= y ) -+ if ( hi >= y ) - return (FT_UInt32)0x7FFFFFFFL; - -- i = 32; -+ /* We shift as many bits as we can into the high register, perform */ -+ /* 32-bit division with modulo there, then work through the remaining */ -+ /* bits with long division. This optimization is especially noticeable */ -+ /* for smaller dividends that barely use the high register. */ -+ -+ i = 31 - FT_MSB( hi ); -+ r = ( hi << i ) | ( lo >> ( 32 - i ) ); lo <<= i; /* left 64-bit shift */ -+ q = r / y; -+ r -= q * y; /* remainder */ -+ -+ i = 32 - i; /* bits remaining in low register */ - do - { -- r <<= 1; - q <<= 1; -- r |= lo >> 31; -+ r = ( r << 1 ) | ( lo >> 31 ); lo <<= 1; - - if ( r >= y ) - { - r -= y; - q |= 1; - } -- lo <<= 1; - } while ( --i ); - - return q; -@@ -344,7 +339,7 @@ - FT_Int64* y, - FT_Int64 *z ) - { -- register FT_UInt32 lo, hi; -+ FT_UInt32 lo, hi; - - - lo = x->lo + y->lo; -@@ -355,58 +350,93 @@ - } - - -- /* documentation is in freetype.h */ -- -- /* The FT_MulDiv function has been optimized thanks to ideas from */ -- /* Graham Asher. The trick is to optimize computation when everything */ -- /* fits within 32-bits (a rather common case). */ -+ /* The FT_MulDiv function has been optimized thanks to ideas from */ -+ /* Graham Asher and Alexei Podtelezhnikov. The trick is to optimize */ -+ /* a rather common case when everything fits within 32-bits. */ -+ /* */ -+ /* We compute 'a*b+c/2', then divide it by 'c' (all positive values). */ -+ /* */ -+ /* The product of two positive numbers never exceeds the square of */ -+ /* its mean values. Therefore, we always avoid the overflow by */ -+ /* imposing */ -+ /* */ -+ /* (a + b) / 2 <= sqrt(X - c/2) , */ - /* */ -- /* we compute 'a*b+c/2', then divide it by 'c'. (positive values) */ -+ /* where X = 2^32 - 1, the maximum unsigned 32-bit value, and using */ -+ /* unsigned arithmetic. Now we replace `sqrt' with a linear function */ -+ /* that is smaller or equal for all values of c in the interval */ -+ /* [0;X/2]; it should be equal to sqrt(X) and sqrt(3X/4) at the */ -+ /* endpoints. Substituting the linear solution and explicit numbers */ -+ /* we get */ - /* */ -- /* 46340 is FLOOR(SQRT(2^31-1)). */ -+ /* a + b <= 131071.99 - c / 122291.84 . */ - /* */ -- /* if ( a <= 46340 && b <= 46340 ) then ( a*b <= 0x7FFEA810 ) */ -+ /* In practice, we should use a faster and even stronger inequality */ - /* */ -- /* 0x7FFFFFFF - 0x7FFEA810 = 0x157F0 */ -+ /* a + b <= 131071 - (c >> 16) */ - /* */ -- /* if ( c < 0x157F0*2 ) then ( a*b+c/2 <= 0x7FFFFFFF ) */ -+ /* or, alternatively, */ - /* */ -- /* and 2*0x157F0 = 176096 */ -+ /* a + b <= 129894 - (c >> 17) . */ - /* */ -+ /* FT_MulFix, on the other hand, is optimized for a small value of */ -+ /* the first argument, when the second argument can be much larger. */ -+ /* This can be achieved by scaling the second argument and the limit */ -+ /* in the above inequalities. For example, */ -+ /* */ -+ /* a + (b >> 8) <= (131071 >> 4) */ -+ /* */ -+ /* covers the practical range of use. The actual test below is a bit */ -+ /* tighter to avoid the border case overflows. */ -+ /* */ -+ /* In the case of FT_DivFix, the exact overflow check */ -+ /* */ -+ /* a << 16 <= X - c/2 */ -+ /* */ -+ /* is scaled down by 2^16 and we use */ -+ /* */ -+ /* a <= 65535 - (c >> 17) . */ -+ -+ /* documentation is in freetype.h */ - - FT_EXPORT_DEF( FT_Long ) - FT_MulDiv( FT_Long a, - FT_Long b, - FT_Long c ) - { -- long s; -+ FT_Int s = 1; - - - /* XXX: this function does not allow 64-bit arguments */ - if ( a == 0 || b == c ) - return a; - -- s = a; a = FT_ABS( a ); -- s ^= b; b = FT_ABS( b ); -- s ^= c; c = FT_ABS( c ); -+ FT_MOVE_SIGN( a, s ); -+ FT_MOVE_SIGN( b, s ); -+ FT_MOVE_SIGN( c, s ); - -- if ( a <= 46340L && b <= 46340L && c <= 176095L && c > 0 ) -- a = ( a * b + ( c >> 1 ) ) / c; -+ if ( c == 0 ) -+ a = 0x7FFFFFFFL; -+ -+ else if ( (FT_ULong)a + b <= 129894UL - ( c >> 17 ) ) -+ a = ( (FT_ULong)a * b + ( c >> 1 ) ) / c; - -- else if ( (FT_Int32)c > 0 ) -+ else - { - FT_Int64 temp, temp2; - - -- ft_multo64( (FT_Int32)a, (FT_Int32)b, &temp ); -+ ft_multo64( a, b, &temp ); - - temp2.hi = 0; -- temp2.lo = (FT_UInt32)(c >> 1); -+ temp2.lo = c >> 1; -+ - FT_Add64( &temp, &temp2, &temp ); -- a = ft_div64by32( temp.hi, temp.lo, (FT_Int32)c ); -+ -+ /* last attempt to ditch long division */ -+ a = temp.hi == 0 ? temp.lo / c -+ : ft_div64by32( temp.hi, temp.lo, c ); - } -- else -- a = 0x7FFFFFFFL; - - return ( s < 0 ? -a : a ); - } -@@ -417,29 +447,33 @@ - FT_Long b, - FT_Long c ) - { -- long s; -+ FT_Int s = 1; - - - if ( a == 0 || b == c ) - return a; - -- s = a; a = FT_ABS( a ); -- s ^= b; b = FT_ABS( b ); -- s ^= c; c = FT_ABS( c ); -+ FT_MOVE_SIGN( a, s ); -+ FT_MOVE_SIGN( b, s ); -+ FT_MOVE_SIGN( c, s ); - -- if ( a <= 46340L && b <= 46340L && c > 0 ) -- a = a * b / c; -+ if ( c == 0 ) -+ a = 0x7FFFFFFFL; -+ -+ else if ( (FT_ULong)a + b <= 131071UL ) -+ a = (FT_ULong)a * b / c; - -- else if ( (FT_Int32)c > 0 ) -+ else - { - FT_Int64 temp; - - -- ft_multo64( (FT_Int32)a, (FT_Int32)b, &temp ); -- a = ft_div64by32( temp.hi, temp.lo, (FT_Int32)c ); -+ ft_multo64( a, b, &temp ); -+ -+ /* last attempt to ditch long division */ -+ a = temp.hi == 0 ? temp.lo / c -+ : ft_div64by32( temp.hi, temp.lo, c ); - } -- else -- a = 0x7FFFFFFFL; - - return ( s < 0 ? -a : a ); - } -@@ -497,7 +531,7 @@ - ua = (FT_ULong)a; - ub = (FT_ULong)b; - -- if ( ua <= 2048 && ub <= 1048576L ) -+ if ( ua + ( ub >> 8 ) <= 8190UL ) - ua = ( ua * ub + 0x8000U ) >> 16; - else - { -@@ -515,20 +549,20 @@ - - #else /* 0 */ - -- FT_Long s; -+ FT_Int s = 1; - FT_ULong ua, ub; - - - if ( a == 0 || b == 0x10000L ) - return a; - -- s = a; a = FT_ABS( a ); -- s ^= b; b = FT_ABS( b ); -+ FT_MOVE_SIGN( a, s ); -+ FT_MOVE_SIGN( b, s ); - - ua = (FT_ULong)a; - ub = (FT_ULong)b; - -- if ( ua <= 2048 && ub <= 1048576L ) -+ if ( ua + ( ub >> 8 ) <= 8190UL ) - ua = ( ua * ub + 0x8000UL ) >> 16; - else - { -@@ -552,23 +586,24 @@ - FT_DivFix( FT_Long a, - FT_Long b ) - { -- FT_Int32 s; -- FT_UInt32 q; -+ FT_Int s = 1; -+ FT_Long q; - - - /* XXX: this function does not allow 64-bit arguments */ -- s = (FT_Int32)a; a = FT_ABS( a ); -- s ^= (FT_Int32)b; b = FT_ABS( b ); - -- if ( (FT_UInt32)b == 0 ) -+ FT_MOVE_SIGN( a, s ); -+ FT_MOVE_SIGN( b, s ); -+ -+ if ( b == 0 ) - { - /* check for division by 0 */ -- q = (FT_UInt32)0x7FFFFFFFL; -+ q = 0x7FFFFFFFL; - } -- else if ( ( a >> 16 ) == 0 ) -+ else if ( a <= 65535L - ( b >> 17 ) ) - { - /* compute result directly */ -- q = (FT_UInt32)( ( (FT_ULong)a << 16 ) + ( b >> 1 ) ) / (FT_UInt32)b; -+ q = (FT_Long)( ( ( (FT_ULong)a << 16 ) + ( b >> 1 ) ) / b ); - } - else - { -@@ -576,138 +611,18 @@ - FT_Int64 temp, temp2; - - -- temp.hi = (FT_Int32)( a >> 16 ); -- temp.lo = (FT_UInt32)a << 16; -+ temp.hi = a >> 16; -+ temp.lo = a << 16; - temp2.hi = 0; -- temp2.lo = (FT_UInt32)( b >> 1 ); -- FT_Add64( &temp, &temp2, &temp ); -- q = ft_div64by32( temp.hi, temp.lo, (FT_Int32)b ); -- } -- -- return ( s < 0 ? -(FT_Int32)q : (FT_Int32)q ); -- } -+ temp2.lo = b >> 1; - -- --#if 0 -- -- /* documentation is in ftcalc.h */ -- -- FT_EXPORT_DEF( void ) -- FT_MulTo64( FT_Int32 x, -- FT_Int32 y, -- FT_Int64 *z ) -- { -- FT_Int32 s; -- -- -- s = x; x = FT_ABS( x ); -- s ^= y; y = FT_ABS( y ); -- -- ft_multo64( x, y, z ); -- -- if ( s < 0 ) -- { -- z->lo = (FT_UInt32)-(FT_Int32)z->lo; -- z->hi = ~z->hi + !( z->lo ); -- } -- } -- -- -- /* apparently, the second version of this code is not compiled correctly */ -- /* on Mac machines with the MPW C compiler.. tsk, tsk, tsk... */ -- --#if 1 -- -- FT_EXPORT_DEF( FT_Int32 ) -- FT_Div64by32( FT_Int64* x, -- FT_Int32 y ) -- { -- FT_Int32 s; -- FT_UInt32 q, r, i, lo; -- -- -- s = x->hi; -- if ( s < 0 ) -- { -- x->lo = (FT_UInt32)-(FT_Int32)x->lo; -- x->hi = ~x->hi + !x->lo; -- } -- s ^= y; y = FT_ABS( y ); -- -- /* Shortcut */ -- if ( x->hi == 0 ) -- { -- if ( y > 0 ) -- q = x->lo / y; -- else -- q = 0x7FFFFFFFL; -- -- return ( s < 0 ? -(FT_Int32)q : (FT_Int32)q ); -- } -- -- r = x->hi; -- lo = x->lo; -- -- if ( r >= (FT_UInt32)y ) /* we know y is to be treated as unsigned here */ -- return ( s < 0 ? 0x80000001UL : 0x7FFFFFFFUL ); -- /* Return Max/Min Int32 if division overflow. */ -- /* This includes division by zero! */ -- q = 0; -- for ( i = 0; i < 32; i++ ) -- { -- r <<= 1; -- q <<= 1; -- r |= lo >> 31; -- -- if ( r >= (FT_UInt32)y ) -- { -- r -= y; -- q |= 1; -- } -- lo <<= 1; -- } -- -- return ( s < 0 ? -(FT_Int32)q : (FT_Int32)q ); -- } -- --#else /* 0 */ -- -- FT_EXPORT_DEF( FT_Int32 ) -- FT_Div64by32( FT_Int64* x, -- FT_Int32 y ) -- { -- FT_Int32 s; -- FT_UInt32 q; -- -- -- s = x->hi; -- if ( s < 0 ) -- { -- x->lo = (FT_UInt32)-(FT_Int32)x->lo; -- x->hi = ~x->hi + !x->lo; -- } -- s ^= y; y = FT_ABS( y ); -- -- /* Shortcut */ -- if ( x->hi == 0 ) -- { -- if ( y > 0 ) -- q = ( x->lo + ( y >> 1 ) ) / y; -- else -- q = 0x7FFFFFFFL; -- -- return ( s < 0 ? -(FT_Int32)q : (FT_Int32)q ); -+ FT_Add64( &temp, &temp2, &temp ); -+ q = (FT_Long)ft_div64by32( temp.hi, temp.lo, b ); - } - -- q = ft_div64by32( x->hi, x->lo, y ); -- -- return ( s < 0 ? -(FT_Int32)q : (FT_Int32)q ); -+ return ( s < 0 ? -q : q ); - } - --#endif /* 0 */ -- --#endif /* 0 */ -- - - #endif /* FT_LONG64 */ - -diff --git a/src/base/ftlcdfil.c b/src/base/ftlcdfil.c -index 852fb32..4aefb68 100644 ---- a/src/base/ftlcdfil.c -+++ b/src/base/ftlcdfil.c -@@ -4,7 +4,7 @@ - /* */ - /* FreeType API for color filtering of subpixel bitmap glyphs (body). */ - /* */ --/* Copyright 2006, 2008-2010, 2013 by */ -+/* Copyright 2006, 2008-2010, 2013, 2014 by */ - /* David Turner, Robert Wilhelm, and Werner Lemberg. */ - /* */ - /* This file is part of the FreeType project, and may only be used, */ -@@ -46,9 +46,12 @@ - FT_Byte* line = bitmap->buffer; - - -+ /* `fir' and `pix' must be at least 32 bit wide, since the sum of */ -+ /* the values in `weights' can exceed 0xFF */ -+ - for ( ; height > 0; height--, line += bitmap->pitch ) - { -- FT_UInt fir[5]; -+ FT_UInt fir[4]; /* below, `pix' is used as the 5th element */ - FT_UInt val1, xx; - - -@@ -57,7 +60,6 @@ - fir[1] = weights[3] * val1; - fir[2] = weights[4] * val1; - fir[3] = 0; -- fir[4] = 0; - - val1 = line[1]; - fir[0] += weights[1] * val1; -@@ -78,7 +80,7 @@ - fir[3] = weights[4] * val; - - pix >>= 8; -- pix |= -( pix >> 8 ); -+ pix |= (FT_UInt)-(FT_Int)( pix >> 8 ); - line[xx - 2] = (FT_Byte)pix; - } - -@@ -87,11 +89,11 @@ - - - pix = fir[0] >> 8; -- pix |= -( pix >> 8 ); -+ pix |= (FT_UInt)-(FT_Int)( pix >> 8 ); - line[xx - 2] = (FT_Byte)pix; - - pix = fir[1] >> 8; -- pix |= -( pix >> 8 ); -+ pix |= (FT_UInt)-(FT_Int)( pix >> 8 ); - line[xx - 1] = (FT_Byte)pix; - } - } -@@ -107,7 +109,7 @@ - for ( ; width > 0; width--, column++ ) - { - FT_Byte* col = column; -- FT_UInt fir[5]; -+ FT_UInt fir[4]; /* below, `pix' is used as the 5th element */ - FT_UInt val1, yy; - - -@@ -116,7 +118,6 @@ - fir[1] = weights[3] * val1; - fir[2] = weights[4] * val1; - fir[3] = 0; -- fir[4] = 0; - col += pitch; - - val1 = col[0]; -@@ -139,7 +140,7 @@ - fir[3] = weights[4] * val; - - pix >>= 8; -- pix |= -( pix >> 8 ); -+ pix |= (FT_UInt)-(FT_Int)( pix >> 8 ); - col[-2 * pitch] = (FT_Byte)pix; - col += pitch; - } -@@ -149,11 +150,11 @@ - - - pix = fir[0] >> 8; -- pix |= -( pix >> 8 ); -+ pix |= (FT_UInt)-(FT_Int)( pix >> 8 ); - col[-2 * pitch] = (FT_Byte)pix; - - pix = fir[1] >> 8; -- pix |= -( pix >> 8 ); -+ pix |= (FT_UInt)-(FT_Int)( pix >> 8 ); - col[-pitch] = (FT_Byte)pix; - } - } -diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c -index 6f32336..cc56105 100644 ---- a/src/base/ftobjs.c -+++ b/src/base/ftobjs.c -@@ -4881,6 +4881,8 @@ - *p_arg1 = subg->arg1; - *p_arg2 = subg->arg2; - *p_transform = subg->transform; -+ -+ error = FT_Err_Ok; - } - - return error; -diff --git a/src/base/ftoutln.c b/src/base/ftoutln.c -index 4a39dcd..632b6d2 100644 ---- a/src/base/ftoutln.c -+++ b/src/base/ftoutln.c -@@ -1045,6 +1045,10 @@ - - FT_Outline_Get_CBox( outline, &cbox ); - -+ /* Handle collapsed outlines to avoid undefined FT_MSB. */ -+ if ( cbox.xMin == cbox.xMax || cbox.yMin == cbox.yMax ) -+ return FT_ORIENTATION_NONE; -+ - xshift = FT_MSB( FT_ABS( cbox.xMax ) | FT_ABS( cbox.xMin ) ) - 14; - xshift = FT_MAX( xshift, 0 ); - -diff --git a/src/base/fttrigon.c b/src/base/fttrigon.c -index 4ffdcb7..e3ce8a6 100644 ---- a/src/base/fttrigon.c -+++ b/src/base/fttrigon.c -@@ -111,6 +111,7 @@ - #endif /* !FT_LONG64 */ - - -+ /* undefined and never called for zero vector */ - static FT_Int - ft_trig_prenorm( FT_Vector* vec ) - { -diff --git a/src/base/ftutil.c b/src/base/ftutil.c -index 879d027..9f37189 100644 ---- a/src/base/ftutil.c -+++ b/src/base/ftutil.c -@@ -411,26 +411,4 @@ - } - - -- FT_BASE_DEF( FT_UInt32 ) -- ft_highpow2( FT_UInt32 value ) -- { -- FT_UInt32 value2; -- -- -- /* -- * We simply clear the lowest bit in each iteration. When -- * we reach 0, we know that the previous value was our result. -- */ -- for ( ;; ) -- { -- value2 = value & (value - 1); /* clear lowest bit */ -- if ( value2 == 0 ) -- break; -- -- value = value2; -- } -- return value; -- } -- -- - /* END */ -diff --git a/src/bdf/bdfdrivr.c b/src/bdf/bdfdrivr.c -index 5a1c296..d7649ab 100644 ---- a/src/bdf/bdfdrivr.c -+++ b/src/bdf/bdfdrivr.c -@@ -182,7 +182,7 @@ THE SOFTWARE. - } - - -- FT_CALLBACK_TABLE_DEF -+ static - const FT_CMap_ClassRec bdf_cmap_class = - { - sizeof ( BDF_CMapRec ), -diff --git a/src/cache/ftcbasic.c b/src/cache/ftcbasic.c -index 84d336d..01be88c 100644 ---- a/src/cache/ftcbasic.c -+++ b/src/cache/ftcbasic.c -@@ -4,7 +4,7 @@ - /* */ - /* The FreeType basic cache interface (body). */ - /* */ --/* Copyright 2003-2007, 2009-2011, 2013 by */ -+/* Copyright 2003-2007, 2009-2011, 2013, 2014 by */ - /* David Turner, Robert Wilhelm, and Werner Lemberg. */ - /* */ - /* This file is part of the FreeType project, and may only be used, */ -@@ -229,7 +229,7 @@ - * - */ - -- FT_CALLBACK_TABLE_DEF -+ static - const FTC_IFamilyClassRec ftc_basic_image_family_class = - { - { -@@ -243,7 +243,7 @@ - }; - - -- FT_CALLBACK_TABLE_DEF -+ static - const FTC_GCacheClassRec ftc_basic_image_cache_class = - { - { -@@ -415,7 +415,7 @@ - * - */ - -- FT_CALLBACK_TABLE_DEF -+ static - const FTC_SFamilyClassRec ftc_basic_sbit_family_class = - { - { -@@ -430,7 +430,7 @@ - }; - - -- FT_CALLBACK_TABLE_DEF -+ static - const FTC_GCacheClassRec ftc_basic_sbit_cache_class = - { - { -diff --git a/src/cache/ftccmap.c b/src/cache/ftccmap.c -index 848349b..b2e9609 100644 ---- a/src/cache/ftccmap.c -+++ b/src/cache/ftccmap.c -@@ -4,7 +4,7 @@ - /* */ - /* FreeType CharMap cache (body) */ - /* */ --/* Copyright 2000-2013 by */ -+/* Copyright 2000-2014 by */ - /* David Turner, Robert Wilhelm, and Werner Lemberg. */ - /* */ - /* This file is part of the FreeType project, and may only be used, */ -@@ -202,7 +202,7 @@ - /*************************************************************************/ - - -- FT_CALLBACK_TABLE_DEF -+ static - const FTC_CacheClassRec ftc_cmap_cache_class = - { - ftc_cmap_node_new, -diff --git a/src/cache/ftcmanag.c b/src/cache/ftcmanag.c -index 4eb2c5b..a65f94d 100644 ---- a/src/cache/ftcmanag.c -+++ b/src/cache/ftcmanag.c -@@ -4,7 +4,7 @@ - /* */ - /* FreeType Cache Manager (body). */ - /* */ --/* Copyright 2000-2006, 2008-2010, 2013 by */ -+/* Copyright 2000-2006, 2008-2010, 2013, 2014 by */ - /* David Turner, Robert Wilhelm, and Werner Lemberg. */ - /* */ - /* This file is part of the FreeType project, and may only be used, */ -@@ -151,7 +151,7 @@ - } - - -- FT_CALLBACK_TABLE_DEF -+ static - const FTC_MruListClassRec ftc_size_list_class = - { - sizeof ( FTC_SizeNodeRec ), -@@ -290,7 +290,7 @@ - } - - -- FT_CALLBACK_TABLE_DEF -+ static - const FTC_MruListClassRec ftc_face_list_class = - { - sizeof ( FTC_FaceNodeRec), -diff --git a/src/cff/cf2font.c b/src/cff/cf2font.c -index 6e99dc2..3d2c22a 100644 ---- a/src/cff/cf2font.c -+++ b/src/cff/cf2font.c -@@ -105,6 +105,7 @@ - /* adjusting for emRatio converts darkenAmount to character */ - /* space (font units). */ - CF2_Fixed stemWidthPer1000, scaledStem; -+ FT_Int logBase2; - - - *darkenAmount = 0; -@@ -131,26 +132,33 @@ - /* convert from true character space to 1000 unit character space; */ - /* add synthetic emboldening effect */ - -- /* we have to assure that the computation of `scaledStem' */ -- /* and `stemWidthPer1000' don't overflow */ -+ /* `stemWidthPer1000' will not overflow for a legitimate font */ - - stemWidthPer1000 = FT_MulFix( stemWidth + boldenAmount, emRatio ); - -- if ( emRatio > CF2_FIXED_ONE && -- stemWidthPer1000 <= ( stemWidth + boldenAmount ) ) -- { -- stemWidthPer1000 = 0; /* to pacify compiler */ -- scaledStem = cf2_intToFixed( x4 ); -- } -+ /* `scaledStem' can easily overflow, so we must clamp its maximum */ -+ /* value; the test doesn't need to be precise, but must be */ -+ /* conservative. The clamp value (default 2333) where */ -+ /* `darkenAmount' is zero is well below the overflow value of */ -+ /* 32767. */ -+ /* */ -+ /* FT_MSB computes the integer part of the base 2 logarithm. The */ -+ /* number of bits for the product is 1 or 2 more than the sum of */ -+ /* logarithms; remembering that the 16 lowest bits of the fraction */ -+ /* are dropped this is correct to within a factor of almost 4. */ -+ /* For example, 0x80.0000 * 0x80.0000 = 0x4000.0000 is 23+23 and */ -+ /* is flagged as possible overflow because 0xff.ffff * 0xff.ffff = */ -+ /* 0xffff.fe00 is also 23+23. */ -+ -+ logBase2 = FT_MSB( (FT_UInt32)stemWidthPer1000 ) + -+ FT_MSB( (FT_UInt32)ppem ); -+ -+ if ( logBase2 >= 46 ) -+ /* possible overflow */ -+ scaledStem = cf2_intToFixed( x4 ); - else -- { - scaledStem = FT_MulFix( stemWidthPer1000, ppem ); - -- if ( ppem > CF2_FIXED_ONE && -- scaledStem <= stemWidthPer1000 ) -- scaledStem = cf2_intToFixed( x4 ); -- } -- - /* now apply the darkening parameters */ - - if ( scaledStem < cf2_intToFixed( x1 ) ) -diff --git a/src/cff/cf2hints.c b/src/cff/cf2hints.c -index 5853d77..81049f4 100644 ---- a/src/cff/cf2hints.c -+++ b/src/cff/cf2hints.c -@@ -1560,7 +1560,7 @@ - { - /* -y */ - *x = -glyphpath->xOffset; -- *y = glyphpath->xOffset; -+ *y = glyphpath->yOffset; - } - else - { -diff --git a/src/gzip/inftrees.c b/src/gzip/inftrees.c -index ef53652..56f52b1 100644 ---- a/src/gzip/inftrees.c -+++ b/src/gzip/inftrees.c -@@ -115,16 +115,16 @@ uIntf *v /* working area: values in order of bit length */ - uInt f; /* i repeats in table every f entries */ - int g; /* maximum code length */ - int h; /* table level */ -- register uInt i; /* counter, current code */ -- register uInt j; /* counter */ -- register int k; /* number of bits in current code */ -+ uInt i; /* counter, current code */ -+ uInt j; /* counter */ -+ int k; /* number of bits in current code */ - int l; /* bits per table (returned in m) */ - uInt mask; /* (1 << w) - 1, to avoid cc -O bug on HP */ -- register uIntf *p; /* pointer into c[], b[], or v[] */ -+ uIntf *p; /* pointer into c[], b[], or v[] */ - inflate_huft *q; /* points to current table */ - struct inflate_huft_s r; /* table entry for structure assignment */ - inflate_huft *u[BMAX]; /* table stack */ -- register int w; /* bits before this table == (l * h) */ -+ int w; /* bits before this table == (l * h) */ - uInt x[BMAX+1]; /* bit offsets, then code stack */ - uIntf *xp; /* pointer into x */ - int y; /* number of dummy codes added */ -diff --git a/src/pcf/pcfdrivr.c b/src/pcf/pcfdrivr.c -index 748cbca..5183f6f 100644 ---- a/src/pcf/pcfdrivr.c -+++ b/src/pcf/pcfdrivr.c -@@ -2,7 +2,7 @@ - - FreeType font driver for pcf files - -- Copyright (C) 2000-2004, 2006-2011, 2013 by -+ Copyright (C) 2000-2004, 2006-2011, 2013, 2014 by - Francesco Zappa Nardelli - - Permission is hereby granted, free of charge, to any person obtaining a copy -@@ -189,7 +189,7 @@ THE SOFTWARE. - } - - -- FT_CALLBACK_TABLE_DEF -+ static - const FT_CMap_ClassRec pcf_cmap_class = - { - sizeof ( PCF_CMapRec ), -diff --git a/src/pfr/pfrdrivr.c b/src/pfr/pfrdrivr.c -index 4c43947..188aa0d 100644 ---- a/src/pfr/pfrdrivr.c -+++ b/src/pfr/pfrdrivr.c -@@ -4,7 +4,7 @@ - /* */ - /* FreeType PFR driver interface (body). */ - /* */ --/* Copyright 2002-2004, 2006, 2008, 2010, 2011, 2013 by */ -+/* Copyright 2002-2004, 2006, 2008, 2010, 2011, 2013, 2014 by */ - /* David Turner, Robert Wilhelm, and Werner Lemberg. */ - /* */ - /* This file is part of the FreeType project, and may only be used, */ -@@ -134,7 +134,7 @@ - } - - -- FT_CALLBACK_TABLE_DEF -+ static - const FT_Service_PfrMetricsRec pfr_metrics_service_rec = - { - pfr_get_metrics, -diff --git a/src/pfr/pfrobjs.c b/src/pfr/pfrobjs.c -index 194d2df..0c89242 100644 ---- a/src/pfr/pfrobjs.c -+++ b/src/pfr/pfrobjs.c -@@ -4,7 +4,7 @@ - /* */ - /* FreeType PFR object methods (body). */ - /* */ --/* Copyright 2002-2008, 2010-2011, 2013 by */ -+/* Copyright 2002-2008, 2010-2011, 2013, 2014 by */ - /* David Turner, Robert Wilhelm, and Werner Lemberg. */ - /* */ - /* This file is part of the FreeType project, and may only be used, */ -@@ -23,6 +23,7 @@ - #include "pfrsbit.h" - #include FT_OUTLINE_H - #include FT_INTERNAL_DEBUG_H -+#include FT_INTERNAL_CALC_H - #include FT_TRUETYPE_IDS_H - - #include "pfrerror.h" -@@ -515,7 +516,7 @@ - { - FT_UInt count = item->pair_count; - FT_UInt size = item->pair_size; -- FT_UInt power = (FT_UInt)ft_highpow2( (FT_UInt32)count ); -+ FT_UInt power = 1 << FT_MSB( count ); - FT_UInt probe = power * size; - FT_UInt extra = count - power; - FT_Byte* base = stream->cursor; -diff --git a/src/psaux/psconv.c b/src/psaux/psconv.c -index d0d8861..7792a62 100644 ---- a/src/psaux/psconv.c -+++ b/src/psaux/psconv.c -@@ -250,7 +250,8 @@ - if ( c < 0 || c >= 10 ) - break; - -- if ( decimal < 0xCCCCCCCL ) -+ /* only add digit if we don't overflow */ -+ if ( divider < 0xCCCCCCCL && decimal < 0xCCCCCCCL ) - { - decimal = decimal * 10 + c; - -diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c -index ddecc80..abbecb7 100644 ---- a/src/raster/ftraster.c -+++ b/src/raster/ftraster.c -@@ -2284,6 +2284,8 @@ - Long e1, e2; - Byte* target; - -+ Int dropOutControl = left->flags & 7; -+ - FT_UNUSED( y ); - FT_UNUSED( left ); - FT_UNUSED( right ); -@@ -2293,7 +2295,8 @@ - - e1 = TRUNC( CEILING( x1 ) ); - -- if ( x2 - x1 - ras.precision <= ras.precision_jitter ) -+ if ( dropOutControl != 2 && -+ x2 - x1 - ras.precision <= ras.precision_jitter ) - e2 = e1; - else - e2 = TRUNC( FLOOR( x2 ) ); -diff --git a/src/sfnt/pngshim.c b/src/sfnt/pngshim.c -index 878de1f..9afbe5a 100644 ---- a/src/sfnt/pngshim.c -+++ b/src/sfnt/pngshim.c -@@ -4,7 +4,7 @@ - /* */ - /* PNG Bitmap glyph support. */ - /* */ --/* Copyright 2013 by Google, Inc. */ -+/* Copyright 2013, 2014 by Google, Inc. */ - /* Written by Stuart Gill and Behdad Esfahbod. */ - /* */ - /* This file is part of the FreeType project, and may only be used, */ -@@ -129,7 +129,7 @@ - - *error = FT_THROW( Out_Of_Memory ); - #ifdef PNG_SETJMP_SUPPORTED -- longjmp( png_jmpbuf( png ), 1 ); -+ ft_longjmp( png_jmpbuf( png ), 1 ); - #endif - /* if we get here, then we have no choice but to abort ... */ - } -diff --git a/src/sfnt/sfobjs.c b/src/sfnt/sfobjs.c -index a31c77c..44aa467 100644 ---- a/src/sfnt/sfobjs.c -+++ b/src/sfnt/sfobjs.c -@@ -4,7 +4,7 @@ - /* */ - /* SFNT object management (base). */ - /* */ --/* Copyright 1996-2008, 2010-2013 by */ -+/* Copyright 1996-2008, 2010-2014 by */ - /* David Turner, Robert Wilhelm, and Werner Lemberg. */ - /* */ - /* This file is part of the FreeType project, and may only be used, */ -@@ -348,29 +348,22 @@ - } - - --#define WRITE_BYTE( p, v ) \ -- do \ -- { \ -- *(p)++ = (v) >> 0; \ -- \ -+#define WRITE_USHORT( p, v ) \ -+ do \ -+ { \ -+ *(p)++ = (FT_Byte)( (v) >> 8 ); \ -+ *(p)++ = (FT_Byte)( (v) >> 0 ); \ -+ \ - } while ( 0 ) - --#define WRITE_USHORT( p, v ) \ -- do \ -- { \ -- *(p)++ = (v) >> 8; \ -- *(p)++ = (v) >> 0; \ -- \ -- } while ( 0 ) -- --#define WRITE_ULONG( p, v ) \ -- do \ -- { \ -- *(p)++ = (v) >> 24; \ -- *(p)++ = (v) >> 16; \ -- *(p)++ = (v) >> 8; \ -- *(p)++ = (v) >> 0; \ -- \ -+#define WRITE_ULONG( p, v ) \ -+ do \ -+ { \ -+ *(p)++ = (FT_Byte)( (v) >> 24 ); \ -+ *(p)++ = (FT_Byte)( (v) >> 16 ); \ -+ *(p)++ = (FT_Byte)( (v) >> 8 ); \ -+ *(p)++ = (FT_Byte)( (v) >> 0 ); \ -+ \ - } while ( 0 ) - - -@@ -661,6 +654,8 @@ - } - else - { -+#ifdef FT_CONFIG_OPTION_USE_ZLIB -+ - /* Uncompress with zlib. */ - FT_ULong output_len = table->OrigLength; - -@@ -675,6 +670,13 @@ - error = FT_THROW( Invalid_Table ); - goto Exit; - } -+ -+#else /* !FT_CONFIG_OPTION_USE_ZLIB */ -+ -+ error = FT_THROW( Unimplemented_Feature ); -+ goto Exit; -+ -+#endif /* !FT_CONFIG_OPTION_USE_ZLIB */ - } - - FT_FRAME_EXIT(); -@@ -717,7 +719,6 @@ - } - - --#undef WRITE_BYTE - #undef WRITE_USHORT - #undef WRITE_ULONG - -diff --git a/src/sfnt/ttcmap.c b/src/sfnt/ttcmap.c -index c717f5f..f9acf5d 100644 ---- a/src/sfnt/ttcmap.c -+++ b/src/sfnt/ttcmap.c -@@ -3473,10 +3473,9 @@ - /* only recognize format 0 */ - if ( TT_NEXT_USHORT( p ) != 0 ) - { -- p -= 2; - FT_ERROR(( "tt_face_build_cmaps:" - " unsupported `cmap' table format = %d\n", -- TT_PEEK_USHORT( p ) )); -+ TT_PEEK_USHORT( p - 2) )); - return FT_THROW( Invalid_Table ); - } - -diff --git a/src/sfnt/ttpost.c b/src/sfnt/ttpost.c -index 47a85c0..99d8005 100644 ---- a/src/sfnt/ttpost.c -+++ b/src/sfnt/ttpost.c -@@ -5,7 +5,7 @@ - /* Postcript name table processing for TrueType and OpenType fonts */ - /* (body). */ - /* */ --/* Copyright 1996-2003, 2006-2010, 2013 by */ -+/* Copyright 1996-2003, 2006-2010, 2013, 2014 by */ - /* David Turner, Robert Wilhelm, and Werner Lemberg. */ - /* */ - /* This file is part of the FreeType project, and may only be used, */ -@@ -64,12 +64,12 @@ - - #define MAC_NAME( x ) ( (FT_String*)tt_post_default_names[x] ) - -- /* the 258 default Mac PS glyph names */ -+ /* the 258 default Mac PS glyph names; see file `tools/glnames.py' */ - - static const FT_String* const tt_post_default_names[258] = - { - /* 0 */ -- ".notdef", ".null", "CR", "space", "exclam", -+ ".notdef", ".null", "nonmarkingreturn", "space", "exclam", - "quotedbl", "numbersign", "dollar", "percent", "ampersand", - /* 10 */ - "quotesingle", "parenleft", "parenright", "asterisk", "plus", -@@ -120,7 +120,7 @@ - "ae", "oslash", "questiondown", "exclamdown", "logicalnot", - "radical", "florin", "approxequal", "Delta", "guillemotleft", - /* 170 */ -- "guillemotright", "ellipsis", "nbspace", "Agrave", "Atilde", -+ "guillemotright", "ellipsis", "nonbreakingspace", "Agrave", "Atilde", - "Otilde", "OE", "oe", "endash", "emdash", - /* 180 */ - "quotedblleft", "quotedblright", "quoteleft", "quoteright", "divide", -@@ -144,8 +144,8 @@ - "multiply", "onesuperior", "twosuperior", "threesuperior", "onehalf", - "onequarter", "threequarters", "franc", "Gbreve", "gbreve", - /* 250 */ -- "Idot", "Scedilla", "scedilla", "Cacute", "cacute", -- "Ccaron", "ccaron", "dmacron", -+ "Idotaccent", "Scedilla", "scedilla", "Cacute", "cacute", -+ "Ccaron", "ccaron", "dcroat", - }; - - -diff --git a/src/sfnt/ttsbit.c b/src/sfnt/ttsbit.c -index 8ff7b9d..180d559 100644 ---- a/src/sfnt/ttsbit.c -+++ b/src/sfnt/ttsbit.c -@@ -256,7 +256,8 @@ - case TT_SBIT_TABLE_TYPE_SBIX: - { - FT_Stream stream = face->root.stream; -- FT_UInt offset, ppem, resolution, upem; -+ FT_UInt offset, upem; -+ FT_UShort ppem, resolution; - TT_HoriHeader *hori; - FT_ULong table_size; - -@@ -800,12 +801,12 @@ - FT_Error error = FT_Err_Ok; - FT_UInt num_components, nn; - -- FT_Char horiBearingX = decoder->metrics->horiBearingX; -- FT_Char horiBearingY = decoder->metrics->horiBearingY; -- FT_Byte horiAdvance = decoder->metrics->horiAdvance; -- FT_Char vertBearingX = decoder->metrics->vertBearingX; -- FT_Char vertBearingY = decoder->metrics->vertBearingY; -- FT_Byte vertAdvance = decoder->metrics->vertAdvance; -+ FT_Char horiBearingX = (FT_Char)decoder->metrics->horiBearingX; -+ FT_Char horiBearingY = (FT_Char)decoder->metrics->horiBearingY; -+ FT_Byte horiAdvance = (FT_Byte)decoder->metrics->horiAdvance; -+ FT_Char vertBearingX = (FT_Char)decoder->metrics->vertBearingX; -+ FT_Char vertBearingY = (FT_Char)decoder->metrics->vertBearingY; -+ FT_Byte vertAdvance = (FT_Byte)decoder->metrics->vertAdvance; - - - if ( p + 2 > limit ) -@@ -1352,10 +1353,11 @@ - - tt_face_get_metrics( face, FALSE, glyph_index, &abearing, &aadvance ); - -- metrics->horiBearingX = originOffsetX; -- metrics->horiBearingY = -originOffsetY + metrics->height; -- metrics->horiAdvance = aadvance * face->root.size->metrics.x_ppem / -- face->header.Units_Per_EM; -+ metrics->horiBearingX = (FT_Short)originOffsetX; -+ metrics->horiBearingY = (FT_Short)( -originOffsetY + metrics->height ); -+ metrics->horiAdvance = (FT_Short)( aadvance * -+ face->root.size->metrics.x_ppem / -+ face->header.Units_Per_EM ); - } - - return error; -diff --git a/src/smooth/ftgrays.c b/src/smooth/ftgrays.c -index 425911a..27be966 100644 ---- a/src/smooth/ftgrays.c -+++ b/src/smooth/ftgrays.c -@@ -98,6 +98,9 @@ - #define FT_ERR_XCAT( x, y ) x ## y - #define FT_ERR_CAT( x, y ) FT_ERR_XCAT( x, y ) - -+#define FT_BEGIN_STMNT do { -+#define FT_END_STMNT } while ( 0 ) -+ - - /* define this to dump debugging information */ - /* #define FT_DEBUG_LEVEL_TRACE */ -diff --git a/src/tools/afblue.pl b/src/tools/afblue.pl -index 58aa2a0..60fe696 100644 ---- a/src/tools/afblue.pl -+++ b/src/tools/afblue.pl -@@ -63,8 +63,8 @@ my $enum_element_re = qr/ ^ \s* ( [A-Za-z0-9_]+ ) \s* $ /x; - # '#' <preprocessor directive> '\n' - my $preprocessor_re = qr/ ^ \# /x; - --# '/' '/' <comment> '\n' --my $comment_re = qr| ^ // |x; -+# [<ws>] '/' '/' <comment> '\n' -+my $comment_re = qr| ^ \s* // |x; - - # empty line - my $whitespace_only_re = qr/ ^ \s* $ /x; -@@ -159,6 +159,9 @@ sub convert_ascii_chars - # A series of ASCII characters in the printable range. - my $s = shift; - -+ # We ignore spaces. -+ $s =~ s/ //g; -+ - my $count = $s =~ s/\G(.)/'$1', /g; - $curr_offset += $count; - $curr_elem_size += $count; -diff --git a/src/truetype/ttgload.c b/src/truetype/ttgload.c -index 5f676a2..ff2b339 100644 ---- a/src/truetype/ttgload.c -+++ b/src/truetype/ttgload.c -@@ -4,7 +4,7 @@ - /* */ - /* TrueType Glyph Loader (body). */ - /* */ --/* Copyright 1996-2013 */ -+/* Copyright 1996-2014 */ - /* David Turner, Robert Wilhelm, and Werner Lemberg. */ - /* */ - /* This file is part of the FreeType project, and may only be used, */ -@@ -99,13 +99,13 @@ - - else if ( face->os2.version != 0xFFFFU ) - { -- *tsb = face->os2.sTypoAscender - yMax; -+ *tsb = (FT_Short)( face->os2.sTypoAscender - yMax ); - *ah = face->os2.sTypoAscender - face->os2.sTypoDescender; - } - - else - { -- *tsb = face->horizontal.Ascender - yMax; -+ *tsb = (FT_Short)( face->horizontal.Ascender - yMax ); - *ah = face->horizontal.Ascender - face->horizontal.Descender; - } - -@@ -2120,7 +2120,7 @@ - FT_Bool reexecute = FALSE; - - -- if ( !size->cvt_ready ) -+ if ( size->bytecode_ready < 0 || size->cvt_ready < 0 ) - { - FT_Error error = tt_size_ready_bytecode( size, pedantic ); - -@@ -2128,6 +2128,10 @@ - if ( error ) - return error; - } -+ else if ( size->bytecode_ready ) -+ return size->bytecode_ready; -+ else if ( size->cvt_ready ) -+ return size->cvt_ready; - - /* query new execution context */ - exec = size->debug ? size->context -@@ -2238,12 +2242,15 @@ - - if ( reexecute ) - { -- FT_UInt i; -+ FT_UInt i; -+ FT_Error error; - - - for ( i = 0; i < size->cvt_size; i++ ) - size->cvt[i] = FT_MulFix( face->cvt[i], size->ttmetrics.scale ); -- tt_size_run_prep( size, pedantic ); -+ error = tt_size_run_prep( size, pedantic ); -+ if ( error ) -+ return error; - } - - /* see whether the cvt program has disabled hinting */ -diff --git a/src/truetype/ttinterp.c b/src/truetype/ttinterp.c -index 56e8fa7..7d0248b 100644 ---- a/src/truetype/ttinterp.c -+++ b/src/truetype/ttinterp.c -@@ -172,6 +172,9 @@ - #define CUR_Func_round( d, c ) \ - CUR.func_round( EXEC_ARG_ d, c ) - -+#define CUR_Func_cur_ppem() \ -+ CUR.func_cur_ppem( EXEC_ARG ) -+ - #define CUR_Func_read_cvt( index ) \ - CUR.func_read_cvt( EXEC_ARG_ index ) - -@@ -184,12 +187,6 @@ - #define CURRENT_Ratio() \ - Current_Ratio( EXEC_ARG ) - --#define CURRENT_Ppem() \ -- Current_Ppem( EXEC_ARG ) -- --#define CUR_Ppem() \ -- Cur_PPEM( EXEC_ARG ) -- - #define INS_SxVTL( a, b, c, d ) \ - Ins_SxVTL( EXEC_ARG_ a, b, c, d ) - -@@ -1446,7 +1443,7 @@ - TT_MulFix14_arm( FT_Int32 a, - FT_Int b ) - { -- register FT_Int32 t, t2; -+ FT_Int32 t, t2; - - - #if defined( __CC_ARM ) || defined( __ARMCC__ ) -@@ -1706,9 +1703,16 @@ - } - - -- static FT_Long -+ FT_CALLBACK_DEF( FT_Long ) - Current_Ppem( EXEC_OP ) - { -+ return CUR.tt_metrics.ppem; -+ } -+ -+ -+ FT_CALLBACK_DEF( FT_Long ) -+ Current_Ppem_Stretched( EXEC_OP ) -+ { - return FT_MulFix( CUR.tt_metrics.ppem, CURRENT_Ratio() ); - } - -@@ -3089,7 +3093,7 @@ - - - #define DO_MPPEM \ -- args[0] = CURRENT_Ppem(); -+ args[0] = CUR_Func_cur_ppem(); - - - /* Note: The pointSize should be irrelevant in a given font program; */ -@@ -3102,7 +3106,7 @@ - #else - - #define DO_MPS \ -- args[0] = CURRENT_Ppem(); -+ args[0] = CUR_Func_cur_ppem(); - - #endif /* 0 */ - -@@ -7487,9 +7491,9 @@ - static void - Ins_DELTAP( INS_ARG ) - { -- FT_ULong k, nump; -+ FT_ULong nump, k; - FT_UShort A; -- FT_ULong C; -+ FT_ULong C, P; - FT_Long B; - #ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING - FT_UShort B1, B2; -@@ -7523,6 +7527,7 @@ - } - #endif - -+ P = (FT_ULong)CUR_Func_cur_ppem(); - nump = (FT_ULong)args[0]; /* some points theoretically may occur more - than once, thus UShort isn't enough */ - -@@ -7567,7 +7572,7 @@ - - C += CUR.GS.delta_base; - -- if ( CURRENT_Ppem() == (FT_Long)C ) -+ if ( P == C ) - { - B = ( (FT_ULong)B & 0xF ) - 8; - if ( B >= 0 ) -@@ -7596,9 +7601,9 @@ - else if ( CUR.ignore_x_mode ) - { - if ( CUR.GS.freeVector.y != 0 ) -- B1 = CUR.zp0.cur[A].y; -+ B1 = (FT_UShort)CUR.zp0.cur[A].y; - else -- B1 = CUR.zp0.cur[A].x; -+ B1 = (FT_UShort)CUR.zp0.cur[A].x; - - #if 0 - /* Standard Subpixel Hinting: Allow y move. */ -@@ -7615,7 +7620,7 @@ - !( CUR.sph_tweak_flags & SPH_TWEAK_ALWAYS_SKIP_DELTAP ) ) - { - /* save the y value of the point now; compare after move */ -- B1 = CUR.zp0.cur[A].y; -+ B1 = (FT_UShort)CUR.zp0.cur[A].y; - - if ( CUR.sph_tweak_flags & SPH_TWEAK_ROUND_NONPIXEL_Y_MOVES ) - B = FT_PIX_ROUND( B1 + B ) - B1; -@@ -7627,7 +7632,7 @@ - CUR_Func_move( &CUR.zp0, A, B ); - } - -- B2 = CUR.zp0.cur[A].y; -+ B2 = (FT_UShort)CUR.zp0.cur[A].y; - - /* Reverse this move if it results in a disallowed move */ - if ( CUR.GS.freeVector.y != 0 && -@@ -7667,7 +7672,7 @@ - Ins_DELTAC( INS_ARG ) - { - FT_ULong nump, k; -- FT_ULong A, C; -+ FT_ULong A, C, P; - FT_Long B; - - -@@ -7691,6 +7696,7 @@ - } - #endif - -+ P = (FT_ULong)CUR_Func_cur_ppem(); - nump = (FT_ULong)args[0]; - - for ( k = 1; k <= nump; k++ ) -@@ -7736,7 +7742,7 @@ - - C += CUR.GS.delta_base; - -- if ( CURRENT_Ppem() == (FT_Long)C ) -+ if ( P == C ) - { - B = ( (FT_ULong)B & 0xF ) - 8; - if ( B >= 0 ) -@@ -8269,11 +8275,12 @@ - CUR.iup_called = FALSE; - #endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */ - -- /* set CVT functions */ -+ /* set PPEM and CVT functions */ - CUR.tt_metrics.ratio = 0; - if ( CUR.metrics.x_ppem != CUR.metrics.y_ppem ) - { - /* non-square pixels, use the stretched routines */ -+ CUR.func_cur_ppem = Current_Ppem_Stretched; - CUR.func_read_cvt = Read_CVT_Stretched; - CUR.func_write_cvt = Write_CVT_Stretched; - CUR.func_move_cvt = Move_CVT_Stretched; -@@ -8281,6 +8288,7 @@ - else - { - /* square pixels, use normal routines */ -+ CUR.func_cur_ppem = Current_Ppem; - CUR.func_read_cvt = Read_CVT; - CUR.func_write_cvt = Write_CVT; - CUR.func_move_cvt = Move_CVT; -@@ -9035,10 +9043,13 @@ - /* If any errors have occurred, function tables may be broken. */ - /* Force a re-execution of `prep' and `fpgm' tables if no */ - /* bytecode debugger is run. */ -- if ( CUR.error && !CUR.instruction_trap ) -+ if ( CUR.error -+ && !CUR.instruction_trap -+ && CUR.curRange == tt_coderange_glyph ) - { - FT_TRACE1(( " The interpreter returned error 0x%x\n", CUR.error )); -- exc->size->cvt_ready = FALSE; -+ exc->size->bytecode_ready = -1; -+ exc->size->cvt_ready = -1; - } - - return CUR.error; -diff --git a/src/truetype/ttinterp.h b/src/truetype/ttinterp.h -index 1d8825d..3cfc859 100644 ---- a/src/truetype/ttinterp.h -+++ b/src/truetype/ttinterp.h -@@ -4,7 +4,7 @@ - /* */ - /* TrueType bytecode interpreter (specification). */ - /* */ --/* Copyright 1996-2007, 2010, 2012-2013 by */ -+/* Copyright 1996-2007, 2010, 2012-2014 by */ - /* David Turner, Robert Wilhelm, and Werner Lemberg. */ - /* */ - /* This file is part of the FreeType project, and may only be used, */ -@@ -81,6 +81,10 @@ FT_BEGIN_HEADER - (*TT_Project_Func)( EXEC_OP_ FT_Pos dx, - FT_Pos dy ); - -+ /* getting current ppem. Take care of non-square pixels if necessary */ -+ typedef FT_Long -+ (*TT_Cur_Ppem_Func)( EXEC_OP ); -+ - /* reading a cvt value. Take care of non-square pixels if necessary */ - typedef FT_F26Dot6 - (*TT_Get_CVT_Func)( EXEC_OP_ FT_ULong idx ); -@@ -228,11 +232,6 @@ FT_BEGIN_HEADER - FT_F26Dot6 phase; /* `SuperRounding' */ - FT_F26Dot6 threshold; - --#if 0 -- /* this seems to be unused */ -- FT_Int cur_ppem; /* ppem along the current proj vector */ --#endif -- - FT_Bool instruction_trap; /* If `True', the interpreter will */ - /* exit after each instruction */ - -@@ -254,6 +253,8 @@ FT_BEGIN_HEADER - TT_Move_Func func_move; /* current point move function */ - TT_Move_Func func_move_orig; /* move original position function */ - -+ TT_Cur_Ppem_Func func_cur_ppem; /* get current proj. ppem value */ -+ - TT_Get_CVT_Func func_read_cvt; /* read a cvt entry */ - TT_Set_CVT_Func func_write_cvt; /* write a cvt entry (in pixels) */ - TT_Set_CVT_Func func_move_cvt; /* incr a cvt entry (in pixels) */ -diff --git a/src/truetype/ttobjs.c b/src/truetype/ttobjs.c -index 4adba58..05a121c 100644 ---- a/src/truetype/ttobjs.c -+++ b/src/truetype/ttobjs.c -@@ -813,6 +813,8 @@ - else - error = FT_Err_Ok; - -+ size->bytecode_ready = error; -+ - if ( !error ) - TT_Save_Context( exec, size ); - -@@ -884,6 +886,8 @@ - else - error = FT_Err_Ok; - -+ size->cvt_ready = error; -+ - /* UNDOCUMENTED! The MS rasterizer doesn't allow the following */ - /* graphics state variables to be modified by the CVT program. */ - -@@ -912,10 +916,6 @@ - return error; - } - --#endif /* TT_USE_BYTECODE_INTERPRETER */ -- -- --#ifdef TT_USE_BYTECODE_INTERPRETER - - static void - tt_size_done_bytecode( FT_Size ftsize ) -@@ -953,8 +953,8 @@ - size->max_func = 0; - size->max_ins = 0; - -- size->bytecode_ready = 0; -- size->cvt_ready = 0; -+ size->bytecode_ready = -1; -+ size->cvt_ready = -1; - } - - -@@ -974,8 +974,8 @@ - TT_MaxProfile* maxp = &face->max_profile; - - -- size->bytecode_ready = 1; -- size->cvt_ready = 0; -+ size->bytecode_ready = -1; -+ size->cvt_ready = -1; - - size->max_function_defs = maxp->maxFunctionDefs; - size->max_instruction_defs = maxp->maxInstructionDefs; -@@ -1052,15 +1052,14 @@ - FT_Error error = FT_Err_Ok; - - -- if ( !size->bytecode_ready ) -- { -+ if ( size->bytecode_ready < 0 ) - error = tt_size_init_bytecode( (FT_Size)size, pedantic ); -- if ( error ) -- goto Exit; -- } -+ -+ if ( error || size->bytecode_ready ) -+ goto Exit; - - /* rescale CVT when needed */ -- if ( !size->cvt_ready ) -+ if ( size->cvt_ready < 0 ) - { - FT_UInt i; - TT_Face face = (TT_Face)size->root.face; -@@ -1087,8 +1086,6 @@ - size->GS = tt_default_graphics_state; - - error = tt_size_run_prep( size, pedantic ); -- if ( !error ) -- size->cvt_ready = 1; - } - - Exit: -@@ -1119,8 +1116,8 @@ - FT_Error error = FT_Err_Ok; - - #ifdef TT_USE_BYTECODE_INTERPRETER -- size->bytecode_ready = 0; -- size->cvt_ready = 0; -+ size->bytecode_ready = -1; -+ size->cvt_ready = -1; - #endif - - size->ttmetrics.valid = FALSE; -@@ -1148,7 +1145,7 @@ - - - #ifdef TT_USE_BYTECODE_INTERPRETER -- if ( size->bytecode_ready ) -+ if ( size->bytecode_ready >= 0 ) - tt_size_done_bytecode( ttsize ); - #endif - -@@ -1229,7 +1226,7 @@ - } - - #ifdef TT_USE_BYTECODE_INTERPRETER -- size->cvt_ready = 0; -+ size->cvt_ready = -1; - #endif /* TT_USE_BYTECODE_INTERPRETER */ - - if ( !error ) -diff --git a/src/truetype/ttobjs.h b/src/truetype/ttobjs.h -index a11dd37..47d50d9 100644 ---- a/src/truetype/ttobjs.h -+++ b/src/truetype/ttobjs.h -@@ -4,7 +4,7 @@ - /* */ - /* Objects manager (specification). */ - /* */ --/* Copyright 1996-2009, 2011-2013 by */ -+/* Copyright 1996-2009, 2011-2014 by */ - /* David Turner, Robert Wilhelm, and Werner Lemberg. */ - /* */ - /* This file is part of the FreeType project, and may only be used, */ -@@ -333,8 +333,10 @@ FT_BEGIN_HEADER - FT_Bool debug; - TT_ExecContext context; - -- FT_Bool bytecode_ready; -- FT_Bool cvt_ready; -+ /* if negative, `fpgm' (resp. `prep'), wasn't executed yet; */ -+ /* otherwise it is the returned error code */ -+ FT_Error bytecode_ready; -+ FT_Error cvt_ready; - - #endif /* TT_USE_BYTECODE_INTERPRETER */ - -diff --git a/src/truetype/ttsubpix.c b/src/truetype/ttsubpix.c -index 28470ad..9871994 100644 ---- a/src/truetype/ttsubpix.c -+++ b/src/truetype/ttsubpix.c -@@ -956,7 +956,7 @@ - if ( loader->exec->rasterizer_version != TT_INTERPRETER_VERSION_35 ) - { - loader->exec->rasterizer_version = TT_INTERPRETER_VERSION_35; -- loader->exec->size->cvt_ready = FALSE; -+ loader->exec->size->cvt_ready = -1; - - tt_size_ready_bytecode( - loader->exec->size, -@@ -971,7 +971,7 @@ - SPH_OPTION_SET_RASTERIZER_VERSION ) - { - loader->exec->rasterizer_version = SPH_OPTION_SET_RASTERIZER_VERSION; -- loader->exec->size->cvt_ready = FALSE; -+ loader->exec->size->cvt_ready = -1; - - tt_size_ready_bytecode( - loader->exec->size, -diff --git a/src/type1/t1driver.c b/src/type1/t1driver.c -index 697288d..2602bdb 100644 ---- a/src/type1/t1driver.c -+++ b/src/type1/t1driver.c -@@ -4,7 +4,7 @@ - /* */ - /* Type 1 driver interface (body). */ - /* */ --/* Copyright 1996-2004, 2006, 2007, 2009, 2011, 2013 by */ -+/* Copyright 1996-2004, 2006, 2007, 2009, 2011, 2013, 2014 by */ - /* David Turner, Robert Wilhelm, and Werner Lemberg. */ - /* */ - /* This file is part of the FreeType project, and may only be used, */ -@@ -557,9 +557,6 @@ - if ( value && value_len >= retval ) - *((FT_Long *)value) = type1->font_info.italic_angle; - break; -- -- default: -- break; - } - - return retval; |