void fz_debug_text(fz_context *ctx, fz_text *text, int indent) { int i, n; for (i = 0; i < text->len; i++) { for (n = 0; n < indent; n++) putchar(' '); if (!isxmlmeta(text->items[i].ucs)) printf("<g ucs=\"%c\" gid=\"%d\" x=\"%g\" y=\"%g\" />\n", text->items[i].ucs, text->items[i].gid, text->items[i].x, text->items[i].y); else printf("<g ucs=\"U+%04X\" gid=\"%d\" x=\"%g\" y=\"%g\" />\n", text->items[i].ucs, text->items[i].gid, text->items[i].x, text->items[i].y); } }
static void do_print_text(FILE *out, fz_text *text, int indent) { int i, n; for (i = 0; i < text->len; i++) { for (n = 0; n < indent; n++) fputc(' ', out); if (!isxmlmeta(text->items[i].ucs)) fprintf(out, "<g ucs=\"%c\" gid=\"%d\" x=\"%g\" y=\"%g\" />\n", text->items[i].ucs, text->items[i].gid, text->items[i].x, text->items[i].y); else fprintf(out, "<g ucs=\"U+%04X\" gid=\"%d\" x=\"%g\" y=\"%g\" />\n", text->items[i].ucs, text->items[i].gid, text->items[i].x, text->items[i].y); } }
static void fz_trace_text_span(fz_context *ctx, fz_output *out, fz_text_span *span) { int i; fz_printf(ctx, out, "<span font=\"%s\" wmode=\"%d\"", span->font->name, span->wmode); fz_printf(ctx, out, " trm=\"%g %g %g %g\">\n", span->trm.a, span->trm.b, span->trm.c, span->trm.d); for (i = 0; i < span->len; i++) { if (!isxmlmeta(span->items[i].ucs)) fz_printf(ctx, out, "<g ucs=\"%c\" gid=\"%d\" x=\"%g\" y=\"%g\" />\n", span->items[i].ucs, span->items[i].gid, span->items[i].x, span->items[i].y); else fz_printf(ctx, out, "<g ucs=\"U+%04X\" gid=\"%d\" x=\"%g\" y=\"%g\" />\n", span->items[i].ucs, span->items[i].gid, span->items[i].x, span->items[i].y); } fz_printf(ctx, out, "</span>\n"); }