[pango/better-hyphens] testiter: Add more debug spew
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango/better-hyphens] testiter: Add more debug spew
- Date: Mon, 22 Jul 2019 15:41:14 +0000 (UTC)
commit ebc2507533aa8b1465ac7645ea2a9e2f0b716642
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Jul 22 08:40:58 2019 -0700
testiter: Add more debug spew
tests/testiter.c | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/tests/testiter.c b/tests/testiter.c
index de3b462f..4fc535a0 100644
--- a/tests/testiter.c
+++ b/tests/testiter.c
@@ -32,6 +32,8 @@
#include <pango/pangocairo.h>
+#define VERBOSE 1
+
static void verbose (const char *format, ...) G_GNUC_PRINTF (1, 2);
static void
verbose (const char *format, ...)
@@ -115,12 +117,19 @@ iter_char_test (PangoLayout *layout)
if (run)
{
+ PangoFontDescription *desc;
+ char *str;
+
/* Get needed data for the GlyphString */
pango_layout_iter_get_run_extents(iter, NULL, &run_extents);
offset = run->item->offset;
rtl = run->item->analysis.level%2;
- verbose (" (current run: offset=%d,x=%d,len=%d,rtl=%d)\n",
- offset, run_extents.x, run->item->length, rtl);
+ desc = pango_font_describe (run->item->analysis.font);
+ str = pango_font_description_to_string (desc);
+ verbose (" (current run: font=%s,offset=%d,x=%d,len=%d,rtl=%d)\n",
+ str, offset, run_extents.x, run->item->length, rtl);
+ g_free (str);
+ pango_font_description_free (desc);
/* Calculate expected x result using index_to_x */
pango_glyph_string_index_to_x (run->glyphs,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]