[PATCH 2/3] glib: show substitute font name in demo

Adrian Johnson ajohnson at redneon.com
Tue Feb 28 02:37:06 PST 2012


---
 glib/demo/fonts.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/glib/demo/fonts.c b/glib/demo/fonts.c
index 07ea589..bbc9b8a 100644
--- a/glib/demo/fonts.c
+++ b/glib/demo/fonts.c
@@ -155,6 +155,7 @@ pgd_fonts_fill_model (PgdFontsDemo *demo)
 			const gchar *name;
 			const gchar *type;
 			const gchar *embedded;
+			const gchar *substitute;
 			const gchar *filename;
 			gchar       *details;
 
@@ -173,10 +174,11 @@ pgd_fonts_fill_model (PgdFontsDemo *demo)
 				embedded = "Not embedded";
 			}
 
+			substitute = poppler_fonts_iter_get_substitute_name (fonts_iter);
 			filename = poppler_fonts_iter_get_file_name (fonts_iter);
 
-			if (filename)
-				details = g_markup_printf_escaped ("%s\n%s (%s)", type, embedded, filename);
+			if (substitute && filename)
+				details = g_markup_printf_escaped ("%s\n%s, substituting with <b>%s</b>\n(%s)", type, embedded, substitute, filename);
 			else
 				details = g_markup_printf_escaped ("%s\n%s", type, embedded);
 
-- 
1.7.5.4


--------------040904090202000503090705
Content-Type: text/x-patch;
 name="0003-glib-add-copy-button-to-selections-demo.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="0003-glib-add-copy-button-to-selections-demo.patch"



More information about the poppler mailing list