From 18df93696d8087ac7dfde2d606298fb2b8e7d991 Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Fri, 26 Nov 1999 10:17:53 +0000 Subject: [PATCH] (set_lface_from_font_name): Fix previous change. (recompute_basic_faces): Change assert to abort. --- src/ChangeLog | 7 ++++++- src/xfaces.c | 13 +++++++------ 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 8866f8447b..c6439fde6b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +1999-11-26 Gerd Moellmann + + * xfaces.c (set_lface_from_font_name): Fix previous change. + (recompute_basic_faces): Change assert to abort. + 1999-11-25 Dave Love * fns.c (Fnthcdr, Fnreverse): Inline cdr. @@ -7,7 +12,7 @@ 1999-11-25 Gerd Moellmann * xfaces.c (set_lface_from_font_name): New parameter may_fail_p. - Callers changed. If specified font name is bogus, and mail_fail_p + Callers changed. If specified font name is bogus, and may_fail_p is not set, try to use a reasonable default. * dispnew.c (direct_output_for_insert): Set glyph row's diff --git a/src/xfaces.c b/src/xfaces.c index 963c8ed10f..c7b9c1adf1 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -690,10 +690,9 @@ recompute_basic_faces (f) { if (FRAME_FACE_CACHE (f)) { - int realized_p; clear_face_cache (0); - realized_p = realize_basic_faces (f); - xassert (realized_p); + if (!realize_basic_faces (f)) + abort (); } } @@ -2736,7 +2735,9 @@ set_lface_from_font_name (f, lface, font_name, force_p, may_fail_p) else { font.name = STRDUPA (font_name); - if (!split_font_name (f, &font, 1)) + if (split_font_name (f, &font, 1)) + have_font_p = 1; + else { /* The font name may be something like `6x13'. Make sure we use the full name. */ @@ -2745,14 +2746,14 @@ set_lface_from_font_name (f, lface, font_name, force_p, may_fail_p) BLOCK_INPUT; font_info = fs_load_font (f, FRAME_X_FONT_TABLE (f), CHARSET_ASCII, font_name, -1); - UNBLOCK_INPUT; - if (font_info) { font.name = STRDUPA (font_info->full_name); split_font_name (f, &font, 1); have_font_p = 1; } + + UNBLOCK_INPUT; } } -- 2.20.1