freetype-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[freetype2] master d22f5ec 5/9: Formatting.


From: Werner LEMBERG
Subject: [freetype2] master d22f5ec 5/9: Formatting.
Date: Mon, 20 Feb 2017 03:16:24 -0500 (EST)

branch: master
commit d22f5ec56304540fe5bc8be147150e39c5078778
Author: Werner Lemberg <address@hidden>
Commit: Werner Lemberg <address@hidden>

    Formatting.
---
 include/freetype/internal/ftobjs.h  | 32 ++++++++--------
 include/freetype/internal/tttypes.h |  2 +-
 src/cff/cffdrivr.c                  |  1 +
 src/cff/cffobjs.c                   | 76 +++++++++++++++++--------------------
 src/cff/cffobjs.h                   |  7 ++--
 src/cff/cfftypes.h                  |  1 +
 6 files changed, 57 insertions(+), 62 deletions(-)

diff --git a/include/freetype/internal/ftobjs.h 
b/include/freetype/internal/ftobjs.h
index 5fa341f..16385fa 100644
--- a/include/freetype/internal/ftobjs.h
+++ b/include/freetype/internal/ftobjs.h
@@ -342,12 +342,6 @@ FT_BEGIN_HEADER
   /*      this data when first opened.  This field exists only if          */
   /*      @FT_CONFIG_OPTION_INCREMENTAL is defined.                        */
   /*                                                                       */
-  /*    refcount ::                                                        */
-  /*      A counter initialized to~1 at the time an @FT_Face structure is  */
-  /*      created.  @FT_Reference_Face increments this counter, and        */
-  /*      @FT_Done_Face only destroys a face if the counter is~1,          */
-  /*      otherwise it simply decrements it.                               */
-  /*                                                                       */
   /*    no_stem_darkening ::                                               */
   /*      Overrides the module-level default, see @stem-darkening[cff],    */
   /*      for example.  FALSE and TRUE toggle stem darkening on and off,   */
@@ -357,11 +351,17 @@ FT_BEGIN_HEADER
   /*      Overrides the library default with custom weights for the 5-tap  */
   /*      FIR filter.  `{0, 0, 0, 0, 0}' means to use the library default. */
   /*                                                                       */
+  /*    refcount ::                                                        */
+  /*      A counter initialized to~1 at the time an @FT_Face structure is  */
+  /*      created.  @FT_Reference_Face increments this counter, and        */
+  /*      @FT_Done_Face only destroys a face if the counter is~1,          */
+  /*      otherwise it simply decrements it.                               */
+  /*                                                                       */
   typedef struct  FT_Face_InternalRec_
   {
-    FT_Matrix           transform_matrix;
-    FT_Vector           transform_delta;
-    FT_Int              transform_flags;
+    FT_Matrix  transform_matrix;
+    FT_Vector  transform_delta;
+    FT_Int     transform_flags;
 
     FT_ServiceCacheRec  services;
 
@@ -369,14 +369,13 @@ FT_BEGIN_HEADER
     FT_Incremental_InterfaceRec*  incremental_interface;
 #endif
 
-    FT_Int              refcount;
-
-    FT_Char             no_stem_darkening;
-
+    FT_Char              no_stem_darkening;
 #ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING
     FT_LcdFiveTapFilter  lcd_weights;  /* preset or custom filter weights */
 #endif
 
+    FT_Int  refcount;
+
   } FT_Face_InternalRec;
 
 
@@ -843,14 +842,17 @@ FT_BEGIN_HEADER
   /*                        handle to the current renderer for the         */
   /*                        FT_GLYPH_FORMAT_OUTLINE format.                */
   /*                                                                       */
-  /*    auto_hinter      :: XXX                                            */
+  /*    auto_hinter      :: The auto-hinter module interface.              */
   /*                                                                       */
   /*    raster_pool      :: The raster object's render pool.  This can     */
   /*                        ideally be changed dynamically at run-time.    */
   /*                                                                       */
   /*    raster_pool_size :: The size of the render pool in bytes.          */
   /*                                                                       */
-  /*    debug_hooks      :: XXX                                            */
+  /*    debug_hooks      :: An array of four function pointers that allow  */
+  /*                        debuggers to hook into a font format's         */
+  /*                        interpreter.  Currently, only the TrueType     */
+  /*                        bytecode debugger uses this.                   */
   /*                                                                       */
   /*    lcd_filter       :: If subpixel rendering is activated, the        */
   /*                        selected LCD filter mode.                      */
diff --git a/include/freetype/internal/tttypes.h 
b/include/freetype/internal/tttypes.h
index e779647..d6c57ce 100644
--- a/include/freetype/internal/tttypes.h
+++ b/include/freetype/internal/tttypes.h
@@ -1457,7 +1457,7 @@ FT_BEGIN_HEADER
 
     /***********************************************************************/
     /*                                                                     */
-    /* TrueType-specific fields (ignored by the OTF-Type2 driver)          */
+    /* TrueType-specific fields (ignored by the CFF driver)                */
     /*                                                                     */
     /***********************************************************************/
 
diff --git a/src/cff/cffdrivr.c b/src/cff/cffdrivr.c
index c0466d0..fe28574 100644
--- a/src/cff/cffdrivr.c
+++ b/src/cff/cffdrivr.c
@@ -833,6 +833,7 @@
       {
         FT_UInt*  hinting_engine = (FT_UInt*)value;
 
+
         if ( *hinting_engine == FT_CFF_HINTING_ADOBE
 #ifdef CFF_CONFIG_OPTION_OLD_ENGINE
              || *hinting_engine == FT_CFF_HINTING_FREETYPE
diff --git a/src/cff/cffobjs.c b/src/cff/cffobjs.c
index a639350..f0320af 100644
--- a/src/cff/cffobjs.c
+++ b/src/cff/cffobjs.c
@@ -684,62 +684,56 @@
       }
 #endif /* FT_DEBUG_LEVEL_TRACE */
 
-
-
 #ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
-
-    {
-      FT_Service_MultiMasters  mm = (FT_Service_MultiMasters)face->mm;
-
-      FT_Int  instance_index = face_index >> 16;
-
-
-      if ( FT_HAS_MULTIPLE_MASTERS( cffface ) &&
-           mm                                 &&
-           instance_index > 0                 )
       {
-        FT_MM_Var*  mm_var;
-
+        FT_Service_MultiMasters  mm = (FT_Service_MultiMasters)face->mm;
 
-        error = mm->get_mm_var( cffface, NULL );
-        if ( error )
-          goto Exit;
+        FT_Int  instance_index = face_index >> 16;
 
-        mm->get_var_blend( cffface, NULL, NULL, &mm_var );
 
-        if ( mm_var->namedstyle )
+        if ( FT_HAS_MULTIPLE_MASTERS( cffface ) &&
+             mm                                 &&
+             instance_index > 0                 )
         {
-          FT_Var_Named_Style*  named_style;
-          FT_String*           style_name;
+          FT_MM_Var*  mm_var;
 
 
-          /* in `face_index', the instance index starts with value 1 */
-          named_style = mm_var->namedstyle + instance_index - 1;
-          error = sfnt->get_name( face,
-                                  (FT_UShort)named_style->strid,
-                                  &style_name );
+          error = mm->get_mm_var( cffface, NULL );
           if ( error )
             goto Exit;
 
-          /* set style name; if already set, replace it */
-          if ( face->root.style_name )
-            FT_FREE( face->root.style_name );
-          face->root.style_name = style_name;
+          mm->get_var_blend( cffface, NULL, NULL, &mm_var );
 
-          /* finally, select the named instance */
-          error = mm->set_var_design( cffface,
-                                      mm_var->num_axis,
-                                      named_style->coords );
-          if ( error )
-            goto Exit;
+          if ( mm_var->namedstyle )
+          {
+            FT_Var_Named_Style*  named_style;
+            FT_String*           style_name;
+
+
+            /* in `face_index', the instance index starts with value 1 */
+            named_style = mm_var->namedstyle + instance_index - 1;
+            error = sfnt->get_name( face,
+                                    (FT_UShort)named_style->strid,
+                                    &style_name );
+            if ( error )
+              goto Exit;
+
+            /* set style name; if already set, replace it */
+            if ( face->root.style_name )
+              FT_FREE( face->root.style_name );
+            face->root.style_name = style_name;
+
+            /* finally, select the named instance */
+            error = mm->set_var_design( cffface,
+                                        mm_var->num_axis,
+                                        named_style->coords );
+            if ( error )
+              goto Exit;
+          }
         }
       }
-    }
-
 #endif /* TT_CONFIG_OPTION_GX_VAR_SUPPORT */
 
-
-
       if ( !dict->has_font_matrix )
         dict->units_per_em = pure_cff ? 1000 : face->root.units_per_EM;
 
@@ -1022,7 +1016,6 @@
         cffface->style_flags = flags;
       }
 
-
 #ifndef FT_CONFIG_OPTION_NO_GLYPH_NAMES
       /* CID-keyed CFF fonts don't have glyph names -- the SFNT loader */
       /* has unset this flag because of the 3.0 `post' table.          */
@@ -1033,7 +1026,6 @@
       if ( dict->cid_registry != 0xFFFFU && pure_cff )
         cffface->face_flags |= FT_FACE_FLAG_CID_KEYED;
 
-
       /*******************************************************************/
       /*                                                                 */
       /* Compute char maps.                                              */
diff --git a/src/cff/cffobjs.h b/src/cff/cffobjs.h
index 5d26977..2b88e0e 100644
--- a/src/cff/cffobjs.h
+++ b/src/cff/cffobjs.h
@@ -118,10 +118,9 @@ FT_BEGIN_HEADER
   {
     FT_DriverRec  root;
 
-    FT_UInt  hinting_engine;
-    FT_Bool  no_stem_darkening;
-
-    FT_Int  darken_params[8];
+    FT_UInt   hinting_engine;
+    FT_Bool   no_stem_darkening;
+    FT_Int    darken_params[8];
 
   } CFF_DriverRec;
 
diff --git a/src/cff/cfftypes.h b/src/cff/cfftypes.h
index 412712c..0c24ed5 100644
--- a/src/cff/cfftypes.h
+++ b/src/cff/cfftypes.h
@@ -389,6 +389,7 @@ FT_BEGIN_HEADER
     /* since version 2.4.12 */
     FT_Generic       cf2_instance;
 
+    /* since version 2.7.1 */
     CFF_VStoreRec    vstore;        /* parsed vstore structure */
 
   } CFF_FontRec;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]