Subject: [PATCH 2/2] gnu: Add font-cns11643-swjz
From: Brendan Tildesley <[email-masked]>
To: [email-masked]
Date: Sat, 29 Apr 2017 05:21:49 +1000
List-Id: <debbugs-submit.debbugs.gnu.org>

From b8a18430e4ddebab4fdf901c1c1eaee649e5a852 Mon Sep 17 00:00:00 2001
From: Brendan Tildesley <[email-masked]>
Date: Sat, 29 Apr 2017 05:17:58 +1000
Subject: [PATCH 2/2] gnu: Add font-cns11643-swjz

* gnu/packages/fonts.scm (font-cns11643-swjz): New variable.
---
 gnu/packages/fonts.scm | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm
index 2eb176bf6..17f6442ec 100644
--- a/gnu/packages/fonts.scm
+++ b/gnu/packages/fonts.scm
@@ -577,6 +577,41 @@ encoded in the user defined area of the Big-5 code.
     (license (license:non-copyleft
               "http://data.gov.tw/license"))))
 
+(define-public font-cns11643-swjz
+  (package
+    (name "font-cns11643-swjz")
+    (version "1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri "https://www.moedict.tw/fonts/truetype/cns11643/ebas927.ttf")
+       (sha256
+        (base32
+         "1qkljldbmb53zp1rcmpsb8rzy67rnsqcjxi549m9743ifk4isl78"))))
+    (build-system trivial-build-system)
+    (arguments
+     `(#:modules ((guix build utils))
+       #:builder
+       (begin
+         (use-modules (guix build utils))
+         (let ((font-dir (string-append %output
+                                        "/share/fonts/truetype/cns11643"))
+               (source (assoc-ref %build-inputs "source")))
+           (mkdir-p font-dir)
+           (copy-file source
+                      (string-append font-dir "/" "ebas927.ttf"))))))
+    (home-page
+     (string-append "http://www.cns11643.gov.tw/AIDB/download.do"
+                    "?name=%E5%AD%97%E5%9E%8B%E4%B8%8B%E8%BC%89"))
+    (synopsis "TrueType seal script font")
+    (description
+     "@code{Shuowen Jiezi} is a TrueType seal script font based on the ancient
+text of the same name published by the Executive Yuan of Taiwan. 6721 glyphs
+are included, at Unicode compatible code points corresponding to their modern
+variants.")
+    (license (license:non-copyleft
+              "http://www.cns11643.gov.tw/AIDB/copyright.do"))))
+
 (define-public font-wqy-zenhei
   (package
     (name "font-wqy-zenhei")
-- 
2.12.2