FT_Render_Glyph(face->glyph, FT_RENDER_MODE_NORMAL);
if(verbose>=2)
- printf(" Char %u: glyph %u, size %dx%d\n", i, n, bmp->width, bmp->rows);
+ {
+ printf(" Code point U+%04X", i);
+ if(i>=0x20 && i<0x7F)
+ printf(" (%c)", i);
+ else if(i>=0xA0 && i<=0x10FFFF)
+ {
+ char utf8[5];
+ unsigned bytes;
+
+ for(bytes=2; i>>(1+bytes*5); ++bytes) ;
+ for(j=0; j<bytes; ++j)
+ utf8[j] = 0x80 | ((i>>((bytes-j-1)*6))&0x3F);
+ utf8[0] |= 0xF0<<(4-bytes);
+ utf8[j] = 0;
+
+ printf(" (%s)", utf8);
+ }
+ printf(": glyph %u, size %dx%d\n", n, bmp->width, bmp->rows);
+ }
if(bmp->pixel_mode!=FT_PIXEL_MODE_GRAY)
{