[pango/variable-face: 28/29] font-list: print out family details
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango/variable-face: 28/29] font-list: print out family details
- Date: Mon, 15 Oct 2018 20:10:29 +0000 (UTC)
commit 0e519ab50cb40c61394d2349515e44ab52b9c4cf
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Oct 15 16:01:33 2018 -0400
font-list: print out family details
Show if a family is monospace or variable,
mainly to prove that the APIs work.
utils/pango-list.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
---
diff --git a/utils/pango-list.c b/utils/pango-list.c
index cb92767e..8f6b3d23 100644
--- a/utils/pango-list.c
+++ b/utils/pango-list.c
@@ -46,9 +46,16 @@ main (int argc,
{
PangoFontFace **faces;
int n_faces;
+ const char *kind;
const char *family_name = pango_font_family_get_name (families[i]);
- g_print ("%s\n", family_name);
+ if (pango_font_family_is_monospace (families[i]))
+ kind = "(monospace)";
+ else if (pango_font_family_is_variable (families[i]))
+ kind = "(variable)";
+ else
+ kind = "";
+ g_print ("%s %s\n", family_name, kind);
pango_font_family_list_faces (families[i], &faces, &n_faces);
for (j = 0; j < n_faces; j++)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]