[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.
This commit is contained in:
Werner Lemberg 2016-12-10 09:56:03 +01:00
parent 3205a44d01
commit 27bdb36cbe
7 changed files with 46 additions and 10 deletions

View File

@ -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.

View File

@ -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 */

View File

@ -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

View File

@ -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;

View File

@ -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

View File

@ -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
}

View File

@ -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