shithub: freetype+ttf2subf

Download patch

ref: 5d6a36054267353f6ba9432217aef5b13876c0c0
parent: cc34efca99c4275d0f799624fcd20ebd1963efaf
author: Werner Lemberg <[email protected]>
date: Tue Jul 30 19:17:04 EDT 2013

[autofit] Variable renaming.

* src/autofit/aftypes.h (AF_ScriptMetricsRec):
s/clazz/script_class/.
Update all users.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2013-07-30  Werner Lemberg  <[email protected]>
+
+	[autofit] Variable renaming.
+
+	* src/autofit/aftypes.h (AF_ScriptMetricsRec):
+	s/clazz/script_class/.
+	Update all users.
+
 2013-07-30  suzuki toshiya  <[email protected]>
 
 	Ignore libpng-config under cross-building configuration,
--- a/src/autofit/afcjk.c
+++ b/src/autofit/afcjk.c
@@ -86,8 +86,9 @@
       AF_Scaler         scaler = &dummy->root.scaler;
 
 
-      glyph_index = FT_Get_Char_Index( face,
-                                       metrics->root.clazz->standard_char );
+      glyph_index = FT_Get_Char_Index(
+                      face,
+                      metrics->root.script_class->standard_char );
       if ( glyph_index == 0 )
         goto Exit;
 
--- a/src/autofit/afglobal.c
+++ b/src/autofit/afglobal.c
@@ -82,11 +82,11 @@
     /* scan each script in a Unicode charmap */
     for ( ss = 0; AF_SCRIPT_CLASSES_GET[ss]; ss++ )
     {
-      AF_ScriptClass      clazz = AF_SCRIPT_CLASSES_GET[ss];
+      AF_ScriptClass      script_class = AF_SCRIPT_CLASSES_GET[ss];
       AF_Script_UniRange  range;
 
 
-      if ( clazz->script_uni_ranges == NULL )
+      if ( script_class->script_uni_ranges == NULL )
         continue;
 
       /*
@@ -93,7 +93,9 @@
        *  Scan all Unicode points in the range and set the corresponding
        *  glyph script index.
        */
-      for ( range = clazz->script_uni_ranges; range->first != 0; range++ )
+      for ( range = script_class->script_uni_ranges;
+            range->first != 0;
+            range++ )
       {
         FT_ULong  charcode = range->first;
         FT_UInt   gindex;
@@ -204,13 +206,13 @@
       {
         if ( globals->metrics[nn] )
         {
-          AF_ScriptClass  clazz = AF_SCRIPT_CLASSES_GET[nn];
+          AF_ScriptClass  script_class = AF_SCRIPT_CLASSES_GET[nn];
 
 
-          FT_ASSERT( globals->metrics[nn]->clazz == clazz );
+          FT_ASSERT( globals->metrics[nn]->script_class == script_class );
 
-          if ( clazz->script_metrics_done )
-            clazz->script_metrics_done( globals->metrics[nn] );
+          if ( script_class->script_metrics_done )
+            script_class->script_metrics_done( globals->metrics[nn] );
 
           FT_FREE( globals->metrics[nn] );
         }
@@ -233,7 +235,7 @@
   {
     AF_ScriptMetrics  metrics = NULL;
     FT_UInt           gidx;
-    AF_ScriptClass    clazz;
+    AF_ScriptClass    script_class;
     FT_UInt           script     = options & 15;
     const FT_Offset   script_max = sizeof ( AF_SCRIPT_CLASSES_GET ) /
                                      sizeof ( AF_SCRIPT_CLASSES_GET[0] );
@@ -250,11 +252,11 @@
     if ( gidx == 0 || gidx + 1 >= script_max )
       gidx = globals->glyph_scripts[gindex] & AF_SCRIPT_NONE;
 
-    clazz = AF_SCRIPT_CLASSES_GET[gidx];
+    script_class = AF_SCRIPT_CLASSES_GET[gidx];
     if ( script == 0 )
-      script = clazz->script;
+      script = script_class->script;
 
-    metrics = globals->metrics[clazz->script];
+    metrics = globals->metrics[script_class->script];
     if ( metrics == NULL )
     {
       /* create the global metrics object if necessary */
@@ -261,19 +263,19 @@
       FT_Memory  memory = globals->face->memory;
 
 
-      if ( FT_ALLOC( metrics, clazz->script_metrics_size ) )
+      if ( FT_ALLOC( metrics, script_class->script_metrics_size ) )
         goto Exit;
 
-      metrics->clazz   = clazz;
-      metrics->globals = globals;
+      metrics->script_class = script_class;
+      metrics->globals      = globals;
 
-      if ( clazz->script_metrics_init )
+      if ( script_class->script_metrics_init )
       {
-        error = clazz->script_metrics_init( metrics, globals->face );
+        error = script_class->script_metrics_init( metrics, globals->face );
         if ( error )
         {
-          if ( clazz->script_metrics_done )
-            clazz->script_metrics_done( metrics );
+          if ( script_class->script_metrics_done )
+            script_class->script_metrics_done( metrics );
 
           FT_FREE( metrics );
           goto Exit;
@@ -280,7 +282,7 @@
         }
       }
 
-      globals->metrics[clazz->script] = metrics;
+      globals->metrics[script_class->script] = metrics;
     }
 
   Exit:
--- a/src/autofit/aflatin.c
+++ b/src/autofit/aflatin.c
@@ -76,13 +76,14 @@
       AF_Scaler           scaler = &dummy->root.scaler;
 
 
-      glyph_index = FT_Get_Char_Index( face,
-                                       metrics->root.clazz->standard_char );
+      glyph_index = FT_Get_Char_Index(
+                      face,
+                      metrics->root.script_class->standard_char );
       if ( glyph_index == 0 )
         goto Exit;
 
       FT_TRACE5(( "standard character: 0x%X (glyph index %d)\n",
-                  metrics->root.clazz->standard_char, glyph_index ));
+                  metrics->root.script_class->standard_char, glyph_index ));
 
       error = FT_Load_Glyph( face, glyph_index, FT_LOAD_NO_SCALE );
       if ( error || face->glyph->outline.n_points <= 0 )
--- a/src/autofit/aflatin2.c
+++ b/src/autofit/aflatin2.c
@@ -76,8 +76,9 @@
       AF_Scaler            scaler = &dummy->root.scaler;
 
 
-      glyph_index = FT_Get_Char_Index( face,
-                                       metrics->root.clazz->standard_char );
+      glyph_index = FT_Get_Char_Index(
+                      face,
+                      metrics->root.script_class->standard_char );
       if ( glyph_index == 0 )
         goto Exit;
 
--- a/src/autofit/afloader.c
+++ b/src/autofit/afloader.c
@@ -180,10 +180,10 @@
 
       /* now load the slot image into the auto-outline and run the */
       /* automatic hinting process                                 */
-      if ( metrics->clazz->script_hints_apply )
-        metrics->clazz->script_hints_apply( hints,
-                                            &gloader->current.outline,
-                                            metrics );
+      if ( metrics->script_class->script_hints_apply )
+        metrics->script_class->script_hints_apply( hints,
+                                                   &gloader->current.outline,
+                                                   metrics );
 
       /* we now need to adjust the metrics according to the change in */
       /* width/positioning that occurred during the hinting process   */
@@ -534,8 +534,8 @@
       {
         loader->metrics = metrics;
 
-        if ( metrics->clazz->script_metrics_scale )
-          metrics->clazz->script_metrics_scale( metrics, &scaler );
+        if ( metrics->script_class->script_metrics_scale )
+          metrics->script_class->script_metrics_scale( metrics, &scaler );
         else
           metrics->scaler = scaler;
 
@@ -542,10 +542,10 @@
         load_flags |=  FT_LOAD_NO_SCALE | FT_LOAD_IGNORE_TRANSFORM;
         load_flags &= ~FT_LOAD_RENDER;
 
-        if ( metrics->clazz->script_hints_init )
+        if ( metrics->script_class->script_hints_init )
         {
-          error = metrics->clazz->script_hints_init( &loader->hints,
-                                                     metrics );
+          error = metrics->script_class->script_hints_init( &loader->hints,
+                                                            metrics );
           if ( error )
             goto Exit;
         }
--- a/src/autofit/aftypes.h
+++ b/src/autofit/aftypes.h
@@ -250,7 +250,7 @@
 
   typedef struct  AF_ScriptMetricsRec_
   {
-    AF_ScriptClass  clazz;
+    AF_ScriptClass  script_class;
     AF_ScalerRec    scaler;
     FT_Bool         digits_have_same_width;