1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
5 ;;; This file is part of GNU Guix.
7 ;;; GNU Guix is free software; you can redistribute it and/or modify it
8 ;;; under the terms of the GNU General Public License as published by
9 ;;; the Free Software Foundation; either version 3 of the License, or (at
10 ;;; your option) any later version.
12 ;;; GNU Guix is distributed in the hope that it will be useful, but
13 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
14 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ;;; GNU General Public License for more details.
17 ;;; You should have received a copy of the GNU General Public License
18 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
20 (define-module (gnu packages fonts)
21 #:use-module ((guix licenses)
22 #:renamer (symbol-prefix-proc 'license:))
23 #:use-module (guix packages)
24 #:use-module (guix download)
25 #:use-module (guix build-system trivial)
26 #:use-module ((gnu packages base)
28 #:use-module (gnu packages compression))
30 (define-public ttf-dejavu
36 (uri (string-append "mirror://sourceforge/dejavu/"
37 version "/dejavu-fonts-ttf-"
41 "0pgb0a3ngamidacmrvasg51ck3gp8gn93w6sf1s8snwzx4x2r9yh"))))
42 (build-system trivial-build-system)
44 `(#:modules ((guix build utils))
46 (use-modules (guix build utils))
48 (let ((tar (string-append (assoc-ref %build-inputs
51 (PATH (string-append (assoc-ref %build-inputs
54 (font-dir (string-append
55 %output "/share/fonts/truetype"))
56 (conf-dir (string-append
57 %output "/share/fontconfig/conf.avail"))
58 (doc-dir (string-append
59 %output "/share/doc/" ,name "-" ,version)))
61 (system* tar "xvf" (assoc-ref %build-inputs "source"))
66 (chdir (string-append "dejavu-fonts-ttf-" ,version))
67 (for-each (lambda (ttf)
69 (string-append font-dir "/"
71 (find-files "ttf" "\\.ttf$"))
72 (for-each (lambda (conf)
74 (string-append conf-dir "/"
76 (find-files "fontconfig" "\\.conf$"))
77 (for-each (lambda (doc)
79 (string-append doc-dir "/"
81 (find-files "." "\\.txt$|^[A-Z][A-Z]*$"))))))
82 (native-inputs `(("source" ,source)
85 (home-page "http://dejavu-fonts.org/")
86 (synopsis "Vera font family derivate with additional characters")
87 (description "DejaVu provides an expanded version of the Vera font family
88 aiming for quality and broader Unicode coverage while retaining the original
89 Vera style. DejaVu currently works towards conformance with the Multilingual
90 European Standards (MES-1 and MES-2) for Unicode coverage. The DejaVu fonts
91 provide serif, sans and monospaced variants.")
94 "http://dejavu-fonts.org/"))))
96 (define-public ttf-bitstream-vera
98 (name "ttf-bitstream-vera")
102 (uri (string-append "mirror://gnome/sources/ttf-bitstream-vera/"
103 version "/ttf-bitstream-vera-"
107 "1p3qs51x5327gnk71yq8cvmxc6wgx79sqxfvxcv80cdvgggjfnyv"))))
108 (build-system trivial-build-system)
110 `(#:modules ((guix build utils))
112 (use-modules (guix build utils)
115 (let ((tar (string-append (assoc-ref %build-inputs
118 (PATH (string-append (assoc-ref %build-inputs
121 (font-dir (string-append %output
122 "/share/fonts/truetype"))
123 (doc-dir (string-append %output "/share/doc/"
124 ,name "-" ,version)))
126 (system* tar "xvf" (assoc-ref %build-inputs "source"))
130 (chdir (string-append "ttf-bitstream-vera-" ,version))
131 (for-each (lambda (ttf)
133 (string-append font-dir "/" ttf)))
134 (find-files "." "\\.ttf$"))
135 (for-each (lambda (doc)
137 (string-append doc-dir "/" doc)))
138 (find-files "." "\\.TXT$"))))))
139 (native-inputs `(("source" ,source)
142 (home-page "https://www-old.gnome.org/fonts/")
143 (synopsis "Bitstream Vera sans-serif typeface")
144 (description "Vera is a sans-serif typeface from Bitstream, Inc. This
145 package provides the TrueType (TTF) files.")
148 "https://www-old.gnome.org/fonts/#Final_Bitstream_Vera_Fonts"))))
150 (define-public freefont-ttf
152 (name "freefont-ttf")
156 (uri (string-append "mirror://gnu/freefont/freefont-ttf-"
160 "1q3h5jp1mbdkinkwxy0lfd0a1q7azlbagraydlzaa2ng82836wg4"))))
161 (build-system trivial-build-system)
163 `(#:modules ((guix build utils))
165 (use-modules (guix build utils)
168 (let ((tar (string-append (assoc-ref %build-inputs
171 (PATH (string-append (assoc-ref %build-inputs
174 (font-dir (string-append %output
175 "/share/fonts/truetype"))
176 (doc-dir (string-append %output "/share/doc/"
177 ,name "-" ,version)))
179 (system* tar "xvf" (assoc-ref %build-inputs "source"))
183 (chdir (string-append "freefont-" ,version))
184 (for-each (lambda (file)
185 (let ((dir (if (string-suffix? "ttf" file)
189 (string-append dir "/" file))))
190 (find-files "." ""))))))
191 (native-inputs `(("source" ,source)
194 (home-page "http://www.gnu.org/software/freefont/")
195 (synopsis "Unicode-encoded outline fonts")
197 "The GNU Freefont project aims to provide a set of free outline
198 (PostScript Type0, TrueType, OpenType...) fonts covering the ISO
199 10646/Unicode UCS (Universal Character Set).")
200 (license license:gpl3+)))