Commit 4fccc214f922803e1ab575efefe11030f37b5c1b

Werner Lemberg 2013-12-18T12:53:01

[autofit] s/script_{metrics,hints}/style_{metrics,hints}/

diff --git a/ChangeLog b/ChangeLog
index 2c667a8..584d41e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2013-12-18  Werner Lemberg  <wl@gnu.org>
 
+	[autofit] s/script_{metrics,hints}/style_{metrics,hints}/
+
+2013-12-18  Werner Lemberg  <wl@gnu.org>
+
 	[autofit] s/gscripts/gstyles/.
 
 2013-12-18  Werner Lemberg  <wl@gnu.org>
diff --git a/src/autofit/afglobal.c b/src/autofit/afglobal.c
index 6735711..66674eb 100644
--- a/src/autofit/afglobal.c
+++ b/src/autofit/afglobal.c
@@ -237,8 +237,8 @@
             AF_WRITING_SYSTEM_CLASSES_GET[script_class->writing_system];
 
 
-          if ( writing_system_class->script_metrics_done )
-            writing_system_class->script_metrics_done( globals->metrics[nn] );
+          if ( writing_system_class->style_metrics_done )
+            writing_system_class->style_metrics_done( globals->metrics[nn] );
 
           FT_FREE( globals->metrics[nn] );
         }
@@ -291,20 +291,20 @@
       FT_Memory  memory = globals->face->memory;
 
 
-      if ( FT_ALLOC( metrics, writing_system_class->script_metrics_size ) )
+      if ( FT_ALLOC( metrics, writing_system_class->style_metrics_size ) )
         goto Exit;
 
       metrics->script_class = script_class;
       metrics->globals      = globals;
 
-      if ( writing_system_class->script_metrics_init )
+      if ( writing_system_class->style_metrics_init )
       {
-        error = writing_system_class->script_metrics_init( metrics,
-                                                           globals->face );
+        error = writing_system_class->style_metrics_init( metrics,
+                                                          globals->face );
         if ( error )
         {
-          if ( writing_system_class->script_metrics_done )
-            writing_system_class->script_metrics_done( metrics );
+          if ( writing_system_class->style_metrics_done )
+            writing_system_class->style_metrics_done( metrics );
 
           FT_FREE( metrics );
           goto Exit;
diff --git a/src/autofit/afloader.c b/src/autofit/afloader.c
index 400b01e..9cf3a68 100644
--- a/src/autofit/afloader.c
+++ b/src/autofit/afloader.c
@@ -190,10 +190,10 @@
                                    [metrics->script_class->writing_system];
 
 
-        if ( writing_system_class->script_hints_apply )
-          writing_system_class->script_hints_apply( hints,
-                                                    &gloader->current.outline,
-                                                    metrics );
+        if ( writing_system_class->style_hints_apply )
+          writing_system_class->style_hints_apply( hints,
+                                                   &gloader->current.outline,
+                                                   metrics );
       }
 
       /* we now need to adjust the metrics according to the change in */
@@ -553,18 +553,18 @@
 
         loader->metrics = metrics;
 
-        if ( writing_system_class->script_metrics_scale )
-          writing_system_class->script_metrics_scale( metrics, &scaler );
+        if ( writing_system_class->style_metrics_scale )
+          writing_system_class->style_metrics_scale( metrics, &scaler );
         else
           metrics->scaler = scaler;
 
         load_flags |=  FT_LOAD_NO_SCALE | FT_LOAD_IGNORE_TRANSFORM;
         load_flags &= ~FT_LOAD_RENDER;
 
-        if ( writing_system_class->script_hints_init )
+        if ( writing_system_class->style_hints_init )
         {
-          error = writing_system_class->script_hints_init( &loader->hints,
-                                                           metrics );
+          error = writing_system_class->style_hints_init( &loader->hints,
+                                                          metrics );
           if ( error )
             goto Exit;
         }
diff --git a/src/autofit/aftypes.h b/src/autofit/aftypes.h
index 024ecbc..9210677 100644
--- a/src/autofit/aftypes.h
+++ b/src/autofit/aftypes.h
@@ -297,13 +297,13 @@ extern void*  _af_debug_hints;
   {
     AF_WritingSystem  writing_system;
 
-    FT_Offset                          script_metrics_size;
-    AF_WritingSystem_InitMetricsFunc   script_metrics_init;
-    AF_WritingSystem_ScaleMetricsFunc  script_metrics_scale;
-    AF_WritingSystem_DoneMetricsFunc   script_metrics_done;
+    FT_Offset                          style_metrics_size;
+    AF_WritingSystem_InitMetricsFunc   style_metrics_init;
+    AF_WritingSystem_ScaleMetricsFunc  style_metrics_scale;
+    AF_WritingSystem_DoneMetricsFunc   style_metrics_done;
 
-    AF_WritingSystem_InitHintsFunc     script_hints_init;
-    AF_WritingSystem_ApplyHintsFunc    script_hints_apply;
+    AF_WritingSystem_InitHintsFunc     style_hints_init;
+    AF_WritingSystem_ApplyHintsFunc    style_hints_apply;
 
   } AF_WritingSystemClassRec;
 
@@ -434,16 +434,16 @@ extern void*  _af_debug_hints;
   FT_LOCAL_DEF( void )                                                    \
   FT_Init_Class_ ## writing_system_class( AF_WritingSystemClassRec*  ac ) \
   {                                                                       \
-    ac->writing_system       = system;                                    \
+    ac->writing_system      = system;                                     \
                                                                           \
-    ac->script_metrics_size  = m_size;                                    \
+    ac->style_metrics_size  = m_size;                                     \
                                                                           \
-    ac->script_metrics_init  = m_init;                                    \
-    ac->script_metrics_scale = m_scale;                                   \
-    ac->script_metrics_done  = m_done;                                    \
+    ac->style_metrics_init  = m_init;                                     \
+    ac->style_metrics_scale = m_scale;                                    \
+    ac->style_metrics_done  = m_done;                                     \
                                                                           \
-    ac->script_hints_init    = h_init;                                    \
-    ac->script_hints_apply   = h_apply;                                   \
+    ac->style_hints_init    = h_init;                                     \
+    ac->style_hints_apply   = h_apply;                                    \
   }