Commit 920d41e038d5f8befa4d1572ee95cb4473191ff8

Werner Lemberg 2000-06-05T14:32:32

Removing trailing whitespace.

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
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
diff --git a/src/sfnt/sfobjs.c b/src/sfnt/sfobjs.c
index a71a451..958a49f 100644
--- a/src/sfnt/sfobjs.c
+++ b/src/sfnt/sfobjs.c
@@ -218,7 +218,7 @@
     /* check that we have a valid TrueType file */
     error = sfnt->load_sfnt_header( face, stream, face_index, &sfnt_header );
     if ( error )
-      goto Exit;                                    
+      goto Exit;
 
     face->format_tag = sfnt_header.format_tag;
     face->num_tables = sfnt_header.num_tables;
diff --git a/src/sfnt/ttcmap.c b/src/sfnt/ttcmap.c
index a5c32f2..6012301 100644
--- a/src/sfnt/ttcmap.c
+++ b/src/sfnt/ttcmap.c
@@ -225,7 +225,7 @@
       FORGET_Frame();
 
       cmap->get_index = code_to_index4;
-      
+
       cmap4->last_segment = cmap4->segments;
       break;
 
@@ -462,18 +462,18 @@
       /* the range here, the char code isn't in the charmap, so exit. */
       if ( charCode > seg4->endCount )
         continue;
-        
+
       if ( charCode >= seg4->startCount )
         goto Found;
     }
     return 0;
 
- Found:    
+ Found:
     cmap4->last_segment = seg4;
-    
+
     /* if the idRangeOffset is 0, we can compute the glyph index */
     /* directly                                                  */
-    
+
     if ( seg4->idRangeOffset == 0 )
       result = ( charCode + seg4->idDelta ) & 0xFFFF;
     else
diff --git a/src/sfnt/ttload.c b/src/sfnt/ttload.c
index 595ed6d..4355bed 100644
--- a/src/sfnt/ttload.c
+++ b/src/sfnt/ttload.c
@@ -160,7 +160,7 @@
     TT_Error  error;
     TT_ULong  format_tag;
     FT_Memory memory = stream->memory;
-    
+
     const FT_Frame_Field  sfnt_header_fields[] =
     {
       FT_FRAME_START( 8 ),
@@ -170,7 +170,7 @@
         FT_FRAME_USHORT( SFNT_Header, range_shift ),
       FT_FRAME_END
     };
-                  
+
     const FT_Frame_Field  ttc_header_fields[] =
     {
       FT_FRAME_START( 8 ),
@@ -235,7 +235,7 @@
     sfnt->format_tag = format_tag;
     if ( READ_Fields( sfnt_header_fields, sfnt ) )
       goto Exit;
-      
+
     /* now, check the values of `num_tables', `seach_range', etc. */
     {
       TT_UInt  num_tables     = sfnt->num_tables;
@@ -256,7 +256,7 @@
 
   Exit:
     return error;
-  }                                  
+  }
 
 
   /*************************************************************************/
@@ -1336,7 +1336,7 @@
         FT_FRAME_USHORT( TT_PCLT, CapHeight ),
       FT_FRAME_END
     };
-  
+
     static const FT_Frame_Field  pclt_fields2[] =
     {
       FT_FRAME_START( 4 ),
@@ -1346,11 +1346,11 @@
         FT_FRAME_BYTE( TT_PCLT, Reserved ),
       FT_FRAME_END
     };
-  
+
     TT_Error  error;
     TT_PCLT*  pclt = &face->pclt;
 
-    
+
     FT_TRACE2(( "PCLT " ));
 
     /* optional table */
@@ -1361,17 +1361,17 @@
       pclt->Version = 0;
       return TT_Err_Ok;
     }
-    
+
     if ( READ_Fields( pclt_fields, pclt )            ||
          FILE_Read  ( pclt->TypeFace, 16 )           ||
          FILE_Read  ( pclt->CharacterComplement, 8 ) ||
          FILE_Read  ( pclt->FileName, 6 )            ||
          READ_Fields( pclt_fields2, pclt )           )
       goto Exit;
-    
+
     FT_TRACE2(( "loaded\n" ));
 
-  Exit:    
+  Exit:
     return error;
   }
 
diff --git a/src/sfnt/ttpost.c b/src/sfnt/ttpost.c
index d6cc572..d928a45 100644
--- a/src/sfnt/ttpost.c
+++ b/src/sfnt/ttpost.c
@@ -2,20 +2,20 @@
 /*                                                                         */
 /*  ttpost.c                                                               */
 /*                                                                         */
-/*    Postscript names table processing (body).                            */
+/*    Postcript name table processing for TrueType and OpenType fonts      */
+/*    (body).                                                              */
 /*                                                                         */
-/*  Copyright 1996-1999 by                                                 */
+/*  Copyright 1996-2000 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
-/*  This file is part of the FreeType project, and may only be used        */
-/*  modified and distributed under the terms of the FreeType project       */
+/*  This file is part of the FreeType project, and may only be used,       */
+/*  modified, and distributed under the terms of the FreeType project      */
 /*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
 /*  this file you indicate that you have read the license and              */
 /*  understand and accept it fully.                                        */
 /*                                                                         */
 /***************************************************************************/
 
-
   /*************************************************************************/
   /*                                                                       */
   /* The post table is not completely loaded by the core engine.  This     */
@@ -24,6 +24,7 @@
   /*                                                                       */
   /*************************************************************************/
 
+
 #include <freetype/internal/ftstream.h>
 #include <freetype/internal/tterrors.h>
 #include <freetype/tttags.h>
@@ -31,19 +32,22 @@
 #include <ttpost.h>
 #include <ttload.h>
 
-/* When this configuration macro is defined, we rely on the "psnames" */
-/* module to grab the glyph names..                                   */
+  /* If this configuration macro is defined, we rely on the `psnames' */
+  /* module to grab the glyph names.                                  */
+
 #ifdef FT_CONFIG_OPTION_POSTSCRIPT_NAMES
+
 #include <freetype/internal/psnames.h>
-#define  MAC_NAME(x)  ((TT_String*)psnames->macintosh_name(x))
 
-#else
+#define MAC_NAME( x )  ( (TT_String*)psnames->macintosh_name( x ) )
+
+#else /* FT_CONFIG_OPTION_POSTSCRIPT_NAMES */
 
-/* Otherwise, we ignore the "psnames" module, then provide our own */
-/* table of Mac names.. Thus, it is possible to build a version of */
-/* FreeType without the Type 1 driver & PSNames module             */
+   /* Otherwise, we ignore the `psnames' module, and provide our own  */
+   /* table of Mac names.  Thus, it is possible to build a version of */
+   /* FreeType without the Type 1 driver & PSNames module.            */
 
-#define  MAC_NAME(x)  TT_Post_Default_Names[x]
+#define  MAC_NAME( x )  TT_Post_Default_Names[x]
 
   /* the 258 default Mac PS glyph names */
 
@@ -128,7 +132,8 @@
     "Idot", "Scedilla", "scedilla", "Cacute", "cacute",
     "Ccaron", "ccaron", "dmacron",
   };
-#endif
+
+#endif /* FT_CONFIG_OPTION_POSTSCRIPT_NAMES */
 
 
   static
@@ -164,6 +169,7 @@
     {
       TT_Int  n;
 
+
       if ( ALLOC_ARRAY ( glyph_indices, num_glyphs, TT_UShort ) ||
            ACCESS_Frame( num_glyphs * 2L )                      )
         goto Fail;
@@ -178,12 +184,14 @@
     {
       TT_Int  n;
 
+
       num_names = 0;
 
       for ( n = 0; n < num_glyphs; n++ )
       {
         TT_Int  index;
 
+
         index = glyph_indices[n];
         if ( index >= 258 )
         {
@@ -198,6 +206,7 @@
     {
       TT_Int  n;
 
+
       if ( ALLOC_ARRAY( name_strings, num_names, TT_Char* ) )
         goto Fail;
 
@@ -205,6 +214,7 @@
       {
         TT_UInt  len;
 
+
         if ( READ_Byte  ( len )                             ||
              ALLOC_ARRAY( name_strings[n], len+1, TT_Char ) ||
              FILE_Read  ( name_strings[n], len )            )
@@ -218,6 +228,7 @@
     {
       TT_Post_20*  table = &face->postscript_names.names.format_20;
 
+
       table->num_glyphs    = num_glyphs;
       table->num_names     = num_names;
       table->glyph_indices = glyph_indices;
@@ -230,6 +241,7 @@
     {
       TT_Int  n;
 
+
       for ( n = 0; n < num_names; n++ )
         FREE( name_strings[n] );
     }
@@ -317,16 +329,17 @@
 
     /* seek to the beginning of the PS names table */
     error = face->goto_table( face, TTAG_post, stream, 0 );
-    if (error) goto Exit;
+    if ( error )
+      goto Exit;
 
     /* now read postscript table */
     switch ( face->postscript.FormatType )
     {
-    case 0x00020000:
+    case 0x00020000L:
       error = Load_Format_20( face, stream );
       break;
 
-    case 0x00028000:
+    case 0x00028000L:
       error = Load_Format_25( face, stream );
       break;
 
@@ -352,7 +365,7 @@
     {
       switch ( face->postscript.FormatType )
       {
-      case 0x00020000:
+      case 0x00020000L:
         {
           TT_Post_20*  table = &names->names.format_20;
           TT_UInt      n;
@@ -369,7 +382,7 @@
         }
         break;
 
-      case 0x00028000:
+      case 0x00028000L:
         {
           TT_Post_25*  table = &names->names.format_25;
 
@@ -393,6 +406,8 @@
   /*    Gets the PostScript glyph name of a glyph.                         */
   /*                                                                       */
   /* <Input>                                                               */
+  /*    face   :: A handle to the parent face.                             */
+  /*                                                                       */
   /*    index  :: The glyph index.                                         */
   /*                                                                       */
   /*    PSname :: The address of a string pointer.  Will be NULL in case   */
@@ -410,9 +425,12 @@
   {
     TT_Error            error;
     TT_Post_Names*      names;
+
 #ifdef FT_CONFIG_OPTION_POSTSCRIPT_NAMES
     PSNames_Interface*  psnames;
 #endif
+
+
     if ( !face )
       return TT_Err_Invalid_Face_Handle;
 
@@ -421,23 +439,23 @@
 
 #ifdef FT_CONFIG_OPTION_POSTSCRIPT_NAMES
     psnames = (PSNames_Interface*)face->psnames;
-    if (!psnames)
+    if ( !psnames )
       return TT_Err_Unimplemented_Feature;
 #endif
 
-    names   = &face->postscript_names;
+    names = &face->postscript_names;
 
     /* `.notdef' by default */
-    *PSname = MAC_NAME(0);
+    *PSname = MAC_NAME( 0 );
 
     switch ( face->postscript.FormatType )
     {
-    case 0x00010000:
+    case 0x00010000L:
       if ( index < 258 )                    /* paranoid checking */
-        *PSname = MAC_NAME(index);
+        *PSname = MAC_NAME( index );
       break;
 
-    case 0x00020000:
+    case 0x00020000L:
       {
         TT_Post_20*  table = &names->names.format_20;
 
@@ -455,14 +473,14 @@
 
 
           if ( name_index < 258 )
-            *PSname = MAC_NAME(name_index);
+            *PSname = MAC_NAME( name_index );
           else
             *PSname = (TT_String*)table->glyph_names[name_index - 258];
         }
       }
       break;
 
-    case 0x00028000:
+    case 0x00028000L:
       {
         TT_Post_25*  table = &names->names.format_25;
 
@@ -477,12 +495,12 @@
         if ( index < table->num_glyphs )    /* paranoid checking */
         {
           index  += table->offsets[index];
-          *PSname = MAC_NAME(index);
+          *PSname = MAC_NAME( index );
         }
       }
       break;
 
-    case 0x00030000:
+    case 0x00030000L:
       break;                                /* nothing to do */
     }
 
diff --git a/src/sfnt/ttpost.h b/src/sfnt/ttpost.h
index 421397c..4c385d4 100644
--- a/src/sfnt/ttpost.h
+++ b/src/sfnt/ttpost.h
@@ -5,11 +5,11 @@
 /*    Postcript name table processing for TrueType and OpenType fonts      */
 /*    (specification).                                                     */
 /*                                                                         */
-/*  Copyright 1996-1999 by                                                 */
+/*  Copyright 1996-2000 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
-/*  This file is part of the FreeType project, and may only be used        */
-/*  modified and distributed under the terms of the FreeType project       */
+/*  This file is part of the FreeType project, and may only be used,       */
+/*  modified, and distributed under the terms of the FreeType project      */
 /*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
 /*  this file you indicate that you have read the license and              */
 /*  understand and accept it fully.                                        */
@@ -17,15 +17,6 @@
 /***************************************************************************/
 
 
-  /*************************************************************************/
-  /*                                                                       */
-  /* The post table is not completely loaded by the core engine.  This     */
-  /* file loads the missing PS glyph names and implements an API to access */
-  /* them.                                                                 */
-  /*                                                                       */
-  /*************************************************************************/
-
-
 #ifndef TTPOST_H
 #define TTPOST_H
 
@@ -47,25 +38,6 @@ extern "C" {
 #endif
 
 
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    TT_Get_PS_Name                                                     */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Gets the PostScript glyph name of a glyph.                         */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    index  :: The glyph index.                                         */
-  /*                                                                       */
-  /*    PSname :: The address of a string pointer.  Will be NULL in case   */
-  /*              of error, otherwise it is a pointer to the glyph name.   */
-  /*                                                                       */
-  /*              You must not modify the returned string!                 */
-  /*                                                                       */
-  /* <Output>                                                              */
-  /*    TrueType error code.  0 means success.                             */
-  /*                                                                       */
   LOCAL_DEF
   TT_Error TT_Get_PS_Name( TT_Face      face,
                            TT_UInt      index,
diff --git a/src/sfnt/ttsbit.c b/src/sfnt/ttsbit.c
index 7303af4..79e5f8a 100644
--- a/src/sfnt/ttsbit.c
+++ b/src/sfnt/ttsbit.c
@@ -4,20 +4,15 @@
 /*                                                                         */
 /*    TrueType and OpenType embedded bitmap support (body).                */
 /*                                                                         */
-/*  Copyright 1996-1999 by                                                 */
+/*  Copyright 1996-2000 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
-/*  This file is part of the FreeType project, and may only be used        */
-/*  modified and distributed under the terms of the FreeType project       */
+/*  This file is part of the FreeType project, and may only be used,       */
+/*  modified, and distributed under the terms of the FreeType project      */
 /*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
 /*  this file you indicate that you have read the license and              */
 /*  understand and accept it fully.                                        */
 /*                                                                         */
-/*                                                                         */
-/*  WARNING: This file should not be compiled directly, it is meant to be  */
-/*           included in the source of several font drivers (i.e., the TTF */
-/*           and OTF drivers).                                             */
-/*                                                                         */
 /***************************************************************************/
 
 
@@ -76,10 +71,10 @@
     line_incr = target->pitch;
     line_buff = target->buffer;
 
-    if (line_incr < 0)
-      line_buff -= line_incr*(target->rows-1);
+    if ( line_incr < 0 )
+      line_buff -= line_incr * ( target->rows - 1 );
 
-    line_buff += (x_offset >> 3) + y_offset * line_incr;
+    line_buff += ( x_offset >> 3 ) + y_offset * line_incr;
 
     /***********************************************************************/
     /*                                                                     */
@@ -112,16 +107,17 @@
           {
             FT_Byte  val;
 
+
             /* ensure that there are at least 8 bits in the accumulator */
             if ( loaded < 8 )
             {
-              acc    |= (FT_UShort)*source++ << (8 - loaded);
+              acc    |= (FT_UShort)*source++ << ( 8 - loaded );
               loaded += 8;
             }
 
             /* now write one byte */
-            val = (FT_Byte)(acc >> 8);
-            if (shift)
+            val = (FT_Byte)( acc >> 8 );
+            if ( shift )
             {
               cur[0] |= val >> shift;
               cur[1] |= val << space;
@@ -150,12 +146,12 @@
         /* ensure that there are at least `count' bits in the accumulator */
         if ( loaded < count )
         {
-          acc    |= (FT_UShort)*source++ << (8 - loaded);
+          acc    |= (FT_UShort)*source++ << ( 8 - loaded );
           loaded += 8;
         }
 
         /* now write remaining bits */
-        val     = ((FT_Byte)(acc >> 8)) & ~(0xFF >> count);
+        val     = ( (FT_Byte)( acc >> 8 ) ) & ~( 0xFF >> count );
         cur[0] |= val >> shift;
 
         if ( count > space )
@@ -288,6 +284,7 @@
   {
     TT_Error  error;
 
+
     if ( !ACCESS_Frame( 12L ) )
     {
       range->image_size = GET_ULong();
@@ -353,7 +350,7 @@
     {
       range->glyph_codes[n] = GET_UShort();
 
-      if (load_offsets)
+      if ( load_offsets )
         range->glyph_offsets[n] = (TT_ULong)range->image_offset +
                                   GET_UShort();
     }
@@ -375,6 +372,7 @@
   /*                                                                       */
   /* <Input>                                                               */
   /*    range  :: The target range.                                        */
+  /*                                                                       */
   /*    stream :: The input stream.                                        */
   /*                                                                       */
   /* <Return>                                                              */
@@ -395,24 +393,23 @@
       {
         TT_ULong  num_glyphs, n;
         TT_Int    size_elem;
-        TT_Bool   large = (range->index_format == 1);
+        TT_Bool   large = ( range->index_format == 1 );
 
 
         num_glyphs        = range->last_glyph - range->first_glyph + 1L;
         range->num_glyphs = num_glyphs;
-        num_glyphs++;    /* XXX : BEWARE - see spec */
+        num_glyphs++;                       /* XXX: BEWARE - see spec */
 
-        size_elem  = ( large ? 4 : 2 );
+        size_elem  = large ? 4 : 2;
 
         if ( ALLOC_ARRAY( range->glyph_offsets,
                           num_glyphs, TT_ULong )    ||
-
              ACCESS_Frame( num_glyphs * size_elem ) )
           goto Exit;
 
         for ( n = 0; n < num_glyphs; n++ )
           range->glyph_offsets[n] = (TT_ULong)( range->image_offset +
-                                     (large ? GET_ULong() : GET_UShort()) );
+                                     large ? GET_ULong() : GET_UShort() );
         FORGET_Frame();
       }
       break;
@@ -427,7 +424,7 @@
 
     case 5:
       error = Load_SBit_Const_Metrics( range, stream ) ||
-              Load_SBit_Range_Codes( range, stream, 0 );
+              Load_SBit_Range_Codes( range, stream, 0  );
       break;
 
     default:
@@ -449,6 +446,7 @@
   /*                                                                       */
   /* <Input>                                                               */
   /*    face   :: The target face object.                                  */
+  /*                                                                       */
   /*    stream :: The input stream.                                        */
   /*                                                                       */
   /* <Return>                                                              */
@@ -464,11 +462,12 @@
     TT_ULong   num_strikes;
     TT_ULong   table_base;
 
+
     face->num_sbit_strikes = 0;
 
     /* this table is optional */
     error = face->goto_table( face, TTAG_EBLC, stream, 0 );
-    if (error)
+    if ( error )
     {
       error = 0;
       goto Exit;
@@ -504,6 +503,7 @@
       TT_SBit_Strike*  strike = face->sbit_strikes;
       TT_ULong         count  = num_strikes;
 
+
       if ( ACCESS_Frame( 48L * num_strikes ) )
         goto Exit;
 
@@ -543,8 +543,8 @@
 
       while ( count > 0 )
       {
-        TT_SBit_Range* range;
-        TT_ULong       count2 = strike->num_ranges;
+        TT_SBit_Range*  range;
+        TT_ULong        count2 = strike->num_ranges;
 
 
         if ( ALLOC_ARRAY( strike->sbit_ranges,
@@ -630,6 +630,7 @@
         TT_SBit_Range*  range       = strike->sbit_ranges;
         TT_SBit_Range*  range_limit = range + strike->num_ranges;
 
+
         if ( range )
         {
           for ( ; range < range_limit; range++ )
@@ -772,7 +773,7 @@
   /*                                                                       */
   /* <Return>                                                              */
   /*    TrueType error code.  0 means success.  Returns                    */
-  /*    TT_Err_Invalid_Argument if no sbit exist for the requested glyph.  */
+  /*    TT_Err_Invalid_Argument if no sbit exists for the requested glyph. */
   /*                                                                       */
   static
   TT_Error  Find_SBit_Image( TT_Face           face,
@@ -788,7 +789,7 @@
     TT_SBit_Strike*  strike_limit = strike + face->num_sbit_strikes;
 
 
-    if ( !strike)
+    if ( !strike )
       goto Fail;
 
     for ( ; strike < strike_limit; strike++ )
@@ -828,6 +829,7 @@
   /*                                                                       */
   /* <Input>                                                               */
   /*    stream      :: The input stream.                                   */
+  /*                                                                       */
   /*    range       :: The SBit range containing the glyph.                */
   /*                                                                       */
   /* <Output>                                                              */
@@ -858,29 +860,30 @@
     case 2:
     case 8:
         /* variable small metrics */
-        {
-          TT_SBit_Small_Metrics  smetrics;
+      {
+        TT_SBit_Small_Metrics  smetrics;
 
-          /* read small metrics */
-          if ( ACCESS_Frame( 5L ) )
-            goto Exit;
-          TT_Load_Small_SBit_Metrics( &smetrics, stream );
-          FORGET_Frame();
 
-          /* convert it to a big metrics */
-          metrics->height       = smetrics.height;
-          metrics->width        = smetrics.width;
-          metrics->horiBearingX = smetrics.bearingX;
-          metrics->horiBearingY = smetrics.bearingY;
-          metrics->horiAdvance  = smetrics.advance;
-
-          /* these metrics are made up at a higher level when */
-          /* needed.                                          */
-          metrics->vertBearingX = 0;
-          metrics->vertBearingY = 0;
-          metrics->vertAdvance  = 0;
-        }
-        break;
+        /* read small metrics */
+        if ( ACCESS_Frame( 5L ) )
+          goto Exit;
+        TT_Load_Small_SBit_Metrics( &smetrics, stream );
+        FORGET_Frame();
+
+        /* convert it to a big metrics */
+        metrics->height       = smetrics.height;
+        metrics->width        = smetrics.width;
+        metrics->horiBearingX = smetrics.bearingX;
+        metrics->horiBearingY = smetrics.bearingY;
+        metrics->horiAdvance  = smetrics.advance;
+
+        /* these metrics are made up at a higher level when */
+        /* needed.                                          */
+        metrics->vertBearingX = 0;
+        metrics->vertBearingY = 0;
+        metrics->vertAdvance  = 0;
+      }
+      break;
 
     case 6:
     case 7:
@@ -895,7 +898,7 @@
       break;
 
     case 5:
-   default:  /* constant metrics */
+    default:  /* constant metrics */
       if ( range->index_format == 2 || range->index_format == 5 )
         *metrics = range->metrics;
       else
@@ -1058,7 +1061,7 @@
 
 
           val    = cur[1];
-          cur[0] = old | (val >> 7);
+          cur[0] = old | ( val >> 7 );
           old    = val << 1;
           cur++;
         }
@@ -1080,14 +1083,14 @@
     /*                                                                     */
     do
     {
-      TT_Int    right = map->width-1;
+      TT_Int    right = map->width - 1;
       TT_Byte*  limit;
       TT_Byte   mask;
 
 
-      line  = (TT_Byte*)map->buffer + (right >> 3);
-      limit = line + rows*line_len;
-      mask  = 0x80 >> (right & 7);
+      line  = (TT_Byte*)map->buffer + ( right >> 3 );
+      limit = line + rows * line_len;
+      mask  = 0x80 >> ( right & 7 );
 
       for ( ; line < limit; line += line_len )
         if ( line[0] & mask )
@@ -1150,10 +1153,10 @@
 
           switch ( pix_bits )
           {
-          case 1:  line_length = (glyph_width+7) >> 3;   break;
-          case 2:  line_length = (glyph_width+3) >> 2;   break;
-          case 4:  line_length = (glyph_width+1) >> 1;   break;
-          default: line_length =  glyph_width;
+          case 1:  line_length = ( glyph_width + 7 ) >> 3;   break;
+          case 2:  line_length = ( glyph_width + 3 ) >> 2;   break;
+          case 4:  line_length = ( glyph_width + 1 ) >> 1;   break;
+          default: line_length =   glyph_width;
           }
 
           glyph_size = glyph_height * line_length;
@@ -1201,8 +1204,8 @@
                             FT_Stream         stream,
                             TT_SBit_Metrics*  metrics )
   {
-    FT_Memory            memory = stream->memory;
-    TT_Error             error;
+    FT_Memory  memory = stream->memory;
+    TT_Error   error;
 
 
     /* place stream at beginning of glyph data and read metrics */
@@ -1229,15 +1232,15 @@
       {
       case 1:
         map->pixel_mode = ft_pixel_mode_mono;
-        map->pitch      = (map->width+7) >> 3;
+        map->pitch      = ( map->width + 7 ) >> 3;
         break;
       case 2:
         map->pixel_mode = ft_pixel_mode_pal2;
-        map->pitch      = (map->width+3) >> 2;
+        map->pitch      = ( map->width + 3 ) >> 2;
         break;
       case 4:
         map->pixel_mode = ft_pixel_mode_pal4;
-        map->pitch      = (map->width+1) >> 1;
+        map->pitch      = ( map->width + 1 ) >> 1;
         break;
       case 8:
         map->pixel_mode = ft_pixel_mode_grays;
@@ -1364,10 +1367,14 @@
   /*                                                                       */
   /*    glyph_index :: The current glyph index.                            */
   /*                                                                       */
+  /*    load_flags  :: The glyph load flags (the code checks for the flag  */
+  /*                   FT_LOAD_CROP_BITMAP                                 */
+  /*                                                                       */
   /*    stream      :: The input stream.                                   */
   /*                                                                       */
   /* <Output>                                                              */
   /*    map         :: The target pixmap.                                  */
+  /*                                                                       */
   /*    metrics     :: A big sbit metrics structure for the glyph image.   */
   /*                                                                       */
   /* <Return>                                                              */
@@ -1404,12 +1411,13 @@
     /* now, find the location of the `EBDT' table in */
     /* the font file                                 */
     error = face->goto_table( face, TTAG_EBDT, stream, 0 );
-    if (error) goto Exit;
+    if ( error )
+      goto Exit;
 
     ebdt_pos = FILE_Pos();
 
     /* clear the bitmap & load the bitmap */
-    if (face->root.glyph->flags & ft_glyph_own_bitmap)
+    if ( face->root.glyph->flags & ft_glyph_own_bitmap )
       FREE( map->buffer );
 
     map->rows = map->pitch = map->width = 0;
@@ -1439,7 +1447,7 @@
     }
 
     /* Crop the bitmap now, unless specified otherwise */
-    if (load_flags & FT_LOAD_CROP_BITMAP)
+    if ( load_flags & FT_LOAD_CROP_BITMAP )
       Crop_Bitmap( map, metrics );
 
   Exit:
diff --git a/src/sfnt/ttsbit.h b/src/sfnt/ttsbit.h
index 944dc3e..91833c0 100644
--- a/src/sfnt/ttsbit.h
+++ b/src/sfnt/ttsbit.h
@@ -4,11 +4,11 @@
 /*                                                                         */
 /*    TrueType and OpenType embedded bitmap support (specification).       */
 /*                                                                         */
-/*  Copyright 1996-1999 by                                                 */
+/*  Copyright 1996-2000 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
-/*  This file is part of the FreeType project, and may only be used        */
-/*  modified and distributed under the terms of the FreeType project       */
+/*  This file is part of the FreeType project, and may only be used,       */
+/*  modified, and distributed under the terms of the FreeType project      */
 /*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
 /*  this file you indicate that you have read the license and              */
 /*  understand and accept it fully.                                        */