[truetype, type1] Add `done_blend' to MM service. For internal use; we want to share code between the forthcoming CFF2 support and TrueType. * include/freetype/internal/services/svmm.h (FT_Done_Blend_Func): New typedef. (MultiMasters): Add `done_blend'. (FT_Service_MultiMasters): Updated. * src/truetype/ttgxvar.c (tt_done_blend): Use `TT_Face' as argument. * src/truetype/ttgxvar.h: Updated. * src/truetype/ttobjs.c (TT_Face_Done): Updated. * src/truetype/ttdriver.c (tt_service_gx_multi_masters): Updated. * src/type1/t1driver.c (t1_service_multi_masters): Updated.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166
diff --git a/ChangeLog b/ChangeLog
index d67fc71..37478d6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,23 @@
+2016-12-10 Werner Lemberg <wl@gnu.org>
+
+ [truetype, type1] Add `done_blend' to MM service.
+
+ For internal use; we want to share code between the forthcoming CFF2
+ support and TrueType.
+
+ * include/freetype/internal/services/svmm.h (FT_Done_Blend_Func):
+ New typedef.
+ (MultiMasters): Add `done_blend'.
+ (FT_Service_MultiMasters): Updated.
+
+ * src/truetype/ttgxvar.c (tt_done_blend): Use `TT_Face' as argument.
+ * src/truetype/ttgxvar.h: Updated.
+
+ * src/truetype/ttobjs.c (TT_Face_Done): Updated.
+
+ * src/truetype/ttdriver.c (tt_service_gx_multi_masters): Updated.
+ * src/type1/t1driver.c (t1_service_multi_masters): Updated.
+
2016-12-09 Werner Lemberg <wl@gnu.org>
[sfnt] Revert change from 2016-12-08.
diff --git a/include/freetype/internal/services/svmm.h b/include/freetype/internal/services/svmm.h
index e4d34ba..51bce40 100644
--- a/include/freetype/internal/services/svmm.h
+++ b/include/freetype/internal/services/svmm.h
@@ -68,6 +68,9 @@ FT_BEGIN_HEADER
FT_UInt num_coords,
FT_Long* coords );
+ typedef void
+ (*FT_Done_Blend_Func)( FT_Face );
+
FT_DEFINE_SERVICE( MultiMasters )
{
@@ -78,6 +81,9 @@ FT_BEGIN_HEADER
FT_Get_MM_Var_Func get_mm_var;
FT_Set_Var_Design_Func set_var_design;
FT_Get_Var_Design_Func get_var_design;
+
+ /* for internal use; only needed for code sharing between modules */
+ FT_Done_Blend_Func done_blend;
};
@@ -90,7 +96,8 @@ FT_BEGIN_HEADER
get_mm_blend_, \
get_mm_var_, \
set_var_design_, \
- get_var_design_ ) \
+ get_var_design_, \
+ done_blend_ ) \
static const FT_Service_MultiMastersRec class_ = \
{ \
get_mm_, \
@@ -99,7 +106,8 @@ FT_BEGIN_HEADER
get_mm_blend_, \
get_mm_var_, \
set_var_design_, \
- get_var_design_ \
+ get_var_design_, \
+ done_blend_ \
};
#else /* FT_CONFIG_OPTION_PIC */
@@ -111,7 +119,8 @@ FT_BEGIN_HEADER
get_mm_blend_, \
get_mm_var_, \
set_var_design_, \
- get_var_design_ ) \
+ get_var_design_, \
+ done_blend_ ) \
void \
FT_Init_Class_ ## class_( FT_Service_MultiMastersRec* clazz ) \
{ \
@@ -122,6 +131,7 @@ FT_BEGIN_HEADER
clazz->get_mm_var = get_mm_var_; \
clazz->set_var_design = set_var_design_; \
clazz->get_var_design = get_var_design_; \
+ clazz->done_blend = done_blend_; \
}
#endif /* FT_CONFIG_OPTION_PIC */
diff --git a/src/truetype/ttdriver.c b/src/truetype/ttdriver.c
index 886f7a0..b7713d0 100644
--- a/src/truetype/ttdriver.c
+++ b/src/truetype/ttdriver.c
@@ -473,7 +473,9 @@
(FT_Get_MM_Blend_Func) TT_Get_MM_Blend, /* get_mm_blend */
(FT_Get_MM_Var_Func) TT_Get_MM_Var, /* get_mm_var */
(FT_Set_Var_Design_Func)TT_Set_Var_Design, /* set_var_design */
- (FT_Get_Var_Design_Func)TT_Get_Var_Design /* get_var_design */
+ (FT_Get_Var_Design_Func)TT_Get_Var_Design, /* get_var_design */
+
+ (FT_Done_Blend_Func) tt_done_blend /* done_blend */
)
#endif
diff --git a/src/truetype/ttgxvar.c b/src/truetype/ttgxvar.c
index 461369f..212358c 100644
--- a/src/truetype/ttgxvar.c
+++ b/src/truetype/ttgxvar.c
@@ -2242,9 +2242,12 @@
/* Free the blend internal data structure. */
/* */
FT_LOCAL_DEF( void )
- tt_done_blend( FT_Memory memory,
- GX_Blend blend )
+ tt_done_blend( TT_Face face )
{
+ FT_Memory memory = FT_FACE_MEMORY( face );
+ GX_Blend blend = face->blend;
+
+
if ( blend != NULL )
{
FT_UInt i, num_axes;
diff --git a/src/truetype/ttgxvar.h b/src/truetype/ttgxvar.h
index dd13bd8..f3fcfc7 100644
--- a/src/truetype/ttgxvar.h
+++ b/src/truetype/ttgxvar.h
@@ -180,8 +180,7 @@ FT_BEGIN_HEADER
FT_LOCAL( void )
- tt_done_blend( FT_Memory memory,
- GX_Blend blend );
+ tt_done_blend( TT_Face face );
FT_END_HEADER
diff --git a/src/truetype/ttobjs.c b/src/truetype/ttobjs.c
index 3e60b55..758eaeb 100644
--- a/src/truetype/ttobjs.c
+++ b/src/truetype/ttobjs.c
@@ -739,7 +739,7 @@
face->cvt_program_size = 0;
#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
- tt_done_blend( memory, face->blend );
+ tt_done_blend( face );
face->blend = NULL;
#endif
}
diff --git a/src/type1/t1driver.c b/src/type1/t1driver.c
index 639d7c0..ad46371 100644
--- a/src/type1/t1driver.c
+++ b/src/type1/t1driver.c
@@ -125,7 +125,9 @@
(FT_Get_MM_Blend_Func) T1_Get_MM_Blend, /* get_mm_blend */
(FT_Get_MM_Var_Func) T1_Get_MM_Var, /* get_mm_var */
(FT_Set_Var_Design_Func)T1_Set_Var_Design, /* set_var_design */
- (FT_Get_Var_Design_Func)T1_Get_Var_Design /* get_var_design */
+ (FT_Get_Var_Design_Func)T1_Get_Var_Design, /* get_var_design */
+
+ (FT_Done_Blend_Func) T1_Done_Blend /* done_blend */
};
#endif