shithub: freetype+ttf2subf

Download patch

ref: d9bf44a430339bc40285eb96b0b700eb4ce9d6c3
parent: 0c633e3fcdd572cd5745b48fa01c58ee5262ac77
author: Werner Lemberg <[email protected]>
date: Mon Aug 27 04:41:43 EDT 2012

[autofit, cff, pshinter, psnames] More renamings for orthogonality.

* src/autofit/afmodule.c, src/autofit/afpic.h:
s/AF_AUTOFITTER_/AF_/.

* src/cff/cffdrivr.c, src/cff/cffobjs.c, src/cff/cffparse.c,
src/cff/cffpic.h: s/FT_CFF_/CFF_/.

* src/pshinter/pshmod.c, src/pshinter/pshpic.h:
s/FT_PSHINTER_/PSHINTER_/.

* src/psnames/psmodule.c, src/psnames/pspic.h:
s/FT_PSCMAPS/PSCMAPS_/.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,21 @@
 2012-08-27  Werner Lemberg  <[email protected]>
 
+	[autofit, cff, pshinter, psnames] More renamings for orthogonality.
+
+	* src/autofit/afmodule.c, src/autofit/afpic.h:
+	s/AF_AUTOFITTER_/AF_/.
+
+	* src/cff/cffdrivr.c, src/cff/cffobjs.c, src/cff/cffparse.c,
+	src/cff/cffpic.h: s/FT_CFF_/CFF_/.
+
+	* src/pshinter/pshmod.c, src/pshinter/pshpic.h:
+	s/FT_PSHINTER_/PSHINTER_/.
+
+	* src/psnames/psmodule.c, src/psnames/pspic.h:
+	s/FT_PSCMAPS/PSCMAPS_/.
+
+2012-08-27  Werner Lemberg  <[email protected]>
+
 	[sfnt, truetype] More renamings for orthogonality.
 
 	* src/sfnt/sfdriver.c, src/sfnt/sfntpic.h, src/sfnt/ttcmap.c,
--- a/src/autofit/afmodule.c
+++ b/src/autofit/afmodule.c
@@ -84,7 +84,7 @@
     0x10000L,   /* version 1.0 of the autofitter  */
     0x20000L,   /* requires FreeType 2.0 or above */
 
-    (const void*)&AF_AUTOFITTER_INTERFACE_GET,
+    (const void*)&AF_INTERFACE_GET,
 
     (FT_Module_Constructor)af_autofitter_init,
     (FT_Module_Destructor) af_autofitter_done,
--- a/src/autofit/afpic.h
+++ b/src/autofit/afpic.h
@@ -27,8 +27,8 @@
 
 #ifndef FT_CONFIG_OPTION_PIC
 
-#define AF_SCRIPT_CLASSES_GET        af_script_classes
-#define AF_AUTOFITTER_INTERFACE_GET  af_autofitter_interface
+#define AF_SCRIPT_CLASSES_GET  af_script_classes
+#define AF_INTERFACE_GET       af_autofitter_interface
 
 #else /* FT_CONFIG_OPTION_PIC */
 
@@ -54,12 +54,12 @@
   } AFModulePIC;
 
 
-#define GET_PIC( lib )                                                     \
+#define GET_PIC( lib )  \
           ( (AFModulePIC*)((lib)->pic_container.autofit) )
 
-#define AF_SCRIPT_CLASSES_GET                                              \
-          ( GET_PIC( FT_FACE_LIBRARY(globals->face) )->af_script_classes )
-#define AF_AUTOFITTER_INTERFACE_GET                                        \
+#define AF_SCRIPT_CLASSES_GET  \
+          ( GET_PIC( FT_FACE_LIBRARY( globals->face ) )->af_script_classes )
+#define AF_INTERFACE_GET  \
           ( GET_PIC( library )->af_autofitter_interface )
 
 
--- a/src/cff/cffdrivr.c
+++ b/src/cff/cffdrivr.c
@@ -412,8 +412,8 @@
     cmap_info->language = 0;
     cmap_info->format   = 0;
 
-    if ( cmap->clazz != &FT_CFF_CMAP_ENCODING_CLASS_REC_GET &&
-         cmap->clazz != &FT_CFF_CMAP_UNICODE_CLASS_REC_GET  )
+    if ( cmap->clazz != &CFF_CMAP_ENCODING_CLASS_REC_GET &&
+         cmap->clazz != &CFF_CMAP_UNICODE_CLASS_REC_GET  )
     {
       FT_Module           sfnt    = FT_Get_Module( library, "sfnt" );
       FT_Service_TTCMaps  service =
@@ -579,19 +579,19 @@
 #ifndef FT_CONFIG_OPTION_NO_GLYPH_NAMES
   FT_DEFINE_SERVICEDESCREC6(cff_services,
     FT_SERVICE_ID_XF86_NAME,            FT_XF86_FORMAT_CFF,
-    FT_SERVICE_ID_POSTSCRIPT_INFO,      &FT_CFF_SERVICE_PS_INFO_GET,
-    FT_SERVICE_ID_POSTSCRIPT_FONT_NAME, &FT_CFF_SERVICE_PS_NAME_GET,
-    FT_SERVICE_ID_GLYPH_DICT,           &FT_CFF_SERVICE_GLYPH_DICT_GET,
-    FT_SERVICE_ID_TT_CMAP,              &FT_CFF_SERVICE_GET_CMAP_INFO_GET,
-    FT_SERVICE_ID_CID,                  &FT_CFF_SERVICE_CID_INFO_GET
+    FT_SERVICE_ID_POSTSCRIPT_INFO,      &CFF_SERVICE_PS_INFO_GET,
+    FT_SERVICE_ID_POSTSCRIPT_FONT_NAME, &CFF_SERVICE_PS_NAME_GET,
+    FT_SERVICE_ID_GLYPH_DICT,           &CFF_SERVICE_GLYPH_DICT_GET,
+    FT_SERVICE_ID_TT_CMAP,              &CFF_SERVICE_GET_CMAP_INFO_GET,
+    FT_SERVICE_ID_CID,                  &CFF_SERVICE_CID_INFO_GET
   )
 #else
   FT_DEFINE_SERVICEDESCREC5(cff_services,
     FT_SERVICE_ID_XF86_NAME,            FT_XF86_FORMAT_CFF,
-    FT_SERVICE_ID_POSTSCRIPT_INFO,      &FT_CFF_SERVICE_PS_INFO_GET,
-    FT_SERVICE_ID_POSTSCRIPT_FONT_NAME, &FT_CFF_SERVICE_PS_NAME_GET,
-    FT_SERVICE_ID_TT_CMAP,              &FT_CFF_SERVICE_GET_CMAP_INFO_GET,
-    FT_SERVICE_ID_CID,                  &FT_CFF_SERVICE_CID_INFO_GET
+    FT_SERVICE_ID_POSTSCRIPT_INFO,      &CFF_SERVICE_PS_INFO_GET,
+    FT_SERVICE_ID_POSTSCRIPT_FONT_NAME, &CFF_SERVICE_PS_NAME_GET,
+    FT_SERVICE_ID_TT_CMAP,              &CFF_SERVICE_GET_CMAP_INFO_GET,
+    FT_SERVICE_ID_CID,                  &CFF_SERVICE_CID_INFO_GET
   )
 #endif
 
@@ -604,7 +604,7 @@
     FT_Module_Interface  result;
 
 
-    /* FT_CFF_SERVICES_GET derefers `library' in PIC mode */
+    /* CFF_SERVICES_GET derefers `library' in PIC mode */
 #ifdef FT_CONFIG_OPTION_PIC
     if ( !driver )
       return NULL;
@@ -613,7 +613,7 @@
       return NULL;
 #endif
 
-    result = ft_service_list_lookup( FT_CFF_SERVICES_GET, module_interface );
+    result = ft_service_list_lookup( CFF_SERVICES_GET, module_interface );
     if ( result != NULL )
       return result;
 
--- a/src/cff/cffobjs.c
+++ b/src/cff/cffobjs.c
@@ -968,7 +968,7 @@
 
         nn = (FT_UInt)cffface->num_charmaps;
 
-        error = FT_CMap_New( &FT_CFF_CMAP_UNICODE_CLASS_REC_GET, NULL,
+        error = FT_CMap_New( &CFF_CMAP_UNICODE_CLASS_REC_GET, NULL,
                              &cmaprec, NULL );
         if ( error && FT_Err_No_Unicode_Glyph_Name != error )
           goto Exit;
@@ -1000,19 +1000,19 @@
           {
             cmaprec.encoding_id = TT_ADOBE_ID_STANDARD;
             cmaprec.encoding    = FT_ENCODING_ADOBE_STANDARD;
-            clazz               = &FT_CFF_CMAP_ENCODING_CLASS_REC_GET;
+            clazz               = &CFF_CMAP_ENCODING_CLASS_REC_GET;
           }
           else if ( encoding->offset == 1 )
           {
             cmaprec.encoding_id = TT_ADOBE_ID_EXPERT;
             cmaprec.encoding    = FT_ENCODING_ADOBE_EXPERT;
-            clazz               = &FT_CFF_CMAP_ENCODING_CLASS_REC_GET;
+            clazz               = &CFF_CMAP_ENCODING_CLASS_REC_GET;
           }
           else
           {
             cmaprec.encoding_id = TT_ADOBE_ID_CUSTOM;
             cmaprec.encoding    = FT_ENCODING_ADOBE_CUSTOM;
-            clazz               = &FT_CFF_CMAP_ENCODING_CLASS_REC_GET;
+            clazz               = &CFF_CMAP_ENCODING_CLASS_REC_GET;
           }
 
           error = FT_CMap_New( clazz, NULL, &cmaprec, NULL );
--- a/src/cff/cffparse.c
+++ b/src/cff/cffparse.c
@@ -949,7 +949,7 @@
         }
         code = code | parser->object_code;
 
-        for ( field = FT_CFF_FIELD_HANDLERS_GET; field->kind; field++ )
+        for ( field = CFF_FIELD_HANDLERS_GET; field->kind; field++ )
         {
           if ( field->code == (FT_Int)code )
           {
--- a/src/cff/cffpic.h
+++ b/src/cff/cffpic.h
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    The FreeType position independent code services for cff module.      */
 /*                                                                         */
-/*  Copyright 2009 by                                                      */
+/*  Copyright 2009, 2012 by                                                */
 /*  Oran Agra and Mickey Gabel.                                            */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -24,17 +24,19 @@
 
 #include FT_INTERNAL_PIC_H
 
+
 #ifndef FT_CONFIG_OPTION_PIC
-#define FT_CFF_SERVICE_PS_INFO_GET         cff_service_ps_info
-#define FT_CFF_SERVICE_GLYPH_DICT_GET      cff_service_glyph_dict
-#define FT_CFF_SERVICE_PS_NAME_GET         cff_service_ps_name
-#define FT_CFF_SERVICE_GET_CMAP_INFO_GET   cff_service_get_cmap_info
-#define FT_CFF_SERVICE_CID_INFO_GET        cff_service_cid_info
-#define FT_CFF_SERVICES_GET                cff_services
-#define FT_CFF_CMAP_ENCODING_CLASS_REC_GET cff_cmap_encoding_class_rec
-#define FT_CFF_CMAP_UNICODE_CLASS_REC_GET  cff_cmap_unicode_class_rec
-#define FT_CFF_FIELD_HANDLERS_GET          cff_field_handlers
 
+#define CFF_SERVICE_PS_INFO_GET          cff_service_ps_info
+#define CFF_SERVICE_GLYPH_DICT_GET       cff_service_glyph_dict
+#define CFF_SERVICE_PS_NAME_GET          cff_service_ps_name
+#define CFF_SERVICE_GET_CMAP_INFO_GET    cff_service_get_cmap_info
+#define CFF_SERVICE_CID_INFO_GET         cff_service_cid_info
+#define CFF_SERVICES_GET                 cff_services
+#define CFF_CMAP_ENCODING_CLASS_REC_GET  cff_cmap_encoding_class_rec
+#define CFF_CMAP_UNICODE_CLASS_REC_GET   cff_cmap_unicode_class_rec
+#define CFF_FIELD_HANDLERS_GET           cff_field_handlers
+
 #else /* FT_CONFIG_OPTION_PIC */
 
 #include FT_SERVICE_GLYPH_DICT_H
@@ -44,29 +46,43 @@
 #include FT_SERVICE_TT_CMAP_H
 #include FT_SERVICE_CID_H
 
-  typedef struct CffModulePIC_
+
+  typedef struct  CffModulePIC_
   {
-    FT_ServiceDescRec* cff_services;
-    CFF_Field_Handler* cff_field_handlers;
-    FT_Service_PsInfoRec cff_service_ps_info;
-    FT_Service_GlyphDictRec cff_service_glyph_dict;
-    FT_Service_PsFontNameRec cff_service_ps_name;
-    FT_Service_TTCMapsRec  cff_service_get_cmap_info;
-    FT_Service_CIDRec  cff_service_cid_info;
-    FT_CMap_ClassRec cff_cmap_encoding_class_rec;
-    FT_CMap_ClassRec cff_cmap_unicode_class_rec;
+    FT_ServiceDescRec*        cff_services;
+    CFF_Field_Handler*        cff_field_handlers;
+    FT_Service_PsInfoRec      cff_service_ps_info;
+    FT_Service_GlyphDictRec   cff_service_glyph_dict;
+    FT_Service_PsFontNameRec  cff_service_ps_name;
+    FT_Service_TTCMapsRec     cff_service_get_cmap_info;
+    FT_Service_CIDRec         cff_service_cid_info;
+    FT_CMap_ClassRec          cff_cmap_encoding_class_rec;
+    FT_CMap_ClassRec          cff_cmap_unicode_class_rec;
+
   } CffModulePIC;
 
-#define GET_PIC(lib)                       ((CffModulePIC*)((lib)->pic_container.cff))
-#define FT_CFF_SERVICE_PS_INFO_GET         (GET_PIC(library)->cff_service_ps_info)
-#define FT_CFF_SERVICE_GLYPH_DICT_GET      (GET_PIC(library)->cff_service_glyph_dict)
-#define FT_CFF_SERVICE_PS_NAME_GET         (GET_PIC(library)->cff_service_ps_name)
-#define FT_CFF_SERVICE_GET_CMAP_INFO_GET   (GET_PIC(library)->cff_service_get_cmap_info)
-#define FT_CFF_SERVICE_CID_INFO_GET        (GET_PIC(library)->cff_service_cid_info)
-#define FT_CFF_SERVICES_GET                (GET_PIC(library)->cff_services)
-#define FT_CFF_CMAP_ENCODING_CLASS_REC_GET (GET_PIC(library)->cff_cmap_encoding_class_rec)
-#define FT_CFF_CMAP_UNICODE_CLASS_REC_GET  (GET_PIC(library)->cff_cmap_unicode_class_rec)
-#define FT_CFF_FIELD_HANDLERS_GET          (GET_PIC(library)->cff_field_handlers)
+
+#define GET_PIC( lib )  \
+          ( (CffModulePIC*)((lib)->pic_container.cff) )
+
+#define CFF_SERVICE_PS_INFO_GET  \
+          ( GET_PIC( library )->cff_service_ps_info )
+#define CFF_SERVICE_GLYPH_DICT_GET  \
+          ( GET_PIC( library )->cff_service_glyph_dict )
+#define CFF_SERVICE_PS_NAME_GET  \
+          ( GET_PIC( library )->cff_service_ps_name )
+#define CFF_SERVICE_GET_CMAP_INFO_GET  \
+          ( GET_PIC( library )->cff_service_get_cmap_info )
+#define CFF_SERVICE_CID_INFO_GET  \
+          ( GET_PIC( library )->cff_service_cid_info )
+#define CFF_SERVICES_GET  \
+          ( GET_PIC( library )->cff_services )
+#define CFF_CMAP_ENCODING_CLASS_REC_GET  \
+          ( GET_PIC( library )->cff_cmap_encoding_class_rec )
+#define CFF_CMAP_UNICODE_CLASS_REC_GET  \
+          ( GET_PIC( library )->cff_cmap_unicode_class_rec )
+#define CFF_FIELD_HANDLERS_GET  \
+          ( GET_PIC( library )->cff_field_handlers )
 
   /* see cffpic.c for the implementation */
   void
--- a/src/pshinter/pshmod.c
+++ b/src/pshinter/pshmod.c
@@ -109,7 +109,7 @@
     0x10000L,
     0x20000L,
 
-    &FT_PSHINTER_INTERFACE_GET,           /* module-specific interface */
+    &PSHINTER_INTERFACE_GET,              /* module-specific interface */
 
     (FT_Module_Constructor)ps_hinter_init,
     (FT_Module_Destructor) ps_hinter_done,
--- a/src/pshinter/pshpic.h
+++ b/src/pshinter/pshpic.h
@@ -27,7 +27,7 @@
 
 #ifndef FT_CONFIG_OPTION_PIC
 
-#define FT_PSHINTER_INTERFACE_GET  pshinter_interface
+#define PSHINTER_INTERFACE_GET  pshinter_interface
 
 #else /* FT_CONFIG_OPTION_PIC */
 
@@ -42,7 +42,7 @@
 
 #define GET_PIC( lib )  ( (PSHinterPIC*)((lib)->pic_container.autofit) )
 
-#define FT_PSHINTER_INTERFACE_GET  ( GET_PIC( library )->pshinter_interface )
+#define PSHINTER_INTERFACE_GET  ( GET_PIC( library )->pshinter_interface )
 
   /* see pshpic.c for the implementation */
   void
--- a/src/psnames/psmodule.c
+++ b/src/psnames/psmodule.c
@@ -555,7 +555,7 @@
 
   FT_DEFINE_SERVICEDESCREC1(
     pscmaps_services,
-    FT_SERVICE_ID_POSTSCRIPT_CMAPS, &FT_PSCMAPS_INTERFACE_GET )
+    FT_SERVICE_ID_POSTSCRIPT_CMAPS, &PSCMAPS_INTERFACE_GET )
 
 
   static FT_Pointer
@@ -562,7 +562,7 @@
   psnames_get_service( FT_Module    module,
                        const char*  service_id )
   {
-    /* FT_PSCMAPS_SERVICES_GET derefers `library' in PIC mode */
+    /* PSCMAPS_SERVICES_GET derefers `library' in PIC mode */
 #ifdef FT_CONFIG_OPTION_PIC
     FT_Library  library;
 
@@ -576,7 +576,7 @@
     FT_UNUSED( module );
 #endif
 
-    return ft_service_list_lookup( FT_PSCMAPS_SERVICES_GET, service_id );
+    return ft_service_list_lookup( PSCMAPS_SERVICES_GET, service_id );
   }
 
 #endif /* FT_CONFIG_OPTION_POSTSCRIPT_NAMES */
@@ -599,7 +599,7 @@
     0x20000L,   /* driver requires FreeType 2 or above */
 
     PUT_PS_NAMES_SERVICE(
-      (void*)&FT_PSCMAPS_INTERFACE_GET ),   /* module specific interface */
+      (void*)&PSCMAPS_INTERFACE_GET ),   /* module specific interface */
     (FT_Module_Constructor)NULL,
     (FT_Module_Destructor) NULL,
     (FT_Module_Requester)  PUT_PS_NAMES_SERVICE( psnames_get_service ) )
--- a/src/psnames/pspic.h
+++ b/src/psnames/pspic.h
@@ -26,8 +26,8 @@
 
 #ifndef FT_CONFIG_OPTION_PIC
 
-#define FT_PSCMAPS_SERVICES_GET   pscmaps_services
-#define FT_PSCMAPS_INTERFACE_GET  pscmaps_interface
+#define PSCMAPS_SERVICES_GET   pscmaps_services
+#define PSCMAPS_INTERFACE_GET  pscmaps_interface
 
 #else /* FT_CONFIG_OPTION_PIC */
 
@@ -43,8 +43,8 @@
 
 #define GET_PIC( lib )                                     \
           ( (PSModulePIC*)((lib)->pic_container.psnames) )
-#define FT_PSCMAPS_SERVICES_GET   ( GET_PIC( library )->pscmaps_services )
-#define FT_PSCMAPS_INTERFACE_GET  ( GET_PIC( library )->pscmaps_interface )
+#define PSCMAPS_SERVICES_GET   ( GET_PIC( library )->pscmaps_services )
+#define PSCMAPS_INTERFACE_GET  ( GET_PIC( library )->pscmaps_interface )
 
 
   /* see pspic.c for the implementation */