From f086544bb146c7e6f6e347d9562a0e882d6f2f3b Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Thu, 13 Oct 2005 02:25:34 +0000 Subject: [PATCH] (ccl-encode-unicode-font): Lookup utf-subst-table-for-encode, not ucs-mule-cjk-to-unicode. Handle the case that ucs-mule-to-mule-unicode translates a character to ASCII (usually for IPA characters). --- lisp/ChangeLog | 7 +++++ lisp/international/fontset.el | 55 ++++++++++++++++++----------------- 2 files changed, 36 insertions(+), 26 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 3a2931dafb0..1a76bf76bf0 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2005-10-13 Kenichi Handa + + * international/fontset.el (ccl-encode-unicode-font): Lookup + utf-subst-table-for-encode, not ucs-mule-cjk-to-unicode. Handle + the case that ucs-mule-to-mule-unicode translates a character to + ASCII (usually for IPA characters). + 2005-10-12 Bill Wohler * makefile.w32-in (MH-E-SRC): New. Used by mh-autoloads. diff --git a/lisp/international/fontset.el b/lisp/international/fontset.el index c441b72166c..1e5c9508f4e 100644 --- a/lisp/international/fontset.el +++ b/lisp/international/fontset.el @@ -173,39 +173,42 @@ ((if (r2 >= 0) ;; This is a 2D charset. (r1 = ((r1 << 7) | r2))) - (lookup-character ucs-mule-cjk-to-unicode r0 r1) + (lookup-character utf-subst-table-for-encode r0 r1) (if r7 ;; We got it! ((r1 = (r0 >> 8)) (r2 = (r0 & #xFF))) ;; Look for a translation for non-ASCII chars. ((translate-character ucs-mule-to-mule-unicode r0 r1) - (if (r0 == ,(charset-id 'latin-iso8859-1)) - ((r2 = (r1 + 128)) + (if (r0 == ,(charset-id 'ascii)) + ((r2 = r1) (r1 = 0)) - ((r2 = (r1 & #x7F)) - (r1 >>= 7) - (if (r0 == ,(charset-id 'mule-unicode-0100-24ff)) - ((r1 *= 96) - (r1 += r2) - (r1 += ,(- #x100 (* 32 96) 32)) - (r1 >8= 0) - (r2 = r7)) - (if (r0 == ,(charset-id 'mule-unicode-2500-33ff)) - ((r1 *= 96) - (r1 += r2) - (r1 += ,(- #x2500 (* 32 96) 32)) - (r1 >8= 0) - (r2 = r7)) - (if (r0 == ,(charset-id 'mule-unicode-e000-ffff)) - ((r1 *= 96) - (r1 += r2) - (r1 += ,(- #xe000 (* 32 96) 32)) - (r1 >8= 0) - (r2 = r7)) - ;; No way, use the glyph for U+FFFD. - ((r1 = #xFF) - (r2 = #xFD))))))))))))) + ((if (r0 == ,(charset-id 'latin-iso8859-1)) + ((r2 = (r1 + 128)) + (r1 = 0)) + ((r2 = (r1 & #x7F)) + (r1 >>= 7) + (if (r0 == ,(charset-id 'mule-unicode-0100-24ff)) + ((r1 *= 96) + (r1 += r2) + (r1 += ,(- #x100 (* 32 96) 32)) + (r1 >8= 0) + (r2 = r7)) + (if (r0 == ,(charset-id 'mule-unicode-2500-33ff)) + ((r1 *= 96) + (r1 += r2) + (r1 += ,(- #x2500 (* 32 96) 32)) + (r1 >8= 0) + (r2 = r7)) + (if (r0 == ,(charset-id 'mule-unicode-e000-ffff)) + ((r1 *= 96) + (r1 += r2) + (r1 += ,(- #xe000 (* 32 96) 32)) + (r1 >8= 0) + (r2 = r7)) + ;; No way, use the glyph for U+FFFD. + ((r1 = #xFF) + (r2 = #xFD))))))))))))))) "Encode characters for display with iso10646 font. Translate through the translation-hash-table named `ucs-mule-cjk-to-unicode' and the translation-table named -- 2.39.5