diff options
author | Jan Djärv <jan.h.d@swipnet.se> | 2013-09-01 11:59:19 +0200 |
---|---|---|
committer | Jan Djärv <jan.h.d@swipnet.se> | 2013-09-01 11:59:19 +0200 |
commit | 5b0891df61b20b9272ee304d3ed040babc3ba8e4 (patch) | |
tree | 9d6616a06ee388daff1cfc389600025b489e33b8 /src/fontset.c | |
parent | f8ccce0306a6f34d9b41627ac8e5ceca16cdbafd (diff) | |
download | emacs-5b0891df61b20b9272ee304d3ed040babc3ba8e4.tar.gz |
* fontset.c (face_for_char): Check char in the current face font first
if HAVE_NS.
Fixes: debbugs:15138
Diffstat (limited to 'src/fontset.c')
-rw-r--r-- | src/fontset.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/fontset.c b/src/fontset.c index 0bf716bf1b2..a6277b050d5 100644 --- a/src/fontset.c +++ b/src/fontset.c @@ -944,6 +944,19 @@ face_for_char (struct frame *f, struct face *face, int c, int pos, Lisp_Object o if (ASCII_CHAR_P (c) || face->fontset < 0) return face->ascii_face->id; +#ifdef HAVE_NS + if (face->font) + { + /* Fonts often have characters in other scripts, like symbol, even if they + don't match script: symbol. So check if the character is present + in the current face first. Only enable for NS for now, but should + perhaps be general? */ + Lisp_Object font_object; + XSETFONT (font_object, face->font); + if (font_has_char (f, font_object, c)) return face->id; + } +#endif + eassert (fontset_id_valid_p (face->fontset)); fontset = FONTSET_FROM_ID (face->fontset); eassert (!BASE_FONTSET_P (fontset)); |