[autofit] Some macro and variable renamings for orthogonality. * include/freetype/internal/autohint.h, src/base/ftobjs.c, src/autofit/afmodule.c, src/autofit/afpic.c, src/autofit/afpic.h: s/SERVICE/INTERFACE/, s/service/interface/, s/Service/Interface/.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276
diff --git a/ChangeLog b/ChangeLog
index 6e90f64..62718a4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2012-08-27 Werner Lemberg <wl@gnu.org>
+
+ [autofit] Some macro and variable renamings for orthogonality.
+
+ * include/freetype/internal/autohint.h, src/base/ftobjs.c,
+ src/autofit/afmodule.c, src/autofit/afpic.c, src/autofit/afpic.h:
+ s/SERVICE/INTERFACE/, s/service/interface/, s/Service/Interface/.
+
2012-08-26 Werner Lemberg <wl@gnu.org>
Fix Savannah bug #37178.
diff --git a/include/freetype/internal/autohint.h b/include/freetype/internal/autohint.h
index 1d59b51..545de93 100644
--- a/include/freetype/internal/autohint.h
+++ b/include/freetype/internal/autohint.h
@@ -182,56 +182,56 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
/* <Struct> */
- /* FT_AutoHinter_ServiceRec */
+ /* FT_AutoHinter_InterfaceRec */
/* */
/* <Description> */
/* The auto-hinter module's interface. */
/* */
- typedef struct FT_AutoHinter_ServiceRec_
+ typedef struct FT_AutoHinter_InterfaceRec_
{
FT_AutoHinter_GlobalResetFunc reset_face;
FT_AutoHinter_GlobalGetFunc get_global_hints;
FT_AutoHinter_GlobalDoneFunc done_global_hints;
FT_AutoHinter_GlyphLoadFunc load_glyph;
- } FT_AutoHinter_ServiceRec, *FT_AutoHinter_Service;
+ } FT_AutoHinter_InterfaceRec, *FT_AutoHinter_Interface;
#ifndef FT_CONFIG_OPTION_PIC
-#define FT_DEFINE_AUTOHINTER_SERVICE( \
- class_, \
- reset_face_, \
- get_global_hints_, \
- done_global_hints_, \
- load_glyph_ ) \
- FT_CALLBACK_TABLE_DEF \
- const FT_AutoHinter_ServiceRec class_ = \
- { \
- reset_face_, \
- get_global_hints_, \
- done_global_hints_, \
- load_glyph_ \
+#define FT_DEFINE_AUTOHINTER_INTERFACE( \
+ class_, \
+ reset_face_, \
+ get_global_hints_, \
+ done_global_hints_, \
+ load_glyph_ ) \
+ FT_CALLBACK_TABLE_DEF \
+ const FT_AutoHinter_InterfaceRec class_ = \
+ { \
+ reset_face_, \
+ get_global_hints_, \
+ done_global_hints_, \
+ load_glyph_ \
};
#else /* FT_CONFIG_OPTION_PIC */
-#define FT_DEFINE_AUTOHINTER_SERVICE( \
- class_, \
- reset_face_, \
- get_global_hints_, \
- done_global_hints_, \
- load_glyph_ ) \
- void \
- FT_Init_Class_ ## class_( FT_Library library, \
- FT_AutoHinter_ServiceRec* clazz ) \
- { \
- FT_UNUSED( library ); \
- \
- clazz->reset_face = reset_face_; \
- clazz->get_global_hints = get_global_hints_; \
- clazz->done_global_hints = done_global_hints_; \
- clazz->load_glyph = load_glyph_; \
+#define FT_DEFINE_AUTOHINTER_INTERFACE( \
+ class_, \
+ reset_face_, \
+ get_global_hints_, \
+ done_global_hints_, \
+ load_glyph_ ) \
+ void \
+ FT_Init_Class_ ## class_( FT_Library library, \
+ FT_AutoHinter_InterfaceRec* clazz ) \
+ { \
+ FT_UNUSED( library ); \
+ \
+ clazz->reset_face = reset_face_; \
+ clazz->get_global_hints = get_global_hints_; \
+ clazz->done_global_hints = done_global_hints_; \
+ clazz->load_glyph = load_glyph_; \
}
#endif /* FT_CONFIG_OPTION_PIC */
diff --git a/src/autofit/afmodule.c b/src/autofit/afmodule.c
index 6e158e0..4ea7a31 100644
--- a/src/autofit/afmodule.c
+++ b/src/autofit/afmodule.c
@@ -66,13 +66,14 @@
}
- FT_DEFINE_AUTOHINTER_SERVICE(
- af_autofitter_service,
+ FT_DEFINE_AUTOHINTER_INTERFACE(
+ af_autofitter_interface,
NULL, /* reset_face */
NULL, /* get_global_hints */
NULL, /* done_global_hints */
(FT_AutoHinter_GlyphLoadFunc)af_autofitter_load_glyph ) /* load_glyph */
+
FT_DEFINE_MODULE(
autofit_module_class,
@@ -83,7 +84,7 @@
0x10000L, /* version 1.0 of the autofitter */
0x20000L, /* requires FreeType 2.0 or above */
- (const void*)&AF_AUTOFITTER_SERVICE_GET,
+ (const void*)&AF_AUTOFITTER_INTERFACE_GET,
(FT_Module_Constructor)af_autofitter_init,
(FT_Module_Destructor) af_autofitter_done,
diff --git a/src/autofit/afpic.c b/src/autofit/afpic.c
index 87074af..a395fae 100644
--- a/src/autofit/afpic.c
+++ b/src/autofit/afpic.c
@@ -4,7 +4,7 @@
/* */
/* The FreeType position independent code services for autofit module. */
/* */
-/* Copyright 2009, 2010, 2011 by */
+/* Copyright 2009-2012 by */
/* Oran Agra and Mickey Gabel. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -22,12 +22,13 @@
#include "afpic.h"
#include "aferrors.h"
+
#ifdef FT_CONFIG_OPTION_PIC
/* forward declaration of PIC init functions from afmodule.c */
- void FT_Init_Class_af_autofitter_service(
- FT_Library library,
- FT_AutoHinter_ServiceRec* clazz );
+ void FT_Init_Class_af_autofitter_interface(
+ FT_Library library,
+ FT_AutoHinter_InterfaceRec* clazz );
/* forward declaration of PIC init functions from script classes */
#include "aflatin.h"
@@ -38,6 +39,7 @@
#include "afdummy.h"
#include "afindic.h"
+
void
autofit_module_class_pic_free( FT_Library library )
{
@@ -93,8 +95,8 @@
FT_Init_Class_af_indic_script_class(
&container->af_script_classes_rec[ss++] );
- FT_Init_Class_af_autofitter_service(
- library, &container->af_autofitter_service );
+ FT_Init_Class_af_autofitter_interface(
+ library, &container->af_autofitter_interface );
/* Exit: */
@@ -103,7 +105,6 @@
return error;
}
-
#endif /* FT_CONFIG_OPTION_PIC */
diff --git a/src/autofit/afpic.h b/src/autofit/afpic.h
index 0b08d69..0ae5bfc 100644
--- a/src/autofit/afpic.h
+++ b/src/autofit/afpic.h
@@ -24,10 +24,11 @@ FT_BEGIN_HEADER
#include FT_INTERNAL_PIC_H
+
#ifndef FT_CONFIG_OPTION_PIC
-#define AF_SCRIPT_CLASSES_GET af_script_classes
-#define AF_AUTOFITTER_SERVICE_GET af_autofitter_service
+#define AF_SCRIPT_CLASSES_GET af_script_classes
+#define AF_AUTOFITTER_INTERFACE_GET af_autofitter_interface
#else /* FT_CONFIG_OPTION_PIC */
@@ -36,26 +37,31 @@ FT_BEGIN_HEADER
/* increase these when you add new scripts, */
/* and update autofit_module_class_pic_init */
#ifdef FT_OPTION_AUTOFIT2
-#define AF_SCRIPT_CLASSES_COUNT 6
+#define AF_SCRIPT_CLASSES_COUNT 6
#else
-#define AF_SCRIPT_CLASSES_COUNT 5
+#define AF_SCRIPT_CLASSES_COUNT 5
#endif
+
#define AF_SCRIPT_CLASSES_REC_COUNT ( AF_SCRIPT_CLASSES_COUNT - 1 )
- typedef struct AFModulePIC_
+
+ typedef struct AFModulePIC_
{
- AF_ScriptClass af_script_classes[AF_SCRIPT_CLASSES_COUNT];
- AF_ScriptClassRec af_script_classes_rec[AF_SCRIPT_CLASSES_REC_COUNT];
- FT_AutoHinter_ServiceRec af_autofitter_service;
+ AF_ScriptClass af_script_classes[AF_SCRIPT_CLASSES_COUNT];
+ AF_ScriptClassRec af_script_classes_rec[AF_SCRIPT_CLASSES_REC_COUNT];
+ FT_AutoHinter_InterfaceRec af_autofitter_interface;
} AFModulePIC;
+
#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_SERVICE_GET \
- ( GET_PIC( library )->af_autofitter_service )
+#define AF_AUTOFITTER_INTERFACE_GET \
+ ( GET_PIC( library )->af_autofitter_interface )
+
/* see afpic.c for the implementation */
void
diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c
index 453d9da..d8c7462 100644
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -651,7 +651,7 @@
if ( autohint )
{
- FT_AutoHinter_Service hinting;
+ FT_AutoHinter_Interface hinting;
/* try to load embedded bitmaps first if available */
@@ -680,7 +680,7 @@
internal->transform_flags = 0;
/* load auto-hinted outline */
- hinting = (FT_AutoHinter_Service)hinter->clazz->module_interface;
+ hinting = (FT_AutoHinter_Interface)hinter->clazz->module_interface;
error = hinting->load_glyph( (FT_AutoHinter)hinter,
slot, face->size,