ref: 32b14552d662f28290e2792ce775fcd65397479a
parent: 26e2a89598d69c7aba76c83f6a1fcf1db17574ab
author: Werner Lemberg <[email protected]>
date: Mon Nov 9 16:00:45 EST 2020
* src/type42/t42parse.c (t42_parse_sfnts): More tracing messages.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2020-11-09 Werner Lemberg <[email protected]>
+
+ * src/type42/t42parse.c (t42_parse_sfnts): More tracing messages.
+
2020-11-04 Werner Lemberg <[email protected]>
* meson.build: Fix .pc file generation.
--- a/src/type42/t42parse.c
+++ b/src/type42/t42parse.c
@@ -576,6 +576,9 @@
old_string_size = 0;
count = 0;
+ FT_TRACE2(( "\n" ));
+ FT_TRACE2(( "t42_parse_sfnts:\n" ));
+
while ( parser->root.cursor < limit )
{
FT_ULong size;
@@ -680,6 +683,9 @@
goto Fail;
}
+ FT_TRACE2(( " PS string size %5lu bytes, offset 0x%08x (%lu)\n",
+ string_size, count, count ));
+
/* The whole TTF is now loaded into `string_buf'. We are */
/* checking its contents while copying it to `ttf_data'. */
@@ -702,6 +708,9 @@
status = BEFORE_TABLE_DIR;
face->ttf_size = 12 + 16 * num_tables;
+ FT_TRACE2(( " SFNT directory contains %d tables\n",
+ num_tables ));
+
if ( (FT_Long)size < face->ttf_size )
{
FT_ERROR(( "t42_parse_sfnts: invalid data in sfnts array\n" ));
@@ -727,6 +736,10 @@
FT_ULong len;
+ FT_TRACE2(( "\n" ));
+ FT_TRACE2(( " table length\n" ));
+ FT_TRACE2(( " ------------------------------\n" ));
+
for ( i = 0; i < num_tables; i++ )
{
FT_Byte* p = face->ttf_data + 12 + 16 * i + 12;
@@ -733,6 +746,8 @@
len = FT_PEEK_ULONG( p );
+ FT_TRACE2(( " %4i 0x%08x (%lu)\n", i, len, len ));
+
if ( len > size ||
face->ttf_size > (FT_Long)( size - len ) )
{
@@ -747,6 +762,10 @@
}
status = OTHER_TABLES;
+
+ FT_TRACE2(( "\n" ));
+ FT_TRACE2(( " allocating %ld bytes\n", face->ttf_size + 1 ));
+ FT_TRACE2(( "\n" ));
if ( FT_REALLOC( face->ttf_data, 12 + 16 * num_tables,
face->ttf_size + 1 ) )