[truetype] Improving tracing of composite glyphs.

* src/truetype/ttgload.c (TT_Load_Composite_Glyph)
[FT_DEBUG_LEVEL_TRACE]: Show composite glyph information.
This commit is contained in:
Werner Lemberg 2017-11-28 12:43:45 +01:00
parent 40db4a9954
commit c18c391b68
2 changed files with 54 additions and 2 deletions

View File

@ -1,6 +1,13 @@
2017-11-28 Werner Lemberg <wl@gnu.org>
[truetype] Improving tracing of composite glyphs.
* src/truetype/ttgload.c (TT_Load_Composite_Glyph)
[FT_DEBUG_LEVEL_TRACE]: Show composite glyph information.
2017-11-27 Werner Lemberg <wl@gnu.org>
Allow (again) encoding vectors with more than 256 elements (#52464).
[type1] Allow (again) `/Encoding' with >256 elements (#52464).
In version 2.6.1, this has been disallowed to better reject
malformed fonts; however, this restriction was too strong. This

View File

@ -664,7 +664,52 @@
} while ( subglyph->flags & MORE_COMPONENTS );
gloader->current.num_subglyphs = num_subglyphs;
FT_TRACE5(( " %d components\n", num_subglyphs ));
FT_TRACE5(( " %d component%s\n",
num_subglyphs,
num_subglyphs > 1 ? "s" : "" ));
#ifdef FT_DEBUG_LEVEL_TRACE
{
FT_UInt i;
subglyph = gloader->current.subglyphs;
for ( i = 0; i < num_subglyphs; i++ )
{
if ( num_subglyphs > 1 )
FT_TRACE7(( " subglyph %d:\n", i ));
FT_TRACE7(( " glyph index: %d\n", subglyph->index ));
if ( subglyph->flags & ARGS_ARE_XY_VALUES )
FT_TRACE7(( " offset: x=%d, y=%d\n",
subglyph->arg1,
subglyph->arg2 ));
else
FT_TRACE7(( " matching points: base=%d, component=%d\n",
subglyph->arg1,
subglyph->arg2 ));
if ( subglyph->flags & WE_HAVE_A_SCALE )
FT_TRACE7(( " scaling: %f\n",
subglyph->transform.xx / 65536.0 ));
else if ( subglyph->flags & WE_HAVE_AN_XY_SCALE )
FT_TRACE7(( " scaling: x=%f, y=%f\n",
subglyph->transform.xx / 65536.0,
subglyph->transform.yy / 65536.0 ));
else if ( subglyph->flags & WE_HAVE_A_2X2 )
FT_TRACE7(( " scaling: xx=%f, yx=%f\n"
" xy=%f, yy=%f\n",
subglyph->transform.xx / 65536.0,
subglyph->transform.yx / 65536.0,
subglyph->transform.xy / 65536.0,
subglyph->transform.yy / 65536.0 ));
subglyph++;
}
}
#endif /* FT_DEBUG_LEVEL_TRACE */
#ifdef TT_USE_BYTECODE_INTERPRETER