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>
4 ;;; Copyright © 2014 Joshua Grant <tadni@riseup.net>
5 ;;; Copyright © 2014 Alex Kost <alezost@gmail.com>
7 ;;; This file is part of GNU Guix.
9 ;;; GNU Guix is free software; you can redistribute it and/or modify it
10 ;;; under the terms of the GNU General Public License as published by
11 ;;; the Free Software Foundation; either version 3 of the License, or (at
12 ;;; your option) any later version.
14 ;;; GNU Guix is distributed in the hope that it will be useful, but
15 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
16 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 ;;; GNU General Public License for more details.
19 ;;; You should have received a copy of the GNU General Public License
20 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
22 (define-module (gnu packages fonts)
23 #:use-module ((guix licenses) #:prefix license:)
24 #:use-module (guix packages)
25 #:use-module (guix download)
26 #:use-module (guix build-system gnu)
27 #:use-module (guix build-system trivial)
28 #:use-module ((gnu packages base)
30 #:use-module (gnu packages compression)
31 #:use-module (gnu packages perl)
32 #:use-module (gnu packages xorg)
33 #:use-module (gnu packages pkg-config))
35 (define-public font-dejavu
41 (uri (string-append "mirror://sourceforge/dejavu/"
42 version "/dejavu-fonts-ttf-"
46 "0pgb0a3ngamidacmrvasg51ck3gp8gn93w6sf1s8snwzx4x2r9yh"))))
47 (build-system trivial-build-system)
49 `(#:modules ((guix build utils))
51 (use-modules (guix build utils))
53 (let ((tar (string-append (assoc-ref %build-inputs
56 (PATH (string-append (assoc-ref %build-inputs
59 (font-dir (string-append
60 %output "/share/fonts/truetype"))
61 (conf-dir (string-append
62 %output "/share/fontconfig/conf.avail"))
63 (doc-dir (string-append
64 %output "/share/doc/" ,name "-" ,version)))
66 (system* tar "xvf" (assoc-ref %build-inputs "source"))
71 (chdir (string-append "dejavu-fonts-ttf-" ,version))
72 (for-each (lambda (ttf)
74 (string-append font-dir "/"
76 (find-files "ttf" "\\.ttf$"))
77 (for-each (lambda (conf)
79 (string-append conf-dir "/"
81 (find-files "fontconfig" "\\.conf$"))
82 (for-each (lambda (doc)
84 (string-append doc-dir "/"
86 (find-files "." "\\.txt$|^[A-Z][A-Z]*$"))))))
87 (native-inputs `(("source" ,source)
90 (home-page "http://dejavu-fonts.org/")
91 (synopsis "Vera font family derivate with additional characters")
92 (description "DejaVu provides an expanded version of the Vera font family
93 aiming for quality and broader Unicode coverage while retaining the original
94 Vera style. DejaVu currently works towards conformance with the Multilingual
95 European Standards (MES-1 and MES-2) for Unicode coverage. The DejaVu fonts
96 provide serif, sans and monospaced variants.")
99 "http://dejavu-fonts.org/"))))
101 (define-public font-bitstream-vera
103 (name "font-bitstream-vera")
107 (uri (string-append "mirror://gnome/sources/ttf-bitstream-vera/"
108 version "/ttf-bitstream-vera-"
112 "1p3qs51x5327gnk71yq8cvmxc6wgx79sqxfvxcv80cdvgggjfnyv"))))
113 (build-system trivial-build-system)
115 `(#:modules ((guix build utils))
117 (use-modules (guix build utils)
120 (let ((tar (string-append (assoc-ref %build-inputs
123 (PATH (string-append (assoc-ref %build-inputs
126 (font-dir (string-append %output
127 "/share/fonts/truetype"))
128 (doc-dir (string-append %output "/share/doc/"
129 ,name "-" ,version)))
131 (system* tar "xvf" (assoc-ref %build-inputs "source"))
135 (chdir (string-append "ttf-bitstream-vera-" ,version))
136 (for-each (lambda (ttf)
138 (string-append font-dir "/" ttf)))
139 (find-files "." "\\.ttf$"))
140 (for-each (lambda (doc)
142 (string-append doc-dir "/" doc)))
143 (find-files "." "\\.TXT$"))))))
144 (native-inputs `(("source" ,source)
147 (home-page "https://www-old.gnome.org/fonts/")
148 (synopsis "Bitstream Vera sans-serif typeface")
149 (description "Vera is a sans-serif typeface from Bitstream, Inc. This
150 package provides the TrueType (TTF) files.")
153 "https://www-old.gnome.org/fonts/#Final_Bitstream_Vera_Fonts"))))
155 (define-public font-gnu-freefont-ttf
157 (name "font-gnu-freefont-ttf")
161 (uri (string-append "mirror://gnu/freefont/freefont-ttf-"
165 "1q3h5jp1mbdkinkwxy0lfd0a1q7azlbagraydlzaa2ng82836wg4"))))
166 (build-system trivial-build-system)
168 `(#:modules ((guix build utils))
170 (use-modules (guix build utils)
173 (let ((tar (string-append (assoc-ref %build-inputs
176 (PATH (string-append (assoc-ref %build-inputs
179 (font-dir (string-append %output
180 "/share/fonts/truetype"))
181 (doc-dir (string-append %output "/share/doc/"
182 ,name "-" ,version)))
184 (system* tar "xvf" (assoc-ref %build-inputs "source"))
188 (chdir (string-append "freefont-" ,version))
189 (for-each (lambda (file)
190 (let ((dir (if (string-suffix? "ttf" file)
194 (string-append dir "/" file))))
195 (find-files "." ""))))))
196 (native-inputs `(("source" ,source)
199 (home-page "http://www.gnu.org/software/freefont/")
200 (synopsis "Unicode-encoded outline fonts")
202 "The GNU Freefont project aims to provide a set of free outline
203 (PostScript Type0, TrueType, OpenType...) fonts covering the ISO
204 10646/Unicode UCS (Universal Character Set).")
205 (license license:gpl3+)))
207 (define-public font-liberation
209 (name "font-liberation")
213 (uri (string-append "https://fedorahosted.org/releases/l/i/"
214 "liberation-fonts/liberation-fonts-ttf-"
218 "010m4zfqan4w04b6bs9pm3gapn9hsb18bmwwgp2p6y6idj52g43q"))))
219 (build-system trivial-build-system)
221 `(#:modules ((guix build utils))
224 (use-modules (guix build utils))
226 (let ((tar (string-append (assoc-ref %build-inputs "tar")
228 (PATH (string-append (assoc-ref %build-inputs "gzip")
230 (font-dir (string-append %output "/share/fonts/truetype"))
231 (doc-dir (string-append %output "/share/doc/" ,name)))
233 (system* tar "xvf" (assoc-ref %build-inputs "source"))
236 (chdir (string-append "liberation-fonts-ttf-" ,version))
237 (for-each (lambda (ttf)
239 (string-append font-dir "/"
241 (find-files "." "\\.ttf$"))
242 (for-each (lambda (doc)
244 (string-append doc-dir "/"
246 '("AUTHORS" "ChangeLog" "LICENSE" "README" "TODO"))))))
251 (home-page "https://fedorahosted.org/liberation-fonts/")
253 "Fonts compatible with Arial, Times New Roman, and Courier New")
255 "The Liberation font family aims at metric compatibility with
256 Arial, Times New Roman, and Courier New.
258 There are three sets:
260 - Sans (a substitute for Arial, Albany, Helvetica, Nimbus Sans L, and
261 Bitstream Vera Sans);
263 - Serif (a substitute for Times New Roman, Thorndale, Nimbus Roman, and
264 Bitstream Vera Serif);
266 - Mono (a substitute for Courier New, Cumberland, Courier, Nimbus Mono L,
267 and Bitstream Vera Sans Mono).
269 The Liberation Fonts are sponsored by Red Hat.")
270 (license license:silofl1.1)))
272 (define-public font-terminus
274 (name "font-terminus")
280 "mirror://sourceforge/project/terminus-font/terminus-font-"
287 "1gzmn7zakvy6yrvmswyjfklnsvqrjm0imhq8rjws8rdkhqwkh21i"))))
288 (build-system gnu-build-system)
290 `(("pkg-config" ,pkg-config)
292 ("bdftopcf" ,bdftopcf)
293 ("font-util", font-util)
294 ("mkfontdir" ,mkfontdir)))
296 `(#:configure-flags (list
297 ;; install fonts into subdirectory of package output
298 ;; instead of font-util-?.?.?/share/fonts/X11
299 (string-append "--with-fontrootdir="
300 %output "/share/fonts/X11"))
301 #:tests? #f)) ;; No test target in tarball
302 (home-page "http://terminus-font.sourceforge.net/")
303 (synopsis "Simple bitmap programming font")
304 (description "Terminus Font is a clean, fixed width bitmap font, designed
305 for long (8 and more hours per day) work with computers.")
306 (license license:silofl1.1)))