[truetype, type1] Add `get_var_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_Get_Var_Blend_Func): New typedef. (MultiMasters): Add `get_var_blend'. (FT_Service_MultiMasters): Updated. * src/truetype/ttgxvar.c (tt_get_var_blend): New function. * src/truetype/ttgxvar.h: 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:
parent
27bdb36cbe
commit
8b174b4b96
18
ChangeLog
18
ChangeLog
|
@ -1,3 +1,21 @@
|
|||
2016-12-10 Werner Lemberg <wl@gnu.org>
|
||||
|
||||
[truetype, type1] Add `get_var_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_Get_Var_Blend_Func):
|
||||
New typedef.
|
||||
(MultiMasters): Add `get_var_blend'.
|
||||
(FT_Service_MultiMasters): Updated.
|
||||
|
||||
* src/truetype/ttgxvar.c (tt_get_var_blend): New function.
|
||||
* src/truetype/ttgxvar.h: Updated.
|
||||
|
||||
* src/truetype/ttdriver.c (tt_service_gx_multi_masters): Updated.
|
||||
* src/type1/t1driver.c (t1_service_multi_masters): Updated.
|
||||
|
||||
2016-12-10 Werner Lemberg <wl@gnu.org>
|
||||
|
||||
[truetype, type1] Add `done_blend' to MM service.
|
||||
|
|
|
@ -68,6 +68,11 @@ FT_BEGIN_HEADER
|
|||
FT_UInt num_coords,
|
||||
FT_Long* coords );
|
||||
|
||||
typedef FT_Error
|
||||
(*FT_Get_Var_Blend_Func)( FT_Face face,
|
||||
FT_UInt *num_coords,
|
||||
FT_Fixed* *coords );
|
||||
|
||||
typedef void
|
||||
(*FT_Done_Blend_Func)( FT_Face );
|
||||
|
||||
|
@ -83,6 +88,7 @@ FT_BEGIN_HEADER
|
|||
FT_Get_Var_Design_Func get_var_design;
|
||||
|
||||
/* for internal use; only needed for code sharing between modules */
|
||||
FT_Get_Var_Blend_Func get_var_blend;
|
||||
FT_Done_Blend_Func done_blend;
|
||||
};
|
||||
|
||||
|
@ -97,6 +103,7 @@ FT_BEGIN_HEADER
|
|||
get_mm_var_, \
|
||||
set_var_design_, \
|
||||
get_var_design_, \
|
||||
get_var_blend_, \
|
||||
done_blend_ ) \
|
||||
static const FT_Service_MultiMastersRec class_ = \
|
||||
{ \
|
||||
|
@ -107,6 +114,7 @@ FT_BEGIN_HEADER
|
|||
get_mm_var_, \
|
||||
set_var_design_, \
|
||||
get_var_design_, \
|
||||
get_var_blend_, \
|
||||
done_blend_ \
|
||||
};
|
||||
|
||||
|
@ -120,6 +128,7 @@ FT_BEGIN_HEADER
|
|||
get_mm_var_, \
|
||||
set_var_design_, \
|
||||
get_var_design_, \
|
||||
get_var_blend_, \
|
||||
done_blend_ ) \
|
||||
void \
|
||||
FT_Init_Class_ ## class_( FT_Service_MultiMastersRec* clazz ) \
|
||||
|
@ -131,6 +140,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->get_var_blend = get_var_blend_; \
|
||||
clazz->done_blend = done_blend_; \
|
||||
}
|
||||
|
||||
|
|
|
@ -475,6 +475,7 @@
|
|||
(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_Blend_Func) tt_get_var_blend, /* get_var_blend */
|
||||
(FT_Done_Blend_Func) tt_done_blend /* done_blend */
|
||||
)
|
||||
#endif
|
||||
|
|
|
@ -2233,6 +2233,39 @@
|
|||
}
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Function> */
|
||||
/* tt_get_var_blend */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* An internal version of `TT_Get_MM_Blend' that just returns */
|
||||
/* pointers instead of copying data, without any initialization of */
|
||||
/* the MM machinery in case it isn't loaded yet. */
|
||||
/* */
|
||||
FT_LOCAL_DEF( FT_Error )
|
||||
tt_get_var_blend( TT_Face face,
|
||||
FT_UInt *num_coords,
|
||||
FT_Fixed* *coords )
|
||||
{
|
||||
FT_Error error = FT_Err_Ok;
|
||||
|
||||
|
||||
if ( face->blend )
|
||||
{
|
||||
*num_coords = face->blend->num_axis;
|
||||
*coords = face->blend->normalizedcoords;
|
||||
}
|
||||
else
|
||||
{
|
||||
*num_coords = 0;
|
||||
*coords = NULL;
|
||||
}
|
||||
|
||||
return FT_Err_Ok;
|
||||
}
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Function> */
|
||||
|
|
|
@ -179,6 +179,11 @@ FT_BEGIN_HEADER
|
|||
FT_UInt n_points );
|
||||
|
||||
|
||||
FT_LOCAL( FT_Error )
|
||||
tt_get_var_blend( TT_Face face,
|
||||
FT_UInt *num_coords,
|
||||
FT_Fixed* *coords );
|
||||
|
||||
FT_LOCAL( void )
|
||||
tt_done_blend( TT_Face face );
|
||||
|
||||
|
|
|
@ -127,6 +127,7 @@
|
|||
(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_Blend_Func) NULL, /* get_var_blend */
|
||||
(FT_Done_Blend_Func) T1_Done_Blend /* done_blend */
|
||||
};
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue