(chise-wiki-daijiten-bitmap-glyphs-url): New variable.
authorMORIOKA Tomohiko <tomo.git@chise.org>
Sun, 24 Mar 2019 14:40:01 +0000 (23:40 +0900)
committerMORIOKA Tomohiko <tomo.git@chise.org>
Sun, 24 Mar 2019 14:40:01 +0000 (23:40 +0900)
(est-coded-charset-priority-list): Add `==>daijiten'.
(www-format-encode-string): Add settings for `==daijiten', `=daijiten'
and `==>daijiten'; add code to display Daijiten characters.

cwiki-common.el

index f1eead3..28a7a9e 100644 (file)
@@ -72,6 +72,9 @@
 (defvar chise-wiki-hng-bitmap-glyphs-url
   "http://hng.chise.org/glyphs/HNG")
 
+(defvar chise-wiki-daijiten-bitmap-glyphs-url
+  "http://hng.chise.org/glyphs/daijiten")
+
 (defvar chise-wiki-glyph-cgi-url
   "http://www.chise.org/chisewiki/glyph.cgi")
 
     =ucs@unicode
     ==ucs@unicode
     ===ucs@unicode
+    ==>daijiten
     ==>ucs@bucs
     ===daikanwa/+p
     ===gt
                '(==hanyo-denshi/ip "g2-HD-IP-" 4 X)
                '(==hanyo-denshi/jt "g2-HD-JT-" 4 X)
                '(==hanyo-denshi/ks "g2-HD-KS-" 6 d)
+               '(==daijiten          "g2-DJT-" 5 d)
                '(=cns11643-1           "C1-" 4 X)
                '(=cns11643-2           "C2-" 4 X)
                '(=cns11643-3           "C3-" 4 X)
                '(=jis-x0208@1983       "J83-" 4 X)
                '(=ruimoku-v6           "RUI6-" 4 X)
                '(=zinbun-oracle        "ZOB-" 4 d)
+               '(=daijiten             "DJT-" 5 d)
                '(=jef-china3           "JC3-" 4 X)
                '(=ucs@unicode          "UU+" 4 X)
                '(=ucs@JP/hanazono  "hanaJU+" 4 X)
                '(=hanziku-10        "HZK10-" 4 X)
                '(=hanziku-11        "HZK11-" 4 X)
                '(=hanziku-12        "HZK12-" 4 X)
+               '(==>daijiten       "A2-DJT-" 5 d)
                '(==cbeta               "CB" 5 d)
                '(=big5                  "B-" 4 X)
                '(=daikanwa              "M-" 5 d)
@@ -1027,6 +1034,18 @@ style=\"vertical-align:middle\">"
             t 'literal))
 
          (goto-char (point-min))
+         (while (re-search-forward "&\\(A2-\\|g2-\\|R-\\)?DJT-\\([0-9]+\\);" nil t)
+           (setq code (string-to-int (match-string 2)))
+           (replace-match
+            (format "<img alt=\"DJT-%05d\" src=\"%s/%05d.png\"
+style=\"vertical-align:middle; width: auto; max-height: 60px\">"
+                    code
+                    chise-wiki-daijiten-bitmap-glyphs-url
+                    code
+                    www-format-char-img-style)
+            t 'literal))
+
+         (goto-char (point-min))
          (while (re-search-forward "&SW-JIGUGE\\([45]?\\)-\\([0-9]+\\);" nil t)
            (setq subcode (match-string 1)
                  code (string-to-int (match-string 2)))