Commit 67ff7664e4cce992764e70cde25381d07377afee

Werner Lemberg 2017-03-23T12:41:30

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.

diff --git a/ChangeLog b/ChangeLog
index 9e07431..f344092 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2017-03-23  Werner Lemberg  <wl@gnu.org>
+
+	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  <wl@gnu.org>
 
 	[truetype] Some variable renamings.
diff --git a/src/base/ftmm.c b/src/base/ftmm.c
index 6aaa5f8..2cb56a3 100644
--- a/src/base/ftmm.c
+++ b/src/base/ftmm.c
@@ -206,11 +206,10 @@
     }
 
     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 );
     }
 
@@ -279,11 +278,10 @@
     }
 
     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 );
     }
 
@@ -327,11 +325,10 @@
     }
 
     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 );
     }