1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2014, 2015 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)
29 #:use-module (gnu packages compression)
30 #:use-module (gnu packages perl)
31 #:use-module (gnu packages xorg)
32 #:use-module (gnu packages pkg-config))
34 (define-public font-dejavu
40 (uri (string-append "mirror://sourceforge/dejavu/"
41 version "/dejavu-fonts-ttf-"
45 "0pgb0a3ngamidacmrvasg51ck3gp8gn93w6sf1s8snwzx4x2r9yh"))))
46 (build-system trivial-build-system)
48 `(#:modules ((guix build utils))
50 (use-modules (guix build utils))
52 (let ((tar (string-append (assoc-ref %build-inputs
55 (PATH (string-append (assoc-ref %build-inputs
58 (font-dir (string-append
59 %output "/share/fonts/truetype"))
60 (conf-dir (string-append
61 %output "/share/fontconfig/conf.avail"))
62 (doc-dir (string-append
63 %output "/share/doc/" ,name "-" ,version)))
65 (system* tar "xvf" (assoc-ref %build-inputs "source"))
70 (chdir (string-append "dejavu-fonts-ttf-" ,version))
71 (for-each (lambda (ttf)
73 (string-append font-dir "/"
75 (find-files "ttf" "\\.ttf$"))
76 (for-each (lambda (conf)
78 (string-append conf-dir "/"
80 (find-files "fontconfig" "\\.conf$"))
81 (for-each (lambda (doc)
83 (string-append doc-dir "/"
85 (find-files "." "\\.txt$|^[A-Z][A-Z]*$"))))))
86 (native-inputs `(("source" ,source)
89 (home-page "http://dejavu-fonts.org/")
90 (synopsis "Vera font family derivate with additional characters")
91 (description "DejaVu provides an expanded version of the Vera font family
92 aiming for quality and broader Unicode coverage while retaining the original
93 Vera style. DejaVu currently works towards conformance with the Multilingual
94 European Standards (MES-1 and MES-2) for Unicode coverage. The DejaVu fonts
95 provide serif, sans and monospaced variants.")
98 "http://dejavu-fonts.org/"))))
100 (define-public font-bitstream-vera
102 (name "font-bitstream-vera")
106 (uri (string-append "mirror://gnome/sources/ttf-bitstream-vera/"
107 version "/ttf-bitstream-vera-"
111 "1p3qs51x5327gnk71yq8cvmxc6wgx79sqxfvxcv80cdvgggjfnyv"))))
112 (build-system trivial-build-system)
114 `(#:modules ((guix build utils))
116 (use-modules (guix build utils)
119 (let ((tar (string-append (assoc-ref %build-inputs
122 (PATH (string-append (assoc-ref %build-inputs
125 (font-dir (string-append %output
126 "/share/fonts/truetype"))
127 (doc-dir (string-append %output "/share/doc/"
128 ,name "-" ,version)))
130 (system* tar "xvf" (assoc-ref %build-inputs "source"))
134 (chdir (string-append "ttf-bitstream-vera-" ,version))
135 (for-each (lambda (ttf)
137 (string-append font-dir "/" ttf)))
138 (find-files "." "\\.ttf$"))
139 (for-each (lambda (doc)
141 (string-append doc-dir "/" doc)))
142 (find-files "." "\\.TXT$"))))))
143 (native-inputs `(("source" ,source)
146 (home-page "http://www.gnome.org/fonts/")
147 (synopsis "Bitstream Vera sans-serif typeface")
148 (description "Vera is a sans-serif typeface from Bitstream, Inc. This
149 package provides the TrueType (TTF) files.")
152 "http://www.gnome.org/fonts/#Final_Bitstream_Vera_Fonts"))))
154 (define-public font-gnu-freefont-ttf
156 (name "font-gnu-freefont-ttf")
160 (uri (string-append "mirror://gnu/freefont/freefont-ttf-"
164 "1q3h5jp1mbdkinkwxy0lfd0a1q7azlbagraydlzaa2ng82836wg4"))))
165 (build-system trivial-build-system)
167 `(#:modules ((guix build utils))
169 (use-modules (guix build utils)
172 (let ((tar (string-append (assoc-ref %build-inputs
175 (PATH (string-append (assoc-ref %build-inputs
178 (font-dir (string-append %output
179 "/share/fonts/truetype"))
180 (doc-dir (string-append %output "/share/doc/"
181 ,name "-" ,version)))
183 (system* tar "xvf" (assoc-ref %build-inputs "source"))
187 (chdir (string-append "freefont-" ,version))
188 (for-each (lambda (file)
189 (let ((dir (if (string-suffix? "ttf" file)
193 (string-append dir "/" file))))
194 (find-files "." ""))))))
195 (native-inputs `(("source" ,source)
198 (home-page "http://www.gnu.org/software/freefont/")
199 (synopsis "Unicode-encoded outline fonts")
201 "The GNU Freefont project aims to provide a set of free outline
202 (PostScript Type0, TrueType, OpenType...) fonts covering the ISO
203 10646/Unicode UCS (Universal Character Set).")
204 (license license:gpl3+)))
206 (define-public font-liberation
208 (name "font-liberation")
212 (uri (string-append "https://fedorahosted.org/releases/l/i/"
213 "liberation-fonts/liberation-fonts-ttf-"
217 "010m4zfqan4w04b6bs9pm3gapn9hsb18bmwwgp2p6y6idj52g43q"))))
218 (build-system trivial-build-system)
220 `(#:modules ((guix build utils))
223 (use-modules (guix build utils))
225 (let ((tar (string-append (assoc-ref %build-inputs "tar")
227 (PATH (string-append (assoc-ref %build-inputs "gzip")
229 (font-dir (string-append %output "/share/fonts/truetype"))
230 (doc-dir (string-append %output "/share/doc/" ,name)))
232 (system* tar "xvf" (assoc-ref %build-inputs "source"))
235 (chdir (string-append "liberation-fonts-ttf-" ,version))
236 (for-each (lambda (ttf)
238 (string-append font-dir "/"
240 (find-files "." "\\.ttf$"))
241 (for-each (lambda (doc)
243 (string-append doc-dir "/"
245 '("AUTHORS" "ChangeLog" "LICENSE" "README" "TODO"))))))
250 (home-page "https://fedorahosted.org/liberation-fonts/")
252 "Fonts compatible with Arial, Times New Roman, and Courier New")
254 "The Liberation font family aims at metric compatibility with
255 Arial, Times New Roman, and Courier New.
257 There are three sets:
259 - Sans (a substitute for Arial, Albany, Helvetica, Nimbus Sans L, and
260 Bitstream Vera Sans);
262 - Serif (a substitute for Times New Roman, Thorndale, Nimbus Roman, and
263 Bitstream Vera Serif);
265 - Mono (a substitute for Courier New, Cumberland, Courier, Nimbus Mono L,
266 and Bitstream Vera Sans Mono).
268 The Liberation Fonts are sponsored by Red Hat.")
269 (license license:silofl1.1)))
271 (define-public font-terminus
273 (name "font-terminus")
279 "mirror://sourceforge/project/terminus-font/terminus-font-"
286 "1gzmn7zakvy6yrvmswyjfklnsvqrjm0imhq8rjws8rdkhqwkh21i"))))
287 (build-system gnu-build-system)
289 `(("pkg-config" ,pkg-config)
291 ("bdftopcf" ,bdftopcf)
292 ("font-util", font-util)
293 ("mkfontdir" ,mkfontdir)))
295 `(#:configure-flags (list
296 ;; install fonts into subdirectory of package output
297 ;; instead of font-util-?.?.?/share/fonts/X11
298 (string-append "--with-fontrootdir="
299 %output "/share/fonts/X11"))
300 #:tests? #f)) ;; No test target in tarball
301 (home-page "http://terminus-font.sourceforge.net/")
302 (synopsis "Simple bitmap programming font")
303 (description "Terminus Font is a clean, fixed width bitmap font, designed
304 for long (8 and more hours per day) work with computers.")
305 (license license:silofl1.1)))