From 11700db075c4290ed32e8b908297f982757abcaf Mon Sep 17 00:00:00 2001 From: handa Date: Wed, 28 Jun 2006 11:22:06 +0000 Subject: [PATCH] (xlfd_unparse_name): Suppress the heading '-' if not necessary. --- src/font.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/font.c b/src/font.c index 94dcea3..e2f0470 100644 --- a/src/font.c +++ b/src/font.c @@ -795,6 +795,7 @@ xlfd_unparse_name (MFont *font, int full_xlfd) int len, i; char spacing; int size, resy; + int all_nil = 1; prop[0] = (MSymbol) mfont_get_prop (font, Mfoundry); prop[1] = (MSymbol) mfont_get_prop (font, Mfamily); @@ -809,6 +810,7 @@ xlfd_unparse_name (MFont *font, int full_xlfd) { str[i] = msymbol_name (prop[i]); len += strlen (str[i]); + all_nil = 0; } else { @@ -853,6 +855,8 @@ xlfd_unparse_name (MFont *font, int full_xlfd) str[0], str[1], str[2], str[3], str[4], str[5], size, resy, resy, spacing, str[6]); } + else if (all_nil && size == 0) + sprintf (name, "*"); else { char *p = name; -- 1.7.10.4