aboutsummaryrefslogtreecommitdiffstats
path: root/src/fontset.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fontset.c')
-rw-r--r--src/fontset.c26
1 files changed, 16 insertions, 10 deletions
diff --git a/src/fontset.c b/src/fontset.c
index 0bf716bf1b2..797d51ac0a7 100644
--- a/src/fontset.c
+++ b/src/fontset.c
@@ -39,17 +39,10 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
39#include "intervals.h" 39#include "intervals.h"
40#include "fontset.h" 40#include "fontset.h"
41#include "window.h" 41#include "window.h"
42#ifdef HAVE_X_WINDOWS 42#ifdef HAVE_WINDOW_SYSTEM
43#include "xterm.h" 43#include TERM_HEADER
44#endif 44#endif /* HAVE_WINDOW_SYSTEM */
45#ifdef HAVE_NTGUI
46#include "w32term.h"
47#endif
48#ifdef HAVE_NS
49#include "nsterm.h"
50#endif
51#include "termhooks.h" 45#include "termhooks.h"
52
53#include "font.h" 46#include "font.h"
54 47
55/* FONTSET 48/* FONTSET
@@ -944,6 +937,19 @@ face_for_char (struct frame *f, struct face *face, int c, int pos, Lisp_Object o
944 if (ASCII_CHAR_P (c) || face->fontset < 0) 937 if (ASCII_CHAR_P (c) || face->fontset < 0)
945 return face->ascii_face->id; 938 return face->ascii_face->id;
946 939
940#ifdef HAVE_NS
941 if (face->font)
942 {
943 /* Fonts often have characters in other scripts, like symbol, even if they
944 don't match script: symbol. So check if the character is present
945 in the current face first. Only enable for NS for now, but should
946 perhaps be general? */
947 Lisp_Object font_object;
948 XSETFONT (font_object, face->font);
949 if (font_has_char (f, font_object, c)) return face->id;
950 }
951#endif
952
947 eassert (fontset_id_valid_p (face->fontset)); 953 eassert (fontset_id_valid_p (face->fontset));
948 fontset = FONTSET_FROM_ID (face->fontset); 954 fontset = FONTSET_FROM_ID (face->fontset);
949 eassert (!BASE_FONTSET_P (fontset)); 955 eassert (!BASE_FONTSET_P (fontset));