diff options
author | Matthias Clasen <mclasen@redhat.com> | 2020-12-21 13:11:46 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2020-12-21 13:11:46 -0500 |
commit | 147386189f198074c6eb2f02777a0e5f558bc9d8 (patch) | |
tree | de4a5e016ddbf145c06577ff2cd8fc3944ee745c /gtk/inspector | |
parent | 9cec9e4ce2bf4608bb23dfece62297b5f426fa6c (diff) | |
download | gtk+-147386189f198074c6eb2f02777a0e5f558bc9d8.tar.gz |
inspector: Show glyphs as in node files
Reuse the glyph serialization code from gsk to
show glyphs in the same way here.
Diffstat (limited to 'gtk/inspector')
-rw-r--r-- | gtk/inspector/recorder.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/gtk/inspector/recorder.c b/gtk/inspector/recorder.c index 7e07e4413a..5b6452f340 100644 --- a/gtk/inspector/recorder.c +++ b/gtk/inspector/recorder.c @@ -774,13 +774,10 @@ populate_render_node_properties (GtkListStore *store, case GSK_TEXT_NODE: { const PangoFont *font = gsk_text_node_get_font (node); - const PangoGlyphInfo *glyphs = gsk_text_node_get_glyphs (node, NULL); const GdkRGBA *color = gsk_text_node_get_color (node); - guint num_glyphs = gsk_text_node_get_num_glyphs (node); const graphene_point_t *offset = gsk_text_node_get_offset (node); PangoFontDescription *desc; GString *s; - int i; desc = pango_font_describe ((PangoFont *)font); tmp = pango_font_description_to_string (desc); @@ -788,9 +785,8 @@ populate_render_node_properties (GtkListStore *store, g_free (tmp); pango_font_description_free (desc); - s = g_string_sized_new (6 * num_glyphs); - for (i = 0; i < num_glyphs; i++) - g_string_append_printf (s, "%x ", glyphs[i].glyph); + s = g_string_sized_new (0); + gsk_text_node_serialize_glyphs (node, s); add_text_row (store, "Glyphs", s->str); g_string_free (s, TRUE); |