comparison lisp/mule/mule-x-init.el @ 410:de805c49cfc1 r21-2-35

Import from CVS: tag r21-2-35
author cvs
date Mon, 13 Aug 2007 11:19:21 +0200
parents 74fd4e045ea6
children 697ef44129c6
comparison
equal deleted inserted replaced
409:301b9ebbdf3b 410:de805c49cfc1
38 38
39 Traditionally, Asian characters have been displayed so that they 39 Traditionally, Asian characters have been displayed so that they
40 occupy exactly twice the screen space of ASCII (`halfwidth') 40 occupy exactly twice the screen space of ASCII (`halfwidth')
41 characters. On many systems, e.g. Sun CDE systems, this can only be 41 characters. On many systems, e.g. Sun CDE systems, this can only be
42 achieved by using a national variant roman font to display ASCII." 42 achieved by using a national variant roman font to display ASCII."
43 (let ((charset-font-width 43 (let* ((charset-font-width
44 (lambda (charset) 44 (lambda (charset)
45 (font-instance-width 45 (font-instance-width
46 (face-font-instance 'default (selected-device) charset)))) 46 (face-font-instance 'default (selected-device) charset))))
47 47
48 (twice-as-wide 48 (twice-as-wide
49 (lambda (cs1 cs2) 49 (lambda (cs1 cs2)
50 (let ((width1 (funcall charset-font-width cs1)) 50 (let ((width1 (funcall charset-font-width cs1))
51 (width2 (funcall charset-font-width cs2))) 51 (width2 (funcall charset-font-width cs2)))
52 (and width1 width2 (eq (+ width1 width1) width2)))))) 52 (and width1 width2 (eq (+ width1 width1) width2))))))
53 53
54 (when (eq 'x (device-type)) 54 (when (eq 'x (device-type))
55 (condition-case nil 55 (condition-case nil
56 (unless (funcall twice-as-wide 'ascii fullwidth-charset) 56 (unless (funcall twice-as-wide 'ascii fullwidth-charset)
57 (set-charset-registry 'ascii roman-registry) 57 (set-charset-registry 'ascii roman-registry)