[poppler] glib/demo
Carlos Garcia Campos
carlosgc at kemper.freedesktop.org
Tue Dec 3 10:08:25 PST 2013
glib/demo/text.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 2c4320c26744ea28be10eac7cc54980c9eb4fc27
Author: Carlos Garcia Campos <carlosgc at gnome.org>
Date: Tue Dec 3 19:07:09 2013 +0100
glib-demo: Show number of charcters and text layout units in text demo
It helps to easily detect the cases where these values mismatch.
diff --git a/glib/demo/text.c b/glib/demo/text.c
index 82293d5..8af3ce3 100644
--- a/glib/demo/text.c
+++ b/glib/demo/text.c
@@ -123,8 +123,8 @@ pgd_text_get_text (GtkWidget *button,
demo->text_attrs = poppler_page_get_text_attributes_for_area (page, &demo->area);
g_timer_stop (timer);
- str = g_strdup_printf ("<i>got text in %.4f seconds, text layout in %.4f seconds, text attrs in %.4f seconds</i>",
- text_elapsed, layout_elapsed, g_timer_elapsed (timer, NULL));
+ str = g_strdup_printf ("<i>got %ld chars in %.4f seconds, %u layout units in %.4f seconds, text attrs in %.4f seconds</i>",
+ g_utf8_strlen(text, -1), text_elapsed, n_recs, layout_elapsed, g_timer_elapsed (timer, NULL));
gtk_label_set_markup (GTK_LABEL (demo->timer_label), str);
g_free (str);
} else {
More information about the poppler
mailing list