diff options
| author | Kenichi Handa | 2008-10-09 12:19:38 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2008-10-09 12:19:38 +0000 |
| commit | ea217c11e503bd82d7f35169db29be7bb145f426 (patch) | |
| tree | 925efc9445145f0a5e51a83c578058e9d8664849 /src/fontset.c | |
| parent | c576d6dc9e6ca5212e8c74cd25316f664704c8d3 (diff) | |
| download | emacs-ea217c11e503bd82d7f35169db29be7bb145f426.tar.gz emacs-ea217c11e503bd82d7f35169db29be7bb145f426.zip | |
(face_for_char): If face->fontset is negative, just return ascii_face.
Diffstat (limited to 'src/fontset.c')
| -rw-r--r-- | src/fontset.c | 6 |
1 files changed, 5 insertions, 1 deletions
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) | |||
| 876 | int face_id; | 876 | int face_id; |
| 877 | int id; | 877 | int id; |
| 878 | 878 | ||
| 879 | if (ASCII_CHAR_P (c)) | 879 | /* If face->fontset is negative (that happens when no font is found |
| 880 | for face), just return face->ascii_face because we can't do | ||
| 881 | anything. Perhaps, we should fix the callers to assure | ||
| 882 | that face->fontset is always valid. */ | ||
| 883 | if (ASCII_CHAR_P (c) || face->fontset < 0) | ||
| 880 | return face->ascii_face->id; | 884 | return face->ascii_face->id; |
| 881 | 885 | ||
| 882 | xassert (fontset_id_valid_p (face->fontset)); | 886 | xassert (fontset_id_valid_p (face->fontset)); |