diff options
| author | Kenichi Handa | 2009-04-14 01:27:02 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2009-04-14 01:27:02 +0000 |
| commit | d156542d902d20dafbc9d2b8d95492928996e49f (patch) | |
| tree | 4889d38c56dc19c61b92b93a7512571aefad904c /src | |
| parent | 3620330b86997d2f1af1baac94e047dc2e12af2e (diff) | |
| download | emacs-d156542d902d20dafbc9d2b8d95492928996e49f.tar.gz emacs-d156542d902d20dafbc9d2b8d95492928996e49f.zip | |
(xfont_has_char): The font has C if C is ASCII and the
encoding charset is ascii_compatible.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 9 | ||||
| -rw-r--r-- | src/xfont.c | 5 |
2 files changed, 13 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index e518eaee1a5..ebbe9bab941 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,12 @@ | |||
| 1 | 2009-04-14 Kenichi Handa <handa@m17n.org> | ||
| 2 | |||
| 3 | * xfont.c (xfont_has_char): The font has C if C is ASCII and the | ||
| 4 | encoding charset is ascii_compatible. | ||
| 5 | |||
| 6 | * charset.c (Fdefine_charset_internal): Make charset | ||
| 7 | ascii-compatible if the method is CHARSET_METHOD_OFFSET, the | ||
| 8 | code_offset is 0, and covers all ASCII characters. | ||
| 9 | |||
| 1 | 2009-04-13 Stefan Monnier <monnier@iro.umontreal.ca> | 10 | 2009-04-13 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 11 | ||
| 3 | * nsselect.m (symbol_to_nsstring, clean_local_selection_data) | 12 | * 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) | |||
| 798 | int c; | 798 | int c; |
| 799 | { | 799 | { |
| 800 | Lisp_Object registry = AREF (entity, FONT_REGISTRY_INDEX); | 800 | Lisp_Object registry = AREF (entity, FONT_REGISTRY_INDEX); |
| 801 | struct charset *encoding; | ||
| 801 | struct charset *repertory; | 802 | struct charset *repertory; |
| 802 | 803 | ||
| 803 | if (font_registry_charsets (registry, NULL, &repertory) < 0) | 804 | if (font_registry_charsets (registry, &encoding, &repertory) < 0) |
| 804 | return -1; | 805 | return -1; |
| 806 | if (ASCII_CHAR_P (c) && encoding->ascii_compatible_p) | ||
| 807 | return 1; | ||
| 805 | if (! repertory) | 808 | if (! repertory) |
| 806 | return -1; | 809 | return -1; |
| 807 | return (ENCODE_CHAR (repertory, c) != CHARSET_INVALID_CODE (repertory)); | 810 | return (ENCODE_CHAR (repertory, c) != CHARSET_INVALID_CODE (repertory)); |