[autofit] Some formatting and clean-ups.
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
diff --git a/src/autofit/afangles.c b/src/autofit/afangles.c
index e2360d1..790af17 100644
--- a/src/autofit/afangles.c
+++ b/src/autofit/afangles.c
@@ -5,7 +5,7 @@
/* Routines used to compute vector angles with limited accuracy */
/* and very high speed. It also contains sorting routines (body). */
/* */
-/* Copyright 2003, 2004, 2005, 2006 by */
+/* Copyright 2003-2006, 2011 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -77,7 +77,7 @@
return 1 - 2 * ( delta < 0 );
}
-#endif
+#endif /* 0 */
/*
diff --git a/src/autofit/afdummy.c b/src/autofit/afdummy.c
index 42b2fcb..ea2ed53 100644
--- a/src/autofit/afdummy.c
+++ b/src/autofit/afdummy.c
@@ -5,7 +5,7 @@
/* Auto-fitter dummy routines to be used if no hinting should be */
/* performed (body). */
/* */
-/* Copyright 2003, 2004, 2005 by */
+/* Copyright 2003-2005, 2011 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -27,7 +27,7 @@
{
af_glyph_hints_rescale( hints,
metrics );
- return 0;
+ return AF_Err_Ok;
}
@@ -38,11 +38,11 @@
FT_UNUSED( hints );
FT_UNUSED( outline );
- return 0;
+ return AF_Err_Ok;
}
- AF_DEFINE_SCRIPT_CLASS(af_dummy_script_class,
+ AF_DEFINE_SCRIPT_CLASS( af_dummy_script_class,
AF_SCRIPT_NONE,
NULL,
diff --git a/src/autofit/afdummy.h b/src/autofit/afdummy.h
index b69ef43..95d8f8c 100644
--- a/src/autofit/afdummy.h
+++ b/src/autofit/afdummy.h
@@ -5,7 +5,7 @@
/* Auto-fitter dummy routines to be used if no hinting should be */
/* performed (specification). */
/* */
-/* Copyright 2003, 2004, 2005 by */
+/* Copyright 2003-2005, 2011 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -29,7 +29,7 @@ FT_BEGIN_HEADER
* be performed. This is the default for non-latin glyphs!
*/
- AF_DECLARE_SCRIPT_CLASS(af_dummy_script_class)
+ AF_DECLARE_SCRIPT_CLASS( af_dummy_script_class )
/* */
diff --git a/src/autofit/afglobal.c b/src/autofit/afglobal.c
index 178c884..3c5f02e 100644
--- a/src/autofit/afglobal.c
+++ b/src/autofit/afglobal.c
@@ -4,7 +4,7 @@
/* */
/* Auto-fitter routines to compute global hinting values (body). */
/* */
-/* Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 by */
+/* Copyright 2003-2011 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -31,8 +31,8 @@
#ifndef FT_CONFIG_OPTION_PIC
-/* when updating this table, don't forget to update
- AF_SCRIPT_CLASSES_COUNT and autofit_module_class_pic_init */
+ /* when updating this table, don't forget to update */
+ /* AF_SCRIPT_CLASSES_COUNT and autofit_module_class_pic_init */
/* populate this list when you add new scripts */
static AF_ScriptClass const af_script_classes[] =
@@ -47,7 +47,7 @@
NULL /* do not remove */
};
-#endif /* FT_CONFIG_OPTION_PIC */
+#endif /* !FT_CONFIG_OPTION_PIC */
/* index of default script in `af_script_classes' */
#define AF_SCRIPT_LIST_DEFAULT 2
@@ -85,7 +85,7 @@
FT_UInt ss, i;
- /* the value 255 means `uncovered glyph' */
+ /* the value AF_SCRIPT_LIST_NONE means `uncovered glyph' */
FT_MEM_SET( globals->glyph_scripts,
AF_SCRIPT_LIST_NONE,
globals->glyph_count );
@@ -126,9 +126,7 @@
if ( gindex != 0 &&
gindex < (FT_ULong)globals->glyph_count &&
gscripts[gindex] == AF_SCRIPT_LIST_NONE )
- {
gscripts[gindex] = (FT_Byte)ss;
- }
for (;;)
{
@@ -139,9 +137,7 @@
if ( gindex < (FT_ULong)globals->glyph_count &&
gscripts[gindex] == AF_SCRIPT_LIST_NONE )
- {
gscripts[gindex] = (FT_Byte)ss;
- }
}
}
}
diff --git a/src/autofit/aftypes.h b/src/autofit/aftypes.h
index 5574f0c..755e30b 100644
--- a/src/autofit/aftypes.h
+++ b/src/autofit/aftypes.h
@@ -4,7 +4,7 @@
/* */
/* Auto-fitter types (specification only). */
/* */
-/* Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009 by */
+/* Copyright 2003-2009, 2011 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -241,7 +241,7 @@ extern void* _af_debug_hints;
/*************************************************************************/
/*
- * The list of know scripts. Each different script corresponds to the
+ * The list of known scripts. Each different script corresponds to the
* following information:
*
* - A set of Unicode ranges to test whether the face supports the
@@ -342,55 +342,57 @@ extern void* _af_debug_hints;
} AF_ScriptClassRec;
-/* Declare and define vtables for classes */
+
+ /* Declare and define vtables for classes */
#ifndef FT_CONFIG_OPTION_PIC
-#define AF_DECLARE_SCRIPT_CLASS(script_class) \
- FT_CALLBACK_TABLE const AF_ScriptClassRec \
+#define AF_DECLARE_SCRIPT_CLASS( script_class ) \
+ FT_CALLBACK_TABLE const AF_ScriptClassRec \
script_class;
-#define AF_DEFINE_SCRIPT_CLASS(script_class, script_, ranges, m_size, \
- m_init, m_scale, m_done, h_init, h_apply) \
- FT_CALLBACK_TABLE_DEF const AF_ScriptClassRec \
- script_class = \
- { \
- script_, \
- ranges, \
- \
- m_size, \
- \
- m_init, \
- m_scale, \
- m_done, \
- \
- h_init, \
- h_apply \
+#define AF_DEFINE_SCRIPT_CLASS( script_class, script_, ranges, m_size, \
+ m_init, m_scale, m_done, h_init, h_apply ) \
+ FT_CALLBACK_TABLE_DEF const AF_ScriptClassRec \
+ script_class = \
+ { \
+ script_, \
+ ranges, \
+ \
+ m_size, \
+ \
+ m_init, \
+ m_scale, \
+ m_done, \
+ \
+ h_init, \
+ h_apply \
};
-#else
-
-#define AF_DECLARE_SCRIPT_CLASS(script_class) \
- FT_LOCAL(void) \
- FT_Init_Class_##script_class(AF_ScriptClassRec* ac);
-
-#define AF_DEFINE_SCRIPT_CLASS(script_class, script_, ranges, m_size, \
- m_init, m_scale, m_done, h_init, h_apply) \
- FT_LOCAL_DEF(void) \
- FT_Init_Class_##script_class(AF_ScriptClassRec* ac) \
- { \
- ac->script = script_; \
- ac->script_uni_ranges = ranges; \
- \
- ac->script_metrics_size = m_size; \
- \
- ac->script_metrics_init = m_init; \
- ac->script_metrics_scale = m_scale; \
- ac->script_metrics_done = m_done; \
- \
- ac->script_hints_init = h_init; \
- ac->script_hints_apply = h_apply; \
+#else /* FT_CONFIG_OPTION_PIC */
+
+#define AF_DECLARE_SCRIPT_CLASS( script_class ) \
+ FT_LOCAL( void ) \
+ FT_Init_Class_##script_class( AF_ScriptClassRec* ac );
+
+#define AF_DEFINE_SCRIPT_CLASS( script_class, script_, ranges, m_size, \
+ m_init, m_scale, m_done, h_init, h_apply ) \
+ FT_LOCAL_DEF( void ) \
+ FT_Init_Class_##script_class( AF_ScriptClassRec* ac ) \
+ { \
+ ac->script = script_; \
+ ac->script_uni_ranges = ranges; \
+ \
+ ac->script_metrics_size = m_size; \
+ \
+ ac->script_metrics_init = m_init; \
+ ac->script_metrics_scale = m_scale; \
+ ac->script_metrics_done = m_done; \
+ \
+ ac->script_hints_init = h_init; \
+ ac->script_hints_apply = h_apply; \
}
-#endif
+
+#endif /* FT_CONFIG_OPTION_PIC */
/* */