Changeset 3045

Show
Ignore:
Timestamp:
03/08/03 14:41:43 (6 years ago)
Author:
himi
Message:

(w32-regist-font-encoder):
Add a new argument, byte.
(encode-koi8-font, encode-alternativnyj-font, encode-big5-font)
(encode-viscii-font, encode-ethio-font, encode-cp1251-font):
Suffice "byte" arguemnt properly.
(mw32-charset-windows-font-info-alist): Now the third item must be
a <encoding>. Fix all the members in it.
(mw32-windows-font-charset-database): Now set <encoder> as its slot.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • work/cvs2svn/lisp/international/mw32misc.el

    r3012 r3045  
    188188;;; 
    189189 
    190 (defun w32-regist-font-encoder (name real-encoder
     190(defun w32-regist-font-encoder (name real-encoder &optional byte
    191191  (cond ((get real-encoder 'ccl-program-idx) 
    192          (put name 'ccl-program real-encoder)) 
     192         (put name 'ccl-program real-encoder) 
     193         (put name 'font-unit-byte 
     194              (cond ((numberp byte) byte) 
     195                    ((null byte) nil) 
     196                    (t 
     197                     (error "BYTE:%S must be a number." byte))))) 
    193198        (t 
    194199         (error "Not yet supported encoder! %S" real-encoder)))) 
    195200 
    196201(w32-regist-font-encoder 
    197  'encode-koi8-font 'ccl-encode-koi8-font
     202 'encode-koi8-font 'ccl-encode-koi8-font 1
    198203(w32-regist-font-encoder 
    199  'encode-alternativnyj-font 'ccl-encode-alternativnyj-font
     204 'encode-alternativnyj-font 'ccl-encode-alternativnyj-font 1
    200205(w32-regist-font-encoder 
    201  'encode-big5-font 'ccl-encode-big5-font
     206 'encode-big5-font 'ccl-encode-big5-font 2
    202207(w32-regist-font-encoder 
    203  'encode-viscii-font 'ccl-encode-viscii-font
     208 'encode-viscii-font 'ccl-encode-viscii-font 1
    204209(w32-regist-font-encoder 
    205  'encode-ethio-font 'ccl-encode-ethio-font
     210 'encode-ethio-font 'ccl-encode-ethio-font 2
    206211 
    207212(define-ccl-program 
     
    220225 
    221226(w32-regist-font-encoder 
    222   'encode-cp1251-font 'ccl-encode-cp1251-font
     227  'encode-cp1251-font 'ccl-encode-cp1251-font 1
    223228 
    224229;;; 
     
    226231;;; 
    227232 
    228 ;; <charset> <LOGFONT-charset-num> <encoding-type> <option-alist> 
     233;; <charset> <LOGFONT-charset-num> <encoding> <option-alist> 
    229234;; option-alist-key : encoder dim relative-compose 
    230235 
    231236(defconst mw32-charset-windows-font-info-alist 
    232   '((ascii 0 0)                        ; ANSI_CHARSET 
    233     (latin-iso8859-1 0 1)              ; ANSI_CHARSET 
    234     (ascii-right-to-left 0 0)          ; ANSI_CHARSET 
    235     (latin-iso8859-2 238 1)            ; EASTEUROPE_CHARSET 
    236     (latin-iso8859-3 1 1)              ; DEFAULT_CHARSET 
    237     (latin-iso8859-4 1 1)              ; DEFAULT_CHARSET 
    238     (cyrillic-iso8859-5 204 0 
    239      ((encoder . encode-cp1251-font))) ; RUSSIAN_CHARSET(1251!=8859) 
    240     (arabic-iso8859-6 178 1)           ; ARABIC_CHARSET 
    241     (greek-iso8859-7 161 1)            ; GREEK_CHARSET 
    242     (hebrew-iso8859-8 177 1)           ; HEBREW_CHARSET 
    243     (latin-iso8859-9 162 1)            ; TURKISH_CHARSET 
    244     (latin-jisx0201 128 0)             ; SHIFTJIS_CHARSET 
    245     (katakana-jisx0201 128 4)          ; SHIFTJIS_CHARSET 
    246     (japanese-jisx0208 128 4)          ; SHIFTJIS_CHARSET 
    247     (japanese-jisx0212 1 0)            ; DEFAULT_CHARSET 
    248     (chinese-big5-1 136 0 
    249      ((encoder . encode-big5-font)))   ; CHINESEBIG5_CHARSET 
    250     (chinese-big5-2 136 0 
    251      ((encoder . encode-big5-font)))   ; CHINESEBIG5_CHARSET 
    252     (chinese-gb2312 134 1)             ; GB2312_CHARSET 
    253     (korean-ksc5601 129 1)             ; HANGEUL_CHARSET 
    254     (thai-tis620 222 1 
    255      ((relative-compose . -1)))        ; THAI_CHARSET 
    256     (vietnamese-viscii-lower 163 0 
    257      ((encoder . encode-viscii-font))) ; VIETNAMESE_CHARSET 
    258     (vietnamese-viscii-upper 163 0 
    259      ((encoder . encode-viscii-font))) ; VIETNAMESE_CHARSET 
    260 ;    (chinese-cns11643-1 1 0)           ; DEFAULT_CHARSET 
    261 ;    (chinese-cns11643-2 1 0)           ; DEFAULT_CHARSET 
    262 ;    (chinese-cns11643-3 1 0)           ; DEFAULT_CHARSET 
    263 ;    (chinese-cns11643-4 1 0)           ; DEFAULT_CHARSET 
    264 ;    (chinese-cns11643-5 1 0)           ; DEFAULT_CHARSET 
    265 ;    (chinese-cns11643-6 1 0)           ; DEFAULT_CHARSET 
    266 ;    (chinese-cns11643-7 1 0)           ; DEFAULT_CHARSET 
    267 ;    (arabic-digit 1 0)                 ; DEFAULT_CHARSET 
    268 ;    (arabic-1-column 1 0)              ; DEFAULT_CHARSET 
    269 ;    (arabic-2-column 1 0)              ; DEFAULT_CHARSET 
    270 ;    (lao 1 0)                          ; DEFAULT_CHARSET 
    271 ;    (ipa 1 0)                          ; DEFAULT_CHARSET 
    272 ;    (ethiopic 1 0)                     ; DEFAULT_CHARSET 
    273 ;    (indian-is13194 1 0)               ; DEFAULT_CHARSET 
    274 ;    (indian-2-column 1 0)              ; DEFAULT_CHARSET 
    275 ;    (indian-1-column 1 0)              ; DEFAULT_CHARSET 
     237  '((ascii 0 nil)                                 ; ANSI_CHARSET 
     238    (latin-iso8859-1 0 1-byte-set-msb)            ; ANSI_CHARSET 
     239    (ascii-right-to-left 0 nil)                   ; ANSI_CHARSET 
     240    (latin-iso8859-2 238 1-byte-set-msb)          ; EASTEUROPE_CHARSET 
     241    (latin-iso8859-3 1 1-byte-set-msb)            ; DEFAULT_CHARSET 
     242    (latin-iso8859-4 1 1-byte-set-msb)            ; DEFAULT_CHARSET 
     243    (cyrillic-iso8859-5 204 encode-cp1251-font)   ; RUSSIAN_CHARSET(1251!=8859) 
     244    (arabic-iso8859-6 178 1-byte-set-msb)         ; ARABIC_CHARSET 
     245    (greek-iso8859-7 161 1-byte-set-msb)          ; GREEK_CHARSET 
     246    (hebrew-iso8859-8 177 1-byte-set-msb)         ; HEBREW_CHARSET 
     247    (latin-iso8859-9 162 1-byte-set-msb)          ; TURKISH_CHARSET 
     248    (latin-jisx0201 128 nil)                      ; SHIFTJIS_CHARSET 
     249    (katakana-jisx0201 128 shift_jis)             ; SHIFTJIS_CHARSET 
     250    (japanese-jisx0208 128 shift_jis)             ; SHIFTJIS_CHARSET 
     251    (japanese-jisx0212 1 nil)                     ; DEFAULT_CHARSET 
     252    (chinese-big5-1 136 encode-big5-font)         ; CHINESEBIG5_CHARSET 
     253    (chinese-big5-2 136 encode-big5-font)         ; CHINESEBIG5_CHARSET 
     254    (chinese-gb2312 134 1-byte-set-msb)           ; GB2312_CHARSET 
     255    (korean-ksc5601 129 1-byte-set-msb)           ; HANGEUL_CHARSET 
     256    (thai-tis620 222 1-byte-set-msb 
     257     ((relative-compose . -1)))                   ; THAI_CHARSET 
     258    (vietnamese-viscii-lower 163 encode-viscii-font) ; VIETNAMESE_CHARSET 
     259    (vietnamese-viscii-upper 163 encode-viscii-font) ; VIETNAMESE_CHARSET 
     260;    (chinese-cns11643-1 1 nil)           ; DEFAULT_CHARSET 
     261;    (chinese-cns11643-2 1 nil)           ; DEFAULT_CHARSET 
     262;    (chinese-cns11643-3 1 nil)           ; DEFAULT_CHARSET 
     263;    (chinese-cns11643-4 1 nil)           ; DEFAULT_CHARSET 
     264;    (chinese-cns11643-5 1 nil)           ; DEFAULT_CHARSET 
     265;    (chinese-cns11643-6 1 nil)           ; DEFAULT_CHARSET 
     266;    (chinese-cns11643-7 1 nil)           ; DEFAULT_CHARSET 
     267;    (arabic-digit 1 nil)                 ; DEFAULT_CHARSET 
     268;    (arabic-1-column 1 nil)              ; DEFAULT_CHARSET 
     269;    (arabic-2-column 1 nil)              ; DEFAULT_CHARSET 
     270;    (lao 1 nil)                          ; DEFAULT_CHARSET 
     271;    (ipa 1 nil)                          ; DEFAULT_CHARSET 
     272;    (ethiopic 1 nil)                     ; DEFAULT_CHARSET 
     273;    (indian-is13194 1 nil)               ; DEFAULT_CHARSET 
     274;    (indian-2-column 1 nil)              ; DEFAULT_CHARSET 
     275;    (indian-1-column 1 nil)              ; DEFAULT_CHARSET 
    276276)) 
    277277 
     
    279279 
    280280(let ((slot mw32-charset-windows-font-info-alist) 
    281       elem charset cnum dim etype oa encoder
     281      elem cnum enc
    282282  (while (setq elem (car slot)) 
    283     (setq charset (car elem) 
    284           cnum (nth 1 elem) 
    285           etype (nth 2 elem) 
    286           oa (nth 3 elem) 
    287           encoder (cdr (assq 'encoder oa)) 
    288           dim (or (cdr (assq 'dim oa)) 
    289                   (charset-dimension charset)) 
     283    (setq cnum (nth 1 elem) 
     284          enc (nth 2 elem) 
    290285          slot (cdr slot)) 
    291     (aset mw32-windows-font-charset-database cnum 
    292           (vector dim etype encoder)))) 
     286    (aset mw32-windows-font-charset-database cnum enc))) 
    293287 
    294288