Formatting, copyright years.
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
diff --git a/ChangeLog b/ChangeLog
index f232626..9d5c0bf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,25 +1,29 @@
2006-01-16 Chia-I Wu <b90201047@ntu.edu.tw>
* src/psaux/afmparse.c, src/psaux/afmparse.h: New files which
- implement an AFM parser. It is used to parse an AFM file.
+ implement an AFM parser.
* src/psaux/psconv.c, src/psaux/psconv.h: New files to provide
- conversion functions (e.g, PS real number => FT_Fixed) for the
- PS_Parser and AFM_Parser. Some of the functions are taken, with some
- modifications, from the psobjs.c
+ conversion functions (e.g., PS real number => FT_Fixed) for the
+ PS_Parser and AFM_Parser. Some of the functions are taken, with
+ some modifications, from the file psobjs.c.
* src/psaux/psobjs.c: Use functions from psconv.c.
- * include/freetype/internal/psaux.h, src/psaux/psauxmod.c:: Add
+ * include/freetype/internal/psaux.h, src/psaux/psauxmod.c: Add
`AFM_Parser' to the `psaux' service.
- * src/psaux/psaux.c, src/psaux/rules.mk: Include those new files.
+ * src/psaux/psaux.c, src/psaux/rules.mk (PSAUX_DRV_SRC): Include
+ those new files.
* src/tools/test_afm.c: A test program for AFM parser.
- * include/freetype/internal/services/svkern.h,
- include/freetype/internal/ftserv.h: New service `Kerning'. It is
- currently only used to get the track kerning information.
+ * include/freetype/internal/services/svkern.h: New file providing a
+ `Kerning' service. It is currently only used to get the track
+ kerning information.
+
+ * include/freetype/internal/ftserv.h (FT_SERVICE_KERNING_H): New
+ macro.
* src/type1/t1driver.c, src/type1/t1objs.c, src/type1/t1afm.c,
src/type1/t1afm.h: Update to use the AFM parser.
diff --git a/include/freetype/freetype.h b/include/freetype/freetype.h
index 64ee1b8..c862e2c 100644
--- a/include/freetype/freetype.h
+++ b/include/freetype/freetype.h
@@ -2728,7 +2728,7 @@ FT_BEGIN_HEADER
/* degree :: The degree of tightness. */
/* */
/* <Output> */
- /* akerning :: The kerning in in 16.16 fractional points. */
+ /* akerning :: The kerning in 16.16 fractional points. */
/* */
/* <Return> */
/* FreeType error code. 0 means success. */
diff --git a/include/freetype/internal/ftserv.h b/include/freetype/internal/ftserv.h
index d690bc9..3e81270 100644
--- a/include/freetype/internal/ftserv.h
+++ b/include/freetype/internal/ftserv.h
@@ -4,7 +4,7 @@
/* */
/* The FreeType services (specification only). */
/* */
-/* Copyright 2003, 2004, 2005 by */
+/* Copyright 2003, 2004, 2005, 2006 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/include/freetype/internal/psaux.h b/include/freetype/internal/psaux.h
index 06fe164..49c53d0 100644
--- a/include/freetype/internal/psaux.h
+++ b/include/freetype/internal/psaux.h
@@ -5,7 +5,7 @@
/* Auxiliary functions and data structures related to PostScript fonts */
/* (specification). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004 by */
+/* Copyright 1996-2001, 2002, 2003, 2004, 2006 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -702,6 +702,7 @@ FT_BEGIN_HEADER
FT_Fixed min_kern;
FT_Fixed max_ptsize;
FT_Fixed max_kern;
+
} AFM_TrackKernRec, *AFM_TrackKern;
typedef struct AFM_KernPairRec_
@@ -710,6 +711,7 @@ FT_BEGIN_HEADER
FT_Int index2;
FT_Int x;
FT_Int y;
+
} AFM_KernPairRec, *AFM_KernPair;
typedef struct AFM_FontInfoRec_
@@ -719,6 +721,7 @@ FT_BEGIN_HEADER
FT_Int NumTrackKern;
AFM_KernPair KernPairs; /* free if non-NULL */
FT_Int NumKernPair;
+
} AFM_FontInfoRec, *AFM_FontInfo;
typedef struct AFM_Parser_FuncsRec_
@@ -739,6 +742,7 @@ FT_BEGIN_HEADER
typedef struct AFM_StreamRec_* AFM_Stream;
+
/*************************************************************************/
/* */
/* <Struct> */
@@ -748,14 +752,14 @@ FT_BEGIN_HEADER
/* An AFM_Parser is a parser for the AFM files. */
/* */
/* <Fields> */
- /* memory :: The object used for memory operations */
- /* (alloc/realloc). */
+ /* memory :: The object used for memory operations (alloc and */
+ /* realloc). */
/* */
/* stream :: This is an opaque object. */
/* */
/* FontInfo :: The result will be stored here. */
/* */
- /* get_index :: An user provided function to get glyph index by its */
+ /* get_index :: A user provided function to get a glyph index by its */
/* name. */
/* */
typedef struct AFM_ParserRec_
diff --git a/include/freetype/internal/services/svkern.h b/include/freetype/internal/services/svkern.h
index 95921f8..169b36d 100644
--- a/include/freetype/internal/services/svkern.h
+++ b/include/freetype/internal/services/svkern.h
@@ -4,7 +4,7 @@
/* */
/* The FreeType Kerning service (specification). */
/* */
-/* Copyright 2003, 2004 by */
+/* Copyright 2006 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/src/psaux/afmparse.c b/src/psaux/afmparse.c
index 999f72a..4c6f94f 100644
--- a/src/psaux/afmparse.c
+++ b/src/psaux/afmparse.c
@@ -15,6 +15,7 @@
/* */
/***************************************************************************/
+
#include FT_INTERNAL_POSTSCRIPT_AUX_H
#include FT_INTERNAL_DEBUG_H
@@ -23,6 +24,7 @@
#include "psauxerr.h"
+
/***************************************************************************/
/* */
/* AFM_Stream */
@@ -42,11 +44,11 @@
typedef struct AFM_StreamRec_
{
- FT_Byte* cursor;
- FT_Byte* base;
- FT_Byte* limit;
+ FT_Byte* cursor;
+ FT_Byte* base;
+ FT_Byte* limit;
- FT_Int status;
+ FT_Int status;
} AFM_StreamRec;
@@ -55,34 +57,35 @@
#define EOF -1
#endif
-/* this works because empty lines are ignored */
-#define AFM_IS_NEWLINE( ch ) ( ( ch ) == '\r' || ( ch ) == '\n' )
-#define AFM_IS_EOF( ch ) ( ( ch ) == EOF || ( ch ) == '\x1a' )
-#define AFM_IS_SPACE( ch ) ( ( ch ) == ' ' || ( ch ) == '\t' )
+ /* this works because empty lines are ignored */
+#define AFM_IS_NEWLINE( ch ) ( (ch) == '\r' || (ch) == '\n' )
+
+#define AFM_IS_EOF( ch ) ( (ch) == EOF || (ch) == '\x1a' )
+#define AFM_IS_SPACE( ch ) ( (ch) == ' ' || (ch) == '\t' )
-/* column separator; there is no `column' in the spec actually */
-#define AFM_IS_SEP( ch ) ( ( ch ) == ';' )
+ /* column separator; there is no `column' in the spec actually */
+#define AFM_IS_SEP( ch ) ( (ch) == ';' )
-#define AFM_GETC() \
- ( ( ( stream )->cursor < ( stream )->limit ) \
- ? *( stream )->cursor++ \
- : EOF )
+#define AFM_GETC() \
+ ( ( (stream)->cursor < (stream)->limit ) ? *(stream)->cursor++ \
+ : EOF )
-#define AFM_STREAM_KEY_BEGIN( stream ) \
- (char*)( ( stream )->cursor - 1 )
+#define AFM_STREAM_KEY_BEGIN( stream ) \
+ (char*)( (stream)->cursor - 1 )
-#define AFM_STREAM_KEY_LEN( stream, key ) \
- ( (char*)( stream )->cursor - key - 1 )
+#define AFM_STREAM_KEY_LEN( stream, key ) \
+ ( (char*)(stream)->cursor - key - 1 )
#define AFM_STATUS_EOC( stream ) \
- ( ( stream )->status >= AFM_STREAM_STATUS_EOC )
+ ( (stream)->status >= AFM_STREAM_STATUS_EOC )
#define AFM_STATUS_EOL( stream ) \
- ( ( stream )->status >= AFM_STREAM_STATUS_EOL )
+ ( (stream)->status >= AFM_STREAM_STATUS_EOL )
#define AFM_STATUS_EOF( stream ) \
- ( ( stream )->status >= AFM_STREAM_STATUS_EOF )
+ ( (stream)->status >= AFM_STREAM_STATUS_EOF )
+
static int
afm_stream_skip_spaces( AFM_Stream stream )
@@ -111,7 +114,7 @@
}
- /* read a key or val in current column */
+ /* read a key or value in current column */
static char*
afm_stream_read_one( AFM_Stream stream )
{
@@ -133,19 +136,16 @@
else if ( AFM_IS_NEWLINE( ch ) )
{
stream->status = AFM_STREAM_STATUS_EOL;
-
break;
}
else if ( AFM_IS_SEP( ch ) )
{
stream->status = AFM_STREAM_STATUS_EOC;
-
break;
}
else if ( AFM_IS_EOF( ch ) )
{
stream->status = AFM_STREAM_STATUS_EOF;
-
break;
}
}
@@ -175,13 +175,11 @@
if ( AFM_IS_NEWLINE( ch ) )
{
stream->status = AFM_STREAM_STATUS_EOL;
-
break;
}
else if ( AFM_IS_EOF( ch ) )
{
stream->status = AFM_STREAM_STATUS_EOF;
-
break;
}
}
@@ -190,14 +188,14 @@
}
-/***************************************************************************/
-/* */
-/* AFM_Parser */
-/* */
-/* */
+ /*************************************************************************/
+ /* */
+ /* AFM_Parser */
+ /* */
+ /* */
/* all keys defined in Ch. 7-10 of 5004.AFM_Spec.pdf */
- typedef enum
+ typedef enum AFM_Token_
{
AFM_TOKEN_ASCENDER,
AFM_TOKEN_AXISLABEL,
@@ -275,6 +273,7 @@
AFM_TOKEN_XHEIGHT,
N_AFM_TOKENS,
AFM_TOKEN_UNKNOWN
+
} AFM_Token;
@@ -357,16 +356,16 @@
};
-#define AFM_MAX_ARGUMENTS 5
+#define AFM_MAX_ARGUMENTS 5
static AFM_ValueRec shared_vals[AFM_MAX_ARGUMENTS];
/*
- * `afm_parser_read_vals' and `afm_parser_next_key' provides
+ * `afm_parser_read_vals' and `afm_parser_next_key' provide
* high-level operations to an AFM_Stream. The rest of the
- * parser functions should use them and should not access
- * the AFM_Stream directly.
+ * parser functions should use them without accessing the
+ * AFM_Stream directly.
*/
FT_LOCAL_DEF( FT_Int )
@@ -399,35 +398,40 @@
switch ( vals[i].type )
{
- case AFM_VALUE_TYPE_STRING:
- case AFM_VALUE_TYPE_NAME:
- if ( !FT_QAlloc( parser->memory, len + 1, (void**)&vals[i].u.s ) )
- {
- ft_memcpy( vals[i].u.s, str, len );
- vals[i].u.s[len] = '\0';
- }
- break;
- case AFM_VALUE_TYPE_FIXED:
- vals[i].u.f = PS_Conv_ToFixed( (FT_Byte**)&str,
- (FT_Byte*)str + len,
- 0 );
- break;
- case AFM_VALUE_TYPE_INTEGER:
- vals[i].u.i = PS_Conv_ToInt( (FT_Byte**)&str,
- (FT_Byte*)str + len );
- break;
- case AFM_VALUE_TYPE_BOOL:
- vals[i].u.b = ( len == 4 &&
- ft_strncmp( str, "true", 4 ) == 0 );
- break;
- case AFM_VALUE_TYPE_INDEX:
- if ( parser->get_index )
- vals[i].u.i = parser->get_index( str,
- len,
- parser->user_data );
- else
- vals[i].u.i = 0;
- break;
+ case AFM_VALUE_TYPE_STRING:
+ case AFM_VALUE_TYPE_NAME:
+ if ( !FT_QAlloc( parser->memory, len + 1,
+ (void**)&vals[i].u.s ) )
+ {
+ ft_memcpy( vals[i].u.s, str, len );
+ vals[i].u.s[len] = '\0';
+ }
+ break;
+
+ case AFM_VALUE_TYPE_FIXED:
+ vals[i].u.f = PS_Conv_ToFixed( (FT_Byte**)&str,
+ (FT_Byte*)str + len,
+ 0 );
+ break;
+
+ case AFM_VALUE_TYPE_INTEGER:
+ vals[i].u.i = PS_Conv_ToInt( (FT_Byte**)&str,
+ (FT_Byte*)str + len );
+ break;
+
+ case AFM_VALUE_TYPE_BOOL:
+ vals[i].u.b = ( len == 4 &&
+ ft_strncmp( str, "true", 4 ) == 0 );
+ break;
+
+ case AFM_VALUE_TYPE_INDEX:
+ if ( parser->get_index )
+ vals[i].u.i = parser->get_index( str,
+ len,
+ parser->user_data );
+ else
+ vals[i].u.i = 0;
+ break;
}
}
@@ -458,7 +462,7 @@
/* skip empty line */
if ( !key &&
!AFM_STATUS_EOF( stream ) &&
- AFM_STATUS_EOL( stream ) )
+ AFM_STATUS_EOL( stream ) )
continue;
break;
@@ -478,7 +482,7 @@
/* skip empty column */
if ( !key &&
!AFM_STATUS_EOF( stream ) &&
- AFM_STATUS_EOC( stream ) )
+ AFM_STATUS_EOC( stream ) )
continue;
break;
@@ -532,11 +536,11 @@
if ( FT_NEW( stream ) )
return error;
- stream->cursor = stream->base = base;
- stream->limit = limit;
+ stream->cursor = stream->base = base;
+ stream->limit = limit;
- /* so that the first call won't skip the first line */
- stream->status = AFM_STREAM_STATUS_EOL;
+ /* don't skip the first line during the first call */
+ stream->status = AFM_STREAM_STATUS_EOL;
parser->memory = memory;
parser->stream = stream;
@@ -656,6 +660,7 @@
#undef KERN_INDEX
#define KERN_INDEX( g1, g2 ) ( ( (FT_ULong)g1 << 16 ) | g2 )
+
/* compare two kerning pairs */
FT_CALLBACK_DEF( int )
afm_compare_kern_pairs( const void* a,
@@ -749,7 +754,6 @@
sizeof( AFM_KernPairRec ),
afm_compare_kern_pairs );
return PSaux_Err_Ok;
- break;
case AFM_TOKEN_UNKNOWN:
break;
@@ -793,7 +797,6 @@
case AFM_TOKEN_ENDKERNDATA:
case AFM_TOKEN_ENDFONTMETRICS:
return PSaux_Err_Ok;
- break;
case AFM_TOKEN_UNKNOWN:
break;
@@ -814,8 +817,8 @@
FT_UInt n,
AFM_Token end_section )
{
- char* key;
- FT_UInt len;
+ char* key;
+ FT_UInt len;
while ( n-- > 0 )
@@ -901,7 +904,7 @@
error = afm_parse_kern_data( parser );
if ( error )
goto Fail;
- /* no break since we only support kern data */
+ /* fall through since we only support kern data */
case AFM_TOKEN_ENDFONTMETRICS:
return PSaux_Err_Ok;
@@ -923,3 +926,6 @@
return error;
}
+
+
+/* END */
diff --git a/src/psaux/afmparse.h b/src/psaux/afmparse.h
index bb41cfb..11eadcd 100644
--- a/src/psaux/afmparse.h
+++ b/src/psaux/afmparse.h
@@ -57,11 +57,13 @@ FT_BEGIN_HEADER
{
enum AFM_ValueType_ type;
union {
- char* s;
- FT_Fixed f;
- FT_Int i;
- FT_Bool b;
+ char* s;
+ FT_Fixed f;
+ FT_Int i;
+ FT_Bool b;
+
} u;
+
} AFM_ValueRec, *AFM_Value;
diff --git a/src/psaux/psaux.c b/src/psaux/psaux.c
index e5d6d26..9dddc70 100644
--- a/src/psaux/psaux.c
+++ b/src/psaux/psaux.c
@@ -4,7 +4,7 @@
/* */
/* FreeType auxiliary PostScript driver component (body only). */
/* */
-/* Copyright 1996-2001, 2002 by */
+/* Copyright 1996-2001, 2002, 2006 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/src/psaux/psauxmod.c b/src/psaux/psauxmod.c
index 42330d5..b69304a 100644
--- a/src/psaux/psauxmod.c
+++ b/src/psaux/psauxmod.c
@@ -4,7 +4,7 @@
/* */
/* FreeType auxiliary PostScript module implementation (body). */
/* */
-/* Copyright 2000-2001, 2002, 2003 by */
+/* Copyright 2000-2001, 2002, 2003, 2006 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/src/psaux/psconv.c b/src/psaux/psconv.c
index 66ad547..e5c6269 100644
--- a/src/psaux/psconv.c
+++ b/src/psaux/psconv.c
@@ -2,7 +2,7 @@
/* */
/* psconv.c */
/* */
-/* Some convenient conversions (body). */
+/* Some convenience conversions (body). */
/* */
/* Copyright 2006 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
@@ -24,8 +24,8 @@
#include "psauxerr.h"
-/* The following array is used by various functions to quickly convert */
-/* digits (both decimal and non-decimal) into numbers. */
+ /* The following array is used by various functions to quickly convert */
+ /* digits (both decimal and non-decimal) into numbers. */
#if 'A' == 65
/* ASCII */
@@ -69,6 +69,7 @@
#endif /* 'A' == 193 */
+
FT_LOCAL_DEF( FT_Int )
PS_Conv_Strtol( FT_Byte** cursor,
FT_Byte* limit,
@@ -205,7 +206,7 @@
power_ten += PS_Conv_ToInt( &p, limit );
}
-Exit:
+ Exit:
while ( power_ten > 0 )
{
integral *= 10;
@@ -325,7 +326,7 @@ Exit:
return r;
}
-#endif
+#endif /* 0 */
FT_LOCAL_DEF( FT_UInt )
@@ -369,11 +370,11 @@ Exit:
FT_LOCAL_DEF( FT_UInt )
- PS_Conv_EexecDecode( FT_Byte** cursor,
- FT_Byte* limit,
- FT_Byte* buffer,
- FT_UInt n,
- FT_UShort* seed )
+ PS_Conv_EexecDecode( FT_Byte** cursor,
+ FT_Byte* limit,
+ FT_Byte* buffer,
+ FT_UInt n,
+ FT_UShort* seed )
{
FT_Byte* p;
FT_UInt r;
@@ -392,3 +393,6 @@ Exit:
return r;
}
+
+
+/* END */
diff --git a/src/psaux/psconv.h b/src/psaux/psconv.h
index 823e05a..61b24d5 100644
--- a/src/psaux/psconv.h
+++ b/src/psaux/psconv.h
@@ -2,7 +2,7 @@
/* */
/* psconv.h */
/* */
-/* Some convenient conversions (specification). */
+/* Some convenience conversions (specification). */
/* */
/* Copyright 2006 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
@@ -56,40 +56,41 @@ FT_BEGIN_HEADER
FT_UInt n );
FT_LOCAL( FT_UInt )
- PS_Conv_EexecDecode( FT_Byte** cursor,
- FT_Byte* limit,
- FT_Byte* buffer,
- FT_UInt n,
- FT_UShort* seed );
+ PS_Conv_EexecDecode( FT_Byte** cursor,
+ FT_Byte* limit,
+ FT_Byte* buffer,
+ FT_UInt n,
+ FT_UShort* seed );
+
#define IS_PS_NEWLINE( ch ) \
- ( ( ch ) == '\r' || \
+ ( ( ch ) == '\r' || \
( ch ) == '\n' )
-#define IS_PS_SPACE( ch ) \
- ( ( ch ) == ' ' || \
- IS_PS_NEWLINE( ch ) || \
- ( ch ) == '\t' || \
- ( ch ) == '\f' || \
+#define IS_PS_SPACE( ch ) \
+ ( ( ch ) == ' ' || \
+ IS_PS_NEWLINE( ch ) || \
+ ( ch ) == '\t' || \
+ ( ch ) == '\f' || \
( ch ) == '\0' )
#define IS_PS_SPECIAL( ch ) \
- ( ( ch ) == '/' || \
- ( ch ) == '(' || \
- ( ch ) == ')' || \
- ( ch ) == '<' || \
- ( ch ) == '>' || \
- ( ch ) == '[' || \
- ( ch ) == ']' || \
- ( ch ) == '{' || \
- ( ch ) == '}' || \
+ ( ( ch ) == '/' || \
+ ( ch ) == '(' || \
+ ( ch ) == ')' || \
+ ( ch ) == '<' || \
+ ( ch ) == '>' || \
+ ( ch ) == '[' || \
+ ( ch ) == ']' || \
+ ( ch ) == '{' || \
+ ( ch ) == '}' || \
( ch ) == '%' )
-#define IS_PS_DELIM( ch ) \
- ( IS_PS_SPACE( ch ) || \
+#define IS_PS_DELIM( ch ) \
+ ( IS_PS_SPACE( ch ) || \
IS_PS_SPECIAL( ch ) )
-#define IS_PS_DIGIT( ch ) ( ( ch ) >= '0' && ( ch ) <= '9' )
+#define IS_PS_DIGIT( ch ) ( ( ch ) >= '0' && ( ch ) <= '9' )
#define IS_PS_XDIGIT( ch ) \
( IS_PS_DIGIT( ( ch ) ) || \
diff --git a/src/psaux/psobjs.c b/src/psaux/psobjs.c
index 98f4e0b..7e21755 100644
--- a/src/psaux/psobjs.c
+++ b/src/psaux/psobjs.c
@@ -4,7 +4,7 @@
/* */
/* Auxiliary functions for PostScript fonts (body). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005 by */
+/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -1117,7 +1117,7 @@
{
if ( *cur != '<' )
{
- FT_ERROR(( "ps_tobytes: Missing starting delimiter `<'\n" ));
+ FT_ERROR(( "ps_parser_to_bytes: Missing starting delimiter `<'\n" ));
error = PSaux_Err_Invalid_File_Format;
goto Exit;
}
diff --git a/src/psaux/rules.mk b/src/psaux/rules.mk
index 50a1f03..7a1be37 100644
--- a/src/psaux/rules.mk
+++ b/src/psaux/rules.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2000, 2002, 2003 by
+# Copyright 1996-2000, 2002, 2003, 2006 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/src/type1/t1afm.c b/src/type1/t1afm.c
index d128e8a..bdf2f42 100644
--- a/src/type1/t1afm.c
+++ b/src/type1/t1afm.c
@@ -4,7 +4,7 @@
/* */
/* AFM support for Type 1 fonts (body). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005 by */
+/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -98,16 +98,16 @@
FT_Stream stream,
AFM_FontInfo fi )
{
- FT_Error error = T1_Err_Ok;
- FT_Memory memory = stream->memory;
- FT_Byte* start;
- FT_Byte* limit;
- FT_Byte* p;
- AFM_KernPair kp;
- FT_Int width_table_length;
- FT_CharMap oldcharmap;
- FT_CharMap charmap;
- FT_Int n;
+ FT_Error error = T1_Err_Ok;
+ FT_Memory memory = stream->memory;
+ FT_Byte* start;
+ FT_Byte* limit;
+ FT_Byte* p;
+ AFM_KernPair kp;
+ FT_Int width_table_length;
+ FT_CharMap oldcharmap;
+ FT_CharMap charmap;
+ FT_Int n;
start = (FT_Byte*)stream->cursor;
@@ -225,11 +225,11 @@
T1_Read_Metrics( FT_Face t1_face,
FT_Stream stream )
{
- PSAux_Service psaux;
- FT_Memory memory = stream->memory;
- AFM_ParserRec parser;
- AFM_FontInfo fi;
- FT_Error error = T1_Err_Unknown_File_Format;
+ PSAux_Service psaux;
+ FT_Memory memory = stream->memory;
+ AFM_ParserRec parser;
+ AFM_FontInfo fi;
+ FT_Error error = T1_Err_Unknown_File_Format;
if ( FT_FRAME_ENTER( stream->size ) )
diff --git a/src/type1/t1afm.h b/src/type1/t1afm.h
index 2bc8c3a..7f9957e 100644
--- a/src/type1/t1afm.h
+++ b/src/type1/t1afm.h
@@ -4,7 +4,7 @@
/* */
/* AFM support for Type 1 fonts (specification). */
/* */
-/* Copyright 1996-2001, 2002 by */
+/* Copyright 1996-2001, 2002, 2006 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/src/type1/t1driver.c b/src/type1/t1driver.c
index bbe70e9..96ed45c 100644
--- a/src/type1/t1driver.c
+++ b/src/type1/t1driver.c
@@ -38,6 +38,7 @@
#include FT_SERVICE_POSTSCRIPT_INFO_H
#include FT_SERVICE_KERNING_H
+
/*************************************************************************/
/* */
/* The macro FT_COMPONENT is used in trace mode. It is an implicit */