gnu: cook: Update source URL.
[jackhill/guix/guix.git] / gnu / packages / fonts.scm
index f7d5842..4bc4134 100644 (file)
@@ -1,11 +1,16 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2014 Joshua Grant <tadni@riseup.net>
 ;;; Copyright © 2014 Alex Kost <alezost@gmail.com>
 ;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
 ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
 ;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2015, 2016 Leo Famulari <leo@famulari.name>
+;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is>
+;;; Copyright © 2016 Jookia <166291@gmail.com>
+;;; Copyright © 2016 Eric Bavier <bavier@member.fsf.org>
+;;; Copyright © 2016 Dmitry Nikolaev <cameltheman@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -23,6 +28,7 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 (define-module (gnu packages fonts)
+  #:use-module (guix utils)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix build-system trivial)
   #:use-module (gnu packages base)
   #:use-module (gnu packages compression)
-  #:use-module (gnu packages zip)
+  #:use-module (gnu packages fontutils)
   #:use-module (gnu packages perl)
+  #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages python)
   #:use-module (gnu packages xorg)
-  #:use-module (gnu packages pkg-config))
+  #:use-module (gnu packages zip))
 
 (define-public font-inconsolata
   (package
@@ -66,14 +74,15 @@ in print.  With attention to detail for high resolution rendering.")
 (define-public font-ubuntu
   (package
     (name "font-ubuntu")
-    (version "0.80")
+    (version "0.83")
     (source (origin
               (method url-fetch)
-              (uri (string-append "http://font.ubuntu.com/download/ubuntu-font-family-"
-                                  version ".zip"))
+              (uri (string-append
+                    "http://font.ubuntu.com/download/ubuntu-font-family-"
+                    version ".zip"))
               (sha256
                (base32
-                "0k4f548riq23gmw4zhn30qqkcpaj4g2ab5rbc3lflfxwkc4p0w8h"))))
+                "0hjvq2x758dx0sfwqhzflns0ns035qm7h6ygskbx1svzg517sva5"))))
     (build-system trivial-build-system)
     (arguments
      `(#:modules ((guix build utils))
@@ -120,7 +129,7 @@ TrueType (TTF) files.")
     (version "2.34")
     (source (origin
              (method url-fetch)
-             (uri (string-append "mirror://sourceforge/dejavu/"
+             (uri (string-append "mirror://sourceforge/dejavu/dejavu/"
                                  version "/dejavu-fonts-ttf-"
                                  version ".tar.bz2"))
              (sha256
@@ -234,57 +243,75 @@ package provides the TrueType (TTF) files.")
      (license:x11-style
       "http://www.gnome.org/fonts/#Final_Bitstream_Vera_Fonts"))))
 
+(define-public font-cantarell
+  (package
+    (name "font-abattis-cantarell")
+    (version "0.0.24")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://gnome/sources/cantarell-fonts/"
+                                  (version-major+minor version)
+                                  "/cantarell-fonts-" version ".tar.xz"))
+              (sha256
+               (base32
+                "0r4jnc2x9yncf40lixjb1pqgpq8rzbi2fz33pshlqzjgx2d69bcw"))))
+    (build-system gnu-build-system)
+    (home-page "https://wiki.gnome.org/Projects/CantarellFonts")
+    (synopsis "Cantarell sans-serif typeface")
+    (description "The Cantarell font family is a contemporary Humanist
+sans-serif designed for on-screen reading.  It is used by GNOME@tie{}3.")
+    (license license:silofl1.1)))
+
 (define-public font-gnu-freefont-ttf
   (package
     (name "font-gnu-freefont-ttf")
-    (version "20100919")
+    (version "20120503")
     (source (origin
              (method url-fetch)
-             (uri (string-append "mirror://gnu/freefont/freefont-ttf-"
+             (uri (string-append "mirror://gnu/freefont/freefont-src-"
                                  version ".tar.gz"))
              (sha256
               (base32
-               "1q3h5jp1mbdkinkwxy0lfd0a1q7azlbagraydlzaa2ng82836wg4"))))
-    (build-system trivial-build-system)
+               "0yk58blhcd4hm7nyincmqq4jrzjjk82wif2zmk1l3y2m4vif4qhd"))))
+    (build-system gnu-build-system)
     (arguments
-     `(#:modules ((guix build utils))
-       #:builder (begin
-                   (use-modules (guix build utils)
-                                (srfi srfi-26))
-
-                   (let ((tar      (string-append (assoc-ref %build-inputs
-                                                             "tar")
-                                                  "/bin/tar"))
-                         (PATH     (string-append (assoc-ref %build-inputs
-                                                             "gzip")
-                                                  "/bin"))
-                         (font-dir (string-append %output
-                                                  "/share/fonts/truetype"))
-                         (doc-dir  (string-append %output "/share/doc/"
-                                                  ,name "-" ,version)))
-                     (setenv "PATH" PATH)
-                     (system* tar "xvf" (assoc-ref %build-inputs "source"))
-
-                     (mkdir-p font-dir)
-                     (mkdir-p doc-dir)
-                     (chdir (string-append "freefont-" ,version))
-                     (for-each (lambda (file)
-                                 (let ((dir (if (string-suffix? "ttf" file)
-                                                font-dir
-                                                doc-dir)))
+     `(#:phases (modify-phases %standard-phases
+                  (delete 'configure)
+                  (replace 'install
+                   (lambda _
+                     (let ((doc-dir  (string-append %output "/share/doc/"
+                                                    ,name "-" ,version))
+                           (font-dir (string-append %output
+                                                    "/share/fonts/truetype")))
+                       (mkdir-p doc-dir)
+                       (substitute* "Makefile"
+                         (("\\$\\(TMPDIR\\)") doc-dir)
+                         (("sfd/\\*.ttf") ""))
+                       (system* "make" "ttftar")
+                       (mkdir-p font-dir)
+                       (for-each (lambda (file)
                                    (copy-file file
-                                              (string-append dir "/" file))))
-                               (find-files "." ""))))))
-    (native-inputs `(("source" ,source)
-                     ("tar" ,tar)
-                     ("gzip" ,gzip)))
+                                              (string-append font-dir "/"
+                                                             (basename file))))
+                                 (filter
+                                   (lambda (file) (string-suffix? "ttf" file))
+                                   (find-files "." "")))))))
+       #:test-target "tests"))
+    ;; replace python 3 with python 2
+    ;; python 3 support commits aren't yet released in 20120503
+    ;; so freefont needs python 2 support in fontforge
+    (native-inputs `(("fontforge" ,(package (inherit fontforge)
+                                     (inputs `(("python-2" ,python-2)
+                                     ,@(package-inputs fontforge)))))))
     (home-page "http://www.gnu.org/software/freefont/")
     (synopsis "Unicode-encoded outline fonts")
     (description
      "The GNU Freefont project aims to provide a set of free outline
  (PostScript Type0, TrueType, OpenType...) fonts covering the ISO
 10646/Unicode UCS (Universal Character Set).")
-   (license license:gpl3+)))
+    (license license:gpl3+)
+    (properties '((upstream-name . "freefont")
+                  (ftp-directory . "/gnu/freefont")))))
 
 (define-public font-liberation
   (package
@@ -354,25 +381,25 @@ The Liberation Fonts are sponsored by Red Hat.")
 (define-public font-terminus
   (package
     (name "font-terminus")
-    (version "4.39")
+    (version "4.40")
     (source
       (origin
         (method url-fetch)
         (uri (string-append
-               "mirror://sourceforge/project/terminus-font/terminus-font-"
+               "mirror://sourceforge/terminus-font/terminus-font-"
                version
                "/terminus-font-"
                version
                ".tar.gz"))
         (sha256
-          (base32
-            "1gzmn7zakvy6yrvmswyjfklnsvqrjm0imhq8rjws8rdkhqwkh21i"))))
+         (base32
+          "0487cyx5h1f0crbny5sg73a22gmym5vk1i7646gy7hgiscj2rxb4"))))
     (build-system gnu-build-system)
     (native-inputs
      `(("pkg-config" ,pkg-config)
        ("perl" ,perl)
        ("bdftopcf" ,bdftopcf)
-       ("font-util"font-util)
+       ("font-util" ,font-util)
        ("mkfontdir" ,mkfontdir)))
     (arguments
      `(#:configure-flags (list
@@ -390,17 +417,17 @@ for long (8 and more hours per day) work with computers.")
 (define-public font-adobe-source-han-sans
   (package
     (name "font-adobe-source-han-sans")
-    (version "1.001R")
+    (version "1.004")
     (source (origin
               (method url-fetch)
               (uri (string-append
                     "https://github.com/adobe-fonts/source-han-sans/archive/"
-                    version ".tar.gz"))
-              (file-name (string-append "source-han-sans-" version ".tar.gz"))
+                    version "R.tar.gz"))
+              (file-name (string-append "source-han-sans-" version "R.tar.gz"))
               (sha256
                (base32
-                "0cwz3d8jancl0a7vbjxhnh1vgwsjba62lahfjya9yrjkp1ndxlap"))))
-    (outputs '("out"                 ; OpenType/CFF Collection (OTC), 119 MiB.
+                "1ssx0fw90sy6mj8fv8fv4dgzszpqwbmwpjnlx16g4pvaqzdmybbz"))))
+    (outputs '("out"                 ; OpenType/CFF Collection (OTC), 121 MiB.
                "cn" "jp" "kr" "tw")) ; Region-specific Subset OpenType/CFF.
     (build-system trivial-build-system)
     (arguments
@@ -421,12 +448,13 @@ for long (8 and more hours per day) work with computers.")
                                                    "/share/fonts/opentype")))))
            (setenv "PATH" PATH)
            (system* tar "xvf" (assoc-ref %build-inputs "source"))
-           (chdir (string-append "source-han-sans-" ,version))
+           (chdir (string-append "source-han-sans-" ,version "R"))
            (install-opentype-fonts "OTC" "out")
            (install-opentype-fonts "SubsetOTF/CN" "cn")
            (install-opentype-fonts "SubsetOTF/JP" "jp")
            (install-opentype-fonts "SubsetOTF/KR" "kr")
-           (install-opentype-fonts "SubsetOTF/TW" "tw")))))
+           (install-opentype-fonts "SubsetOTF/TW" "tw")
+           (for-each delete-file (find-files %output "\\.zip$"))))))
     (native-inputs
      `(("gzip" ,gzip)
        ("tar" ,tar)))
@@ -439,7 +467,7 @@ And in several OpenType/CFF-based deployment configurations to accommodate
 various system requirements or limitations.  As the name suggests, Pan-CJK
 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)))
+    (license license:silofl1.1)))
 
 (define-public font-wqy-zenhei
   (package
@@ -448,7 +476,8 @@ text in Simplified Chinese, Traditional Chinese, Japanese, and Korean.")
     (source (origin
               (method url-fetch)
               (uri (string-append
-                    "mirror://sourceforge/wqy/wqy-zenhei-"
+                    "mirror://sourceforge/wqy/wqy-zenhei/" version
+                    "%20%28Fighting-state%20RC1%29/wqy-zenhei-"
                     version ".tar.gz"))
               (file-name (string-append "wqy-zenhei-" version ".tar.gz"))
               (sha256
@@ -568,3 +597,271 @@ with coding in mind.  Anonymous Pro features an international, Unicode-based
 character set, with support for most Western and Central European Latin-based
 languages, plus Greek and Cyrillic.")
     (license license:silofl1.1)))
+
+(define-public font-gnu-unifont
+  (package
+    (name "font-gnu-unifont")
+    (version "9.0.01")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "mirror://gnu/unifont/unifont-" version "/unifont-"
+                    version ".tar.gz"))
+              (sha256
+               (base32
+                "14z4lx6asa94i73m19lsdgzqjn9xzi8320h3dafvzq9ima94pm9b"))))
+    (build-system gnu-build-system)
+    (outputs '("out" ; TrueType version
+               "pcf" ; PCF (bitmap) version
+               "psf" ; PSF (console) version
+               "bin" ; Utilities to manipulate '.hex' format
+               ))
+    (arguments
+     '(#:parallel-build? #f ; parallel build fails
+       #:tests? #f          ; no check target
+       #:phases
+       (modify-phases %standard-phases
+         (replace 'configure
+                  (lambda _
+                    (setenv "CC" "gcc")))
+         (replace
+          'install
+          (lambda* (#:key outputs #:allow-other-keys)
+            (let* ((ttf (string-append (assoc-ref outputs "out")
+                                       "/share/fonts/truetype"))
+                   (pcf (string-append (assoc-ref outputs "pcf")
+                                       "/share/fonts/misc"))
+                   (psf (string-append (assoc-ref outputs "psf")
+                                       "/share/consolefonts"))
+                   (bin (assoc-ref outputs "bin")))
+              (system* "make"
+                       (string-append "PREFIX=" bin)
+                       (string-append "TTFDEST=" ttf)
+                       (string-append "PCFDEST=" pcf)
+                       (string-append "CONSOLEDEST=" psf)
+                       "install")
+              ;; Move Texinfo file to the right place.
+              (mkdir (string-append bin "/share/info"))
+              (rename-file (string-append bin "/share/unifont/unifont.info.gz")
+                           (string-append bin "/share/info/unifont.info.gz"))
+              #t))))))
+    (inputs
+     `(("perl" ,perl))) ; for utilities
+    (synopsis
+     "Large bitmap font covering Unicode's Basic Multilingual Plane")
+    (description
+     "GNU Unifont is a bitmap font covering essentially all of
+Unicode's Basic Multilingual Plane.  The package also includes
+utilities to ease adding new glyphs to the font.")
+    (home-page "http://unifoundry.com/unifont.html")
+    (license license:gpl2+)))
+
+(define-public font-google-noto
+  (package
+    (name "font-google-noto")
+    (version "20150929")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://noto-website-2.storage.googleapis.com/"
+                                  "pkgs/Noto-hinted.zip"))
+              (sha256
+               (base32
+                "13jhpqzhsqhyby8n0ksqg155a3jyaif3nzj9anzbq8s2gn1xjyd9"))))
+    (build-system trivial-build-system)
+    (arguments
+     `(#:modules ((guix build utils))
+       #:builder (begin
+                   (use-modules (guix build utils)
+                                (srfi srfi-26))
+
+                   (let ((PATH     (string-append (assoc-ref %build-inputs
+                                                             "unzip")
+                                                  "/bin"))
+                         (font-dir (string-append %output
+                                                  "/share/fonts/truetype")))
+                     (setenv "PATH" PATH)
+                     (system* "unzip" (assoc-ref %build-inputs "source"))
+
+                     (mkdir-p font-dir)
+                     (for-each (lambda (ttf)
+                                 (copy-file ttf
+                                            (string-append font-dir "/" ttf)))
+                               (find-files "." "\\.ttf$"))
+                     (for-each (lambda (otf)
+                                 (copy-file otf
+                                            (string-append font-dir "/" otf)))
+                               (find-files "." "\\.otf$"))))))
+    (native-inputs `(("unzip" ,unzip)))
+    (home-page "https://www.google.com/get/noto/")
+    (synopsis "Fonts aimed to cover all languages")
+    (description "Googe Noto Fonts is a family of fonts aimed to support all
+languages with a consistent look and aesthetic.  It's goal is to have no Unicode
+symbols unable to be displayed properly.")
+    (license license:silofl1.1)))
+
+(define-public font-un
+  (package
+    (name "font-un")
+    (version "1.0.2-080608")
+    ;; The upstream server at kldp.net is serving us broken MIME.
+    ;; See <http://bugs.gnu.org/22908>.
+    (source (origin
+              (method url-fetch)
+              (uri (list
+                    (string-append
+                     "http://krosos.sdf.org/static/unix/"
+                     "un-fonts-core-" version ".tar.gz")
+                    ;; XXX: The upstream server at kldp.net
+                    (string-append
+                     "https://kldp.net/projects/unfonts/download/4695?filename="
+                     "un-fonts-core-" version ".tar.gz")))
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "13liaz2pmww3aqabm55la5npd08m1skh334ky7qfidxaz5s742iv"))))
+    (build-system trivial-build-system)
+    (arguments
+     `(#:modules ((guix build utils))
+       #:builder
+       (begin
+         (use-modules (guix build utils))
+
+         (let ((tar      (string-append (assoc-ref %build-inputs "tar")
+                                        "/bin/tar"))
+               (PATH     (string-append (assoc-ref %build-inputs "gzip")
+                                        "/bin"))
+               (font-dir (string-append %output "/share/fonts/truetype"))
+               (doc-dir  (string-append %output "/share/doc/" ,name)))
+           (setenv "PATH" PATH)
+           (system* tar "xvf" (assoc-ref %build-inputs "source"))
+           (mkdir-p font-dir)
+           (mkdir-p doc-dir)
+           (chdir (string-append "un-fonts"))
+           (for-each (lambda (ttf)
+                       (copy-file ttf
+                                  (string-append font-dir "/"
+                                                 (basename ttf))))
+                     (find-files "." "\\.ttf$"))
+           (for-each (lambda (doc)
+                       (copy-file doc
+                                  (string-append doc-dir "/"
+                                                 (basename doc))))
+                     '("COPYING" "README"))))))
+    (native-inputs
+     `(("tar" ,tar)
+       ("gzip" ,gzip)))
+    (home-page "https://kldp.net/projects/unfonts/")
+    (synopsis "Collection of Korean fonts")
+    (description
+     "Un-fonts is a family of mainly Korean fonts.
+It contains the following fonts and styles:
+
+@enumerate
+@item UnBatang, UnBatangBold: serif;
+@item UnDotum, UnDotumBold: sans-serif;
+@item UnGraphic, UnGraphicBold: sans-serif style;
+@item UnDinaru, UnDinaruBold, UnDinaruLight;
+@item UnPilgi, UnPilgiBold: script;
+@item UnGungseo: cursive, brush-stroke.
+@end enumerate\n")
+    (license license:gpl2+)))
+
+(define-public font-fantasque-sans
+  (package
+    (name "font-fantasque-sans")
+    (version "1.7.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://github.com/belluzj/fantasque-sans/"
+                           "archive/v" version ".tar.gz"))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32
+         "07fpy53k2x2nz5q61swkab6cfk9gw2kc4x4brsj6zjgbm16fap85"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("ttfautohint" ,ttfautohint)
+       ("woff-tools" ,woff-tools)
+       ("fontforge" ,fontforge)
+       ("woff2" ,woff2)
+       ("ttf2eot" ,ttf2eot)))
+    (arguments
+     `(#:tests? #f                 ;test target intended for visual inspection
+       #:phases (modify-phases %standard-phases
+                  (delete 'configure)   ;no configuration
+                  (replace 'install
+                    ;; 'make install' wants to install to ~/.fonts, install to
+                    ;; output instead.
+                    (lambda* (#:key outputs #:allow-other-keys)
+                      (let* ((out (assoc-ref outputs "out"))
+                             (font-dir (string-append out "/share/fonts"))
+                             (truetype-dir (string-append font-dir "/truetype"))
+                             (opentype-dir (string-append font-dir "/opentype"))
+                             (webfonts-dir (string-append font-dir "/webfonts")))
+                        (copy-recursively "OTF" opentype-dir)
+                        (for-each (lambda (f) (install-file f truetype-dir))
+                                  (find-files "." "\\.ttf$"))
+                        (copy-recursively "Webfonts" webfonts-dir)
+                        #t))))))
+    (synopsis "Font family with a monospaced variant for programmers")
+    (description
+     "Fantasque Sans Mono is a programming font designed with functionality in
+mind.  The font includes a bold version and a good italic version with new
+glyph designs, not just an added slant.")
+    (home-page "https://fontlibrary.org/en/font/fantasque-sans-mono")
+    (license license:silofl1.1)))
+
+(define-public font-hack
+  (package
+    (name "font-hack")
+    (version "2.020")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "https://github.com/chrissimpkins/Hack/releases/download/v"
+                    version "/Hack-v"
+                    (string-replace-substring version "." "_")
+                    "-ttf.zip"))
+              (sha256
+               (base32
+                "16kkmc3psckw1b7k07ccn1gi5ymhlg9djh43nqjzg065g6p6d184"))))
+    (build-system trivial-build-system)
+    (arguments
+     `(#:modules ((guix build utils))
+       #:builder (begin
+                   (use-modules (guix build utils)
+                                (srfi srfi-26))
+
+                   (let ((PATH     (string-append (assoc-ref %build-inputs
+                                                             "unzip")
+                                                  "/bin"))
+                         (font-dir (string-append %output
+                                                  "/share/fonts/truetype"))
+                         (doc-dir  (string-append %output "/share/doc/"
+                                                  ,name "-" ,version)))
+                     (setenv "PATH" PATH)
+                     (system* "unzip" (assoc-ref %build-inputs "source"))
+
+                     (mkdir-p font-dir)
+                     (mkdir-p doc-dir)
+                     (for-each (lambda (ttf)
+                                 (copy-file ttf
+                                            (string-append font-dir "/" ttf)))
+                               (find-files "." "\\.ttf$"))
+                     (for-each (lambda (doc)
+                                 (copy-file doc
+                                            (string-append doc-dir "/" doc)))
+                               (find-files "." "\\.txt$"))))))
+    (native-inputs
+     `(("source" ,source)
+       ("unzip" ,unzip)))
+    (home-page "https://sourcefoundry.org/hack/")
+    (synopsis "Typeface designed for sourcecode")
+    (description
+     "Hack is designed to be a workhorse typeface for code, it expands upon
+the Bitstream Vera & DejaVu projects, provides 1561 glyphs including
+powerline support.")
+    (license (license:x11-style
+              "https://github.com/chrissimpkins/Hack/blob/master/LICENSE.md"
+              "Hack Open Font License v2.0"))))