[cff] Add some more tracing infos. * src/cff/cffparse.c (cff_parse_font_matrix, cff_parse_font_bbox, cff_parse_cid_ros): Add tracing.
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
diff --git a/ChangeLog b/ChangeLog
index b25b629..58b6a16 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-07-29 Werner Lemberg <wl@gnu.org>
+
+ [cff] Add some more tracing infos.
+
+ * src/cff/cffparse.c (cff_parse_font_matrix, cff_parse_font_bbox,
+ cff_parse_cid_ros): Add tracing.
+
2011-07-22 Dirk Müller <dmueller@suse.de>
[psaux, type1] Fix null pointer dereferences.
@@ -29,6 +36,12 @@
* src/truetype/ttdriver.c (tt_size_request): Fix copying metrics
from TT_Size to FT_Size if scalable font.
+ See
+
+ http://lists.gnu.org/archive/html/freetype-devel/2011-07/msg00049.html
+
+ for some comparison images.
+
2011-07-14 Matthias Drochner <M.Drochner@fz-juelich.de>.
[psaux] Fix potential sign extension problems.
diff --git a/src/cff/cffparse.c b/src/cff/cffparse.c
index 0d11a72..4f71e85 100644
--- a/src/cff/cffparse.c
+++ b/src/cff/cffparse.c
@@ -4,7 +4,7 @@
/* */
/* CFF token stream parser (body) */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2007, 2008, 2009, 2010 by */
+/* Copyright 1996-2004, 2007-2011 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -35,8 +35,6 @@
#define FT_COMPONENT trace_cffparse
-
-
FT_LOCAL_DEF( void )
cff_parser_init( CFF_Parser parser,
FT_UInt code,
@@ -475,6 +473,12 @@
if ( scaling < 0 || scaling > 9 )
{
/* Return default matrix in case of unlikely values. */
+
+ FT_TRACE1(( "cff_parse_font_matrix:"
+ " strange scaling value for xx element (%d),\n"
+ " "
+ " using default matrix\n", scaling ));
+
matrix->xx = 0x10000L;
matrix->yx = 0;
matrix->yx = 0;
@@ -493,6 +497,12 @@
offset->y = cff_parse_fixed_scaled( data, scaling );
*upm = power_tens[scaling];
+
+ FT_TRACE4(( " font matrix: [%f %f %f %f]\n",
+ (double)matrix->xx / *upm / 65536,
+ (double)matrix->xy / *upm / 65536,
+ (double)matrix->yx / *upm / 65536,
+ (double)matrix->yy / *upm / 65536 ));
}
Exit:
@@ -518,6 +528,12 @@
bbox->xMax = FT_RoundFix( cff_parse_fixed( data++ ) );
bbox->yMax = FT_RoundFix( cff_parse_fixed( data ) );
error = CFF_Err_Ok;
+
+ FT_TRACE4(( " bbox: [%d %d %d %d]\n",
+ bbox->xMin / 65536,
+ bbox->yMin / 65536,
+ bbox->xMax / 65536,
+ bbox->yMax / 65536 ));
}
return error;
@@ -557,8 +573,8 @@
if ( parser->top >= parser->stack + 3 )
{
- dict->cid_registry = (FT_UInt)cff_parse_num ( data++ );
- dict->cid_ordering = (FT_UInt)cff_parse_num ( data++ );
+ dict->cid_registry = (FT_UInt)cff_parse_num( data++ );
+ dict->cid_ordering = (FT_UInt)cff_parse_num( data++ );
if ( **data == 30 )
FT_TRACE1(( "cff_parse_cid_ros: real supplement is rounded\n" ));
dict->cid_supplement = cff_parse_num( data );
@@ -566,6 +582,11 @@
FT_TRACE1(( "cff_parse_cid_ros: negative supplement %d is found\n",
dict->cid_supplement ));
error = CFF_Err_Ok;
+
+ FT_TRACE4(( " ROS: registry sid %d, ordering sid %d, supplement %d\n",
+ dict->cid_registry,
+ dict->cid_ordering,
+ dict->cid_supplement ));
}
return error;