unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Ricardo Wurmus <rekado@elephly.net>
To: Guix-devel <guix-devel@gnu.org>
Subject: [PATCH] Add WenQuanYi ZenHei font.
Date: Wed, 11 Mar 2015 08:57:04 +0100	[thread overview]
Message-ID: <87ioe8j7an.fsf@mango.localdomain> (raw)

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: 0001-gnu-Add-WenQuanYi-ZenHei-font.patch --]
[-- Type: text/x-patch, Size: 2846 bytes --]

From caa906f41e25202ecc4546cb04a8b0b6c70e556a Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <rekado@elephly.net>
Date: Wed, 11 Mar 2015 08:55:57 +0100
Subject: [PATCH] gnu: Add WenQuanYi ZenHei font.

* gnu/packages/fonts.scm (font-wqy-zenhei): New variable.
---
 gnu/packages/fonts.scm | 47 +++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 47 insertions(+)

diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm
index 77abc2b..40b1722 100644
--- a/gnu/packages/fonts.scm
+++ b/gnu/packages/fonts.scm
@@ -359,3 +359,50 @@ fonts are intended to support the characters necessary to render or display
 text in Simplified Chinese, Traditional Chinese, Japanese, and Korean.
 ")
     (license license:asl2.0)))
+
+(define-public font-wqy-zenhei
+  (package
+    (name "font-wqy-zenhei")
+    (version "0.9.45")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "mirror://sourceforge/wqy/wqy-zenhei-"
+                    version ".tar.gz"))
+              (file-name (string-append "wqy-zenhei-" version ".tar.gz"))
+              (sha256
+               (base32
+                "1mkmxq8g2hjcglb3zajfqj20r4r88l78ymsp2xyl5yav8w3f7dz4"))))
+    (build-system trivial-build-system)
+    (arguments
+     `(#:modules ((guix build utils))
+       #:builder
+       (begin
+         (use-modules (guix build utils))
+         (let ((PATH (string-append (assoc-ref %build-inputs "tar")  "/bin:"
+                                    (assoc-ref %build-inputs "gzip") "/bin"))
+               (font-dir (string-append (assoc-ref %outputs "out")
+                                        "/share/fonts/wenquanyi/")))
+           (setenv "PATH" PATH)
+           (mkdir-p font-dir)
+           (system* "tar" "xvf" (assoc-ref %build-inputs "source"))
+           (chdir "wqy-zenhei")
+           (copy-file "wqy-zenhei.ttc"
+                      (string-append font-dir "wqy-zenhei.ttc"))))))
+    (native-inputs
+     `(("gzip" ,gzip)
+       ("tar" ,tar)))
+    (home-page "http://wenq.org/wqy2/")
+    (synopsis "CJK font")
+    (description
+     "WenQuanYi Zen Hei is a Hei-Ti style (sans-serif type) Chinese outline
+font.  It is designed for general purpose text formatting and on-screen
+display of Chinese characters and symbols from many other languages.
+WenQuanYi Zen Hei provides a rather complete coverage to Chinese Hanzi glyphs,
+including both simplified and traditional forms.  The total glyph number in
+this font is over 35,000, including over 21,000 Chinese Hanzi.  This font has
+full coverage to GBK(CP936) charset, CJK Unified Ideographs, as well as the
+code-points needed for zh_cn, zh_sg, zh_tw, zh_hk, zh_mo, ja (Japanese) and
+ko (Korean) locales for fontconfig.")
+    ;; GPLv2 with font embedding exception
+    (license license:gpl2)))
-- 
2.1.0

             reply	other threads:[~2015-03-11  7:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-11  7:57 Ricardo Wurmus [this message]
2015-03-11  9:48 ` [PATCH] Add WenQuanYi ZenHei font Ludovic Courtès
2015-03-11 10:34   ` Ricardo Wurmus
2015-03-12  9:25     ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ioe8j7an.fsf@mango.localdomain \
    --to=rekado@elephly.net \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).