]> git.eshelyaron.com Git - emacs.git/commitdiff
(xfont_has_char): The font has C if C is ASCII and the
authorKenichi Handa <handa@m17n.org>
Tue, 14 Apr 2009 01:27:02 +0000 (01:27 +0000)
committerKenichi Handa <handa@m17n.org>
Tue, 14 Apr 2009 01:27:02 +0000 (01:27 +0000)
encoding charset is ascii_compatible.

src/ChangeLog
src/xfont.c

index e518eaee1a5ef509e88ed7aafd790911a1ec79f9..ebbe9bab941bebd336d1b2d5bd8197d544e8200c 100644 (file)
@@ -1,3 +1,12 @@
+2009-04-14  Kenichi Handa  <handa@m17n.org>
+
+       * xfont.c (xfont_has_char): The font has C if C is ASCII and the
+       encoding charset is ascii_compatible.
+
+       * charset.c (Fdefine_charset_internal): Make charset
+       ascii-compatible if the method is CHARSET_METHOD_OFFSET, the
+       code_offset is 0, and covers all ASCII characters.
+
 2009-04-13  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * nsselect.m (symbol_to_nsstring, clean_local_selection_data)
index 6a9a46ec35ef78c2ddf2ae23bcc3d30af4e4cbd3..bae63ac855550051d10ae1cfccc07de58cf3eeb7 100644 (file)
@@ -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));