about summary refs log tree commit diff
path: root/pkgs/data/fonts/ttf-tw-moe
diff options
context:
space:
mode:
authorJiehong Ma <email@majiehong.com>2020-10-07 15:40:11 +0200
committerJiehong Ma <email@majiehong.com>2020-10-07 16:11:28 +0200
commit799e0f1a2a8fc56ebf83cab5d5fbf8140b6e7bf5 (patch)
treef43780e4414384bf33b077b82a7ffafa3b2d2e7b /pkgs/data/fonts/ttf-tw-moe
parent1426cabb5872cbe2862f3c79522f4117559bac0d (diff)
ttf-tw-moe: first version
Diffstat (limited to 'pkgs/data/fonts/ttf-tw-moe')
-rw-r--r--pkgs/data/fonts/ttf-tw-moe/default.nix27
1 files changed, 27 insertions, 0 deletions
diff --git a/pkgs/data/fonts/ttf-tw-moe/default.nix b/pkgs/data/fonts/ttf-tw-moe/default.nix
new file mode 100644
index 0000000000000..aeda5cd695d64
--- /dev/null
+++ b/pkgs/data/fonts/ttf-tw-moe/default.nix
@@ -0,0 +1,27 @@
+{ stdenv, fetchzip }:
+
+fetchzip {
+  name = "ttf-tw-moe";
+
+  url = "https://github.com/Jiehong/TW-fonts/archive/b30ae75e9dc299afd61e31cfd43f7a0a157dfb1f.zip";
+
+  postFetch = ''
+    mkdir -p $out/share/fonts
+    unzip -j $downloadedFile TW-fonts-b30ae75e9dc299afd61e31cfd43f7a0a157dfb1f/\*.ttf -d $out/share/fonts/truetype
+  '';
+
+  sha256 = "0khgxih9z6pqf7pdp21xjp24wb9ygsrdcmzpjb7vr9x8n78i1fbs";
+
+  meta = with stdenv.lib; {
+    homepage = "http://www.moe.gov.tw/";
+    description = "Set of KAI and SONG fonts from the Ministry of Education of Taiwan";
+    longDescription = ''
+      Installs 2 TTF fonts: MOESongUN and TW-MOE-Std-Kai.
+      Both are provided by the Ministry of Education of Taiwan; each character's shape
+      closely follows the official recommendation, and can be used as for teaching purposes.
+    '';
+    license = licenses.cc-by-nd-30;
+    maintainers = [ maintainers.jiehong ];
+    platforms = platforms.all;
+  };
+}