diff options
-rw-r--r-- | testing/freetype-infinality/01-freetype-2.5.5-enable-valid.patch | 20 | ||||
-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 | 4500 | ||||
-rw-r--r-- | testing/freetype-infinality/APKBUILD | 74 | ||||
-rw-r--r-- | testing/freetype-infinality/infinality-settings.sh | 48 |
6 files changed, 0 insertions, 34248 deletions
diff --git a/testing/freetype-infinality/01-freetype-2.5.5-enable-valid.patch b/testing/freetype-infinality/01-freetype-2.5.5-enable-valid.patch deleted file mode 100644 index df81058b16..0000000000 --- a/testing/freetype-infinality/01-freetype-2.5.5-enable-valid.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- a/modules.cfg 2013-11-12 13:02:26.000000000 +0100 -+++ b/modules.cfg 2014-03-07 19:18:00.546655169 +0100 -@@ -110,7 +110,7 @@ RASTER_MODULES += smooth - AUX_MODULES += cache - - # TrueType GX/AAT table validation. Needs ftgxval.c below. --# AUX_MODULES += gxvalid -+AUX_MODULES += gxvalid - - # Support for streams compressed with gzip (files with suffix .gz). - # -@@ -129,7 +129,7 @@ AUX_MODULES += bzip2 - - # OpenType table validation. Needs ftotval.c below. - # --# AUX_MODULES += otvalid -+AUX_MODULES += otvalid - - # Auxiliary PostScript driver component to share common code. - # diff --git a/testing/freetype-infinality/02-ftsmooth-2.5.5.patch b/testing/freetype-infinality/02-ftsmooth-2.5.5.patch deleted file mode 100644 index 10ec0c036a..0000000000 --- a/testing/freetype-infinality/02-ftsmooth-2.5.5.patch +++ /dev/null @@ -1,341 +0,0 @@ -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 deleted file mode 100644 index a42ba0b352..0000000000 --- a/testing/freetype-infinality/03-upstream-2015.01.23.patch +++ /dev/null @@ -1,29265 +0,0 @@ -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/04-infinality-2.5.5-2015.01.23.patch b/testing/freetype-infinality/04-infinality-2.5.5-2015.01.23.patch deleted file mode 100644 index e92139e4d1..0000000000 --- a/testing/freetype-infinality/04-infinality-2.5.5-2015.01.23.patch +++ /dev/null @@ -1,4500 +0,0 @@ ---- a/configure 2013-05-28 23:00:03.000000000 +0200 -+++ b/configure 2014-03-07 19:21:57.063320787 +0100 -@@ -13,6 +13,8 @@ - # Call the `configure' script located in `builds/unix'. - # - -+export LDFLAGS="$LDFLAGS -lm" -+ - rm -f config.mk builds/unix/unix-def.mk builds/unix/unix-cc.mk - - # 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 -@@ -605,6 +605,17 @@ FT_BEGIN_HEADER - - /*************************************************************************/ - /* */ -+ /* Define FT_CONFIG_OPTION_INFINALITY_PATCHSET if you want to enable */ -+ /* all additional infinality patches, which are configured via env */ -+ /* variables. */ -+ /* */ -+ /* This option requires TT_CONFIG_OPTION_SUBPIXEL_HINTING to */ -+ /* defined. */ -+ /* */ -+#define FT_CONFIG_OPTION_INFINALITY_PATCHSET -+ -+ /*************************************************************************/ -+ /* */ - /* If you define TT_CONFIG_OPTION_UNPATENTED_HINTING, a special version */ - /* of the TrueType bytecode interpreter is used that doesn't implement */ - /* any of the patented opcodes and algorithms. The patents related to */ - ---- a/include/config/ftoption.h 2014-03-01 12:27:34.000000000 +0100 -+++ b/include/config/ftoption.h 2014-03-07 19:21:57.066654119 +0100 -@@ -92,7 +92,7 @@ FT_BEGIN_HEADER - /* This is done to allow FreeType clients to run unmodified, forcing */ - /* them to display normal gray-level anti-aliased glyphs. */ - /* */ --/* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING */ -+#define FT_CONFIG_OPTION_SUBPIXEL_RENDERING - - - /*************************************************************************/ -@@ -600,11 +600,22 @@ FT_BEGIN_HEADER - /* This option requires TT_CONFIG_OPTION_BYTECODE_INTERPRETER to be */ - /* defined. */ - /* */ --/* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING */ -+#define TT_CONFIG_OPTION_SUBPIXEL_HINTING - - - /*************************************************************************/ - /* */ -+ /* Define FT_CONFIG_OPTION_INFINALITY_PATCHSET if you want to enable */ -+ /* all additional infinality patches, which are configured via env */ -+ /* variables. */ -+ /* */ -+ /* This option requires TT_CONFIG_OPTION_SUBPIXEL_HINTING to */ -+ /* defined. */ -+ /* */ -+#define FT_CONFIG_OPTION_INFINALITY_PATCHSET -+ -+ /*************************************************************************/ -+ /* */ - /* If you define TT_CONFIG_OPTION_UNPATENTED_HINTING, a special version */ - /* 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-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" - #include "aferrors.h" -+#include "strings.h" - - - #ifdef AF_CONFIG_OPTION_USE_WARPER -@@ -40,6 +41,10 @@ - #undef FT_COMPONENT - #define FT_COMPONENT trace_aflatin - -+#ifdef FT_CONFIG_OPTION_INFINALITY_PATCHSET -+FT_Pos infinality_cur_width = 0; -+#endif -+ - - /*************************************************************************/ - /*************************************************************************/ -@@ -892,8 +897,33 @@ - FT_Pos delta; - AF_LatinAxis axis; - FT_UInt nn; -+#ifdef FT_CONFIG_OPTION_INFINALITY_PATCHSET -+ int checked_adjust_heights_env = 0; -+ FT_Bool adjust_heights = FALSE; - - -+ if ( checked_adjust_heights_env == 0 ) -+ { -+ char *adjust_heights_env = -+ getenv( "INFINALITY_FT_AUTOHINT_INCREASE_GLYPH_HEIGHTS" ); -+ if ( adjust_heights_env != NULL ) -+ { -+ if ( strcasecmp(adjust_heights_env, "default" ) != 0 ) -+ { -+ if ( strcasecmp(adjust_heights_env, "true") == 0 ) -+ adjust_heights = TRUE; -+ else if ( strcasecmp(adjust_heights_env, "1") == 0 ) -+ adjust_heights = TRUE; -+ else if ( strcasecmp(adjust_heights_env, "on") == 0 ) -+ adjust_heights = TRUE; -+ else if ( strcasecmp(adjust_heights_env, "yes") == 0 ) -+ adjust_heights = TRUE; -+ } -+ } -+ checked_adjust_heights_env = 1; -+ } -+#endif /* FT_CONFIG_OPTION_INFINALITY_PATCHSET */ -+ - if ( dim == AF_DIMENSION_HORZ ) - { - scale = scaler->x_scale; -@@ -920,7 +950,7 @@ - { - AF_LatinAxis Axis = &metrics->axis[AF_DIMENSION_VERT]; - AF_LatinBlue blue = NULL; -- -+ int threshold = 40; - - for ( nn = 0; nn < Axis->blue_count; nn++ ) - { -@@ -930,7 +960,12 @@ - break; - } - } -- -+#ifdef FT_CONFIG_OPTION_INFINALITY_PATCHSET -+ if ( adjust_heights && -+ metrics->root.scaler.face->size->metrics.x_ppem < 15 && -+ metrics->root.scaler.face->size->metrics.x_ppem > 5 ) -+ threshold = 52; -+#endif /* FT_CONFIG_OPTION_INFINALITY_PATCHSET */ - if ( blue ) - { - FT_Pos scaled; -@@ -1049,7 +1084,13 @@ - - /* a blue zone is only active if it is less than 3/4 pixels tall */ - dist = FT_MulFix( blue->ref.org - blue->shoot.org, scale ); -+ -+#ifdef FT_CONFIG_OPTION_INFINALITY_PATCHSET -+ /* Do at low ppems ( ~< 200 ), in order to prevent fringes */ -+ if ( dist <= 256 && dist >= -256 ) -+#else - if ( dist <= 48 && dist >= -48 ) -+#endif /* FT_CONFIG_OPTION_INFINALITY_PATCHSET */ - { - #if 0 - FT_Pos delta1; -@@ -1100,7 +1141,12 @@ - delta2 = -delta2; - - blue->ref.fit = FT_PIX_ROUND( blue->ref.cur ); -+#ifdef FT_CONFIG_OPTION_INFINALITY_PATCHSET -+ /* Round to prevent fringes */ -+ blue->shoot.fit = FT_PIX_ROUND( blue->ref.fit - delta2 ); -+#else - blue->shoot.fit = blue->ref.fit - delta2; -+#endif /* FT_CONFIG_OPTION_INFINALITY_PATCHSET */ - - #endif - -@@ -1913,7 +1959,10 @@ - dist = edge->fpos - blue->shoot.org; - if ( dist < 0 ) - dist = -dist; -- -+#ifdef FT_CONFIG_OPTION_INFINALITY_PATCHSET -+ /* round down to pixels */ -+ /*dist = FT_MulFix( dist, scale ) & ~63;*/ -+#endif - dist = FT_MulFix( dist, scale ); - if ( dist < best_dist ) - { -@@ -2079,8 +2128,31 @@ - FT_Pos dist = width; - FT_Int sign = 0; - FT_Int vertical = ( dim == AF_DIMENSION_VERT ); -+#ifdef FT_CONFIG_OPTION_INFINALITY_PATCHSET -+ FT_Int infinality_dist = 0; -+ FT_UInt autohint_snap_stem_height = 0; -+ FT_UInt checked_autohint_snap_stem_height = 0; -+ -+ -+ if ( checked_autohint_snap_stem_height == 0 ) -+ { -+ char *autohint_snap_stem_height_env = -+ getenv( "INFINALITY_FT_AUTOHINT_SNAP_STEM_HEIGHT" ); -+ if ( autohint_snap_stem_height_env != NULL ) -+ { -+ sscanf ( autohint_snap_stem_height_env, "%u", -+ &autohint_snap_stem_height ); - -+ if ( autohint_snap_stem_height > 100 ) -+ autohint_snap_stem_height = 100; -+ else if ( autohint_snap_stem_height < 0 ) -+ autohint_snap_stem_height = 0; -+ } -+ checked_autohint_snap_stem_height = 1; -+ } - -+ if ( autohint_snap_stem_height == 0 ) -+#endif /* FT_CONFIG_OPTION_INFINALITY_PATCHSET */ - if ( !AF_LATIN_HINTS_DO_STEM_ADJUST( hints ) || - axis->extra_light ) - return width; -@@ -2090,9 +2162,73 @@ - dist = -width; - sign = 1; - } -+#ifdef FT_CONFIG_OPTION_INFINALITY_PATCHSET -+ /* Calculate snap value differently than standard freetype */ -+ if ( autohint_snap_stem_height > 0 && -+ ( ( vertical && !AF_LATIN_HINTS_DO_VERT_SNAP( hints ) ) || -+ ( !vertical && !AF_LATIN_HINTS_DO_HORZ_SNAP( hints ) ) ) ) -+ { -+ infinality_dist = af_latin_snap_width( axis->widths, -+ axis->width_count, dist ); -+ -+ if ( metrics->root.scaler.face->size->metrics.x_ppem > 9 && -+ axis->width_count > 0 && -+ abs( axis->widths[0].cur - infinality_dist ) < 32 && -+ axis->widths[0].cur > 52 ) -+ { -+ if ( strstr( metrics->root.scaler.face->style_name, "Regular" ) || -+ strstr( metrics->root.scaler.face->style_name, "Book" ) || -+ strstr( metrics->root.scaler.face->style_name, "Medium" ) || -+ strcmp( metrics->root.scaler.face->style_name, "Italic" ) == 0 || -+ strcmp( metrics->root.scaler.face->style_name, "Oblique" ) == 0 ) -+ { -+ /* regular weight */ -+ if ( axis->widths[0].cur < 64 ) -+ infinality_dist = 64; -+ else if ( axis->widths[0].cur < 88 ) -+ infinality_dist = 64; -+ else if ( axis->widths[0].cur < 160 ) -+ infinality_dist = 128; -+ else if ( axis->widths[0].cur < 240 ) -+ infinality_dist = 190; -+ else infinality_dist = ( infinality_dist ) & ~63; -+ } -+ else -+ { -+ /* bold gets a different threshold */ -+ if ( axis->widths[0].cur < 64 ) -+ infinality_dist = 64 ; -+ else if ( axis->widths[0].cur < 108 ) -+ infinality_dist = 64; -+ else if ( axis->widths[0].cur < 160 ) -+ infinality_dist = 128; -+ else if ( axis->widths[0].cur < 222 ) -+ infinality_dist = 190; -+ else if ( axis->widths[0].cur < 288 ) -+ infinality_dist = 254; -+ else infinality_dist = ( infinality_dist + 16 ) & ~63; -+ } -+ -+ } -+ if ( infinality_dist < 52 ) -+ { -+ if ( metrics->root.scaler.face->size->metrics.x_ppem < 9 ) -+ { -+ if ( infinality_dist < 32 ) -+ infinality_dist = 32; -+ } -+ else -+ infinality_dist = 64; -+ } -+ } -+ else if ( autohint_snap_stem_height < 100 && -+ ( ( vertical && !AF_LATIN_HINTS_DO_VERT_SNAP( hints ) ) || -+ ( !vertical && !AF_LATIN_HINTS_DO_HORZ_SNAP( hints ) ) ) ) -+#else - -- if ( ( vertical && !AF_LATIN_HINTS_DO_VERT_SNAP( hints ) ) || -+ if ( ( vertical && !AF_LATIN_HINTS_DO_VERT_SNAP( hints ) ) || - ( !vertical && !AF_LATIN_HINTS_DO_HORZ_SNAP( hints ) ) ) -+#endif /* FT_CONFIG_OPTION_INFINALITY_PATCHSET */ - { - /* smooth hinting process: very lightly quantize the stem width */ - -@@ -2152,6 +2288,9 @@ - } - } - else -+#ifdef FT_CONFIG_OPTION_INFINALITY_PATCHSET -+ if ( autohint_snap_stem_height < 100 ) -+#endif /* FT_CONFIG_OPTION_INFINALITY_PATCHSET */ - { - /* strong hinting process: snap the stem width to integer pixels */ - -@@ -2159,7 +2298,10 @@ - - - dist = af_latin_snap_width( axis->widths, axis->width_count, dist ); -- -+#ifdef FT_CONFIG_OPTION_INFINALITY_PATCHSET -+ if ( autohint_snap_stem_height > 0 ) -+ goto Done_Width; -+#endif /* FT_CONFIG_OPTION_INFINALITY_PATCHSET */ - if ( vertical ) - { - /* in the case of vertical hinting, always round */ -@@ -2222,6 +2364,32 @@ - } - - Done_Width: -+#ifdef FT_CONFIG_OPTION_INFINALITY_PATCHSET -+ if ( axis->widths[0].cur > 42 ) -+ /* weighted average */ -+ dist = (dist * ( 100 - autohint_snap_stem_height ) -+ + infinality_dist * autohint_snap_stem_height ) / 100; -+ -+ { -+ int factor = 100; -+ if ( axis->standard_width < 100 ) -+ factor = axis->standard_width; -+ -+ if ( metrics->root.scaler.face->size->metrics.x_ppem >= 9 && dist < 52 ) -+ dist += ( (52 - dist) * factor ) / 100; -+ if ( metrics->root.scaler.face->size->metrics.x_ppem < 9 && dist < 32 ) -+ dist += ( (32 - dist) * factor ) / 100; -+ -+ if ( axis->standard_width > 100 && -+ metrics->root.scaler.face->size->metrics.x_ppem >= 11 && -+ dist < 64 ) -+ dist = 64; -+ if ( axis->standard_width > 100 && -+ metrics->root.scaler.face->size->metrics.x_ppem >= 9 && -+ dist < 52 ) -+ dist = 52; -+ } -+#endif /* FT_CONFIG_OPTION_INFINALITY_PATCHSET */ - if ( sign ) - dist = -dist; - -@@ -2244,6 +2412,8 @@ - (AF_Edge_Flags)base_edge->flags, - (AF_Edge_Flags)stem_edge->flags ); - -+/* if fitted_width causes stem_edge->pos to land basically on top of an existing -+ * stem_edge->pos, then add or remove 64. Need to figure out a way to do this */ - - stem_edge->pos = base_edge->pos + fitted_width; - -@@ -2807,8 +2977,32 @@ - int dim; - - AF_LatinAxis axis; -+#ifdef FT_CONFIG_OPTION_INFINALITY_PATCHSET -+ FT_Int emboldening_strength = 0; -+ FT_Bool checked_use_various_tweaks_env = FALSE; -+ FT_Bool use_various_tweaks = FALSE; - -- -+ if ( !checked_use_various_tweaks_env ) -+ { -+ char *use_various_tweaks_env = -+ getenv( "INFINALITY_FT_USE_VARIOUS_TWEAKS" ); -+ if ( use_various_tweaks_env != NULL ) -+ { -+ if ( strcasecmp(use_various_tweaks_env, "default" ) != 0 ) -+ { -+ if ( strcasecmp(use_various_tweaks_env, "true") == 0 ) -+ use_various_tweaks = TRUE; -+ else if ( strcasecmp(use_various_tweaks_env, "1") == 0 ) -+ use_various_tweaks = TRUE; -+ else if ( strcasecmp(use_various_tweaks_env, "on") == 0 ) -+ use_various_tweaks = TRUE; -+ else if ( strcasecmp(use_various_tweaks_env, "yes") == 0 ) -+ use_various_tweaks = TRUE; -+ } -+ } -+ checked_use_various_tweaks_env = TRUE; -+ } -+#endif /* FT_CONFIG_OPTION_INFINALITY_PATCHSET */ - error = af_glyph_hints_reload( hints, outline ); - if ( error ) - goto Exit; -@@ -2874,7 +3068,11 @@ - } - - af_glyph_hints_save( hints, outline ); -- -+#ifdef FT_CONFIG_OPTION_INFINALITY_PATCHSET -+ { -+ infinality_cur_width = metrics->axis->widths[0].cur; -+ } -+#endif /* FT_CONFIG_OPTION_INFINALITY_PATCHSET */ - Exit: - return error; - } ---- 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 - -+#include <math.h> -+#include <string.h> -+#include <strings.h> - - #ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING - -@@ -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 */ -- static const FT_Byte default_filter[5] = -+ static FT_Byte default_filter[5] = - { 0x10, 0x40, 0x70, 0x40, 0x10 }; -+#ifdef FT_CONFIG_OPTION_INFINALITY_PATCHSET -+ int checked_filter_params_env = 0; - -+ if ( checked_filter_params_env == 0 ) -+ { -+ char *filter_params = getenv( "INFINALITY_FT_FILTER_PARAMS" ); -+ if ( filter_params != NULL && strcmp( filter_params, "" ) != 0 ) -+ { -+ float f1, f2, f3, f4, f5; - -+ if ( strcasecmp( filter_params, "default" ) != 0 ) -+ { -+ int args_assigned = 0; -+ args_assigned = sscanf ( filter_params, -+ "%f %f %f %f %f", -+ &f1, &f2, &f3, &f4, &f5 ); -+ -+ if ( args_assigned == 5 ) -+ { -+ if ( f1 + f2 + f3 + f4 + f5 > 5 ) -+ { -+ /* Assume we were given integers instead of floats */ -+ /* 0 to 100 */ -+ default_filter[0] = (FT_Byte) ( f1 * 2.55f + 0.5f ); -+ default_filter[1] = (FT_Byte) ( f2 * 2.55f + 0.5f ); -+ default_filter[2] = (FT_Byte) ( f3 * 2.55f + 0.5f ); -+ default_filter[3] = (FT_Byte) ( f4 * 2.55f + 0.5f ); -+ default_filter[4] = (FT_Byte) ( f5 * 2.55f + 0.5f ); -+ } -+ else -+ { -+ /* Assume we were given floating point values */ -+ /* 0 to 1.0 */ -+ default_filter[0] = (FT_Byte) ( f1 * 255.0f + 0.5f ); -+ default_filter[1] = (FT_Byte) ( f2 * 255.0f + 0.5f ); -+ default_filter[2] = (FT_Byte) ( f3 * 255.0f + 0.5f ); -+ default_filter[3] = (FT_Byte) ( f4 * 255.0f + 0.5f ); -+ default_filter[4] = (FT_Byte) ( f5 * 255.0f + 0.5f ); -+ } -+ } -+ } -+ } -+ checked_filter_params_env = 1; -+ } -+#endif - if ( !library ) - return FT_THROW( Invalid_Library_Handle ); - ---- 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 - -+#ifdef FT_CONFIG_OPTION_INFINALITY_PATCHSET -+#include <strings.h> -+#include <stdlib.h> -+#include "../autofit/aflatin.h" -+#endif - - FT_BASE_DEF( FT_Pointer ) - ft_service_list_lookup( FT_ServiceDesc service_descriptors, -@@ -543,6 +548,25 @@ - ft_lookup_glyph_renderer( FT_GlyphSlot slot ); - - -+#ifdef FT_CONFIG_OPTION_INFINALITY_PATCHSET -+ static void -+ ft_glyphslot_enlarge_metrics( FT_GlyphSlot slot, -+ FT_Render_Mode mode ) -+ { -+ FT_Glyph_Metrics* metrics = &slot->metrics; -+ FT_Pos enlarge_cbox = 0; -+ -+ -+ /* enlarge for grayscale rendering */ -+ if ( mode == FT_RENDER_MODE_NORMAL ) -+ enlarge_cbox = 64; -+ -+ metrics->horiBearingX -= enlarge_cbox; -+ metrics->width += 2 * enlarge_cbox; -+ } -+#endif /* FT_CONFIG_OPTION_INFINALITY_PATCHSET */ -+ -+ - #ifdef GRID_FIT_METRICS - static void - ft_glyphslot_grid_fit_metrics( FT_GlyphSlot slot, -@@ -601,8 +625,40 @@ - FT_Bool autohint = FALSE; - FT_Module hinter; - TT_Face ttface = (TT_Face)face; -+#ifdef FT_CONFIG_OPTION_INFINALITY_PATCHSET - -+ int checked_use_various_tweaks_env = FALSE; -+ FT_Bool use_various_tweaks = FALSE; -+ -+ if ( !checked_use_various_tweaks_env ) -+ { -+ char *use_various_tweaks_env = -+ getenv( "INFINALITY_FT_USE_VARIOUS_TWEAKS" ); - -+ if ( use_various_tweaks_env != NULL ) -+ { -+ if ( strcasecmp(use_various_tweaks_env, "default" ) != 0 ) -+ { -+ if ( strcasecmp(use_various_tweaks_env, "true") == 0 ) -+ use_various_tweaks = TRUE; -+ else if ( strcasecmp(use_various_tweaks_env, "1") == 0 ) -+ use_various_tweaks = TRUE; -+ else if ( strcasecmp(use_various_tweaks_env, "on") == 0 ) -+ use_various_tweaks = TRUE; -+ else if ( strcasecmp(use_various_tweaks_env, "yes") == 0 ) -+ use_various_tweaks = TRUE; -+ } -+ } -+ checked_use_various_tweaks_env = 1; -+ } -+ -+ /* Force autohint if no tt instructions */ -+ /* NOTE: NEEDS TO BE RUN LATER IN CODE???? */ -+ /*if ( use_various_tweaks && -+ ttface->num_locations && -+ ttface->max_profile.maxSizeOfInstructions == 0 ) -+ load_flags |= FT_LOAD_FORCE_AUTOHINT;*/ -+#endif - if ( !face || !face->size || !face->glyph ) - return FT_THROW( Invalid_Face_Handle ); - -@@ -690,6 +746,18 @@ - { - FT_AutoHinter_Interface hinting; - -+#ifdef FT_CONFIG_OPTION_INFINALITY_PATCHSET -+ if ( use_various_tweaks ) -+ { -+ /* Force slight hinting over full hinting always */ -+ load_flags &= ~FT_LOAD_TARGET_LCD; -+ load_flags &= ~FT_LOAD_TARGET_LCD_V; -+ load_flags &= ~FT_LOAD_TARGET_MONO; -+ load_flags &= ~FT_LOAD_TARGET_NORMAL; -+ load_flags |= FT_LOAD_TARGET_LIGHT; -+ /*printf("%d ", load_flags);*/ -+ } -+#endif - - /* try to load embedded bitmaps first if available */ - /* */ -@@ -735,6 +803,18 @@ - if ( error ) - goto Exit; - -+#ifdef FT_CONFIG_OPTION_INFINALITY_PATCHSET -+ infinality_cur_width = 0; -+ -+ { -+ /* fix for sdl_ttf */ -+ FT_Render_Mode mode = FT_LOAD_TARGET_MODE( load_flags ); -+ -+ if ( slot->format == FT_GLYPH_FORMAT_OUTLINE ) -+ ft_glyphslot_enlarge_metrics( slot, mode ); -+ } -+#endif -+ - if ( slot->format == FT_GLYPH_FORMAT_OUTLINE ) - { - /* check that the loaded outline is correct */ ---- 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; -+#ifdef FT_CONFIG_OPTION_INFINALITY_PATCHSET -+ int checked_use_various_tweaks_env = 0; -+ FT_Bool use_various_tweaks = FALSE; - -+ if ( checked_use_various_tweaks_env == 0 ) -+ { -+ char *use_various_tweaks_env -+ = getenv( "INFINALITY_FT_USE_VARIOUS_TWEAKS" ); -+ if ( use_various_tweaks_env != NULL ) -+ { -+ if ( strcasecmp(use_various_tweaks_env, "default" ) != 0 ) -+ { -+ if ( strcasecmp(use_various_tweaks_env, "true" ) == 0 ) -+ use_various_tweaks = TRUE; -+ else if ( strcasecmp(use_various_tweaks_env, "1" ) == 0 ) -+ use_various_tweaks = TRUE; -+ else if ( strcasecmp(use_various_tweaks_env, "on" ) == 0 ) -+ use_various_tweaks = TRUE; -+ else if ( strcasecmp(use_various_tweaks_env, "yes" ) == 0 ) -+ use_various_tweaks = TRUE; -+ } -+ } -+ checked_use_various_tweaks_env = 1; -+ } -+ -+ if ( use_various_tweaks ) -+ ystrength = FT_PIX_FLOOR ( ystrength ); -+#endif - - if ( !outline ) - 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 -+ int checked_use_various_tweaks_env = 0; -+ FT_Bool use_various_tweaks = FALSE; -+ -+ if ( checked_use_various_tweaks_env == 0 ) -+ { -+ char *use_various_tweaks_env -+ = getenv( "INFINALITY_FT_USE_VARIOUS_TWEAKS" ); -+ if ( use_various_tweaks_env != NULL ) -+ { -+ if ( strcasecmp(use_various_tweaks_env, "default" ) != 0 ) -+ { -+ if ( strcasecmp(use_various_tweaks_env, "true" ) == 0 ) -+ use_various_tweaks = TRUE; -+ else if ( strcasecmp(use_various_tweaks_env, "1" ) == 0 ) -+ use_various_tweaks = TRUE; -+ else if ( strcasecmp(use_various_tweaks_env, "on" ) == 0 ) -+ use_various_tweaks = TRUE; -+ else if ( strcasecmp(use_various_tweaks_env, "yes" ) == 0 ) -+ use_various_tweaks = TRUE; -+ } - -+ } -+ checked_use_various_tweaks_env = 1; -+ } -+#endif - - 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, -+ xstr, -+ FT_PIX_FLOOR( ystr ) ); -+ else -+#endif - 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; -+#ifdef FT_CONFIG_OPTION_INFINALITY_PATCHSET -+ if ( !use_various_tweaks ) -+#endif - slot->metrics.horiAdvance += xstr; - slot->metrics.vertAdvance += ystr; - slot->metrics.horiBearingY += ystr; ---- 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" - -+#ifdef FT_CONFIG_OPTION_INFINALITY_PATCHSET -+#include <math.h> -+#include "../../include/ftbitmap.h" -+#include <strings.h> -+#include "../autofit/aflatin.h" -+#include "../../include/ftoutln.h" -+ -+#define verbose FALSE -+#define STVALUES if (verbose) \ -+ printf ( "scale:%f translate:%ld ", *scale_value, *translate_value ); -+#endif /* FT_CONFIG_OPTION_INFINALITY_PATCHSET */ - - /* initialize renderer -- init its raster */ - static FT_Error -@@ -93,6 +104,2993 @@ - FT_Outline_Get_CBox( &slot->outline, cbox ); - } - -+#ifdef FT_CONFIG_OPTION_INFINALITY_PATCHSET -+ static FT_Fixed FT_FixedFromFloat(float f) -+ { -+ short value = f; -+ unsigned short fract = (f - value) * 0xFFFF; -+ -+ -+ return (FT_Fixed)((long)value << 16 | (unsigned long)fract ); -+ } -+ -+ -+ /* ChromeOS sharpening algorithm */ -+ /* soften the sub-pixel anti-aliasing and sharpen */ -+ static void -+ _ft_lcd_chromeos_sharpen( FT_Bitmap* bitmap, -+ FT_Render_Mode mode, -+ FT_Byte cutoff, -+ double gamma_value ) -+ { -+ static FT_Bool initialized_gamma = FALSE; -+ static unsigned short gamma_ramp[256]; -+ FT_UInt width = (FT_UInt)bitmap->width; -+ FT_UInt height = (FT_UInt)bitmap->rows; -+ int ii; -+ -+ if ( !initialized_gamma ) -+ { -+ initialized_gamma = TRUE; -+ /* linear to voltage */ -+ for ( ii = 0; ii < 256; ii++ ) -+ { -+ gamma_ramp[ii] = (unsigned char) -+ ( pow( (double)ii / 255.0, gamma_value ) * 255.0f ); -+ if ( gamma_ramp[ii] < cutoff ) -+ gamma_ramp[ii] = 0; -+ } -+ } -+ -+ /* horizontal in-place sub-pixel sharpening filter */ -+ if ( mode == FT_RENDER_MODE_LCD ) -+ { -+ FT_Byte* line = bitmap->buffer; -+ -+ -+ for ( ; height > 0; height--, line += bitmap->pitch ) -+ { -+ FT_UInt xx; -+ -+ -+ for ( xx = 0; xx < width; xx++ ) -+ line[xx] = gamma_ramp[line[xx]]; -+ } -+ } -+ } -+ -+ /* simple linear scale to handle various sliding values */ -+ float -+ sliding_scale ( int min_value, -+ int max_value, -+ float min_amount, -+ float max_amount, -+ int cur_value ) -+ { -+ -+ float m = ( min_amount - max_amount ) / (float)( min_value - max_value ); -+ float result = ( ( (float)cur_value * m) + ( max_amount - max_value * m ) ) ; -+ -+ if ( min_amount < max_amount ) -+ { -+ if ( result < min_amount ) -+ return min_amount; -+ if ( result > max_amount ) -+ return max_amount; -+ } -+ else -+ { -+ if ( result < max_amount ) -+ return max_amount; -+ if ( result > min_amount ) -+ return min_amount; -+ } -+ -+ return result; -+ } -+ -+ -+ /* brightness and contrast adjustment on the bitmap */ -+ static FT_Bool -+ _ft_bitmap_bc ( FT_Bitmap* bitmap, -+ float brightness, -+ float contrast ) -+ { -+ -+ FT_UInt width = (FT_UInt)bitmap->width; -+ FT_UInt height = (FT_UInt)bitmap->rows; -+ FT_Byte* line = bitmap->buffer; -+ FT_UInt xx; -+ -+ -+ if ( brightness == 0 && contrast == 0 ) -+ return FALSE; -+ -+ for ( height = (FT_UInt)bitmap->rows; -+ height > 0; -+ height--, line += bitmap->pitch ) -+ { -+ for ( xx = 0; xx < width - 1; xx += 1 ) -+ { -+ if ( line[xx] > 0) -+ { -+ float value = (float)( 255 - line[xx] ) / 256.0; -+ FT_Int result = 0; -+ -+ if ( brightness < 0.0 ) -+ value = value * ( 1.0 + brightness ); -+ else -+ value = value + ( ( 1.0 - value ) * brightness ); -+ -+ value = ( value - 0.5 ) * -+ ( tan ( ( contrast + 1.0 ) * 3.141592/4.0 ) ) + 0.5; -+ -+ result = (FT_Int)( 255.0 - value * 256.0 ); -+ -+ if ( result < 0 ) -+ result = 0; -+ if ( result > 255 ) -+ result = 255; -+ -+ line[xx] = result; -+ } -+ } -+ } -+ return TRUE; -+ } -+ -+ -+ /* Filter to mimic Windows-style sharpening */ -+ /* Determined via 100% experimentation. */ -+ static void -+ _ft_lcd_windows_sharpen( FT_Bitmap* bitmap, -+ FT_Render_Mode mode, -+ FT_UInt strength, -+ FT_Library library ) -+ { -+ -+ FT_UInt width = (FT_UInt)bitmap->width; -+ FT_UInt height = (FT_UInt)bitmap->rows; -+ FT_Byte* new_line; -+ FT_Byte* line = bitmap->buffer; -+ FT_Bitmap new_bitmap; -+ -+ -+ FT_Bitmap_New( &new_bitmap ); -+ FT_Bitmap_Copy( library, bitmap, &new_bitmap ); -+ new_line = (&new_bitmap)->buffer; -+ -+ if (strength > 0) -+ for (height = (FT_UInt)bitmap->rows; -+ height > 0; -+ height--, line += bitmap->pitch, new_line += bitmap->pitch ) -+ { -+ FT_UInt xx, threshold = 128; -+ FT_Byte* prevline = line - bitmap->pitch; -+ FT_Byte* nextline = line + bitmap->pitch; -+ FT_Byte* new_prevline = new_line - bitmap->pitch; -+ FT_Byte* new_nextline = new_line + bitmap->pitch; -+ -+ for ( xx = 1; xx < width - 1; xx += 1 ) -+ { -+ /* subpixel grid sp11 sp21 sp31 */ -+ /* where sp22 is sp12 sp22 sp32 */ -+ /* current subpixel. sp13 sp23 sp33 */ -+ -+ FT_Int prevtotal, nexttotal, lefttotal, righttotal, sidesdiff, -+ prevdiff, nextdiff, sp11, sp21, sp31, sp12, sp22, sp32, -+ sp13, sp23, sp33; -+ -+ sp12 = line [xx-1]; -+ sp22 = line [xx]; -+ sp32 = line [xx+1]; -+ -+ if ( height == bitmap->rows ) -+ { -+ prevtotal = sp11 = sp21 = sp31 = 0; -+ prevdiff = sp22; -+ lefttotal = sp12 + sp13; -+ righttotal = sp32 + sp33; -+ } -+ else -+ { -+ prevtotal = prevline[xx-1] + prevline[xx] + prevline[xx+1]; -+ sp11 = prevline [xx-1]; -+ sp21 = prevline [xx]; -+ sp31 = prevline [xx+1]; -+ prevdiff = sp22 - sp21; -+ lefttotal = sp11 + sp12 + sp13; -+ righttotal = sp31 + sp32 + sp33; -+ } -+ -+ if ( height == 1 ) -+ { -+ nexttotal = sp13 = sp23 = sp33 = 0; -+ nextdiff = sp22; -+ lefttotal = sp11 + sp12; -+ righttotal = sp31 + sp32; -+ } -+ else -+ { -+ nexttotal = nextline[xx-1] + nextline[xx] + nextline[xx+1]; -+ sp13 = nextline [xx-1]; -+ sp23 = nextline [xx]; -+ sp33 = nextline [xx+1]; -+ nextdiff = sp23 - sp22; -+ lefttotal = sp11 + sp12 + sp13; -+ righttotal = sp31 + sp32 + sp33; -+ } -+ -+ sidesdiff = lefttotal - righttotal; -+ -+ if ( sidesdiff < 0 ) -+ sidesdiff *= -1; -+ -+ if ( prevdiff < 0 ) -+ prevdiff *= -1; -+ -+ if ( nextdiff < 0 ) -+ nextdiff *= -1; -+ -+ /* if the current pixel is less than threshold, and greater than 0 */ -+ if ( sp22 <= threshold && sp22 > 0 ) -+ { -+ /* A pixel is horizontally isolated if: */ -+ /* 1: All upper adjecent pixels are >= threshold */ -+ if ( prevtotal >= nexttotal && -+ abs( sp11 - sp12 ) > 5 && -+ abs( sp21 - sp22 ) > 5 && -+ abs( sp31 - sp32 ) > 5 && /* not a vert stem end */ -+ sp11 >= threshold && -+ sp21 >= threshold && -+ sp31 >= threshold && -+ abs( sp23 - sp22 ) > 15 ) /* not on a vert stem */ -+ { -+ /* darken upper adjacent subpixel; lighten current */ -+ if ( height != (FT_UInt)bitmap->rows ) -+ new_prevline[xx] += ( ( 255 - new_prevline[xx] ) -+ * strength ) / 100 ; -+ -+ new_line[xx] -= ( new_line[xx] * strength ) / 100; -+ -+ if ( height != 1 && height != (FT_UInt)bitmap->rows ) -+ if ( new_nextline[xx] > 155 + ( 100 - strength ) ) -+ new_prevline[xx] = 255; -+ -+ } -+ else if ( nexttotal > prevtotal && -+ abs( sp13 - sp12 ) > 5 && -+ abs( sp23 - sp22 ) > 5 && -+ abs( sp33 - sp32 ) > 5 && -+ /* 2: All lower adjecent pixels are >= threshold */ -+ sp13 >= threshold && -+ sp23 >= threshold && -+ sp33 >= threshold && -+ abs( sp22 - sp21 ) > 15 ) -+ { -+ /* darken lower adjacent subpixel; lighten current */ -+ if ( height != 1 ) -+ new_nextline[xx] += ( 255 - new_nextline[xx] ) * strength / 100; -+ -+ new_line[xx] -= ( new_line[xx] * strength ) / 100; -+ -+ if ( height != 1 ) -+ if ( new_nextline[xx] > 155 + ( 100 - strength ) ) -+ new_nextline[xx] = 255; -+ -+ } -+ } -+ else if ( sp22 > threshold && sp22 < 255 ) -+ { -+ if ( sp11 <= threshold && -+ abs( sp13 - sp12 ) > 5 && -+ abs( sp23 - sp22 ) > 5 && -+ abs( sp33 - sp32 ) > 5 && -+ sp21 <= threshold && -+ sp31 <= threshold && -+ prevtotal <= nexttotal && -+ abs( sp22 - sp21 ) > 15 ) -+ { -+ /* bring this subpixel 1/3 of the way to 255 at 100% strength */ -+ new_line[xx] += ( strength * ( 255 - new_line[xx] ) ) / 100; -+ -+ if ( height != (FT_UInt)bitmap->rows ) -+ new_prevline[xx] -= ( new_prevline[xx] * strength ) / 300; -+ } -+ else if ( sp13 <= threshold && -+ abs( sp11 - sp12 ) > 5 && -+ abs( sp21 - sp22 ) > 5 && -+ abs( sp31 - sp32 ) > 5 && -+ sp23 <= threshold && -+ sp33 <= threshold && -+ nexttotal < prevtotal && -+ abs( sp23 - sp22 ) > 15 ) -+ { -+ new_line[xx] += ( strength * ( 255 - new_line[xx] ) ) / 100; -+ -+ if ( height != 1 ) -+ new_nextline[xx] -= ( new_nextline[xx] * strength ) / 300; -+ } -+ } -+ } -+ } -+ FT_Bitmap_Copy( library, &new_bitmap, bitmap); -+ FT_Bitmap_Done( library, &new_bitmap ); -+ } -+ -+ -+ static void -+ _ft_lcd_darken_x ( FT_Bitmap* bitmap, -+ FT_Render_Mode mode, -+ FT_UInt strength, -+ FT_Library library ) -+ { -+ -+ FT_UInt width = (FT_UInt)bitmap->width; -+ FT_UInt height = (FT_UInt)bitmap->rows; -+ FT_Byte* new_line; -+ FT_Byte* line = bitmap->buffer; -+ FT_Bitmap new_bitmap; -+ int factor1, factor2; -+ int bias = 0; -+ -+ FT_Bitmap_New( &new_bitmap ); -+ -+ FT_Bitmap_Copy( library, bitmap, &new_bitmap ); -+ new_line = (&new_bitmap)->buffer; -+ -+ if ( strength > 0 ) -+ for ( height = (FT_UInt)bitmap->rows; -+ height > 0; -+ height--, line += bitmap->pitch, new_line += bitmap->pitch ) -+ { -+ FT_UInt xx; -+ FT_Byte* prevline = line - bitmap->pitch; -+ FT_Byte* nextline = line + bitmap->pitch; -+ -+ for ( xx = 1; xx < width - 1; xx += 1 ) -+ { -+ /* subpixel grid sp11 sp21 sp31 */ -+ /* where sp22 is sp12 sp22 sp32 */ -+ /* current subpixel. sp13 sp23 sp33 */ -+ -+ FT_Int sp21, sp12, sp22, sp32, sp23; -+ -+ sp12 = line [xx-1]; -+ sp22 = line [xx]; -+ sp32 = line [xx+1]; -+ -+ if ( height == bitmap->rows ) -+ sp21 = 0; -+ else -+ sp21 = prevline [xx]; -+ -+ if ( height == 1 ) -+ sp23 = 0; -+ else -+ sp23 = nextline [xx]; -+ -+ /* darken subpixel if neighbor above and below are much less than */ -+ /* safer but less effective */ -+ factor1 = 5; -+ factor2 = 5; -+ -+ /* make matches in the middle of glyph slightly darker */ -+ /*if (height > 1 && height < (FT_UInt)bitmap->rows) bias = 1;*/ -+ -+ if ( sp22 > factor1 * sp21 && -+ sp22 > factor1 * sp23 && -+ sp22 > factor2 && -+ sp12 > 16 && -+ sp32 > 16 ) -+ if ( new_line[xx] < ( strength * 255 ) / 100 ) -+ new_line[xx] = (strength * 255 ) / 100 -+ + bias * ( 255 - ( strength * 255 ) / 100 ) / 3; -+ -+ } -+ } -+ FT_Bitmap_Copy( library, &new_bitmap, bitmap ); -+ FT_Bitmap_Done( library, &new_bitmap ); -+ } -+ -+ -+ static void -+ _ft_lcd_darken_y ( FT_Bitmap* bitmap, -+ FT_Render_Mode mode, -+ FT_UInt strength, -+ FT_Library library ) -+ { -+ -+ FT_UInt width = (FT_UInt)bitmap->width; -+ FT_UInt height = (FT_UInt)bitmap->rows; -+ FT_Byte* new_line; -+ FT_Byte* line = bitmap->buffer; -+ FT_Bitmap new_bitmap; -+ -+ -+ FT_Bitmap_New( &new_bitmap ); -+ FT_Bitmap_Copy( library, bitmap, &new_bitmap ); -+ new_line = (&new_bitmap)->buffer; -+ -+ if ( strength > 0 ) -+ for ( height = (FT_UInt)bitmap->rows; -+ height > 0; -+ height--, line += bitmap->pitch, new_line += bitmap->pitch ) -+ { -+ FT_UInt xx; -+ -+ -+ for ( xx = 1; xx < width - 1; xx += 1 ) -+ { -+ if ( line[xx] > line[xx-1] && line[xx] > line[xx+1] ) -+ { -+ if (new_line[xx] > 0) -+ new_line[xx] += ( strength * ( 255 - new_line[xx] ) ) / 100; -+ new_line[xx-1] += ( strength * ( 255 - line[xx-1] ) ) / 100; -+ new_line[xx+1] += ( strength * ( 255 - line[xx+1] ) ) / 100; -+ } -+ } -+ } -+ FT_Bitmap_Copy( library, &new_bitmap, bitmap ); -+ FT_Bitmap_Done( library, &new_bitmap ); -+ } -+ -+ -+ static void -+ _ft_bitmap_cap ( FT_Bitmap* bitmap, -+ FT_UInt strength, -+ FT_Library library ) -+ { -+ -+ FT_UInt width = (FT_UInt)bitmap->width; -+ FT_UInt height = (FT_UInt)bitmap->rows; -+ FT_Byte* new_line; -+ FT_Byte* line = bitmap->buffer; -+ FT_UInt cur_value = 0; -+ FT_Bitmap new_bitmap; -+ -+ -+ FT_Bitmap_New( &new_bitmap ); -+ FT_Bitmap_Copy( library, bitmap, &new_bitmap ); -+ new_line = (&new_bitmap)->buffer; -+ -+ if ( strength > 0 ) -+ for ( height = (FT_UInt)bitmap->rows; -+ height > 0; -+ height--, line += bitmap->pitch, new_line += bitmap->pitch ) -+ { -+ FT_UInt xx; -+ -+ -+ for ( xx = 1; xx < width - 1; xx += 1 ) -+ { -+ cur_value = ( new_line[xx-1] + new_line[xx] + new_line[xx+1] ) / 3; -+ if ( cur_value > ( strength * 255 ) / 100 ) -+ { -+ FT_UInt new_factor = ( strength * 255 ) / 100; -+ new_line[xx] = ( new_line[xx] * new_factor ) / cur_value; -+ new_line[xx+1] = ( new_line[xx+1] * new_factor ) / cur_value; -+ new_line[xx-1] = ( new_line[xx-1] * new_factor ) / cur_value; -+ } -+ } -+ } -+ FT_Bitmap_Copy( library, &new_bitmap, bitmap ); -+ FT_Bitmap_Done( library, &new_bitmap ); -+ } -+ -+ -+ int -+ pseudo_gamma ( int val, float value ) -+ { -+ return 256 * ( 1.0 - pow( ( 1.0 - (float)val / 256.0 ), 1.0 / value ) ); -+ } -+ -+ -+ -+ static void -+ _ft_bitmap_embolden ( FT_Bitmap* bitmap, -+ FT_UInt strength, -+ FT_Library library ) -+ { -+ -+ FT_UInt width = (FT_UInt)bitmap->width; -+ FT_UInt height = (FT_UInt)bitmap->rows; -+ FT_Byte* new_line; -+ FT_Byte* line = bitmap->buffer; -+ FT_Bitmap new_bitmap; -+ FT_UInt xx; -+ -+ -+ FT_Bitmap_New(&new_bitmap); -+ FT_Bitmap_Copy(library, bitmap, &new_bitmap); -+ new_line = (&new_bitmap)->buffer; -+ -+ if ( strength > 0 ) -+ for ( height = (FT_UInt)bitmap->rows; -+ height > 0; -+ height--, line += bitmap->pitch, new_line += bitmap->pitch ) -+ { -+ for ( xx = 1; xx < width - 1; xx += 1 ) -+ { -+ FT_Int new_value = 0; -+ -+ -+ new_value = ( strength * line [xx-1] ) / 100 -+ + pseudo_gamma( line [xx], .75 ) -+ + (strength * line [xx+1] ) / 100; -+ if ( new_value > 255 ) -+ new_value = 255; -+ -+ new_line[xx] = new_value; -+ } -+ } -+ FT_Bitmap_Copy( library, &new_bitmap, bitmap ); -+ FT_Bitmap_Done( library, &new_bitmap ); -+ } -+ -+ -+ -+ static void -+ _ft_bitmap_gamma ( FT_Bitmap* bitmap, -+ float strength ) -+ { -+ -+ FT_UInt width = (FT_UInt)bitmap->width; -+ FT_UInt height = (FT_UInt)bitmap->rows; -+ FT_Byte* line = bitmap->buffer; -+ FT_UInt xx; -+ -+ -+ if ( strength > 0 ) -+ for ( height = (FT_UInt)bitmap->rows; -+ height > 0; -+ height--, line += bitmap->pitch ) -+ { -+ -+ for ( xx = 1; xx < width - 1; xx += 1 ) -+ { -+ if ( abs( line[xx-1] - line[xx] ) < 20 || -+ abs( line[xx+1] - line[xx] ) < 20 ) -+ line [xx] = pseudo_gamma( line [xx], strength ) ; -+ } -+ } -+ } -+ -+ -+ /* Fringe filter */ -+ static void -+ _ft_lcd_fringe_filter ( FT_Bitmap* bitmap, -+ FT_Render_Mode mode, -+ FT_UInt strength, -+ FT_Library library ) -+ { -+ -+ FT_UInt width = (FT_UInt)bitmap->width; -+ FT_UInt height = (FT_UInt)bitmap->rows; -+ FT_Byte* new_line; -+ FT_Byte* line = bitmap->buffer; -+ FT_Bitmap new_bitmap; -+ -+ -+ FT_Bitmap_New(&new_bitmap); -+ -+ line = bitmap->buffer; -+ FT_Bitmap_Copy( library, bitmap, &new_bitmap ); -+ new_line = (&new_bitmap)->buffer; -+ -+ for ( height = (FT_UInt)bitmap->rows; -+ height > 0; -+ height--, line += bitmap->pitch, new_line += bitmap->pitch ) -+ { -+ /* Threshold set to 1/2 pixel intensity */ -+ FT_UInt xx, threshold = 128; -+ -+ /* Hack to make this work when bitmap is at first or last line */ -+ FT_Int fudge = bitmap->pitch * (height == (FT_UInt)bitmap->rows); -+ -+ FT_Byte* prevline = line - bitmap->pitch + fudge; -+ FT_Byte* nextline = line + bitmap->pitch; -+ -+ -+ for ( xx = 1; xx < width - 1; xx += 1 ) -+ { -+ /* subpixel grid sp11 sp21 sp31 */ -+ /* where sp22 is sp12 sp22 sp32 */ -+ /* current subpixel. sp13 sp23 sp33 */ -+ -+ FT_Int prevtotal, nexttotal, lefttotal, righttotal, sidesdiff, -+ leftdiff, rightdiff, prevdiff, nextdiff, sp11, sp21, sp31, -+ sp12, sp22, sp32, sp13, sp23, sp33; -+ -+ sp12 = line [xx-1]; -+ sp22 = line [xx]; -+ sp32 = line [xx+1]; -+ -+ /* if at max height fake out some values */ -+ if ( height == (FT_UInt)bitmap->rows ) -+ { -+ prevtotal = sp11 = sp21 = sp31 = 0; -+ prevdiff = sp22; -+ lefttotal = sp12 + sp13; -+ righttotal = sp32 + sp33; -+ } -+ else -+ { -+ prevtotal = prevline[xx-1] + prevline[xx] + prevline[xx+1]; -+ sp11 = prevline [xx-1]; -+ sp21 = prevline [xx]; -+ sp31 = prevline [xx+1]; -+ prevdiff = sp22 - sp21; -+ lefttotal = sp11 + sp12 + sp13; -+ righttotal = sp31 + sp32 + sp33; -+ } -+ -+ /* if at min height fake out some values */ -+ if ( height == 1 ) -+ { -+ nexttotal = sp13 = sp23 = sp33 = 0; -+ nextdiff = sp22; -+ lefttotal = sp11 + sp12; -+ righttotal = sp31 + sp32; -+ } -+ else -+ { -+ nexttotal = nextline[xx-1] + nextline[xx] + nextline[xx+1]; -+ sp13 = nextline [xx-1]; -+ sp23 = nextline [xx]; -+ sp33 = nextline [xx+1]; -+ nextdiff = sp23 - sp22; -+ lefttotal = sp11 + sp12 + sp13; -+ righttotal = sp31 + sp32 + sp33; -+ } -+ -+ sidesdiff = lefttotal - righttotal; -+ leftdiff = sp22 - sp12; -+ rightdiff = sp32 - sp22; -+ -+ if ( sidesdiff < 0 ) -+ sidesdiff *= -1; -+ -+ if ( prevdiff < 0 ) -+ prevdiff *= -1; -+ -+ if ( nextdiff < 0 ) -+ nextdiff *= -1; -+ -+ if ( leftdiff < 0 ) -+ leftdiff *= -1; -+ -+ if ( rightdiff < 0 ) -+ rightdiff *= -1; -+ -+ /* if the current subpixel is less than threshold, and varies only -+ slightly to left or right, lighten it */ -+ if ( sp22 <= threshold && sp22 > 0 && -+ ( leftdiff < 10 || rightdiff < 10 ) ) -+ { -+ /* A pixel is horizontally isolated if: */ -+ /* 1: All upper adjecent subpixels are >= threshold and all lower -+ adjacent ones are essentially white */ -+ if ( prevtotal >= nexttotal && -+ sp11 >= threshold && -+ sp21 >= threshold && -+ sp31 >= threshold && -+ sp13 < 2 && -+ sp23 < 2 && -+ sp33 < 2 ) -+ -+ { -+ new_line[xx] -= ( new_line[xx] * strength ) / 100; -+ -+ if ( leftdiff < 10 ) -+ /* OPPORTUNITY FOR IMPROVEMENT - keep going left until 255? */ -+ new_line[xx-1] -= ( new_line[xx-1] * strength ) / 200; -+ -+ if ( rightdiff < 10 ) -+ /* OPPORTUNITY FOR IMPROVEMENT */ -+ new_line[xx+1] -= ( new_line[xx+1] * strength ) / 200; -+ } -+ else if ( nexttotal > prevtotal && -+ /* 2: the inverse of above */ -+ sp13 >= threshold && -+ sp23 >= threshold && -+ sp33 >= threshold && -+ sp11 < 2 && -+ sp21 < 2 && -+ sp31 < 2 ) -+ { -+ new_line[xx] -= ( new_line[xx] * strength ) / 100; -+ -+ if ( leftdiff < 10 ) -+ /* OPPORTUNITY FOR IMPROVEMENT - keep going left until 255? */ -+ new_line[xx-1] -= ( new_line[xx-1] * strength ) / 200; -+ -+ if ( rightdiff < 10 ) -+ /* OPPORTUNITY FOR IMPROVEMENT */ -+ new_line[xx+1] -= ( new_line[xx+1] * strength ) / 200; -+ } -+ } -+ /* otherwise if the current subpixel is more than threshold, and varies -+ slightly to left or right, darken it */ -+ else if ( sp22 > threshold && -+ sp22 < 255 && -+ ( leftdiff < 10 || -+ rightdiff < 10 ) ) -+ { -+ if ( sp11 <= 2 && -+ sp21 <= 2 && -+ sp31 <= 2 && -+ sp13 >= threshold && -+ sp23 >= threshold && -+ sp33 >= threshold && -+ prevtotal < nexttotal ) -+ new_line[xx] += ( ( 255 - new_line[xx] ) * strength ) / 100; -+ -+ else if ( sp13 <= 2 && -+ sp23 <= 2 && -+ sp33 <= 2 && -+ nexttotal < prevtotal && -+ sp11 >= threshold && -+ sp21 >= threshold && -+ sp31 >= threshold ) -+ new_line[xx] += ( ( 255 - new_line[xx] ) * strength ) / 100; -+ -+ } -+ } -+ } -+ FT_Bitmap_Copy( library, &new_bitmap, bitmap ); -+ FT_Bitmap_Done( library, &new_bitmap ); -+ } -+ -+ -+ /* Grayscale filter */ -+ static void -+ _ft_lcd_grayscale_filter ( FT_Bitmap* bitmap, -+ FT_Render_Mode mode, -+ FT_UInt strength, -+ FT_Library library ) -+ { -+ -+ FT_UInt width = (FT_UInt)bitmap->width; -+ FT_UInt height = (FT_UInt)bitmap->rows; -+ FT_Byte* line = bitmap->buffer; -+ -+ -+ for ( height = (FT_UInt)bitmap->rows; -+ height > 0; -+ height--, line += bitmap->pitch ) -+ { -+ FT_UInt xx; -+ -+ -+ for ( xx = 0; xx < width - 1; xx += 3 ) -+ { -+ FT_UInt total = line [xx] + line [xx + 1] + line [xx + 2]; -+ line[xx] = ( ( 100 - strength ) * line[xx] -+ + strength * ( total / 3 ) ) / 100; -+ line[xx+1] = ( ( 100 - strength ) * line[xx+1] -+ + strength * ( total / 3 ) ) / 100; -+ line[xx+2] = ( ( 100 - strength ) * line[xx+2] -+ + strength * ( total / 3 ) ) / 100; -+ } -+ } -+ } -+ -+ -+ -+ /*************************************************************************/ -+ /* */ -+ /* */ -+ /* */ -+ /* */ -+ /* */ -+ /* */ -+ -+ -+ typedef struct SA_Rule_ -+ { -+ const char family[32]; -+ const int ppem[5]; -+ -+ } SA_Rule; -+ -+#define STEM_WIDTH_2_PPEM 18 -+#define MAX_PPEM 100 -+ -+ -+ -+/* "Font name", {ppem where stem width becomes 1, -+ * ppem where stem width becomes 2... etc.} */ -+/* 100 means auto-calculate */ -+#define SNAPPING_STEM_WIDTHS_RULES_SIZE 21 -+ SA_Rule SNAPPING_STEM_WIDTHS_Rules -+ [SNAPPING_STEM_WIDTHS_RULES_SIZE] = -+ { -+ { "Andale Mono", {10, 21, MAX_PPEM, MAX_PPEM, MAX_PPEM} }, -+ { "Arial Narrow", {10, 21, MAX_PPEM, MAX_PPEM, MAX_PPEM} }, -+ { "Calibri", {10, 19, MAX_PPEM, MAX_PPEM, MAX_PPEM} }, -+ { "Cantarell", {10, 22, MAX_PPEM, MAX_PPEM, MAX_PPEM} }, -+ { "Century Gothic", {10, 22, MAX_PPEM, MAX_PPEM, MAX_PPEM} }, -+ { "Comfortaa", {10, 19, 22, MAX_PPEM, MAX_PPEM} }, -+ { "Consolas", {10, 20, MAX_PPEM, MAX_PPEM, MAX_PPEM} }, -+ { "Corbel", {10, 21, MAX_PPEM, MAX_PPEM, MAX_PPEM} }, -+ { "Futura", {10, 14, STEM_WIDTH_2_PPEM, MAX_PPEM, MAX_PPEM} }, -+ { "Gill Sans", {10, 17, STEM_WIDTH_2_PPEM, MAX_PPEM, MAX_PPEM} }, -+ { "Helvetica CY", {10, 23, MAX_PPEM, MAX_PPEM, MAX_PPEM} }, -+ { "Inconsolata", {10, 23, MAX_PPEM, MAX_PPEM, MAX_PPEM} }, -+ { "Liberation Sans Narrow", {10, 22, MAX_PPEM, MAX_PPEM, MAX_PPEM} }, -+ { "Liberation Sans", {10, 19, MAX_PPEM, MAX_PPEM, MAX_PPEM} }, -+ { "Lucida Grande", {10, 16, STEM_WIDTH_2_PPEM, MAX_PPEM, MAX_PPEM} }, -+ { "Lucida Sans Unicode", {10, 16, STEM_WIDTH_2_PPEM, MAX_PPEM, MAX_PPEM} }, -+ { "Luxi Sans", {10, 17, STEM_WIDTH_2_PPEM, MAX_PPEM, MAX_PPEM} }, -+ { "Open Sans", {10, 20, MAX_PPEM, MAX_PPEM, MAX_PPEM} }, -+ { "Rokkitt", {10, 21, MAX_PPEM, MAX_PPEM, MAX_PPEM} }, -+ { "Segoe UI", {10, 23, MAX_PPEM, MAX_PPEM, MAX_PPEM} }, -+ { "Trebuchet MS", {10, 17, STEM_WIDTH_2_PPEM, MAX_PPEM, MAX_PPEM} }, -+ }; -+ -+ -+/* "Font name", {ppem, scale_up=1|scale_down=0} */ -+#define SNAPPING_STEM_SCALING_RULES_SIZE 31 -+ SA_Rule SNAPPING_STEM_SCALING_Rules -+ [SNAPPING_STEM_SCALING_RULES_SIZE] = -+ { -+ { "Andale Mono", {11, 1,} }, -+ { "Bitstream Vera Sans", {12, 1,} }, -+ { "Calibri", {15, 1,} }, -+ { "Calibri", {17, 1,} }, -+ { "Calibri", {18, 1,} }, -+ { "Candara", {14, 1,} }, -+ { "Candara", {17, 1,} }, -+ { "Canwell", {13, 0,} }, -+ { "Comfortaa", {11, 0,} }, -+ { "Consolas", {11, 1,} }, -+ { "DejaVu Sans", {12, 1,} }, -+ { "Freesans", {16, 0,} }, -+ { "Freeserif", {13, 1,} }, -+ { "Freeserif", {17, 1,} }, -+ { "Inconsolata", {12, 1,} }, -+ { "Inconsolata", {15, 1,} }, -+ { "Lucida Grande", {13, 1,} }, -+ { "Myriad Pro", {14, 1,} }, -+ { "Myriad Pro", {17, 1,} }, -+ { "Nina", {11, 0,} }, -+ { "Nina", {12, 0,} }, -+ { "Nina", {13, 0,} }, -+ { "Optima", {17, 1,} }, -+ { "Raleway", {15, 0,} }, -+ { "Samba", {11, 0,} }, -+ { "Times New Roman", {17, 1,} }, -+ { "Trebuchet MS", {17, 0,} }, -+ { "Trebuchet MS", {13, 0,} }, -+ { "Trebuchet MS", {20, 1,} }, -+ { "Verdana", {12, 1,} }, -+ { "Verdana", {15, 1,} }, -+ }; -+ -+ -+/* "Font name", {ppem, scale_up=1|scale_down=0} */ -+#define SNAPPING_M_RULES_SIZE 9 -+ SA_Rule SNAPPING_M_Rules -+ [SNAPPING_M_RULES_SIZE] = -+ { -+ { "Courier New", {13, 1,} }, -+ { "Courier New", {14, 1,} }, -+ { "Courier", {13, 1,} }, -+ { "Courier", {14, 1,} }, -+ { "Droid Sans Mono", {12, 0,} }, -+ { "Bitstream Vera Sans", {12, 0,} }, -+ { "DejaVu Sans", {12, 0,} }, -+ { "Essential PragmataPro", {13, 0,} }, -+ { "Essential PragmataPro", {14, 0,} }, -+ }; -+ -+ -+/* "Font name", {ppem, ppem} */ -+#define SNAPPING_SYNTHESIZE_STEMS_RULES_SIZE 1 -+ SA_Rule SNAPPING_SYNTHESIZE_STEMS_Rules -+ [SNAPPING_SYNTHESIZE_STEMS_RULES_SIZE] = -+ { -+ { "---", {13, 13,} }, -+ }; -+ -+ -+/* "Font name", {ppem, ppem} */ -+#define SNAPPING_NO_BEARING_CORRECTION_RULES_SIZE 1 -+ SA_Rule SNAPPING_NO_BEARING_CORRECTION_Rules -+ [SNAPPING_NO_BEARING_CORRECTION_RULES_SIZE] = -+ { -+ { "Times New Roman", {0, 100,} }, -+ }; -+ -+ -+/* "Font name", {ppem, ppem} */ -+#define SNAPPING_EDGE_DETECTION_RULES_SIZE 8 -+ SA_Rule SNAPPING_EDGE_DETECTION_Rules -+ [SNAPPING_EDGE_DETECTION_RULES_SIZE] = -+ { -+ { "Tahoma", {11, 11,} }, -+ { "Courier New", {10, 12,} }, -+ { "Arial", {11, 11,} }, -+ { "Arial", {13, 13,} }, -+ { "Liberation Sans", {11, 11,} }, -+ { "FreeSans", {11, 11,} }, -+ { "FreeSans", {13, 13,} }, -+ { "Palatino Linotype", {0, 100,} }, -+ }; -+ -+/* "Font name", {ppem, translate_value} */ -+#define SNAPPING_STEM_TRANSLATING_RULES_SIZE 6 -+ SA_Rule SNAPPING_STEM_TRANSLATING_Rules -+ [SNAPPING_STEM_TRANSLATING_RULES_SIZE] = -+ { -+ { "Arial", {11, 32,} }, -+ { "Arial Unicode MS", {11, 32,} }, -+ { "FreeSans", {11, 32,} }, -+ { "Arimo", {11, 32,} }, -+ { "Liberation Sans", {11, 32,} }, -+ { "Tahoma", {11, 32,} }, -+ }; -+ -+/* "Font name", {ppem, translate_value} */ -+#define SNAPPING_STEM_TRANSLATING_ONLY_RULES_SIZE 74 -+ SA_Rule SNAPPING_STEM_TRANSLATING_ONLY_Rules -+ [SNAPPING_STEM_TRANSLATING_ONLY_RULES_SIZE] = -+ { -+ { "Arial Unicode MS", {10, 16,} }, -+ { "Arial Unicode MS", {8, 32,} }, -+ { "Arial Unicode MS", {9, 32,} }, -+ { "Arial", {10, 16,} }, -+ { "Arial", {8, 32,} }, -+ { "Arial", {9, 32,} }, -+ { "Arial", {16, -24,} }, -+ { "Arimo", {10, 8,} }, -+ { "Arimo", {8, 32,} }, -+ { "Arimo", {9, 32,} }, -+ { "Bitstream Vera Sans", {8, 16,} }, -+ { "Calibri", {10, 16,} }, -+ { "Calibri", {15, 0,} }, -+ { "Candara", {10, 16,} }, -+ { "Cantarell", {11, 0} }, -+ { "Cantarell", {12, 0} }, -+ { "Consolas", {8, 32,} }, -+ { "Consolas", {9, 32,} }, -+ { "Corbel", {10, 16,} }, -+ { "Courier", {13, 16,} }, -+ { "Courier", {15, 0,} }, -+ { "Dejavu Sans Mono", {7, 16,} }, -+ { "Dejavu Sans Mono", {8, 32,} }, -+ { "Dejavu Sans Mono", {9, 16,} }, -+ { "Dejavu Sans", {8, 16,} }, -+ { "Dejavu Sans", {15, -20,} }, -+ { "Droid Sans", {8, 16,} }, -+ { "Droid Sans", {9, 16,} }, -+ { "Freesans", {10, 16,} }, -+ { "Freesans", {9, 8,} }, -+ { "Georgia", {13, 16,} }, -+ { "Georgia", {14, 16,} }, -+ { "Georgia", {15, 0,} }, -+ { "Inconsolata", {10, 24,} }, -+ { "Inconsolata", {9, 32,} }, -+ { "Liberation Sans", {10, 8,} }, -+ { "Liberation Sans", {8, 32,} }, -+ { "Liberation Sans", {9, 32,} }, -+ { "Lucida Grande", {13, 24,} }, -+ { "Lucida Grande", {14, 24,} }, -+ { "Lucida Grande", {8, 16,} }, -+ { "Lucida Grande", {9, 16,} }, -+ { "Lucida Sans Unicode", {13, 24,} }, -+ { "Lucida Sans Unicode", {14, 24,} }, -+ { "Lucida Sans Unicode", {8, 16,} }, -+ { "Lucida Sans Unicode", {9, 16,} }, -+ { "Microsoft Sans Serif", {10, 16,} }, -+ { "Microsoft Sans Serif", {8, 32,} }, -+ { "Microsoft Sans Serif", {9, 32,} }, -+ { "Myriad Pro", {10, 16,} }, -+ { "Myriad Pro", {11, 0,} }, -+ { "Myriad Pro", {9, 16,} }, -+ { "Open Sans", {10, 16,} }, -+ { "Open Sans", {9, 16,} }, -+ { "Optima", {10, 0} }, -+ { "Optima", {11, 0} }, -+ { "Optima", {12, 0} }, -+ { "Segoe UI", {10, 0,} }, -+ { "Segoe UI", {7, 32,} }, -+ { "Segoe UI", {8, 16,} }, -+ { "Segoe UI", {9, 24,} }, -+ { "Tahoma", {7, 32,} }, -+ { "Tahoma", {8, 32,} }, -+ { "Tahoma", {9, 32,} }, -+ { "Times New Roman", {17, 8,} }, -+ { "Trebuchet MS", {10, 16,} }, -+ { "Trebuchet MS", {11, 0,} }, -+ { "Trebuchet MS", {8, 32,} }, -+ { "Trebuchet MS", {9, 32,} }, -+ { "Verdana", {8, 16,} }, -+ { "Verdana", {15, 16,} }, -+ { "Verdana", {14, 32,} }, -+ { "Verdana", {18, 32,} }, -+ { "Verdana", {19, 24,} }, -+ }; -+ -+ -+/* "Font name", {start ppem, end ppem} */ -+#define ALWAYS_USE_100_RULES_SIZE 46 -+ SA_Rule ALWAYS_USE_100_Rules -+ [ALWAYS_USE_100_RULES_SIZE] = -+ { -+ { "Andale Mono", {0, MAX_PPEM,} }, -+ { "Arial Unicode MS", {0, MAX_PPEM,} }, -+ { "Arial", {0, MAX_PPEM,} }, -+ { "Arimo", {0, MAX_PPEM,} }, -+ { "Bitstream Vera Sans Mono", {0, MAX_PPEM,} }, -+ { "Bitstream Vera Sans", {10, 14,} }, -+ { "Bitstream Vera Sans", {16, 17,} }, -+ { "Calibri", {23, MAX_PPEM,} }, -+ { "Consolas", {0, MAX_PPEM,} }, -+ { "Courier New", {12, 12,} }, -+ { "Courier", {0, MAX_PPEM,} }, -+ { "Cousine", {0, MAX_PPEM,} }, -+ { "DejaVu Sans Mono", {0, MAX_PPEM,} }, -+ { "DejaVu Sans", {10, 14,} }, -+ { "DejaVu Sans", {16, 17,} }, -+ { "Droid Sans", {12, 12,} }, -+ { "Droid Sans", {15, 15,} }, -+ { "FreeMono", {0, MAX_PPEM,} }, -+ { "FreeSans", {0, MAX_PPEM,} }, -+ { "Liberation Mono", {0, MAX_PPEM,} }, -+ { "Lucida Console", {0, MAX_PPEM,} }, -+ { "Luxi Sans", {13, 13,} }, -+ { "Microsoft Sans Serif", {0, MAX_PPEM,} }, -+ { "Monaco", {0, MAX_PPEM,} }, -+ { "Segoe UI", {11, 12,} }, -+ { "Segoe UI", {14, 14,} }, -+ { "Tahoma", {11, 11,} }, -+ { "Tahoma", {14, MAX_PPEM,} }, -+ { "Times New Roman", {14, 14,} }, -+ { "Times New Roman", {16, 16,} }, -+ { "Trebuchet MS", {13, 13,} }, -+ { "Ubuntu", {12, 13,} }, -+ { "Ubuntu", {15, 15,} }, -+ { "Verdana", {0, 14,} }, -+ { "Verdana", {16, MAX_PPEM,} }, -+ { "Pragmata", {0, MAX_PPEM,} }, -+ { "Essential PragmataPro", {0, MAX_PPEM,} }, -+ }; -+ -+ -+ -+ -+#define AUTOHINT_BRIGHTNESS_RULES_SIZE 3 -+ SA_Rule BRIGHTNESS_Rules -+ [AUTOHINT_BRIGHTNESS_RULES_SIZE] = -+ { -+ { "Baskerville", {0, -20,} }, -+ { "Garamond", {0, -20,} }, -+ { "Optima", {0, -20,} }, -+ }; -+ -+#define AUTOHINT_CONTRAST_RULES_SIZE 3 -+ SA_Rule CONTRAST_Rules -+ [AUTOHINT_CONTRAST_RULES_SIZE] = -+ { -+ { "Baskerville", {0, 25,} }, -+ { "Garamond", {0, 25,} }, -+ { "Optima", {0, 25,} }, -+ }; -+ -+#if 0 -+#define STEM_SPACING_RULES_SIZE 3 -+ SA_Rule STEM_SPACING_Rules -+ [STEM_SPACING_RULES_SIZE] = -+ { -+ { "Tahoma", {10, 12, 18, 18, 30} }, -+ { "Arial", {10, 11, 23, 25, 30} }, -+ { "Freesans", {10, 12, 18, 18, 30} }, -+ }; -+ -+#define STEM_START_RULES_SIZE 3 -+ SA_Rule STEM_START_Rules -+ [STEM_START_RULES_SIZE] = -+ { -+ { "Tahoma", {14, 17, 30, 100, 100} }, -+ { "Arial", {11, 18, 23, 30, 30} }, -+ { "Freesans", {10, 18, 18, 25, 30} }, -+ }; -+#endif -+ -+ typedef struct Stem_Data_ -+ { -+ FT_Int stem_width; -+ FT_Int stem_spacing; -+ FT_Int stem_start; -+ FT_Int stem_scaling; -+ FT_Int stem_translating_only; -+ FT_Int stem_translating; -+ FT_Int brightness; -+ FT_Int contrast; -+ FT_Bool use_100; -+ FT_Bool synth_stems; -+ FT_Bool edge_detection; -+ FT_Bool bearing_correction; -+ FT_Int m; -+ } Stem_Data; -+ -+ -+ typedef struct Stem_Segment_ -+ { -+ FT_Long x1; -+ FT_Long x2; -+ FT_Int y; -+ } Stem_Segment; -+ -+ typedef struct Stem_Center_ -+ { -+ FT_Long x; -+ FT_Long y; -+ FT_Long w; -+ FT_Long x1; -+ FT_Long x2; -+ } Stem_Center; -+ -+ typedef struct Stem_ -+ { -+ FT_Long center; -+ FT_Long count; -+ FT_Long rcount; /* used to count within a range in possible stems */ -+ FT_Long width; -+ FT_Long height; -+ FT_Short zone; /* 1 2 or 3 */ -+ FT_Bool generated; -+ } Stem; -+ -+ -+ static void -+ swap_stem ( Stem* s1, Stem* s2 ) -+ { -+ Stem s; -+ s.center = s1->center; -+ s.count = s1->count; -+ s.rcount = s1->rcount; -+ s.width = s1->width; -+ s.zone = s1->zone; -+ s.generated = s1->generated; -+ -+ s1->center = s2->center; -+ s1->count = s2->count; -+ s1->rcount = s2->rcount; -+ s1->width = s2->width; -+ s1->zone = s2->zone; -+ s1->generated = s2->generated; -+ -+ s2->center = s.center; -+ s2->count = s.count; -+ s2->rcount = s.rcount; -+ s2->width = s.width; -+ s2->zone = s.zone; -+ s2->generated = s.generated; -+ } -+ -+ -+ FT_LOCAL_DEF( void ) -+ sa_fill_known_stem_values ( -+ FT_String* family, -+ int ppem, -+ FT_String* style, -+ FT_UInt num_stems, -+ Stem_Data* known_stem_values ) -+ { -+ FT_Int i, j; -+ if (verbose) printf("%s ", family); -+ -+ i = 0; -+ while ( i < SNAPPING_STEM_WIDTHS_RULES_SIZE ) -+ { -+ if ( family && -+ ( strcasecmp( SNAPPING_STEM_WIDTHS_Rules[i].family, -+ family ) == 0 ) ) -+ { -+ j = 0; -+ known_stem_values->stem_width = 1; -+ -+ while (j < 4) -+ { -+ if ( SNAPPING_STEM_WIDTHS_Rules[i].ppem[j] == MAX_PPEM ) -+ { -+ known_stem_values->stem_width = -1; /* use default */ -+ j = 5; -+ i = SNAPPING_STEM_WIDTHS_RULES_SIZE; -+ } -+ else if ( ppem < SNAPPING_STEM_WIDTHS_Rules[i].ppem[j] ) -+ { -+ known_stem_values->stem_width = j; -+ j = 5; -+ i = SNAPPING_STEM_WIDTHS_RULES_SIZE; -+ } -+ j++; -+ } -+ } -+ i++; -+ } -+ -+ i = 0; -+ while ( i < SNAPPING_STEM_SCALING_RULES_SIZE ) -+ { -+ if ( family && -+ ( strcasecmp( SNAPPING_STEM_SCALING_Rules[i].family, -+ family ) == 0 ) ) -+ { -+ known_stem_values->stem_scaling = -1; /* default */ -+ -+ if ( ppem == SNAPPING_STEM_SCALING_Rules[i].ppem[0] ) -+ { -+ known_stem_values->stem_scaling -+ = SNAPPING_STEM_SCALING_Rules[i].ppem[1]; -+ i = SNAPPING_STEM_SCALING_RULES_SIZE; -+ } -+ } -+ i++; -+ } -+ -+ -+ i = 0; -+ while ( i < SNAPPING_M_RULES_SIZE ) -+ { -+ if ( family && -+ ( strcasecmp( SNAPPING_M_Rules[i].family, family ) == 0 ) ) -+ { -+ known_stem_values->m = -1; /* default */ -+ -+ if ( ppem == SNAPPING_M_Rules[i].ppem[0] ) -+ { -+ known_stem_values->m = SNAPPING_M_Rules[i].ppem[1]; -+ i = SNAPPING_M_RULES_SIZE; -+ } -+ } -+ i++; -+ } -+ -+ i = 0; -+ while ( i < SNAPPING_STEM_TRANSLATING_ONLY_RULES_SIZE ) -+ { -+ if ( family && -+ ( strcasecmp( SNAPPING_STEM_TRANSLATING_ONLY_Rules[i].family, -+ family ) == 0 ) ) -+ { -+ known_stem_values->stem_translating_only = -1024; /* default */ -+ -+ if ( ppem == SNAPPING_STEM_TRANSLATING_ONLY_Rules[i].ppem[0] || -+ SNAPPING_STEM_TRANSLATING_ONLY_Rules[i].ppem[0] == 0 ) -+ { -+ known_stem_values->stem_translating_only -+ = SNAPPING_STEM_TRANSLATING_ONLY_Rules[i].ppem[1]; -+ i = SNAPPING_STEM_TRANSLATING_ONLY_RULES_SIZE; -+ } -+ } -+ i++; -+ } -+ -+ i = 0; -+ while ( i < SNAPPING_STEM_TRANSLATING_RULES_SIZE ) -+ { -+ if ( family && -+ ( strcasecmp( SNAPPING_STEM_TRANSLATING_Rules[i].family, -+ family ) == 0 ) ) -+ { -+ known_stem_values->stem_translating = 0; /* default */ -+ -+ if ( ppem == SNAPPING_STEM_TRANSLATING_Rules[i].ppem[0] || -+ SNAPPING_STEM_TRANSLATING_Rules[i].ppem[0] == 0 ) -+ { -+ known_stem_values->stem_translating -+ = SNAPPING_STEM_TRANSLATING_Rules[i].ppem[1]; -+ i = SNAPPING_STEM_TRANSLATING_RULES_SIZE; -+ } -+ } -+ i++; -+ } -+ -+ -+ i = 0; -+ while ( i < ALWAYS_USE_100_RULES_SIZE ) -+ { -+ if ( family && -+ ( strcasecmp( ALWAYS_USE_100_Rules[i].family, family ) == 0 ) ) -+ { -+ known_stem_values->use_100 = FALSE; /* default */ -+ -+ if ( ppem >= ALWAYS_USE_100_Rules[i].ppem[0] && -+ ppem <= ALWAYS_USE_100_Rules[i].ppem[1] ) -+ { -+ known_stem_values->use_100 = TRUE; -+ i = ALWAYS_USE_100_RULES_SIZE; -+ } -+ } -+ i++; -+ } -+ -+ -+ i = 0; -+ while ( i < SNAPPING_SYNTHESIZE_STEMS_RULES_SIZE ) -+ { -+ if ( family && -+ ( strcasecmp( SNAPPING_SYNTHESIZE_STEMS_Rules[i].family, -+ family ) == 0 ) ) -+ { -+ known_stem_values->synth_stems = FALSE; /* default */ -+ -+ if ( ppem >= SNAPPING_SYNTHESIZE_STEMS_Rules[i].ppem[0] && -+ ppem <= SNAPPING_SYNTHESIZE_STEMS_Rules[i].ppem[1] ) -+ { -+ known_stem_values->synth_stems = TRUE; -+ i = SNAPPING_SYNTHESIZE_STEMS_RULES_SIZE; -+ } -+ } -+ i++; -+ } -+ -+ -+ i = 0; -+ while ( i < SNAPPING_EDGE_DETECTION_RULES_SIZE ) -+ { -+ if ( family && -+ ( strcasecmp( SNAPPING_EDGE_DETECTION_Rules[i].family, -+ family ) == 0 ) ) -+ { -+ known_stem_values->edge_detection = FALSE; /* default */ -+ -+ if ( ppem >= SNAPPING_EDGE_DETECTION_Rules[i].ppem[0] && -+ ppem <= SNAPPING_EDGE_DETECTION_Rules[i].ppem[1] ) -+ { -+ known_stem_values->edge_detection = TRUE; -+ i = SNAPPING_EDGE_DETECTION_RULES_SIZE; -+ } -+ } -+ i++; -+ } -+ -+ -+ i = 0; -+ while ( i < SNAPPING_NO_BEARING_CORRECTION_RULES_SIZE ) -+ { -+ if ( family && -+ ( strcasecmp( SNAPPING_NO_BEARING_CORRECTION_Rules[i].family, -+ family ) == 0 ) ) -+ { -+ known_stem_values->bearing_correction = TRUE; /* default */ -+ -+ if ( ppem >= SNAPPING_NO_BEARING_CORRECTION_Rules[i].ppem[0] && -+ ppem <= SNAPPING_NO_BEARING_CORRECTION_Rules[i].ppem[1] ) -+ { -+ known_stem_values->bearing_correction = FALSE; -+ i = SNAPPING_NO_BEARING_CORRECTION_RULES_SIZE; -+ } -+ } -+ i++; -+ } -+ -+ -+#if 0 -+ i = 0; -+ while ( i < AUTOHINT_BRIGHTNESS_RULES_SIZE ) -+ { -+ if ( family && -+ ( strcasecmp( BRIGHTNESS_Rules[i].family, family ) == 0 ) ) -+ { -+ known_stem_values->brightness = 0.0; -+ -+ if ( ppem == BRIGHTNESS_Rules[i].ppem[0] || -+ BRIGHTNESS_Rules[i].ppem[0] == 0 ) -+ { -+ known_stem_values->brightness = BRIGHTNESS_Rules[i].ppem[1]; -+ i = AUTOHINT_BRIGHTNESS_RULES_SIZE; -+ } -+ } -+ i++; -+ } -+ -+ i = 0; -+ while ( i < AUTOHINT_CONTRAST_RULES_SIZE ) -+ { -+ if ( family && -+ ( strcasecmp( CONTRAST_Rules[i].family, family ) == 0 ) ) -+ { -+ known_stem_values->contrast = 0.0; -+ -+ if ( ppem == CONTRAST_Rules[i].ppem[0] || -+ CONTRAST_Rules[i].ppem[0] == 0 ) -+ { -+ known_stem_values->contrast = CONTRAST_Rules[i].ppem[1]; -+ i = AUTOHINT_CONTRAST_RULES_SIZE; -+ } -+ } -+ i++; -+ } -+ -+ for ( i = 0; i <= STEM_SPACING_RULES_SIZE; i++ ) -+ { -+ if ( family && -+ ( strcasecmp( STEM_SPACING_Rules[i].family, family ) == 0 ) ) -+ { -+ j = 0; -+ known_stem_values->stem_spacing = 2; /* default */ -+ -+ while (j < 4) -+ { -+ if ( ppem < STEM_SPACING_Rules[i].ppem[j] ) -+ { -+ known_stem_values->stem_spacing = j; -+ j = 5; -+ } -+ j++; -+ } -+ } -+ } -+ -+ -+ for ( i = 0; i <= STEM_START_RULES_SIZE; i++ ) -+ { -+ if ( family && -+ ( strcasecmp( STEM_START_Rules[i].family, family ) == 0 ) ) -+ { -+ j = 0; -+ known_stem_values->stem_start = 1; /* default */ -+ -+ while (j < 4) -+ { -+ if ( ppem < STEM_START_Rules[i].ppem[j] ) -+ { -+ known_stem_values->stem_start = j; -+ j = 5; -+ } -+ j++; -+ } -+ } -+ } -+#endif -+ } -+ -+ -+ FT_LOCAL_DEF( FT_Int ) -+ get_contrast ( FT_String* family, -+ int ppem ) -+ { -+ FT_Int i; -+ -+ -+ if ( verbose ) -+ printf( "%s ", family ); -+ -+ i = 0; -+ while ( i < AUTOHINT_CONTRAST_RULES_SIZE ) -+ { -+ if ( family && -+ ( strcasecmp( CONTRAST_Rules[i].family, family ) == 0 ) ) -+ { -+ if ( ppem == CONTRAST_Rules[i].ppem[0] || -+ CONTRAST_Rules[i].ppem[0] == 0 ) -+ return CONTRAST_Rules[i].ppem[1]; -+ } -+ i++; -+ } -+ return 0; -+ } -+ -+ -+ FT_LOCAL_DEF( FT_Int ) -+ get_brightness ( FT_String* family, -+ int ppem ) -+ { -+ FT_Int i; -+ -+ -+ if ( verbose ) -+ printf("%s ", family); -+ -+ i = 0; -+ while ( i < AUTOHINT_BRIGHTNESS_RULES_SIZE ) -+ { -+ if ( family && -+ ( strcasecmp( BRIGHTNESS_Rules[i].family, family ) == 0 ) ) -+ { -+ if ( ppem == BRIGHTNESS_Rules[i].ppem[0] || -+ BRIGHTNESS_Rules[i].ppem[0] == 0 ) -+ return BRIGHTNESS_Rules[i].ppem[1]; -+ } -+ i++; -+ } -+ return 0; -+ } -+ -+ -+ /* Stem alignment for bitmaps; A hack with very nice results */ -+ /* Ideally this could be implemented on the outline, prior to -+ * rasterization. Possible future enhancement is to use the -+ * warper code to achieve this */ -+ static void -+ _lcd_stem_align ( FT_Bitmap* bitmap, -+ FT_Render_Mode mode, -+ FT_GlyphSlot slot, -+ FT_Long* translate_value, -+ float* scale_value, -+ FT_UInt alignment_strength, -+ FT_UInt fitting_strength, -+ float* embolden_value -+ ) -+ { -+ FT_UInt width = (FT_UInt)bitmap->width; -+ FT_UInt height = (FT_UInt)bitmap->rows; -+ -+ Stem_Segment* segments; -+ Stem_Segment* leftmost_segment; -+ Stem_Segment* rightmost_segment; -+ Stem_Segment* leftmost_segment_not_extrema; -+ Stem_Segment* rightmost_segment_not_extrema; -+ Stem* stems; -+ Stem* possible_stems; -+ Stem* leftmost_stem; -+ Stem* rightmost_stem; -+ Stem_Data* known_stem_values; -+ Stem_Center* centers; -+ FT_Long leftmost_point = width * 256; -+ FT_Long rightmost_point = 0; -+ FT_Long leftmost_point_not_extrema = width * 256; -+ FT_Long rightmost_point_not_extrema = 0; -+ FT_Long num_segments = 0; -+ FT_Long num_centers = 0; -+ FT_Long stem_centers[width * 256]; -+ FT_UInt h; -+ FT_ULong valid_stems = 0, valid_possible_stems = 0; -+ FT_Long center, stem_matches, stem_matches_ledge; -+ FT_Long stem_matches_redge, next_center, last_matching_center; -+ FT_Long last_matching_ledge, last_matching_redge, this_center; -+ FT_Int max_strength; -+ FT_Byte* line = bitmap->buffer; -+ FT_UInt current_value = 0; -+ FT_UInt xx; -+ FT_Long linearHoriAdvance = slot->linearHoriAdvance >> 10; -+ -+ FT_Int m_horiBearingX = slot->metrics.horiBearingX; -+ FT_Int m_horiAdvance = slot->metrics.horiAdvance; -+ FT_Int m_width = slot->metrics.width; -+ FT_Pos one_pixel = 768; -+ FT_Pos one_third_pixel = 256; -+ FT_Int columns_per_pixel = 3; -+ /*FT_Int extra_columns = 6;*/ -+ -+ /* on / off flags for testing different features */ -+ FT_Bool strategy_translate_using_closest_stem = TRUE; -+ FT_Bool strategy_scale_to_closest_centers = FALSE; -+ FT_Bool strategy_scale_to_closest_centers_up_only = FALSE; -+ FT_Bool strategy_always_use_distance_ceiling = FALSE; -+ FT_Bool strategy_auto_change_center_offset = TRUE; -+ FT_Bool strategy_use_m_control = FALSE; -+ FT_Bool strategy_correct_out_of_bounds_outlines = FALSE; -+ FT_Bool strategy_also_use_edge_detection_for_stems = FALSE; -+ FT_Bool strategy_use_strengths = TRUE; -+ FT_Bool strategy_synthesize_stems = FALSE; -+ FT_Bool strategy_bearing_correction = TRUE; -+ FT_Bool strategy_use_d_correction = TRUE; -+ FT_Bool strategy_fit_to_width = FALSE; -+ /*FT_Bool strategy_center_glyph = FALSE;*/ -+ -+ FT_Bool has_serifs = FALSE; -+ FT_Bool autohinted = FALSE; -+ -+ const FT_Int MIN_PPEM = 7; -+ /*const FT_Int MAX_PPEM = 100;*/ -+ const FT_Int MAX_STEMS = 3; -+ FT_Int ppem = 0; -+ -+ FT_Bool checked_use_known_settings_on_selected_fonts_env = FALSE; -+ FT_Bool use_known_settings_on_selected_fonts = FALSE; -+ -+ FT_Pos cur_width = infinality_cur_width; -+ -+ -+ if ( cur_width ) -+ { -+ autohinted = TRUE; -+ } -+ -+ /* reset to default */ -+ *scale_value = 1.0; -+ -+ if ( !checked_use_known_settings_on_selected_fonts_env ) -+ { -+ char *use_known_settings_on_selected_fonts_env = -+ getenv( "INFINALITY_FT_USE_KNOWN_SETTINGS_ON_SELECTED_FONTS" ); -+ if ( use_known_settings_on_selected_fonts_env != NULL ) -+ { -+ if ( strcasecmp( use_known_settings_on_selected_fonts_env, -+ "default" ) != 0 ) -+ { -+ if ( strcasecmp( use_known_settings_on_selected_fonts_env, -+ "true") == 0 ) -+ use_known_settings_on_selected_fonts = TRUE; -+ else if ( strcasecmp( use_known_settings_on_selected_fonts_env, -+ "1") == 0 ) -+ use_known_settings_on_selected_fonts = TRUE; -+ else if ( strcasecmp( use_known_settings_on_selected_fonts_env, -+ "on") == 0 ) -+ use_known_settings_on_selected_fonts = TRUE; -+ else if ( strcasecmp( use_known_settings_on_selected_fonts_env, -+ "yes") == 0 ) -+ use_known_settings_on_selected_fonts = TRUE; -+ } -+ } -+ checked_use_known_settings_on_selected_fonts_env = TRUE; -+ } -+ -+ -+ /* Simply return in odd cases where these don't seem to be set */ -+ /* Flash and some pdf viewers will crash otherwise */ -+ if ( !slot->face || -+ !slot->face->size || -+ !slot->face->size->metrics.x_ppem ) -+ return; -+ -+ if ( slot->face->size->metrics.x_ppem > MAX_PPEM ) -+ return; -+ -+ if ( slot->face->size->metrics.x_ppem < MIN_PPEM ) -+ return; -+ -+ if ( !FT_IS_SCALABLE( slot->face ) ) -+ return; -+ -+ ppem = slot->face->size->metrics.x_ppem; -+ -+ -+ /* only perform alignment on styles we know, that aren't bold or italic */ -+ /* perhaps detection could be added on those that are not set? */ -+ /* Require certain ppems for narrow and light fonts */ -+ if( slot->face->style_name ) -+ { -+ if ( strcasestr( slot->face->style_name, "Italic" ) || -+ strcasestr( slot->face->style_name, "Oblique" ) || -+ strcasestr( slot->face->style_name, "Script" ) || -+ strcasestr( slot->face->style_name, "Handwriting" ) || -+ strcasestr( slot->face->style_name, "Bold" ) || -+ strcasestr( slot->face->style_name, "Black" ) || -+ ( ( strcasestr( slot->face->style_name, "Extra Thin" ) || -+ strcasestr( slot->face->style_name, "Extra Light" ) ) && -+ ppem < 10 ) || -+ ( strcasestr( slot->face->style_name, "Thin" ) -+ && ppem < 10 ) || -+ ( strcasestr( slot->face->style_name, "Light" ) -+ && ppem < 10 ) || -+ ( strcasestr( slot->face->style_name, "Narrow" ) -+ && ppem < 15 ) || -+ ( strcasestr( slot->face->style_name, "Condensed" ) -+ && ppem < 20 ) ) -+ return; -+ } -+ -+ if( slot->face->family_name ) -+ { -+ if ( strcasestr( slot->face->family_name, "Italic" ) || -+ strcasestr( slot->face->family_name, "Oblique" ) || -+ strcasestr( slot->face->family_name, "Script" ) || -+ strcasestr( slot->face->family_name, "Handwriting" ) || -+ strcasestr( slot->face->family_name, "Bold" ) || -+ strcasestr( slot->face->family_name, "Black" ) || -+ ( ( strcasestr( slot->face->family_name, "Extra Thin" ) || -+ strcasestr( slot->face->family_name, "Extra Light" ) ) && -+ ppem < 10 ) || -+ ( strcasestr( slot->face->family_name, "Thin" ) -+ && ppem < 10 ) || -+ ( strcasestr( slot->face->family_name, "Light" ) -+ && ppem < 10 ) || -+ ( strcasestr( slot->face->family_name, "Narrow" ) -+ && ppem < 15 ) || -+ ( strcasestr( slot->face->family_name, "Condensed" ) -+ && ppem < 20 ) ) -+ return; -+ } -+ else if ( slot->face->style_flags ) -+ { -+ if ( slot->face->style_flags & FT_STYLE_FLAG_ITALIC || -+ slot->face->style_flags & FT_STYLE_FLAG_BOLD || -+ FT_IS_TRICKY( slot->face ) ) -+ return; -+ } -+ else return; -+ -+ if ( slot->face->family_name ) -+ { -+ if ( strcasestr(slot->face->family_name, "Courier" ) || -+ strcasestr(slot->face->family_name, "Serif" ) || -+ strcasestr(slot->face->family_name, "Times" ) ) -+ has_serifs = TRUE; -+ } -+ -+ if ( mode != FT_RENDER_MODE_LCD ) -+ { -+ columns_per_pixel = 1; -+ one_pixel = 256; -+ one_third_pixel = 85; -+ /*extra_columns = 0;*/ -+ /* until this can be figured out just return */ -+ /* There are issues with missing glyphs */ -+ return; -+ } -+ /* only look at top 3 for now */ -+ known_stem_values -+ = (Stem_Data*) malloc ( columns_per_pixel * sizeof ( Stem_Data ) ); -+ known_stem_values->stem_spacing = -1; -+ known_stem_values->stem_width = -1; -+ known_stem_values->stem_start = -1; -+ known_stem_values->stem_scaling = -1; -+ known_stem_values->stem_translating_only = -1024; -+ known_stem_values->stem_translating = 0; -+ known_stem_values->brightness = 0; -+ known_stem_values->contrast = 0; -+ known_stem_values->use_100 = FALSE; -+ known_stem_values->m = -1; -+ known_stem_values->synth_stems = FALSE; -+ known_stem_values->bearing_correction = TRUE; -+ -+ if ( use_known_settings_on_selected_fonts ) -+ { -+ sa_fill_known_stem_values ( slot->face->family_name, -+ ppem, slot->face->style_name, -+ valid_stems, known_stem_values ); -+ if ( verbose ) -+ printf ( "width:%d,spacing:%d,start:%d,scaling:%d,translate:%d ", -+ known_stem_values->stem_width, -+ known_stem_values->stem_spacing, -+ known_stem_values->stem_start, -+ known_stem_values->stem_scaling, -+ known_stem_values->stem_translating_only ); -+ } -+ -+ /* translate value may be set for < 10 */ -+ if ( use_known_settings_on_selected_fonts && -+ known_stem_values->stem_translating_only > -1024 ) -+ { -+ *translate_value = known_stem_values->stem_translating_only; -+ free ( known_stem_values ); -+ return; -+ } -+ -+ if ( use_known_settings_on_selected_fonts && -+ known_stem_values->bearing_correction == FALSE ) -+ strategy_bearing_correction = FALSE; -+ -+ -+ if ( known_stem_values->use_100 || -+ known_stem_values->m >= 0 ) -+ { -+ alignment_strength = fitting_strength = 100; -+ strategy_use_m_control = TRUE; -+ } -+ -+ if ( known_stem_values->edge_detection ) -+ strategy_also_use_edge_detection_for_stems = TRUE; -+ -+ if ( ppem < 9 ) -+ return; -+ if ( ppem > 20 ) -+ strategy_use_m_control = TRUE; -+ -+ /* Allocate */ -+ segments -+ = (Stem_Segment*) malloc( (1) * sizeof ( Stem_Segment ) ); -+ leftmost_segment -+ = (Stem_Segment*) malloc( sizeof ( Stem_Segment ) ); -+ leftmost_segment_not_extrema -+ = (Stem_Segment*) malloc( sizeof ( Stem_Segment ) ); -+ rightmost_segment -+ = (Stem_Segment*) malloc( sizeof ( Stem_Segment ) ); -+ rightmost_segment_not_extrema -+ = (Stem_Segment*) malloc( sizeof ( Stem_Segment ) ); -+ -+ stems = (Stem*) malloc ( MAX_STEMS * sizeof ( Stem ) ); -+ possible_stems = (Stem*) malloc ( MAX_STEMS * sizeof ( Stem ) ); -+ leftmost_stem = (Stem*) malloc ( sizeof (Stem)); -+ rightmost_stem = (Stem*) malloc ( sizeof(Stem)); -+ centers = (Stem_Center*) malloc ( (1) * sizeof ( Stem_Center ) ); -+ -+ if ( verbose ) -+ printf("\n"); -+ -+ /* Initialize */ -+ for ( xx = 0; xx < width * 256; xx += 1 ) -+ stem_centers[xx] = 0; -+ -+ for ( xx = 0; xx < num_segments; xx += 1 ) -+ { -+ segments[xx].x1 = 0; -+ segments[xx].x2 = 0; -+ segments[xx].y = 0; -+ } -+ -+ rightmost_segment->x1 = 0; -+ rightmost_segment->x2 = 0; -+ rightmost_segment->y = 0; -+ leftmost_segment->x1 = 99999999; -+ leftmost_segment->x2 = 0; -+ leftmost_segment->y = 0; -+ -+ rightmost_segment_not_extrema->x1 = 0; -+ rightmost_segment_not_extrema->x2 = 0; -+ rightmost_segment_not_extrema->y = 0; -+ leftmost_segment_not_extrema->x1 = 99999999; -+ leftmost_segment_not_extrema->x2 = 0; -+ leftmost_segment_not_extrema->y = 0; -+ -+ /* Locate stem centers for later processing */ -+ for ( h = (FT_UInt)bitmap->rows; h > 0; h--, line += bitmap->pitch ) -+ { -+ current_value = 0; -+ /* Calculate various sums and stem widths of glyph */ -+ for ( xx = 0; xx < width; xx += 1 ) -+ { -+ /* Reallocate */ -+ segments = (Stem_Segment*) realloc -+ ( segments, ( num_segments + 1 ) * sizeof ( Stem_Segment ) ); -+ -+ /* if line is white, and now has color, it's the start of a stem */ -+ if ( current_value == 0 && line[xx] > 0 ) -+ { -+ /* start of stem */ -+ segments[num_segments].x1 = 256 * xx + ( 255 - line[xx] ); -+ segments[num_segments].y = h; -+ } -+ -+ /* otherwise, if it's currently black and the new value is 0, -+ it's the end of a stem */ -+ else if ( ( current_value > 0 && line[xx] == 0 ) || -+ ( current_value > 0 && xx == width - 1 ) ) -+ { -+ FT_Long stem_center_x; -+ segments[num_segments].x2 = 256 * ( xx - 1 ) + line[xx-1]; -+ -+ if ( xx == width - 1 ) -+ segments[num_segments].x2 += line[xx]; -+ -+ /*stem center is average of start and end of stem */ -+ stem_center_x = ( segments[num_segments].x2 -+ + segments[num_segments].x1 ) / 2; -+ -+ /* Reallocate */ -+ centers = (Stem_Center*) realloc -+ ( centers, ( num_centers + 1 ) * sizeof ( Stem_Center ) ); -+ centers[num_centers].x = stem_center_x; -+ centers[num_centers].y = h; -+ centers[num_centers].x1 = segments[num_segments].x1; -+ centers[num_centers].x2 = segments[num_segments].x2; -+ -+ num_centers++; -+ -+ stem_centers[stem_center_x] += 1; -+ -+ /* Find left and rightmost points for later calculations */ -+ /* OR - Favor ones that aren't on the top or bottom if */ -+ /* possible to prevent v and w from getting caught later */ -+ if ( segments[num_segments].x1 < leftmost_segment->x1 || -+ ( segments[num_segments].y > 1 && -+ segments[num_segments].y < height && -+ segments[num_segments].x1 == leftmost_segment->x1 ) ) -+ { -+ leftmost_segment->x1 = segments[num_segments].x1; -+ leftmost_segment->x2 = segments[num_segments].x2; -+ leftmost_segment->y = h; -+ } -+ if ( segments[num_segments].x2 > rightmost_segment->x2 || -+ ( segments[num_segments].y > 1 && -+ segments[num_segments].y < height && -+ segments[num_segments].x1 == rightmost_segment->x1 ) ) -+ { -+ rightmost_segment->x1 = segments[num_segments].x1; -+ rightmost_segment->x2 = segments[num_segments].x2; -+ rightmost_segment->y = h; -+ } -+ -+ if ( segments[num_segments].x1 -+ < leftmost_segment_not_extrema->x1 || -+ ( segments[num_segments].y > 1 && -+ segments[num_segments].y < height && -+ segments[num_segments].x1 -+ == leftmost_segment_not_extrema->x1 && -+ h < (FT_UInt)bitmap->rows && h > 0 ) ) -+ { -+ leftmost_segment_not_extrema->x1 = segments[num_segments].x1; -+ leftmost_segment_not_extrema->x2 = segments[num_segments].x2; -+ leftmost_segment_not_extrema->y = h; -+ } -+ if ( segments[num_segments].x2 -+ > rightmost_segment_not_extrema->x2 || -+ ( segments[num_segments].y > 1 && -+ segments[num_segments].y < height && -+ segments[num_segments].x1 -+ == rightmost_segment_not_extrema->x1 && -+ h < (FT_UInt)bitmap->rows && h > 0 ) ) -+ { -+ rightmost_segment_not_extrema->x1 = segments[num_segments].x1; -+ rightmost_segment_not_extrema->x2 = segments[num_segments].x2; -+ rightmost_segment_not_extrema->y = h; -+ } -+ -+ if ( segments[num_segments].x1 < leftmost_point ) -+ leftmost_point = segments[num_segments].x1; -+ -+ if ( segments[num_segments].x2 > rightmost_point ) -+ rightmost_point = segments[num_segments].x2; -+ -+ if ( segments[num_segments].x1 < leftmost_point_not_extrema && -+ h < (FT_UInt)bitmap->rows && h > 0 ) -+ leftmost_point_not_extrema = segments[num_segments].x1; -+ -+ if ( segments[num_segments].x2 > rightmost_point_not_extrema && -+ h < (FT_UInt)bitmap->rows && h > 0 ) -+ rightmost_point_not_extrema = segments[num_segments].x2; -+ -+ num_segments++; -+ } -+ /* else - other conditions - need some error checking here */ -+ current_value = line[xx]; -+ } -+ } -+ -+ /* initialize */ -+ for ( xx = 0; xx < MAX_STEMS; xx +=1 ) -+ { -+ stems[xx].center = 0; -+ stems[xx].count = 0; -+ stems[xx].width = 0; -+ stems[xx].height = 0; -+ possible_stems[xx].center = 0; -+ possible_stems[xx].count = 0; -+ possible_stems[xx].width = 0; -+ possible_stems[xx].height = 0; -+ } -+ -+ valid_stems = 0; -+ valid_possible_stems = 0; -+ -+ /* Determine which centers belong to stems */ -+ center = 0; -+ -+ while ( center < num_centers ) -+ { -+ /* slope at within which to consider a point part of a stem */ -+ /*const FT_UInt slope = 1; -+ const FT_UInt topslope = (256 * 3) / 10; */ -+ -+ /* 10 to 20 with 4 matches seems good, */ -+ /* but 1 or 2 with 3 stems needs to somehow get included */ -+ FT_Int deviation1 = 5; -+ FT_Int deviation2=-1, requirement1 = 4, stem_match_requirement = 3; -+ FT_Int best_height = 0, center_difference_in_height; -+ FT_Int center_difference_in_width, valid_center_average; -+ FT_Int smallest_width_ledge, smallest_width_redge; -+ FT_Int x1_difference_in_width, x2_difference_in_width; -+ FT_Bool large_gap_found = FALSE, no_gap_found = FALSE; -+ FT_Bool large_gap_found_ledge = FALSE, no_gap_found_ledge = FALSE; -+ FT_Bool large_gap_found_redge = FALSE, no_gap_found_redge = FALSE; -+ FT_Bool stem_detected = FALSE; -+ FT_Int set_width_to, set_center_to; -+ -+ /* seems to not do damage */ -+ /* May not be effective */ -+ requirement1 = height / 4; -+ if ( requirement1 < 5 ) -+ requirement1 = 5; -+ deviation1 = 20; -+ deviation2 = 20; -+ -+ if ( columns_per_pixel == 1 ) -+ deviation1 = deviation2 = 10; -+ -+ if ( (FT_Int)bitmap->rows <= 6 ) -+ deviation1 = 25; -+ -+ if ( (FT_Int)bitmap->rows <= 6 ) -+ deviation2 = 25; -+ -+ if ( columns_per_pixel == 1 && -+ (FT_Int)bitmap->rows <= 6 ) -+ deviation1 = deviation2 = 12; -+ -+ valid_center_average = 0; -+ -+ large_gap_found = large_gap_found_ledge = large_gap_found_redge = FALSE; -+ no_gap_found = no_gap_found_ledge = no_gap_found_redge = FALSE; -+ stem_detected = FALSE; -+ -+ if ( ppem < 11 ) -+ requirement1 = 4; -+ -+ if ( ppem > 18 ) -+ { -+ stem_match_requirement = height / 4; -+ if ( stem_match_requirement < 3 ) -+ stem_match_requirement = 3; -+ } -+ -+ smallest_width_ledge = smallest_width_redge = width * 256; -+ stem_matches = 0; -+ stem_matches_ledge = 0; -+ stem_matches_redge = 0; -+ last_matching_center = -1; -+ last_matching_ledge = -1; -+ last_matching_redge = -1; -+ -+ /* set currently looked at center to center value */ -+ this_center = center; -+ next_center = 0; -+ -+ /* For each center, compare with all other centers to see if others */ -+ /* match the properties of this one */ -+ while ( next_center < num_centers ) -+ { -+ -+ /* calculate differences */ -+ center_difference_in_width = abs ( centers[this_center].x -+ - centers[next_center].x ); -+ center_difference_in_height = abs ( centers[this_center].y -+ - centers[next_center].y ); -+ x1_difference_in_width = abs ( centers[this_center].x1 -+ - centers[next_center].x1 ); -+ x2_difference_in_width = abs ( centers[this_center].x2 -+ - centers[next_center].x2 ); -+ -+ -+ /* property - stem center points that align */ -+ /* if the center is within range, the center is less than */ -+ /* 1/2 the height away, and at least one edge is also within range */ -+ if ( center_difference_in_width -+ < center_difference_in_height * deviation1 && -+ center_difference_in_height -+ <= (FT_Int)bitmap->rows / 2 && -+ /* prevents w from getting caught ---- but also kills m */ -+ ( x1_difference_in_width -+ < center_difference_in_height * deviation2 || -+ x2_difference_in_width -+ < center_difference_in_height * deviation2 ) ) -+ { -+ stem_matches += 1; -+ valid_center_average += centers[next_center].x; -+ -+ /* try to find where the matching centers are far apart */ -+ if ( last_matching_center >= 0 && -+ abs( centers[last_matching_center].y -+ - centers[next_center].y ) >= (FT_Int)bitmap->rows / 2 ) -+ large_gap_found = TRUE; -+ -+ /* try to find where matching centers are next to each other */ -+ if ( last_matching_center >= 0 && -+ abs( centers[last_matching_center].y -+ - centers[next_center].y ) == 1 ) -+ no_gap_found = TRUE; -+ -+ last_matching_center = next_center; -+ } -+ -+ if ( strategy_also_use_edge_detection_for_stems ) -+ { -+ /* property - stem left edge points that align */ -+ /* if the center is within range, */ -+ /* the center is less than 1/2 the height away */ -+ if ( x1_difference_in_width -+ < center_difference_in_height * deviation1 && -+ center_difference_in_height <= (FT_Int)bitmap->rows / 2 ) -+ { -+ stem_matches_ledge += 1; -+ /* may not need for edges */ -+ /*valid_center_average += centers[next_center].x; */ -+ -+ if ( centers[next_center].x2 - centers[next_center].x1 -+ < smallest_width_ledge ) -+ smallest_width_ledge = centers[next_center].x2 -+ - centers[next_center].x1; -+ -+ /* try to find where the matching centers are far apart */ -+ if ( last_matching_ledge >= 0 && -+ abs( centers[last_matching_ledge].y -+ - centers[next_center].y) -+ >= (FT_Int)bitmap->rows / 2 ) -+ large_gap_found_ledge = TRUE; -+ -+ /* try to find where matching centers are next to each other */ -+ if ( last_matching_ledge >= 0 && -+ abs( centers[last_matching_ledge].y -+ - centers[next_center].y ) == 1 ) -+ no_gap_found_ledge = TRUE; -+ last_matching_ledge = next_center; -+ } -+ } -+ -+ if ( strategy_also_use_edge_detection_for_stems ) -+ { -+ /* property - stem right edge points that align */ -+ /* if the center is within range, the center is less than 1/2 */ -+ /* the height away */ -+ if ( x2_difference_in_width -+ < center_difference_in_height * deviation1 && -+ center_difference_in_height -+ <= (FT_Int)bitmap->rows / 2 ) -+ { -+ stem_matches_redge += 1; -+ /* may not need for edges */ -+ /*valid_center_average += centers[next_center].x; */ -+ -+ if ( centers[next_center].x2 - centers[next_center].x1 -+ < smallest_width_redge ) -+ smallest_width_redge = centers[next_center].x2 -+ - centers[next_center].x1; -+ -+ /* try to find where the matching centers are far apart */ -+ if ( last_matching_redge >= 0 && -+ abs( centers[last_matching_redge].y -+ - centers[next_center].y ) >= (FT_Int)bitmap->rows / 2 ) -+ large_gap_found_redge = TRUE; -+ -+ /* try to find where matching centers are next to each other */ -+ if ( last_matching_redge >= 0 && -+ abs( centers[last_matching_redge].y -+ - centers[next_center].y ) == 1 ) -+ no_gap_found_redge = TRUE; -+ -+ last_matching_redge = next_center; -+ } -+ } -+ -+ next_center++; -+ } -+ -+ if ( stem_matches > 0 ) -+ valid_center_average /= stem_matches; -+ -+ best_height = stem_matches; -+ -+ -+ if ( ( stem_matches >= stem_match_requirement || -+ ( ( (FT_Int)bitmap->rows <= 6 || ppem < 11 ) && -+ stem_matches >= 2 && -+ abs ( valid_center_average -+ - centers[center].x) < deviation1 /2 ) || -+ /* try to catch tightly aligned stuff where the matching centers */ -+ /* are next to each other only */ -+ ( stem_matches == 2 && -+ abs( valid_center_average -+ - centers[center].x) <= deviation1 /2 && -+ no_gap_found && -+ ppem < 18 ) ) && -+ /* catches things like times 16 u but gets a lot of w's too */ -+ /* stem width is less than 1/3 of the bitmap width, */ -+ /* or bitmap_width is small */ -+ ( centers[center].x2 - centers[center].x1 -+ < (m_horiAdvance * 12) / 2 || -+ m_horiAdvance * 12 <= columns_per_pixel * one_pixel ) ) -+ { -+ stem_detected = TRUE; -+ set_width_to = centers[center].x2 - centers[center].x1; -+ best_height = stem_matches; -+ set_center_to = centers[center].x; -+ } -+ -+ /* see if edges found anything */ -+ if ( strategy_also_use_edge_detection_for_stems && !stem_detected ) -+ { -+ /* Require no gap for edges */ -+ /* stem width less than 1/3 bitmap width, or bitmap_width is small */ -+ /* The stem occurs on the left side of glyph only */ -+ if ( ( stem_matches_ledge >= stem_match_requirement && -+ no_gap_found_ledge ) && -+ ( centers[center].x2 - centers[center].x1 -+ < ( m_horiAdvance * 12 ) / 2 || -+ m_horiAdvance * 12 <= columns_per_pixel * one_pixel ) && -+ centers[center].x < ( m_horiAdvance * 12 ) / 2 ) -+ { -+ stem_detected = TRUE; -+ set_width_to = smallest_width_ledge; -+ best_height = stem_matches_ledge; -+ set_center_to = centers[center].x1 + set_width_to / 2; -+ stem_matches = stem_matches_ledge; -+ } -+ /* Require no gap for edges */ -+ /* stem width is less than 1/3 bitmap width, or bitmap_width is small */ -+ /* The stem occurs on the right side of glyph only */ -+ else if ( ( stem_matches_redge >= stem_match_requirement && -+ no_gap_found_redge ) && -+ ( centers[center].x2 - centers[center].x1 -+ < ( m_horiAdvance * 12 ) / 2 || -+ m_horiAdvance * 12 <= columns_per_pixel * one_pixel ) && -+ centers[center].x > (m_horiAdvance * 12) / 2 ) -+ { -+ stem_detected = TRUE; -+ set_width_to = smallest_width_redge; -+ best_height = stem_matches_redge; -+ set_center_to = centers[center].x2 - set_width_to / 2; -+ stem_matches = stem_matches_redge; -+ } -+ } -+ -+ -+ /*store and/or replace highest occurrences with 3 or more centers */ -+ /* because this matched, it will become the top dog regardless */ -+ if ( stem_detected ) -+ if ( stem_matches > possible_stems[0].height ) -+ { -+ /* if this is the first stem just go ahead */ -+ if ( valid_possible_stems == 0 ) -+ { -+ valid_possible_stems = 1; -+ possible_stems[0].center = set_center_to; -+ possible_stems[0].count = stem_matches; -+ possible_stems[0].width = set_width_to; -+ possible_stems[0].height = stem_matches; -+ } -+ -+ /* otherwise, if there is already a stem */ -+ else if ( valid_possible_stems == 1 ) -+ { -+ /* if stem is within range of existing one, replace existing one */ -+ -+ /* if the stem isn't within the range of this one swap it with */ -+ /* next one first */ -+ if ( abs ( set_center_to - possible_stems[0].center ) -+ >= one_pixel * 2 ) -+ { -+ swap_stem ( &possible_stems[0], &possible_stems[1] ); -+ valid_possible_stems = 2; -+ } -+ possible_stems[0].center = set_center_to; -+ possible_stems[0].count = stem_matches; -+ possible_stems[0].width = set_width_to; -+ possible_stems[0].height = stem_matches; -+ } -+ -+ /* otherwise if there are already 2 stems */ -+ else if ( valid_possible_stems >= 2 ) -+ { -+ /* if the stem is within the range of existing one, replace */ -+ /* existing one */ -+ if ( abs ( set_center_to - possible_stems[0].center ) -+ <= one_pixel * 2 ) -+ { -+ possible_stems[0].center = set_center_to; -+ possible_stems[0].count = stem_matches; -+ possible_stems[0].width = set_width_to; -+ possible_stems[0].height = stem_matches; -+ } -+ /* if the stem isn't within the range of this one */ -+ else -+ { -+ /* see if within range of next one and swap if so and proceed */ -+ /* overwriting it */ -+ if ( abs ( set_center_to - possible_stems[1].center ) -+ <= one_pixel * 2 ) -+ swap_stem ( &possible_stems[0], &possible_stems[1] ); -+ -+ /* otherwise see if in range of third one */ -+ else if ( abs ( set_center_to - possible_stems[2].center ) -+ <= one_pixel * 2 ) -+ swap_stem ( &possible_stems[0], &possible_stems[2] ); -+ -+ /* otherwise this is the new top dog, so demote everything */ -+ else -+ { -+ swap_stem ( &possible_stems[1], &possible_stems[2] ); -+ swap_stem ( &possible_stems[0], &possible_stems[1] ); -+ valid_possible_stems += 1; -+ } -+ possible_stems[0].center = set_center_to; -+ possible_stems[0].count = stem_matches; -+ possible_stems[0].width = set_width_to; -+ possible_stems[0].height = stem_matches; -+ } -+ } -+ } -+ -+ else if ( stem_matches > possible_stems[1].height && -+ set_center_to != 0 ) -+ { -+ -+ /* make sure it doesn't match the first stem */ -+ if ( abs ( set_center_to - possible_stems[0].center ) >= one_pixel * 2 ) -+ { -+ -+ /* if this is the second stem */ -+ if ( valid_possible_stems == 1 ) -+ valid_possible_stems = 2; -+ -+ /* otherwise if there is already a stem here */ -+ else if ( valid_possible_stems >= 2 ) -+ { -+ /* if it doesn't match the second stem, proceed to swap out */ -+ /* with the third. if it does, replace it */ -+ if ( abs ( set_center_to - possible_stems[1].center ) -+ >= one_pixel * 2 ) -+ { -+ swap_stem ( &possible_stems[1], &possible_stems[2] ); -+ valid_possible_stems +=1; -+ } -+ } -+ possible_stems[1].center = set_center_to; -+ possible_stems[1].count = stem_matches; -+ possible_stems[1].width = set_width_to; -+ possible_stems[1].height = stem_matches; -+ } -+ } -+ -+ else if ( stem_matches > possible_stems[2].height && -+ set_center_to != 0 ) -+ { -+ /* if it doesn't match the first or second one */ -+ if ( abs( set_center_to - possible_stems[0].center) >= one_pixel * 2 && -+ abs( set_center_to - possible_stems[1].center) >= one_pixel * 2 ) -+ { -+ if ( valid_possible_stems == 2 ) -+ valid_possible_stems += 1; -+ -+ possible_stems[2].center = set_center_to; -+ possible_stems[2].count = stem_matches; -+ possible_stems[2].width = set_width_to; -+ possible_stems[1].height = stem_matches; -+ } -+ } -+ -+ if ( valid_possible_stems > 3 ) -+ valid_possible_stems = 3; -+ -+ center++; -+ } -+ -+ /* promote to stem */ -+ if ( valid_possible_stems > 0 ) -+ { -+ stems[0].center = possible_stems[0].center; -+ stems[0].count = possible_stems[0].count; -+ stems[0].width = possible_stems[0].width; -+ stems[0].height = possible_stems[0].height; -+ stems[0].generated = FALSE; -+ valid_stems++; -+ } -+ -+ if ( valid_stems == 1 && -+ valid_possible_stems > 1 ) -+ { -+ stems[1].center = possible_stems[1].center; -+ stems[1].count = possible_stems[1].count; -+ stems[1].width = possible_stems[1].width; -+ stems[1].height = possible_stems[1].height; -+ stems[1].generated = FALSE; -+ valid_stems++; -+ } -+ -+ if ( valid_stems == 2 && -+ valid_possible_stems > 2 && -+ possible_stems[2].center != 0 ) -+ { -+ stems[2].center = possible_stems[2].center; -+ stems[2].count = possible_stems[2].count; -+ stems[2].width = possible_stems[2].width; -+ stems[2].height = possible_stems[2].height; -+ stems[2].generated = FALSE; -+ valid_stems++; -+ } -+ -+ /* sort stems in x direction */ -+ if ( valid_stems == 3 ) -+ { -+ if ( stems[0].center > stems[1].center ) -+ swap_stem ( &stems[0], &stems[1] ); -+ -+ if ( stems[0].center > stems[2].center ) -+ swap_stem ( &stems[1], &stems[2] ); -+ -+ if ( stems[1].center > stems[2].center ) -+ swap_stem ( &stems[1], &stems[2] ); -+ -+ if ( stems[0].center > stems[1].center ) -+ swap_stem ( &stems[0], &stems[1] ); -+ -+ /* only look at first and last stem for now */ -+ swap_stem ( &stems[1], &stems[2] ); -+ } -+ -+ /* synthesize stems - Works, but needs work */ -+ if ( ( strategy_synthesize_stems || -+ known_stem_values->synth_stems ) && -+ valid_stems == 0 && -+ ppem > 10 ) -+ { -+ /* if the leftmost segment's leftmost point is the same as the glyph's */ -+ /* leftmost point, and it is of reasonable width, and is not on the */ -+ /* top or bottom of the bitmap */ -+ if ( leftmost_segment_not_extrema->x1 -+ == leftmost_point_not_extrema && -+ abs ( leftmost_segment_not_extrema->x2 -+ - leftmost_segment_not_extrema->x1 ) -+ < ( rightmost_point_not_extrema -+ - leftmost_point_not_extrema ) / 3 && -+ leftmost_segment_not_extrema->y < height && -+ leftmost_segment_not_extrema->y > 1 ) -+ { -+ stems[valid_stems].center = ( leftmost_segment_not_extrema->x2 -+ + leftmost_segment_not_extrema->x1 ) / 2; -+ stems[valid_stems].width = leftmost_segment_not_extrema->x2 -+ - leftmost_segment_not_extrema->x1; -+ stems[valid_stems].generated = TRUE; -+ valid_stems += 1; -+ } -+ -+ -+ if ( rightmost_segment_not_extrema->x2 -+ == rightmost_point_not_extrema && -+ abs ( rightmost_segment_not_extrema->x2 -+ - rightmost_segment_not_extrema->x1 ) -+ < ( rightmost_point_not_extrema -+ - leftmost_point_not_extrema ) / 3 && -+ rightmost_segment_not_extrema->y < height && -+ rightmost_segment_not_extrema->y > 1 ) -+ { -+ stems[valid_stems].center = ( rightmost_segment_not_extrema->x2 -+ + rightmost_segment_not_extrema->x1 ) / 2; -+ stems[valid_stems].width = rightmost_segment_not_extrema->x2 -+ - rightmost_segment_not_extrema->x1; -+ stems[valid_stems].generated = TRUE; -+ valid_stems += 1; -+ } -+ -+ } -+ -+ /* sort stems in x direction */ -+ if ( valid_stems > 1 && stems[0].center > stems[1].center ) -+ swap_stem ( &stems[0], &stems[1] ); -+ -+ if ( valid_stems == 0 && known_stem_values->stem_translating != 0 ) -+ { -+ *translate_value += known_stem_values->stem_translating; -+ -+ if ( strategy_use_strengths ) -+ { -+ /* consider 1/2 pixel the max when strength is at 100%, -+ unless translate is already greater than that */ -+ FT_Int strength_cutoff = 32; -+ -+ -+ if ( abs ( *translate_value ) > strength_cutoff) -+ strength_cutoff = *translate_value; -+ -+ max_strength = ( strength_cutoff * alignment_strength ) / 100; -+ -+ if ( *translate_value < -max_strength ) -+ *translate_value = -max_strength; -+ else if ( *translate_value > max_strength ) -+ *translate_value = max_strength; -+ } -+ } -+ else -+ /* Start snapping */ -+ { -+ FT_Int center_offset; -+ FT_Int modulus; -+ FT_Int delta, delta2; -+ FT_Long stem_distance = 1, new_distance = 1; -+ FT_Int distance_floor, distance_ceiling; -+ FT_Int translate_value2 = 0; -+ FT_Int main_stem = 0; -+ FT_Int lbearing = m_horiBearingX * 12; -+ FT_Int bitmap_stem_location = stems[0].center; -+ FT_Int advance_stem_location = bitmap_stem_location -+ + lbearing - one_pixel; -+ FT_Int advance_width = m_horiAdvance * 12; -+ FT_Int original_advance_width = 12 * ( slot->linearHoriAdvance >> 10 ); -+ FT_Int glyph_width = rightmost_point - leftmost_point; -+ FT_Int stem_width = stems[0].width; -+ FT_Int advance_leftmost_location = leftmost_point -+ + lbearing - one_pixel; -+ FT_Int advance_rightmost_location = rightmost_point -+ + lbearing - one_pixel; -+ -+#define proposed_transformed_point(point) \ -+ point * (float)(new_distance) / (float)(stem_distance) \ -+ + *translate_value * 12 - ( stems[main_stem].center * (float)(new_distance) \ -+ / (float)(stem_distance) - stems[main_stem].center) -+ -+#define proposed_translated_point(point) point + *translate_value * 12 -+ -+ center_offset = one_pixel / 2; /* half pixel */ -+ modulus = one_pixel; /* whole pixel */ -+ -+ /* Determine center_offset via known values */ -+ if ( known_stem_values->stem_width >= 0 ) -+ { -+ if ( known_stem_values->stem_width % 2 == 0 ) -+ center_offset = 0; -+ else -+ center_offset = one_pixel / 2; -+ } -+ /* otherwise do intelligent guessing, if set */ -+ else if ( strategy_auto_change_center_offset && -+ ppem >= STEM_WIDTH_2_PPEM && -+ stems[0].width < one_pixel * 1.45 ) -+ center_offset = one_pixel / 2; -+ else if ( strategy_auto_change_center_offset && -+ ppem >= STEM_WIDTH_2_PPEM && -+ stems[0].width >= one_pixel * 1.45 && -+ stems[0].width < one_pixel * 2.6 ) -+ center_offset = 0; -+ else if ( strategy_auto_change_center_offset && -+ ppem >= STEM_WIDTH_2_PPEM && -+ stems[0].width >= one_pixel * 2.6 && -+ stems[0].width < one_pixel * 3.6 ) -+ center_offset = one_pixel / 2; -+ else if ( strategy_auto_change_center_offset && -+ ppem >= STEM_WIDTH_2_PPEM ) -+ center_offset = -+ ( one_pixel -+ * ( ( ( (int)( stems[0].width + one_pixel / 2 ) ) -+ / one_pixel ) % 2 ) ) / 2; -+ -+ /* Snap to closest translate and scale values by default */ -+ if ( valid_stems >= 1 ) -+ { -+ /* closest snapping point for stem 0 */ -+ delta = ( stems[0].center + center_offset ) % modulus; -+ -+ if ( delta < modulus / 2 ) -+ /* snap left */ -+ *translate_value = -delta / ( columns_per_pixel * 4 ); -+ else -+ /* snap right */ -+ *translate_value = ( modulus - delta ) / ( columns_per_pixel * 4 ); -+ } -+ -+ if ( strategy_use_d_correction ) -+ { -+ /* if the only stem is in the last 1/3 of glyph width, the advance */ -+ /* is 6 pixels, the ppem 11, and doing so doesn't violate bitmap , */ -+ /* boundaries force it to snap right */ -+ if ( valid_stems == 1 && -+ advance_stem_location > (advance_width * 2) / 3 && -+ advance_width == 6 * one_pixel && -+ rightmost_point + modulus - delta -+ <= ( width - (columns_per_pixel * 2) / 3) * 256 && -+ ppem == 11 ) -+ *translate_value = ( modulus - delta ) / ( columns_per_pixel * 4 ); -+ } -+ -+ if ( strategy_use_strengths ) -+ { -+ /* consider 1/2 pixel the max when strength is at 100%, -+ unless translate is already greater than that */ -+ FT_Int strength_cutoff = 32; -+ if ( abs ( *translate_value ) > strength_cutoff ) -+ strength_cutoff = *translate_value; -+ -+ max_strength = ( strength_cutoff * alignment_strength ) / 100; -+ -+ if ( *translate_value < -max_strength ) -+ *translate_value = -max_strength; -+ else if ( *translate_value > max_strength ) -+ *translate_value = max_strength; -+ } -+ -+ /* If 2 stems is detected, scale distance -+ between in order to land on pixels */ -+ if ( valid_stems >= 2 ) -+ { -+ stem_distance = abs ( stems[1].center - stems[0].center ); -+ -+ delta = stem_distance % modulus; -+ new_distance = stem_distance - delta; -+ -+ distance_floor = stem_distance - delta; -+ distance_ceiling = stem_distance + ( modulus - delta ); -+ -+ if ( delta < modulus / 2 ) -+ new_distance = distance_floor; -+ else -+ new_distance = distance_ceiling; -+ -+ if ( columns_per_pixel == 3 && -+ valid_stems == 3 && -+ strategy_use_m_control && -+ ( width - 2 * columns_per_pixel ) > 6 * columns_per_pixel && -+ ppem > 8 && -+ ( advance_stem_location - advance_leftmost_location ) -+ < stems[main_stem].width * 2 ) -+ { -+ /* Possibly use 2 only when compatible widths is on? */ -+ FT_Int mod_factor = 2; -+ -+ if ( verbose ) -+ printf ( "USING M CONTROL "); -+ -+ distance_floor = stem_distance -+ - stem_distance % ( modulus * mod_factor ) ; -+ distance_ceiling = distance_floor + modulus * mod_factor; -+ -+ new_distance = distance_ceiling; -+ -+ /* force certain ideal situations */ -+ /* these 2 are mostly safe to do */ -+ if ( distance_ceiling -+ + one_pixel * columns_per_pixel == advance_width && -+ stem_width < one_pixel * 1.25 ) -+ new_distance = distance_ceiling; -+ /* NEED TO FIGURE OUT A WAY TO DETERMINE WHETHER -+ THAT NUDGE IS UP OR DOWN */ -+ else if ( stem_distance + one_pixel * 2.6 >= advance_width && -+ stem_width < one_pixel * 1.25 ) -+ new_distance = distance_ceiling; -+ -+ if ( proposed_transformed_point ( leftmost_point ) -+ < one_third_pixel * 2 || -+ proposed_transformed_point ( rightmost_point ) -+ > ( width -2 ) * one_third_pixel ) -+ new_distance = distance_floor; -+ -+ /* NEED TO IGNORE SERIF Ms HERE */ -+ /* perhaps check bitmap boundaries instead??? */ -+ if ( strategy_bearing_correction && new_distance == distance_ceiling ) -+ { -+ /* Correct if bearings are made substantially worse -+ (more than 1/3 a pixel beyond advance) */ -+ if ( proposed_transformed_point( advance_rightmost_location ) -+ > advance_width + one_third_pixel && -+ proposed_transformed_point( advance_rightmost_location ) -+ > advance_rightmost_location && -+ -proposed_transformed_point( advance_leftmost_location ) -+ < advance_rightmost_location - advance_width ) -+ new_distance = distance_floor; -+ } -+ -+ if ( known_stem_values->m >= 0 ) -+ { -+ if ( known_stem_values->m == 0 ) -+ new_distance = distance_floor; -+ else -+ new_distance = distance_ceiling; -+ } -+ -+ if ( ( rightmost_point - leftmost_point) - -+ ( ( rightmost_point * *scale_value) -+ - ( leftmost_point * *scale_value ) ) >= one_pixel * 1.5 ) -+ { -+ *scale_value = 1.0; -+ *translate_value = 0; -+ goto Exit; -+ } -+ -+ } -+ else if ( columns_per_pixel == 1 && -+ valid_stems == 3 && -+ strategy_use_m_control && valid_stems == 3 && -+ width >= 6 * columns_per_pixel && -+ ppem > 8 && -+ ( advance_stem_location - advance_leftmost_location ) -+ < stems[main_stem].width * 2 ) -+ { -+ /* Possibly use 2 only when compatible widths is on? */ -+ FT_Int mod_factor = 2; -+ -+ if ( verbose ) -+ printf ("USING M CONTROL "); -+ distance_floor = stem_distance - stem_distance -+ % ( modulus * mod_factor) ; -+ distance_ceiling = distance_floor + modulus * mod_factor; -+ -+ new_distance = distance_ceiling; -+ -+ /* force certain ideal situations */ -+ /* these 2 are mostly safe to do */ -+ if ( distance_ceiling -+ + one_pixel * columns_per_pixel == advance_width && -+ stem_width < one_pixel * 1.25 ) -+ new_distance = distance_ceiling; -+ /* NEED TO FIGURE OUT A WAY TO DETERMINE WHETHER -+ THAT NUDGE IS UP OR DOWN */ -+ else if ( stem_distance + one_pixel * 2.6 >= advance_width && -+ stem_width < one_pixel * 1.25 ) -+ new_distance = distance_ceiling; -+ -+ if ( proposed_transformed_point( leftmost_point ) < 0 || -+ proposed_transformed_point( rightmost_point ) -+ > width * one_pixel - 2 * one_third_pixel ) -+ new_distance = distance_floor; -+ -+ /* NEED TO IGNORE SERIF Ms HERE */ -+ /* perhaps check bitmap boundaries instead??? */ -+ if ( strategy_bearing_correction && new_distance == distance_ceiling ) -+ { -+ /* Correct if bearings are made substantially worse -+ (more than 1/3 a pixel beyond advance) */ -+ if ( proposed_transformed_point( advance_rightmost_location ) -+ > advance_width + one_third_pixel && -+ proposed_transformed_point( advance_rightmost_location ) -+ > advance_rightmost_location && -+ -proposed_transformed_point( advance_leftmost_location ) -+ < advance_rightmost_location - advance_width ) -+ new_distance = distance_floor; -+ } -+ -+ if ( known_stem_values->m >= 0 ) -+ { -+ if ( known_stem_values->m == 0 ) -+ new_distance = distance_floor; -+ else -+ new_distance = distance_ceiling; -+ } -+ -+ -+ if ( ( rightmost_point - leftmost_point ) -+ - ( ( rightmost_point * *scale_value ) -+ - ( leftmost_point * *scale_value ) ) >= one_pixel * 1.5 ) -+ { -+ *scale_value = 1.0; -+ *translate_value = 0; -+ goto Exit; -+ } -+ -+ } -+ else -+ { -+ if ( strategy_fit_to_width ) -+ new_distance = advance_width - 3 * one_pixel; -+ else if ( known_stem_values->stem_scaling >= 0 ) -+ { -+ if ( known_stem_values->stem_scaling > 0 ) -+ new_distance = distance_ceiling; -+ else -+ new_distance = distance_floor; -+ -+ /* enforce advance width boundaries */ -+ /* TOO RESTRICTIVE ON SERIF FONTS */ -+ if ( proposed_transformed_point( advance_rightmost_location ) -+ >= advance_width || -+ proposed_transformed_point( advance_leftmost_location ) -+ <= 0 ) -+ new_distance = distance_floor; -+ -+ /* enforce literal bitmap boundaries if no translate room */ -+ if ( ( proposed_transformed_point(rightmost_point) >= width * 256 -+ || proposed_transformed_point(leftmost_point ) <= one_pixel ) -+ && new_distance + one_pixel * 3 > advance_width ) -+ new_distance = distance_floor; -+ -+ } -+ else if ( strategy_translate_using_closest_stem ) -+ { -+ /* closest snapping point for stem 1 */ -+ delta2 = ( stems[1].center + center_offset ) % modulus; -+ -+ if ( delta2 < modulus / 2 ) -+ /* snap left */ -+ translate_value2 = -delta2 / ( columns_per_pixel * 4 ); -+ else -+ /* snap right */ -+ translate_value2 = ( modulus - delta2 ) -+ / ( columns_per_pixel * 4 ); -+ -+ if ( abs ( translate_value2 ) < abs ( *translate_value ) ) -+ { -+ *translate_value = translate_value2; -+ main_stem = 1; -+ } -+ -+ } -+ else if ( strategy_scale_to_closest_centers ) -+ { -+ /* closest snapping point for stem 0 */ -+ delta = ( stems[0].center + center_offset ) % modulus; -+ delta2 = ( stems[1].center + center_offset ) % modulus; -+ -+ if ( delta < modulus / 2 ) -+ /* stretch left */ -+ new_distance = delta + stem_distance; -+ else -+ /* stretch right */ -+ new_distance = delta - modulus + stem_distance; -+ -+ if ( delta2 < modulus / 2 ) -+ new_distance -= delta2; /* stretch left */ -+ else -+ new_distance += modulus - delta2; /* stretch right */ -+ -+ } -+ else if ( strategy_scale_to_closest_centers_up_only ) -+ { -+ FT_Int net_change = 0; -+ -+ /* closest snapping point for stem 0 */ -+ delta = ( stems[0].center + center_offset ) % modulus; -+ delta2 = ( stems[1].center + center_offset ) % modulus; -+ -+ if ( delta < modulus / 2 ) -+ net_change = delta; /* stretch left */ -+ else -+ net_change = -( modulus - delta ); /* stretch right */ -+ -+ if ( delta2 < modulus / 2 ) -+ net_change -= delta2; /* stretch left */ -+ else -+ net_change += modulus - delta2; /* stretch right */ -+ -+ if ( net_change > 0 && -+ proposed_transformed_point( advance_rightmost_location ) -+ < advance_width && -+ proposed_transformed_point( advance_leftmost_location ) > 0 ) -+ new_distance = distance_ceiling; -+ } -+ -+ else if ( strategy_always_use_distance_ceiling ) -+ { -+ if ( proposed_transformed_point( advance_rightmost_location ) -+ < advance_width && -+ proposed_transformed_point( advance_leftmost_location ) > 0 ) -+ new_distance = distance_ceiling; -+ } -+ } -+ -+ if ( strategy_use_strengths ) -+ { -+ FT_Int strength_cutoff = center_offset; -+ -+ -+ delta2 = new_distance - stem_distance; -+ -+ if ( abs ( delta2 ) > strength_cutoff ) -+ strength_cutoff = delta2; -+ -+ max_strength = ( strength_cutoff * fitting_strength ) / 100; -+ -+ if ( delta2 < -max_strength ) -+ new_distance = stem_distance - max_strength; -+ else if ( delta2 > max_strength ) -+ new_distance = stem_distance + max_strength; -+ } -+ -+ *scale_value = (float)( new_distance ) / (float)( stem_distance ); -+ *translate_value = *translate_value -+ - ( (float)( stems[main_stem].center * (float)new_distance ) -+ / (float)stem_distance - stems[main_stem].center ) / 12; -+ -+ if ( valid_stems == 2 ) -+ *embolden_value = ( 64.0 / *scale_value - 64.0 ); -+ -+ if ( valid_stems == 3 ) -+ *embolden_value = ( 64.0 / *scale_value - 64.0 ) / 1.5; -+ } -+ -+ if ( verbose ) -+ printf ( "%lu stems:", valid_stems ); -+ -+ if ( valid_stems == 1 && verbose ) -+ printf ( "1 stem: bitmapwidth:%d glyphwidth:%f glyph_width:%f center:%f bearing:%f advance:%f lhadvance:%f stemwidth:%f %d %d", -+ (width - 6) / columns_per_pixel, -+ (float)m_width / 64.0, -+ (float)glyph_width / (float)one_pixel, -+ (float)( (float)advance_stem_location ) / (float)one_pixel, -+ (float)m_horiBearingX / 64.0, -+ (float)m_horiAdvance / 64.0, -+ (float)linearHoriAdvance / 64.0, -+ (float)stems[0].width / (float)one_pixel, -+ advance_width, original_advance_width ); -+ else if ( valid_stems >= 2 && verbose ) -+ printf ( "%lu stems: bitmapwidth:%d center1:%f center2:%f difference:%f bearing:%f advance:%f advstemloc:%f ", -+ valid_stems, -+ (width - 6) / columns_per_pixel, -+ ( (float)advance_stem_location ) / (float)one_pixel, -+ ( (float)advance_stem_location -+ + (float)abs ( stems[1].center -+ - stems[0].center) ) / (float)one_pixel, -+ ( (float)abs ( stems[1].center -+ - stems[0].center ) ) / (float)one_pixel, -+ (float)m_horiBearingX / 64.0, -+ (float)m_horiAdvance / 64.0, -+ (float)advance_stem_location / (float)one_pixel ); -+ -+ if ( strategy_bearing_correction ) -+ { -+ /* Correct if negative bearings are made substantially worse */ -+ /* (more than 1/3 a pixel) */ -+ if ( proposed_transformed_point( advance_rightmost_location ) -+ > advance_width && -+ proposed_transformed_point( advance_rightmost_location ) -+ > advance_rightmost_location && -+ -proposed_transformed_point( advance_leftmost_location ) -+ < advance_rightmost_location - advance_width && -+ *translate_value -+ > one_third_pixel / ( columns_per_pixel * 4 ) ) -+ { -+ *translate_value -=64 ; -+ if ( verbose ) -+ printf ( "TRANSLATING -64 " ); -+ } -+ } -+ goto Exit; -+ } -+ -+ Exit: -+ -+#define transformed_point( point ) point * *scale_value + *translate_value * 12 -+ -+ if ( strategy_correct_out_of_bounds_outlines ) -+ { -+ /* Correct if outside bitmap */ -+ if ( transformed_point( rightmost_point ) -+ >= width * 256 - 2 * one_third_pixel && -+ transformed_point( leftmost_point ) -+ > one_pixel + 2 * one_third_pixel ) -+ *translate_value -=64 ; -+ else if ( transformed_point( leftmost_point ) -+ <= one_pixel / 2 && -+ transformed_point( rightmost_point ) -+ <= width * 256 - ( one_pixel + one_pixel / 2 ) ) -+ *translate_value += 64; -+ } -+ -+ STVALUES -+ -+ free ( segments ); -+ free ( leftmost_segment ); -+ free ( leftmost_segment_not_extrema ); -+ free ( rightmost_segment ); -+ free ( rightmost_segment_not_extrema ); -+ free ( known_stem_values ); -+ free ( stems ); -+ free ( possible_stems ); -+ free ( leftmost_stem ); -+ free ( rightmost_stem ); -+ free ( centers ); -+ } -+ -+ -+ /* Gamma correction */ -+ static void -+ _ft_lcd_gamma_correction_correction ( FT_Bitmap* bitmap, -+ FT_Render_Mode mode, -+ FT_GlyphSlot slot, -+ float gamma_correction_lt, -+ float gamma_correction_value ) -+ { -+ if ( gamma_correction_value != 1.0 ) -+ { -+ FT_UInt width = (FT_UInt)bitmap->width; -+ FT_UInt height = (FT_UInt)bitmap->rows; -+ FT_Byte* line = bitmap->buffer; -+ float ppem = (float)slot->face->size->metrics.x_ppem; -+ -+ -+ if ( !slot->face || !slot->face->size ) return; -+ -+ if ( ppem >= 5 ) -+ for ( height = (FT_UInt)bitmap->rows; -+ height > 0; -+ height--, line += bitmap->pitch ) -+ { -+ FT_UInt xx; -+ -+ -+ for ( xx = 0; xx < width; xx += 1 ) -+ { -+ /*normal*/ -+ /*line[xx] = pseudo_gamma ( line[xx], gamma_correction_value );*/ -+ -+ /* sloped */ -+ /*line[xx] = pseudo_gamma ( line[xx], gamma_correction_value - 5 -+ * (1-gamma_correction_value)/(gamma_correction_lt -5) -+ + ((1-gamma_correction_value)/(gamma_correction_lt -5)) * ppem );*/ -+ -+ /* 1/3-sloped */ -+ line[xx] = pseudo_gamma ( line[xx], gamma_correction_value - 5 -+ * ( ( 1 - gamma_correction_value ) -+ / ( 3 * ( gamma_correction_lt -5 ) ) ) -+ + ( ( 1 - gamma_correction_value ) -+ / ( 3 * ( gamma_correction_lt -5) ) ) * ppem ); -+ } -+ } -+ } -+ } -+ -+#endif - - /* convert a slot's glyph image into a bitmap */ - static FT_Error -@@ -104,8 +3102,9 @@ - { - FT_Error error; - FT_Outline* outline = NULL; -+ FT_Outline* outline_orig = NULL; - FT_BBox cbox; -- FT_Pos width, height, pitch; -+ FT_Pos width, height, pitch, ppem; - #ifndef FT_CONFIG_OPTION_SUBPIXEL_RENDERING - FT_Pos height_org, width_org; - #endif -@@ -123,6 +3122,479 @@ - FT_Bool have_outline_shifted = FALSE; - FT_Bool have_buffer = FALSE; - -+#ifdef FT_CONFIG_OPTION_INFINALITY_PATCHSET -+ FT_Matrix scaleMat; -+ FT_Long translate_value = 0; -+ float scale_value = 1.0; -+ FT_Int align_called = 0; -+ -+ -+ int chromeos_style_sharpening_strength = 0; -+ int checked_chromeos_style_sharpening_strength = 0; -+ int alignment_strength = 0; -+ int fitting_strength = 0; -+ FT_UInt checked_alignment_strength = 0; -+ FT_UInt checked_fitting_strength = 0; -+ FT_UInt checked_fringe_filter_strength = 0; -+ int fringe_filter_strength = 0; -+ FT_UInt checked_grayscale_filter_strength = 0; -+ int grayscale_filter_strength = 0; -+ -+ FT_UInt checked_autohint_horizontal_stem_darken_strength = 0; -+ int autohint_horizontal_stem_darken_strength = 0; -+ -+ FT_UInt checked_autohint_vertical_stem_darken_strength = 0; -+ int autohint_vertical_stem_darken_strength = 0; -+ -+ int windows_style_sharpening_strength = 0; -+ FT_UInt checked_windows_style_sharpening_strength = 0; -+ float gamma_correction_value = 1; -+ float gamma_correction_lt = 0; -+ FT_UInt checked_gamma_correction_value = 0; -+ -+ FT_Int brightness_value = 0.0; -+ FT_UInt checked_brightness_value = 0; -+ -+ FT_Int contrast_value = 0.0; -+ FT_UInt checked_contrast_value = 0; -+ -+ FT_Int snapping_sliding_scale_value = 0; -+ FT_UInt checked_snapping_sliding_scale_value = 0; -+ -+ FT_Int global_embolden_x_value = 0; -+ FT_UInt checked_global_embolden_x_value = 0; -+ -+ FT_Int global_embolden_y_value = 0; -+ FT_UInt checked_global_embolden_y_value = 0; -+ -+ FT_Int bold_embolden_x_value = 0; -+ FT_UInt checked_bold_embolden_x_value = 0; -+ -+ FT_Int bold_embolden_y_value = 0; -+ FT_UInt checked_bold_embolden_y_value = 0; -+ -+ FT_Byte chromeos_cutoff; -+ double chromeos_gamma_value; -+ -+ float embolden_value = 0.0; -+ FT_Bool autohinted = FALSE; -+ -+ FT_UInt autohint_minimum_stem_height = 0; -+ FT_UInt checked_autohint_minimum_stem_height = 0; -+ -+ int checked_use_various_tweaks_env = 0; -+ FT_Bool use_various_tweaks = FALSE; -+ -+ FT_Pos cur_width = infinality_cur_width; -+ -+ const FT_Int MIN_PPEM = 1; -+ /*const FT_Int MAX_PPEM = 100; */ -+ -+ int checked_use_known_settings_on_selected_fonts_env = 0; -+ FT_Bool use_known_settings_on_selected_fonts = FALSE; -+ -+ if ( slot->face && -+ slot->face->size && -+ slot->face->size->metrics.x_ppem ) -+ ppem = slot->face->size->metrics.x_ppem; -+ else -+ ppem = 0; -+ -+ if ( cur_width ) -+ { -+ autohinted = TRUE; -+ } -+ -+ if ( checked_use_known_settings_on_selected_fonts_env == 0 ) -+ { -+ char *use_known_settings_on_selected_fonts_env = -+ getenv( "INFINALITY_FT_USE_KNOWN_SETTINGS_ON_SELECTED_FONTS" ); -+ if ( use_known_settings_on_selected_fonts_env != NULL ) -+ { -+ if ( strcasecmp( use_known_settings_on_selected_fonts_env, -+ "default" ) != 0 ) -+ { -+ if ( strcasecmp( use_known_settings_on_selected_fonts_env, -+ "true" ) == 0 ) -+ use_known_settings_on_selected_fonts = TRUE; -+ else if ( strcasecmp( use_known_settings_on_selected_fonts_env, -+ "1" ) == 0 ) -+ use_known_settings_on_selected_fonts = TRUE; -+ else if ( strcasecmp( use_known_settings_on_selected_fonts_env, -+ "on" ) == 0 ) -+ use_known_settings_on_selected_fonts = TRUE; -+ else if ( strcasecmp( use_known_settings_on_selected_fonts_env, -+ "yes" ) == 0 ) -+ use_known_settings_on_selected_fonts = TRUE; -+ } -+ } -+ checked_use_known_settings_on_selected_fonts_env = 1; -+ } -+ -+ if ( checked_use_various_tweaks_env == 0 ) -+ { -+ char *use_various_tweaks_env -+ = getenv( "INFINALITY_FT_USE_VARIOUS_TWEAKS" ); -+ -+ if ( use_various_tweaks_env != NULL ) -+ { -+ if ( strcasecmp( use_various_tweaks_env, "default" ) != 0 ) -+ { -+ if ( strcasecmp( use_various_tweaks_env, "true") == 0) -+ use_various_tweaks = TRUE; -+ else if ( strcasecmp( use_various_tweaks_env, "1") == 0) -+ use_various_tweaks = TRUE; -+ else if ( strcasecmp( use_various_tweaks_env, "on") == 0) -+ use_various_tweaks = TRUE; -+ else if ( strcasecmp( use_various_tweaks_env, "yes") == 0) -+ use_various_tweaks = TRUE; -+ } -+ } -+ checked_use_various_tweaks_env = 1; -+ } -+ -+ if ( checked_autohint_minimum_stem_height == 0 ) -+ { -+ char *autohint_minimum_stem_height_env = -+ getenv( "INFINALITY_FT_AUTOHINT_MINIMUM_STEM_WIDTH" ); -+ -+ if ( autohint_minimum_stem_height_env != NULL ) -+ { -+ sscanf ( autohint_minimum_stem_height_env, "%u", -+ &autohint_minimum_stem_height ); -+ -+ if ( autohint_minimum_stem_height > 100 ) -+ autohint_minimum_stem_height = 100; -+ else if ( autohint_minimum_stem_height < 0 ) -+ autohint_minimum_stem_height = 0; -+ } -+ checked_autohint_minimum_stem_height = 1; -+ } -+ -+ if ( checked_snapping_sliding_scale_value == 0 ) -+ { -+ char *snapping_sliding_scale_env = -+ getenv ( "INFINALITY_FT_STEM_SNAPPING_SLIDING_SCALE" ); -+ -+ if ( snapping_sliding_scale_env != NULL ) -+ { -+ sscanf ( snapping_sliding_scale_env, "%d", -+ &snapping_sliding_scale_value ); -+ -+ if ( snapping_sliding_scale_value > MAX_PPEM ) -+ snapping_sliding_scale_value = 0; -+ else if ( snapping_sliding_scale_value < 0 ) -+ snapping_sliding_scale_value = 0; -+ -+ if (snapping_sliding_scale_value < 11 && -+ snapping_sliding_scale_value > 0 ) -+ snapping_sliding_scale_value = 11; -+ } -+ checked_snapping_sliding_scale_value = 1; -+ } -+ -+ if ( checked_alignment_strength == 0) -+ { -+ char *alignment_strength_env = -+ getenv ( "INFINALITY_FT_STEM_ALIGNMENT_STRENGTH" ); -+ -+ if ( alignment_strength_env != NULL ) -+ { -+ sscanf ( alignment_strength_env, "%d", &alignment_strength ); -+ -+ if ( alignment_strength > 100 ) -+ alignment_strength = 100; -+ else if ( alignment_strength < 0 ) -+ alignment_strength = 0; -+ } -+ -+ if ( alignment_strength > 100 ) -+ alignment_strength = 100; -+ checked_alignment_strength = 1; -+ -+ if ( snapping_sliding_scale_value != 0 ) -+ alignment_strength = sliding_scale -+ ( 10, snapping_sliding_scale_value, alignment_strength, 100, ppem ); -+ } -+ -+ if ( checked_fitting_strength == 0 ) -+ { -+ char *fitting_strength_env = -+ getenv( "INFINALITY_FT_STEM_FITTING_STRENGTH" ); -+ -+ if ( fitting_strength_env != NULL ) -+ { -+ sscanf ( fitting_strength_env, "%d", &fitting_strength ); -+ -+ if ( fitting_strength > 100 ) -+ fitting_strength = 100; -+ else if ( fitting_strength < 0 ) -+ fitting_strength = 0; -+ } -+ -+ if ( fitting_strength > 100 ) -+ fitting_strength = 100; -+ -+ checked_fitting_strength = 1; -+ -+ if ( snapping_sliding_scale_value != 0 ) -+ fitting_strength = sliding_scale -+ ( 10, snapping_sliding_scale_value, fitting_strength, 100, ppem ); -+ } -+ -+ if ( checked_chromeos_style_sharpening_strength == 0 ) -+ { -+ char *chromeos_style_sharpening_strength_env = -+ getenv( "INFINALITY_FT_CHROMEOS_STYLE_SHARPENING_STRENGTH" ); -+ if ( chromeos_style_sharpening_strength_env != NULL ) -+ { -+ sscanf ( chromeos_style_sharpening_strength_env, "%d", -+ &chromeos_style_sharpening_strength ); -+ -+ if ( chromeos_style_sharpening_strength > 100 ) -+ chromeos_style_sharpening_strength = 100; -+ else if ( chromeos_style_sharpening_strength < 0 ) -+ chromeos_style_sharpening_strength = 0; -+ } -+ -+ if ( ppem > 10 ) -+ chromeos_style_sharpening_strength = -+ ( chromeos_style_sharpening_strength * ppem ) / 10; -+ -+ if ( chromeos_style_sharpening_strength > 100 ) -+ chromeos_style_sharpening_strength = 100; -+ checked_chromeos_style_sharpening_strength = 1; -+ } -+ -+ -+ if ( checked_brightness_value == 0) -+ { -+ char *brightness_env = getenv( "INFINALITY_FT_BRIGHTNESS" ); -+ if ( brightness_env != NULL ) -+ { -+ sscanf ( brightness_env, "%d", &brightness_value ); -+ if (brightness_value > 100 ) -+ brightness_value = 100; -+ else if (brightness_value < -100 ) -+ brightness_value = 0; -+ } -+ checked_brightness_value = 1; -+ } -+ -+ if ( checked_contrast_value == 0) -+ { -+ char *contrast_env = getenv( "INFINALITY_FT_CONTRAST" ); -+ if ( contrast_env != NULL ) -+ { -+ sscanf ( contrast_env, "%d", &contrast_value ); -+ if (contrast_value > 100 ) -+ contrast_value = 100; -+ else if (contrast_value < -100 ) -+ contrast_value = 100; -+ } -+ checked_contrast_value = 1; -+ } -+ -+ if ( checked_windows_style_sharpening_strength == 0) -+ { -+ char *windows_style_sharpening_strength_env = -+ getenv( "INFINALITY_FT_WINDOWS_STYLE_SHARPENING_STRENGTH" ); -+ -+ if ( windows_style_sharpening_strength_env != NULL ) -+ { -+ sscanf ( windows_style_sharpening_strength_env, "%d", -+ &windows_style_sharpening_strength ); -+ -+ if ( windows_style_sharpening_strength > 100 ) -+ windows_style_sharpening_strength = 100; -+ else if ( windows_style_sharpening_strength < 0 ) -+ windows_style_sharpening_strength = 0; -+ } -+ /* Decrease effect slightly to have a more linear increase in sharpness */ -+ windows_style_sharpening_strength = -+ ( ( windows_style_sharpening_strength -+ * windows_style_sharpening_strength ) / 100 -+ + windows_style_sharpening_strength ) / 2; -+ checked_windows_style_sharpening_strength = 1; -+ } -+ -+ if ( checked_gamma_correction_value == 0 ) -+ { -+ char *gamma_correction_value_env = -+ getenv( "INFINALITY_FT_GAMMA_CORRECTION" ); -+ -+ if ( gamma_correction_value_env != NULL ) -+ { -+ float f1, f2; -+ -+ if ( strcasecmp( gamma_correction_value_env, "default" ) != 0 ) -+ { -+ sscanf ( gamma_correction_value_env, "%f %f", &f1, &f2 ); -+ gamma_correction_lt = f1; -+ gamma_correction_value = f2 / 100.0; -+ } -+ if ( gamma_correction_value < .01 ) gamma_correction_value = 1.0; -+ } -+ checked_gamma_correction_value = 1; -+ } -+ -+ /* set gamma value to 1 if out of range */ -+ if ( slot->face && -+ slot->face->size && -+ slot->face->size->metrics.x_ppem ) -+ { -+ if ( slot->face->size->metrics.x_ppem >= gamma_correction_lt ) -+ gamma_correction_value = 1; -+ } -+ else -+ gamma_correction_value = 1; -+ -+ -+ if ( checked_fringe_filter_strength == 0 ) -+ { -+ char *fringe_filter_strength_env = -+ getenv( "INFINALITY_FT_FRINGE_FILTER_STRENGTH" ); -+ if ( fringe_filter_strength_env != NULL ) -+ { -+ sscanf ( fringe_filter_strength_env, "%d", &fringe_filter_strength ); -+ -+ if ( fringe_filter_strength > 100 ) -+ fringe_filter_strength = 100; -+ else if ( fringe_filter_strength < 0 ) -+ fringe_filter_strength = 0; -+ } -+ checked_fringe_filter_strength = 1; -+ } -+ -+ -+ if ( checked_grayscale_filter_strength == 0) -+ { -+ char *grayscale_filter_strength_env = -+ getenv( "INFINALITY_FT_GRAYSCALE_FILTER_STRENGTH" ); -+ if ( grayscale_filter_strength_env != NULL ) -+ { -+ sscanf ( grayscale_filter_strength_env, "%d", -+ &grayscale_filter_strength ); -+ if ( grayscale_filter_strength > 100 ) grayscale_filter_strength = 100; -+ else if (grayscale_filter_strength < 0 ) grayscale_filter_strength = 0; -+ } -+ checked_grayscale_filter_strength = 1; -+ } -+ -+ -+ if ( checked_autohint_horizontal_stem_darken_strength == 0) -+ { -+ char *autohint_horizontal_stem_darken_strength_env = -+ getenv( "INFINALITY_FT_AUTOHINT_HORIZONTAL_STEM_DARKEN_STRENGTH" ); -+ if ( autohint_horizontal_stem_darken_strength_env != NULL ) -+ { -+ sscanf ( autohint_horizontal_stem_darken_strength_env, "%d", -+ &autohint_horizontal_stem_darken_strength ); -+ -+ if ( autohint_horizontal_stem_darken_strength > 100 ) -+ autohint_horizontal_stem_darken_strength = 100; -+ else if ( autohint_horizontal_stem_darken_strength < 0 ) -+ autohint_horizontal_stem_darken_strength = 0; -+ } -+ checked_autohint_horizontal_stem_darken_strength = 1; -+ } -+ -+ if ( checked_autohint_vertical_stem_darken_strength == 0) -+ { -+ char *autohint_vertical_stem_darken_strength_env = -+ getenv( "INFINALITY_FT_AUTOHINT_VERTICAL_STEM_DARKEN_STRENGTH" ); -+ if ( autohint_vertical_stem_darken_strength_env != NULL ) -+ { -+ sscanf ( autohint_vertical_stem_darken_strength_env, "%d", -+ &autohint_vertical_stem_darken_strength ); -+ -+ if ( autohint_vertical_stem_darken_strength > 100 ) -+ autohint_vertical_stem_darken_strength = 100; -+ else if ( autohint_horizontal_stem_darken_strength < 0 ) -+ autohint_vertical_stem_darken_strength = 0; -+ } -+ checked_autohint_vertical_stem_darken_strength = 1; -+ } -+ -+ if ( checked_global_embolden_x_value == 0) -+ { -+ char *global_embolden_x_env = -+ getenv ( "INFINALITY_FT_GLOBAL_EMBOLDEN_X_VALUE" ); -+ if ( global_embolden_x_env != NULL ) -+ { -+ sscanf ( global_embolden_x_env, "%d", &global_embolden_x_value ); -+ -+ if ( global_embolden_x_value > 128 ) -+ global_embolden_x_value = 128; -+ else if ( global_embolden_x_value < -128 ) -+ global_embolden_x_value = -128; -+ } -+ checked_global_embolden_x_value = 1; -+ } -+ -+ if ( checked_global_embolden_y_value == 0) -+ { -+ char *global_embolden_y_env = -+ getenv ( "INFINALITY_FT_GLOBAL_EMBOLDEN_Y_VALUE" ); -+ if ( global_embolden_y_env != NULL ) -+ { -+ sscanf ( global_embolden_y_env, "%d", &global_embolden_y_value ); -+ if ( global_embolden_y_value > 128 ) -+ global_embolden_y_value = 128; -+ else if ( global_embolden_y_value < -128 ) -+ global_embolden_y_value = -128; -+ } -+ checked_global_embolden_y_value = 1; -+ } -+ -+ -+ if ( checked_bold_embolden_x_value == 0) -+ { -+ char *bold_embolden_x_env = -+ getenv ( "INFINALITY_FT_BOLD_EMBOLDEN_X_VALUE" ); -+ -+ if ( bold_embolden_x_env != NULL ) -+ { -+ sscanf ( bold_embolden_x_env, "%d", &bold_embolden_x_value ); -+ if (bold_embolden_x_value > 128 ) -+ bold_embolden_x_value = 128; -+ else if (bold_embolden_x_value < -128 ) -+ bold_embolden_x_value = -128; -+ } -+ checked_bold_embolden_x_value = 1; -+ } -+ -+ if ( checked_bold_embolden_y_value == 0) -+ { -+ char *bold_embolden_y_env = getenv ( "INFINALITY_FT_BOLD_EMBOLDEN_Y_VALUE" ); -+ -+ if ( bold_embolden_y_env != NULL ) -+ { -+ sscanf ( bold_embolden_y_env, "%d", &bold_embolden_y_value ); -+ if (bold_embolden_y_value > 128 ) -+ bold_embolden_y_value = 128; -+ else if (bold_embolden_y_value < -128 ) -+ bold_embolden_y_value = -128; -+ } -+ checked_bold_embolden_y_value = 1; -+ } -+ -+ if( use_various_tweaks && -+ slot->face && -+ slot->face->style_name ) -+ { -+ /* needs to also check for artifical italics */ -+ if ( strcasestr(slot->face->style_name, "Italic" ) || -+ strcasestr(slot->face->style_name, "Oblique" ) ) -+ { -+ windows_style_sharpening_strength = 0; -+ chromeos_style_sharpening_strength = 0; -+ } -+ } -+ -+ /*if (fitting_strength == 100) scale_value = 1.1;*/ -+ -+#endif - - /* check glyph image format */ - if ( slot->format != render->glyph_format ) -@@ -138,9 +3610,105 @@ - goto Exit; - } - -+#ifdef FT_CONFIG_OPTION_INFINALITY_PATCHSET -+RERENDER: -+ if ( align_called == 1 ) -+ { -+ scaleMat.xx = FT_FixedFromFloat(scale_value); -+ scaleMat.xy = 0; -+ scaleMat.yx = 0; -+ scaleMat.yy = ( 1 << 16 ); -+ -+ FT_Outline_Copy(outline_orig, outline); -+ -+ if ( scale_value != 1.0 ) -+ FT_Outline_Transform( outline, &scaleMat ); -+ -+ FT_Outline_Translate( outline, translate_value, 0 ); -+ -+ FT_Outline_EmboldenXY( outline, embolden_value, 0 ); -+ } -+ else -+ { -+#endif - outline = &slot->outline; -+#ifdef FT_CONFIG_OPTION_INFINALITY_PATCHSET -+ /* Need to get this PRIOR to embolden, otherwise bad things happen */ -+ FT_Outline_Get_CBox( outline, &cbox ); -+ -+ /* Various hacks that need to be turned into a new rule set */ -+ /*if ( !autohinted -+ && use_known_settings_on_selected_fonts -+ && mode == FT_RENDER_MODE_LCD -+ && slot->face->family_name -+ && slot->face->style_name -+ && ( strcasestr(slot->face->family_name, "Courier New" ) -+ && ( strcasestr(slot->face->style_name, "Regular" ) -+ || strcasestr(slot->face->style_name, "Italic" ) ) ) ) -+ FT_Outline_Embolden( outline, 24 );*/ -+ -+ if ( slot->face ) -+ { -+ if ( !autohinted && -+ use_known_settings_on_selected_fonts && -+ mode == FT_RENDER_MODE_LCD && -+ slot->face->family_name && -+ slot->face->style_name && -+ strcasestr( slot->face->family_name, "Times New Roman" ) && -+ strcasestr( slot->face->style_name, "Italic" ) ) -+ FT_Outline_EmboldenXY( outline, 12, 0 ); -+ -+ if ( use_known_settings_on_selected_fonts && -+ autohinted && -+ mode == FT_RENDER_MODE_LCD && -+ slot->face->family_name && -+ slot->face->style_name && -+ strcasestr(slot->face->family_name, "FreeSerif" ) && -+ strcasestr(slot->face->style_name, "Italic" ) ) -+ FT_Outline_EmboldenXY( outline, 8, 0 ); -+ -+ if ( global_embolden_x_value != 0 || global_embolden_y_value != 0 ) -+ FT_Outline_EmboldenXY( outline, -+ global_embolden_x_value, -+ global_embolden_y_value ); -+ -+ if ( ( bold_embolden_x_value != 0 || bold_embolden_y_value != 0 ) && -+ ( slot->face->style_name && -+ ( strcasestr(slot->face->style_name, "Bold" ) || -+ strcasestr(slot->face->style_name, "Black" ) || -+ ( slot->face->style_flags && -+ slot->face->style_flags & FT_STYLE_FLAG_BOLD ) ) ) ) -+ FT_Outline_EmboldenXY( outline, -+ bold_embolden_x_value, -+ bold_embolden_y_value ); -+ } -+ -+ FT_Outline_Copy( outline, outline_orig ); -+ } - - /* translate the outline to the new origin if needed */ -+ if ( align_called == 0 ) -+ { -+ FT_Pos enlarge_cbox = 0; -+ -+ /* enlarge for grayscale rendering */ -+ if ( mode == FT_RENDER_MODE_NORMAL ) -+ enlarge_cbox = 64; -+ -+ if ( origin ) -+ { -+ FT_Outline_Translate( outline, origin->x, origin->y ); -+ have_translated_origin = TRUE; -+ } -+ -+ /* compute the control box, and grid fit it */ -+ /*FT_Outline_Get_CBox( outline, &cbox );*/ -+ -+ cbox.xMin = FT_PIX_FLOOR( cbox.xMin - enlarge_cbox ); -+ cbox.yMin = FT_PIX_FLOOR( cbox.yMin ); -+ cbox.xMax = FT_PIX_CEIL( cbox.xMax + enlarge_cbox ); -+ cbox.yMax = FT_PIX_CEIL( cbox.yMax ); -+#else - if ( origin ) - { - FT_Outline_Translate( outline, origin->x, origin->y ); -@@ -154,6 +3722,7 @@ - cbox.yMin = FT_PIX_FLOOR( cbox.yMin ); - cbox.xMax = FT_PIX_CEIL( cbox.xMax ); - cbox.yMax = FT_PIX_CEIL( cbox.yMax ); -+#endif - - width = (FT_ULong)( cbox.xMax - cbox.xMin ) >> 6; - height = (FT_ULong)( cbox.yMax - cbox.yMin ) >> 6; -@@ -208,6 +3777,9 @@ - y_top += extra >> 1; - } - } -+#endif -+#ifdef FT_CONFIG_OPTION_INFINALITY_PATCHSET -+ } - - #endif - -@@ -228,8 +3800,15 @@ - bitmap->pitch = pitch; - - /* translate outline to render it into the bitmap */ -+#ifdef FT_CONFIG_OPTION_INFINALITY_PATCHSET -+ if ( align_called == 0 ) -+ { -+#endif - FT_Outline_Translate( outline, -x_shift, -y_shift ); - have_outline_shifted = TRUE; -+#ifdef FT_CONFIG_OPTION_INFINALITY_PATCHSET -+ } -+#endif - - if ( FT_ALLOC( bitmap->buffer, (FT_ULong)pitch * height ) ) - goto Exit; -@@ -283,9 +3862,153 @@ - if ( error ) - goto Exit; - -+#ifdef FT_CONFIG_OPTION_INFINALITY_PATCHSET -+ if ( ppem <= MAX_PPEM && ppem >= MIN_PPEM ) -+ { -+ if ( align_called == 0 && cur_width / ppem < 10 && -+ ( alignment_strength > 0 || fitting_strength > 0 ) ) -+ _lcd_stem_align ( bitmap, -+ mode, -+ slot, -+ &translate_value, -+ &scale_value, -+ alignment_strength, -+ fitting_strength, -+ &embolden_value ); -+ -+ if ( align_called == 0 && -+ ( translate_value != 0 || scale_value != 1.0 ) ) -+ { -+ align_called = 1; -+ goto RERENDER; -+ } -+ -+ if ( mode == FT_RENDER_MODE_LCD ) -+ { -+ -+ if ( fringe_filter_strength > 0 /*&& autohinted*/ ) -+ _ft_lcd_fringe_filter( bitmap, -+ mode, -+ fringe_filter_strength, -+ slot->library ); -+ -+ /*if ( autohinted) -+ _ft_lcd_stem_end_filter( bitmap, mode, 100, slot->library );*/ -+ -+ if ( gamma_correction_lt > 0 && gamma_correction_value != 1.0 ) -+ _ft_lcd_gamma_correction_correction( bitmap, -+ mode, -+ slot, -+ gamma_correction_lt, -+ gamma_correction_value ); -+ -+ chromeos_cutoff = (FT_Byte)( 0.5 * 255.0 ) -+ * ( chromeos_style_sharpening_strength / 100.0 ); -+ chromeos_gamma_value = 1; -+ -+ if ( chromeos_style_sharpening_strength > 0 ) -+ _ft_lcd_chromeos_sharpen( bitmap, -+ mode, -+ chromeos_cutoff, -+ chromeos_gamma_value ); -+ -+ if ( ppem > 8 ) -+ if ( windows_style_sharpening_strength > 0 ) -+ _ft_lcd_windows_sharpen( bitmap, -+ mode, -+ windows_style_sharpening_strength, -+ slot->library ); -+ -+ if ( autohinted && -+ ( cur_width * 100 ) / 64 -+ > autohint_horizontal_stem_darken_strength && -+ autohint_horizontal_stem_darken_strength != 0 ) -+ autohint_horizontal_stem_darken_strength = ( cur_width * 100 ) / 64; -+ -+ if ( autohint_horizontal_stem_darken_strength > 100) -+ autohint_horizontal_stem_darken_strength = 100; -+ -+ /* only do on autohinted fonts */ -+ /* Necessary to do on some non-thin fonts, which is why it is outside */ -+ /* of the below conditional */ -+ if ( autohint_horizontal_stem_darken_strength > 0 && autohinted ) -+ _ft_lcd_darken_x ( bitmap, -+ mode, -+ autohint_horizontal_stem_darken_strength, -+ slot->library ); -+ -+ /* Enhance thin fonts */ -+ if ( autohinted ) -+ { -+ /* if forcibly set use that, otherwise make a good estimate */ -+ if ( slot->face && !_ft_bitmap_bc ( bitmap, -+ (float)get_brightness( slot->face->family_name, ppem ) / 300.0, -+ (float)get_contrast( slot->face->family_name, ppem ) / 300.0 ) ) -+ { -+ FT_Bool is_fixed_name = FALSE; -+ -+ if ( slot->face->family_name && -+ strcasestr(slot->face->family_name, "Mono" ) ) -+ is_fixed_name = TRUE; -+ -+ /* Darken vertical stems */ -+ _ft_lcd_darken_y ( bitmap, -+ mode, -+ autohint_vertical_stem_darken_strength, -+ slot->library ); -+ -+ /* Adjust brightness / contrast automatically based on stem width */ -+ if ( cur_width != 0 && cur_width < 30 ) -+ cur_width = 30; -+ -+ if ( cur_width >= 30 && cur_width <= 60 ) -+ { -+ float ppem_factor = sliding_scale ( 5, 11, 0.0, 1.0, ppem ); -+ float brightness_factor = sliding_scale ( 30, 52, -.3, 0.0, -+ cur_width ); -+ float contrast_factor = sliding_scale ( 30, 52, .45, 0.0, -+ cur_width ); -+ _ft_bitmap_bc ( bitmap, -+ ppem_factor * brightness_factor, -+ ppem_factor * contrast_factor ); -+ -+ /* Only cap variable width thin-stemmed fonts */ -+ if ( !FT_IS_FIXED_WIDTH( slot->face ) && !is_fixed_name ) -+ _ft_bitmap_cap ( bitmap, -+ ( cur_width * 150 ) / 64, -+ slot->library ); -+ } -+ } -+ } -+ -+ -+ if ( slot->library->lcd_filter_func ) -+ slot->library->lcd_filter_func( bitmap, mode, slot->library ); -+ -+ if ( grayscale_filter_strength > 0 ) -+ _ft_lcd_grayscale_filter( bitmap, -+ mode, -+ grayscale_filter_strength, -+ slot->library ); -+ -+ } -+ -+ /* Global values */ -+ if ( brightness_value != 0 || contrast_value != 0 ) -+ _ft_bitmap_bc ( bitmap, -+ (float)brightness_value / 300.0, -+ (float)contrast_value / 300.0); -+ -+ FT_Outline_Done( slot->library, outline_orig ); -+ } -+ else if ( mode == FT_RENDER_MODE_LCD && -+ slot->library->lcd_filter_func ) -+ slot->library->lcd_filter_func( bitmap, mode, slot->library ); -+#else - if ( slot->library->lcd_filter_func ) - slot->library->lcd_filter_func( bitmap, mode, slot->library ); - -+#endif /* FT_CONFIG_OPTION_INFINALITY_PATCHSET */ - #else /* !FT_CONFIG_OPTION_SUBPIXEL_RENDERING */ - - /* render outline into bitmap */ ---- 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 @@ - - #define AF_LATIN_MAX_WIDTHS 16 - -+#ifdef FT_CONFIG_OPTION_INFINALITY_PATCHSET -+ extern FT_Pos infinality_cur_width; -+#endif - - enum - { diff --git a/testing/freetype-infinality/APKBUILD b/testing/freetype-infinality/APKBUILD deleted file mode 100644 index df237a1998..0000000000 --- a/testing/freetype-infinality/APKBUILD +++ /dev/null @@ -1,74 +0,0 @@ -# Contributor: Carlo Landmeter <clandmeter@gmail.com> -# Maintainer: -pkgname=freetype-infinality -pkgver=2.5.5 -pkgrel=1 -pkgdesc="TrueType font rendering library with infinality patch" -url="http://www.infinality.net/blog/infinality-freetype-patches/" -arch="all" -license="GPL" -depends="" -depends_dev="libpng-dev" -makedepends="$depends_dev zlib-dev" -install="" -replaces="freetype" -subpackages="$pkgname-dev" -source="http://downloads.sourceforge.net/sourceforge/freetype/freetype-${pkgver}.tar.bz2 - 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 - -prepare() { - local i - cd "$_builddir" - for i in $source; do - case $i in - *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; - esac - done -} - -build() { - cd "$_builddir" - ./configure \ - --build=$CBUILD \ - --host=$CHOST \ - --prefix=/usr \ - --sysconfdir=/etc \ - --mandir=/usr/share/man \ - --infodir=/usr/share/info \ - --localstatedir=/var \ - || return 1 - make || return 1 -} - -package() { - cd "$_builddir" - make DESTDIR="$pkgdir" install || return 1 - install -D "${srcdir}/infinality-settings.sh" \ - "${pkgdir}/etc/profile.d/infinality-settings.sh" || return 1 - rm -f "$pkgdir"/usr/lib/*.la -} - -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 deleted file mode 100644 index f293c652ea..0000000000 --- a/testing/freetype-infinality/infinality-settings.sh +++ /dev/null @@ -1,48 +0,0 @@ -### freetype2-infinality-ultimate settings ### -### rev. 0.4.8.3, for freetype2 v.2.5.x ### -### ### -### Copyright (c) 2014 bohoomil ### -### The MIT License (MIT) http://opensource.org/licenses/MIT ### -### part of infinality-bundle http://bohoomil.com ### - - -XFT_SETTINGS=" -Xft.antialias: 1 -Xft.autohint: 0 -Xft.dpi: 96 -Xft.hinting: 1 -Xft.hintstyle: hintfull -Xft.lcdfilter: lcddefault -Xft.rgba: rgb -" - -echo "$XFT_SETTINGS" | xrdb -merge > /dev/null 2>&1 - -### Available styles: -### 1 <> extra sharp -### 2 <> sharper & lighter ultimate -### 3 <> ultimate: well balanced (default) -### 4 <> darker & smoother -### 5 <> darkest & heaviest ("MacIsh") - -USE_STYLE="3" - -if [ "$USE_STYLE" = "1" ]; then - export INFINALITY_FT_FILTER_PARAMS="04 22 38 22 04" -elif [ "$USE_STYLE" = "2" ]; then - export INFINALITY_FT_FILTER_PARAMS="06 22 36 22 06" -elif [ "$USE_STYLE" = "3" ]; then - export INFINALITY_FT_FILTER_PARAMS="08 24 36 24 08" -elif [ "$USE_STYLE" = "4" ]; then - export INFINALITY_FT_FILTER_PARAMS="10 25 37 25 10" -elif [ "$USE_STYLE" = "5" ]; then - export INFINALITY_FT_FILTER_PARAMS="12 28 42 28 12" -fi - -export INFINALITY_FT_FRINGE_FILTER_STRENGTH="25" -export INFINALITY_FT_USE_VARIOUS_TWEAKS="true" -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: |