From 67ff7664e4cce992764e70cde25381d07377afee Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Thu, 23 Mar 2017 12:41:30 +0100 Subject: [PATCH] Make MM fonts work (again). * src/base/ftmm.c (FT_Set_Var_Design_Coordinates, FT_Set_MM_Blend_Coordinates, FT_Set_Var_Blend_Coordinates): Ignore return value of `ft_face_get_mvar_service'; instead, check whether a service is actually returned. --- ChangeLog | 9 +++++++++ src/base/ftmm.c | 21 +++++++++------------ 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9e0743184..f34409209 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2017-03-23 Werner Lemberg + + Make MM fonts work (again). + + * src/base/ftmm.c (FT_Set_Var_Design_Coordinates, + FT_Set_MM_Blend_Coordinates, FT_Set_Var_Blend_Coordinates): Ignore + return value of `ft_face_get_mvar_service'; instead, check whether a + service is actually returned. + 2017-03-20 Werner Lemberg [truetype] Some variable renamings. diff --git a/src/base/ftmm.c b/src/base/ftmm.c index 6aaa5f8b0..2cb56a39b 100644 --- a/src/base/ftmm.c +++ b/src/base/ftmm.c @@ -205,12 +205,11 @@ error = service_mm->set_var_design( face, num_coords, coords ); } - if ( !error ) - error = ft_face_get_mvar_service( face, &service_mvar ); - if ( !error ) { - if ( service_mvar->metrics_adjust ) + (void)ft_face_get_mvar_service( face, &service_mvar ); + + if ( service_mvar && service_mvar->metrics_adjust ) service_mvar->metrics_adjust( face ); } @@ -278,12 +277,11 @@ error = service_mm->set_mm_blend( face, num_coords, coords ); } - if ( !error ) - error = ft_face_get_mvar_service( face, &service_mvar ); - if ( !error ) { - if ( service_mvar->metrics_adjust ) + (void)ft_face_get_mvar_service( face, &service_mvar ); + + if ( service_mvar && service_mvar->metrics_adjust ) service_mvar->metrics_adjust( face ); } @@ -326,12 +324,11 @@ error = service_mm->set_mm_blend( face, num_coords, coords ); } - if ( !error ) - error = ft_face_get_mvar_service( face, &service_mvar ); - if ( !error ) { - if ( service_mvar->metrics_adjust ) + (void)ft_face_get_mvar_service( face, &service_mvar ); + + if ( service_mvar && service_mvar->metrics_adjust ) service_mvar->metrics_adjust( face ); }