diff options
author | Dave Arnold <darnold@adobe.com> | 2016-12-05 22:08:15 +0100 |
---|---|---|
committer | Werner Lemberg <wl@gnu.org> | 2016-12-06 11:49:15 +0100 |
commit | bcae657482ca038dc2b7c4ddd737a110c85e052a (patch) | |
tree | bec0ba89c2cf28c7efed007c5cf89b0415891e28 /src/base/ftmm.c | |
parent | c0fae7da5a6503c6d38ec133483aba57b42c0ddb (diff) | |
download | freetype2-bcae657482ca038dc2b7c4ddd737a110c85e052a.tar.gz |
Add `FT_Get_Var_Design_Coordinates' function.
Note that the low-level functions aren't implemented yet.
* include/freetype/ftmm.h: Declare.
* include/freetype/internal/services/svmm.h
(FT_Get_Var_Design_Func): New typedef.
(MultiMasters): New MM service function `get_var_design'.
(FT_DEFINE_SERVICE_MULTIMASTERSREC): Updated.
Update all callers.
* src/base/ftmm.c (FT_Get_Var_Design_Coordinates): Implement.
* src/truetype/ttdriver.c: Updated.
* src/truetype/ttgxvar.c (TT_Get_Var_Design): New dummy function to
handle `get_var_design' service.
* src/truetype/ttgxvar.h: Updated.
* src/type1/t1driver.c: Updated.
* src/type1/t1load.c (T1_Get_Var_Design): New dummp function to
handle `get_var_design' service.
* src/type1/t1load.h: Updated.
Diffstat (limited to 'src/base/ftmm.c')
-rw-r--r-- | src/base/ftmm.c | 36 |
1 files changed, 32 insertions, 4 deletions
diff --git a/src/base/ftmm.c b/src/base/ftmm.c index 138515e8f..c3528035d 100644 --- a/src/base/ftmm.c +++ b/src/base/ftmm.c @@ -175,6 +175,34 @@ /* documentation is in ftmm.h */ FT_EXPORT_DEF( FT_Error ) + FT_Get_Var_Design_Coordinates( FT_Face face, + FT_UInt num_coords, + FT_Fixed* coords ) + { + FT_Error error; + FT_Service_MultiMasters service; + + + /* check of `face' delayed to `ft_face_get_mm_service' */ + + if ( !coords ) + return FT_THROW( Invalid_Argument ); + + error = ft_face_get_mm_service( face, &service ); + if ( !error ) + { + error = FT_ERR( Invalid_Argument ); + if ( service->get_var_design ) + error = service->get_var_design( face, num_coords, coords ); + } + + return error; + } + + + /* documentation is in ftmm.h */ + + FT_EXPORT_DEF( FT_Error ) FT_Set_MM_Blend_Coordinates( FT_Face face, FT_UInt num_coords, FT_Fixed* coords ) @@ -193,7 +221,7 @@ { error = FT_ERR( Invalid_Argument ); if ( service->set_mm_blend ) - error = service->set_mm_blend( face, num_coords, coords ); + error = service->set_mm_blend( face, num_coords, coords ); } return error; @@ -224,7 +252,7 @@ { error = FT_ERR( Invalid_Argument ); if ( service->set_mm_blend ) - error = service->set_mm_blend( face, num_coords, coords ); + error = service->set_mm_blend( face, num_coords, coords ); } return error; @@ -252,7 +280,7 @@ { error = FT_ERR( Invalid_Argument ); if ( service->get_mm_blend ) - error = service->get_mm_blend( face, num_coords, coords ); + error = service->get_mm_blend( face, num_coords, coords ); } return error; @@ -283,7 +311,7 @@ { error = FT_ERR( Invalid_Argument ); if ( service->get_mm_blend ) - error = service->get_mm_blend( face, num_coords, coords ); + error = service->get_mm_blend( face, num_coords, coords ); } return error; |