From: handa Date: Wed, 28 Jun 2006 11:22:06 +0000 (+0000) Subject: (xlfd_unparse_name): Suppress the heading '-' if not X-Git-Tag: REL-1-3-4~148 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=11700db075c4290ed32e8b908297f982757abcaf;p=m17n%2Fm17n-lib.git (xlfd_unparse_name): Suppress the heading '-' if not necessary. --- 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;