[truetype, cff] Extend `get_var_blend' function of MM service.
In particular, we need access to named instance data. * include/freetype/internal/services/svmm.h (FT_Get_Var_Blend_Func): Add argument for `FT_MM_Var'. * src/cff/cffload.c (cff_get_var_blend): Updated. * src/cff/cffload.h: Updated. * src/cff/cf2ft.c (cf2_getNormalizedVector): Updated. * src/truetype/ttgxvar.c (tt_get_var_blend): Updated. Accept value `NULL' for arguments. * src/truetype/ttgxvar.h: Updated.
This commit is contained in:
parent
25f3ac2b9e
commit
a8652c59da
18
ChangeLog
18
ChangeLog
|
@ -1,3 +1,21 @@
|
||||||
|
2016-12-18 Werner Lemberg <wl@gnu.org>
|
||||||
|
|
||||||
|
[truetype, cff] Extend `get_var_blend' function of MM service.
|
||||||
|
|
||||||
|
In particular, we need access to named instance data.
|
||||||
|
|
||||||
|
* include/freetype/internal/services/svmm.h (FT_Get_Var_Blend_Func):
|
||||||
|
Add argument for `FT_MM_Var'.
|
||||||
|
|
||||||
|
* src/cff/cffload.c (cff_get_var_blend): Updated.
|
||||||
|
* src/cff/cffload.h: Updated.
|
||||||
|
|
||||||
|
* src/cff/cf2ft.c (cf2_getNormalizedVector): Updated.
|
||||||
|
|
||||||
|
* src/truetype/ttgxvar.c (tt_get_var_blend): Updated.
|
||||||
|
Accept value `NULL' for arguments.
|
||||||
|
* src/truetype/ttgxvar.h: Updated.
|
||||||
|
|
||||||
2016-12-18 Werner Lemberg <wl@gnu.org>
|
2016-12-18 Werner Lemberg <wl@gnu.org>
|
||||||
|
|
||||||
[sfnt] Handle `fvar' with zero axes as a non-MM font.
|
[sfnt] Handle `fvar' with zero axes as a non-MM font.
|
||||||
|
|
|
@ -69,9 +69,10 @@ FT_BEGIN_HEADER
|
||||||
FT_Long* coords );
|
FT_Long* coords );
|
||||||
|
|
||||||
typedef FT_Error
|
typedef FT_Error
|
||||||
(*FT_Get_Var_Blend_Func)( FT_Face face,
|
(*FT_Get_Var_Blend_Func)( FT_Face face,
|
||||||
FT_UInt *num_coords,
|
FT_UInt *num_coords,
|
||||||
FT_Fixed* *coords );
|
FT_Fixed* *coords,
|
||||||
|
FT_MM_Var* *mm_var );
|
||||||
|
|
||||||
typedef void
|
typedef void
|
||||||
(*FT_Done_Blend_Func)( FT_Face );
|
(*FT_Done_Blend_Func)( FT_Face );
|
||||||
|
|
|
@ -450,7 +450,7 @@
|
||||||
FT_ASSERT( decoder && decoder->builder.face );
|
FT_ASSERT( decoder && decoder->builder.face );
|
||||||
FT_ASSERT( vec && len );
|
FT_ASSERT( vec && len );
|
||||||
|
|
||||||
return cff_get_var_blend( decoder->builder.face, len, vec );
|
return cff_get_var_blend( decoder->builder.face, len, vec, NULL );
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -1548,14 +1548,15 @@
|
||||||
#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
|
#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
|
||||||
|
|
||||||
FT_LOCAL_DEF( FT_Error )
|
FT_LOCAL_DEF( FT_Error )
|
||||||
cff_get_var_blend( CFF_Face face,
|
cff_get_var_blend( CFF_Face face,
|
||||||
FT_UInt *num_coords,
|
FT_UInt *num_coords,
|
||||||
FT_Fixed* *coords )
|
FT_Fixed* *coords,
|
||||||
|
FT_MM_Var* *mm_var )
|
||||||
{
|
{
|
||||||
FT_Service_MultiMasters mm = (FT_Service_MultiMasters)face->mm;
|
FT_Service_MultiMasters mm = (FT_Service_MultiMasters)face->mm;
|
||||||
|
|
||||||
|
|
||||||
return mm->get_var_blend( FT_FACE( face ), num_coords, coords );
|
return mm->get_var_blend( FT_FACE( face ), num_coords, coords, mm_var );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -105,9 +105,10 @@ FT_BEGIN_HEADER
|
||||||
|
|
||||||
#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
|
#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
|
||||||
FT_LOCAL( FT_Error )
|
FT_LOCAL( FT_Error )
|
||||||
cff_get_var_blend( CFF_Face face,
|
cff_get_var_blend( CFF_Face face,
|
||||||
FT_UInt *num_coords,
|
FT_UInt *num_coords,
|
||||||
FT_Fixed* *coords );
|
FT_Fixed* *coords,
|
||||||
|
FT_MM_Var* *mm_var );
|
||||||
|
|
||||||
FT_LOCAL( void )
|
FT_LOCAL( void )
|
||||||
cff_done_blend( CFF_Face face );
|
cff_done_blend( CFF_Face face );
|
||||||
|
|
|
@ -2740,24 +2740,33 @@
|
||||||
/* tt_get_var_blend */
|
/* tt_get_var_blend */
|
||||||
/* */
|
/* */
|
||||||
/* <Description> */
|
/* <Description> */
|
||||||
/* An internal version of `TT_Get_MM_Blend' that just returns */
|
/* An extended internal version of `TT_Get_MM_Blend' that returns */
|
||||||
/* pointers instead of copying data, without any initialization of */
|
/* pointers instead of copying data, without any initialization of */
|
||||||
/* the MM machinery in case it isn't loaded yet. */
|
/* the MM machinery in case it isn't loaded yet. */
|
||||||
/* */
|
/* */
|
||||||
FT_LOCAL_DEF( FT_Error )
|
FT_LOCAL_DEF( FT_Error )
|
||||||
tt_get_var_blend( TT_Face face,
|
tt_get_var_blend( TT_Face face,
|
||||||
FT_UInt *num_coords,
|
FT_UInt *num_coords,
|
||||||
FT_Fixed* *coords )
|
FT_Fixed* *coords,
|
||||||
|
FT_MM_Var* *mm_var )
|
||||||
{
|
{
|
||||||
if ( face->blend )
|
if ( face->blend )
|
||||||
{
|
{
|
||||||
*num_coords = face->blend->num_axis;
|
if ( num_coords )
|
||||||
*coords = face->blend->normalizedcoords;
|
*num_coords = face->blend->num_axis;
|
||||||
|
if ( coords )
|
||||||
|
*coords = face->blend->normalizedcoords;
|
||||||
|
if ( mm_var )
|
||||||
|
*mm_var = face->blend->mmvar;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
*num_coords = 0;
|
if ( num_coords )
|
||||||
*coords = NULL;
|
*num_coords = 0;
|
||||||
|
if ( coords )
|
||||||
|
*coords = NULL;
|
||||||
|
if ( mm_var )
|
||||||
|
*mm_var = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return FT_Err_Ok;
|
return FT_Err_Ok;
|
||||||
|
|
|
@ -260,9 +260,10 @@ FT_BEGIN_HEADER
|
||||||
FT_Int *adelta );
|
FT_Int *adelta );
|
||||||
|
|
||||||
FT_LOCAL( FT_Error )
|
FT_LOCAL( FT_Error )
|
||||||
tt_get_var_blend( TT_Face face,
|
tt_get_var_blend( TT_Face face,
|
||||||
FT_UInt *num_coords,
|
FT_UInt *num_coords,
|
||||||
FT_Fixed* *coords );
|
FT_Fixed* *coords,
|
||||||
|
FT_MM_Var* *mm_var );
|
||||||
|
|
||||||
FT_LOCAL( void )
|
FT_LOCAL( void )
|
||||||
tt_done_blend( TT_Face face );
|
tt_done_blend( TT_Face face );
|
||||||
|
|
Loading…
Reference in New Issue