aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenichi Handa2008-07-10 01:27:07 +0000
committerKenichi Handa2008-07-10 01:27:07 +0000
commitc8e0e16d2dfc1fa5fdb4b6fdbfa45f97f6f214f7 (patch)
tree9ca83b88161b81f994c56d1d18673c97465da75f /src
parente0079d39e5818bd47ab36f4e1a9c3f0d3fd792fd (diff)
downloademacs-c8e0e16d2dfc1fa5fdb4b6fdbfa45f97f6f214f7.tar.gz
emacs-c8e0e16d2dfc1fa5fdb4b6fdbfa45f97f6f214f7.zip
(xfont_open): Log the reason of failure.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog4
-rw-r--r--src/xfont.c15
2 files changed, 16 insertions, 3 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 8470c1ffcfb..487ee00bd50 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,7 @@
12008-07-10 Kenichi Handa <handa@m17n.org>
2
3 * xfont.c (xfont_open): Log the reason of failure.
4
12008-07-09 Stefan Monnier <monnier@iro.umontreal.ca> 52008-07-09 Stefan Monnier <monnier@iro.umontreal.ca>
2 6
3 * fontset.c (fontset_get_font_group): 7 * 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)
509 font. */ 509 font. */
510 registry = AREF (entity, FONT_REGISTRY_INDEX); 510 registry = AREF (entity, FONT_REGISTRY_INDEX);
511 if (font_registry_charsets (registry, &encoding, &repertory) < 0) 511 if (font_registry_charsets (registry, &encoding, &repertory) < 0)
512 return Qnil; 512 {
513 font_add_log (" x:unknown registry", registry, Qnil);
514 return Qnil;
515 }
513 516
514 if (XINT (AREF (entity, FONT_SIZE_INDEX)) != 0) 517 if (XINT (AREF (entity, FONT_SIZE_INDEX)) != 0)
515 pixel_size = XINT (AREF (entity, FONT_SIZE_INDEX)); 518 pixel_size = XINT (AREF (entity, FONT_SIZE_INDEX));
@@ -522,7 +525,10 @@ xfont_open (f, entity, pixel_size)
522 } 525 }
523 len = font_unparse_xlfd (entity, pixel_size, name, 256); 526 len = font_unparse_xlfd (entity, pixel_size, name, 256);
524 if (len <= 0) 527 if (len <= 0)
525 return Qnil; 528 {
529 font_add_log (" x:unparse failed", entity, Qnil);
530 return Qnil;
531 }
526 532
527 BLOCK_INPUT; 533 BLOCK_INPUT;
528 x_catch_errors (display); 534 x_catch_errors (display);
@@ -562,7 +568,10 @@ xfont_open (f, entity, pixel_size)
562 UNBLOCK_INPUT; 568 UNBLOCK_INPUT;
563 569
564 if (! xfont) 570 if (! xfont)
565 return Qnil; 571 {
572 font_add_log (" x:open failed", build_string (name), Qnil);
573 return Qnil;
574 }
566 575
567 font_object = font_make_object (VECSIZE (struct xfont_info), 576 font_object = font_make_object (VECSIZE (struct xfont_info),
568 entity, pixel_size); 577 entity, pixel_size);