Commit fdcb14a2eebb48bb137f6e9afc27faac931967b6

Werner Lemberg 2023-04-27T06:18:38

s/set_instance/set_named_instance/ * include/freetype/internal/services/svmm.h (FT_Set_Instance_Func): Renamed to... (FT_Set_Named_Instance_Func): ...this. (FT_Service_MultiMasters): Rename `set_instance` to `set_named_instance`. (FT_DEFINE_SERVICE_MULTIMASTERSREC): Updated. * src/base/ftmm.c (FT_Set_Named_Instance): Updated. * src/cff/cffdrivr.c (cff_set_instance): Renamed to... (cff_set_named_instance): ...this. (cff_service_multi_masters): Updated. * src/cff/cffobjs.c (cff_face_init): Updated. * src/truetype/ttdriver.c (tt_service_gx_multi_masters): Updated. * src/type1/t1driver.c (t1_service_multi_masters): Updated.

diff --git a/include/freetype/internal/services/svmm.h b/include/freetype/internal/services/svmm.h
index f87b8ac..80541c4 100644
--- a/include/freetype/internal/services/svmm.h
+++ b/include/freetype/internal/services/svmm.h
@@ -70,8 +70,8 @@ FT_BEGIN_HEADER
                              FT_Fixed*  coords );
 
   typedef FT_Error
-  (*FT_Set_Instance_Func)( FT_Face  face,
-                           FT_UInt  instance_index );
+  (*FT_Set_Named_Instance_Func)( FT_Face  face,
+                                 FT_UInt  instance_index );
 
   typedef FT_Error
   (*FT_Get_Default_Named_Instance_Func)( FT_Face   face,
@@ -138,7 +138,7 @@ FT_BEGIN_HEADER
     FT_Get_MM_Var_Func                    get_mm_var;
     FT_Set_Var_Design_Func                set_var_design;
     FT_Get_Var_Design_Func                get_var_design;
-    FT_Set_Instance_Func                  set_instance;
+    FT_Set_Named_Instance_Func            set_named_instance;
     FT_Get_Default_Named_Instance_Func    get_default_named_instance;
     FT_Set_MM_WeightVector_Func           set_mm_weightvector;
     FT_Get_MM_WeightVector_Func           get_mm_weightvector;
@@ -162,7 +162,7 @@ FT_BEGIN_HEADER
                                            get_mm_var_,                 \
                                            set_var_design_,             \
                                            get_var_design_,             \
-                                           set_instance_,               \
+                                           set_named_instance_,         \
                                            get_default_named_instance_, \
                                            set_weightvector_,           \
                                            get_weightvector_,           \
@@ -182,7 +182,7 @@ FT_BEGIN_HEADER
     get_mm_var_,                                                        \
     set_var_design_,                                                    \
     get_var_design_,                                                    \
-    set_instance_,                                                      \
+    set_named_instance_,                                                \
     get_default_named_instance_,                                        \
     set_weightvector_,                                                  \
     get_weightvector_,                                                  \
diff --git a/src/base/ftmm.c b/src/base/ftmm.c
index 781db31..1d5e2bc 100644
--- a/src/base/ftmm.c
+++ b/src/base/ftmm.c
@@ -535,8 +535,8 @@
     if ( !error )
     {
       error = FT_ERR( Invalid_Argument );
-      if ( service_mm->set_instance )
-        error = service_mm->set_instance( face, instance_index );
+      if ( service_mm->set_named_instance )
+        error = service_mm->set_named_instance( face, instance_index );
     }
 
     if ( !error )
diff --git a/src/cff/cffdrivr.c b/src/cff/cffdrivr.c
index d9ed35b..29f2a2b 100644
--- a/src/cff/cffdrivr.c
+++ b/src/cff/cffdrivr.c
@@ -932,13 +932,13 @@
 
 
   static FT_Error
-  cff_set_instance( CFF_Face  face,
-                    FT_UInt   instance_index )
+  cff_set_named_instance( CFF_Face  face,
+                          FT_UInt   instance_index )
   {
     FT_Service_MultiMasters  mm = (FT_Service_MultiMasters)face->mm;
 
 
-    return mm->set_instance( FT_FACE( face ), instance_index );
+    return mm->set_named_instance( FT_FACE( face ), instance_index );
   }
 
 
@@ -1027,7 +1027,9 @@
     (FT_Get_MM_Var_Func)    cff_get_mm_var,     /* get_mm_var                 */
     (FT_Set_Var_Design_Func)cff_set_var_design, /* set_var_design             */
     (FT_Get_Var_Design_Func)cff_get_var_design, /* get_var_design             */
-    (FT_Set_Instance_Func)  cff_set_instance,   /* set_instance               */
+    (FT_Set_Named_Instance_Func)
+                            cff_set_named_instance,
+                                                /* set_named_instance         */
     (FT_Get_Default_Named_Instance_Func)
                             cff_get_default_named_instance,
                                                 /* get_default_named_instance */
diff --git a/src/cff/cffobjs.c b/src/cff/cffobjs.c
index 9608a41..2285c1a 100644
--- a/src/cff/cffobjs.c
+++ b/src/cff/cffobjs.c
@@ -731,7 +731,7 @@
              mm                                 &&
              instance_index > 0                 )
         {
-          error = mm->set_instance( cffface, instance_index );
+          error = mm->set_named_instance( cffface, instance_index );
           if ( error )
             goto Exit;
 
diff --git a/src/truetype/ttdriver.c b/src/truetype/ttdriver.c
index c128be1..54ad932 100644
--- a/src/truetype/ttdriver.c
+++ b/src/truetype/ttdriver.c
@@ -524,7 +524,8 @@
     (FT_Get_MM_Var_Func)    TT_Get_MM_Var,         /* get_mm_var                 */
     (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_Set_Instance_Func)  TT_Set_Named_Instance, /* set_instance               */
+    (FT_Set_Named_Instance_Func)
+                            TT_Set_Named_Instance, /* set_named_instance         */
     (FT_Get_Default_Named_Instance_Func)
                             TT_Get_Default_Named_Instance,
                                                    /* get_default_named_instance */
diff --git a/src/type1/t1driver.c b/src/type1/t1driver.c
index 5d0fe53..4239d86 100644
--- a/src/type1/t1driver.c
+++ b/src/type1/t1driver.c
@@ -128,7 +128,8 @@
     (FT_Get_MM_Var_Func)    T1_Get_MM_Var,          /* get_mm_var                 */
     (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_Set_Instance_Func)  T1_Reset_MM_Blend,      /* set_instance               */
+    (FT_Set_Named_Instance_Func)
+                            T1_Reset_MM_Blend,      /* set_named_instance         */
     (FT_Get_Default_Named_Instance_Func)
                             NULL,                   /* get_default_named_instance */
     (FT_Set_MM_WeightVector_Func)