gnu: docbook-xsl update to 1.78.1
[jackhill/guix/guix.git] / gnu / packages / fonts.scm
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 ;;;
5 ;;; This file is part of GNU Guix.
6 ;;;
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.
11 ;;;
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.
16 ;;;
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/>.
19
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)
27 #:select (tar))
28 #:use-module (gnu packages compression))
29
30 (define-public ttf-dejavu
31 (package
32 (name "ttf-dejavu")
33 (version "2.34")
34 (source (origin
35 (method url-fetch)
36 (uri (string-append "mirror://sourceforge/dejavu/"
37 version "/dejavu-fonts-ttf-"
38 version ".tar.bz2"))
39 (sha256
40 (base32
41 "0pgb0a3ngamidacmrvasg51ck3gp8gn93w6sf1s8snwzx4x2r9yh"))))
42 (build-system trivial-build-system)
43 (arguments
44 `(#:modules ((guix build utils))
45 #:builder (begin
46 (use-modules (guix build utils))
47
48 (let ((tar (string-append (assoc-ref %build-inputs
49 "tar")
50 "/bin/tar"))
51 (PATH (string-append (assoc-ref %build-inputs
52 "bzip2")
53 "/bin"))
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)))
60 (setenv "PATH" PATH)
61 (system* tar "xvf" (assoc-ref %build-inputs "source"))
62
63 (mkdir-p font-dir)
64 (mkdir-p conf-dir)
65 (mkdir-p doc-dir)
66 (chdir (string-append "dejavu-fonts-ttf-" ,version))
67 (for-each (lambda (ttf)
68 (copy-file ttf
69 (string-append font-dir "/"
70 (basename ttf))))
71 (find-files "ttf" "\\.ttf$"))
72 (for-each (lambda (conf)
73 (copy-file conf
74 (string-append conf-dir "/"
75 (basename conf))))
76 (find-files "fontconfig" "\\.conf$"))
77 (for-each (lambda (doc)
78 (copy-file doc
79 (string-append doc-dir "/"
80 (basename doc))))
81 (find-files "." "\\.txt$|^[A-Z][A-Z]*$"))))))
82 (native-inputs `(("source" ,source)
83 ("tar" ,tar)
84 ("bzip2" ,bzip2)))
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.")
92 (license
93 (license:x11-style
94 "http://dejavu-fonts.org/"))))
95
96 (define-public ttf-bitstream-vera
97 (package
98 (name "ttf-bitstream-vera")
99 (version "1.10")
100 (source (origin
101 (method url-fetch)
102 (uri (string-append "mirror://gnome/sources/ttf-bitstream-vera/"
103 version "/ttf-bitstream-vera-"
104 version ".tar.bz2"))
105 (sha256
106 (base32
107 "1p3qs51x5327gnk71yq8cvmxc6wgx79sqxfvxcv80cdvgggjfnyv"))))
108 (build-system trivial-build-system)
109 (arguments
110 `(#:modules ((guix build utils))
111 #:builder (begin
112 (use-modules (guix build utils)
113 (srfi srfi-26))
114
115 (let ((tar (string-append (assoc-ref %build-inputs
116 "tar")
117 "/bin/tar"))
118 (PATH (string-append (assoc-ref %build-inputs
119 "bzip2")
120 "/bin"))
121 (font-dir (string-append %output
122 "/share/fonts/truetype"))
123 (doc-dir (string-append %output "/share/doc/"
124 ,name "-" ,version)))
125 (setenv "PATH" PATH)
126 (system* tar "xvf" (assoc-ref %build-inputs "source"))
127
128 (mkdir-p font-dir)
129 (mkdir-p doc-dir)
130 (chdir (string-append "ttf-bitstream-vera-" ,version))
131 (for-each (lambda (ttf)
132 (copy-file ttf
133 (string-append font-dir "/" ttf)))
134 (find-files "." "\\.ttf$"))
135 (for-each (lambda (doc)
136 (copy-file doc
137 (string-append doc-dir "/" doc)))
138 (find-files "." "\\.TXT$"))))))
139 (native-inputs `(("source" ,source)
140 ("tar" ,tar)
141 ("bzip2" ,bzip2)))
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.")
146 (license
147 (license:x11-style
148 "https://www-old.gnome.org/fonts/#Final_Bitstream_Vera_Fonts"))))
149
150 (define-public freefont-ttf
151 (package
152 (name "freefont-ttf")
153 (version "20100919")
154 (source (origin
155 (method url-fetch)
156 (uri (string-append "mirror://gnu/freefont/freefont-ttf-"
157 version ".tar.gz"))
158 (sha256
159 (base32
160 "1q3h5jp1mbdkinkwxy0lfd0a1q7azlbagraydlzaa2ng82836wg4"))))
161 (build-system trivial-build-system)
162 (arguments
163 `(#:modules ((guix build utils))
164 #:builder (begin
165 (use-modules (guix build utils)
166 (srfi srfi-26))
167
168 (let ((tar (string-append (assoc-ref %build-inputs
169 "tar")
170 "/bin/tar"))
171 (PATH (string-append (assoc-ref %build-inputs
172 "gzip")
173 "/bin"))
174 (font-dir (string-append %output
175 "/share/fonts/truetype"))
176 (doc-dir (string-append %output "/share/doc/"
177 ,name "-" ,version)))
178 (setenv "PATH" PATH)
179 (system* tar "xvf" (assoc-ref %build-inputs "source"))
180
181 (mkdir-p font-dir)
182 (mkdir-p doc-dir)
183 (chdir (string-append "freefont-" ,version))
184 (for-each (lambda (file)
185 (let ((dir (if (string-suffix? "ttf" file)
186 font-dir
187 doc-dir)))
188 (copy-file file
189 (string-append dir "/" file))))
190 (find-files "." ""))))))
191 (native-inputs `(("source" ,source)
192 ("tar" ,tar)
193 ("gzip" ,gzip)))
194 (home-page "http://www.gnu.org/software/freefont/")
195 (synopsis "Unicode-encoded outline fonts")
196 (description
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+)))