Formatting.
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 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336
diff --git a/include/freetype/internal/ftobjs.h b/include/freetype/internal/ftobjs.h
index 8b5e089..46253c6 100644
--- a/include/freetype/internal/ftobjs.h
+++ b/include/freetype/internal/ftobjs.h
@@ -451,31 +451,30 @@ FT_BEGIN_HEADER
/* */
-#define FT_REQUEST_WIDTH( req ) \
- ( ( req )->horiResolution \
- ? (FT_Pos)( ( req )->width * ( req )->horiResolution + 36 ) / 72 \
- : ( req )->width )
+#define FT_REQUEST_WIDTH( req ) \
+ ( (req)->horiResolution \
+ ? (FT_Pos)( (req)->width * (req)->horiResolution + 36 ) / 72 \
+ : (req)->width )
-#define FT_REQUEST_HEIGHT( req ) \
- ( ( req )->vertResolution \
- ? (FT_Pos)( ( req )->height * ( req )->vertResolution + 36 ) / 72 \
- : ( req )->height )
+#define FT_REQUEST_HEIGHT( req ) \
+ ( (req)->vertResolution \
+ ? (FT_Pos)( (req)->height * (req)->vertResolution + 36 ) / 72 \
+ : (req)->height )
- /* set the metrics according to a bitmap strike */
+
+ /* Set the metrics according to a bitmap strike. */
FT_BASE( void )
FT_Select_Metrics( FT_Face face,
FT_ULong strike_index );
- /* set the metrics according to a size request */
+ /* Set the metrics according to a size request. */
FT_BASE( void )
FT_Request_Metrics( FT_Face face,
FT_Size_Request req );
- /*
- * Match a size request against `available_sizes'.
- */
+ /* Match a size request against `available_sizes'. */
FT_BASE( FT_Error )
FT_Match_Size( FT_Face face,
FT_Size_Request req,
@@ -483,35 +482,27 @@ FT_BEGIN_HEADER
FT_ULong* index );
- /*
- * Use the horizontal metrics to synthesize the vertical metrics.
- * If `advance' is zero, it is also synthesized.
- */
+ /* Use the horizontal metrics to synthesize the vertical metrics. */
+ /* If `advance' is zero, it is also synthesized. */
FT_BASE( void )
ft_synthesize_vertical_metrics( FT_Glyph_Metrics* metrics,
FT_Pos advance );
- /*
- * Free the bitmap of a given glyphslot when needed
- * (i.e., only when it was allocated with ft_glyphslot_alloc_bitmap).
- */
+ /* Free the bitmap of a given glyphslot when needed (i.e., only when it */
+ /* was allocated with ft_glyphslot_alloc_bitmap). */
FT_BASE( void )
ft_glyphslot_free_bitmap( FT_GlyphSlot slot );
- /*
- * Allocate a new bitmap buffer in a glyph slot.
- */
+ /* Allocate a new bitmap buffer in a glyph slot. */
FT_BASE( FT_Error )
ft_glyphslot_alloc_bitmap( FT_GlyphSlot slot,
FT_ULong size );
- /*
- * Set the bitmap buffer in a glyph slot to a given pointer.
- * The buffer will not be freed by a later call to ft_glyphslot_free_bitmap.
- */
+ /* Set the bitmap buffer in a glyph slot to a given pointer. The buffer */
+ /* will not be freed by a later call to ft_glyphslot_free_bitmap. */
FT_BASE( void )
ft_glyphslot_set_bitmap( FT_GlyphSlot slot,
FT_Byte* buffer );
@@ -623,17 +614,15 @@ FT_BEGIN_HEADER
/*************************************************************************/
-/* this hook is used by the TrueType debugger. It must be set to an alternate
- * truetype bytecode interpreter function
- */
+ /* This hook is used by the TrueType debugger. It must be set to an */
+ /* alternate truetype bytecode interpreter function. */
#define FT_DEBUG_HOOK_TRUETYPE 0
-/* set this debug hook to a non-null pointer to force unpatented hinting
- * for all faces when both TT_CONFIG_OPTION_BYTECODE_INTERPRETER and
- * TT_CONFIG_OPTION_UNPATENTED_HINTING are defined. this is only used
- * during debugging
- */
+ /* Set this debug hook to a non-null pointer to force unpatented hinting */
+ /* for all faces when both TT_CONFIG_OPTION_BYTECODE_INTERPRETER and */
+ /* TT_CONFIG_OPTION_UNPATENTED_HINTING are defined. this is only used */
+ /* during debugging. */
#define FT_DEBUG_HOOK_UNPATENTED_HINTING 1
diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c
index 5702996..a01afcb 100644
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -314,9 +314,9 @@
static void
ft_glyphslot_done( FT_GlyphSlot slot )
{
- FT_Driver driver = slot->face->driver;
- FT_Driver_Class clazz = driver->clazz;
- FT_Memory memory = driver->root.memory;
+ FT_Driver driver = slot->face->driver;
+ FT_Driver_Class clazz = driver->clazz;
+ FT_Memory memory = driver->root.memory;
if ( clazz->done_slot )
@@ -342,11 +342,11 @@
FT_New_GlyphSlot( FT_Face face,
FT_GlyphSlot *aslot )
{
- FT_Error error;
- FT_Driver driver;
- FT_Driver_Class clazz;
- FT_Memory memory;
- FT_GlyphSlot slot;
+ FT_Error error;
+ FT_Driver driver;
+ FT_Driver_Class clazz;
+ FT_Memory memory;
+ FT_GlyphSlot slot;
if ( !face || !face->driver )
@@ -2006,7 +2006,7 @@
if ( req->type != FT_SIZE_REQUEST_TYPE_NOMINAL )
return FT_Err_Unimplemented_Feature;
- w = FT_REQUEST_WIDTH( req );
+ w = FT_REQUEST_WIDTH ( req );
h = FT_REQUEST_HEIGHT( req );
if ( req->width && !req->height )
@@ -2158,7 +2158,7 @@
if ( h < 0 )
h = -h;
- scaled_w = FT_REQUEST_WIDTH( req );
+ scaled_w = FT_REQUEST_WIDTH ( req );
scaled_h = FT_REQUEST_HEIGHT( req );
/* determine scales */
@@ -2217,7 +2217,7 @@
FT_Select_Size( FT_Face face,
FT_Int strike_index )
{
- FT_Driver_Class clazz;
+ FT_Driver_Class clazz;
if ( !face || !FT_HAS_FIXED_SIZES( face ) )
@@ -2243,8 +2243,8 @@
FT_Request_Size( FT_Face face,
FT_Size_Request req )
{
- FT_Driver_Class clazz;
- FT_ULong strike_index;
+ FT_Driver_Class clazz;
+ FT_ULong strike_index;
if ( !face )
@@ -2275,7 +2275,8 @@
if ( error )
return error;
- FT_TRACE3(( "FT_Request_Size: bitmap strike %lu matched\n", strike_index ));
+ FT_TRACE3(( "FT_Request_Size: bitmap strike %lu matched\n",
+ strike_index ));
return FT_Select_Size( face, (FT_Int)strike_index );
}
@@ -2572,10 +2573,10 @@
FT_BASE_DEF( FT_Error )
- FT_CMap_New( FT_CMap_Class clazz,
- FT_Pointer init_data,
- FT_CharMap charmap,
- FT_CMap *acmap )
+ FT_CMap_New( FT_CMap_Class clazz,
+ FT_Pointer init_data,
+ FT_CharMap charmap,
+ FT_CMap *acmap )
{
FT_Error error = FT_Err_Ok;
FT_Face face;
diff --git a/src/cff/cffobjs.c b/src/cff/cffobjs.c
index 2f28b17..623b5d7 100644
--- a/src/cff/cffobjs.c
+++ b/src/cff/cffobjs.c
@@ -190,7 +190,7 @@
return CFF_Err_Ok;
}
-#endif
+#endif /* TT_CONFIG_OPTION_EMBEDDED_BITMAPS */
FT_LOCAL_DEF( FT_Error )
@@ -200,6 +200,7 @@
CFF_Size cffsize = (CFF_Size)size;
PSH_Globals_Funcs funcs;
+
#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
if ( FT_HAS_FIXED_SIZES( size->face ) )
diff --git a/src/psaux/psconv.c b/src/psaux/psconv.c
index 6cdcb27..40c22dc 100644
--- a/src/psaux/psconv.c
+++ b/src/psaux/psconv.c
@@ -119,8 +119,8 @@
FT_LOCAL_DEF( FT_Int )
PS_Conv_ToInt( FT_Byte** cursor,
- FT_Byte* limit )
-
+ FT_Byte* limit )
+
{
FT_Byte* p;
FT_Int num;
@@ -142,8 +142,8 @@
FT_LOCAL_DEF( FT_Fixed )
PS_Conv_ToFixed( FT_Byte** cursor,
- FT_Byte* limit,
- FT_Int power_ten )
+ FT_Byte* limit,
+ FT_Int power_ten )
{
FT_Byte* p = *cursor;
FT_Fixed integral;
@@ -230,9 +230,9 @@
#if 0
FT_LOCAL_DEF( FT_UInt )
PS_Conv_StringDecode( FT_Byte** cursor,
- FT_Byte* limit,
- FT_Byte* buffer,
- FT_UInt n )
+ FT_Byte* limit,
+ FT_Byte* buffer,
+ FT_UInt n )
{
FT_Byte* p;
FT_UInt r = 0;
@@ -325,9 +325,9 @@
FT_LOCAL_DEF( FT_UInt )
PS_Conv_ASCIIHexDecode( FT_Byte** cursor,
- FT_Byte* limit,
- FT_Byte* buffer,
- FT_UInt n )
+ FT_Byte* limit,
+ FT_Byte* buffer,
+ FT_UInt n )
{
FT_Byte* p;
FT_UInt r = 0;
@@ -366,10 +366,10 @@
FT_LOCAL_DEF( FT_UInt )
PS_Conv_EexecDecode( FT_Byte** cursor,
- FT_Byte* limit,
- FT_Byte* buffer,
- FT_UInt n,
- FT_UShort* seed )
+ FT_Byte* limit,
+ FT_Byte* buffer,
+ FT_UInt n,
+ FT_UShort* seed )
{
FT_Byte* p;
FT_UInt r;
diff --git a/src/sfnt/ttsbit0.c b/src/sfnt/ttsbit0.c
index ce0e6c6..6e63fe2 100644
--- a/src/sfnt/ttsbit0.c
+++ b/src/sfnt/ttsbit0.c
@@ -173,7 +173,8 @@
/* XXX: Is this correct? */
bsize->height = ascender - descender;
- bsize->width = (FT_Short)( avgwidth * y_ppem + em_size / 2 ) / em_size;
+ bsize->width = (FT_Short)( avgwidth * y_ppem + em_size / 2 ) /
+ em_size;
/* assume 72dpi */
bsize->size = bsize->y_ppem;
diff --git a/src/truetype/ttdriver.c b/src/truetype/ttdriver.c
index d125a42..58f2711 100644
--- a/src/truetype/ttdriver.c
+++ b/src/truetype/ttdriver.c
@@ -168,7 +168,7 @@
return error;
}
-#endif
+#endif /* TT_CONFIG_OPTION_EMBEDDED_BITMAPS */
static FT_Error
@@ -196,7 +196,7 @@
return tt_size_select( size, index );
}
-#endif /* TT_CONFIG_OPTION_EMBEDDED_BITMAPS */
+#endif /* TT_CONFIG_OPTION_EMBEDDED_BITMAPS */
FT_Request_Metrics( size->face, req );