Commit 4b68007b4f5581a13a5d117e15dac377f8b2a37f

Werner Lemberg 2000-11-07T06:30:29

Complementing David's changes with formatting, adding documentation, etc. More `*'-convention formatting, adding the `a' resp. `an' prefix to variables.

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
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
diff --git a/docs/design/design-3.html b/docs/design/design-3.html
index e1b07d3..3b57bb3 100644
--- a/docs/design/design-3.html
+++ b/docs/design/design-3.html
@@ -280,7 +280,9 @@
     their relationships</p>
 
     <center>
-      <img src="simple-model.png" width=453 height=378>
+      <img src="simple-model.png"
+           width=453 height=378
+           alt="Simple library model">
     </center>
 
     <p>Note that this picture will be updated at the end of the next
diff --git a/docs/design/design-4.html b/docs/design/design-4.html
index a5829bb..6147da1 100644
--- a/docs/design/design-4.html
+++ b/docs/design/design-4.html
@@ -291,7 +291,9 @@
     graph of FreeType&nbsp;2's base design:</p>
 
     <center>
-      <img alt="Library Model" src="library-model.png" width=411 height=405>
+      <img src="library-model.png"
+           width=411 height=405
+           alt="Complete library model">
     </center>
 
 </td></tr>
diff --git a/include/freetype/internal/ftobjs.h b/include/freetype/internal/ftobjs.h
index 62d092d..31ece53 100644
--- a/include/freetype/internal/ftobjs.h
+++ b/include/freetype/internal/ftobjs.h
@@ -297,8 +297,8 @@
 #define FT_FACE_SIZE( x )     FT_FACE( x )->size
 
 
-  /* this must be kept exported -- it is used by the cache manager  */
-  /* even though it shouldn't be considered public for now..        */
+  /* this must be kept exported -- it is used by the cache manager */
+  /* even though it shouldn't be considered public for now         */
   FT_EXPORT( FT_Error )  FT_New_Size( FT_Face   face,
                                       FT_Size*  size );
 
diff --git a/include/freetype/internal/sfnt.h b/include/freetype/internal/sfnt.h
index 8689ca4..f9cc0ac 100644
--- a/include/freetype/internal/sfnt.h
+++ b/include/freetype/internal/sfnt.h
@@ -243,7 +243,7 @@
   FT_Error  (*TT_Load_Any_Func)( TT_Face    face,
                                  FT_ULong   tag,
                                  FT_Long    offset,
-                                 FT_Byte*   buffer,
+                                 FT_Byte   *buffer,
                                  FT_ULong*  length );
 
 
@@ -268,9 +268,9 @@
   /*    stream      :: The input stream.                                   */
   /*                                                                       */
   /* <Output>                                                              */
-  /*    map         :: The target pixmap.                                  */
+  /*    amap        :: The target pixmap.                                  */
   /*                                                                       */
-  /*    metrics     :: A big sbit metrics structure for the glyph image.   */
+  /*    ametrics    :: A big sbit metrics structure for the glyph image.   */
   /*                                                                       */
   /* <Return>                                                              */
   /*    FreeType error code.  0 means success.  Returns an error if no     */
@@ -281,18 +281,43 @@
   /*                                                                       */
   typedef
   FT_Error  (*TT_Load_SBit_Image_Func)( TT_Face           face,
-					FT_ULong          strike_index,
+                                        FT_ULong          strike_index,
                                         FT_UInt           glyph_index,
                                         FT_UInt           load_flags,
                                         FT_Stream         stream,
-                                        FT_Bitmap*        map,
-                                        TT_SBit_Metrics*  metrics );
+                                        FT_Bitmap        *amap,
+                                        TT_SBit_Metrics  *ametrics );
 
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <FuncType>                                                            */
+  /*    TT_Set_SBit_Strike_Func                                            */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Selects an sbit strike for given horizontal and vertical ppem      */
+  /*    values.                                                            */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    face          :: The target face object.                           */
+  /*                                                                       */
+  /*    x_ppem        :: The horizontal resolution in points per EM.       */
+  /*                                                                       */
+  /*    y_ppem        :: The vertical resolution in points per EM.         */
+  /*                                                                       */
+  /* <Output>                                                              */
+  /*    astrike_index :: The index of the sbit strike.                     */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.  Returns an error if no     */
+  /*    sbit strike exists for the selected ppem values.                   */
+  /*                                                                       */
   typedef
-  FT_Error  (*TT_Set_SBit_Strike_Func)( TT_Face           face,
-					FT_Int            x_ppem,
-					FT_Int            y_ppem,
-					FT_ULong*         astrike_index );
+  FT_Error  (*TT_Set_SBit_Strike_Func)( TT_Face    face,
+                                        FT_Int     x_ppem,
+                                        FT_Int     y_ppem,
+                                        FT_ULong  *astrike_index );
+
 
   /*************************************************************************/
   /*                                                                       */
@@ -479,9 +504,11 @@
     TT_Load_Table_Func        load_gasp;
     TT_Load_Table_Func        load_pclt;
 
+    /* see `ttload.h' */
     TT_Load_Table_Func        load_bitmap_header;
-    TT_Set_SBit_Strike_Func   set_sbit_strike;
+
     /* see `ttsbit.h' */
+    TT_Set_SBit_Strike_Func   set_sbit_strike;
     TT_Load_Table_Func        load_sbits;
     TT_Load_SBit_Image_Func   load_sbit_image;
     TT_Free_Table_Func        free_sbits;
diff --git a/include/freetype/internal/tttypes.h b/include/freetype/internal/tttypes.h
index 68ef1b7..9d6bd3d 100644
--- a/include/freetype/internal/tttypes.h
+++ b/include/freetype/internal/tttypes.h
@@ -700,11 +700,13 @@
   /*                                                                       */
   /*   index_ranges     :: An array of glyph index ranges.                 */
   /*                                                                       */
-  /*   color_ref        :: Unused.  color_ref is put in for future         */
+  /*   color_ref        :: Unused.  `color_ref' is put in for future       */
   /*                       enhancements, but these fields are already      */
-  /*			   in use by other platforms (e.g. Newton).        */
+  /*                       in use by other platforms (e.g. Newton).        */
   /*                       For details, please see                         */
-  /*                http://fonts.apple.com/TTRefMan/RM06/Chap6bloc.html    */
+  /*                                                                       */
+  /*                         http://fonts.apple.com/                       */
+  /*                                TTRefMan/RM06/Chap6bloc.html           */
   /*                                                                       */
   /*   hori             :: The line metrics for horizontal layouts.        */
   /*                                                                       */
@@ -721,9 +723,11 @@
   /*   bit_depth        :: The bit depth.  Valid values are 1, 2, 4,       */
   /*                       and 8.                                          */
   /*                                                                       */
-  /*   flags            :: Is this a vertical or horizontal strike?        */
-  /*                       For details, please see                         */
-  /*                http://fonts.apple.com/TTRefMan/RM06/Chap6bloc.html    */
+  /*   flags            :: Is this a vertical or horizontal strike?  For   */
+  /*                       details, please see                             */
+  /*                                                                       */
+  /*                         http://fonts.apple.com/                       */
+  /*                                TTRefMan/RM06/Chap6bloc.html           */
   /*                                                                       */
   typedef struct  TT_SBit_Strike_
   {
diff --git a/src/base/ftbbox.c b/src/base/ftbbox.c
index cbf9d5f..fb08ab4 100644
--- a/src/base/ftbbox.c
+++ b/src/base/ftbbox.c
@@ -357,7 +357,7 @@
   /*    FreeType error code.  0 means success.                             */
   /*                                                                       */
   FT_EXPORT_DEF( FT_Error )  FT_Outline_Get_BBox( FT_Outline*  outline,
-                                                  FT_BBox*     abbox )
+                                                  FT_BBox     *abbox )
   {
     FT_BBox     cbox;
     FT_BBox     bbox;
diff --git a/src/base/ftcalc.c b/src/base/ftcalc.c
index 3f98542..1d5e2a2 100644
--- a/src/base/ftcalc.c
+++ b/src/base/ftcalc.c
@@ -532,7 +532,7 @@
   /*                                                                       */
   FT_EXPORT_DEF( void )  FT_Add64( FT_Int64*  x,
                                    FT_Int64*  y,
-                                   FT_Int64*  z )
+                                   FT_Int64  *z )
   {
     register FT_UInt32  lo, hi;
 
@@ -565,7 +565,7 @@
   /*                                                                       */
   FT_EXPORT_DEF( void )  FT_MulTo64( FT_Int32   x,
                                      FT_Int32   y,
-                                     FT_Int64*  z )
+                                     FT_Int64  *z )
   {
     FT_Int32   s;
 
diff --git a/src/base/ftglyph.c b/src/base/ftglyph.c
index d7f7384..9b362a7 100644
--- a/src/base/ftglyph.c
+++ b/src/base/ftglyph.c
@@ -424,7 +424,7 @@
   /*    FreeType error code.  0 means success.                             */
   /*                                                                       */
   FT_EXPORT_DEF( FT_Error )  FT_Glyph_Copy( FT_Glyph   source,
-                                            FT_Glyph*  target )
+                                            FT_Glyph  *target )
   {
     FT_Glyph               copy;
     FT_Error               error;
@@ -476,7 +476,7 @@
   /*    FreeType error code.  0 means success.                             */
   /*                                                                       */
   FT_EXPORT_DEF( FT_Error )  FT_Get_Glyph( FT_GlyphSlot  slot,
-                                           FT_Glyph*     aglyph )
+                                           FT_Glyph     *aglyph )
   {
     FT_Library  library = slot->library;
     FT_Error    error;
@@ -646,13 +646,13 @@
   /*                                                                       */
   FT_EXPORT_DEF( void )  FT_Glyph_Get_CBox( FT_Glyph  glyph,
                                             FT_UInt   bbox_mode,
-                                            FT_BBox*  cbox )
+                                            FT_BBox  *acbox )
   {
     const FT_Glyph_Class*  clazz;
     FT_Error               error = FT_Err_Ok;
 
 
-    if ( !cbox || !glyph || !glyph->clazz )
+    if ( !acbox || !glyph || !glyph->clazz )
       error = FT_Err_Invalid_Argument;
     else
     {
@@ -662,24 +662,24 @@
       else
       {
         /* retrieve bbox in 26.6 coordinates */
-        clazz->glyph_bbox( glyph, cbox );
+        clazz->glyph_bbox( glyph, acbox );
 
         /* perform grid fitting if needed */
         if ( bbox_mode & ft_glyph_bbox_gridfit )
         {
-          cbox->xMin &= -64;
-          cbox->yMin &= -64;
-          cbox->xMax  = ( cbox->xMax + 63 ) & -64;
-          cbox->yMax  = ( cbox->yMax + 63 ) & -64;
+          acbox->xMin &= -64;
+          acbox->yMin &= -64;
+          acbox->xMax  = ( acbox->xMax + 63 ) & -64;
+          acbox->yMax  = ( acbox->yMax + 63 ) & -64;
         }
 
         /* convert to integer pixels if needed */
         if ( bbox_mode & ft_glyph_bbox_truncate )
         {
-          cbox->xMin >>= 6;
-          cbox->yMin >>= 6;
-          cbox->xMax >>= 6;
-          cbox->yMax >>= 6;
+          acbox->xMin >>= 6;
+          acbox->yMin >>= 6;
+          acbox->xMax >>= 6;
+          acbox->yMax >>= 6;
         }
       }
     }
diff --git a/src/base/ftinit.c b/src/base/ftinit.c
index 6cb9e5b..87c5b3d 100644
--- a/src/base/ftinit.c
+++ b/src/base/ftinit.c
@@ -123,7 +123,7 @@ const FT_Module_Class*  const ft_default_modules[] =
   /* <Return>                                                              */
   /*    FreeType error code.  0 means success.                             */
   /*                                                                       */
-  FT_EXPORT_DEF( FT_Error )  FT_Init_FreeType( FT_Library*  library )
+  FT_EXPORT_DEF( FT_Error )  FT_Init_FreeType( FT_Library  *alibrary )
   {
     FT_Error   error;
     FT_Memory  memory;
@@ -142,9 +142,9 @@ const FT_Module_Class*  const ft_default_modules[] =
     /* build a library out of it, then fill it with the set of */
     /* default drivers.                                        */
 
-    error = FT_New_Library( memory, library );
+    error = FT_New_Library( memory, alibrary );
     if ( !error )
-      FT_Add_Default_Modules( *library );
+      FT_Add_Default_Modules( *alibrary );
 
     return error;
   }
diff --git a/src/base/ftmac.c b/src/base/ftmac.c
index bf18059..ff7eb59 100644
--- a/src/base/ftmac.c
+++ b/src/base/ftmac.c
@@ -638,7 +638,7 @@
   /*    FreeType error code.  0 means success.                             */
   /*                                                                       */
   /* <Notes>                                                               */
-  /*    This function can be used to create FT_Face abjects from fonts     */
+  /*    This function can be used to create FT_Face objects from fonts     */
   /*    that are installed in the system like so:                          */
   /*                                                                       */
   /*      fond = GetResource( 'FOND', fontName );                          */
@@ -647,7 +647,7 @@
   FT_EXPORT_DEF( FT_Error )  FT_New_Face_From_FOND( FT_Library  library,
                                                     Handle      fond,
                                                     FT_Long     face_index,
-                                                    FT_Face*    aface )
+                                                    FT_Face    *aface )
   {
     short     sfnt_id, have_sfnt, have_lwfn = 0;
     Str255    lwfn_file_name;
@@ -703,7 +703,7 @@
   FT_EXPORT_DEF( FT_Error )  FT_New_Face( FT_Library   library,
                                           const char*  pathname,
                                           FT_Long      face_index,
-                                          FT_Face*     aface )
+                                          FT_Face     *aface )
   {
     FT_Open_Args  args;
     FSSpec        spec;
diff --git a/src/base/ftmm.c b/src/base/ftmm.c
index 8e7478d..c32c9f6 100644
--- a/src/base/ftmm.c
+++ b/src/base/ftmm.c
@@ -48,7 +48,7 @@
   /*    FreeType error code.  0 means success.                             */
   /*                                                                       */
   FT_EXPORT_DEF( FT_Error )  FT_Get_Multi_Master( FT_Face           face,
-                                                  FT_Multi_Master*  master )
+                                                  FT_Multi_Master  *amaster )
   {
     FT_Error  error;
 
@@ -67,7 +67,7 @@
       func = (FT_Get_MM_Func)driver->root.clazz->get_interface(
                                FT_MODULE( driver ), "get_mm" );
       if ( func )
-        error = func( face, master );
+        error = func( face, amaster );
     }
 
     return error;
diff --git a/src/base/ftnames.c b/src/base/ftnames.c
index d632747..03caf39 100644
--- a/src/base/ftnames.c
+++ b/src/base/ftnames.c
@@ -75,7 +75,7 @@
   /*                                                                       */
   FT_EXPORT_DEF( FT_Error ) FT_Get_Sfnt_Name( FT_Face       face,
                                               FT_UInt       index,
-                                              FT_SfntName*  aname )
+                                              FT_SfntName  *aname )
   {
     FT_Error  error = FT_Err_Invalid_Argument;
 
diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c
index 4b97e2e..b4018a9 100644
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -1337,7 +1337,7 @@
   FT_EXPORT_DEF( FT_Error )  FT_New_Face( FT_Library   library,
                                           const char*  pathname,
                                           FT_Long      face_index,
-                                          FT_Face*     aface )
+                                          FT_Face     *aface )
   {
     FT_Open_Args  args;
 
@@ -1399,7 +1399,7 @@
                                                  FT_Byte*    file_base,
                                                  FT_Long     file_size,
                                                  FT_Long     face_index,
-                                                 FT_Face*    face )
+                                                 FT_Face    *aface )
   {
     FT_Open_Args  args;
 
@@ -1412,7 +1412,7 @@
     args.memory_base = file_base;
     args.memory_size = file_size;
 
-    return FT_Open_Face( library, &args, face_index, face );
+    return FT_Open_Face( library, &args, face_index, aface );
   }
 
 
@@ -1459,7 +1459,7 @@
   FT_EXPORT_DEF( FT_Error )  FT_Open_Face( FT_Library     library,
                                            FT_Open_Args*  args,
                                            FT_Long        face_index,
-                                           FT_Face*       aface )
+                                           FT_Face       *aface )
   {
     FT_Error     error;
     FT_Driver    driver;
@@ -1810,7 +1810,7 @@
   /*    FreeType error code.  0 means success.                             */
   /*                                                                       */
   FT_EXPORT_DEF( FT_Error )  FT_New_Size( FT_Face   face,
-                                          FT_Size*  asize )
+                                          FT_Size  *asize )
   {
     FT_Error          error;
     FT_Memory         memory;
@@ -2178,7 +2178,7 @@
                                              FT_UInt     left_glyph,
                                              FT_UInt     right_glyph,
                                              FT_UInt     kern_mode,
-                                             FT_Vector*  kerning )
+                                             FT_Vector  *akerning )
   {
     FT_Error   error = FT_Err_Ok;
     FT_Driver  driver;
@@ -2188,32 +2188,32 @@
     if ( !face )
       return FT_Err_Invalid_Face_Handle;
 
-    if ( !kerning )
+    if ( !akerning )
       return FT_Err_Invalid_Argument;
 
     driver = face->driver;
     memory = driver->root.memory;
 
-    kerning->x = 0;
-    kerning->y = 0;
+    akerning->x = 0;
+    akerning->y = 0;
 
     if ( driver->clazz->get_kerning )
     {
       error = driver->clazz->get_kerning( face,
                                           left_glyph,
                                           right_glyph,
-                                          kerning );
+                                          akerning );
       if ( !error )
       {
         if ( kern_mode != ft_kerning_unscaled )
         {
-          kerning->x = FT_MulFix( kerning->x, face->size->metrics.x_scale );
-          kerning->y = FT_MulFix( kerning->y, face->size->metrics.y_scale );
+          akerning->x = FT_MulFix( akerning->x, face->size->metrics.x_scale );
+          akerning->y = FT_MulFix( akerning->y, face->size->metrics.y_scale );
 
           if ( kern_mode != ft_kerning_unfitted )
           {
-            kerning->x = ( kerning->x + 32 ) & -64;
-            kerning->y = ( kerning->y + 32 ) & -64;
+            akerning->x = ( akerning->x + 32 ) & -64;
+            akerning->y = ( akerning->y + 32 ) & -64;
           }
         }
       }
@@ -3203,7 +3203,7 @@
   /*    FreeType error code.  0 means success.                             */
   /*                                                                       */
   FT_EXPORT_DEF( FT_Error )  FT_New_Library( FT_Memory    memory,
-                                             FT_Library*  alibrary )
+                                             FT_Library  *alibrary )
   {
     FT_Library  library = 0;
     FT_Error    error;
diff --git a/src/base/ftoutln.c b/src/base/ftoutln.c
index 1477ec3..440530a 100644
--- a/src/base/ftoutln.c
+++ b/src/base/ftoutln.c
@@ -274,30 +274,30 @@
                                FT_Memory    memory,
                                FT_UInt      numPoints,
                                FT_Int       numContours,
-                               FT_Outline*  outline )
+                               FT_Outline  *anoutline )
   {
     FT_Error  error;
 
 
-    if ( !outline || !memory )
+    if ( !anoutline || !memory )
       return FT_Err_Invalid_Argument;
 
-    *outline = null_outline;
+    *anoutline = null_outline;
 
-    if ( ALLOC_ARRAY( outline->points,   numPoints * 2L, FT_Pos    ) ||
-         ALLOC_ARRAY( outline->tags,     numPoints,      FT_Byte   ) ||
-         ALLOC_ARRAY( outline->contours, numContours,    FT_UShort ) )
+    if ( ALLOC_ARRAY( anoutline->points,   numPoints * 2L, FT_Pos    ) ||
+         ALLOC_ARRAY( anoutline->tags,     numPoints,      FT_Byte   ) ||
+         ALLOC_ARRAY( anoutline->contours, numContours,    FT_UShort ) )
       goto Fail;
 
-    outline->n_points    = (FT_UShort)numPoints;
-    outline->n_contours  = (FT_Short)numContours;
-    outline->flags      |= ft_outline_owner;
+    anoutline->n_points    = (FT_UShort)numPoints;
+    anoutline->n_contours  = (FT_Short)numContours;
+    anoutline->flags      |= ft_outline_owner;
 
     return FT_Err_Ok;
 
   Fail:
-    outline->flags |= ft_outline_owner;
-    FT_Outline_Done_Internal( memory, outline );
+    anoutline->flags |= ft_outline_owner;
+    FT_Outline_Done_Internal( memory, anoutline );
 
     return error;
   }
@@ -338,13 +338,13 @@
   FT_EXPORT_DEF( FT_Error )  FT_Outline_New( FT_Library   library,
                                              FT_UInt      numPoints,
                                              FT_Int       numContours,
-                                             FT_Outline*  outline )
+                                             FT_Outline  *anoutline )
   {
     if ( !library )
       return FT_Err_Invalid_Library_Handle;
 
     return FT_Outline_New_Internal( library->memory, numPoints,
-                                    numContours, outline );
+                                    numContours, anoutline );
   }
 
 
@@ -368,7 +368,7 @@
   /*    FreeType error code.  0 means success.                             */
   /*                                                                       */
   FT_EXPORT_DEF( FT_Error )  FT_Outline_Copy( FT_Outline*  source,
-                                              FT_Outline*  target )
+                                              FT_Outline  *target )
   {
     FT_Int  is_owner;
 
@@ -484,12 +484,12 @@
   /*    Yes.                                                               */
   /*                                                                       */
   FT_EXPORT_DEF( void )  FT_Outline_Get_CBox( FT_Outline*  outline,
-                                              FT_BBox*     cbox )
+                                              FT_BBox     *acbox )
   {
     FT_Pos  xMin, yMin, xMax, yMax;
 
 
-    if ( outline && cbox )
+    if ( outline && acbox )
     {
       if ( outline->n_points == 0 )
       {
@@ -522,10 +522,10 @@
           if ( y > yMax ) yMax = y;
         }
       }
-      cbox->xMin = xMin;
-      cbox->xMax = xMax;
-      cbox->yMin = yMin;
-      cbox->yMax = yMax;
+      acbox->xMin = xMin;
+      acbox->xMax = xMax;
+      acbox->yMin = yMin;
+      acbox->yMax = yMax;
     }
   }
 
@@ -747,20 +747,20 @@
   /*                                                                       */
   FT_EXPORT_DEF( FT_Error )  FT_Outline_Get_Bitmap( FT_Library   library,
                                                     FT_Outline*  outline,
-                                                    FT_Bitmap*   bitmap )
+                                                    FT_Bitmap   *abitmap )
   {
     FT_Raster_Params  params;
 
 
-    if ( !bitmap )
+    if ( !abitmap )
       return FT_Err_Invalid_Argument;
 
     /* other checks are delayed to FT_Outline_Render() */
 
-    params.target = bitmap;
+    params.target = abitmap;
     params.flags  = 0;
 
-    if ( bitmap->pixel_mode == ft_pixel_mode_grays )
+    if ( abitmap->pixel_mode == ft_pixel_mode_grays )
       params.flags |= ft_raster_flag_aa;
 
     return FT_Outline_Render( library, outline, &params );
diff --git a/src/base/ftsystem.c b/src/base/ftsystem.c
index 8ae15ba..357df3b 100644
--- a/src/base/ftsystem.c
+++ b/src/base/ftsystem.c
@@ -231,12 +231,12 @@
   /*    FreeType error code.  0 means success.                             */
   /*                                                                       */
   FT_EXPORT_DEF( FT_Error )  FT_New_Stream( const char*  filepathname,
-                                            FT_Stream    stream )
+                                            FT_Stream    astream )
   {
     FILE*  file;
 
 
-    if ( !stream )
+    if ( !astream )
       return FT_Err_Invalid_Stream_Handle;
 
     file = fopen( filepathname, "rb" );
@@ -249,19 +249,19 @@
     }
 
     fseek( file, 0, SEEK_END );
-    stream->size = ftell( file );
+    astream->size = ftell( file );
     fseek( file, 0, SEEK_SET );
 
-    stream->descriptor.pointer = file;
-    stream->pathname.pointer   = (char*)filepathname;
-    stream->pos                = 0;
+    astream->descriptor.pointer = file;
+    astream->pathname.pointer   = (char*)filepathname;
+    astream->pos                = 0;
 
-    stream->read  = ft_io_stream;
-    stream->close = ft_close_stream;
+    astream->read  = ft_io_stream;
+    astream->close = ft_close_stream;
 
     FT_TRACE1(( "FT_New_Stream:" ));
     FT_TRACE1(( " opened `%s' (%d bytes) successfully\n",
-                filepathname, stream->size ));
+                filepathname, astream->size ));
 
     return FT_Err_Ok;
   }
diff --git a/src/cache/ftcchunk.c b/src/cache/ftcchunk.c
index a6a013e..c26c74d 100644
--- a/src/cache/ftcchunk.c
+++ b/src/cache/ftcchunk.c
@@ -106,7 +106,7 @@
 
   FT_EXPORT_DEF( FT_Error )  FTC_ChunkSet_New( FTC_Chunk_Cache  cache,
                                                FT_Pointer       type,
-                                               FTC_ChunkSet*    aset )
+                                               FTC_ChunkSet    *aset )
   {
     FT_Error      error;
     FT_Memory     memory  = cache->root.memory;
@@ -206,8 +206,8 @@
   FT_EXPORT_DEF( FT_Error )  FTC_ChunkSet_Lookup_Node(
                                FTC_ChunkSet    cset,
                                FT_UInt         glyph_index,
-                               FTC_ChunkNode*  anode,
-                               FT_UInt*        aindex )
+                               FTC_ChunkNode  *anode,
+                               FT_UInt        *anindex )
   {
     FTC_Chunk_Cache      cache   = cset->cache;
     FTC_Manager          manager = cache->root.manager;
@@ -252,8 +252,8 @@
         }
       }
 
-      *anode  = node;
-      *aindex = glyph_index - chunk_index * chunk_size;
+      *anode   = node;
+      *anindex = glyph_index - chunk_index * chunk_size;
     }
 
   Exit:
diff --git a/src/cache/ftcglyph.c b/src/cache/ftcglyph.c
index 503fc8e..bbe2b62 100644
--- a/src/cache/ftcglyph.c
+++ b/src/cache/ftcglyph.c
@@ -131,7 +131,7 @@
 
   FT_EXPORT_DEF( FT_Error )  FTC_GlyphSet_New( FTC_Glyph_Cache  cache,
                                                FT_Pointer       type,
-                                               FTC_GlyphSet*    aset )
+                                               FTC_GlyphSet    *aset )
   {
     FT_Error                error;
     FT_Memory               memory  = cache->root.memory;
@@ -228,7 +228,7 @@
   FT_EXPORT_DEF( FT_Error )  FTC_GlyphSet_Lookup_Node(
                                FTC_GlyphSet    gset,
                                FT_UInt         glyph_index,
-                               FTC_GlyphNode*  anode )
+                               FTC_GlyphNode  *anode )
   {
     FTC_Glyph_Cache      cache      = gset->cache;
     FTC_Manager          manager    = cache->root.manager;
diff --git a/src/cache/ftcimage.c b/src/cache/ftcimage.c
index fd1880f..f6fa4bf 100644
--- a/src/cache/ftcimage.c
+++ b/src/cache/ftcimage.c
@@ -262,7 +262,7 @@
 
 
   FT_EXPORT_DEF( FT_Error )  FTC_Image_Cache_New( FTC_Manager       manager,
-                                                  FTC_Image_Cache*  acache )
+                                                  FTC_Image_Cache  *acache )
   {
     return FTC_Manager_Register_Cache(
              manager,
diff --git a/src/cache/ftcmanag.c b/src/cache/ftcmanag.c
index 15aa57b..f61ebc4 100644
--- a/src/cache/ftcmanag.c
+++ b/src/cache/ftcmanag.c
@@ -213,7 +213,7 @@
                                               FT_ULong            max_bytes,
                                               FTC_Face_Requester  requester,
                                               FT_Pointer          req_data,
-                                              FTC_Manager*        amanager )
+                                              FTC_Manager        *amanager )
   {
     FT_Error     error;
     FT_Memory    memory;
@@ -319,7 +319,7 @@
 
   FT_EXPORT( FT_Error )  FTC_Manager_Lookup_Face( FTC_Manager  manager,
                                                   FTC_FaceID   face_id,
-                                                  FT_Face*     aface )
+                                                  FT_Face     *aface )
   {
     if ( !manager )
       return FT_Err_Invalid_Cache_Handle;
@@ -332,8 +332,8 @@
 
   FT_EXPORT( FT_Error )  FTC_Manager_Lookup_Size( FTC_Manager  manager,
                                                   FTC_Font     font,
-                                                  FT_Face*     aface,
-                                                  FT_Size*     asize )
+                                                  FT_Face     *aface,
+                                                  FT_Size     *asize )
   {
     FTC_FontRequest  req;
     FT_Error         error;
@@ -428,7 +428,7 @@
   FT_EXPORT( FT_Error )  FTC_Manager_Register_Cache(
                            FTC_Manager       manager,
                            FTC_Cache_Class*  clazz,
-                           FTC_Cache*        acache )
+                           FTC_Cache        *acache )
   {
     FT_Error  error = FT_Err_Invalid_Argument;
 
diff --git a/src/cache/ftcsbits.c b/src/cache/ftcsbits.c
index 83fbf34..209f3d3 100644
--- a/src/cache/ftcsbits.c
+++ b/src/cache/ftcsbits.c
@@ -355,7 +355,7 @@
 
 
   FT_EXPORT_DEF( FT_Error )  FTC_SBit_Cache_New( FTC_Manager      manager,
-                                                 FTC_SBit_Cache*  acache )
+                                                 FTC_SBit_Cache  *acache )
   {
     return FTC_Manager_Register_Cache(
               manager,
@@ -367,21 +367,21 @@
   FT_EXPORT( FT_Error )  FTC_SBit_Cache_Lookup( FTC_SBit_Cache   cache,
                                                 FTC_Image_Desc*  desc,
                                                 FT_UInt          gindex,
-                                                FTC_SBit*        asbit )
+                                                FTC_SBit        *ansbit )
   {
     FT_Error       error;
     FTC_ChunkNode  node;
     FT_UInt        cindex;
 
     /* argument checks delayed to FTC_Chunk_Cache_Lookup */
-    if (!asbit)
+    if (!ansbit)
       return FT_Err_Invalid_Argument;
       
-    *asbit = 0;
-    error  = FTC_Chunk_Cache_Lookup( &cache->root, desc, gindex,
-                                     &node, &cindex );
+    *ansbit = 0;
+    error   = FTC_Chunk_Cache_Lookup( &cache->root, desc, gindex,
+                                      &node, &cindex );
     if (!error)
-      *asbit = (FTC_SBit)node->elements + cindex;
+      *ansbit = (FTC_SBit)node->elements + cindex;
     
     return error;
   }
diff --git a/src/cache/ftlru.c b/src/cache/ftlru.c
index 0d1c025..7a41db6 100644
--- a/src/cache/ftlru.c
+++ b/src/cache/ftlru.c
@@ -41,16 +41,16 @@
                                          FT_Pointer           user_data,
                                          FT_Memory            memory,
                                          FT_Bool              pre_alloc,
-                                         FT_Lru*              alru )
+                                         FT_Lru              *anlru )
   {
     FT_Error  error;
     FT_Lru    lru;
 
 
-    if ( !alru )
+    if ( !anlru )
       return FT_Err_Invalid_Argument;
 
-    *alru = 0;
+    *anlru = 0;
     if ( !ALLOC( lru, sizeof ( *lru ) ) )
     {
       if ( pre_alloc )
@@ -72,7 +72,7 @@
       lru->memory       = memory;
       lru->user_data    = user_data;
 
-      *alru = lru;
+      *anlru = lru;
     }
 
   Exit:
@@ -132,7 +132,7 @@
 
   FT_EXPORT_DEF( FT_Error )  FT_Lru_Lookup_Node( FT_Lru       lru,
                                                  FT_LruKey    key,
-                                                 FT_LruNode*  anode )
+                                                 FT_LruNode  *anode )
   {
     FT_Error       error = 0;
     FT_ListNode    node;
@@ -258,7 +258,7 @@
 
   FT_EXPORT_DEF( FT_Error )  FT_Lru_Lookup( FT_Lru       lru,
                                             FT_LruKey    key,
-                                            FT_Pointer*  aobject )
+                                            FT_Pointer  *anobject )
   {
     FT_Error    error;
     FT_LruNode  node;
@@ -266,13 +266,13 @@
 
     /* check for valid `lru' and `key' delayed to FT_Lru_Lookup_Node() */
 
-    if ( !aobject )
+    if ( !anobject )
       return FT_Err_Invalid_Argument;
 
-    *aobject = 0;
+    *anobject = 0;
     error = FT_Lru_Lookup_Node( lru, key, &node );
     if ( !error )
-      *aobject = node->root.data;
+      *anobject = node->root.data;
 
     return error;
   }
diff --git a/src/sfnt/sfdriver.c b/src/sfnt/sfdriver.c
index 17a4b97..a2d28c0 100644
--- a/src/sfnt/sfdriver.c
+++ b/src/sfnt/sfdriver.c
@@ -172,7 +172,7 @@
 
 #ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
 
-    /* see `ttload.h` */
+    /* see `ttload.h' */
     TT_Load_Bitmap_Header,
 
     /* see `ttsbit.h' */
diff --git a/src/sfnt/sfobjs.c b/src/sfnt/sfobjs.c
index a1ed6c9..28e885c 100644
--- a/src/sfnt/sfobjs.c
+++ b/src/sfnt/sfobjs.c
@@ -267,38 +267,37 @@
 
     /* Load tables */
 
-    /* we now support two SFNT-based bitmapped font formats.       */
-    /* they are recognized easily as they do not include a "glyf"  */
-    /* table..                                                     */
+    /* We now support two SFNT-based bitmapped font formats.  They */
+    /* are recognized easily as they do not include a `glyf'       */
+    /* table.                                                      */
     /*                                                             */
-    /* the first format comes from Apple, and uses a table named   */
-    /* "bhed" instead of "head" to store the font header (using    */
-    /* the same format). it also doesn't include horizontal and    */
-    /* vertical metrics tables (i.e. "hhea" and "vhea" tables)     */
+    /* The first format comes from Apple, and uses a table named   */
+    /* `bhed' instead of `head' to store the font header (using    */
+    /* the same format).  It also doesn't include horizontal and   */
+    /* vertical metrics tables (i.e. `hhea' and `vhea' tables are  */
+    /* missing).                                                   */
     /*                                                             */
-    /* the other format comes from Microsoft, and is used with     */
-    /* WinCE / PocketPC. It's standard, except that it doesn't     */
-    /* contain outlines..                                          */
+    /* The other format comes from Microsoft, and is used with     */
+    /* WinCE/PocketPC.  It looks like a standard TTF, except that  */
+    /* it doesn't contain outlines.                                */
     /*                                                             */
 
-    /* do we have outlines in there ?? */
-    has_outline   = (TT_LookUp_Table( face, TTAG_glyf ) != 0);
+    /* do we have outlines in there? */
+    has_outline   = ( TT_LookUp_Table( face, TTAG_glyf ) != 0 );
     is_apple_sbit = 0;
     
 #ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
 
-    /*
-     * if this font doesn't contain outlines, we'll try to load
-     * a "bhed" table in it..
-     */
+    /* if this font doesn't contain outlines, we try to load */
+    /* a `bhed' table                                        */
     if ( !has_outline )
-      is_apple_sbit = !LOAD_(bitmap_header);
+      is_apple_sbit = !LOAD_( bitmap_header );
 
-#endif
+#endif /* TT_CONFIG_OPTION_EMBEDDED_BITMAPS */
 
-    /* load the font header ("head" table) if this isn't an Apple */
-    /* sbit font file..                                           */
-    if ( !is_apple_sbit && LOAD_(header) )
+    /* load the font header (`head' table) if this isn't an Apple */
+    /* sbit font file                                             */
+    if ( !is_apple_sbit && LOAD_( header ) )
       goto Exit;
 
     /* load other tables */
@@ -309,20 +308,20 @@
       goto Exit;
 
     /* do not load the metrics headers and tables if this is an Apple */
-    /* sbit font file..                                               */
+    /* sbit font file                                                 */
     if ( !is_apple_sbit )
     {
-      /* load the "hhea" and "hmtx" tables at once */
+      /* load the `hhea' and `hmtx' tables at once */
       error = sfnt->load_metrics( face, stream, 0 );
-      if (error)
+      if ( error )
         goto Exit;
         
-      /* try to load the "vhea" and "vmtx" tables at once */
+      /* try to load the `vhea' and `vmtx' tables at once */
       error = sfnt->load_metrics( face, stream, 1 );
-      if (error)
+      if ( error )
         goto Exit;
         
-      if ( LOAD_(os2) )
+      if ( LOAD_( os2 ) )
         goto Exit;
     }
 
diff --git a/src/sfnt/ttload.c b/src/sfnt/ttload.c
index 5d8ffcc..66d2f26 100644
--- a/src/sfnt/ttload.c
+++ b/src/sfnt/ttload.c
@@ -517,21 +517,26 @@
     return error;
   }
 
+
   FT_LOCAL_DEF
   FT_Error  TT_Load_Header( TT_Face    face,
-			    FT_Stream  stream )
+                            FT_Stream  stream )
   {
     return TT_Load_Generic_Header( face, stream, TTAG_head );
   }
 
+
 #ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
+
   FT_LOCAL_DEF
   FT_Error  TT_Load_Bitmap_Header( TT_Face    face,
-				   FT_Stream  stream )
+                                   FT_Stream  stream )
   {
     return TT_Load_Generic_Header( face, stream, TTAG_bhed );
   }
-#endif
+
+#endif /* TT_CONFIG_OPTION_EMBEDDED_BITMAPS */
+
 
   /*************************************************************************/
   /*                                                                       */
diff --git a/src/sfnt/ttload.h b/src/sfnt/ttload.h
index 92c1da0..1811191 100644
--- a/src/sfnt/ttload.h
+++ b/src/sfnt/ttload.h
@@ -121,10 +121,13 @@
                           FT_Stream  stream );
 
 #ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
+
   FT_LOCAL
   FT_Error  TT_Load_Bitmap_Header( TT_Face    face,
-				   FT_Stream  stream );
-#endif
+                                   FT_Stream  stream );
+
+#endif /* TT_CONFIG_OPTION_EMBEDDED_BITMAPS */
+
 
 #ifdef __cplusplus
   }
diff --git a/src/sfnt/ttsbit.c b/src/sfnt/ttsbit.c
index 0a783d1..505e44e 100644
--- a/src/sfnt/ttsbit.c
+++ b/src/sfnt/ttsbit.c
@@ -629,27 +629,29 @@
 
   
   FT_LOCAL_DEF
-  FT_Error  TT_Set_SBit_Strike( TT_Face   face,
-			        FT_Int    x_ppem,
-				FT_Int    y_ppem,
-				FT_ULong* astrike_index )
+  FT_Error  TT_Set_SBit_Strike( TT_Face    face,
+                                FT_Int     x_ppem,
+                                FT_Int     y_ppem,
+                                FT_ULong  *astrike_index )
   {
-    FT_Int i;
+    FT_Int  i;
+
 
     if ( x_ppem < 0 || x_ppem > 255 ||
-	 y_ppem < 1 || y_ppem > 255 )
+         y_ppem < 1 || y_ppem > 255 )
       return TT_Err_Invalid_PPem;
 
     for ( i = 0; i < face->num_sbit_strikes; i++ )
     {
-      if ( ( face->sbit_strikes[i].y_ppem  == y_ppem ) &&
-	   ( ( x_ppem == 0 ) ||
-	     ( face->sbit_strikes[i].x_ppem == x_ppem )))
+      if ( ( face->sbit_strikes[i].y_ppem  == y_ppem )  &&
+           ( ( x_ppem == 0 ) ||
+             ( face->sbit_strikes[i].x_ppem == x_ppem ) ) )
       {
-	*astrike_index = i;
-	return TT_Err_Ok;
+        *astrike_index = i;
+        return TT_Err_Ok;
       }
     }
+
     return TT_Err_Invalid_PPem;
   }
 
@@ -665,10 +667,12 @@
   /*                                                                       */
   /* <Input>                                                               */
   /*    glyph_index   :: The glyph index.                                  */
+  /*                                                                       */
   /*    strike        :: The source/current sbit strike.                   */
   /*                                                                       */
   /* <Output>                                                              */
   /*    arange        :: The sbit range containing the glyph index.        */
+  /*                                                                       */
   /*    aglyph_offset :: The offset of the glyph data in `EBDT' table.     */
   /*                                                                       */
   /* <Return>                                                              */
@@ -766,12 +770,16 @@
   /*                                                                       */
   /* <Input>                                                               */
   /*    face          :: The target face object.                           */
+  /*                                                                       */
   /*    glyph_index   :: The glyph index.                                  */
-  /*    strike_index  :: The current strike index.                          */
+  /*                                                                       */
+  /*    strike_index  :: The current strike index.                         */
   /*                                                                       */
   /* <Output>                                                              */
   /*    arange        :: The SBit range containing the glyph index.        */
+  /*                                                                       */
   /*    astrike       :: The SBit strike containing the glyph index.       */
+  /*                                                                       */
   /*    aglyph_offset :: The offset of the glyph data in `EBDT' table.     */
   /*                                                                       */
   /* <Return>                                                              */
@@ -781,21 +789,23 @@
   static
   FT_Error  Find_SBit_Image( TT_Face           face,
                              FT_UInt           glyph_index,
-			     FT_ULong          strike_index,
-                             TT_SBit_Range**   arange,
-                             TT_SBit_Strike**  astrike,
-                             FT_ULong*         aglyph_offset )
+                             FT_ULong          strike_index,
+                             TT_SBit_Range*   *arange,
+                             TT_SBit_Strike*  *astrike,
+                             FT_ULong         *aglyph_offset )
   {
-    FT_Error  error;
+    FT_Error         error;
     TT_SBit_Strike*  strike;
 
-    if ( !face->sbit_strikes || ( face->num_sbit_strikes <= (FT_Int)strike_index ) )
+
+    if ( !face->sbit_strikes                              || 
+         ( face->num_sbit_strikes <= (FT_Int)strike_index ) )
       goto Fail;
 
     strike = &face->sbit_strikes[strike_index];
 
     error = Find_SBit_Range( glyph_index, strike,
-			     arange, aglyph_offset );
+                             arange, aglyph_offset );
     if ( error )
       goto Fail;
 
@@ -921,8 +931,8 @@
   /*    Crops a bitmap to its tightest bounding box, and adjusts its       */
   /*    metrics.                                                           */
   /*                                                                       */
-  /* <Input>                                                               */
-  /*    image   :: The input glyph slot.                                   */
+  /* <InOut>                                                               */
+  /*    map     :: The bitmap.                                             */
   /*                                                                       */
   /*    metrics :: The corresponding metrics structure.                    */
   /*                                                                       */
@@ -1366,21 +1376,21 @@
   /*    returns its metrics.                                               */
   /*                                                                       */
   /* <Input>                                                               */
-  /*    face        :: The target face object.                             */
+  /*    face         :: The target face object.                            */
   /*                                                                       */
   /*    strike_index :: The current strike index.                          */
   /*                                                                       */
-  /*    glyph_index :: The current glyph index.                            */
+  /*    glyph_index  :: The current glyph index.                           */
   /*                                                                       */
-  /*    load_flags  :: The glyph load flags (the code checks for the flag  */
-  /*                   FT_LOAD_CROP_BITMAP                                 */
+  /*    load_flags   :: The glyph load flags (the code checks for the flag */
+  /*                    FT_LOAD_CROP_BITMAP).                              */
   /*                                                                       */
-  /*    stream      :: The input stream.                                   */
+  /*    stream       :: The input stream.                                  */
   /*                                                                       */
   /* <Output>                                                              */
-  /*    map         :: The target pixmap.                                  */
+  /*    map          :: The target pixmap.                                 */
   /*                                                                       */
-  /*    metrics     :: A big sbit metrics structure for the glyph image.   */
+  /*    metrics      :: A big sbit metrics structure for the glyph image.  */
   /*                                                                       */
   /* <Return>                                                              */
   /*    FreeType error code.  0 means success.  Returns an error if no     */
@@ -1391,12 +1401,12 @@
   /*                                                                       */
   FT_LOCAL_DEF
   FT_Error  TT_Load_SBit_Image( TT_Face           face,
-				FT_ULong          strike_index,
+                                FT_ULong          strike_index,
                                 FT_UInt           glyph_index,
                                 FT_UInt           load_flags,
                                 FT_Stream         stream,
-                                FT_Bitmap*        map,
-                                TT_SBit_Metrics*  metrics )
+                                FT_Bitmap        *map,
+                                TT_SBit_Metrics  *metrics )
   {
     FT_Error         error;
     FT_Memory        memory = stream->memory;
diff --git a/src/sfnt/ttsbit.h b/src/sfnt/ttsbit.h
index daaa34b..ce941b8 100644
--- a/src/sfnt/ttsbit.h
+++ b/src/sfnt/ttsbit.h
@@ -45,10 +45,10 @@
 
 
   FT_LOCAL
-  FT_Error  TT_Set_SBit_Strike( TT_Face   face,
-   			        FT_Int    x_ppem,
- 				FT_Int    y_ppem,
- 				FT_ULong *astrike_index );
+  FT_Error  TT_Set_SBit_Strike( TT_Face    face,
+                                FT_Int     x_ppem,
+                                FT_Int     y_ppem,
+                                FT_ULong  *astrike_index );
 
   FT_LOCAL
   FT_Error  TT_Load_SBit_Image( TT_Face           face,
@@ -60,7 +60,6 @@
                                 TT_SBit_Metrics  *metrics );
 
 
-
 #ifdef __cplusplus
   }
 #endif
diff --git a/src/truetype/ttgload.c b/src/truetype/ttgload.c
index 91d63ee..b414e2b 100644
--- a/src/truetype/ttgload.c
+++ b/src/truetype/ttgload.c
@@ -1345,15 +1345,13 @@
     glyph->num_subglyphs = 0;
 
 #ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
-    /*
-     * try to load embedded bitmap if any
-     * 
-     * XXX: The convention should be emphasized in
-     *      the documents.  Because some application
-     *      developpers confuse.
-     */
+
+    /* try to load embedded bitmap if any              */
+    /*                                                 */
+    /* XXX: The convention should be emphasized in     */
+    /*      the documents because it can be confusing. */
     if ( size                                    &&
-	 size->strike_index != 0xFFFF            &&
+         size->strike_index != 0xFFFF            &&
          sfnt->load_sbits                        &&
          ( load_flags & FT_LOAD_NO_BITMAP ) == 0 )
 
diff --git a/src/truetype/ttobjs.c b/src/truetype/ttobjs.c
index c8f414d..e45d81f 100644
--- a/src/truetype/ttobjs.c
+++ b/src/truetype/ttobjs.c
@@ -453,7 +453,8 @@
     size->ttmetrics.valid = FALSE;
     return error;
 
-#if defined(TT_CONFIG_OPTION_BYTECODE_INTERPRETER) || defined(TT_CONFIG_OPTION_EMBEDDED_BITMAPS)
+#if defined( TT_CONFIG_OPTION_BYTECODE_INTERPRETER ) || \
+    defined( TT_CONFIG_OPTION_EMBEDDED_BITMAPS )
 
   Fail_Exec:
     if ( !size->debug )
@@ -526,11 +527,11 @@
   /*************************************************************************/
   /*                                                                       */
   /* <Function>                                                            */
-  /*    TT_Reset_Size                                                      */
+  /*    Reset_Outline_Size                                                 */
   /*                                                                       */
   /* <Description>                                                         */
-  /*    Resets a TrueType size when resolutions and character dimensions   */
-  /*    have been changed.                                                 */
+  /*    Resets a TrueType outline size when resolutions and character      */
+  /*    dimensions have been changed.                                      */
   /*                                                                       */
   /* <Input>                                                               */
   /*    size :: A handle to the target size object.                        */
@@ -575,21 +576,19 @@
     }
 
     /* Compute root ascender, descender, test height, and max_advance */
-    {
-      metrics->ascender    = ( FT_MulFix( face->root.ascender,
-                                          metrics->y_scale ) + 32 ) & -64;
-      metrics->descender   = ( FT_MulFix( face->root.descender,
-                                          metrics->y_scale ) + 32 ) & -64;
-      metrics->height      = ( FT_MulFix( face->root.height,
-                                          metrics->y_scale ) + 32 ) & -64;
-      metrics->max_advance = ( FT_MulFix( face->root.max_advance_width,
-                                          metrics->x_scale ) + 32 ) & -64;
-    }
+    metrics->ascender    = ( FT_MulFix( face->root.ascender,
+                                        metrics->y_scale ) + 32 ) & -64;
+    metrics->descender   = ( FT_MulFix( face->root.descender,
+                                        metrics->y_scale ) + 32 ) & -64;
+    metrics->height      = ( FT_MulFix( face->root.height,
+                                        metrics->y_scale ) + 32 ) & -64;
+    metrics->max_advance = ( FT_MulFix( face->root.max_advance_width,
+                                        metrics->x_scale ) + 32 ) & -64;
 
 #ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
 
 #ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
-   /* set to "invalid" by default */
+    /* set to `invalid' by default */
     size->strike_index = 0xFFFF;
 #endif
 
@@ -673,7 +672,21 @@
     return error;
   }
 
+
 #ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    Reset_SBit_Size                                                    */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Resets a TrueType sbit size when resolutions and character         */
+  /*    dimensions have been changed.                                      */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    size :: A handle to the target size object.                        */
+  /*                                                                       */
   static
   FT_Error  Reset_SBit_Size( TT_Size size )
   {
@@ -685,9 +698,10 @@
     FT_Size_Metrics*  sbit_metrics;
     SFNT_Interface*   sfnt;
 
+
     metrics = &size->root.metrics;
 
-    if (size->strike_index != 0xFFFF)
+    if ( size->strike_index != 0xFFFF )
       return TT_Err_Ok;
 
     face = (TT_Face)size->root.face;
@@ -696,31 +710,31 @@
     sbit_metrics = &size->strike_metrics;
 
     error = sfnt->set_sbit_strike(face,
-				  metrics->x_ppem, metrics->y_ppem,
-				  &strike_index);
+                                  metrics->x_ppem, metrics->y_ppem,
+                                  &strike_index);
 
-    if (!error)
+    if ( !error )
     {
       TT_SBit_Strike*  strike = face->sbit_strikes + strike_index;
       
       
-      sbit_metrics->x_ppem = metrics->x_ppem;
-      sbit_metrics->y_ppem = metrics->y_ppem;
+      sbit_metrics->x_ppem      = metrics->x_ppem;
+      sbit_metrics->y_ppem      = metrics->y_ppem;
 #if 0
       /*
        * sbit_metrics->?_scale
        * are not used now.
        */
-      sbit_metrics->x_scale = 1 << 16;
-      sbit_metrics->y_scale = 1 << 16;
+      sbit_metrics->x_scale     = 1 << 16;
+      sbit_metrics->y_scale     = 1 << 16;
 #endif
       
-      sbit_metrics->ascender  = strike->hori.ascender << 6;
-      sbit_metrics->descender = strike->hori.descender << 6;
+      sbit_metrics->ascender    = strike->hori.ascender << 6;
+      sbit_metrics->descender   = strike->hori.descender << 6;
       
       /* XXX: Is this correct? */
-      sbit_metrics->height    = sbit_metrics->ascender -
-                                sbit_metrics->descender;
+      sbit_metrics->height      = sbit_metrics->ascender -
+                                  sbit_metrics->descender;
       
       /* XXX: Is this correct? */
       sbit_metrics->max_advance = ( strike->hori.min_origin_SB +
@@ -743,8 +757,10 @@
 
     return error;
   }
+
 #endif /* TT_CONFIG_OPTION_EMBEDDED_BITMAPS */
 
+
   /*************************************************************************/
   /*                                                                       */
   /* <Function>                                                            */
@@ -760,40 +776,46 @@
   FT_LOCAL_DEF
   FT_Error  TT_Reset_Size( TT_Size  size )
   {
-    FT_Face face;
+    FT_Face   face;
     FT_Error  error = TT_Err_Ok;
 
+
     face = size->root.face;
 
     if ( face->face_flags & FT_FACE_FLAG_SCALABLE )
     {
       if ( !size->ttmetrics.valid )
-	error = Reset_Outline_Size( size );
+        error = Reset_Outline_Size( size );
 
       if ( error )
-	 return error;
+        return error;
     }
 
 #ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
+
     if ( face->face_flags & FT_FACE_FLAG_FIXED_SIZES )
     {
       FT_Size_Metrics* sbit_metrics;
 
+
       if ( size->strike_index == 0xFFFF )
         error = Reset_SBit_Size( size );
 
       sbit_metrics = &size->strike_metrics;
 
-      if ((!error) && !( face->face_flags & FT_FACE_FLAG_SCALABLE ))
-	size->root.metrics = *sbit_metrics;
+      if ( !error && !( face->face_flags & FT_FACE_FLAG_SCALABLE ) )
+        size->root.metrics = *sbit_metrics;
     }
-#endif
-    if (face->face_flags & FT_FACE_FLAG_SCALABLE)
+
+#endif /* TT_CONFIG_OPTION_EMBEDDED_BITMAPS */
+
+    if ( face->face_flags & FT_FACE_FLAG_SCALABLE )
       return TT_Err_Ok;
     else
       return error;
   }
 
+
   /*************************************************************************/
   /*                                                                       */
   /* <Function>                                                            */
diff --git a/src/truetype/ttobjs.h b/src/truetype/ttobjs.h
index ebc47c1..9fa331e 100644
--- a/src/truetype/ttobjs.h
+++ b/src/truetype/ttobjs.h
@@ -305,7 +305,6 @@
   } TT_Size_Metrics;
 
 
-
   /*************************************************************************/
   /*                                                                       */
   /* TrueType size class.                                                  */
@@ -317,8 +316,10 @@
     TT_Size_Metrics    ttmetrics;
 
 #ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
-    FT_UInt               strike_index;    /* 0xFFFF to indicate invalid */
-    FT_Size_Metrics       strike_metrics;  /* current strike's metrics   */
+
+    FT_UInt            strike_index;    /* 0xFFFF to indicate invalid */
+    FT_Size_Metrics    strike_metrics;  /* current strike's metrics   */
+
 #endif
 
 #ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER