1 ;;; install-ids.el --- installer of IDS files.
5 (setq load-ids-simplify nil)
7 (defun install-ids-read-file (file simplify soft)
11 (ids-read-file file simplify soft)
15 ;; (mount-char-attribute-table 'ideographic-products)
16 ;; (map-char-attribute
18 ;; (remove-char-attribute c 'ideographic-products)
20 ;; 'ideographic-products)
23 (install-ids-read-file "IDS-JIS-X0208-1990.txt" load-ids-simplify t)
25 (install-ids-read-file "IDS-UCS-Basic.txt" load-ids-simplify t)
27 (install-ids-read-file "IDS-UCS-Ext-A.txt" load-ids-simplify t)
31 (install-ids-read-file (format "IDS-UCS-Ext-B-%d.txt" i)
35 (install-ids-read-file "IDS-UCS-Ext-C.txt" load-ids-simplify t)
37 (install-ids-read-file "IDS-UCS-Ext-D.txt" load-ids-simplify t)
39 (install-ids-read-file "IDS-UCS-Ext-E.txt" load-ids-simplify t)
41 (install-ids-read-file "IDS-UCS-Ext-F.txt" load-ids-simplify t)
43 (install-ids-read-file "IDS-UCS-Ext-G.txt" load-ids-simplify t)
45 (install-ids-read-file "IDS-UCS-Compat.txt" load-ids-simplify t)
49 (install-ids-read-file (format "IDS-CNS-%d.txt" i)
55 (install-ids-read-file (format "IDS-Daikanwa-%02d.txt" i)
59 (install-ids-read-file "IDS-Daikanwa-dx.txt" load-ids-simplify t)
61 (install-ids-read-file "IDS-Daikanwa-ho.txt" load-ids-simplify t)
63 (install-ids-read-file "IDS-CBETA.txt" load-ids-simplify t)
65 (install-ids-read-file "IDS-CDP.txt" load-ids-simplify t)
68 ;; (install-ids-read-file (format "IDS-HZK%02d.txt" i)
69 ;; load-ids-simplify t)
72 (install-ids-read-file "IDS-SW-JIGUGE.txt" load-ids-simplify t)
74 (princ "Generating apparent-structure...")
75 (let* ((terminal-coding-system 'utf-8-mcs-er)
80 "character" chise-system-db-directory)))
82 (expand-file-name "ideographic-products" feature-dir))
85 (when (file-exists-p p-file)
86 (setq old-p-file (make-temp-name p-file))
87 (rename-file p-file old-p-file))
88 (ids-update-index 'in-memory)
92 (unless (equal (setq ret (ideographic-structure-compact v)) v)
93 (princ (format "Compact %04X (%c) : %s -> %s\n"
96 (ideographic-structure-to-ids v)
97 (ideographic-structure-to-ids ret)))
98 (put-char-attribute c 'ideographic-structure ret)
100 (unless (setq a-str (get-char-attribute c 'ideographic-structure@apparent))
101 (when (setq a-str (functional-ideographic-structure-to-apparent-structure v))
102 (put-char-attribute c 'ideographic-structure@apparent
103 (ideographic-structure-compact a-str))))
105 'ideographic-structure)
109 (unless (equal (setq ret (ideographic-structure-compact v)) v)
110 (princ (format "Compact %04X (%c) : [apparent] %s -> %s\n"
113 (ideographic-structure-to-ids v)
114 (ideographic-structure-to-ids ret)))
115 (put-char-attribute c 'ideographic-structure@apparent ret)
118 'ideographic-structure@apparent)
122 (unless (equal (setq ret (ideographic-structure-compact v)) v)
123 (princ (format "Compact %04X (%c) : %s -> %s\n"
126 (ideographic-structure-to-ids v)
127 (ideographic-structure-to-ids ret)))
128 (put-char-attribute c 'ideographic-structure ret)
131 'ideographic-structure)
134 (unless (equal (setq ret (ideographic-structure-compact v)) v)
135 (princ (format "Compact %04X (%c) : [apparent] %s -> %s\n"
138 (ideographic-structure-to-ids v)
139 (ideographic-structure-to-ids ret)))
140 (put-char-attribute c 'ideographic-structure@apparent ret)
143 'ideographic-structure@apparent)
146 (princ "Updating char-feature `ideographic-structure'...")
147 (save-char-attribute-table 'ideographic-structure)
148 (save-char-attribute-table 'ideographic-structure@apparent)
151 (princ "Updating char-feature `ideographic-products'...")
154 (delete-file old-p-file)))
157 ;;; install-ids.el ends hear