From 83f23901a3f4bf301effa7b388b6e42048d679ba Mon Sep 17 00:00:00 2001 From: Adrian Johnson Date: Sun, 4 Mar 2012 18:10:49 +1030 Subject: [PATCH 2/3] glib demo: show font encoding in font demo --- glib/demo/fonts.c | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/glib/demo/fonts.c b/glib/demo/fonts.c index bbc9b8a..86174bb 100644 --- a/glib/demo/fonts.c +++ b/glib/demo/fonts.c @@ -157,12 +157,17 @@ pgd_fonts_fill_model (PgdFontsDemo *demo) const gchar *embedded; const gchar *substitute; const gchar *filename; + const gchar *encoding; gchar *details; name = poppler_fonts_iter_get_name (fonts_iter); if (!name) name = "No name"; + encoding = poppler_fonts_iter_get_encoding (fonts_iter); + if (!encoding) + encoding = "No encoding"; + type = font_type_to_string (poppler_fonts_iter_get_font_type (fonts_iter)); if (poppler_fonts_iter_is_embedded (fonts_iter)) { @@ -178,9 +183,9 @@ pgd_fonts_fill_model (PgdFontsDemo *demo) filename = poppler_fonts_iter_get_file_name (fonts_iter); if (substitute && filename) - details = g_markup_printf_escaped ("%s\n%s, substituting with %s\n(%s)", type, embedded, substitute, filename); + details = g_markup_printf_escaped ("%s\nEncoding: %s\n%s, substituting with %s\n(%s)", type, encoding, embedded, substitute, filename); else - details = g_markup_printf_escaped ("%s\n%s", type, embedded); + details = g_markup_printf_escaped ("%s\nEncoding: %s\n%s", type, encoding, embedded); gtk_list_store_append (GTK_LIST_STORE (model), &iter); gtk_list_store_set (GTK_LIST_STORE (model), &iter, -- 1.7.5.4