summaryrefslogtreecommitdiff
path: root/src/xfont.c
diff options
context:
space:
mode:
authorKenichi Handa <handa@m17n.org>2008-07-10 01:25:59 +0000
committerKenichi Handa <handa@m17n.org>2008-07-10 01:25:59 +0000
commit5c686e332f9d5781cf5d44fad781d74510f3208a (patch)
tree905a9e1b45eca537022b933c66734ef0a960295c /src/xfont.c
parent145dbfc26f99e7032204beb058875e6318fc130d (diff)
downloademacs-5c686e332f9d5781cf5d44fad781d74510f3208a.tar.gz
(xfont_open): Log the reason of failure.
Diffstat (limited to 'src/xfont.c')
-rw-r--r--src/xfont.c15
1 files changed, 12 insertions, 3 deletions
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);