summaryrefslogtreecommitdiff
path: root/src/xfont.c
diff options
context:
space:
mode:
authorKenichi Handa <handa@m17n.org>2009-04-14 01:27:02 +0000
committerKenichi Handa <handa@m17n.org>2009-04-14 01:27:02 +0000
commitd156542d902d20dafbc9d2b8d95492928996e49f (patch)
tree4889d38c56dc19c61b92b93a7512571aefad904c /src/xfont.c
parent3620330b86997d2f1af1baac94e047dc2e12af2e (diff)
downloademacs-d156542d902d20dafbc9d2b8d95492928996e49f.tar.gz
(xfont_has_char): The font has C if C is ASCII and the
encoding charset is ascii_compatible.
Diffstat (limited to 'src/xfont.c')
-rw-r--r--src/xfont.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/xfont.c b/src/xfont.c
index 6a9a46ec35e..bae63ac8555 100644
--- a/src/xfont.c
+++ b/src/xfont.c
@@ -798,10 +798,13 @@ xfont_has_char (entity, c)
int c;
{
Lisp_Object registry = AREF (entity, FONT_REGISTRY_INDEX);
+ struct charset *encoding;
struct charset *repertory;
- if (font_registry_charsets (registry, NULL, &repertory) < 0)
+ if (font_registry_charsets (registry, &encoding, &repertory) < 0)
return -1;
+ if (ASCII_CHAR_P (c) && encoding->ascii_compatible_p)
+ return 1;
if (! repertory)
return -1;
return (ENCODE_CHAR (repertory, c) != CHARSET_INVALID_CODE (repertory));