* include/freetype/internal/ftdriver.h, include/freetype/internal/ftobjs.h, include/freetype/internal/psaux.h, src/cid/cidgload.c, src/psaux/psobjs.c, src/psaux/t1decode.c, src/psaux/psobjs.h, src/pshinter/pshrec.c, src/pshinter/pshalgo.c, src/psnames/psmodule.c, src/raster/ftraster.c, src/sfnt/sfobjs.c, src/smooth/ftgrays.c, src/smooth/ftsmooth.c, src/truetype/ttobjs.c, src/truetype/ttdriver.c, src/truetype/ttgload.c, src/type1/t1afm.c, src/type1/t1gload.c, src/type1/t1gload.h, src/type1/t1load.c, src/type1/t1objs.c, src/type42/t42parse.c, src/type42/t42parse.h: Many casts and slight argument type changes to make it work with a 16bit compiler.
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
diff --git a/ChangeLog b/ChangeLog
index 578da91..8fad44e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,25 @@
+2003-06-04 Wolfgang Domröse <porthos.domroese@harz.de>
+
+ * include/freetype/internal/ftdriver.h,
+ include/freetype/internal/ftobjs.h,
+ include/freetype/internal/psaux.h, src/cid/cidgload.c,
+ src/psaux/psobjs.c, src/psaux/t1decode.c, src/psaux/psobjs.h,
+ src/pshinter/pshrec.c, src/pshinter/pshalgo.c,
+ src/psnames/psmodule.c, src/raster/ftraster.c, src/sfnt/sfobjs.c,
+ src/smooth/ftgrays.c, src/smooth/ftsmooth.c, src/truetype/ttobjs.c,
+ src/truetype/ttdriver.c, src/truetype/ttgload.c, src/type1/t1afm.c,
+ src/type1/t1gload.c, src/type1/t1gload.h, src/type1/t1load.c,
+ src/type1/t1objs.c, src/type42/t42parse.c, src/type42/t42parse.h:
+ Many casts and slight argument type changes to make it work with
+ a 16bit compiler.
+
+2003-06-04 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/config/ftoption.h: Defining
+ TT_CONFIG_OPTION_FORCE_UNPATENTED_HINTING by default is a bad idea
+ since some fonts (e.g. Arial) produce worse results than without
+ hinting. Reverted.
+
2003-06-04 Werner Lemberg <wl@gnu.org>
* src/truetype/ttgload.c (load_truetype_glyph)
diff --git a/include/freetype/cache/ftcimage.h b/include/freetype/cache/ftcimage.h
index 382d991..6acbf81 100644
--- a/include/freetype/cache/ftcimage.h
+++ b/include/freetype/cache/ftcimage.h
@@ -4,7 +4,7 @@
/* */
/* FreeType Image cache (specification). */
/* */
-/* Copyright 2000-2001, 2002 by */
+/* Copyright 2000-2001, 2002, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -208,12 +208,12 @@ FT_BEGIN_HEADER
/* FTC_Image_Desc */
/* */
/* <Description> */
- /* THIS TYPE IS DEPRECATED. Use @FTC_ImageDesc instead. */
+ /* THIS TYPE IS DEPRECATED. Use @FTC_ImageDescRec instead. */
/* */
/* A simple structure used to describe a given glyph image category. */
/* */
/* <Fields> */
- /* size :: An @FTC_SizeRec used to describe the glyph's face */
+ /* font :: An @FTC_FontRec used to describe the glyph's face */
/* and size. */
/* */
/* image_type :: The glyph image's type. */
diff --git a/include/freetype/internal/ftdriver.h b/include/freetype/internal/ftdriver.h
index 9323910..1f1c55a 100644
--- a/include/freetype/internal/ftdriver.h
+++ b/include/freetype/internal/ftdriver.h
@@ -4,7 +4,7 @@
/* */
/* FreeType font driver interface (specification). */
/* */
-/* Copyright 1996-2001, 2002 by */
+/* Copyright 1996-2001, 2002, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -169,9 +169,9 @@ FT_BEGIN_HEADER
{
FT_Module_Class root;
- FT_Int face_object_size;
- FT_Int size_object_size;
- FT_Int slot_object_size;
+ FT_Long face_object_size;
+ FT_Long size_object_size;
+ FT_Long slot_object_size;
FT_Face_InitFunc init_face;
FT_Face_DoneFunc done_face;
diff --git a/include/freetype/internal/ftobjs.h b/include/freetype/internal/ftobjs.h
index 9dd2beb..b6057db 100644
--- a/include/freetype/internal/ftobjs.h
+++ b/include/freetype/internal/ftobjs.h
@@ -239,7 +239,7 @@ FT_BEGIN_HEADER
typedef struct FT_CMap_ClassRec_
{
- FT_UInt size;
+ FT_ULong size;
FT_CMap_InitFunc init;
FT_CMap_DoneFunc done;
FT_CMap_CharIndexFunc char_index;
diff --git a/include/freetype/internal/psaux.h b/include/freetype/internal/psaux.h
index 7375d67..680b438 100644
--- a/include/freetype/internal/psaux.h
+++ b/include/freetype/internal/psaux.h
@@ -70,10 +70,10 @@ FT_BEGIN_HEADER
(*done)( PS_Table table );
FT_Error
- (*add)( PS_Table table,
- FT_Int index,
- void* object,
- FT_Int length );
+ (*add)( PS_Table table,
+ FT_Int index,
+ void* object,
+ FT_PtrDist length );
void
(*release)( PS_Table table );
diff --git a/src/cid/cidgload.c b/src/cid/cidgload.c
index 6de7fd9..59c2276 100644
--- a/src/cid/cidgload.c
+++ b/src/cid/cidgload.c
@@ -48,7 +48,7 @@
FT_Error error = 0;
FT_Byte* charstring = 0;
FT_Memory memory = face->root.memory;
- FT_UInt glyph_length = 0;
+ FT_ULong glyph_length = 0;
#ifdef FT_CONFIG_OPTION_INCREMENTAL
@@ -107,8 +107,7 @@
fd_select = (FT_UInt) cid_get_offset( &p, (FT_Byte)cid->fd_bytes );
off1 = (FT_ULong)cid_get_offset( &p, (FT_Byte)cid->gd_bytes );
p += cid->fd_bytes;
- glyph_length = (FT_UInt) cid_get_offset(
- &p, (FT_Byte)cid->gd_bytes ) - off1;
+ glyph_length = cid_get_offset( &p, (FT_Byte)cid->gd_bytes ) - off1;
FT_FRAME_EXIT();
if ( glyph_length == 0 )
@@ -148,9 +147,9 @@
if ( decoder->lenIV >= 0 )
cid_decrypt( charstring, glyph_length, 4330 );
- error = decoder->funcs.parse_charstrings( decoder,
- charstring + cs_offset,
- glyph_length - cs_offset );
+ error = decoder->funcs.parse_charstrings(
+ decoder, charstring + cs_offset,
+ (FT_Int)glyph_length - cs_offset );
}
FT_FREE( charstring );
diff --git a/src/psaux/psobjs.c b/src/psaux/psobjs.c
index 1de2d2b..7cf6b88 100644
--- a/src/psaux/psobjs.c
+++ b/src/psaux/psobjs.c
@@ -153,10 +153,10 @@
/* reallocation fails. */
/* */
FT_LOCAL_DEF( FT_Error )
- ps_table_add( PS_Table table,
- FT_Int idx,
- void* object,
- FT_Int length )
+ ps_table_add( PS_Table table,
+ FT_Int idx,
+ void* object,
+ FT_PtrDist length )
{
if ( idx < 0 || idx > table->max_elems )
{
diff --git a/src/psaux/psobjs.h b/src/psaux/psobjs.h
index 9e81675..8b214f6 100644
--- a/src/psaux/psobjs.h
+++ b/src/psaux/psobjs.h
@@ -4,7 +4,7 @@
/* */
/* Auxiliary functions for PostScript fonts (specification). */
/* */
-/* Copyright 1996-2001, 2002 by */
+/* Copyright 1996-2001, 2002, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -52,10 +52,10 @@ FT_BEGIN_HEADER
FT_Memory memory );
FT_LOCAL( FT_Error )
- ps_table_add( PS_Table table,
- FT_Int idx,
- void* object,
- FT_Int length );
+ ps_table_add( PS_Table table,
+ FT_Int idx,
+ void* object,
+ FT_PtrDist length );
FT_LOCAL( void )
ps_table_done( PS_Table table );
diff --git a/src/psaux/t1decode.c b/src/psaux/t1decode.c
index ec741ff..dd8719f 100644
--- a/src/psaux/t1decode.c
+++ b/src/psaux/t1decode.c
@@ -241,8 +241,8 @@
/* subglyph 1 = accent character */
subg->index = achar_index;
subg->flags = FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES;
- subg->arg1 = adx - asb;
- subg->arg2 = ady;
+ subg->arg1 = (FT_Int)( adx - asb );
+ subg->arg2 = (FT_Int)ady;
/* set up remaining glyph fields */
glyph->num_subglyphs = 2;
@@ -565,7 +565,7 @@
goto Stack_Underflow;
top -= 2;
- switch ( top[1] )
+ switch ( (FT_Int)top[1] )
{
case 1: /* start flex feature */
if ( top[0] != 0 )
@@ -706,7 +706,7 @@
values = top;
for ( nn = 0; nn < num_points; nn++ )
{
- FT_Int tmp = values[0];
+ FT_Long tmp = values[0];
for ( mm = 1; mm < blend->num_designs; mm++ )
@@ -785,8 +785,8 @@
case op_seac:
/* return immediately after the processing */
- return t1operator_seac( decoder, top[0], top[1],
- top[2], top[3], top[4] );
+ return t1operator_seac( decoder, top[0], top[1], top[2],
+ (FT_Int)top[3], (FT_Int)top[4] );
case op_sbw:
FT_TRACE4(( " sbw" ));
@@ -945,7 +945,7 @@
FT_TRACE4(( " callsubr" ));
- idx = top[0];
+ idx = (FT_Int)top[0];
if ( idx < 0 || idx >= (FT_Int)decoder->num_subrs )
{
FT_ERROR(( "t1_decoder_parse_charstrings: "
diff --git a/src/pshinter/pshalgo.c b/src/pshinter/pshalgo.c
index 796351e..21e82c3 100644
--- a/src/pshinter/pshalgo.c
+++ b/src/pshinter/pshalgo.c
@@ -1168,8 +1168,8 @@
for ( n = 0; n < glyph->num_points; n++, point++ )
{
- FT_Int n_prev = point->prev - points;
- FT_Int n_next = point->next - points;
+ FT_Int n_prev = (FT_Int)( point->prev - points );
+ FT_Int n_next = (FT_Int)( point->next - points );
FT_Pos dxi, dyi, dxo, dyo;
@@ -1448,7 +1448,8 @@
for ( ; num_hints > 0; num_hints--, sort++ )
{
PSH_Hint hint = sort[0];
- FT_Pos d, flag;
+ FT_Pos d;
+ FT_Int flag;
if ( point->flags2 & min_flag )
diff --git a/src/pshinter/pshrec.c b/src/pshinter/pshrec.c
index 69cef34..a4b51fc 100644
--- a/src/pshinter/pshrec.c
+++ b/src/pshinter/pshrec.c
@@ -861,8 +861,9 @@
FT_Memory memory = hints->memory;
- error = ps_dimension_add_t1stem( dim, stems[0], stems[1],
- memory, NULL );
+ error = ps_dimension_add_t1stem(
+ dim, (FT_Int)stems[0], (FT_Int)stems[1],
+ memory, NULL );
if ( error )
{
FT_ERROR(( "ps_hints_stem: could not add stem"
@@ -917,8 +918,9 @@
/* add the three stems to our hints/masks table */
for ( count = 0; count < 3; count++, stems += 2 )
{
- error = ps_dimension_add_t1stem( dim, stems[0], stems[1],
- memory, &idx[count] );
+ error = ps_dimension_add_t1stem(
+ dim, (FT_Int)stems[0], (FT_Int)stems[1],
+ memory, &idx[count] );
if ( error )
goto Fail;
}
@@ -1164,7 +1166,8 @@
FT_Int count,
FT_Fixed* coords )
{
- FT_Pos stems[32], y, n, total = count;
+ FT_Pos stems[32], y, n;
+ FT_Int total = count;
y = 0;
diff --git a/src/psnames/psmodule.c b/src/psnames/psmodule.c
index b2ddcb7..606ba74 100644
--- a/src/psnames/psmodule.c
+++ b/src/psnames/psmodule.c
@@ -4,7 +4,7 @@
/* */
/* PSNames module implementation (body). */
/* */
-/* Copyright 1996-2001, 2002 by */
+/* Copyright 1996-2001, 2002, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -172,7 +172,7 @@
if ( uni_char != 0 && uni_char != 0xFFFF )
{
- map->unicode = uni_char;
+ map->unicode = (FT_UInt)uni_char;
map->glyph_index = n;
map++;
}
diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c
index 65b5558..757cba7 100644
--- a/src/raster/ftraster.c
+++ b/src/raster/ftraster.c
@@ -917,7 +917,7 @@
/* Take care: miny-y1 can be a very large value; we use */
/* a slow MulDiv function to avoid clipping bugs */
x1 += SMulDiv( Dx, miny - y1, Dy );
- e1 = TRUNC( miny );
+ e1 = (Int)TRUNC( miny );
f1 = 0;
}
else
diff --git a/src/sfnt/sfobjs.c b/src/sfnt/sfobjs.c
index 5eeea6e..4dac94b 100644
--- a/src/sfnt/sfobjs.c
+++ b/src/sfnt/sfobjs.c
@@ -633,7 +633,7 @@
root->face_flags |= FT_FACE_FLAG_VERTICAL;
}
#endif
- root->num_fixed_sizes = face->num_sbit_strikes;
+ root->num_fixed_sizes = (FT_Int)face->num_sbit_strikes;
if ( FT_NEW_ARRAY( root->available_sizes, face->num_sbit_strikes ) )
goto Exit;
diff --git a/src/smooth/ftgrays.c b/src/smooth/ftgrays.c
index 5cffbe9..499cc8c 100644
--- a/src/smooth/ftgrays.c
+++ b/src/smooth/ftgrays.c
@@ -340,7 +340,7 @@
long byte_size )
{
ras.cells = (PCell)buffer;
- ras.max_cells = byte_size / sizeof ( TCell );
+ ras.max_cells = (int)( byte_size / sizeof ( TCell ) );
ras.num_cells = 0;
ras.area = 0;
ras.cover = 0;
@@ -567,16 +567,16 @@
if ( ex1 != ex2 )
{
- p = ONE_PIXEL * ( y2 - y1 + delta );
- lift = (TCoord)( p / dx );
- rem = (TCoord)( p % dx );
+ p = ONE_PIXEL * ( y2 - y1 + delta );
+ lift = (TCoord)( p / dx );
+ rem = (TCoord)( p % dx );
if ( rem < 0 )
{
lift--;
rem += (TCoord)dx;
}
- mod -= dx;
+ mod -= (int)dx;
while ( ex1 != ex2 )
{
diff --git a/src/smooth/ftsmooth.c b/src/smooth/ftsmooth.c
index 131b17e..004f40a 100644
--- a/src/smooth/ftsmooth.c
+++ b/src/smooth/ftsmooth.c
@@ -4,7 +4,7 @@
/* */
/* Anti-aliasing renderer interface (body). */
/* */
-/* Copyright 2000-2001, 2002 by */
+/* Copyright 2000-2001, 2002, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -137,8 +137,8 @@
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 = (FT_UInt)( ( cbox.xMax - cbox.xMin ) >> 6 );
+ height = (FT_UInt)( ( cbox.yMax - cbox.yMin ) >> 6 );
bitmap = &slot->bitmap;
memory = render->root.memory;
diff --git a/src/truetype/ttdriver.c b/src/truetype/ttdriver.c
index df023d5..8c1e2fc 100644
--- a/src/truetype/ttdriver.c
+++ b/src/truetype/ttdriver.c
@@ -115,7 +115,7 @@
while ( left <= right )
{
- FT_Int middle = left + ( ( right - left ) >> 1 );
+ FT_Long middle = left + ( ( right - left ) >> 1 );
FT_ULong cur_pair;
diff --git a/src/truetype/ttgload.c b/src/truetype/ttgload.c
index 82ad8ab..bab6385 100644
--- a/src/truetype/ttgload.c
+++ b/src/truetype/ttgload.c
@@ -886,7 +886,7 @@
count = 0;
if ( glyph_index < (FT_UInt)face->num_locations - 1 )
- count = face->glyph_locations[glyph_index + 1] - offset;
+ count = (FT_UInt)( face->glyph_locations[glyph_index + 1] - offset );
}
if ( count == 0 )
@@ -1184,16 +1184,16 @@
/* */
/* This algorithm is a guess and works much better than the above. */
/* */
- int mac_xscale = FT_SqrtFixed(
- FT_MulFix( subglyph->transform.xx,
- subglyph->transform.xx ) +
- FT_MulFix( subglyph->transform.xy,
- subglyph->transform.xy) );
- int mac_yscale = FT_SqrtFixed(
- FT_MulFix( subglyph->transform.yy,
- subglyph->transform.yy ) +
- FT_MulFix( subglyph->transform.yx,
- subglyph->transform.yx ) );
+ FT_Fixed mac_xscale = FT_SqrtFixed(
+ FT_MulFix( subglyph->transform.xx,
+ subglyph->transform.xx ) +
+ FT_MulFix( subglyph->transform.xy,
+ subglyph->transform.xy) );
+ FT_Fixed mac_yscale = FT_SqrtFixed(
+ FT_MulFix( subglyph->transform.yy,
+ subglyph->transform.yy ) +
+ FT_MulFix( subglyph->transform.yx,
+ subglyph->transform.yx ) );
x = FT_MulFix( x, mac_xscale );
@@ -1647,9 +1647,9 @@
error = sfnt->load_sbit_image( face,
- size->strike_index,
- glyph_index,
- load_flags,
+ (FT_ULong)size->strike_index,
+ (FT_UInt)glyph_index,
+ (FT_Int)load_flags,
stream,
&glyph->bitmap,
&metrics );
diff --git a/src/truetype/ttobjs.c b/src/truetype/ttobjs.c
index b6869b0..9d4fb7a 100644
--- a/src/truetype/ttobjs.c
+++ b/src/truetype/ttobjs.c
@@ -760,7 +760,7 @@
strike->hori.max_width +
strike->hori.min_advance_SB ) << 6;
- size->strike_index = strike_index;
+ size->strike_index = (FT_UInt)strike_index;
}
else
{
diff --git a/src/type1/t1afm.c b/src/type1/t1afm.c
index 71ccd1e..9945ebd 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 by */
+/* Copyright 1996-2001, 2002, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -148,7 +148,7 @@
FT_ULong index2 = KERN_INDEX( pair2->glyph1, pair2->glyph2 );
- return ( index1 - index2 );
+ return (int)( index1 - index2 );
}
diff --git a/src/type1/t1gload.c b/src/type1/t1gload.c
index 1a98daf..4f46f35 100644
--- a/src/type1/t1gload.c
+++ b/src/type1/t1gload.c
@@ -143,7 +143,7 @@
FT_LOCAL_DEF( FT_Error )
T1_Compute_Max_Advance( T1_Face face,
- FT_Int* max_advance )
+ FT_Pos* max_advance )
{
FT_Error error;
T1_DecoderRec decoder;
@@ -185,7 +185,7 @@
if ( glyph_index == 0 || decoder.builder.advance.x > *max_advance )
*max_advance = decoder.builder.advance.x;
- /* ignore the error if one occured - skip to next glyph */
+ /* ignore the error if one occurred - skip to next glyph */
}
return T1_Err_Ok;
diff --git a/src/type1/t1gload.h b/src/type1/t1gload.h
index 0324a0d..de87896 100644
--- a/src/type1/t1gload.h
+++ b/src/type1/t1gload.h
@@ -4,7 +4,7 @@
/* */
/* Type 1 Glyph Loader (specification). */
/* */
-/* Copyright 1996-2001, 2002 by */
+/* Copyright 1996-2001, 2002, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -29,7 +29,7 @@ FT_BEGIN_HEADER
FT_LOCAL( FT_Error )
T1_Compute_Max_Advance( T1_Face face,
- FT_Int* max_advance );
+ FT_Pos* max_advance );
FT_LOCAL( FT_Error )
T1_Load_Glyph( T1_GlyphSlot glyph,
diff --git a/src/type1/t1load.c b/src/type1/t1load.c
index 50b47db..3301467 100644
--- a/src/type1/t1load.c
+++ b/src/type1/t1load.c
@@ -1213,12 +1213,12 @@
FT_MEM_COPY( temp, base, size );
psaux->t1_decrypt( temp, size, 4330 );
size -= face->type1.private_dict.lenIV;
- error = T1_Add_Table( table, idx,
+ error = T1_Add_Table( table, (FT_Int)idx,
temp + face->type1.private_dict.lenIV, size );
FT_FREE( temp );
}
else
- error = T1_Add_Table( table, idx, base, size );
+ error = T1_Add_Table( table, (FT_Int)idx, base, size );
if ( error )
goto Fail;
}
diff --git a/src/type1/t1objs.c b/src/type1/t1objs.c
index 6edb96d..4554c67 100644
--- a/src/type1/t1objs.c
+++ b/src/type1/t1objs.c
@@ -424,7 +424,7 @@
root->max_advance_width =
(FT_Short)( root->bbox.xMax );
{
- FT_Int max_advance;
+ FT_Pos max_advance;
error = T1_Compute_Max_Advance( face, &max_advance );
diff --git a/src/type42/t42parse.c b/src/type42/t42parse.c
index b44d222..5e99e70 100644
--- a/src/type42/t42parse.c
+++ b/src/type42/t42parse.c
@@ -383,7 +383,7 @@
/* read the number of entries in the encoding, should be 256 */
- count = T1_ToInt( parser );
+ count = (FT_Int)T1_ToInt( parser );
if ( parser->root.error )
return;
@@ -451,7 +451,7 @@
parser->root.cursor = cur;
- charcode = T1_ToInt( parser );
+ charcode = (FT_Int)T1_ToInt( parser );
cur = parser->root.cursor;
/* skip whitespace */
@@ -715,7 +715,7 @@
FT_Int n;
- loader->num_glyphs = T1_ToInt( parser );
+ loader->num_glyphs = (FT_Int)T1_ToInt( parser );
if ( parser->root.error )
return;
@@ -864,11 +864,11 @@
FT_Byte* base,
FT_Long size )
{
- T42_Parser parser = &loader->parser;
- FT_Byte* cur = base;
- FT_Byte* limit = cur + size;
- FT_UInt n_keywords = sizeof ( t42_keywords ) /
- sizeof ( t42_keywords[0] );
+ T42_Parser parser = &loader->parser;
+ FT_Byte* cur = base;
+ FT_Byte* limit = cur + size;
+ FT_UInt n_keywords = (FT_UInt)( sizeof ( t42_keywords ) /
+ sizeof ( t42_keywords[0] ) );
parser->root.cursor = base;
diff --git a/src/type42/t42parse.h b/src/type42/t42parse.h
index 9bcb657..7339aa6 100644
--- a/src/type42/t42parse.h
+++ b/src/type42/t42parse.h
@@ -4,7 +4,7 @@
/* */
/* Type 42 font parser (specification). */
/* */
-/* Copyright 2002 by Roberto Alameda. */
+/* Copyright 2002, 2003 by Roberto Alameda. */
/* */
/* This file is part of the FreeType project, and may only be used, */
/* modified, and distributed under the terms of the FreeType project */
@@ -31,7 +31,7 @@ FT_BEGIN_HEADER
FT_Stream stream;
FT_Byte* base_dict;
- FT_Int base_len;
+ FT_Long base_len;
FT_Byte in_memory;