aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenichi Handa2005-10-13 02:25:34 +0000
committerKenichi Handa2005-10-13 02:25:34 +0000
commitf086544bb146c7e6f6e347d9562a0e882d6f2f3b (patch)
tree888a21f4f0cd863db7f5c017c1408c421834bc4c
parentba2b267309bc09e19eb86bda2032fbc6ca9ac2bb (diff)
downloademacs-f086544bb146c7e6f6e347d9562a0e882d6f2f3b.tar.gz
emacs-f086544bb146c7e6f6e347d9562a0e882d6f2f3b.zip
(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).
-rw-r--r--lisp/ChangeLog7
-rw-r--r--lisp/international/fontset.el55
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 @@
12005-10-13 Kenichi Handa <handa@m17n.org>
2
3 * international/fontset.el (ccl-encode-unicode-font): Lookup
4 utf-subst-table-for-encode, not ucs-mule-cjk-to-unicode. Handle
5 the case that ucs-mule-to-mule-unicode translates a character to
6 ASCII (usually for IPA characters).
7
12005-10-12 Bill Wohler <wohler@newt.com> 82005-10-12 Bill Wohler <wohler@newt.com>
2 9
3 * makefile.w32-in (MH-E-SRC): New. Used by mh-autoloads. 10 * 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 @@
173 ((if (r2 >= 0) 173 ((if (r2 >= 0)
174 ;; This is a 2D charset. 174 ;; This is a 2D charset.
175 (r1 = ((r1 << 7) | r2))) 175 (r1 = ((r1 << 7) | r2)))
176 (lookup-character ucs-mule-cjk-to-unicode r0 r1) 176 (lookup-character utf-subst-table-for-encode r0 r1)
177 (if r7 177 (if r7
178 ;; We got it! 178 ;; We got it!
179 ((r1 = (r0 >> 8)) 179 ((r1 = (r0 >> 8))
180 (r2 = (r0 & #xFF))) 180 (r2 = (r0 & #xFF)))
181 ;; Look for a translation for non-ASCII chars. 181 ;; Look for a translation for non-ASCII chars.
182 ((translate-character ucs-mule-to-mule-unicode r0 r1) 182 ((translate-character ucs-mule-to-mule-unicode r0 r1)
183 (if (r0 == ,(charset-id 'latin-iso8859-1)) 183 (if (r0 == ,(charset-id 'ascii))
184 ((r2 = (r1 + 128)) 184 ((r2 = r1)
185 (r1 = 0)) 185 (r1 = 0))
186 ((r2 = (r1 & #x7F)) 186 ((if (r0 == ,(charset-id 'latin-iso8859-1))
187 (r1 >>= 7) 187 ((r2 = (r1 + 128))
188 (if (r0 == ,(charset-id 'mule-unicode-0100-24ff)) 188 (r1 = 0))
189 ((r1 *= 96) 189 ((r2 = (r1 & #x7F))
190 (r1 += r2) 190 (r1 >>= 7)
191 (r1 += ,(- #x100 (* 32 96) 32)) 191 (if (r0 == ,(charset-id 'mule-unicode-0100-24ff))
192 (r1 >8= 0) 192 ((r1 *= 96)
193 (r2 = r7)) 193 (r1 += r2)
194 (if (r0 == ,(charset-id 'mule-unicode-2500-33ff)) 194 (r1 += ,(- #x100 (* 32 96) 32))
195 ((r1 *= 96) 195 (r1 >8= 0)
196 (r1 += r2) 196 (r2 = r7))
197 (r1 += ,(- #x2500 (* 32 96) 32)) 197 (if (r0 == ,(charset-id 'mule-unicode-2500-33ff))
198 (r1 >8= 0) 198 ((r1 *= 96)
199 (r2 = r7)) 199 (r1 += r2)
200 (if (r0 == ,(charset-id 'mule-unicode-e000-ffff)) 200 (r1 += ,(- #x2500 (* 32 96) 32))
201 ((r1 *= 96) 201 (r1 >8= 0)
202 (r1 += r2) 202 (r2 = r7))
203 (r1 += ,(- #xe000 (* 32 96) 32)) 203 (if (r0 == ,(charset-id 'mule-unicode-e000-ffff))
204 (r1 >8= 0) 204 ((r1 *= 96)
205 (r2 = r7)) 205 (r1 += r2)
206 ;; No way, use the glyph for U+FFFD. 206 (r1 += ,(- #xe000 (* 32 96) 32))
207 ((r1 = #xFF) 207 (r1 >8= 0)
208 (r2 = #xFD))))))))))))) 208 (r2 = r7))
209 ;; No way, use the glyph for U+FFFD.
210 ((r1 = #xFF)
211 (r2 = #xFD)))))))))))))))
209 "Encode characters for display with iso10646 font. 212 "Encode characters for display with iso10646 font.
210Translate through the translation-hash-table named 213Translate through the translation-hash-table named
211`ucs-mule-cjk-to-unicode' and the translation-table named 214`ucs-mule-cjk-to-unicode' and the translation-table named