For warning messages, replace FT_ERROR with FT_TRACE0.

FT_ERROR is now used only if a function produces a non-zero `error'
value.

Formatting, improving and harmonizing debug strings.
This commit is contained in:
Werner Lemberg 2009-06-26 06:15:41 +02:00
parent e15d9c52bc
commit 858abbedc0
42 changed files with 257 additions and 230 deletions

View File

@ -1,3 +1,12 @@
2009-06-26 Werner Lemberg <wl@gnu.org>
* */*: For warning messages, replace FT_ERROR with FT_TRACE0.
FT_ERROR is now used only if a function produces a non-zero `error'
value.
Formatting, improving and harmonizing debug strings.
2009-06-25 Werner Lemberg <wl@gnu.org>
Provide version information better.

View File

@ -331,7 +331,7 @@
* we couldn't find a single glyph to compute this blue zone,
* we will simply ignore it then
*/
AF_LOG(( "empty!\n" ));
AF_LOG(( "empty\n" ));
continue;
}

View File

@ -338,7 +338,7 @@
* we couldn't find a single glyph to compute this blue zone,
* we will simply ignore it then
*/
AF_LOG(( "empty!\n" ));
AF_LOG(( "empty\n" ));
continue;
}

View File

@ -421,7 +421,7 @@
"FreeType: %ld bytes of memory leaked in %ld blocks\n",
leaks, leak_count );
printf( "FreeType: No memory leaks detected!\n" );
printf( "FreeType: no memory leaks detected\n" );
}
}

View File

@ -188,10 +188,9 @@ Exit:
error = FT_Add_Module( library, *cur );
/* notify errors, but don't stop */
if ( error )
{
FT_ERROR(( "FT_Add_Default_Module: Cannot install `%s', error = 0x%x\n",
(*cur)->module_name, error ));
}
FT_TRACE0(( "FT_Add_Default_Module:"
" Cannot install `%s', error = 0x%x\n",
(*cur)->module_name, error ));
cur++;
}
}

View File

@ -3731,7 +3731,7 @@
while ( renderer )
{
error = renderer->render( renderer, slot, render_mode, NULL );
if ( !error ||
if ( !error ||
FT_ERROR_BASE( error ) != FT_Err_Cannot_Render_Glyph )
break;
@ -4236,7 +4236,7 @@
{
FT_Done_Face( FT_FACE( faces->head->data ) );
if ( faces->head )
FT_ERROR(( "FT_Done_Library: failed to free some faces\n" ));
FT_TRACE0(( "FT_Done_Library: failed to free some faces\n" ));
}
}
}

View File

@ -66,7 +66,8 @@
{
if ( stream->read( stream, pos, 0, 0 ) )
{
FT_ERROR(( "FT_Stream_Seek: invalid i/o; pos = 0x%lx, size = 0x%lx\n",
FT_ERROR(( "FT_Stream_Seek:"
" invalid i/o; pos = 0x%lx, size = 0x%lx\n",
pos, stream->size ));
error = FT_Err_Invalid_Stream_Operation;
@ -75,7 +76,8 @@
/* note that seeking to the first position after the file is valid */
else if ( pos > stream->size )
{
FT_ERROR(( "FT_Stream_Seek: invalid i/o; pos = 0x%lx, size = 0x%lx\n",
FT_ERROR(( "FT_Stream_Seek:"
" invalid i/o; pos = 0x%lx, size = 0x%lx\n",
pos, stream->size ));
error = FT_Err_Invalid_Stream_Operation;
@ -124,7 +126,8 @@
if ( pos >= stream->size )
{
FT_ERROR(( "FT_Stream_ReadAt: invalid i/o; pos = 0x%lx, size = 0x%lx\n",
FT_ERROR(( "FT_Stream_ReadAt:"
" invalid i/o; pos = 0x%lx, size = 0x%lx\n",
pos, stream->size ));
return FT_Err_Invalid_Stream_Operation;
@ -145,8 +148,8 @@
if ( read_bytes < count )
{
FT_ERROR(( "FT_Stream_ReadAt:" ));
FT_ERROR(( " invalid read; expected %lu bytes, got %lu\n",
FT_ERROR(( "FT_Stream_ReadAt:"
" invalid read; expected %lu bytes, got %lu\n",
count, read_bytes ));
error = FT_Err_Invalid_Stream_Operation;
@ -256,8 +259,8 @@
stream->base, count );
if ( read_bytes < count )
{
FT_ERROR(( "FT_Stream_EnterFrame:" ));
FT_ERROR(( " invalid read; expected %lu bytes, got %lu\n",
FT_ERROR(( "FT_Stream_EnterFrame:"
" invalid read; expected %lu bytes, got %lu\n",
count, read_bytes ));
FT_FREE( stream->base );
@ -273,8 +276,8 @@
if ( stream->pos >= stream->size ||
stream->pos + count > stream->size )
{
FT_ERROR(( "FT_Stream_EnterFrame:" ));
FT_ERROR(( " invalid i/o; pos = 0x%lx, count = %lu, size = 0x%lx\n",
FT_ERROR(( "FT_Stream_EnterFrame:"
" invalid i/o; pos = 0x%lx, count = %lu, size = 0x%lx\n",
stream->pos, count, stream->size ));
error = FT_Err_Invalid_Stream_Operation;
@ -459,7 +462,8 @@
Fail:
*error = FT_Err_Invalid_Stream_Operation;
FT_ERROR(( "FT_Stream_ReadChar: invalid i/o; pos = 0x%lx, size = 0x%lx\n",
FT_ERROR(( "FT_Stream_ReadChar:"
" invalid i/o; pos = 0x%lx, size = 0x%lx\n",
stream->pos, stream->size ));
return 0;
@ -505,8 +509,8 @@
Fail:
*error = FT_Err_Invalid_Stream_Operation;
FT_ERROR(( "FT_Stream_ReadShort:" ));
FT_ERROR(( " invalid i/o; pos = 0x%lx, size = 0x%lx\n",
FT_ERROR(( "FT_Stream_ReadShort:"
" invalid i/o; pos = 0x%lx, size = 0x%lx\n",
stream->pos, stream->size ));
return 0;
@ -552,8 +556,8 @@
Fail:
*error = FT_Err_Invalid_Stream_Operation;
FT_ERROR(( "FT_Stream_ReadShortLE:" ));
FT_ERROR(( " invalid i/o; pos = 0x%lx, size = 0x%lx\n",
FT_ERROR(( "FT_Stream_ReadShortLE:"
" invalid i/o; pos = 0x%lx, size = 0x%lx\n",
stream->pos, stream->size ));
return 0;
@ -599,8 +603,8 @@
Fail:
*error = FT_Err_Invalid_Stream_Operation;
FT_ERROR(( "FT_Stream_ReadOffset:" ));
FT_ERROR(( " invalid i/o; pos = 0x%lx, size = 0x%lx\n",
FT_ERROR(( "FT_Stream_ReadOffset:"
" invalid i/o; pos = 0x%lx, size = 0x%lx\n",
stream->pos, stream->size ));
return 0;
@ -645,9 +649,10 @@
return result;
Fail:
FT_ERROR(( "FT_Stream_ReadLong: invalid i/o; pos = 0x%lx, size = 0x%lx\n",
stream->pos, stream->size ));
*error = FT_Err_Invalid_Stream_Operation;
FT_ERROR(( "FT_Stream_ReadLong:"
" invalid i/o; pos = 0x%lx, size = 0x%lx\n",
stream->pos, stream->size ));
return 0;
}
@ -691,10 +696,10 @@
return result;
Fail:
FT_ERROR(( "FT_Stream_ReadLongLE:" ));
FT_ERROR(( " invalid i/o; pos = 0x%lx, size = 0x%lx\n",
stream->pos, stream->size ));
*error = FT_Err_Invalid_Stream_Operation;
FT_ERROR(( "FT_Stream_ReadLongLE:"
" invalid i/o; pos = 0x%lx, size = 0x%lx\n",
stream->pos, stream->size ));
return 0;
}

View File

@ -226,8 +226,8 @@
file = ft_fopen( filepathname, "rb" );
if ( !file )
{
FT_ERROR(( "FT_Stream_Open:" ));
FT_ERROR(( " could not open `%s'\n", filepathname ));
FT_ERROR(( "FT_Stream_Open:"
" could not open `%s'\n", filepathname ));
return FT_Err_Cannot_Open_Resource;
}

10
src/cache/ftccache.c vendored
View File

@ -4,7 +4,7 @@
/* */
/* The FreeType internal cache interface (body). */
/* */
/* Copyright 2000-2001, 2002, 2003, 2004, 2005, 2006, 2007 by */
/* Copyright 2000-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@ -216,7 +216,7 @@
if ( node == NULL )
{
FT_ERROR(( "ftc_node_hash_unlink: unknown node!\n" ));
FT_TRACE0(( "ftc_node_hash_unlink: unknown node\n" ));
return;
}
@ -273,7 +273,7 @@
/* find node's cache */
if ( node->cache_index >= manager->num_caches )
{
FT_ERROR(( "ftc_node_destroy: invalid node handle\n" ));
FT_TRACE0(( "ftc_node_destroy: invalid node handle\n" ));
return;
}
#endif
@ -283,7 +283,7 @@
#ifdef FT_DEBUG_ERROR
if ( cache == NULL )
{
FT_ERROR(( "ftc_node_destroy: invalid node handle\n" ));
FT_TRACE0(( "ftc_node_destroy: invalid node handle\n" ));
return;
}
#endif
@ -302,7 +302,7 @@
#if 0
/* check, just in case of general corruption :-) */
if ( manager->num_nodes == 0 )
FT_ERROR(( "ftc_node_destroy: invalid cache node count! = %d\n",
FT_TRACE0(( "ftc_node_destroy: invalid cache node count (%d)\n",
manager->num_nodes ));
#endif
}

2
src/cache/ftccmap.c vendored
View File

@ -303,7 +303,7 @@
if ( !cache )
{
FT_ERROR(( "FTC_CMapCache_Lookup: bad arguments, returning 0!\n" ));
FT_TRACE0(( "FTC_CMapCache_Lookup: bad arguments, returning 0\n" ));
return 0;
}

24
src/cache/ftcmanag.c vendored
View File

@ -480,8 +480,8 @@
if ( (FT_UInt)node->cache_index >= manager->num_caches )
FT_ERROR(( "FTC_Manager_Check: invalid node (cache index = %ld\n",
node->cache_index ));
FT_TRACE0(( "FTC_Manager_Check: invalid node (cache index = %ld\n",
node->cache_index ));
else
weight += cache->clazz.node_weight( node, cache );
@ -490,8 +490,8 @@
} while ( node != first );
if ( weight != manager->cur_weight )
FT_ERROR(( "FTC_Manager_Check: invalid weight %ld instead of %ld\n",
manager->cur_weight, weight ));
FT_TRACE0(( "FTC_Manager_Check: invalid weight %ld instead of %ld\n",
manager->cur_weight, weight ));
}
/* check circular list */
@ -509,9 +509,9 @@
} while ( node != first );
if ( count != manager->num_nodes )
FT_ERROR((
"FTC_Manager_Check: invalid cache node count %d instead of %d\n",
manager->num_nodes, count ));
FT_TRACE0(( "FTC_Manager_Check:"
" invalid cache node count %d instead of %d\n",
manager->num_nodes, count ));
}
}
@ -538,9 +538,9 @@
#ifdef FT_DEBUG_ERROR
FTC_Manager_Check( manager );
FT_ERROR(( "compressing, weight = %ld, max = %ld, nodes = %d\n",
manager->cur_weight, manager->max_weight,
manager->num_nodes ));
FT_TRACE0(( "compressing, weight = %ld, max = %ld, nodes = %d\n",
manager->cur_weight, manager->max_weight,
manager->num_nodes ));
#endif
if ( manager->cur_weight < manager->max_weight || first == NULL )
@ -583,8 +583,8 @@
if ( manager->num_caches >= FTC_MAX_CACHES )
{
error = FTC_Err_Too_Many_Caches;
FT_ERROR(( "%s: too many registered caches\n",
"FTC_Manager_Register_Cache" ));
FT_ERROR(( "FTC_Manager_RegisterCache:"
" too many registered caches\n" ));
goto Exit;
}

8
src/cache/ftcmru.c vendored
View File

@ -4,7 +4,7 @@
/* */
/* FreeType MRU support (body). */
/* */
/* Copyright 2003, 2004, 2006 by */
/* Copyright 2003, 2004, 2006, 2009 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@ -46,7 +46,7 @@
{
if ( cnode == node )
{
fprintf( stderr, "FTC_MruNode_Prepend: invalid action!\n" );
fprintf( stderr, "FTC_MruNode_Prepend: invalid action\n" );
exit( 2 );
}
cnode = cnode->next;
@ -94,7 +94,7 @@
} while ( cnode != first );
fprintf( stderr, "FTC_MruNode_Up: invalid action!\n" );
fprintf( stderr, "FTC_MruNode_Up: invalid action\n" );
exit( 2 );
Ok:
}
@ -141,7 +141,7 @@
} while ( cnode != first );
fprintf( stderr, "FTC_MruNode_Remove: invalid action!\n" );
fprintf( stderr, "FTC_MruNode_Remove: invalid action\n" );
exit( 2 );
Ok:
}

View File

@ -4,7 +4,7 @@
/* */
/* FreeType sbits manager (body). */
/* */
/* Copyright 2000-2001, 2002, 2003, 2004, 2005, 2006 by */
/* Copyright 2000-2001, 2002, 2003, 2004, 2005, 2006, 2009 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@ -134,8 +134,8 @@
if ( slot->format != FT_GLYPH_FORMAT_BITMAP )
{
FT_ERROR(( "%s: glyph loaded didn't return a bitmap!\n",
"ftc_snode_load" ));
FT_TRACE0(( "ftc_snode_load:"
" glyph loaded didn't return a bitmap\n" ));
goto BadGlyph;
}

View File

@ -239,10 +239,10 @@
FT_FACE_FIND_GLOBAL_SERVICE( face, psnames, POSTSCRIPT_CMAPS );
if ( !psnames )
{
FT_ERROR(( "cff_get_glyph_name:" ));
FT_ERROR(( " cannot get glyph name from CFF & CEF fonts\n" ));
FT_ERROR(( " " ));
FT_ERROR(( " without the `PSNames' module\n" ));
FT_ERROR(( "cff_get_glyph_name:"
" cannot get glyph name from CFF & CEF fonts\n"
" "
" without the `PSNames' module\n" ));
error = CFF_Err_Unknown_File_Format;
goto Exit;
}

View File

@ -727,8 +727,8 @@
if ( bchar_index < 0 || achar_index < 0 )
{
FT_ERROR(( "cff_operator_seac:" ));
FT_ERROR(( " invalid seac character code arguments\n" ));
FT_ERROR(( "cff_operator_seac:"
" invalid seac character code arguments\n" ));
return CFF_Err_Syntax_Error;
}
@ -2244,8 +2244,8 @@
if ( idx >= decoder->num_locals )
{
FT_ERROR(( "cff_decoder_parse_charstrings:" ));
FT_ERROR(( " invalid local subr index\n" ));
FT_ERROR(( "cff_decoder_parse_charstrings:"
" invalid local subr index\n" ));
goto Syntax_Error;
}
@ -2266,7 +2266,7 @@
if ( !zone->base || zone->limit == zone->base )
{
FT_ERROR(( "cff_decoder_parse_charstrings:"
" invoking empty subrs!\n" ));
" invoking empty subrs\n" ));
goto Syntax_Error;
}
@ -2286,8 +2286,8 @@
if ( idx >= decoder->num_globals )
{
FT_ERROR(( "cff_decoder_parse_charstrings:" ));
FT_ERROR(( " invalid global subr index\n" ));
FT_ERROR(( "cff_decoder_parse_charstrings:"
" invalid global subr index\n" ));
goto Syntax_Error;
}
@ -2308,7 +2308,7 @@
if ( !zone->base || zone->limit == zone->base )
{
FT_ERROR(( "cff_decoder_parse_charstrings:"
" invoking empty subrs!\n" ));
" invoking empty subrs\n" ));
goto Syntax_Error;
}
@ -2357,15 +2357,15 @@
return error;
Syntax_Error:
FT_TRACE4(( "cff_decoder_parse_charstrings: syntax error!\n" ));
FT_TRACE4(( "cff_decoder_parse_charstrings: syntax error\n" ));
return CFF_Err_Invalid_File_Format;
Stack_Underflow:
FT_TRACE4(( "cff_decoder_parse_charstrings: stack underflow!\n" ));
FT_TRACE4(( "cff_decoder_parse_charstrings: stack underflow\n" ));
return CFF_Err_Too_Few_Arguments;
Stack_Overflow:
FT_TRACE4(( "cff_decoder_parse_charstrings: stack overflow!\n" ));
FT_TRACE4(( "cff_decoder_parse_charstrings: stack overflow\n" ));
return CFF_Err_Stack_Overflow;
}

View File

@ -851,8 +851,8 @@
charset->sids[j] = sid;
else
{
FT_ERROR(( "cff_charset_load:"
" invalid SID value %d set to zero\n", sid ));
FT_TRACE0(( "cff_charset_load:"
" invalid SID value %d set to zero\n", sid ));
charset->sids[j] = 0;
}
}
@ -910,7 +910,7 @@
break;
default:
FT_ERROR(( "cff_charset_load: invalid table format!\n" ));
FT_ERROR(( "cff_charset_load: invalid table format\n" ));
error = CFF_Err_Invalid_File_Format;
goto Exit;
}
@ -933,7 +933,7 @@
if ( num_glyphs > 229 )
{
FT_ERROR(( "cff_charset_load: implicit charset larger than\n"
"predefined charset (Adobe ISO-Latin)!\n" ));
"predefined charset (Adobe ISO-Latin)\n" ));
error = CFF_Err_Invalid_File_Format;
goto Exit;
}
@ -951,7 +951,7 @@
if ( num_glyphs > 166 )
{
FT_ERROR(( "cff_charset_load: implicit charset larger than\n"
"predefined charset (Adobe Expert)!\n" ));
"predefined charset (Adobe Expert)\n" ));
error = CFF_Err_Invalid_File_Format;
goto Exit;
}
@ -969,7 +969,7 @@
if ( num_glyphs > 87 )
{
FT_ERROR(( "cff_charset_load: implicit charset larger than\n"
"predefined charset (Adobe Expert Subset)!\n" ));
"predefined charset (Adobe Expert Subset)\n" ));
error = CFF_Err_Invalid_File_Format;
goto Exit;
}
@ -1154,7 +1154,7 @@
break;
default:
FT_ERROR(( "cff_encoding_load: invalid table format!\n" ));
FT_ERROR(( "cff_encoding_load: invalid table format\n" ));
error = CFF_Err_Invalid_File_Format;
goto Exit;
}
@ -1249,7 +1249,7 @@
break;
default:
FT_ERROR(( "cff_encoding_load: invalid table format!\n" ));
FT_ERROR(( "cff_encoding_load: invalid table format\n" ));
error = CFF_Err_Invalid_File_Format;
goto Exit;
}
@ -1423,7 +1423,7 @@
font->header_size < 4 ||
font->absolute_offsize > 4 )
{
FT_TRACE2(( "[not a CFF font header!]\n" ));
FT_TRACE2(( "[not a CFF font header]\n" ));
error = CFF_Err_Unknown_File_Format;
goto Exit;
}
@ -1492,7 +1492,7 @@
if ( fd_index.count > CFF_MAX_CID_FONTS )
{
FT_ERROR(( "cff_font_load: FD array too large in CID font\n" ));
FT_TRACE0(( "cff_font_load: FD array too large in CID font\n" ));
goto Fail_CID;
}
@ -1533,7 +1533,7 @@
/* read the charstrings index now */
if ( dict->charstrings_offset == 0 )
{
FT_ERROR(( "cff_font_load: no charstrings offset!\n" ));
FT_ERROR(( "cff_font_load: no charstrings offset\n" ));
error = CFF_Err_Unknown_File_Format;
goto Exit;
}

View File

@ -4,7 +4,7 @@
/* */
/* OpenType objects manager (body). */
/* */
/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 by */
/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@ -530,10 +530,10 @@
/* which aren't CID-keyed */
if ( dict->cid_registry == 0xFFFFU && !psnames )
{
FT_ERROR(( "cff_face_init:" ));
FT_ERROR(( " cannot open CFF & CEF fonts\n" ));
FT_ERROR(( " " ));
FT_ERROR(( " without the `PSNames' module\n" ));
FT_ERROR(( "cff_face_init:"
" cannot open CFF & CEF fonts\n"
" "
" without the `PSNames' module\n" ));
goto Bad_Format;
}

View File

@ -112,7 +112,7 @@
if ( parser->num_dict < 0 )
{
FT_ERROR(( "cid_load_keyword: invalid use of `%s'!\n",
FT_ERROR(( "cid_load_keyword: invalid use of `%s'\n",
keyword->ident ));
error = CID_Err_Syntax_Error;
goto Exit;

View File

@ -4,7 +4,8 @@
/* */
/* TrueTypeGX/AAT common tables validation (body). */
/* */
/* Copyright 2004, 2005 by suzuki toshiya, Masatake YAMATO, Red Hat K.K., */
/* Copyright 2004, 2005, 2009 */
/* by suzuki toshiya, Masatake YAMATO, Red Hat K.K., */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@ -404,8 +405,8 @@
if ( UNITSIZE != CORRECTSIZE ) \
{ \
FT_ERROR(( "unitSize=%d differs from" \
"expected unitSize=%d" \
"in LookupTable %s", \
" expected unitSize=%d" \
" in LookupTable %s\n", \
UNITSIZE, CORRECTSIZE, FORMAT )); \
if ( UNITSIZE != 0 && NUNITS != 0 ) \
{ \

View File

@ -4,7 +4,7 @@
/* */
/* OpenType common tables validation (specification). */
/* */
/* Copyright 2004, 2005, 2007 by */
/* Copyright 2004, 2005, 2007, 2009 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@ -85,27 +85,27 @@ FT_BEGIN_HEADER
FT_INVALID_TOO_SHORT; \
FT_END_STMNT
#define OTV_SIZE_CHECK( _size ) \
FT_BEGIN_STMNT \
if ( _size > 0 && _size < table_size ) \
{ \
if ( valid->root->level == FT_VALIDATE_PARANOID ) \
FT_INVALID_OFFSET; \
else \
{ \
/* strip off `const' */ \
FT_Byte* pp = (FT_Byte*)_size ## _p; \
\
\
FT_TRACE3(( "\n" \
"Invalid offset to optional table `%s'!\n" \
"Set to zero.\n" \
"\n", #_size )); \
\
/* always assume 16bit entities */ \
_size = pp[0] = pp[1] = 0; \
} \
} \
#define OTV_SIZE_CHECK( _size ) \
FT_BEGIN_STMNT \
if ( _size > 0 && _size < table_size ) \
{ \
if ( valid->root->level == FT_VALIDATE_PARANOID ) \
FT_INVALID_OFFSET; \
else \
{ \
/* strip off `const' */ \
FT_Byte* pp = (FT_Byte*)_size ## _p; \
\
\
FT_TRACE3(( "\n" \
"Invalid offset to optional table `%s'" \
" set to zero.\n" \
"\n", #_size )); \
\
/* always assume 16bit entities */ \
_size = pp[0] = pp[1] = 0; \
} \
} \
FT_END_STMNT

View File

@ -738,8 +738,8 @@ THE SOFTWARE.
if ( ( offsets[i] < 0 ) ||
( (FT_ULong)offsets[i] > size ) )
{
FT_ERROR(( "pcf_get_bitmaps:"));
FT_ERROR(( " invalid offset to bitmap data of glyph %d\n", i ));
FT_TRACE0(( "pcf_get_bitmaps:"
" invalid offset to bitmap data of glyph %d\n", i ));
}
else
face->metrics[i].bits = stream->pos + offsets[i];

View File

@ -4,7 +4,7 @@
/* */
/* FreeType PFR loader (body). */
/* */
/* Copyright 2002, 2003, 2004, 2005, 2007 by */
/* Copyright 2002, 2003, 2004, 2005, 2007, 2009 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@ -428,7 +428,8 @@
Too_Short:
error = PFR_Err_Invalid_Table;
FT_ERROR(( "pfr_extra_item_load_bitmap_info: invalid bitmap info table\n" ));
FT_ERROR(( "pfr_extra_item_load_bitmap_info:"
" invalid bitmap info table\n" ));
goto Exit;
}
@ -506,7 +507,8 @@
Too_Short:
error = PFR_Err_Invalid_Table;
FT_ERROR(( "pfr_exta_item_load_stem_snaps: invalid stem snaps table\n" ));
FT_ERROR(( "pfr_exta_item_load_stem_snaps:"
" invalid stem snaps table\n" ));
goto Exit;
}
@ -603,8 +605,8 @@
FT_FREE( item );
error = PFR_Err_Invalid_Table;
FT_ERROR(( "pfr_extra_item_load_kerning_pairs: "
"invalid kerning pairs table\n" ));
FT_ERROR(( "pfr_extra_item_load_kerning_pairs:"
" invalid kerning pairs table\n" ));
goto Exit;
}

View File

@ -565,8 +565,8 @@
cur++;
if ( cur >= limit || *cur != '>' ) /* >> */
{
FT_ERROR(( "ps_parser_skip_PS_token: "
"unexpected closing delimiter `>'\n" ));
FT_ERROR(( "ps_parser_skip_PS_token:"
" unexpected closing delimiter `>'\n" ));
error = PSaux_Err_Invalid_File_Format;
goto Exit;
}
@ -591,9 +591,10 @@
Exit:
if ( cur == parser->cursor )
{
FT_ERROR(( "ps_parser_skip_PS_token: "
"current token is `%c', which is self-delimiting "
"but invalid at this point\n",
FT_ERROR(( "ps_parser_skip_PS_token:"
" current token is `%c' which is self-delimiting\n"
" "
" but invalid at this point\n",
*cur ));
error = PSaux_Err_Invalid_File_Format;
@ -1154,8 +1155,10 @@
}
else
{
FT_ERROR(( "ps_parser_load_field: expected a name or string "
"but found token of type %d instead\n",
FT_ERROR(( "ps_parser_load_field:"
" expected a name or string\n"
" "
" but found token of type %d instead\n",
token.type ));
error = PSaux_Err_Invalid_File_Format;
goto Exit;
@ -1192,8 +1195,8 @@
if ( result < 0 )
{
FT_ERROR(( "ps_parser_load_field: "
"expected four integers in bounding box\n" ));
FT_ERROR(( "ps_parser_load_field:"
" expected four integers in bounding box\n" ));
error = PSaux_Err_Invalid_File_Format;
goto Exit;
}

View File

@ -203,7 +203,7 @@
if ( decoder->glyph_names == 0 )
{
FT_ERROR(( "t1operator_seac:"
" glyph names table not available in this font!\n" ));
" glyph names table not available in this font\n" ));
return PSaux_Err_Syntax_Error;
}
@ -637,7 +637,7 @@
{
if ( top - decoder->stack >= T1_MAX_CHARSTRINGS_OPERANDS )
{
FT_ERROR(( "t1_decoder_parse_charstrings: stack overflow!\n" ));
FT_ERROR(( "t1_decoder_parse_charstrings: stack overflow\n" ));
goto Syntax_Error;
}
@ -785,7 +785,7 @@
if ( !blend )
{
FT_ERROR(( "t1_decoder_parse_charstrings:"
" unexpected multiple masters operator!\n" ));
" unexpected multiple masters operator\n" ));
goto Syntax_Error;
}
@ -989,14 +989,14 @@
default:
FT_ERROR(( "t1_decoder_parse_charstrings:"
" unknown othersubr [%d %d], wish me luck!\n",
" unknown othersubr [%d %d], wish me luck\n",
arg_cnt, subr_no ));
unknown_othersubr_result_cnt = arg_cnt;
break;
Unexpected_OtherSubr:
FT_ERROR(( "t1_decoder_parse_charstrings:"
" invalid othersubr [%d %d]!\n", arg_cnt, subr_no ));
" invalid othersubr [%d %d]\n", arg_cnt, subr_no ));
goto Syntax_Error;
}
@ -1333,7 +1333,7 @@
if ( !zone->base )
{
FT_ERROR(( "t1_decoder_parse_charstrings:"
" invoking empty subrs!\n" ));
" invoking empty subrs\n" ));
goto Syntax_Error;
}
@ -1356,7 +1356,7 @@
if ( unknown_othersubr_result_cnt == 0 )
{
FT_ERROR(( "t1_decoder_parse_charstrings:"
" no more operands for othersubr!\n" ));
" no more operands for othersubr\n" ));
goto Syntax_Error;
}

View File

@ -103,7 +103,7 @@
if ( idx >= table->max_hints )
{
FT_ERROR(( "psh_hint_table_record: invalid hint index %d\n", idx ));
FT_TRACE0(( "psh_hint_table_record: invalid hint index %d\n", idx ));
return;
}
@ -137,7 +137,7 @@
if ( table->num_hints < table->max_hints )
table->sort_global[table->num_hints++] = hint;
else
FT_ERROR(( "psh_hint_table_record: too many sorted hints! BUG!\n" ));
FT_TRACE0(( "psh_hint_table_record: too many sorted hints! BUG!\n" ));
}
@ -230,7 +230,7 @@
FT_UInt idx;
FT_ERROR(( "psh_hint_table_init: missing/incorrect hint masks!\n" ));
FT_TRACE0(( "psh_hint_table_init: missing/incorrect hint masks\n" ));
count = table->max_hints;
for ( idx = 0; idx < count; idx++ )
@ -282,8 +282,8 @@
{
hint2 = sort[0];
if ( psh_hint_overlap( hint, hint2 ) )
FT_ERROR(( "psh_hint_table_activate_mask:"
" found overlapping hints\n" ))
FT_TRACE0(( "psh_hint_table_activate_mask:"
" found overlapping hints\n" ))
}
#else
count2 = 0;
@ -295,8 +295,8 @@
if ( count < table->max_hints )
table->sort[count++] = hint;
else
FT_ERROR(( "psh_hint_tableactivate_mask:"
" too many active hints\n" ));
FT_TRACE0(( "psh_hint_tableactivate_mask:"
" too many active hints\n" ));
}
}
}

View File

@ -483,8 +483,8 @@
table->num_masks--;
}
else
FT_ERROR(( "ps_mask_table_merge: ignoring invalid indices (%d,%d)\n",
index1, index2 ));
FT_TRACE0(( "ps_mask_table_merge: ignoring invalid indices (%d,%d)\n",
index1, index2 ));
Exit:
return error;
@ -826,7 +826,7 @@
hints->error = PSH_Err_Invalid_Argument;
hints->hint_type = hint_type;
FT_ERROR(( "ps_hints_open: invalid charstring type!\n" ));
FT_TRACE0(( "ps_hints_open: invalid charstring type\n" ));
break;
}
}
@ -844,8 +844,8 @@
/* limit "dimension" to 0..1 */
if ( dimension < 0 || dimension > 1 )
{
FT_ERROR(( "ps_hints_stem: invalid dimension (%d) used\n",
dimension ));
FT_TRACE0(( "ps_hints_stem: invalid dimension (%d) used\n",
dimension ));
dimension = ( dimension != 0 );
}
@ -880,8 +880,8 @@
}
default:
FT_ERROR(( "ps_hints_stem: called with invalid hint type (%d)\n",
hints->hint_type ));
FT_TRACE0(( "ps_hints_stem: called with invalid hint type (%d)\n",
hints->hint_type ));
break;
}
}
@ -908,8 +908,8 @@
/* limit "dimension" to 0..1 */
if ( dimension < 0 || dimension > 1 )
{
FT_ERROR(( "ps_hints_t1stem3: invalid dimension (%d) used\n",
dimension ));
FT_TRACE0(( "ps_hints_t1stem3: invalid dimension (%d) used\n",
dimension ));
dimension = ( dimension != 0 );
}
@ -937,7 +937,7 @@
}
else
{
FT_ERROR(( "ps_hints_t1stem3: called with invalid hint type!\n" ));
FT_ERROR(( "ps_hints_t1stem3: called with invalid hint type\n" ));
error = PSH_Err_Invalid_Argument;
goto Fail;
}
@ -1011,8 +1011,8 @@
/* check bit count; must be equal to current total hint count */
if ( bit_count != count1 + count2 )
{
FT_ERROR(( "ps_hints_t2mask: "
"called with invalid bitcount %d (instead of %d)\n",
FT_TRACE0(( "ps_hints_t2mask:"
" called with invalid bitcount %d (instead of %d)\n",
bit_count, count1 + count2 ));
/* simply ignore the operator */
@ -1056,8 +1056,8 @@
/* check bit count, must be equal to current total hint count */
if ( bit_count != count1 + count2 )
{
FT_ERROR(( "ps_hints_t2counter: "
"called with invalid bitcount %d (instead of %d)\n",
FT_TRACE0(( "ps_hints_t2counter:"
" called with invalid bitcount %d (instead of %d)\n",
bit_count, count1 + count2 ));
/* simply ignore the operator */

View File

@ -680,7 +680,7 @@
break;
default:
FT_ERROR(( "New_Profile: invalid profile direction!\n" ));
FT_ERROR(( "New_Profile: invalid profile direction\n" ));
ras.error = Raster_Err_Invalid;
return FAILURE;
}
@ -722,7 +722,7 @@
if ( h < 0 )
{
FT_ERROR(( "End_Profile: negative height encountered!\n" ));
FT_ERROR(( "End_Profile: negative height encountered\n" ));
ras.error = Raster_Err_Neg_Height;
return FAILURE;
}

View File

@ -3402,7 +3402,8 @@
if ( TT_NEXT_USHORT( p ) != 0 )
{
p -= 2;
FT_ERROR(( "tt_face_build_cmaps: unsupported `cmap' table format = %d\n",
FT_ERROR(( "tt_face_build_cmaps:"
" unsupported `cmap' table format = %d\n",
TT_PEEK_USHORT( p ) ));
return SFNT_Err_Invalid_Table;
}
@ -3469,8 +3470,8 @@
}
else
{
FT_ERROR(( "tt_face_build_cmaps:" ));
FT_ERROR(( " broken cmap sub-table ignored!\n" ));
FT_TRACE0(( "tt_face_build_cmaps:"
" broken cmap sub-table ignored\n" ));
}
break;
}
@ -3478,8 +3479,8 @@
if ( *pclazz == NULL )
{
FT_ERROR(( "tt_face_build_cmaps:" ));
FT_ERROR(( " unsupported cmap sub-table ignored!\n" ));
FT_TRACE0(( "tt_face_build_cmaps:"
" unsupported cmap sub-table ignored\n" ));
}
}
}

View File

@ -59,14 +59,16 @@
if ( table_size < 4 ) /* the case of a malformed table */
{
FT_ERROR(( "kerning table is too small - ignored\n" ));
FT_ERROR(( "tt_face_load_kern:"
" kerning table is too small - ignored\n" ));
error = SFNT_Err_Table_Missing;
goto Exit;
}
if ( FT_FRAME_EXTRACT( table_size, face->kern_table ) )
{
FT_ERROR(( "could not extract kerning table\n" ));
FT_ERROR(( "tt_face_load_kern:"
" could not extract kerning table\n" ));
goto Exit;
}

View File

@ -5,7 +5,7 @@
/* Load the basic TrueType tables, i.e., tables that can be either in */
/* TTF or OTF fonts (body). */
/* */
/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 by */
/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@ -91,9 +91,9 @@
#ifdef FT_DEBUG_LEVEL_TRACE
if ( zero_length )
FT_TRACE4(( "ignoring empty table!\n" ));
FT_TRACE4(( "ignoring empty table\n" ));
else
FT_TRACE4(( "could not find table!\n" ));
FT_TRACE4(( "could not find table\n" ));
#endif
return NULL;
@ -364,7 +364,8 @@
error = check_table_dir( &sfnt, stream );
if ( error )
{
FT_TRACE2(( "tt_face_load_font_dir: invalid table directory for TrueType!\n" ));
FT_TRACE2(( "tt_face_load_font_dir:"
" invalid table directory for TrueType\n" ));
goto Exit;
}
@ -685,8 +686,10 @@
/* we add 4 phantom points later */
if ( maxProfile->maxTwilightPoints > ( 0xFFFFU - 4 ) )
{
FT_ERROR(( "Too much twilight points in `maxp' table;\n" ));
FT_ERROR(( " some glyphs might be rendered incorrectly.\n" ));
FT_TRACE0(( "tt_face_load_maxp:"
" too much twilight points in `maxp' table;\n"
" "
" some glyphs might be rendered incorrectly\n" ));
maxProfile->maxTwilightPoints = 0xFFFFU - 4;
}
@ -779,7 +782,7 @@
if ( storage_start > storage_limit )
{
FT_ERROR(( "invalid `name' table\n" ));
FT_ERROR(( "tt_face_load_name: invalid `name' table\n" ));
error = SFNT_Err_Name_Table_Missing;
goto Exit;
}

View File

@ -4,7 +4,7 @@
/* */
/* Load the metrics tables common to TTF and OTF fonts (body). */
/* */
/* Copyright 2006, 2007, 2008 by */
/* Copyright 2006, 2007, 2008, 2009 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@ -161,7 +161,9 @@
if ( num_shorts < 0 )
{
FT_ERROR(( "%cmtx has more metrics than glyphs.\n" ));
FT_TRACE0(( "tt_face_load_hmtx:"
" %cmtx has more metrics than glyphs.\n",
vertical ? "v" : "h" ));
/* Adobe simply ignores this problem. So we shall do the same. */
#if 0

View File

@ -494,7 +494,7 @@
if ( version != 0x00020000L ||
num_strikes >= 0x10000L )
{
FT_ERROR(( "tt_face_load_sbit_strikes: invalid table version!\n" ));
FT_ERROR(( "tt_face_load_sbit_strikes: invalid table version\n" ));
error = SFNT_Err_Invalid_File_Format;
goto Exit;

View File

@ -62,7 +62,7 @@
if ( table_size < 8 )
{
FT_ERROR(( "tt_face_load_sbit_strikes: table too short!\n" ));
FT_ERROR(( "tt_face_load_sbit_strikes: table too short\n" ));
error = SFNT_Err_Invalid_File_Format;
goto Exit;
}
@ -80,7 +80,7 @@
if ( version != 0x00020000UL || num_strikes >= 0x10000UL )
{
FT_ERROR(( "tt_face_load_sbit_strikes: invalid table version!\n" ));
FT_ERROR(( "tt_face_load_sbit_strikes: invalid table version\n" ));
error = SFNT_Err_Invalid_File_Format;
goto Fail;
}

View File

@ -1859,7 +1859,7 @@
if ( middle == bottom )
{
#ifdef FT_DEBUG_LEVEL_TRACE
FT_TRACE7(( "gray_convert_glyph: Rotten glyph!\n" ));
FT_TRACE7(( "gray_convert_glyph: rotten glyph\n" ));
#endif
return 1;
}

View File

@ -317,7 +317,7 @@
if ( n_ins > face->max_profile.maxSizeOfInstructions )
{
FT_TRACE0(( "TT_Load_Simple_Glyph: Too many instructions (%d)\n",
FT_TRACE0(( "TT_Load_Simple_Glyph: too many instructions (%d)\n",
n_ins ));
error = TT_Err_Too_Many_Hints;
goto Fail;
@ -325,7 +325,7 @@
if ( ( limit - p ) < n_ins )
{
FT_TRACE0(( "TT_Load_Simple_Glyph: Instruction count mismatch!\n" ));
FT_TRACE0(( "TT_Load_Simple_Glyph: instruction count mismatch\n" ));
error = TT_Err_Too_Many_Hints;
goto Fail;
}
@ -1037,7 +1037,7 @@
/* check it */
if ( n_ins > ((TT_Face)loader->face)->max_profile.maxSizeOfInstructions )
{
FT_TRACE0(( "TT_Process_Composite_Glyph: Too many instructions (%d)\n",
FT_TRACE0(( "TT_Process_Composite_Glyph: too many instructions (%d)\n",
n_ins ));
return TT_Err_Too_Many_Hints;
@ -1253,7 +1253,7 @@
{
if ( !loader->glyf_offset )
{
FT_TRACE2(( "no `glyf' table but non-zero `loca' entry!\n" ));
FT_TRACE2(( "no `glyf' table but non-zero `loca' entry\n" ));
error = TT_Err_Invalid_Table;
goto Exit;
}
@ -1857,7 +1857,7 @@
loader->glyf_offset = 0;
else if ( error )
{
FT_ERROR(( "TT_Load_Glyph: could not access glyph table\n" ));
FT_ERROR(( "tt_loader_init: could not access glyph table\n" ));
return error;
}
else

View File

@ -1138,7 +1138,7 @@
if ( blend == NULL )
{
FT_TRACE2(( "no blend specified!\n" ));
FT_TRACE2(( "tt_face_vary_cvt: no blend specified\n" ));
error = TT_Err_Ok;
goto Exit;
@ -1146,7 +1146,7 @@
if ( face->cvt == NULL )
{
FT_TRACE2(( "no `cvt ' table!\n" ));
FT_TRACE2(( "tt_face_vary_cvt: no `cvt ' table\n" ));
error = TT_Err_Ok;
goto Exit;
@ -1155,7 +1155,7 @@
error = face->goto_table( face, TTAG_cvar, stream, &table_len );
if ( error )
{
FT_TRACE2(( "is missing!\n" ));
FT_TRACE2(( "is missing\n" ));
error = TT_Err_Ok;
goto Exit;
@ -1170,7 +1170,7 @@
table_start = FT_Stream_FTell( stream );
if ( FT_GET_LONG() != 0x00010000L )
{
FT_TRACE2(( "bad table version!\n" ));
FT_TRACE2(( "bad table version\n" ));
error = TT_Err_Ok;
goto FExit;

View File

@ -91,7 +91,7 @@
if ( table_len >= 0x40000L )
{
FT_TRACE2(( "table too large!\n" ));
FT_TRACE2(( "table too large\n" ));
error = TT_Err_Invalid_Table;
goto Exit;
}
@ -103,7 +103,7 @@
if ( table_len >= 0x20000L )
{
FT_TRACE2(( "table too large!\n" ));
FT_TRACE2(( "table too large\n" ));
error = TT_Err_Invalid_Table;
goto Exit;
}
@ -265,7 +265,7 @@
error = face->goto_table( face, TTAG_cvt, stream, &table_len );
if ( error )
{
FT_TRACE2(( "is missing!\n" ));
FT_TRACE2(( "is missing\n" ));
face->cvt_size = 0;
face->cvt = NULL;
@ -350,7 +350,7 @@
face->font_program_size = 0;
error = TT_Err_Ok;
FT_TRACE2(( "is missing!\n" ));
FT_TRACE2(( "is missing\n" ));
}
else
{
@ -411,7 +411,7 @@
face->cvt_program_size = 0;
error = TT_Err_Ok;
FT_TRACE2(( "is missing!\n" ));
FT_TRACE2(( "is missing\n" ));
}
else
{

View File

@ -651,8 +651,8 @@
}
if ( num_designs == 0 || num_designs > T1_MAX_MM_DESIGNS )
{
FT_ERROR(( "parse_blend_design_positions:" ));
FT_ERROR(( " incorrect number of designs: %d\n",
FT_ERROR(( "parse_blend_design_positions:"
" incorrect number of designs: %d\n",
num_designs ));
error = T1_Err_Invalid_File_Format;
goto Exit;
@ -684,8 +684,8 @@
{
if ( n_axis <= 0 || n_axis > T1_MAX_MM_AXIS )
{
FT_ERROR(( "parse_blend_design_positions:" ));
FT_ERROR(( " invalid number of axes: %d\n",
FT_ERROR(( "parse_blend_design_positions:"
" invalid number of axes: %d\n",
n_axis ));
error = T1_Err_Invalid_File_Format;
goto Exit;
@ -839,8 +839,8 @@
}
if ( num_designs == 0 || num_designs > T1_MAX_MM_DESIGNS )
{
FT_ERROR(( "parse_weight_vector:" ));
FT_ERROR(( " incorrect number of designs: %d\n",
FT_ERROR(( "parse_weight_vector:"
" incorrect number of designs: %d\n",
num_designs ));
error = T1_Err_Invalid_File_Format;
goto Exit;
@ -856,9 +856,9 @@
else if ( blend->num_designs != (FT_UInt)num_designs )
{
FT_ERROR(( "parse_weight_vector:"
" /BlendDesignPosition and /WeightVector have\n" ));
FT_ERROR(( " "
" different number of elements!\n" ));
" /BlendDesignPosition and /WeightVector have\n"
" "
" different number of elements\n" ));
error = T1_Err_Invalid_File_Format;
goto Exit;
}
@ -1140,7 +1140,7 @@
cur = parser->root.cursor;
if ( cur >= limit )
{
FT_ERROR(( "parse_encoding: out of bounds!\n" ));
FT_ERROR(( "parse_encoding: out of bounds\n" ));
parser->root.error = T1_Err_Invalid_File_Format;
return;
}
@ -2153,7 +2153,7 @@
#endif
if ( !loader.charstrings.init )
{
FT_ERROR(( "T1_Open_Face: no `/CharStrings' array in face!\n" ));
FT_ERROR(( "T1_Open_Face: no `/CharStrings' array in face\n" ));
error = T1_Err_Invalid_File_Format;
}

View File

@ -297,8 +297,8 @@
/* and allocate private dictionary buffer */
if ( parser->private_len == 0 )
{
FT_ERROR(( "T1_Get_Private_Dict:" ));
FT_ERROR(( " invalid private dictionary section\n" ));
FT_ERROR(( "T1_Get_Private_Dict:"
" invalid private dictionary section\n" ));
error = T1_Err_Invalid_File_Format;
goto Fail;
}
@ -353,8 +353,8 @@
cur++;
if ( cur >= limit )
{
FT_ERROR(( "T1_Get_Private_Dict:" ));
FT_ERROR(( " could not find `eexec' keyword\n" ));
FT_ERROR(( "T1_Get_Private_Dict:"
" could not find `eexec' keyword\n" ));
error = T1_Err_Invalid_File_Format;
goto Exit;
}
@ -407,8 +407,8 @@
cur++;
else
{
FT_ERROR(( "T1_Get_Private_Dict:" ));
FT_ERROR(( " `eexec' not properly terminated\n" ));
FT_ERROR(( "T1_Get_Private_Dict:"
" `eexec' not properly terminated\n" ));
error = T1_Err_Invalid_File_Format;
goto Exit;
}

View File

@ -70,7 +70,7 @@
if ( !loader.charstrings.init )
{
FT_ERROR(( "T42_Open_Face: no charstrings array in face!\n" ));
FT_ERROR(( "T42_Open_Face: no charstrings array in face\n" ));
error = T42_Err_Invalid_File_Format;
}

View File

@ -303,7 +303,7 @@
cur = parser->root.cursor;
if ( cur >= limit )
{
FT_ERROR(( "t42_parse_encoding: out of bounds!\n" ));
FT_ERROR(( "t42_parse_encoding: out of bounds\n" ));
parser->root.error = T42_Err_Invalid_File_Format;
return;
}
@ -471,7 +471,7 @@
else
{
FT_ERROR(( "t42_parse_encoding: invalid token!\n" ));
FT_ERROR(( "t42_parse_encoding: invalid token\n" ));
parser->root.error = T42_Err_Invalid_File_Format;
}
}
@ -524,7 +524,7 @@
if ( parser->root.cursor >= limit || *parser->root.cursor++ != '[' )
{
FT_ERROR(( "t42_parse_sfnts: can't find begin of sfnts vector!\n" ));
FT_ERROR(( "t42_parse_sfnts: can't find begin of sfnts vector\n" ));
error = T42_Err_Invalid_File_Format;
goto Fail;
}
@ -569,7 +569,7 @@
if ( allocated )
{
FT_ERROR(( "t42_parse_sfnts: "
"can't handle mixed binary and hex strings!\n" ));
"can't handle mixed binary and hex strings\n" ));
error = T42_Err_Invalid_File_Format;
goto Fail;
}
@ -585,7 +585,7 @@
parser->root.cursor += string_size + 1;
if ( parser->root.cursor >= limit )
{
FT_ERROR(( "t42_parse_sfnts: too many binary data!\n" ));
FT_ERROR(( "t42_parse_sfnts: too many binary data\n" ));
error = T42_Err_Invalid_File_Format;
goto Fail;
}
@ -593,7 +593,7 @@
if ( !string_buf )
{
FT_ERROR(( "t42_parse_sfnts: invalid data in sfnts array!\n" ));
FT_ERROR(( "t42_parse_sfnts: invalid data in sfnts array\n" ));
error = T42_Err_Invalid_File_Format;
goto Fail;
}
@ -604,7 +604,7 @@
if ( !string_size )
{
FT_ERROR(( "t42_parse_sfnts: invalid string!\n" ));
FT_ERROR(( "t42_parse_sfnts: invalid string\n" ));
error = T42_Err_Invalid_File_Format;
goto Fail;
}
@ -669,7 +669,7 @@
/* all other tables are just copied */
if ( count >= ttf_size )
{
FT_ERROR(( "t42_parse_sfnts: too many binary data!\n" ));
FT_ERROR(( "t42_parse_sfnts: too many binary data\n" ));
error = T42_Err_Invalid_File_Format;
goto Fail;
}
@ -716,7 +716,7 @@
if ( parser->root.cursor >= limit )
{
FT_ERROR(( "t42_parse_charstrings: out of bounds!\n" ));
FT_ERROR(( "t42_parse_charstrings: out of bounds\n" ));
error = T42_Err_Invalid_File_Format;
goto Fail;
}
@ -758,14 +758,14 @@
}
else
{
FT_ERROR(( "t42_parse_charstrings: invalid token!\n" ));
FT_ERROR(( "t42_parse_charstrings: invalid token\n" ));
error = T42_Err_Invalid_File_Format;
goto Fail;
}
if ( parser->root.cursor >= limit )
{
FT_ERROR(( "t42_parse_charstrings: out of bounds!\n" ));
FT_ERROR(( "t42_parse_charstrings: out of bounds\n" ));
error = T42_Err_Invalid_File_Format;
goto Fail;
}
@ -825,7 +825,7 @@
if ( cur + 1 >= limit )
{
FT_ERROR(( "t42_parse_charstrings: out of bounds!\n" ));
FT_ERROR(( "t42_parse_charstrings: out of bounds\n" ));
error = T42_Err_Invalid_File_Format;
goto Fail;
}
@ -856,7 +856,7 @@
(void)T1_ToInt( parser );
if ( parser->root.cursor >= limit )
{
FT_ERROR(( "t42_parse_charstrings: out of bounds!\n" ));
FT_ERROR(( "t42_parse_charstrings: out of bounds\n" ));
error = T42_Err_Invalid_File_Format;
goto Fail;
}
@ -879,7 +879,7 @@
if ( !notdef_found )
{
FT_ERROR(( "t42_parse_charstrings: no /.notdef glyph!\n" ));
FT_ERROR(( "t42_parse_charstrings: no /.notdef glyph\n" ));
error = T42_Err_Invalid_File_Format;
goto Fail;
}

View File

@ -4,7 +4,7 @@
/* */
/* FreeType font driver for Windows FNT/FON files */
/* */
/* Copyright 1996-2001, 2002, 2003, 2004, 2006, 2007, 2008 by */
/* Copyright 1996-2001, 2002, 2003, 2004, 2006, 2007, 2008, 2009 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* Copyright 2003 Huw D M Davies for Codeweavers */
/* Copyright 2007 Dmitry Timoshkov for Codeweavers */
@ -342,7 +342,7 @@
if ( !font_count || !font_offset )
{
FT_TRACE2(( "this file doesn't contain any FNT resources!\n" ));
FT_TRACE2(( "this file doesn't contain any FNT resources\n" ));
error = FNT_Err_Invalid_File_Format;
goto Exit;
}
@ -833,7 +833,7 @@
if ( font->header.face_name_offset >= font->header.file_size )
{
FT_TRACE2(( "invalid family name offset!\n" ));
FT_TRACE2(( "invalid family name offset\n" ));
error = FNT_Err_Invalid_File_Format;
goto Fail;
}
@ -980,7 +980,7 @@
if ( offset >= font->header.file_size )
{
FT_TRACE2(( "invalid FNT offset!\n" ));
FT_TRACE2(( "invalid FNT offset\n" ));
error = FNT_Err_Invalid_File_Format;
goto Exit;
}