;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs; see the file COPYING. If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
;;; Commentary:
((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
name)
(if (not (string= "fontset" charset))
fontset
- (if (> (string-to-int size) 0)
+ (if (> (string-to-number size) 0)
(setq name (format "%s: %s-dot" nickname size))
(setq name nickname))
(cond ((string-match "^medium$" weight)
(error "Fontset \"%s\" not conforming to XLFD" name))
;; At first, extract pairs of charset and fontname from FONTSET-SPEC.
- (while (string-match "[, \t\n]*\\([^:]+\\):\\([^,]+\\)" fontset-spec idx)
+ (while (string-match "[, \t\n]*\\([^:]+\\):[ \t]*\\([^,]+\\)"
+ fontset-spec idx)
(setq idx (match-end 0))
(setq charset (intern (match-string 1 fontset-spec)))
(if (charsetp charset)