(ideographic-structure-compare-functional-and-apparent): Implement
authorMORIOKA Tomohiko <tomo.git@chise.org>
Tue, 6 Oct 2020 07:28:53 +0000 (16:28 +0900)
committerMORIOKA Tomohiko <tomo.git@chise.org>
Tue, 6 Oct 2020 07:28:53 +0000 (16:28 +0900)
rule-710: ⿷⿺NAC -> ⿺N⿱AC.

ids-find.el

index 32bffc7..082299f 100644 (file)
@@ -1766,6 +1766,37 @@ COMPONENT can be a character or char-spec."
            )
          )))
       )
+     ((eq (car structure) ?⿷)
+      (setq enc (nth 1 structure))
+      (when (setq enc-str
+                 (cond ((characterp enc)
+                        (get-char-attribute enc 'ideographic-structure)
+                        )
+                       ((consp enc)
+                        (cdr (assq 'ideographic-structure enc))
+                        )))
+       (cond
+        ((eq (car enc-str) ?⿺)
+         (unless conversion-only
+           (setq f-res (ids-find-chars-including-ids enc-str)))
+         (setq new-str (list ?⿱
+                             (nth 2 enc-str)
+                             (nth 2 structure)))
+         (setq new-str-c
+               (if (setq ret (ideographic-structure-find-chars new-str))
+                   (car ret)
+                 (list (cons 'ideographic-structure new-str))))
+         (if conversion-only
+             (list ?⿺ (nth 1 enc-str) new-str-c)
+           (setq a-res (ids-find-chars-including-ids new-str))
+           (list enc
+                 f-res
+                 new-str-c
+                 a-res
+                 (list ?⿺ (nth 1 enc-str) new-str-c)
+                 710))
+         )))
+      )
      ((eq (car structure) ?⿻)
       (setq enc (nth 1 structure))
       (when (setq enc-str