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 (princ "Generating apparent-structure...")
73 (let* ((terminal-coding-system 'utf-8-mcs-er)
78 "character" chise-system-db-directory)))
80 (expand-file-name "ideographic-products" feature-dir))
83 (when (file-exists-p p-file)
84 (setq old-p-file (make-temp-name p-file))
85 (rename-file p-file old-p-file))
86 (ids-update-index 'in-memory)
90 (unless (equal (setq ret (ideographic-structure-compact v)) v)
91 (princ (format "Compact %04X (%c) : %s -> %s\n"
94 (ideographic-structure-to-ids v)
95 (ideographic-structure-to-ids ret)))
96 (put-char-attribute c 'ideographic-structure ret)
98 (unless (setq a-str (get-char-attribute c 'ideographic-structure@apparent))
99 (when (setq a-str (functional-ideographic-structure-to-apparent-structure v))
100 (put-char-attribute c 'ideographic-structure@apparent
101 (ideographic-structure-compact a-str))))
103 'ideographic-structure)
107 (unless (equal (setq ret (ideographic-structure-compact v)) v)
108 (princ (format "Compact %04X (%c) : [apparent] %s -> %s\n"
111 (ideographic-structure-to-ids v)
112 (ideographic-structure-to-ids ret)))
113 (put-char-attribute c 'ideographic-structure@apparent ret)
116 'ideographic-structure@apparent)
120 (unless (equal (setq ret (ideographic-structure-compact v)) v)
121 (princ (format "Compact %04X (%c) : %s -> %s\n"
124 (ideographic-structure-to-ids v)
125 (ideographic-structure-to-ids ret)))
126 (put-char-attribute c 'ideographic-structure ret)
129 'ideographic-structure)
132 (unless (equal (setq ret (ideographic-structure-compact v)) v)
133 (princ (format "Compact %04X (%c) : [apparent] %s -> %s\n"
136 (ideographic-structure-to-ids v)
137 (ideographic-structure-to-ids ret)))
138 (put-char-attribute c 'ideographic-structure@apparent ret)
141 'ideographic-structure@apparent)
144 (princ "Updating char-feature `ideographic-structure'...")
145 (save-char-attribute-table 'ideographic-structure)
146 (save-char-attribute-table 'ideographic-structure@apparent)
149 (princ "Updating char-feature `ideographic-products'...")
152 (delete-file old-p-file)))
155 ;;; install-ids.el ends hear