aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYAMAMOTO Mitsuharu2019-06-22 19:03:27 +0900
committerYAMAMOTO Mitsuharu2019-06-22 19:03:27 +0900
commit28035cb45633ddd7b689e5600532451a601c4c73 (patch)
treea6211c2e11a1cbf3b76c34bccce330a7dc7795bc
parent0b733a24ac200dc67221b34386fa1008677423d3 (diff)
downloademacs-28035cb45633ddd7b689e5600532451a601c4c73.tar.gz
emacs-28035cb45633ddd7b689e5600532451a601c4c73.zip
Make ftcr font backend driver more consistent with xft
* src/ftcrfont.c: Include charset.h. (ftcrfont_has_char): Import font adstyle related code from ftfont_has_char.
-rw-r--r--src/ftcrfont.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/ftcrfont.c b/src/ftcrfont.c
index 0cc40b4c944..f15e79334ac 100644
--- a/src/ftcrfont.c
+++ b/src/ftcrfont.c
@@ -25,6 +25,7 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */
25#include "lisp.h" 25#include "lisp.h"
26#include "xterm.h" 26#include "xterm.h"
27#include "blockinput.h" 27#include "blockinput.h"
28#include "charset.h"
28#include "composite.h" 29#include "composite.h"
29#include "font.h" 30#include "font.h"
30#include "ftfont.h" 31#include "ftfont.h"
@@ -308,6 +309,17 @@ ftcrfont_has_char (Lisp_Object font, int c)
308 if (FONT_ENTITY_P (font)) 309 if (FONT_ENTITY_P (font))
309 return ftfont_has_char (font, c); 310 return ftfont_has_char (font, c);
310 311
312 struct charset *cs = NULL;
313
314 if (EQ (AREF (font, FONT_ADSTYLE_INDEX), Qja)
315 && charset_jisx0208 >= 0)
316 cs = CHARSET_FROM_ID (charset_jisx0208);
317 else if (EQ (AREF (font, FONT_ADSTYLE_INDEX), Qko)
318 && charset_ksc5601 >= 0)
319 cs = CHARSET_FROM_ID (charset_ksc5601);
320 if (cs)
321 return (ENCODE_CHAR (cs, c) != CHARSET_INVALID_CODE (cs));
322
311 return -1; 323 return -1;
312} 324}
313 325