Some formatting. * src/cff/cffcmap.c: Remove compiler warnings. * src/cache/ftccache.c, src/cache/ftccache.i, src/pfr/pfrload.c, src/pfr/pfrgload.c: s/index/idx/. * src/cff/cffload.c: s/select/fdselect/. * src/raster/ftraster.c: s/wait/waiting/.
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
diff --git a/ChangeLog b/ChangeLog
index 26ff004..ea1001e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,36 +1,63 @@
+2002-08-06 Werner Lemberg <wl@gnu.org>
+
+ * src/cff/cffcmap.c: Remove compiler warnings.
+ * src/cache/ftccache.c, src/cache/ftccache.i,
+ src/pfr/pfrload.c, src/pfr/pfrgload.c: s/index/idx/.
+ * src/cff/cffload.c: s/select/fdselect/.
+ * src/raster/ftraster.c: s/wait/waiting/.
+
2002-08-01 Graham Asher <graham.asher@btinternet.com>
- * src/type1/t1load.c:
- T1_Open_Face now tolerates a face with no charstrings if there
- is an incremental loading interface. Type 1 faces supplied by
- PostScript interpreters like GhostScript will typically not
- provide any charstrings at load time, so this is essential
- if they are to work.
+
+ * src/type1/t1load.c (T1_Open_Face): Tolerate a face with no
+ charstrings if there is an incremental loading interface. Type 1
+ faces supplied by PostScript interpreters like GhostScript will
+ typically not provide any charstrings at load time, so this is
+ essential if they are to work.
2002-08-01 Graham Asher <graham.asher@btinternet.com>
- * include/freetype/config/ftheader.h,
- include/freetype/freetype.h,
- include/freetype/ftincrem.h,
- include/freetype/internal/ftobjs.h,
- src/base/ftobjs.c,
- src/cid/cidgload.c,
- src/sfnt/sfobjs.c,
- src/truetype/ttgload.c,
- src/truetype/ttobjs.c,
- src/type1/t1gload.c:
- Modified incremental loading interface to be closer to David's
- preferences. The header freetype.h is not now affected,
- the interface is specified via an FT_Parameter, the pointer to
- the interface is hidden in an internal part of the face record,
- and all the definitions are in ftincrem.h.
+
+ Modified incremental loading interface to be closer to David's
+ preferences. The header freetype.h is not now affected, the
+ interface is specified via an FT_Parameter, the pointer to the
+ interface is hidden in an internal part of the face record, and all
+ the definitions are in ftincrem.h.
+
+ * include/freetype/freeetype.h [FT_CONFIG_OPTION_INCREMENTAL]:
+ Removed.
+ * include/freetype/internal/ftobjs.h [FT_CONFIG_OPTION_INCREMENTAL]:
+ Include FT_INCREMENTAL_H.
+ (FT_Face_InternalRec) [FT_CONFIG_OPTION_INCREMENTAL]: Add
+ `incremental_interface'.
+
+ * src/base/ftobjs.c (open_face, FT_Open_Face)
+ [FT_CONFIG_OPTION_INCREMENTAL]: Updated.
+ * src/sfnt/sfobjs.c (SFNT_Load_Face) [FT_CONFIG_OPTION_INCREMENTAL]:
+ Updated.
+
+ * src/truetype/ttgload.c (load_truetype_glyph)
+ [FT_CONFIG_OPTION_INCREMENTAL]: Updated.
+ Free loaded glyph data properly.
+ (compute_glyph_metrics, TT_Load_Glyph)
+ [FT_CONFIG_OPTION_INCREMENTAL]: Updated.
+ * src/truetype/ttobjs.c (TT_Face_Init)
+ [FT_CONFIG_OPTION_INCREMENTAL]: Updated.
+
+ * src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String)
+ [FT_CONFIG_OPTION_INCREMENTAL]: Updated.
+ (T1_Parse_Glyph) [FT_CONFIG_OPTION_INCREMENTAL]: Updated.
+ Free loaded glyph data properly.
+ (T1_Load_Glyph): Updated.
+ [FT_CONFIG_OPTION_INCREMENTAL]: Free loaded glyph data properly.
2002-07-30 David Turner <david@freetype.org>
- * include/freetype/ftincrem.h: adding new experimental header file
- to demonstrate a "cleaner" API to support incremental font loading.
- comments appreciated...
+ * include/freetype/ftincrem.h: Adding new experimental header file
+ to demonstrate a "cleaner" API to support incremental font loading.
+
+ * include/freetype/config/ftheader.h (FT_INCREMENTAL_H): New macro.
- * src/tools/docmaker/*: adding new (more advanced) version of
- the DocMaker tool. Python with regular expressions rocks..
+ * src/tools/docmaker/*: Adding new (more advanced) version of
+ the DocMaker tool, using Python's sophisticated regexps.
2002-07-28 Werner Lemberg <wl@gnu.org>
diff --git a/include/freetype/ftincrem.h b/include/freetype/ftincrem.h
index a941671..19d90e2 100644
--- a/include/freetype/ftincrem.h
+++ b/include/freetype/ftincrem.h
@@ -1,18 +1,39 @@
-#ifndef __FT_INCREMENTAL_H__
-#define __FT_INCREMENTAL_H__
+/***************************************************************************/
+/* */
+/* ftincrem.h */
+/* */
+/* FreeType incremental loading (specification). */
+/* */
+/* Copyright 2002 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 __FTINCREM_H__
+#define __FTINCREM_H__
#include <ft2build.h>
#include FT_FREETYPE_H
+
FT_BEGIN_HEADER
- /*************************************************************************
+
+ /***************************************************************************
*
- * @type: FT_Incremental
+ * @type:
+ * FT_Incremental
*
* @description:
* An opaque type describing a user-provided object used to implement
- * "incremental" glyph loading within FreeType. This is used to support
+ * "incremental" glyph loading within FreeType. This is used to support
* embedded fonts in certain environments (e.g. Postscript interpreters),
* where the glyph data isn't in the font file, or must be overridden by
* different values.
@@ -21,33 +42,39 @@ FT_BEGIN_HEADER
* It is up to client applications to create and implement @FT_Incremental
* objects, as long as they provide implementations for the methods
* @FT_Incremental_GetGlyphDataFunc, @FT_Incremental_FreeGlyphDataFunc
- * and @FT_Incremental_GetGlyphMetricsFunc
+ * and @FT_Incremental_GetGlyphMetricsFunc.
*
- * see the description of @FT_Incremental_InterfaceRec to understand how
+ * See the description of @FT_Incremental_InterfaceRec to understand how
* to use incremental objects with FreeType.
*/
- typedef struct FT_IncrementalRec_* FT_Incremental;
+ typedef struct FT_IncrementalRec_* FT_Incremental;
- /*************************************************************************
+ /***************************************************************************
*
- * @struct: FT_Incremental_Metrics
+ * @struct:
+ * FT_Incremental_Metrics
*
* @description:
* A small structure used to contain the basic glyph metrics returned
- * by the @FT_Incremental_GetGlyphMetricsFunc method
+ * by the @FT_Incremental_GetGlyphMetricsFunc method.
*
* @fields:
- * bearing_x :: left bearing, in font units.
- * bearing_y :: top bearing, in font units.
- * advance :: glyph advance, in font units
+ * bearing_x ::
+ * Left bearing, in font units.
+ *
+ * bearing_y ::
+ * Top bearing, in font units.
+ *
+ * advance ::
+ * Glyph advance, in font units.
*
* @note:
* These correspond to horizontal or vertical metrics depending on the
* value of the 'vertical' argument to the function
- * @FT_Incremental_GetGlyphMetricsFunc
+ * @FT_Incremental_GetGlyphMetricsFunc.
*/
- typedef struct FT_Incremental_MetricsRec_
+ typedef struct FT_Incremental_MetricsRec_
{
FT_Long bearing_x;
FT_Long bearing_y;
@@ -56,9 +83,10 @@ FT_BEGIN_HEADER
} FT_Incremental_MetricsRec, *FT_Incremental_Metrics;
- /**************************************************************************
+ /***************************************************************************
*
- * @type: FT_Incremental_GetGlyphDataFunc
+ * @type:
+ * FT_Incremental_GetGlyphDataFunc
*
* @description:
* A function called by FreeType to access a given glyph's data bytes
@@ -66,23 +94,26 @@ FT_BEGIN_HEADER
* enabled.
*
* Note that the format of the glyph's data bytes depends on the font
- * file format. For TrueType, it must correspond to the raw bytes within
- * the 'glyf' table. For Postscript formats, it must correspond to the
- * *unencrypted* charstring bytes, without any 'lenIV' header. It is
+ * file format. For TrueType, it must correspond to the raw bytes within
+ * the 'glyf' table. For Postscript formats, it must correspond to the
+ * *unencrypted* charstring bytes, without any 'lenIV' header. It is
* undefined for any other format.
*
* @input:
- * incremental :: handle to an opaque @FT_Incremental handle provided
- * by the client application
+ * incremental ::
+ * Handle to an opaque @FT_Incremental handle provided by the client
+ * application.
*
- * glyph_index :: index of relevant glyph
+ * glyph_index ::
+ * Index of relevant glyph.
*
* @output:
- * adata :: a structure describing the returned glyph data bytes
- * (which will be accessed as a read-only byte block)
+ * adata ::
+ * A structure describing the returned glyph data bytes (which will be
+ * accessed as a read-only byte block).
*
* @return:
- * FreeType error code. 0 means success
+ * FreeType error code. 0 means success.
*
* @note:
* If this function returns succesfully the method
@@ -92,46 +123,67 @@ FT_BEGIN_HEADER
* Nested calls to @FT_Incremental_GetGlyphDataFunc can happen for
* compound glyphs.
*/
- typedef FT_Error (*FT_Incremental_GetGlyphDataFunc)
- ( FT_Incremental incremental,
- FT_UInt glyph_index,
- FT_Data* adata );
+ typedef FT_Error
+ (*FT_Incremental_GetGlyphDataFunc)( FT_Incremental incremental,
+ FT_UInt glyph_index,
+ FT_Data* adata );
+
- /**************************************************************************
+ /***************************************************************************
*
- * @type: FT_Incremental_FreeGlyphDataFunc
+ * @type:
+ * FT_Incremental_FreeGlyphDataFunc
*
* @description:
* A function used to release the glyph data bytes returned by a
* successful call to @FT_Incremental_GetGlyphDataFunc.
*
* @input:
- * incremental :: handle to an opaque @FT_Incremental handle provided
- * by the client application
+ * incremental ::
+ * A handle to an opaque @FT_Incremental handle provided by the client
+ * application.
*
- * data :: glyph_index :: index of relevant glyph
+ * data ::
+ * A structure describing the glyph data bytes (which will be accessed
+ * as a read-only byte block).
*/
- typedef void (*FT_Incremental_FreeGlyphDataFunc)
- ( FT_Incremental incremental,
- FT_Data* data );
+ typedef void
+ (*FT_Incremental_FreeGlyphDataFunc)( FT_Incremental incremental,
+ FT_Data* data );
- /**************************************************************************
+ /***************************************************************************
*
- * @type: FT_Incremental_GetGlyphMetricsFunc
+ * @type:
+ * FT_Incremental_GetGlyphMetricsFunc
*
* @description:
* A function used to retrieve the basic metrics of a given glyph index
- * before accessing its data. This is necessary because, in certain formats
- * like TrueType, the metrics are stored in a different place from the
- * glyph images proper.
+ * before accessing its data. This is necessary because, in certain
+ * formats like TrueType, the metrics are stored in a different place from
+ * the glyph images proper.
*
* @input:
- * incremental :: handle to an opaque @FT_Incremental handle provided
- * by the client application
+ * incremental ::
+ * A handle to an opaque @FT_Incremental handle provided by the client
+ * application.
+ *
+ * glyph_index ::
+ * Index of relevant glyph.
+ *
+ * vertical ::
+ * If true, return vertical metrics.
+ *
+ * @output:
+ * ametrics ::
+ * The glyph metrics in font units.
+ *
+ * afound ::
+ * True if there are metrics at all.
*
*/
- typedef FT_Error (*FT_Incremental_GetGlyphMetricsFunc)
+ typedef FT_Error
+ (*FT_Incremental_GetGlyphMetricsFunc)
( FT_Incremental incremental,
FT_UInt glyph_index,
FT_Bool vertical,
@@ -139,24 +191,25 @@ FT_BEGIN_HEADER
FT_Bool *afound );
- /*************************************************************************
+ /**************************************************************************
*
- * @struct: FT_Incremental_FuncsRec
+ * @struct:
+ * FT_Incremental_FuncsRec
*
* @description:
- * A table of functions for accessing fonts that load data
- * incrementally. Used in @FT_Incremental_Interface.
+ * A table of functions for accessing fonts that load data
+ * incrementally. Used in @FT_Incremental_Interface.
*
* @fields:
- * get_glyph_data :: The function to get glyph data. Must not be
- * null.
+ * get_glyph_data ::
+ * The function to get glyph data. Must not be null.
*
- * free_glyph_data :: The function to release glyph data. Must not
- * be null.
+ * free_glyph_data ::
+ * The function to release glyph data. Must not be null.
*
- * get_glyph_metrics :: The function to get glyph metrics. May be
- * null if the font does not provide
- * overriding glyph metrics.
+ * get_glyph_metrics ::
+ * The function to get glyph metrics. May be null if the font does
+ * not provide overriding glyph metrics.
*/
typedef struct FT_Incremental_FuncsRec_
{
@@ -167,59 +220,67 @@ FT_BEGIN_HEADER
} FT_Incremental_FuncsRec;
- /**************************************************************************
+ /***************************************************************************
*
- * @struct: FT_Incremental_InterfaceRec
+ * @struct:
+ * FT_Incremental_InterfaceRec
*
* @description:
* A structure to be used with @FT_Open_Face to indicate that the user
- * wants to support incremental glyph loading. You should use it with
+ * wants to support incremental glyph loading. You should use it with
* @FT_PARAM_TAG_INCREMENTAL as in the following example:
*
- * {
- * FT_Incremental_InterfaceRec inc_int;
- * FT_Parameter parameter;
- * FT_Open_Args open_args;
- *
- * // set up incremental descriptor
- * inc_int.funcs = my_funcs;
- * inc_int.object = my_object;
- *
- * // set up optional parameter
- * parameter.tag = FT_PARAM_TAG_INCREMENTAL;
- * parameter.data = &inc_int;
- *
- * // set up FT_Open_Args structure
- * open_args.flags = (FT_Open_Flags)(ft_open_pathname | ft_open_params);
- * open_args.pathname = my_font_pathname;
- * open_args.num_params = 1;
- * open_args.params = ¶meter; // we use one optional argument
- *
- * // open the
- * error = FT_Open_Face( library, &open_args, index, &face );
- * ....
- * }
+ * {
+ * FT_Incremental_InterfaceRec inc_int;
+ * FT_Parameter parameter;
+ * FT_Open_Args open_args;
+ *
+ *
+ * // set up incremental descriptor
+ * inc_int.funcs = my_funcs;
+ * inc_int.object = my_object;
+ *
+ * // set up optional parameter
+ * parameter.tag = FT_PARAM_TAG_INCREMENTAL;
+ * parameter.data = &inc_int;
+ *
+ * // set up FT_Open_Args structure
+ * open_args.flags = (FT_Open_Flags)( ft_open_pathname |
+ * ft_open_params );
+ * open_args.pathname = my_font_pathname;
+ * open_args.num_params = 1;
+ * open_args.params = ¶meter; // we use one optional argument
+ *
+ * // open the font
+ * error = FT_Open_Face( library, &open_args, index, &face );
+ * ...
+ * }
*/
- typedef struct FT_Incremental_InterfaceRec_
+ typedef struct FT_Incremental_InterfaceRec_
{
const FT_Incremental_FuncsRec* funcs;
FT_Incremental object;
} FT_Incremental_InterfaceRec;
- /**************************************************************************
+
+ /***************************************************************************
*
- * @constant: FT_PARAM_TAG_INCREMENTAL
+ * @constant:
+ * FT_PARAM_TAG_INCREMENTAL
*
* @description:
* A constant used as the tag of @FT_Parameter structures to indicate
* an incremental loading object to be used by FreeType.
*
*/
-#define FT_PARAM_TAG_INCREMENTAL FT_MAKE_TAG('i','n','c','r')
+#define FT_PARAM_TAG_INCREMENTAL FT_MAKE_TAG( 'i', 'n', 'c', 'r' )
/* */
FT_END_HEADER
-#endif /* __FT_INCREMENTAL_H__ */
+#endif /* __FTINCREM_H__ */
+
+
+/* END */
diff --git a/include/freetype/internal/ftobjs.h b/include/freetype/internal/ftobjs.h
index ede438d..f6ec411 100644
--- a/include/freetype/internal/ftobjs.h
+++ b/include/freetype/internal/ftobjs.h
@@ -40,6 +40,7 @@
#include FT_INCREMENTAL_H
#endif
+
FT_BEGIN_HEADER
@@ -300,11 +301,12 @@ FT_BEGIN_HEADER
/* */
/* postscript_name :: Postscript font name for this face. */
/* */
- /* incremental_interface :: If non-null, the interface through */
+ /* incremental_interface :: */
+ /* If non-null, the interface through */
/* which glyph data and metrics are loaded */
/* incrementally for faces that do not provide */
/* all of this data when first opened. */
- /* This field exists only if */
+ /* This field exists only if */
/* @FT_CONFIG_OPTION_INCREMENTAL is defined. */
/* */
typedef struct FT_Face_InternalRec_
diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c
index 1d4340e..c653088 100644
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -25,6 +25,7 @@
#include FT_TRUETYPE_TABLES_H
#include FT_OUTLINE_H
+
FT_BASE_DEF( void )
ft_validator_init( FT_Validator valid,
const FT_Byte* base,
@@ -707,6 +708,7 @@
FT_Error error;
FT_Face_Internal internal;
+
clazz = driver->clazz;
memory = driver->root.memory;
@@ -724,12 +726,15 @@
face->stream = stream;
#ifdef FT_CONFIG_OPTION_INCREMENTAL
- {
- int i;
- face->internal->incremental_interface = 0;
- for (i = 0; i < num_params && !face->internal->incremental_interface; i++)
- if (params[i].tag == FT_PARAM_TAG_INCREMENTAL)
- face->internal->incremental_interface = params[i].data;
+ {
+ int i;
+
+
+ face->internal->incremental_interface = 0;
+ for ( i = 0; i < num_params && !face->internal->incremental_interface;
+ i++ )
+ if ( params[i].tag == FT_PARAM_TAG_INCREMENTAL )
+ face->internal->incremental_interface = params[i].data;
}
#endif
@@ -874,8 +879,9 @@
/* not all modules are drivers, so check... */
if ( FT_MODULE_IS_DRIVER( driver ) )
{
- FT_Int num_params = 0;
- FT_Parameter* params = 0;
+ FT_Int num_params = 0;
+ FT_Parameter* params = 0;
+
if ( args->flags & ft_open_params )
{
@@ -909,6 +915,7 @@
FT_Int num_params = 0;
FT_Parameter* params = 0;
+
driver = FT_DRIVER( cur[0] );
if ( args->flags & ft_open_params )
diff --git a/src/cache/ftccache.c b/src/cache/ftccache.c
index b54065b..14cb725 100644
--- a/src/cache/ftccache.c
+++ b/src/cache/ftccache.c
@@ -159,14 +159,14 @@
{
FT_Error error = 0;
FTC_Node *pnode;
- FT_UInt index, num_buckets;
+ FT_UInt idx, num_buckets;
- index = (FT_UInt)( node->hash & cache->mask );
- if ( index < cache->p )
- index = (FT_UInt)( node->hash & ( 2 * cache->mask + 1 ) );
+ idx = (FT_UInt)( node->hash & cache->mask );
+ if ( idx < cache->p )
+ idx = (FT_UInt)( node->hash & ( 2 * cache->mask + 1 ) );
- pnode = cache->buckets + index;
+ pnode = cache->buckets + idx;
for (;;)
{
@@ -239,15 +239,15 @@
FTC_Cache cache )
{
FTC_Node *pnode;
- FT_UInt index;
+ FT_UInt idx;
FT_Error error = 0;
- index = (FT_UInt)( node->hash & cache->mask );
- if ( index < cache->p )
- index = (FT_UInt)( node->hash & (2 * cache->mask + 1 ) );
+ idx = (FT_UInt)( node->hash & cache->mask );
+ if ( idx < cache->p )
+ idx = (FT_UInt)( node->hash & (2 * cache->mask + 1 ) );
- pnode = cache->buckets + index;
+ pnode = cache->buckets + idx;
node->link = *pnode;
*pnode = node;
@@ -603,14 +603,14 @@
FTC_Family family = (FTC_Family) lru;
FT_UFast hash = query->hash;
FTC_Node* bucket;
- FT_UInt index;
+ FT_UInt idx;
- index = hash & cache->mask;
- if ( index < cache->p )
- index = hash & ( cache->mask * 2 + 1 );
+ idx = hash & cache->mask;
+ if ( idx < cache->p )
+ idx = hash & ( cache->mask * 2 + 1 );
- bucket = cache->buckets + index;
+ bucket = cache->buckets + idx;
if ( query->family != family ||
diff --git a/src/cache/ftccache.i b/src/cache/ftccache.i
index 49faa93..8ecf395 100644
--- a/src/cache/ftccache.i
+++ b/src/cache/ftccache.i
@@ -79,14 +79,14 @@
hash = query->hash;
{
- FT_UInt index;
+ FT_UInt idx;
- index = hash & cache->mask;
- if ( index < cache->p )
- index = hash & ( cache->mask * 2 + 1 );
+ idx = hash & cache->mask;
+ if ( idx < cache->p )
+ idx = hash & ( cache->mask * 2 + 1 );
- bucket = cache->buckets + index;
+ bucket = cache->buckets + idx;
}
#ifdef FT_DEBUG_LEVEL_ERROR
diff --git a/src/cff/cffcmap.c b/src/cff/cffcmap.c
index d84db10..453dbc3 100644
--- a/src/cff/cffcmap.c
+++ b/src/cff/cffcmap.c
@@ -32,7 +32,7 @@
cff_cmap_encoding_init( CFF_CMapStd cmap )
{
TT_Face face = (TT_Face)FT_CMAP_FACE( cmap );
- CFF_Font cff = face->extra.data;
+ CFF_Font cff = (CFF_Font)face->extra.data;
CFF_Encoding encoding = &cff->encoding;
@@ -144,9 +144,9 @@
FT_UInt count;
TT_Face face = (TT_Face)FT_CMAP_FACE( cmap );
FT_Memory memory = FT_FACE_MEMORY( face );
- CFF_Font cff = face->extra.data;
+ CFF_Font cff = (CFF_Font)face->extra.data;
CFF_Charset charset = &cff->charset;
- PSNames_Service psnames = cff->psnames;
+ PSNames_Service psnames = (PSNames_Service)cff->psnames;
cmap->num_pairs = 0;
diff --git a/src/cff/cffload.c b/src/cff/cffload.c
index e50fcaa..2829ffc 100644
--- a/src/cff/cffload.c
+++ b/src/cff/cffload.c
@@ -1358,20 +1358,20 @@
static void
- CFF_Done_FD_Select( CFF_FDSelect select,
+ CFF_Done_FD_Select( CFF_FDSelect fdselect,
FT_Stream stream )
{
- if ( select->data )
- FT_FRAME_RELEASE( select->data );
+ if ( fdselect->data )
+ FT_FRAME_RELEASE( fdselect->data );
- select->data_size = 0;
- select->format = 0;
- select->range_count = 0;
+ fdselect->data_size = 0;
+ fdselect->format = 0;
+ fdselect->range_count = 0;
}
static FT_Error
- CFF_Load_FD_Select( CFF_FDSelect select,
+ CFF_Load_FD_Select( CFF_FDSelect fdselect,
FT_UInt num_glyphs,
FT_Stream stream,
FT_ULong offset )
@@ -1385,23 +1385,23 @@
if ( FT_STREAM_SEEK( offset ) || FT_READ_BYTE( format ) )
goto Exit;
- select->format = format;
- select->cache_count = 0; /* clear cache */
+ fdselect->format = format;
+ fdselect->cache_count = 0; /* clear cache */
switch ( format )
{
case 0: /* format 0, that's simple */
- select->data_size = num_glyphs;
+ fdselect->data_size = num_glyphs;
goto Load_Data;
case 3: /* format 3, a tad more complex */
if ( FT_READ_USHORT( num_ranges ) )
goto Exit;
- select->data_size = num_ranges * 3 + 2;
+ fdselect->data_size = num_ranges * 3 + 2;
Load_Data:
- if ( FT_FRAME_EXTRACT( select->data_size, select->data ) )
+ if ( FT_FRAME_EXTRACT( fdselect->data_size, fdselect->data ) )
goto Exit;
break;
@@ -1415,30 +1415,31 @@
FT_LOCAL_DEF( FT_Byte )
- cff_fd_select_get( CFF_FDSelect select,
+ cff_fd_select_get( CFF_FDSelect fdselect,
FT_UInt glyph_index )
{
FT_Byte fd = 0;
- switch ( select->format )
+ switch ( fdselect->format )
{
case 0:
- fd = select->data[glyph_index];
+ fd = fdselect->data[glyph_index];
break;
case 3:
/* first, compare to cache */
- if ( (FT_UInt)(glyph_index-select->cache_first) < select->cache_count )
+ if ( (FT_UInt)( glyph_index - fdselect->cache_first ) <
+ fdselect->cache_count )
{
- fd = select->cache_fd;
+ fd = fdselect->cache_fd;
break;
}
/* then, lookup the ranges array */
{
- FT_Byte* p = select->data;
- FT_Byte* p_limit = p + select->data_size;
+ FT_Byte* p = fdselect->data;
+ FT_Byte* p_limit = p + fdselect->data_size;
FT_Byte fd2;
FT_UInt first, limit;
@@ -1457,9 +1458,9 @@
fd = fd2;
/* update cache */
- select->cache_first = first;
- select->cache_count = limit-first;
- select->cache_fd = fd2;
+ fdselect->cache_first = first;
+ fdselect->cache_count = limit-first;
+ fdselect->cache_fd = fd2;
break;
}
first = limit;
diff --git a/src/pfr/pfrgload.c b/src/pfr/pfrgload.c
index a914707..192f0e0 100644
--- a/src/pfr/pfrgload.c
+++ b/src/pfr/pfrgload.c
@@ -409,7 +409,7 @@
cur = pos;
for ( n = 0; n < args_count; n++ )
{
- FT_Int index, delta;
+ FT_Int idx, delta;
/* read the X argument */
@@ -417,9 +417,9 @@
{
case 0: /* 8-bit index */
PFR_CHECK( 1 );
- index = PFR_NEXT_BYTE( p );
- cur->x = glyph->x_control[index];
- FT_TRACE7(( " cx#%d", index ));
+ idx = PFR_NEXT_BYTE( p );
+ cur->x = glyph->x_control[idx];
+ FT_TRACE7(( " cx#%d", idx ));
break;
case 1: /* 16-bit value */
@@ -445,9 +445,9 @@
{
case 0: /* 8-bit index */
PFR_CHECK( 1 );
- index = PFR_NEXT_BYTE( p );
- cur->y = glyph->y_control[index];
- FT_TRACE7(( " cy#%d", index ));
+ idx = PFR_NEXT_BYTE( p );
+ cur->y = glyph->y_control[idx];
+ FT_TRACE7(( " cy#%d", idx ));
break;
case 1: /* 16-bit absolute value */
diff --git a/src/pfr/pfrload.c b/src/pfr/pfrload.c
index 32c2f82..e6154bb 100644
--- a/src/pfr/pfrload.c
+++ b/src/pfr/pfrload.c
@@ -220,7 +220,7 @@
FT_LOCAL_DEF( FT_Error )
pfr_log_font_load( PFR_LogFont log_font,
FT_Stream stream,
- FT_UInt index,
+ FT_UInt idx,
FT_UInt32 section_offset,
FT_Bool size_increment )
{
@@ -235,10 +235,10 @@
FT_READ_USHORT( num_log_fonts ) )
goto Exit;
- if ( index >= num_log_fonts )
+ if ( idx >= num_log_fonts )
return PFR_Err_Invalid_Argument;
- if ( FT_STREAM_SKIP( index * 5 ) ||
+ if ( FT_STREAM_SKIP( idx * 5 ) ||
FT_READ_USHORT( size ) ||
FT_READ_UOFF3 ( offset ) )
goto Exit;
diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c
index b149947..a897b28 100644
--- a/src/raster/ftraster.c
+++ b/src/raster/ftraster.c
@@ -2652,13 +2652,13 @@
Long x1, x2, xs, e1, e2;
- TProfileList wait;
+ TProfileList waiting;
TProfileList draw_left, draw_right;
/* Init empty linked lists */
- Init_Linked( &wait );
+ Init_Linked( &waiting );
Init_Linked( &draw_left );
Init_Linked( &draw_right );
@@ -2680,7 +2680,7 @@
if ( max_Y < top ) max_Y = top;
P->X = 0;
- InsNew( &wait, P );
+ InsNew( &waiting, P );
P = Q;
}
@@ -2698,7 +2698,7 @@
/* Then compute the distance of each profile from min_Y */
- P = wait;
+ P = waiting;
while ( P )
{
@@ -2717,9 +2717,9 @@
while ( ras.numTurns > 0 )
{
- /* look in the wait list for new activations */
+ /* look in the waiting list for new activations */
- P = wait;
+ P = waiting;
while ( P )
{
@@ -2727,7 +2727,7 @@
P->countL -= y_height;
if ( P->countL == 0 )
{
- DelOld( &wait, P );
+ DelOld( &waiting, P );
switch ( P->flow )
{
diff --git a/src/sfnt/sfobjs.c b/src/sfnt/sfobjs.c
index 3da48bb..a6c731f 100644
--- a/src/sfnt/sfobjs.c
+++ b/src/sfnt/sfobjs.c
@@ -434,8 +434,8 @@
/* do we have outlines in there? */
#ifdef FT_CONFIG_OPTION_INCREMENTAL
has_outline = FT_BOOL( face->root.internal->incremental_interface != 0 ||
- TT_LookUp_Table( face, TTAG_glyf ) != 0 ||
- TT_LookUp_Table( face, TTAG_CFF ) != 0 );
+ TT_LookUp_Table( face, TTAG_glyf ) != 0 ||
+ TT_LookUp_Table( face, TTAG_CFF ) != 0 );
#else
has_outline = FT_BOOL( TT_LookUp_Table( face, TTAG_glyf ) != 0 ||
TT_LookUp_Table( face, TTAG_CFF ) != 0 );
diff --git a/src/truetype/ttgload.c b/src/truetype/ttgload.c
index 5757f8c..efbe88e 100644
--- a/src/truetype/ttgload.c
+++ b/src/truetype/ttgload.c
@@ -756,9 +756,9 @@
FT_Bool opened_frame = 0;
#ifdef FT_CONFIG_OPTION_INCREMENTAL
- struct FT_StreamRec_ inc_stream;
- FT_Data glyph_data;
- FT_Bool glyph_data_loaded = 0;
+ struct FT_StreamRec_ inc_stream;
+ FT_Data glyph_data;
+ FT_Bool glyph_data_loaded = 0;
#endif
@@ -852,13 +852,15 @@
goto Exit;
glyph_data_loaded = 1;
- offset = 0;
- count = glyph_data.length;
+ offset = 0;
+ count = glyph_data.length;
+
FT_MEM_ZERO( &inc_stream, sizeof ( inc_stream ) );
- FT_Stream_OpenMemory( &inc_stream, glyph_data.pointer, glyph_data.length );
+ FT_Stream_OpenMemory( &inc_stream,
+ glyph_data.pointer, glyph_data.length );
+
loader->stream = &inc_stream;
}
-
else
#endif /* FT_CONFIG_OPTION_INCREMENTAL */
@@ -1266,10 +1268,10 @@
Exit:
#ifdef FT_CONFIG_OPTION_INCREMENTAL
- if (glyph_data_loaded)
- face->root.internal->incremental_interface->funcs->free_glyph_data(
- face->root.internal->incremental_interface->object,
- &glyph_data );
+ if ( glyph_data_loaded )
+ face->root.internal->incremental_interface->funcs->free_glyph_data(
+ face->root.internal->incremental_interface->object,
+ &glyph_data );
#endif
return error;
diff --git a/src/type1/t1gload.c b/src/type1/t1gload.c
index 8eaabf5..0625caf 100644
--- a/src/type1/t1gload.c
+++ b/src/type1/t1gload.c
@@ -121,19 +121,21 @@
T1_Parse_Glyph( T1_Decoder decoder,
FT_UInt glyph_index )
{
- FT_Data glyph_data;
- FT_Error error = T1_Parse_Glyph_And_Get_Char_String( decoder, glyph_index, &glyph_data );
+ FT_Data glyph_data;
+ FT_Error error = T1_Parse_Glyph_And_Get_Char_String(
+ decoder, glyph_index, &glyph_data );
+
#ifdef FT_CONFIG_OPTION_INCREMENTAL
- if ( !error)
+ if ( !error )
{
- T1_Face face = (T1_Face)decoder->builder.face;
+ T1_Face face = (T1_Face)decoder->builder.face;
if ( face->root.internal->incremental_interface )
- face->root.internal->incremental_interface->funcs->free_glyph_data(
- face->root.internal->incremental_interface->object,
- &glyph_data );
+ face->root.internal->incremental_interface->funcs->free_glyph_data(
+ face->root.internal->incremental_interface->object,
+ &glyph_data );
}
#endif
@@ -225,7 +227,8 @@
FT_Matrix font_matrix;
FT_Vector font_offset;
FT_Data glyph_data;
- FT_Bool glyph_data_loaded = 0;
+ FT_Bool glyph_data_loaded = 0;
+
if ( load_flags & FT_LOAD_NO_RECURSE )
load_flags |= FT_LOAD_NO_SCALE | FT_LOAD_NO_HINTING;
@@ -264,7 +267,7 @@
&glyph_data );
if ( error )
goto Exit;
- glyph_data_loaded = 1;
+ glyph_data_loaded = 1;
font_matrix = decoder.font_matrix;
font_offset = decoder.font_offset;
@@ -394,11 +397,11 @@
if ( glyph_data_loaded && face->root.internal->incremental_interface )
{
face->root.internal->incremental_interface->funcs->free_glyph_data(
- face->root.internal->incremental_interface->object,
- &glyph_data );
+ face->root.internal->incremental_interface->object,
+ &glyph_data );
/* Set the control data to null - it is no longer available if */
- /* loaded incrementally. */
+ /* loaded incrementally. */
glyph->root.control_data = 0;
glyph->root.control_len = 0;
}
diff --git a/src/type1/t1load.c b/src/type1/t1load.c
index 3b7c9d7..b9f8edb 100644
--- a/src/type1/t1load.c
+++ b/src/type1/t1load.c
@@ -1712,7 +1712,7 @@
}
#ifdef FT_CONFIG_OPTION_INCREMENTAL
- if (!face->root.internal->incremental_interface)
+ if ( !face->root.internal->incremental_interface )
#endif
if ( !loader.charstrings.init )
{