Formatting. Adding copyright notices. Removing an unnecessary file (smooth.h).
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
diff --git a/docs/glnames.py b/docs/glnames.py
index e81e78a..7b72669 100644
--- a/docs/glnames.py
+++ b/docs/glnames.py
@@ -1538,7 +1538,7 @@ def dump_glyph_list( file, glyph_list, adobe_extra ):
for name in glyph_list:
write( ' "' + name + '",\n' )
- name_list.append(name)
+ name_list.append( name )
write( "\n" )
write( "#ifdef FT_CONFIG_OPTION_ADOBE_GLYPH_LIST\n" )
@@ -1546,7 +1546,7 @@ def dump_glyph_list( file, glyph_list, adobe_extra ):
for name in adobe_extra:
write( ' "' + name + '",\n' )
- name_list.append(name)
+ name_list.append( name )
write( "\n" )
write( "#endif /* FT_CONFIG_OPTION_ADOBE_GLYPH_LIST */\n" )
diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c
index 20178d8..8b6a857 100644
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -666,7 +666,7 @@
slot->library = driver->root.library;
-
+
if ( FT_DRIVER_USES_OUTLINES( driver ) )
error = FT_GlyphLoader_New( memory, &slot->loader );
@@ -689,7 +689,7 @@
FREE( slot->bitmap.buffer );
slot->flags &= ~ft_glyph_own_bitmap;
}
-
+
/* clear all public fields in the glyph slot */
MEM_Set( &slot->metrics, 0, sizeof ( slot->metrics ) );
MEM_Set( &slot->outline, 0, sizeof ( slot->outline ) );
@@ -973,11 +973,11 @@
!( load_flags & FT_LOAD_FORCE_AUTOHINT ) )
autohint = 0;
}
-
+
if ( autohint )
{
FT_AutoHinter_Interface* hinting;
-
+
hinting = (FT_AutoHinter_Interface*)hinter->clazz->module_interface;
error = hinting->load_glyph( (FT_AutoHinter)hinter, slot, face->size,
@@ -1028,7 +1028,7 @@
( load_flags & FT_LOAD_MONOCHROME )
? ft_render_mode_mono
: ft_render_mode_normal );
- }
+ }
Exit:
return error;
@@ -2092,7 +2092,7 @@
{
kerning->x = FT_MulFix( kerning->x, face->size->metrics.x_scale );
kerning->y = FT_MulFix( kerning->y, face->size->metrics.y_scale );
-
+
if ( kern_mode != ft_kerning_unfitted )
{
kerning->x = ( kerning->x + 32 ) & -64;
@@ -2354,7 +2354,7 @@
if ( !result || result->glyph_format != slot->format )
result = FT_Lookup_Renderer( library, slot->format, 0 );
-
+
return result;
}
@@ -2791,7 +2791,7 @@
/* is the module a auto-hinter? */
if ( FT_MODULE_IS_HINTER( module ) )
library->auto_hinter = module;
-
+
/* if the module is a font driver */
if ( FT_MODULE_IS_DRIVER( module ) )
{
diff --git a/src/cff/t2gload.c b/src/cff/t2gload.c
index f1a5a8d..a0d5dc5 100644
--- a/src/cff/t2gload.c
+++ b/src/cff/t2gload.c
@@ -493,13 +493,13 @@
FT_Int first = 0;
FT_Vector* p1 = outline->points + first;
FT_Vector* p2 = outline->points + outline->n_points - 1;
-
+
if ( outline->n_contours > 1 )
{
first = outline->contours[outline->n_contours - 2] + 1;
p1 = outline->points + first;
}
-
+
if ( p1->x == p2->x && p1->y == p2->y )
outline->n_points--;
}
@@ -1118,16 +1118,16 @@
FT_TRACE4(( " rlinecurve" ));
-
+
if ( num_args < 8 || ( num_args - 6 ) & 1 )
goto Stack_Underflow;
-
+
if ( start_point( builder, x, y ) ||
check_points( builder, num_lines + 3 ) )
goto Memory_Error;
-
+
args = stack;
-
+
/* first, add the line segments */
while ( num_lines > 0 )
{
@@ -1137,7 +1137,7 @@
args += 2;
num_lines--;
}
-
+
/* then the curve */
x += args[0];
y += args[1];
@@ -1148,10 +1148,10 @@
x += args[4];
y += args[5];
add_point( builder, x, y, 1 );
- args = stack;
+ args = stack;
}
break;
-
+
case t2_op_rcurveline:
{
FT_Int num_curves = ( num_args - 2 ) / 6;
diff --git a/src/cff/t2load.c b/src/cff/t2load.c
index 2981c8c..fdbc9df 100644
--- a/src/cff/t2load.c
+++ b/src/cff/t2load.c
@@ -358,7 +358,7 @@
/* read format */
if ( FILE_Seek( offset ) || READ_Byte( format ) )
goto Exit;
-
+
select->format = format;
select->cache_count = 0; /* clear cache */
diff --git a/src/cid/cidgload.c b/src/cid/cidgload.c
index 0796365..4f32fa4 100644
--- a/src/cid/cidgload.c
+++ b/src/cid/cidgload.c
@@ -346,14 +346,14 @@
FT_Int first = 0;
FT_Vector* p1 = outline->points + first;
FT_Vector* p2 = outline->points + outline->n_points - 1;
-
+
if ( outline->n_contours > 1 )
{
first = outline->contours[outline->n_contours - 2] + 1;
p1 = outline->points + first;
}
-
+
if ( p1->x == p2->x && p1->y == p2->y )
outline->n_points--;
}
diff --git a/src/macfond/fonddrvr.c b/src/macfond/fonddrvr.c
index ffea65a..57f052b 100644
--- a/src/macfond/fonddrvr.c
+++ b/src/macfond/fonddrvr.c
@@ -516,9 +516,9 @@ error:
"fond", /* driver name */
0x10000L, /* driver version == 1.0 */
0x20000L, /* driver requires FreeType 2.0 or above */
-
+
(void*)0,
-
+
(FT_Module_Constructor) init_driver,
(FT_Module_Destructor) done_driver,
(FT_Module_Requester) 0
diff --git a/src/psnames/psmodule.c b/src/psnames/psmodule.c
index 71cf414..3a1a8a1 100644
--- a/src/psnames/psmodule.c
+++ b/src/psnames/psmodule.c
@@ -300,7 +300,7 @@
#else
(void*)&psnames_interface, /* module specific interface */
#endif
-
+
(FT_Module_Constructor)0,
(FT_Module_Destructor) 0,
(FT_Module_Requester) 0
diff --git a/src/raster1/ftraster.c b/src/raster1/ftraster.c
index 5b7dfcc..19ca5aa 100644
--- a/src/raster1/ftraster.c
+++ b/src/raster1/ftraster.c
@@ -3133,7 +3133,7 @@
raster->gray_width = RASTER_GRAY_LINES / 2;
-#endif
+#endif
}
@@ -3221,7 +3221,7 @@
unsigned long mode,
const char* palette )
{
-#ifdef FT_RASTER_OPTION_ANTI_ALIASING
+#ifdef FT_RASTER_OPTION_ANTI_ALIASING
if ( mode == FT_MAKE_TAG( 'p', 'a', 'l', '5' ) )
{
@@ -3237,9 +3237,9 @@
UNUSED( raster );
UNUSED( mode );
- UNUSED( palette );
+ UNUSED( palette );
-#endif
+#endif
}
diff --git a/src/raster1/ftrend1.c b/src/raster1/ftrend1.c
index 1716fad..489cad9 100644
--- a/src/raster1/ftrend1.c
+++ b/src/raster1/ftrend1.c
@@ -27,7 +27,7 @@
FT_Error ft_raster1_init( FT_Renderer render )
{
FT_Library library = FT_MODULE_LIBRARY( render );
-
+
render->clazz->raster_class->raster_reset( render->raster,
library->raster_pool,
@@ -35,7 +35,7 @@
return FT_Err_Ok;
}
-
+
/* set render-specific mode */
static
@@ -47,7 +47,7 @@
return render->clazz->raster_class->raster_set_mode( render->raster,
mode_tag,
data );
- }
+ }
/* transform a given glyph image */
@@ -58,20 +58,20 @@
FT_Vector* delta )
{
FT_Error error = FT_Err_Ok;
-
-
+
+
if ( slot->format != render->glyph_format )
{
error = FT_Err_Invalid_Argument;
goto Exit;
}
-
+
if ( matrix )
FT_Outline_Transform( &slot->outline, matrix );
-
+
if ( delta )
FT_Outline_Translate( &slot->outline, delta->x, delta->y );
-
+
Exit:
return error;
}
@@ -87,8 +87,8 @@
if ( slot->format == render->glyph_format )
FT_Outline_Get_CBox( &slot->outline, cbox );
- }
-
+ }
+
/* convert a slot's glyph image into a bitmap */
static
@@ -103,9 +103,9 @@
FT_UInt width, height, pitch;
FT_Bitmap* bitmap;
FT_Memory memory;
-
+
FT_Raster_Params params;
-
+
/* check glyph image format */
if ( slot->format != render->glyph_format )
@@ -127,16 +127,16 @@
if ( render->clazz == &ft_raster5_renderer_class )
return FT_Err_Cannot_Render_Glyph;
}
-
+
outline = &slot->outline;
-
+
/* translate the outline to the new origin if needed */
if ( origin )
FT_Outline_Translate( outline, origin->x, origin->y );
-
+
/* compute the control box, and grid fit it */
FT_Outline_Get_CBox( outline, &cbox );
-
+
cbox.xMin &= -64;
cbox.yMin &= -64;
cbox.xMax = ( cbox.xMax + 63 ) & -64;
@@ -146,14 +146,14 @@
height = ( cbox.yMax - cbox.yMin ) >> 6;
bitmap = &slot->bitmap;
memory = render->root.memory;
-
+
/* release old bitmap buffer */
if ( slot->flags & ft_glyph_own_bitmap )
{
FREE( bitmap->buffer );
slot->flags &= ~ft_glyph_own_bitmap;
}
-
+
/* allocate new one, depends on pixel format */
if ( !( mode & ft_render_mode_mono ) )
{
@@ -171,12 +171,12 @@
bitmap->width = width;
bitmap->rows = height;
bitmap->pitch = pitch;
-
+
if ( ALLOC( bitmap->buffer, (FT_ULong)pitch * height ) )
goto Exit;
slot->flags |= ft_glyph_own_bitmap;
-
+
/* translate outline to render it into the bitmap */
FT_Outline_Translate( outline, -cbox.xMin, -cbox.yMin );
@@ -192,7 +192,7 @@
error = render->raster_render( render->raster, ¶ms );
if ( error )
goto Exit;
-
+
slot->format = ft_glyph_format_bitmap;
slot->bitmap_left = cbox.xMin >> 6;
slot->bitmap_top = cbox.yMax >> 6;
@@ -207,28 +207,28 @@
{
ft_module_renderer,
sizeof( FT_RendererRec ),
-
+
"raster1",
0x10000L,
0x20000L,
-
+
0, /* module specific interface */
-
+
(FT_Module_Constructor)ft_raster1_init,
(FT_Module_Destructor) 0,
(FT_Module_Requester) 0
},
-
+
ft_glyph_format_outline,
-
+
(FTRenderer_render) ft_raster1_render,
(FTRenderer_transform)ft_raster1_transform,
(FTRenderer_getCBox) ft_raster1_get_cbox,
(FTRenderer_setMode) ft_raster1_set_mode,
-
+
(FT_Raster_Funcs*) &ft_standard_raster
};
-
+
/* this renderer is _NOT_ part of the default modules, you'll need */
/* to register it by hand in your application. It should only be */
@@ -238,20 +238,20 @@
{
ft_module_renderer,
sizeof( FT_RendererRec ),
-
+
"raster5",
0x10000L,
0x20000L,
-
+
0, /* module specific interface */
-
+
(FT_Module_Constructor)ft_raster1_init,
(FT_Module_Destructor) 0,
(FT_Module_Requester) 0
},
ft_glyph_format_outline,
-
+
(FTRenderer_render) ft_raster1_render,
(FTRenderer_transform)ft_raster1_transform,
(FTRenderer_getCBox) ft_raster1_get_cbox,
diff --git a/src/raster1/rules.mk b/src/raster1/rules.mk
index f3b10a7..bd7da8a 100644
--- a/src/raster1/rules.mk
+++ b/src/raster1/rules.mk
@@ -48,19 +48,19 @@ RAS1_DRV_H := $(RAS1_DRV_SRC:%.c=%.h)
RAS1_DRV_OBJ_M := $(RAS1_DRV_SRC:$(RAS1_DIR_)%.c=$(OBJ_)%.$O)
RAS1_DRV_OBJ_S := $(OBJ_)raster1.$O
-# RASTER1 driver source file for single build
+# raster1 driver source file for single build
#
RAS1_DRV_SRC_S := $(RAS1_DIR_)raster1.c
-# RASTER1 driver - single object
+# raster1 driver - single object
#
$(RAS1_DRV_OBJ_S): $(RAS1_DRV_SRC_S) $(RAS1_DRV_SRC) \
$(FREETYPE_H) $(RAS1_DRV_H)
$(RAS1_COMPILE) $T$@ $(RAS1_DRV_SRC_S)
-# RASTER1 driver - multiple objects
+# raster1 driver - multiple objects
#
$(OBJ_)%.$O: $(RAS1_DIR_)%.c $(FREETYPE_H) $(RAS1_DRV_H)
$(RAS1_COMPILE) $T$@ $<
diff --git a/src/sfnt/sfdriver.c b/src/sfnt/sfdriver.c
index 0ef7c15..ccc67b5 100644
--- a/src/sfnt/sfdriver.c
+++ b/src/sfnt/sfdriver.c
@@ -156,17 +156,17 @@
{
0, /* not a font driver or renderer */
sizeof( FT_ModuleRec ),
-
+
"sfnt", /* driver name */
0x10000L, /* driver version 1.0 */
0x20000L, /* driver requires FreeType 2.0 or higher */
-
+
(const void*)&sfnt_interface, /* module specific interface */
-
+
(FT_Module_Constructor)0,
(FT_Module_Destructor) 0,
(FT_Module_Requester) SFNT_Get_Interface
};
-
+
/* END */
diff --git a/src/sfnt/ttcmap.c b/src/sfnt/ttcmap.c
index 75f8106..d838520 100644
--- a/src/sfnt/ttcmap.c
+++ b/src/sfnt/ttcmap.c
@@ -346,8 +346,8 @@
/* Glyph index into the glyphs array. 0 if the glyph does not exist. */
/* */
static
- FT_UInt code_to_index0( TT_CMapTable* cmap,
- FT_ULong charCode )
+ FT_UInt code_to_index0( TT_CMapTable* cmap,
+ FT_ULong charCode )
{
TT_CMap0* cmap0 = &cmap->c.cmap0;
@@ -389,8 +389,8 @@
if ( char_hi == 0 )
{
- /* an 8-bit character code - we use the subHeader 0 in this case */
- /* to test whether the character code is in the charmap */
+ /* an 8-bit character code -- we use the subHeader 0 in this case */
+ /* to test whether the character code is in the charmap */
if ( cmap2->subHeaderKeys[char_lo] == 0 )
result = cmap2->glyphIdArray[char_lo];
}
@@ -452,7 +452,7 @@
/* check against the last segment */
seg4 = cmap4->last_segment;
-
+
/* the following is equivalent to performing two tests, as in */
/* */
/* if ( charCode >= seg4->startCount && charCode <= seg4->endCount ) */
diff --git a/src/sfnt/ttload.c b/src/sfnt/ttload.c
index f8fb0a7..f448405 100644
--- a/src/sfnt/ttload.c
+++ b/src/sfnt/ttload.c
@@ -63,7 +63,7 @@
(FT_Char)( tag >> 24 ),
(FT_Char)( tag >> 16 ),
(FT_Char)( tag >> 8 ),
- (FT_Char)( tag ) ));
+ (FT_Char)( tag ) ));
entry = face->dir_tables;
limit = entry + face->num_tables;
@@ -188,9 +188,9 @@
face->num_tables = 0;
- /* first of all, read the first 4 bytes. If it's `ttcf', then the */
- /* file is a TrueType collection, otherwise it can be any other */
- /* kind of font. */
+ /* first of all, read the first 4 bytes. If it is `ttcf', then the */
+ /* file is a TrueType collection, otherwise it can be any other */
+ /* kind of font. */
if ( READ_ULong( format_tag ) )
goto Exit;
@@ -238,8 +238,8 @@
/* now, check the values of `num_tables', `seach_range', etc. */
{
- FT_UInt num_tables = sfnt->num_tables;
- FT_ULong entry_selector = 1L << sfnt->entry_selector;
+ FT_UInt num_tables = sfnt->num_tables;
+ FT_ULong entry_selector = 1L << sfnt->entry_selector;
/* IMPORTANT: Many fonts have an incorrect `search_range' value, so */
@@ -547,7 +547,7 @@
goto Exit;
/* XXX: an adjustment that is necessary to load certain */
- /* broken fonts like `Keystrokes MT' :-( */
+ /* broken fonts like `Keystrokes MT' :-( */
/* */
/* We allocate 64 function entries by default when */
/* the maxFunctionDefs field is null. */
@@ -613,8 +613,10 @@
TT_LongMetrics** longs;
TT_ShortMetrics** shorts;
- FT_TRACE2(( "TT_Load_%s_Metrics: %08p\n",
- vertical ? "Vertical" : "Horizontal", face ));
+
+ FT_TRACE2(( "TT_Load_%s_Metrics: %08p\n", vertical ? "Vertical"
+ : "Horizontal",
+ face ));
if ( vertical )
{
@@ -661,7 +663,9 @@
if ( num_shorts < 0 )
{
- FT_ERROR(( "!! more metrics than glyphs!\n" ));
+ FT_ERROR(( "TT_Load_%s_Metrics: more metrics than glyphs!\n",
+ vertical ? "Vertical"
+ : "Horizontal" ));
error = vertical ? TT_Err_Invalid_Vert_Metrics
: TT_Err_Invalid_Horiz_Metrics;
@@ -787,7 +791,7 @@
}
else
{
- /* The horizontal header is mandatory, return an error if we */
+ /* The horizontal header is mandatory; return an error if we */
/* don't find it. */
error = face->goto_table( face, TTAG_hhea, stream, 0 );
if ( error )
@@ -956,7 +960,7 @@
if ( cur->string )
for ( j = 0; j < cur->stringLength; j++ )
{
- FT_Char c = *(cur->string + j);
+ FT_Char c = *( cur->string + j );
if ( (FT_Byte)c < 128 )
@@ -1063,7 +1067,7 @@
if ( READ_Fields( cmap_fields, &cmap_dir ) )
goto Exit;
- /* save space in face table for cmap tables */
+ /* reserve space in face table for cmap tables */
if ( ALLOC_ARRAY( face->charmaps,
cmap_dir.numCMaps,
TT_CharMapRec ) )
@@ -1215,7 +1219,7 @@
error = face->goto_table( face, TTAG_OS2, stream, 0 );
if ( error )
{
- FT_TRACE2(( "is missing\n!" ));
+ FT_TRACE2(( "is missing!\n" ));
face->os2.version = 0xFFFF;
error = TT_Err_Ok;
goto Exit;
@@ -1382,7 +1386,7 @@
/* TT_Load_Gasp */
/* */
/* <Description> */
- /* Loads the `GASP' table into a face object. */
+ /* Loads the `gasp' table into a face object. */
/* */
/* <Input> */
/* face :: A handle to the target face object. */
@@ -1473,7 +1477,7 @@
FT_UInt n, num_tables, version;
- /* the kern table is optional. exit silently if it is missing */
+ /* the kern table is optional; exit silently if it is missing */
error = face->goto_table( face, TTAG_kern, stream, 0 );
if ( error )
return TT_Err_Ok;
diff --git a/src/sfnt/ttload.h b/src/sfnt/ttload.h
index 800de4b..f4d9fa2 100644
--- a/src/sfnt/ttload.h
+++ b/src/sfnt/ttload.h
@@ -3,7 +3,7 @@
/* ttload.h */
/* */
/* Load the basic TrueType tables, i.e., tables that can be either in */
-/* TTF or OTF font (specification). */
+/* TTF or OTF fonts (specification). */
/* */
/* Copyright 1996-2000 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
@@ -24,9 +24,6 @@
#include <freetype/internal/ftstream.h>
#include <freetype/internal/tttypes.h>
-#if 0
-#include <ttobjs.h>
-#endif
#ifdef __cplusplus
extern "C" {
diff --git a/src/sfnt/ttpost.c b/src/sfnt/ttpost.c
index 8fad705..d613174 100644
--- a/src/sfnt/ttpost.c
+++ b/src/sfnt/ttpost.c
@@ -43,18 +43,21 @@
#define FT_COMPONENT trace_ttpost
- /* If this configuration macro is defined, we rely on the `psnames' */
+ /* 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 ) ( (FT_String*)psnames->macintosh_name( x ) )
+
#else /* FT_CONFIG_OPTION_POSTSCRIPT_NAMES */
- /* Otherwise, we ignore the `psnames' module, and provide our own */
+
+ /* 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. */
@@ -144,6 +147,7 @@
"Ccaron", "ccaron", "dmacron",
};
+
#endif /* FT_CONFIG_OPTION_POSTSCRIPT_NAMES */
@@ -226,9 +230,9 @@
FT_UInt len;
- if ( READ_Byte ( len ) ||
- ALLOC_ARRAY( name_strings[n], len+1, FT_Char ) ||
- FILE_Read ( name_strings[n], len ) )
+ if ( READ_Byte ( len ) ||
+ ALLOC_ARRAY( name_strings[n], len + 1, FT_Char ) ||
+ FILE_Read ( name_strings[n], len ) )
goto Fail1;
name_strings[n][len] = '\0';
diff --git a/src/sfnt/ttsbit.c b/src/sfnt/ttsbit.c
index 9768e63..f6ed29a 100644
--- a/src/sfnt/ttsbit.c
+++ b/src/sfnt/ttsbit.c
@@ -139,8 +139,8 @@
acc <<= 8; /* remove bits from accumulator */
loaded -= 8;
count -= 8;
- }
- while ( count >= 0 );
+
+ } while ( count >= 0 );
}
/* restore `count' to correct value */
@@ -748,7 +748,7 @@
TT_SBit_Strike** astrike,
FT_ULong* aglyph_offset )
{
- TT_SBit_Strike* strike = face->sbit_strikes;
+ TT_SBit_Strike* strike = face->sbit_strikes;
TT_SBit_Strike* strike_limit = strike + face->num_sbit_strikes;
@@ -878,7 +878,6 @@
}
-
/*************************************************************************/
/* */
/* <Function> */
@@ -921,7 +920,7 @@
/***********************************************************************/
/* */
- /* first of all, checks the top-most lines of the bitmap, and removes */
+ /* first of all, check the top-most lines of the bitmap, and remove */
/* them if they're empty. */
/* */
{
@@ -954,7 +953,8 @@
{
line = (FT_Byte*)map->buffer;
- MEM_Move( line, line + count * line_len, (rows - count) * line_len );
+ MEM_Move( line, line + count * line_len,
+ ( rows - count ) * line_len );
metrics->height -= count;
metrics->horiBearingY -= count;
@@ -970,7 +970,7 @@
/* second, crop the lower lines */
/* */
{
- line = (FT_Byte*)map->buffer + (rows - 1) * line_len;
+ line = (FT_Byte*)map->buffer + ( rows - 1 ) * line_len;
for ( count = 0; count < rows; count++ )
{
@@ -1040,6 +1040,7 @@
metrics->horiBearingX++;
metrics->vertBearingX++;
metrics->width--;
+
} while ( map->width > 0 );
Found_Left:
@@ -1067,6 +1068,7 @@
/* crop the whole glyph to the right */
map->width--;
metrics->width--;
+
} while ( map->width > 0 );
Found_Right:
@@ -1253,8 +1255,8 @@
return TT_Err_Invalid_File_Format;
}
- /* All right, we're in a compound format. First of all, read */
- /* the array of elements */
+ /* All right, we have a compound format. First of all, read */
+ /* the array of elements. */
{
TT_SBit_Component* components;
TT_SBit_Component* comp;
@@ -1414,6 +1416,8 @@
advance = strike->hori.ascender - strike->hori.descender;
top = advance / 10;
+ /* some heuristic values */
+
metrics->vertBearingX = -metrics->width / 2;
metrics->vertBearingY = advance / 10;
metrics->vertAdvance = advance * 12 / 10;
diff --git a/src/smooth/ftgrays.c b/src/smooth/ftgrays.c
index 458b045..61cc12f 100644
--- a/src/smooth/ftgrays.c
+++ b/src/smooth/ftgrays.c
@@ -54,9 +54,9 @@
/* understand how it works). */
/* */
/* Note, however, that this is a _very_ different implementation */
- /* compared Raph's. Coverage information is stored in a very different */
- /* way, and I don't use sorted vector paths. Also, it doesn't use */
- /* floating point values. */
+ /* compared to Raph's. Coverage information is stored in a very */
+ /* different way, and I don't use sorted vector paths. Also, it */
+ /* doesn't use floating point values. */
/* */
/* This renderer has the following advantages: */
/* */
@@ -94,6 +94,7 @@
#define FT_COMPONENT trace_aaraster
+ /* XXX: Adapt error code to FreeType conventions */
#define ErrRaster_Invalid_Outline -1
#ifdef _STANDALONE_
@@ -227,7 +228,7 @@
#endif /* GRAYS_COMPACT */
- typedef struct TRaster_
+ typedef struct TRaster_
{
PCell cells;
int max_cells;
@@ -370,7 +371,7 @@
/* flag to indicate that the cell isn't part of those we're interested */
/* in during the render phase. This means that: */
/* */
- /* . the new vertical position must be within min_ey..max_ey - 1. */
+ /* . the new vertical position must be within min_ey..max_ey-1. */
/* . the new horizontal position must be strictly less than max_ex */
/* */
/* Note that if a cell is to the left of the clipping region, it is */
@@ -567,8 +568,8 @@
dx = to_x - ras.x;
dy = to_y - ras.y;
- /* we should do something about the trivial case where dx == 0, */
- /* as it happens very often! XXXXX */
+ /* XXX: we should do something about the trivial case where dx == 0, */
+ /* as it happens very often! */
/* perform vertical clipping */
{
@@ -594,7 +595,7 @@
goto End;
}
- /* ok, we'll have to render several scanlines */
+ /* ok, we have to render several scanlines */
p = ( ONE_PIXEL - fy1 ) * dx;
first = ONE_PIXEL;
incr = 1;
@@ -928,7 +929,7 @@
Draw:
{
- TPos to_x, to_y, mid_x, mid_y;
+ TPos to_x, to_y, mid_x, mid_y;
to_x = arc[0].x;
@@ -949,11 +950,15 @@
/* a macro comparing two cell pointers. Returns true if a <= b. */
#if 1
+
#define PACK( a ) ( ( (long)(a)->y << 16 ) + (a)->x )
#define LESS_THAN( a, b ) ( PACK( a ) < PACK( b ) )
+
#else /* 1 */
+
#define LESS_THAN( a, b ) ( (a)->y < (b)->y || \
( (a)->y == (b)->y && (a)->x < (b)->x ) )
+
#endif /* 1 */
#define SWAP_CELLS( a, b, temp ) do \
@@ -967,8 +972,8 @@
#ifdef SHELL_SORT
- /* A simple shell sort algorithm that works directly on our */
- /* cells table.. */
+ /* a simple shell sort algorithm that works directly on our */
+ /* cells table */
static
void shell_sort ( PCell cells,
int count )
@@ -1013,7 +1018,7 @@
/* can even tailor our insertion threshold... */
#define QSORT_THRESHOLD 9 /* below this size, a sub-array will be sorted */
- /* through a normal insertion sort.. */
+ /* through a normal insertion sort */
static
void quick_sort( PCell cells,
@@ -1686,8 +1691,8 @@
static
FT_Outline_Funcs interface =
{
- (FT_Outline_MoveTo_Func)Move_To,
- (FT_Outline_LineTo_Func)Line_To,
+ (FT_Outline_MoveTo_Func) Move_To,
+ (FT_Outline_LineTo_Func) Line_To,
(FT_Outline_ConicTo_Func)Conic_To,
(FT_Outline_CubicTo_Func)Cubic_To,
0,
@@ -1713,8 +1718,8 @@
if ( ras.max_ex > ras.target.width ) ras.max_ex = ras.target.width;
if ( ras.max_ey > ras.target.rows ) ras.max_ey = ras.target.rows;
- /* simple heuristic used to speed-up the bezier decomposition */
- /* see the code in render_conic and render_cubic for more details */
+ /* simple heuristic used to speed-up the bezier decomposition -- see */
+ /* the code in render_conic() and render_cubic() for more details */
ras.conic_level = 32;
ras.cubic_level = 16;
@@ -1841,7 +1846,7 @@
if ( !target_map || !target_map->buffer )
return -1;
- /* XXXX: this version does not support monochrome rendering yet! */
+ /* XXX: this version does not support monochrome rendering yet! */
if ( !(params->flags & ft_raster_flag_aa) )
return ErrRaster_Invalid_Mode;
diff --git a/src/smooth/ftgrays.h b/src/smooth/ftgrays.h
index 51f44ce..2423a0e 100644
--- a/src/smooth/ftgrays.h
+++ b/src/smooth/ftgrays.h
@@ -7,8 +7,8 @@
/* 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. */
@@ -31,19 +31,22 @@
/*************************************************************************/
/* */
/* To make ftgrays.h independent from configuration files we check */
- /* whether FT_EXPORT_DEF has been defined already. */
+ /* whether FT_EXPORT_DEF has been defined already. */
/* */
/* On some systems and compilers (Win32 mostly), an extra keyword is */
/* necessary to compile the library as a DLL. */
/* */
#ifndef FT_EXPORT_VAR
-#define FT_EXPORT_VAR(x) extern x
+#define FT_EXPORT_VAR( x ) extern x
#endif
- FT_EXPORT_VAR(FT_Raster_Funcs) ft_grays_raster;
+ FT_EXPORT_VAR( FT_Raster_Funcs ) ft_grays_raster;
#ifdef __cplusplus
}
#endif
-#endif
+#endif /* FTGRAYS_H */
+
+
+/* END */
diff --git a/src/smooth/ftsmooth.c b/src/smooth/ftsmooth.c
index eed9246..1b1b0bd 100644
--- a/src/smooth/ftsmooth.c
+++ b/src/smooth/ftsmooth.c
@@ -1,72 +1,100 @@
+/***************************************************************************/
+/* */
+/* ftsmooth.c */
+/* */
+/* Anti-aliasing renderer interface (body). */
+/* */
+/* Copyright 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 */
+/* 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. */
+/* */
+/***************************************************************************/
+
+
#include <freetype/internal/ftobjs.h>
#include <freetype/ftoutln.h>
#include <ftsmooth.h>
#include <ftgrays.h>
- /* initialise renderer - init its raster */
- static FT_Error ft_smooth_init( FT_Renderer render )
+
+ /* initialize renderer -- init its raster */
+ static
+ FT_Error ft_smooth_init( FT_Renderer render )
{
- FT_Library library = FT_MODULE_LIBRARY(render);
+ FT_Library library = FT_MODULE_LIBRARY( render );
+
render->clazz->raster_class->raster_reset( render->raster,
- library->raster_pool, library->raster_pool_size );
+ library->raster_pool,
+ library->raster_pool_size );
return 0;
}
-
- /* sets render-specific mode */
- static FT_Error ft_smooth_set_mode( FT_Renderer render,
- FT_ULong mode_tag,
- FT_Pointer data )
+ /* sets render-specific mode */
+ static
+ FT_Error ft_smooth_set_mode( FT_Renderer render,
+ FT_ULong mode_tag,
+ FT_Pointer data )
{
/* we simply pass it to the raster */
- return render->clazz->raster_class->raster_set_mode(
- render->raster, mode_tag, data );
+ return render->clazz->raster_class->raster_set_mode( render->raster,
+ mode_tag,
+ data );
}
- /* transform a given glyph image */
- static FT_Error ft_smooth_transform( FT_Renderer render,
- FT_GlyphSlot slot,
- FT_Matrix* matrix,
- FT_Vector* delta )
+ /* transform a given glyph image */
+ static
+ FT_Error ft_smooth_transform( FT_Renderer render,
+ FT_GlyphSlot slot,
+ FT_Matrix* matrix,
+ FT_Vector* delta )
{
- FT_Error error = FT_Err_Ok;
+ FT_Error error = FT_Err_Ok;
- if (slot->format != render->glyph_format)
+
+ if ( slot->format != render->glyph_format )
{
error = FT_Err_Invalid_Argument;
goto Exit;
}
- if (matrix)
+ if ( matrix )
FT_Outline_Transform( &slot->outline, matrix );
- if (delta)
+ if ( delta )
FT_Outline_Translate( &slot->outline, delta->x, delta->y );
Exit:
return error;
}
- /* return the glyph's control box */
- static void ft_smooth_get_cbox( FT_Renderer render,
- FT_GlyphSlot slot,
- FT_BBox *cbox )
+
+ /* return the glyph's control box */
+ static
+ void ft_smooth_get_cbox( FT_Renderer render,
+ FT_GlyphSlot slot,
+ FT_BBox* cbox )
{
- MEM_Set( cbox, 0, sizeof(*cbox) );
+ MEM_Set( cbox, 0, sizeof ( *cbox ) );
- if (slot->format == render->glyph_format)
+ if ( slot->format == render->glyph_format )
FT_Outline_Get_CBox( &slot->outline, cbox );
}
- /* convert a slot's glyph image into a bitmap */
- static FT_Error ft_smooth_render( FT_Renderer render,
- FT_GlyphSlot slot,
- FT_UInt mode,
- FT_Vector* origin )
+ /* convert a slot's glyph image into a bitmap */
+ static
+ FT_Error ft_smooth_render( FT_Renderer render,
+ FT_GlyphSlot slot,
+ FT_UInt mode,
+ FT_Vector* origin )
{
FT_Error error;
FT_Outline* outline;
@@ -77,8 +105,9 @@
FT_Raster_Params params;
+
/* check glyph image format */
- if (slot->format != render->glyph_format)
+ if ( slot->format != render->glyph_format )
{
error = FT_Err_Invalid_Argument;
goto Exit;
@@ -91,7 +120,7 @@
outline = &slot->outline;
/* translate the outline to the new origin if needed */
- if (origin)
+ if ( origin )
FT_Outline_Translate( outline, origin->x, origin->y );
/* compute the control box, and grid fit it */
@@ -99,18 +128,18 @@
cbox.xMin &= -64;
cbox.yMin &= -64;
- cbox.xMax = (cbox.xMax+63) & -64;
- cbox.yMax = (cbox.yMax+63) & -64;
+ cbox.xMax = ( cbox.xMax + 63 ) & -64;
+ cbox.yMax = ( cbox.yMax + 63 ) & -64;
- width = (cbox.xMax - cbox.xMin) >> 6;
- height = (cbox.yMax - cbox.yMin) >> 6;
+ width = ( cbox.xMax - cbox.xMin ) >> 6;
+ height = ( cbox.yMax - cbox.yMin ) >> 6;
bitmap = &slot->bitmap;
memory = render->root.memory;
/* release old bitmap buffer */
- if ((slot->flags & ft_glyph_own_bitmap))
+ if ( slot->flags & ft_glyph_own_bitmap )
{
- FREE(bitmap->buffer);
+ FREE( bitmap->buffer );
slot->flags &= ~ft_glyph_own_bitmap;
}
@@ -122,7 +151,7 @@
bitmap->rows = height;
bitmap->pitch = pitch;
- if (ALLOC( bitmap->buffer, (FT_ULong)pitch * height ))
+ if ( ALLOC( bitmap->buffer, (FT_ULong)pitch * height ) )
goto Exit;
slot->flags |= ft_glyph_own_bitmap;
@@ -137,7 +166,8 @@
/* render outline into the bitmap */
error = render->raster_render( render->raster, ¶ms );
- if (error) goto Exit;
+ if ( error )
+ goto Exit;
slot->format = ft_glyph_format_bitmap;
slot->bitmap_left = cbox.xMin >> 6;
@@ -155,23 +185,25 @@
sizeof( FT_RendererRec ),
"smooth",
- 0x10000,
- 0x20000,
+ 0x10000L,
+ 0x20000L,
0, /* module specific interface */
- (FT_Module_Constructor) ft_smooth_init,
- (FT_Module_Destructor) 0,
- (FT_Module_Requester) 0
+ (FT_Module_Constructor)ft_smooth_init,
+ (FT_Module_Destructor) 0,
+ (FT_Module_Requester) 0
},
ft_glyph_format_outline,
- (FTRenderer_render) ft_smooth_render,
- (FTRenderer_transform) ft_smooth_transform,
- (FTRenderer_getCBox) ft_smooth_get_cbox,
- (FTRenderer_setMode) ft_smooth_set_mode,
+ (FTRenderer_render) ft_smooth_render,
+ (FTRenderer_transform)ft_smooth_transform,
+ (FTRenderer_getCBox) ft_smooth_get_cbox,
+ (FTRenderer_setMode) ft_smooth_set_mode,
- (FT_Raster_Funcs*) &ft_grays_raster
+ (FT_Raster_Funcs*) &ft_grays_raster
};
+
+/* END */
diff --git a/src/smooth/ftsmooth.h b/src/smooth/ftsmooth.h
index 67e0ecc..4b8a533 100644
--- a/src/smooth/ftsmooth.h
+++ b/src/smooth/ftsmooth.h
@@ -1,8 +1,35 @@
+/***************************************************************************/
+/* */
+/* ftsmooth.h */
+/* */
+/* Anti-aliasing renderer interface (specification). */
+/* */
+/* 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 */
+/* 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. */
+/* */
+/***************************************************************************/
+
+
#ifndef FTSMOOTH_H
#define FTSMOOTH_H
#include <freetype/ftrender.h>
- FT_EXPORT_VAR(const FT_Renderer_Class) ft_smooth_renderer_class;
+#ifndef FT_CONFIG_OPTION_NO_STD_RASTER
+ FT_EXPORT_VAR( const FT_Renderer_Class ) ft_std_renderer_class;
+#endif
+
+#ifndef FT_CONFIG_OPTION_NO_SMOOTH_RASTER
+ FT_EXPORT_VAR( const FT_Renderer_Class ) ft_smooth_renderer_class;
+#endif
#endif /* FTSMOOTH_H */
+
+
+/* END */
diff --git a/src/smooth/rules.mk b/src/smooth/rules.mk
index e0a0809..fd03339 100644
--- a/src/smooth/rules.mk
+++ b/src/smooth/rules.mk
@@ -13,33 +13,34 @@
# fully.
-# renderer driver directory
+# smooth driver directory
#
SMOOTH_DIR := $(SRC_)smooth
SMOOTH_DIR_ := $(SMOOTH_DIR)$(SEP)
-
# additional include flags used when compiling the driver
#
SMOOTH_INCLUDE := $(SMOOTH_DIR)
+
# compilation flags for the driver
#
SMOOTH_CFLAGS := $(SMOOTH_INCLUDE:%=$I%)
SMOOTH_COMPILE := $(FT_COMPILE) $(SMOOTH_CFLAGS)
-# SMOOTH driver sources (i.e., C files)
+# smooth driver sources (i.e., C files)
#
-SMOOTH_DRV_SRC := $(SMOOTH_DIR_)ftgrays.c \
+SMOOTH_DRV_SRC := $(SMOOTH_DIR_)ftgrays.c \
$(SMOOTH_DIR_)ftsmooth.c
-# SMOOTH driver headers
+
+# smooth driver headers
#
SMOOTH_DRV_H := $(SMOOTH_DRV_SRC:%c=%h)
-# SMOOTH driver object(s)
+# smooth driver object(s)
#
# SMOOTH_DRV_OBJ_M is used during `multi' builds.
# SMOOTH_DRV_OBJ_S is used during `single' builds.
@@ -47,19 +48,19 @@ SMOOTH_DRV_H := $(SMOOTH_DRV_SRC:%c=%h)
SMOOTH_DRV_OBJ_M := $(SMOOTH_DRV_SRC:$(SMOOTH_DIR_)%.c=$(OBJ_)%.$O)
SMOOTH_DRV_OBJ_S := $(OBJ_)smooth.$O
-# SMOOTH driver source file for single build
+# smooth driver source file for single build
#
SMOOTH_DRV_SRC_S := $(SMOOTH_DIR_)smooth.c
-# SMOOTH driver - single object
+# smooth driver - single object
#
$(SMOOTH_DRV_OBJ_S): $(SMOOTH_DRV_SRC_S) $(SMOOTH_DRV_SRC) \
$(FREETYPE_H) $(SMOOTH_DRV_H)
$(SMOOTH_COMPILE) $T$@ $(SMOOTH_DRV_SRC_S)
-# SMOOTH driver - multiple objects
+# smooth driver - multiple objects
#
$(OBJ_)%.$O: $(SMOOTH_DIR_)%.c $(FREETYPE_H) $(SMOOTH_DRV_H)
$(SMOOTH_COMPILE) $T$@ $<
diff --git a/src/smooth/smooth.c b/src/smooth/smooth.c
index 2657c02..bdb1245 100644
--- a/src/smooth/smooth.c
+++ b/src/smooth/smooth.c
@@ -1,4 +1,25 @@
+/***************************************************************************/
+/* */
+/* smooth.c */
+/* */
+/* FreeType anti-aliasing rasterer module component (body only). */
+/* */
+/* 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 */
+/* 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. */
+/* */
+/***************************************************************************/
+
+
#define FT_MAKE_OPTION_SINGLE_OBJECT
+
#include <ftgrays.c>
#include <ftsmooth.c>
+
+/* END */
diff --git a/src/smooth/smooth.h b/src/smooth/smooth.h
deleted file mode 100644
index 091d1ec..0000000
--- a/src/smooth/smooth.h
+++ /dev/null
@@ -1,14 +0,0 @@
-#ifndef RENDERER_H
-#define RENDERER_H
-
-#include <freetype/ftrender.h>
-
-#ifndef FT_CONFIG_OPTION_NO_STD_RASTER
- FT_EXPORT_VAR(const FT_Renderer_Class) ft_std_renderer_class;
-#endif
-
-#ifndef FT_CONFIG_OPTION_NO_SMOOTH_RASTER
- FT_EXPORT_VAR(const FT_Renderer_Class) ft_smooth_renderer_class;
-#endif
-
-#endif /* RENDERER_H */