* 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.
This commit is contained in:
Werner Lemberg 2001-12-22 14:38:40 +00:00
parent b5c7de5b37
commit af594e606a
17 changed files with 173 additions and 69 deletions

View File

@ -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> 2001-12-21 David Turner <david@freetype.org>
* src/cff/cffgload.c: added a comment regarding "cntrmask" operator * src/pshinter/pshrec.c (ps_hints_t2mask, ps_hints_t2counter):
Ignore invalid "hintmask" and "cntrmask" operators (instead of
* src/pshinter/pshrec.c: now ignores invalid "hintmask" and "cntrmask" returning an error). Glyph 2028 of the CFF font "MSung-Light-Acro"
operators (instead of returning an error). Glyph 2028 of the CFF font couldn't be rendered otherwise (it seems its charstring is buggy,
"MSung-Light-Acro" couldn't be rendered otherwise (it seems its though this requires more analysis).
charstring is buggy, though this requires more analysis).. (FT_COMPONENT): Define.
* src/cff/cffgload.c, src/psaux/t1decode.c, src/pshinter/pshrec.c, * src/cff/cffgload.c (CFF_Parse_CharStrings), src/psaux/t1decode.c
src/pshinter/ahalgo2.c, src/pshinter/pshglob.h: fixed a bug where (T1_Decoder_Parse_Charstrings), src/pshinter/pshalgo2.c (*), Fixed a
the X and Y axis where inversed in the postscript hinter. this bug where the X and Y axis where inversed in the postscript hinter.
caused problem when displaying on non-square surfaces.. This caused problem when displaying on non-square surfaces.
* include/freetype/cache/ftcmanag.h, include/freetype/cache/ftcimage.h, * src/pshinter/pshalgo2.c: s/vertical/dimension/.
include/freetype/cache/ftcsbits.h: updating documentation to better
explain the use of the "anode" output parameter in lookup functions
* src/pshinter/pshglob.c (psh_globals_new): Replaced a floating * src/pshinter/pshglob.c (psh_globals_new): Replaced a floating
point constant with a fixed-float equivalent. For some reasons not point constant with a fixed-float equivalent. For some reasons not
@ -23,9 +40,6 @@
2001-12-20 Werner Lemberg <wl@gnu.org> 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 * src/cache/ftccache.c (ftc_node_destroy, ftc_cache_lookup): Fix
tracing strings. tracing strings.
* src/cache/ftccmap.c (ftc_cmap_family_init): Ditto. * src/cache/ftccmap.c (ftc_cmap_family_init): Ditto.
@ -97,6 +111,11 @@
* src/type1/t1gload.c (T1_Load_Glyph): Enable font matrix * src/type1/t1gload.c (T1_Load_Glyph): Enable font matrix
transformation of hinted glyphs. 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 * src/cff/cffload.h, src/cff/cffload.c, src/cff/cffgload.c: Updated
to move the definition of encoding tables back within "cffload.c" to move the definition of encoding tables back within "cffload.c"
instead of making them part of a shared header (causing problems in instead of making them part of a shared header (causing problems in

View File

@ -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, 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 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 based on the version found in the sourcecode of ttf.library 0.83b for

View File

@ -1,11 +1,20 @@
// TetiSoft: We must change FT_BASE_DEF and FT_EXPORT_DEF // 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_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_EXPORT_DEF( x ) extern x // SAS/C wouldn't generate an XDEF
#undef FT_BASE_DEF #undef FT_BASE_DEF
#define FT_BASE_DEF( x ) x #define FT_BASE_DEF( x ) x
#undef FT_EXPORT_DEF #undef FT_EXPORT_DEF
#define FT_EXPORT_DEF( x ) x #define FT_EXPORT_DEF( x ) x
// TetiSoft: now include original file // TetiSoft: now include original file
#ifndef __MORPHOS__
#include "FT:include/freetype/config/ftconfig.h" #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

View File

@ -2,19 +2,20 @@
// insert the following in your source file and uncomment as needed: // insert the following in your source file and uncomment as needed:
/* /*
//#define FT_USE_AUTOHINT // autohinter //#define FT_USE_AUTOHINT // autohinter
//#define FT_USE_RASTER // monochrome rasterizer //#define FT_USE_RASTER // monochrome rasterizer
//#define FT_USE_SMOOTH // anti-aliasing rasterizer //#define FT_USE_SMOOTH // anti-aliasing rasterizer
//#define FT_USE_TT // truetype font driver //#define FT_USE_TT // truetype font driver
//#define FT_USE_T1 // type1 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_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_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_PCF // pcf bitmap font driver
//#define FT_USE_WINFNT // windows .fnt|.fon bitmap font driver //#define FT_USE_WINFNT // windows .fnt|.fon bitmap font driver
#include "FT:src/base/ftinit.c" #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 #ifdef FT_USE_TT
#define FT_USE_SFNT #define FT_USE_SFNT
@ -22,14 +23,20 @@
#ifdef FT_USE_CFF #ifdef FT_USE_CFF
#define FT_USE_SFNT #define FT_USE_SFNT
#define FT_USE_PSHINT
#define FT_USE_PSNAMES
#endif #endif
#ifdef FT_USE_T1 #ifdef FT_USE_T1
#define FT_USE_PSAUX #define FT_USE_PSAUX
#define FT_USE_PSHINT
#define FT_USE_PSNAMES
#endif #endif
#ifdef FT_USE_T1CID #ifdef FT_USE_T1CID
#define FT_USE_PSAUX #define FT_USE_PSAUX
#define FT_USE_PSHINT
#define FT_USE_PSNAMES
#endif #endif
#ifdef FT_USE_PSAUX #ifdef FT_USE_PSAUX
@ -46,6 +53,10 @@
FT_USE_MODULE(autohint_module_class) FT_USE_MODULE(autohint_module_class)
#endif #endif
#ifdef FT_USE_PSHINT
FT_USE_MODULE(pshinter_module_class)
#endif
#ifdef FT_USE_CFF #ifdef FT_USE_CFF
FT_USE_MODULE(cff_driver_class) FT_USE_MODULE(cff_driver_class)
#endif #endif

View File

@ -33,6 +33,8 @@ OBJDEBUG = ftdebug.o ftdebugpure.o
OBJAHINT = autohint.o ahoptim.o OBJAHINT = autohint.o ahoptim.o
OBJPSHINT = pshinter.o
OBJPSAUX = psaux.o OBJPSAUX = psaux.o
OBJPSNAM = psnames.o OBJPSNAM = psnames.o
@ -57,7 +59,7 @@ OBJWINFNT = winfnt.o
OBJPCF = pcf.o OBJPCF = pcf.o
OBJPS = $(OBJPSAUX) $(OBJPSNAM) OBJPS = $(OBJPSAUX) $(OBJPSNAM) $(OBJPSHINT)
OBJRASTER = $(OBJRAST) $(OBJSMOOTH) OBJRASTER = $(OBJRAST) $(OBJSMOOTH)
@ -142,6 +144,11 @@ ahoptim.o: $(CORE)autohint/ahoptim.c
sc $(SCFLAGS) objname=$@ $< sc $(SCFLAGS) objname=$@ $<
# #
# freetype library PS hinting module
#
pshinter.o: $(CORE)pshinter/pshinter.c
sc $(SCFLAGS) objname=$@ $<
#
# freetype library PS support module # freetype library PS support module
# #
psaux.o: $(CORE)psaux/psaux.c psaux.o: $(CORE)psaux/psaux.c

View File

@ -2,9 +2,19 @@
// malloc() realloc() and free() which can't be used in an amiga // malloc() realloc() and free() which can't be used in an amiga
// shared run-time library linked with libinit.o // 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/exec.h>
#include <proto/dos.h> #include <proto/dos.h>
#ifndef __GNUC__
/* TetiSoft: Missing in alib_protos.h, see amiga.lib autodoc /* TetiSoft: Missing in alib_protos.h, see amiga.lib autodoc
* (These amiga.lib functions work under AmigaOS V33 and up) * (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 __a1 APTR memory,
register __d0 ULONG memSize, register __d0 ULONG memSize,
register __a6 struct ExecBase *SysBase); register __a6 struct ExecBase *SysBase);
#endif
// TetiSoft: C implementation of AllocVecPooled (see autodoc exec/AllocPooled) // TetiSoft: C implementation of AllocVecPooled (see autodoc exec/AllocPooled)
APTR AllocVecPooled(APTR poolHeader, ULONG memSize) 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); ULONG *mem = AsmAllocPooled(poolHeader, newSize, SysBase);
#endif
if (!mem) if (!mem)
return NULL; return NULL;
@ -43,7 +58,11 @@ void FreeVecPooled(APTR poolHeader, APTR memory)
{ {
ULONG *realmem = (ULONG *)memory - 1; ULONG *realmem = (ULONG *)memory - 1;
#ifdef __GNUC__
FreePooled(poolHeader, realmem, *realmem);
#else
AsmFreePooled(poolHeader, realmem, *realmem, SysBase); 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 */ /* We use the macro STREAM_FILE for convenience to extract the */
/* system-specific stream handle from a given FreeType stream object */ /* system-specific stream handle from a given FreeType stream object */
//#define STREAM_FILE( stream ) ( (FILE*)stream->descriptor.pointer ) //#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 ) ft_close_stream( FT_Stream stream )
{ {
// fclose( STREAM_FILE( stream ) ); // fclose( STREAM_FILE( stream ) );
Close( STREAM_FILE( stream ) ); // TetiSoft Close( STREAM_FILE( stream ) ); // TetiSoft
stream->descriptor.pointer = NULL; stream->descriptor.pointer = NULL;
stream->size = 0; stream->size = 0;
@ -274,7 +293,7 @@ void FreeVecPooled(APTR poolHeader, APTR memory)
file = STREAM_FILE( stream ); file = STREAM_FILE( stream );
// fseek( file, offset, SEEK_SET ); // 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( buffer, 1, count, file );
return (unsigned long)FRead( file, buffer, 1, count); return (unsigned long)FRead( file, buffer, 1, count);
@ -289,14 +308,14 @@ void FreeVecPooled(APTR poolHeader, APTR memory)
{ {
// FILE* file; // FILE* file;
BPTR file; // TetiSoft BPTR file; // TetiSoft
struct FileInfoBlock *fib; // TetiSoft struct FileInfoBlock *fib; // TetiSoft
if ( !astream ) if ( !astream )
return FT_Err_Invalid_Stream_Handle; return FT_Err_Invalid_Stream_Handle;
// file = fopen( filepathname, "rb" ); // file = fopen( filepathname, "rb" );
file = Open( filepathname, MODE_OLDFILE ); // TetiSoft file = Open( filepathname, MODE_OLDFILE ); // TetiSoft
if ( !file ) if ( !file )
{ {
FT_ERROR(( "FT_New_Stream:" )); FT_ERROR(( "FT_New_Stream:" ));
@ -346,6 +365,7 @@ void FreeVecPooled(APTR poolHeader, APTR memory)
} }
#ifdef FT_DEBUG_MEMORY #ifdef FT_DEBUG_MEMORY
extern FT_Int extern FT_Int
@ -370,7 +390,11 @@ void FreeVecPooled(APTR poolHeader, APTR memory)
if ( memory ) if ( memory )
{ {
// memory->user = 0; // memory->user = 0;
#ifdef __GNUC__
memory->user = CreatePool ( MEMF_PUBLIC, 2048, 2048 );
#else
memory->user = AsmCreatePool ( MEMF_PUBLIC, 2048, 2048, SysBase ); memory->user = AsmCreatePool ( MEMF_PUBLIC, 2048, 2048, SysBase );
#endif
if ( memory->user == NULL ) if ( memory->user == NULL )
{ {
FreeVec ( memory ); FreeVec ( memory );
@ -400,7 +424,11 @@ void FreeVecPooled(APTR poolHeader, APTR memory)
ft_mem_debug_done( memory ); ft_mem_debug_done( memory );
#endif #endif
#ifdef __GNUC__
DeletePool( memory->user );
#else
AsmDeletePool( memory->user, SysBase ); AsmDeletePool( memory->user, SysBase );
#endif
FreeVec( memory ); FreeVec( memory );
} }

13
docs/modules.txt Normal file
View File

@ -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

View File

@ -168,9 +168,9 @@ FT_BEGIN_HEADER
/* aglyph :: The corresponding @FT_Glyph object. 0 in case of */ /* aglyph :: The corresponding @FT_Glyph object. 0 in case of */
/* failure. */ /* failure. */
/* */ /* */
/* anode :: used to return the address of of the corresponding */ /* anode :: Used to return the address of of the corresponding cache */
/* cache node after incrementing its reference count */ /* node after incrementing its reference count (see note */
/* (see note below) */ /* below). */
/* */ /* */
/* <Return> */ /* <Return> */
/* FreeType error code. 0 means success. */ /* 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 */ /* If "anode" is _not_ NULL, it receives the address of the cache */
/* node containing the glyph image, after increasing its reference */ /* 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 */ /* always be kept in the cache until you call @FTC_Node_Unref to */
/* "release" it. */ /* "release" it. */
/* */ /* */
/* If "anode" is NULL, the cache node is left unchanged, which means */ /* 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 */ /* 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 */ /* call to one of the caching sub-system APIs. Don't assume that it */
/* that it's persistent.. */ /* is persistent! */
/* */ /* */
FT_EXPORT( FT_Error ) FT_EXPORT( FT_Error )
FTC_ImageCache_Lookup( FTC_ImageCache cache, FTC_ImageCache_Lookup( FTC_ImageCache cache,

View File

@ -152,7 +152,7 @@ FT_BEGIN_HEADER
/* between abstract @FTC_FaceID values and real */ /* between abstract @FTC_FaceID values and real */
/* @FT_Face objects. */ /* @FT_Face objects. */
/* */ /* */
/* families :: global table of families. */ /* families :: Global table of families. */
/* */ /* */
typedef struct FTC_ManagerRec_ typedef struct FTC_ManagerRec_
{ {

View File

@ -164,9 +164,9 @@ FT_BEGIN_HEADER
/* <Output> */ /* <Output> */
/* sbit :: A handle to a small bitmap descriptor. */ /* sbit :: A handle to a small bitmap descriptor. */
/* */ /* */
/* anode :: used to return the address of of the corresponding */ /* anode :: Used to return the address of of the corresponding cache */
/* cache node after incrementing its reference count */ /* node after incrementing its reference count (see note */
/* (see note below) */ /* below). */
/* */ /* */
/* <Return> */ /* <Return> */
/* FreeType error code. 0 means success. */ /* FreeType error code. 0 means success. */
@ -181,15 +181,14 @@ FT_BEGIN_HEADER
/* glyph bitmap. */ /* glyph bitmap. */
/* */ /* */
/* If "anode" is _not_ NULL, it receives the address of the cache */ /* If "anode" is _not_ NULL, it receives the address of the cache */
/* node containing the bitmap, after increasing its reference */ /* node containing the bitmap, after increasing its reference count. */
/* count. This ensures that the node (as well as the image) will */ /* This ensures that the node (as well as the image) will always be */
/* always be kept in the cache until you call @FTC_Node_Unref to */ /* kept in the cache until you call @FTC_Node_Unref to "release" it. */
/* "release" it. */
/* */ /* */
/* If "anode" is NULL, the cache node is left unchanged, which means */ /* 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 */ /* 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 */ /* call to one of the caching sub-system APIs. Don't assume that it */
/* that it's persistent.. */ /* is persistent! */
/* */ /* */
FT_EXPORT( FT_Error ) FT_EXPORT( FT_Error )
FTC_SBitCache_Lookup( FTC_SBitCache cache, FTC_SBitCache_Lookup( FTC_SBitCache cache,

View File

@ -138,7 +138,7 @@ FT_BEGIN_HEADER
/* Glyph Postscript Names handling */ /* Glyph Postscript Names handling */
/* */ /* */
/* By default, FreeType 2 is compiled with the `PSNames' module. This */ /* 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 */ /* Unicode value, or return a Macintosh standard glyph name for the */
/* use with the TrueType `post' table. */ /* use with the TrueType `post' table. */
/* */ /* */
@ -265,7 +265,7 @@ FT_BEGIN_HEADER
/* Note that the memory debugger is only activated at runtime when */ /* Note that the memory debugger is only activated at runtime when */
/* when the _environment_ variable "FT_DEBUG_MEMORY" is also defined! */ /* 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 */ /* By undefining this, you will only compile the code necessary to load */
/* TrueType glyphs without hinting. */ /* TrueType glyphs without hinting. */
/* */ /* */
#undef TT_CONFIG_OPTION_BYTECODE_INTERPRETER #undef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
/*************************************************************************/ /*************************************************************************/

View File

@ -81,6 +81,11 @@ FT_BEGIN_HEADER
trace_t1decode, trace_t1decode,
trace_psobjs, trace_psobjs,
/* PostScript hinting module `pshinter' */
trace_pshrec,
trace_pshalgo1,
trace_pshalgo2,
/* Type 2 driver components */ /* Type 2 driver components */
trace_cffdriver, trace_cffdriver,
trace_cffgload, trace_cffgload,

View File

@ -1092,9 +1092,9 @@
case cff_op_cntrmask: case cff_op_cntrmask:
FT_TRACE4(( op == cff_op_hintmask ? " hintmask" : " 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 */ /* the specification doesn't say it, but this also works */
/* with the 'cntrmask' operator !! */ /* with the 'cntrmask' operator */
/* */ /* */
if ( num_args > 0 ) if ( num_args > 0 )
{ {

View File

@ -201,10 +201,12 @@
{ {
FT_Int n; FT_Int n;
for ( n = 0; n < cid->num_dicts; n++ ) for ( n = 0; n < cid->num_dicts; n++ )
{ {
CID_Subrs* subr = face->subrs + n; CID_Subrs* subr = face->subrs + n;
if ( subr->code ) if ( subr->code )
{ {
FREE( subr->code[0] ); FREE( subr->code[0] );

View File

@ -21,6 +21,8 @@
#include FT_INTERNAL_DEBUG_H #include FT_INTERNAL_DEBUG_H
#include "pshalgo1.h" #include "pshalgo1.h"
#undef FT_COMPONENT
#define FT_COMPONENT trace_pshalgo1
#ifdef DEBUG_HINTER #ifdef DEBUG_HINTER
extern PSH1_Hint_Table ps1_debug_hint_table = 0; extern PSH1_Hint_Table ps1_debug_hint_table = 0;

View File

@ -21,6 +21,8 @@
#include FT_INTERNAL_DEBUG_H #include FT_INTERNAL_DEBUG_H
#include "pshalgo2.h" #include "pshalgo2.h"
#undef FT_COMPONENT
#define FT_COMPONENT trace_pshalgo2
#ifdef DEBUG_HINTER #ifdef DEBUG_HINTER
extern PSH2_Hint_Table ps2_debug_hint_table = 0; extern PSH2_Hint_Table ps2_debug_hint_table = 0;

View File

@ -23,7 +23,8 @@
#include "pshrec.h" #include "pshrec.h"
#include "pshalgo.h" #include "pshalgo.h"
#define FT_COMPONENT trace_ttgload #undef FT_COMPONENT
#define FT_COMPONENT trace_pshrec
#ifdef DEBUG_HINTER #ifdef DEBUG_HINTER
extern PS_Hints ps_debug_hints = 0; extern PS_Hints ps_debug_hints = 0;
@ -479,7 +480,7 @@
table->num_masks--; table->num_masks--;
} }
else else
FT_ERROR(( "%s: ignoring invalid indices (%d,%d)\n", FT_ERROR(( "ps_mask_table_merge: ignoring invalid indices (%d,%d)\n",
index1, index2 )); index1, index2 ));
Exit: Exit:
@ -822,7 +823,7 @@
hints->error = FT_Err_Invalid_Argument; hints->error = FT_Err_Invalid_Argument;
hints->hint_type = hint_type; 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; break;
} }
} }
@ -840,7 +841,7 @@
/* limit "dimension" to 0..1 */ /* limit "dimension" to 0..1 */
if ( dimension < 0 || dimension > 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 = ( dimension != 0 ); dimension = ( dimension != 0 );
} }
@ -864,7 +865,7 @@
memory, NULL ); memory, NULL );
if ( error ) 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] )); " (%d,%d) to hints table\n", stems[0], stems[1] ));
hints->error = error; hints->error = error;
@ -875,7 +876,7 @@
} }
default: 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 )); hints->hint_type ));
break; break;
} }
@ -903,7 +904,7 @@
/* limit "dimension" to 0..1 */ /* limit "dimension" to 0..1 */
if ( dimension < 0 || dimension > 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 = ( dimension != 0 ); dimension = ( dimension != 0 );
} }
@ -930,7 +931,7 @@
} }
else 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; error = FT_Err_Invalid_Argument;
goto Fail; goto Fail;
} }
@ -939,7 +940,7 @@
return; return;
Fail: 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; hints->error = error;
} }
@ -1004,8 +1005,8 @@
/* check bit count; must be equal to current total hint count */ /* check bit count; must be equal to current total hint count */
if ( bit_count != count1 + count2 ) if ( bit_count != count1 + count2 )
{ {
FT_ERROR(( "%s: called with invalid bitcount %d (instead of %d)\n", FT_ERROR(( "ps_hints_t2mask: "
"ps.hinter.type2.hintmask", "called with invalid bitcount %d (instead of %d)\n",
bit_count, count1 + count2 )); bit_count, count1 + count2 ));
/* simply ignore the operator */ /* simply ignore the operator */
@ -1049,8 +1050,8 @@
/* check bit count, must be equal to current total hint count */ /* check bit count, must be equal to current total hint count */
if ( bit_count != count1 + count2 ) if ( bit_count != count1 + count2 )
{ {
FT_ERROR(( "%s: called with invalid bitcount %d (instead of %d)\n", FT_ERROR(( "ps_hints_t2counter: "
"ps.hinter.type2.counter", "called with invalid bitcount %d (instead of %d)\n",
bit_count, count1 + count2 )); bit_count, count1 + count2 ));
/* simply ignore the operator */ /* simply ignore the operator */