From: Kenichi Handa Date: Thu, 10 Jul 2008 01:27:07 +0000 (+0000) Subject: (xfont_open): Log the reason of failure. X-Git-Tag: emacs-pretest-23.0.90~4269 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c8e0e16d2dfc1fa5fdb4b6fdbfa45f97f6f214f7;p=emacs.git (xfont_open): Log the reason of failure. --- diff --git a/src/ChangeLog b/src/ChangeLog index 8470c1ffcfb..487ee00bd50 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2008-07-10 Kenichi Handa + + * xfont.c (xfont_open): Log the reason of failure. + 2008-07-09 Stefan Monnier * fontset.c (fontset_get_font_group): diff --git a/src/xfont.c b/src/xfont.c index 92370d4b15d..544088bce36 100644 --- a/src/xfont.c +++ b/src/xfont.c @@ -509,7 +509,10 @@ xfont_open (f, entity, pixel_size) font. */ registry = AREF (entity, FONT_REGISTRY_INDEX); if (font_registry_charsets (registry, &encoding, &repertory) < 0) - return Qnil; + { + font_add_log (" x:unknown registry", registry, Qnil); + return Qnil; + } if (XINT (AREF (entity, FONT_SIZE_INDEX)) != 0) pixel_size = XINT (AREF (entity, FONT_SIZE_INDEX)); @@ -522,7 +525,10 @@ xfont_open (f, entity, pixel_size) } len = font_unparse_xlfd (entity, pixel_size, name, 256); if (len <= 0) - return Qnil; + { + font_add_log (" x:unparse failed", entity, Qnil); + return Qnil; + } BLOCK_INPUT; x_catch_errors (display); @@ -562,7 +568,10 @@ xfont_open (f, entity, pixel_size) UNBLOCK_INPUT; if (! xfont) - return Qnil; + { + font_add_log (" x:open failed", build_string (name), Qnil); + return Qnil; + } font_object = font_make_object (VECSIZE (struct xfont_info), entity, pixel_size);