From: Kenichi Handa Date: Thu, 9 Oct 2008 12:19:38 +0000 (+0000) Subject: (face_for_char): If face->fontset is negative, just return ascii_face. X-Git-Tag: emacs-pretest-23.0.90~2589 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ea217c11e503bd82d7f35169db29be7bb145f426;p=emacs.git (face_for_char): If face->fontset is negative, just return ascii_face. --- diff --git a/src/ChangeLog b/src/ChangeLog index 4b0daf5b862..3421009108d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,11 @@ +2008-10-09 Kenichi Handa + + * fontset.c (face_for_char): If face->fontset is negative, just + return ascii_face. + + * font.c (font_delete_unmatched): Fix previous change. Don't + reject an entity if DPI and AVGWIDTH of an entity are 0. + 2008-10-09 Martin Rudalics * frame.c (Fraise_frame): On text-only terminals select frame in diff --git a/src/fontset.c b/src/fontset.c index 8061a2b90ab..e1ba05ea3e8 100644 --- a/src/fontset.c +++ b/src/fontset.c @@ -876,7 +876,11 @@ face_for_char (f, face, c, pos, object) int face_id; int id; - if (ASCII_CHAR_P (c)) + /* If face->fontset is negative (that happens when no font is found + for face), just return face->ascii_face because we can't do + anything. Perhaps, we should fix the callers to assure + that face->fontset is always valid. */ + if (ASCII_CHAR_P (c) || face->fontset < 0) return face->ascii_face->id; xassert (fontset_id_valid_p (face->fontset));