summaryrefslogtreecommitdiff
path: root/utils/pango-list.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2018-10-15 16:01:33 -0400
committerMatthias Clasen <mclasen@redhat.com>2018-11-19 16:20:01 -0500
commit37daf4ea2ade57210264fb24eed8bbea12a64d37 (patch)
treec3e953a16ea2feedb368ff4580cda882964e80c8 /utils/pango-list.c
parentc4be13756a5cb4a0c5d4898f32a023b571bb61fe (diff)
downloadpango-37daf4ea2ade57210264fb24eed8bbea12a64d37.tar.gz
font-list: print out family details
Show if a family is monospace or variable, mainly to prove that the APIs work.
Diffstat (limited to 'utils/pango-list.c')
-rw-r--r--utils/pango-list.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/utils/pango-list.c b/utils/pango-list.c
index cb92767e..6f80b521 100644
--- a/utils/pango-list.c
+++ b/utils/pango-list.c
@@ -46,9 +46,25 @@ 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]))
+ {
+ if (pango_font_family_is_variable (families[i]))
+ kind = "(monospace, variable)";
+ else
+ 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++)