* builds/amiga/*: Adaptations to latest changes. Support added for MorphOS. * src/pshinter/pshrec.c (FT_COMPONENT): Redefine to `trace_pshrec'. (ps_mask_table_merge, ps_hints_open, ps_hints_stem, ps_hints_t1stem3, ps_hints_t2mask, ps_hints_t2counter): Fix FT_ERROR messages. * src/pshinter/pshalgo1.c (FT_COMPONENT): Define as `trace_pshalgo1'. * src/pshinter/pshalgo2.c (FT_COMPONENT): Define as `trace_pshalgo2'. * include/freetype/internal/ftdebug.h (FT_Trace): Updated. * docs/modules.txt: New file.
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
diff --git a/ChangeLog b/ChangeLog
index 261567c..6c49c9a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,20 +1,37 @@
+2001-12-22 Detlef Würkner <TetiSoft@apg.lahn.de>
+
+ * builds/amiga/*: Adaptations to latest changes.
+ Support added for MorphOS.
+
+2001-12-22 Werner Lemberg <wl@gnu.org>
+
+ * src/pshinter/pshrec.c (FT_COMPONENT): Redefine to `trace_pshrec'.
+ (ps_mask_table_merge, ps_hints_open, ps_hints_stem,
+ ps_hints_t1stem3, ps_hints_t2mask, ps_hints_t2counter): Fix
+ FT_ERROR messages.
+ * src/pshinter/pshalgo1.c (FT_COMPONENT): Define as
+ `trace_pshalgo1'.
+ * src/pshinter/pshalgo2.c (FT_COMPONENT): Define as
+ `trace_pshalgo2'.
+ * include/freetype/internal/ftdebug.h (FT_Trace): Updated.
+
+ * docs/modules.txt: New file.
+
2001-12-21 David Turner <david@freetype.org>
- * src/cff/cffgload.c: added a comment regarding "cntrmask" operator
-
- * src/pshinter/pshrec.c: now ignores invalid "hintmask" and "cntrmask"
- operators (instead of returning an error). Glyph 2028 of the CFF font
- "MSung-Light-Acro" couldn't be rendered otherwise (it seems its
- charstring is buggy, though this requires more analysis)..
+ * src/pshinter/pshrec.c (ps_hints_t2mask, ps_hints_t2counter):
+ Ignore invalid "hintmask" and "cntrmask" operators (instead of
+ returning an error). Glyph 2028 of the CFF font "MSung-Light-Acro"
+ couldn't be rendered otherwise (it seems its charstring is buggy,
+ though this requires more analysis).
+ (FT_COMPONENT): Define.
- * src/cff/cffgload.c, src/psaux/t1decode.c, src/pshinter/pshrec.c,
- src/pshinter/ahalgo2.c, src/pshinter/pshglob.h: fixed a bug where
- the X and Y axis where inversed in the postscript hinter. this
- caused problem when displaying on non-square surfaces..
+ * src/cff/cffgload.c (CFF_Parse_CharStrings), src/psaux/t1decode.c
+ (T1_Decoder_Parse_Charstrings), src/pshinter/pshalgo2.c (*), Fixed a
+ bug where the X and Y axis where inversed in the postscript hinter.
+ This caused problem when displaying on non-square surfaces.
- * include/freetype/cache/ftcmanag.h, include/freetype/cache/ftcimage.h,
- include/freetype/cache/ftcsbits.h: updating documentation to better
- explain the use of the "anode" output parameter in lookup functions
+ * src/pshinter/pshalgo2.c: s/vertical/dimension/.
* src/pshinter/pshglob.c (psh_globals_new): Replaced a floating
point constant with a fixed-float equivalent. For some reasons not
@@ -23,9 +40,6 @@
2001-12-20 Werner Lemberg <wl@gnu.org>
- * src/cid/cidobjs.c (CID_Face_Done): fixed a memory leak, the subrs
- routines were never released when CID faces were destroyed
-
* src/cache/ftccache.c (ftc_node_destroy, ftc_cache_lookup): Fix
tracing strings.
* src/cache/ftccmap.c (ftc_cmap_family_init): Ditto.
@@ -97,6 +111,11 @@
* src/type1/t1gload.c (T1_Load_Glyph): Enable font matrix
transformation of hinted glyphs.
+ * src/cid/cidload.c (cid_read_subrs): Fix error condition.
+
+ * src/cid/cidobjs.c (CID_Face_Done): Fixed a memory leak; the subrs
+ routines were never released when CID faces were destroyed.
+
* src/cff/cffload.h, src/cff/cffload.c, src/cff/cffgload.c: Updated
to move the definition of encoding tables back within "cffload.c"
instead of making them part of a shared header (causing problems in
diff --git a/builds/amiga/README b/builds/amiga/README
index 8883b0a..17c4499 100644
--- a/builds/amiga/README
+++ b/builds/amiga/README
@@ -1,3 +1,9 @@
+The makefile is for ppc-morphos-gcc-2.95.3-bin.tgz (gcc 2.95.3 hosted
+on 68k-Amiga producing MorphOS-PPC-binaries from
+http://www.morphos.de). To use it, type "make assign", then "make",
+it produces a link library libft2_ppc.a.
+
+
The smakefile is a makefile for Amiga SAS/C 6.58 (no longer available,
latest sold version was 6.50, updates can be found in Aminet). It is
based on the version found in the sourcecode of ttf.library 0.83b for
diff --git a/builds/amiga/include/freetype/config/ftconfig.h b/builds/amiga/include/freetype/config/ftconfig.h
index ea88718..9c6ff45 100644
--- a/builds/amiga/include/freetype/config/ftconfig.h
+++ b/builds/amiga/include/freetype/config/ftconfig.h
@@ -1,11 +1,20 @@
// TetiSoft: We must change FT_BASE_DEF and FT_EXPORT_DEF
-//#define FT_BASE_DEF( x ) extern x // SAS/C wouldn't generate an XDEF
-//#define FT_EXPORT_DEF( x ) extern x // SAS/C wouldn't generate an XDEF
+//#define FT_BASE_DEF( x ) extern x // SAS/C wouldn't generate an XDEF
+//#define FT_EXPORT_DEF( x ) extern x // SAS/C wouldn't generate an XDEF
#undef FT_BASE_DEF
#define FT_BASE_DEF( x ) x
#undef FT_EXPORT_DEF
#define FT_EXPORT_DEF( x ) x
// TetiSoft: now include original file
+#ifndef __MORPHOS__
#include "FT:include/freetype/config/ftconfig.h"
+#else
+// We must define that, it seems that
+// lib/gcc-lib/ppc-morphos/2.95.3/include/syslimits.h is missing in
+// ppc-morphos-gcc-2.95.3-bin.tgz (gcc for 68k producing MorphOS PPC elf
+// binaries from http://www.morphos.de)
+#define _LIBC_LIMITS_H_
+#include "/FT/include/freetype/config/ftconfig.h"
+#endif
diff --git a/builds/amiga/include/freetype/config/ftmodule.h b/builds/amiga/include/freetype/config/ftmodule.h
index 602abff..e93f1ce 100644
--- a/builds/amiga/include/freetype/config/ftmodule.h
+++ b/builds/amiga/include/freetype/config/ftmodule.h
@@ -2,19 +2,20 @@
// insert the following in your source file and uncomment as needed:
/*
-//#define FT_USE_AUTOHINT // autohinter
-//#define FT_USE_RASTER // monochrome rasterizer
-//#define FT_USE_SMOOTH // anti-aliasing rasterizer
-//#define FT_USE_TT // truetype font driver
-//#define FT_USE_T1 // type1 font driver
-//#define FT_USE_T1CID // cid-keyed type1 font driver // no cmap support, useless
-//#define FT_USE_CFF // opentype font driver // does not work with TektonPro
-//#define FT_USE_PCF // pcf bitmap font driver // all tested fonts 12*12 (size unknown)
-//#define FT_USE_WINFNT // windows .fnt|.fon bitmap font driver
+//#define FT_USE_AUTOHINT // autohinter
+//#define FT_USE_RASTER // monochrome rasterizer
+//#define FT_USE_SMOOTH // anti-aliasing rasterizer
+//#define FT_USE_TT // truetype font driver
+//#define FT_USE_T1 // type1 font driver
+//#define FT_USE_T1CID // cid-keyed type1 font driver // no cmap support, useless
+//#define FT_USE_CFF // opentype font driver // does not work with TektonPro
+//#define FT_USE_PCF // pcf bitmap font driver
+//#define FT_USE_WINFNT // windows .fnt|.fon bitmap font driver
#include "FT:src/base/ftinit.c"
*/
-// TetiSoft: make sure that needed support modules are built in
+// TetiSoft: make sure that needed support modules are built in.
+// Dependencies can be found by searching for FT_Get_Module.
#ifdef FT_USE_TT
#define FT_USE_SFNT
@@ -22,14 +23,20 @@
#ifdef FT_USE_CFF
#define FT_USE_SFNT
+#define FT_USE_PSHINT
+#define FT_USE_PSNAMES
#endif
#ifdef FT_USE_T1
#define FT_USE_PSAUX
+#define FT_USE_PSHINT
+#define FT_USE_PSNAMES
#endif
#ifdef FT_USE_T1CID
#define FT_USE_PSAUX
+#define FT_USE_PSHINT
+#define FT_USE_PSNAMES
#endif
#ifdef FT_USE_PSAUX
@@ -46,6 +53,10 @@
FT_USE_MODULE(autohint_module_class)
#endif
+#ifdef FT_USE_PSHINT
+FT_USE_MODULE(pshinter_module_class)
+#endif
+
#ifdef FT_USE_CFF
FT_USE_MODULE(cff_driver_class)
#endif
diff --git a/builds/amiga/smakefile b/builds/amiga/smakefile
index d3274ff..e3dbaf5 100644
--- a/builds/amiga/smakefile
+++ b/builds/amiga/smakefile
@@ -33,6 +33,8 @@ OBJDEBUG = ftdebug.o ftdebugpure.o
OBJAHINT = autohint.o ahoptim.o
+OBJPSHINT = pshinter.o
+
OBJPSAUX = psaux.o
OBJPSNAM = psnames.o
@@ -57,7 +59,7 @@ OBJWINFNT = winfnt.o
OBJPCF = pcf.o
-OBJPS = $(OBJPSAUX) $(OBJPSNAM)
+OBJPS = $(OBJPSAUX) $(OBJPSNAM) $(OBJPSHINT)
OBJRASTER = $(OBJRAST) $(OBJSMOOTH)
@@ -142,6 +144,11 @@ ahoptim.o: $(CORE)autohint/ahoptim.c
sc $(SCFLAGS) objname=$@ $<
#
+# freetype library PS hinting module
+#
+pshinter.o: $(CORE)pshinter/pshinter.c
+ sc $(SCFLAGS) objname=$@ $<
+#
# freetype library PS support module
#
psaux.o: $(CORE)psaux/psaux.c
diff --git a/builds/amiga/src/base/ftsystem.c b/builds/amiga/src/base/ftsystem.c
index 023216a..70fea79 100644
--- a/builds/amiga/src/base/ftsystem.c
+++ b/builds/amiga/src/base/ftsystem.c
@@ -2,9 +2,19 @@
// malloc() realloc() and free() which can't be used in an amiga
// shared run-time library linked with libinit.o
+#ifdef __GNUC__
+// Avoid warnings "struct X declared inside parameter list"
+#include <exec/memory.h>
+#include <exec/devices.h>
+#include <exec/io.h>
+#include <exec/semaphores.h>
+#include <dos/exall.h>
+#endif
+
#include <proto/exec.h>
#include <proto/dos.h>
+#ifndef __GNUC__
/* TetiSoft: Missing in alib_protos.h, see amiga.lib autodoc
* (These amiga.lib functions work under AmigaOS V33 and up)
*/
@@ -24,13 +34,18 @@ extern VOID __asm AsmFreePooled(register __a0 APTR poolHeader,
register __a1 APTR memory,
register __d0 ULONG memSize,
register __a6 struct ExecBase *SysBase);
+#endif
// TetiSoft: C implementation of AllocVecPooled (see autodoc exec/AllocPooled)
APTR AllocVecPooled(APTR poolHeader, ULONG memSize)
{
- ULONG newSize = memSize + 4;
+ ULONG newSize = memSize + sizeof(ULONG);
+#ifdef __GNUC__
+ ULONG *mem = AllocPooled(poolHeader, newSize);
+#else
ULONG *mem = AsmAllocPooled(poolHeader, newSize, SysBase);
+#endif
if (!mem)
return NULL;
@@ -43,7 +58,11 @@ void FreeVecPooled(APTR poolHeader, APTR memory)
{
ULONG *realmem = (ULONG *)memory - 1;
+#ifdef __GNUC__
+ FreePooled(poolHeader, realmem, *realmem);
+#else
AsmFreePooled(poolHeader, realmem, *realmem, SysBase);
+#endif
}
/***************************************************************************/
@@ -215,7 +234,7 @@ void FreeVecPooled(APTR poolHeader, APTR memory)
/* We use the macro STREAM_FILE for convenience to extract the */
/* system-specific stream handle from a given FreeType stream object */
//#define STREAM_FILE( stream ) ( (FILE*)stream->descriptor.pointer )
-#define STREAM_FILE( stream ) ( (BPTR)stream->descriptor.pointer ) // TetiSoft
+#define STREAM_FILE( stream ) ( (BPTR)stream->descriptor.pointer ) // TetiSoft
/*************************************************************************/
@@ -233,7 +252,7 @@ void FreeVecPooled(APTR poolHeader, APTR memory)
ft_close_stream( FT_Stream stream )
{
// fclose( STREAM_FILE( stream ) );
- Close( STREAM_FILE( stream ) ); // TetiSoft
+ Close( STREAM_FILE( stream ) ); // TetiSoft
stream->descriptor.pointer = NULL;
stream->size = 0;
@@ -274,7 +293,7 @@ void FreeVecPooled(APTR poolHeader, APTR memory)
file = STREAM_FILE( stream );
// fseek( file, offset, SEEK_SET );
- Seek( file, offset, OFFSET_BEGINNING ); // TetiSoft
+ Seek( file, offset, OFFSET_BEGINNING ); // TetiSoft
// return (unsigned long)fread( buffer, 1, count, file );
return (unsigned long)FRead( file, buffer, 1, count);
@@ -289,14 +308,14 @@ void FreeVecPooled(APTR poolHeader, APTR memory)
{
// FILE* file;
BPTR file; // TetiSoft
- struct FileInfoBlock *fib; // TetiSoft
+ struct FileInfoBlock *fib; // TetiSoft
if ( !astream )
return FT_Err_Invalid_Stream_Handle;
// file = fopen( filepathname, "rb" );
- file = Open( filepathname, MODE_OLDFILE ); // TetiSoft
+ file = Open( filepathname, MODE_OLDFILE ); // TetiSoft
if ( !file )
{
FT_ERROR(( "FT_New_Stream:" ));
@@ -346,6 +365,7 @@ void FreeVecPooled(APTR poolHeader, APTR memory)
}
+
#ifdef FT_DEBUG_MEMORY
extern FT_Int
@@ -370,7 +390,11 @@ void FreeVecPooled(APTR poolHeader, APTR memory)
if ( memory )
{
// memory->user = 0;
+#ifdef __GNUC__
+ memory->user = CreatePool ( MEMF_PUBLIC, 2048, 2048 );
+#else
memory->user = AsmCreatePool ( MEMF_PUBLIC, 2048, 2048, SysBase );
+#endif
if ( memory->user == NULL )
{
FreeVec ( memory );
@@ -400,7 +424,11 @@ void FreeVecPooled(APTR poolHeader, APTR memory)
ft_mem_debug_done( memory );
#endif
+#ifdef __GNUC__
+ DeletePool( memory->user );
+#else
AsmDeletePool( memory->user, SysBase );
+#endif
FreeVec( memory );
}
diff --git a/docs/modules.txt b/docs/modules.txt
new file mode 100644
index 0000000..74e64cd
--- /dev/null
+++ b/docs/modules.txt
@@ -0,0 +1,13 @@
+This file shows the interdependencies of various FreeType modules.
+
+Note that the use of `psnames' can be controlled in ftconfig.h
+(FT_CONFIG_OPTION_POSTSCRIPT_NAMES).
+
+ module dependency
+ ---------------------------------------
+ cff sfnt, pshinter, psnames
+ cid psaux, pshinter, psnames
+ truetype sfnt
+ type1 psaux, pshinter, psnames
+ psaux psnames
+ sfnt psnames
diff --git a/include/freetype/cache/ftcimage.h b/include/freetype/cache/ftcimage.h
index f12ee29..e3a4009 100644
--- a/include/freetype/cache/ftcimage.h
+++ b/include/freetype/cache/ftcimage.h
@@ -168,9 +168,9 @@ FT_BEGIN_HEADER
/* aglyph :: The corresponding @FT_Glyph object. 0 in case of */
/* failure. */
/* */
- /* anode :: used to return the address of of the corresponding */
- /* cache node after incrementing its reference count */
- /* (see note below) */
+ /* anode :: Used to return the address of of the corresponding cache */
+ /* node after incrementing its reference count (see note */
+ /* below). */
/* */
/* <Return> */
/* FreeType error code. 0 means success. */
@@ -182,14 +182,14 @@ FT_BEGIN_HEADER
/* */
/* If "anode" is _not_ NULL, it receives the address of the cache */
/* node containing the glyph image, after increasing its reference */
- /* count. This ensures that the node (as well as the FT_Glyph) will */
+ /* count. This ensures that the node (as well as the FT_Glyph) will */
/* always be kept in the cache until you call @FTC_Node_Unref to */
/* "release" it. */
/* */
/* If "anode" is NULL, the cache node is left unchanged, which means */
/* that the FT_Glyph could be flushed out of the cache on the next */
- /* call to one of the caching sub-system APIs. Just don't assume */
- /* that it's persistent.. */
+ /* call to one of the caching sub-system APIs. Don't assume that it */
+ /* is persistent! */
/* */
FT_EXPORT( FT_Error )
FTC_ImageCache_Lookup( FTC_ImageCache cache,
diff --git a/include/freetype/cache/ftcmanag.h b/include/freetype/cache/ftcmanag.h
index 7db644c..da6ce62 100644
--- a/include/freetype/cache/ftcmanag.h
+++ b/include/freetype/cache/ftcmanag.h
@@ -152,7 +152,7 @@ FT_BEGIN_HEADER
/* between abstract @FTC_FaceID values and real */
/* @FT_Face objects. */
/* */
- /* families :: global table of families. */
+ /* families :: Global table of families. */
/* */
typedef struct FTC_ManagerRec_
{
diff --git a/include/freetype/cache/ftcsbits.h b/include/freetype/cache/ftcsbits.h
index 181cfd2..7c774f9 100644
--- a/include/freetype/cache/ftcsbits.h
+++ b/include/freetype/cache/ftcsbits.h
@@ -164,9 +164,9 @@ FT_BEGIN_HEADER
/* <Output> */
/* sbit :: A handle to a small bitmap descriptor. */
/* */
- /* anode :: used to return the address of of the corresponding */
- /* cache node after incrementing its reference count */
- /* (see note below) */
+ /* anode :: Used to return the address of of the corresponding cache */
+ /* node after incrementing its reference count (see note */
+ /* below). */
/* */
/* <Return> */
/* FreeType error code. 0 means success. */
@@ -181,15 +181,14 @@ FT_BEGIN_HEADER
/* glyph bitmap. */
/* */
/* If "anode" is _not_ NULL, it receives the address of the cache */
- /* node containing the bitmap, after increasing its reference */
- /* count. This ensures that the node (as well as the image) will */
- /* always be kept in the cache until you call @FTC_Node_Unref to */
- /* "release" it. */
+ /* node containing the bitmap, after increasing its reference count. */
+ /* This ensures that the node (as well as the image) will always be */
+ /* kept in the cache until you call @FTC_Node_Unref to "release" it. */
/* */
/* If "anode" is NULL, the cache node is left unchanged, which means */
/* that the bitmap could be flushed out of the cache on the next */
- /* call to one of the caching sub-system APIs. Just don't assume */
- /* that it's persistent.. */
+ /* call to one of the caching sub-system APIs. Don't assume that it */
+ /* is persistent! */
/* */
FT_EXPORT( FT_Error )
FTC_SBitCache_Lookup( FTC_SBitCache cache,
diff --git a/include/freetype/config/ftoption.h b/include/freetype/config/ftoption.h
index baf2fe5..f017fb2 100644
--- a/include/freetype/config/ftoption.h
+++ b/include/freetype/config/ftoption.h
@@ -138,7 +138,7 @@ FT_BEGIN_HEADER
/* Glyph Postscript Names handling */
/* */
/* By default, FreeType 2 is compiled with the `PSNames' module. This */
- /* This module is in charge of converting a glyph name string into a */
+ /* module is in charge of converting a glyph name string into a */
/* Unicode value, or return a Macintosh standard glyph name for the */
/* use with the TrueType `post' table. */
/* */
@@ -265,7 +265,7 @@ FT_BEGIN_HEADER
/* Note that the memory debugger is only activated at runtime when */
/* when the _environment_ variable "FT_DEBUG_MEMORY" is also defined! */
/* */
-#define FT_DEBUG_MEMORY
+#define FT_DEBUG_MEMORY
/*************************************************************************/
@@ -375,7 +375,7 @@ FT_BEGIN_HEADER
/* By undefining this, you will only compile the code necessary to load */
/* TrueType glyphs without hinting. */
/* */
-#undef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
+#undef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
/*************************************************************************/
diff --git a/include/freetype/internal/ftdebug.h b/include/freetype/internal/ftdebug.h
index f876580..e18acbb 100644
--- a/include/freetype/internal/ftdebug.h
+++ b/include/freetype/internal/ftdebug.h
@@ -81,6 +81,11 @@ FT_BEGIN_HEADER
trace_t1decode,
trace_psobjs,
+ /* PostScript hinting module `pshinter' */
+ trace_pshrec,
+ trace_pshalgo1,
+ trace_pshalgo2,
+
/* Type 2 driver components */
trace_cffdriver,
trace_cffgload,
diff --git a/src/cff/cffgload.c b/src/cff/cffgload.c
index d4de397..ab90795 100644
--- a/src/cff/cffgload.c
+++ b/src/cff/cffgload.c
@@ -1092,9 +1092,9 @@
case cff_op_cntrmask:
FT_TRACE4(( op == cff_op_hintmask ? " hintmask" : " cntrmask" ));
- /* implement vstem when needed */
+ /* implement vstem when needed -- */
/* the specification doesn't say it, but this also works */
- /* with the 'cntrmask' operator !! */
+ /* with the 'cntrmask' operator */
/* */
if ( num_args > 0 )
{
diff --git a/src/cid/cidobjs.c b/src/cid/cidobjs.c
index 2d1e6b3..c42d0e8 100644
--- a/src/cid/cidobjs.c
+++ b/src/cid/cidobjs.c
@@ -201,10 +201,12 @@
{
FT_Int n;
+
for ( n = 0; n < cid->num_dicts; n++ )
{
CID_Subrs* subr = face->subrs + n;
+
if ( subr->code )
{
FREE( subr->code[0] );
diff --git a/src/pshinter/pshalgo1.c b/src/pshinter/pshalgo1.c
index 010ac57..b8e8e1f 100644
--- a/src/pshinter/pshalgo1.c
+++ b/src/pshinter/pshalgo1.c
@@ -21,6 +21,8 @@
#include FT_INTERNAL_DEBUG_H
#include "pshalgo1.h"
+#undef FT_COMPONENT
+#define FT_COMPONENT trace_pshalgo1
#ifdef DEBUG_HINTER
extern PSH1_Hint_Table ps1_debug_hint_table = 0;
diff --git a/src/pshinter/pshalgo2.c b/src/pshinter/pshalgo2.c
index a10da1b..00778e2 100644
--- a/src/pshinter/pshalgo2.c
+++ b/src/pshinter/pshalgo2.c
@@ -21,6 +21,8 @@
#include FT_INTERNAL_DEBUG_H
#include "pshalgo2.h"
+#undef FT_COMPONENT
+#define FT_COMPONENT trace_pshalgo2
#ifdef DEBUG_HINTER
extern PSH2_Hint_Table ps2_debug_hint_table = 0;
diff --git a/src/pshinter/pshrec.c b/src/pshinter/pshrec.c
index f03e363..7839505 100644
--- a/src/pshinter/pshrec.c
+++ b/src/pshinter/pshrec.c
@@ -23,7 +23,8 @@
#include "pshrec.h"
#include "pshalgo.h"
-#define FT_COMPONENT trace_ttgload
+#undef FT_COMPONENT
+#define FT_COMPONENT trace_pshrec
#ifdef DEBUG_HINTER
extern PS_Hints ps_debug_hints = 0;
@@ -479,7 +480,7 @@
table->num_masks--;
}
else
- FT_ERROR(( "%s: ignoring invalid indices (%d,%d)\n",
+ FT_ERROR(( "ps_mask_table_merge: ignoring invalid indices (%d,%d)\n",
index1, index2 ));
Exit:
@@ -822,7 +823,7 @@
hints->error = FT_Err_Invalid_Argument;
hints->hint_type = hint_type;
- FT_ERROR(( "%s.init: invalid charstring type!\n", "pshrec.hints" ));
+ FT_ERROR(( "ps_hints_open: invalid charstring type!\n" ));
break;
}
}
@@ -840,7 +841,7 @@
/* limit "dimension" to 0..1 */
if ( dimension < 0 || dimension > 1 )
{
- FT_ERROR(( "ps.hints.stem: invalid dimension (%d) used\n",
+ FT_ERROR(( "ps_hints_stem: invalid dimension (%d) used\n",
dimension ));
dimension = ( dimension != 0 );
}
@@ -864,7 +865,7 @@
memory, NULL );
if ( error )
{
- FT_ERROR(( "ps.hints.stem: could not add stem"
+ FT_ERROR(( "ps_hints_stem: could not add stem"
" (%d,%d) to hints table\n", stems[0], stems[1] ));
hints->error = error;
@@ -875,7 +876,7 @@
}
default:
- FT_ERROR(( "ps.hints.stem: called with invalid hint type (%d)\n",
+ FT_ERROR(( "ps_hints_stem: called with invalid hint type (%d)\n",
hints->hint_type ));
break;
}
@@ -903,7 +904,7 @@
/* limit "dimension" to 0..1 */
if ( dimension < 0 || dimension > 1 )
{
- FT_ERROR(( "ps.hints.stem: invalid dimension (%d) used\n",
+ FT_ERROR(( "ps_hints_t1stem3: invalid dimension (%d) used\n",
dimension ));
dimension = ( dimension != 0 );
}
@@ -930,7 +931,7 @@
}
else
{
- FT_ERROR(( "ps.hints.stem3: called with invalid hint type!\n" ));
+ FT_ERROR(( "ps_hints_t1stem3: called with invalid hint type!\n" ));
error = FT_Err_Invalid_Argument;
goto Fail;
}
@@ -939,7 +940,7 @@
return;
Fail:
- FT_ERROR(( "ps.hints.stem3: could not add counter stems to table\n" ));
+ FT_ERROR(( "ps_hints_t1stem3: could not add counter stems to table\n" ));
hints->error = error;
}
@@ -1004,8 +1005,8 @@
/* check bit count; must be equal to current total hint count */
if ( bit_count != count1 + count2 )
{
- FT_ERROR(( "%s: called with invalid bitcount %d (instead of %d)\n",
- "ps.hinter.type2.hintmask",
+ FT_ERROR(( "ps_hints_t2mask: "
+ "called with invalid bitcount %d (instead of %d)\n",
bit_count, count1 + count2 ));
/* simply ignore the operator */
@@ -1049,8 +1050,8 @@
/* check bit count, must be equal to current total hint count */
if ( bit_count != count1 + count2 )
{
- FT_ERROR(( "%s: called with invalid bitcount %d (instead of %d)\n",
- "ps.hinter.type2.counter",
+ FT_ERROR(( "ps_hints_t2counter: "
+ "called with invalid bitcount %d (instead of %d)\n",
bit_count, count1 + count2 ));
/* simply ignore the operator */