changeset 102956:b20a4659fd91

(xfont_has_char): The font has C if C is ASCII and the encoding charset is ascii_compatible.
author Kenichi Handa <handa@m17n.org>
date Tue, 14 Apr 2009 01:26:03 +0000
parents e59697cf4141
children b145ec03f378
files src/xfont.c
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/xfont.c	Tue Apr 14 01:24:52 2009 +0000
+++ b/src/xfont.c	Tue Apr 14 01:26:03 2009 +0000
@@ -798,10 +798,13 @@
      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));