diff options
| author | Jan Djärv | 2013-09-01 11:59:19 +0200 |
|---|---|---|
| committer | Jan Djärv | 2013-09-01 11:59:19 +0200 |
| commit | 5b0891df61b20b9272ee304d3ed040babc3ba8e4 (patch) | |
| tree | 9d6616a06ee388daff1cfc389600025b489e33b8 /src | |
| parent | f8ccce0306a6f34d9b41627ac8e5ceca16cdbafd (diff) | |
| download | emacs-5b0891df61b20b9272ee304d3ed040babc3ba8e4.tar.gz emacs-5b0891df61b20b9272ee304d3ed040babc3ba8e4.zip | |
* fontset.c (face_for_char): Check char in the current face font first
if HAVE_NS.
Fixes: debbugs:15138
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/fontset.c | 13 |
2 files changed, 18 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index b46ba5ba392..7c09394cbf8 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2013-09-01 Jan Djärv <jan.h.d@swipnet.se> | ||
| 2 | |||
| 3 | * fontset.c (face_for_char): Check char in the current face font first | ||
| 4 | if HAVE_NS (Bug#15138). | ||
| 5 | |||
| 1 | 2013-08-31 Martin Rudalics <rudalics@gmx.at> | 6 | 2013-08-31 Martin Rudalics <rudalics@gmx.at> |
| 2 | 7 | ||
| 3 | * window.c (temp_output_buffer_show): Make sure window returned | 8 | * window.c (temp_output_buffer_show): Make sure window returned |
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 | |||
| 944 | if (ASCII_CHAR_P (c) || face->fontset < 0) | 944 | if (ASCII_CHAR_P (c) || face->fontset < 0) |
| 945 | return face->ascii_face->id; | 945 | return face->ascii_face->id; |
| 946 | 946 | ||
| 947 | #ifdef HAVE_NS | ||
| 948 | if (face->font) | ||
| 949 | { | ||
| 950 | /* Fonts often have characters in other scripts, like symbol, even if they | ||
| 951 | don't match script: symbol. So check if the character is present | ||
| 952 | in the current face first. Only enable for NS for now, but should | ||
| 953 | perhaps be general? */ | ||
| 954 | Lisp_Object font_object; | ||
| 955 | XSETFONT (font_object, face->font); | ||
| 956 | if (font_has_char (f, font_object, c)) return face->id; | ||
| 957 | } | ||
| 958 | #endif | ||
| 959 | |||
| 947 | eassert (fontset_id_valid_p (face->fontset)); | 960 | eassert (fontset_id_valid_p (face->fontset)); |
| 948 | fontset = FONTSET_FROM_ID (face->fontset); | 961 | fontset = FONTSET_FROM_ID (face->fontset); |
| 949 | eassert (!BASE_FONTSET_P (fontset)); | 962 | eassert (!BASE_FONTSET_P (fontset)); |