summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWerner Lemberg <wl@gnu.org>2020-11-09 21:00:45 +0100
committerWerner Lemberg <wl@gnu.org>2020-11-09 21:00:45 +0100
commit32b14552d662f28290e2792ce775fcd65397479a (patch)
tree7ffaae8c53f64450f2eb75b2f032005979045166
parent26e2a89598d69c7aba76c83f6a1fcf1db17574ab (diff)
downloadfreetype2-32b14552d662f28290e2792ce775fcd65397479a.tar.gz
* src/type42/t42parse.c (t42_parse_sfnts): More tracing messages.
-rw-r--r--ChangeLog4
-rw-r--r--src/type42/t42parse.c19
2 files changed, 23 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index f29635292..ae007ebad 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2020-11-09 Werner Lemberg <wl@gnu.org>
+
+ * src/type42/t42parse.c (t42_parse_sfnts): More tracing messages.
+
2020-11-04 Werner Lemberg <wl@gnu.org>
* meson.build: Fix .pc file generation.
diff --git a/src/type42/t42parse.c b/src/type42/t42parse.c
index 98507699f..88877dd26 100644
--- 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,12 +736,18 @@
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;
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 ) )
{
@@ -748,6 +763,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 ) )
goto Fail;