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.
This commit is contained in:
parent
0b733a24ac
commit
28035cb456
1 changed files with 12 additions and 0 deletions
|
@ -25,6 +25,7 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */
|
|||
#include "lisp.h"
|
||||
#include "xterm.h"
|
||||
#include "blockinput.h"
|
||||
#include "charset.h"
|
||||
#include "composite.h"
|
||||
#include "font.h"
|
||||
#include "ftfont.h"
|
||||
|
@ -308,6 +309,17 @@ ftcrfont_has_char (Lisp_Object font, int c)
|
|||
if (FONT_ENTITY_P (font))
|
||||
return ftfont_has_char (font, c);
|
||||
|
||||
struct charset *cs = NULL;
|
||||
|
||||
if (EQ (AREF (font, FONT_ADSTYLE_INDEX), Qja)
|
||||
&& charset_jisx0208 >= 0)
|
||||
cs = CHARSET_FROM_ID (charset_jisx0208);
|
||||
else if (EQ (AREF (font, FONT_ADSTYLE_INDEX), Qko)
|
||||
&& charset_ksc5601 >= 0)
|
||||
cs = CHARSET_FROM_ID (charset_ksc5601);
|
||||
if (cs)
|
||||
return (ENCODE_CHAR (cs, c) != CHARSET_INVALID_CODE (cs));
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue