From: Kenichi Handa Date: Tue, 14 Apr 2009 01:27:02 +0000 (+0000) Subject: (xfont_has_char): The font has C if C is ASCII and the X-Git-Tag: emacs-pretest-23.0.93~144 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d156542d902d20dafbc9d2b8d95492928996e49f;p=emacs.git (xfont_has_char): The font has C if C is ASCII and the encoding charset is ascii_compatible. --- diff --git a/src/ChangeLog b/src/ChangeLog index e518eaee1a5..ebbe9bab941 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,12 @@ +2009-04-14 Kenichi Handa + + * 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 * nsselect.m (symbol_to_nsstring, clean_local_selection_data) 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));