* src/base/ftobjs.c (FT_Render_Glyph_Internal): Improve tracing.

This commit is contained in:
Werner Lemberg 2018-08-10 05:41:32 +02:00
parent c8ef0fd07c
commit 1aa73fa83d
2 changed files with 43 additions and 32 deletions

View File

@ -1,3 +1,7 @@
2018-08-10 Werner Lemberg <wl@gnu.org>
* src/base/ftobjs.c (FT_Render_Glyph_Internal): Improve tracing.
2018-08-10 Werner Lemberg <wl@gnu.org>
Fix clang warnings.

View File

@ -4683,8 +4683,9 @@
/* we use FT_TRACE7 in this block */
if ( !error &&
ft_trace_levels[trace_checksum] >= 7 &&
slot->bitmap.rows < 128U &&
ft_trace_levels[trace_checksum] >= 7 )
{
if ( slot->bitmap.rows < 128U &&
slot->bitmap.width < 128U &&
slot->bitmap.buffer )
{
@ -4692,8 +4693,10 @@
int width = (int)slot->bitmap.width;
int pitch = slot->bitmap.pitch;
int i, j, m;
unsigned char* topleft = slot->bitmap.buffer;
if ( pitch < 0 )
topleft -= pitch * ( rows - 1 );
@ -4706,7 +4709,8 @@
{
for ( j = 0; j < width; )
for ( m = 128; m > 0 && j < width; m >>= 1, j++ )
FT_TRACE7(( " %d", ( topleft[i * pitch + j / 8] & m ) != 0 ));
FT_TRACE7(( " %d",
( topleft[i * pitch + j / 8] & m ) != 0 ));
FT_TRACE7(( "\n" ));
}
break;
@ -4722,6 +4726,9 @@
}
FT_TRACE7(( "Netpbm image: end\n" ));
}
else
FT_TRACE7(( "Netpbm image: too large, omitted\n" ));
}
#undef FT_COMPONENT
#define FT_COMPONENT trace_objs