Commit | Line | Data |
---|---|---|
86f1537d | 1 | ;;; GNU Guix --- Functional package management for GNU |
71be99b8 | 2 | ;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org> |
72f210ea | 3 | ;;; Copyright © 2014 Mark H Weaver <mhw@netris.org> |
822efdff | 4 | ;;; Copyright © 2014 Joshua Grant <tadni@riseup.net> |
16191117 | 5 | ;;; Copyright © 2014 Alex Kost <alezost@gmail.com> |
692784dd | 6 | ;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com> |
e93b88f7 | 7 | ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr> |
3f88152d | 8 | ;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net> |
df320991 | 9 | ;;; Copyright © 2015, 2016 Leo Famulari <leo@famulari.name> |
679b535b | 10 | ;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is> |
b6ecac93 | 11 | ;;; Copyright © 2016 Jookia <166291@gmail.com> |
f85cafde | 12 | ;;; Copyright © 2016 Eric Bavier <bavier@member.fsf.org> |
73c8d39c | 13 | ;;; Copyright © 2016 Dmitry Nikolaev <cameltheman@gmail.com> |
86f1537d AE |
14 | ;;; |
15 | ;;; This file is part of GNU Guix. | |
16 | ;;; | |
17 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
18 | ;;; under the terms of the GNU General Public License as published by | |
19 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
20 | ;;; your option) any later version. | |
21 | ;;; | |
22 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
23 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
24 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
25 | ;;; GNU General Public License for more details. | |
26 | ;;; | |
27 | ;;; You should have received a copy of the GNU General Public License | |
28 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
29 | ||
30 | (define-module (gnu packages fonts) | |
71be99b8 | 31 | #:use-module (guix utils) |
b5b73a82 | 32 | #:use-module ((guix licenses) #:prefix license:) |
86f1537d AE |
33 | #:use-module (guix packages) |
34 | #:use-module (guix download) | |
d41bb065 | 35 | #:use-module (guix build-system gnu) |
86f1537d | 36 | #:use-module (guix build-system trivial) |
56b7a338 | 37 | #:use-module (gnu packages base) |
d41bb065 | 38 | #:use-module (gnu packages compression) |
47268eec | 39 | #:use-module (gnu packages fontutils) |
d41bb065 | 40 | #:use-module (gnu packages perl) |
47268eec AE |
41 | #:use-module (gnu packages pkg-config) |
42 | #:use-module (gnu packages python) | |
d41bb065 | 43 | #:use-module (gnu packages xorg) |
47268eec | 44 | #:use-module (gnu packages zip)) |
86f1537d | 45 | |
477ac94b | 46 | (define-public font-inconsolata |
dede51a1 ED |
47 | (package |
48 | (name "font-inconsolata") | |
49 | (version "0.80") | |
50 | (source (origin | |
51 | (method url-fetch) | |
52 | (uri "http://www.levien.com/type/myfonts/Inconsolata.otf") | |
53 | (sha256 | |
54 | (base32 | |
55 | "06js6znbcf7swn8y3b8ki416bz96ay7d3yvddqnvi88lqhbfcq8m")))) | |
56 | (build-system trivial-build-system) | |
57 | (arguments | |
58 | `(#:modules ((guix build utils)) | |
59 | #:builder (begin | |
60 | (use-modules (guix build utils)) | |
61 | (let ((font-dir (string-append %output | |
62 | "/share/fonts/opentype")) | |
63 | (source (assoc-ref %build-inputs "source"))) | |
64 | (mkdir-p font-dir) | |
65 | (copy-file source | |
66 | (string-append font-dir "/" "inconsolata.otf")))))) | |
67 | (native-inputs `(("source" ,source))) | |
68 | (home-page "http://levien.com/type/myfonts/inconsolata.html") | |
69 | (synopsis "Monospace font") | |
70 | (description "A monospace font, designed for code listings and the like, | |
71 | in print. With attention to detail for high resolution rendering.") | |
72 | (license license:silofl1.1))) | |
73 | ||
e93b88f7 ED |
74 | (define-public font-ubuntu |
75 | (package | |
76 | (name "font-ubuntu") | |
29f9abb4 | 77 | (version "0.83") |
e93b88f7 ED |
78 | (source (origin |
79 | (method url-fetch) | |
29f9abb4 AK |
80 | (uri (string-append |
81 | "http://font.ubuntu.com/download/ubuntu-font-family-" | |
82 | version ".zip")) | |
e93b88f7 ED |
83 | (sha256 |
84 | (base32 | |
29f9abb4 | 85 | "0hjvq2x758dx0sfwqhzflns0ns035qm7h6ygskbx1svzg517sva5")))) |
e93b88f7 ED |
86 | (build-system trivial-build-system) |
87 | (arguments | |
88 | `(#:modules ((guix build utils)) | |
89 | #:builder (begin | |
90 | (use-modules (guix build utils) | |
91 | (srfi srfi-26)) | |
92 | ||
93 | (let ((PATH (string-append (assoc-ref %build-inputs | |
94 | "unzip") | |
95 | "/bin")) | |
96 | (font-dir (string-append %output | |
97 | "/share/fonts/truetype")) | |
98 | (doc-dir (string-append %output "/share/doc/" | |
99 | ,name "-" ,version))) | |
100 | (setenv "PATH" PATH) | |
101 | (system* "unzip" (assoc-ref %build-inputs "source")) | |
102 | ||
103 | (mkdir-p font-dir) | |
104 | (mkdir-p doc-dir) | |
105 | (chdir (string-append "ubuntu-font-family-" ,version)) | |
106 | (for-each (lambda (ttf) | |
107 | (copy-file ttf | |
108 | (string-append font-dir "/" ttf))) | |
109 | (find-files "." "\\.ttf$")) | |
110 | (for-each (lambda (doc) | |
111 | (copy-file doc | |
112 | (string-append doc-dir "/" doc))) | |
113 | (find-files "." "\\.txt$")))))) | |
114 | (native-inputs `(("source" ,source) | |
115 | ("unzip" ,unzip))) | |
116 | (home-page "http://font.ubuntu.com/") | |
117 | (synopsis "The Ubuntu Font Family") | |
118 | (description "The Ubuntu Font Family is a unique, custom designed font | |
119 | that has a very distinctive look and feel. This package provides the | |
120 | TrueType (TTF) files.") | |
121 | (license | |
122 | (license:non-copyleft | |
123 | "http://font.ubuntu.com/ufl/ubuntu-font-licence-1.0.txt" | |
124 | "Ubuntu Font License v1.0")))) | |
125 | ||
5e6bdf06 | 126 | (define-public font-dejavu |
72f210ea | 127 | (package |
5e6bdf06 | 128 | (name "font-dejavu") |
72f210ea MW |
129 | (version "2.34") |
130 | (source (origin | |
131 | (method url-fetch) | |
de67e922 | 132 | (uri (string-append "mirror://sourceforge/dejavu/dejavu/" |
72f210ea MW |
133 | version "/dejavu-fonts-ttf-" |
134 | version ".tar.bz2")) | |
135 | (sha256 | |
136 | (base32 | |
137 | "0pgb0a3ngamidacmrvasg51ck3gp8gn93w6sf1s8snwzx4x2r9yh")))) | |
138 | (build-system trivial-build-system) | |
139 | (arguments | |
140 | `(#:modules ((guix build utils)) | |
141 | #:builder (begin | |
142 | (use-modules (guix build utils)) | |
143 | ||
144 | (let ((tar (string-append (assoc-ref %build-inputs | |
145 | "tar") | |
146 | "/bin/tar")) | |
147 | (PATH (string-append (assoc-ref %build-inputs | |
148 | "bzip2") | |
149 | "/bin")) | |
150 | (font-dir (string-append | |
151 | %output "/share/fonts/truetype")) | |
152 | (conf-dir (string-append | |
153 | %output "/share/fontconfig/conf.avail")) | |
154 | (doc-dir (string-append | |
155 | %output "/share/doc/" ,name "-" ,version))) | |
156 | (setenv "PATH" PATH) | |
157 | (system* tar "xvf" (assoc-ref %build-inputs "source")) | |
158 | ||
159 | (mkdir-p font-dir) | |
160 | (mkdir-p conf-dir) | |
161 | (mkdir-p doc-dir) | |
162 | (chdir (string-append "dejavu-fonts-ttf-" ,version)) | |
163 | (for-each (lambda (ttf) | |
164 | (copy-file ttf | |
165 | (string-append font-dir "/" | |
166 | (basename ttf)))) | |
167 | (find-files "ttf" "\\.ttf$")) | |
168 | (for-each (lambda (conf) | |
169 | (copy-file conf | |
170 | (string-append conf-dir "/" | |
171 | (basename conf)))) | |
172 | (find-files "fontconfig" "\\.conf$")) | |
173 | (for-each (lambda (doc) | |
174 | (copy-file doc | |
175 | (string-append doc-dir "/" | |
176 | (basename doc)))) | |
177 | (find-files "." "\\.txt$|^[A-Z][A-Z]*$")))))) | |
178 | (native-inputs `(("source" ,source) | |
179 | ("tar" ,tar) | |
180 | ("bzip2" ,bzip2))) | |
181 | (home-page "http://dejavu-fonts.org/") | |
182 | (synopsis "Vera font family derivate with additional characters") | |
183 | (description "DejaVu provides an expanded version of the Vera font family | |
184 | aiming for quality and broader Unicode coverage while retaining the original | |
185 | Vera style. DejaVu currently works towards conformance with the Multilingual | |
186 | European Standards (MES-1 and MES-2) for Unicode coverage. The DejaVu fonts | |
187 | provide serif, sans and monospaced variants.") | |
188 | (license | |
189 | (license:x11-style | |
190 | "http://dejavu-fonts.org/")))) | |
191 | ||
5e6bdf06 | 192 | (define-public font-bitstream-vera |
86f1537d | 193 | (package |
5e6bdf06 | 194 | (name "font-bitstream-vera") |
86f1537d AE |
195 | (version "1.10") |
196 | (source (origin | |
197 | (method url-fetch) | |
198 | (uri (string-append "mirror://gnome/sources/ttf-bitstream-vera/" | |
199 | version "/ttf-bitstream-vera-" | |
200 | version ".tar.bz2")) | |
201 | (sha256 | |
202 | (base32 | |
203 | "1p3qs51x5327gnk71yq8cvmxc6wgx79sqxfvxcv80cdvgggjfnyv")))) | |
204 | (build-system trivial-build-system) | |
205 | (arguments | |
206 | `(#:modules ((guix build utils)) | |
207 | #:builder (begin | |
208 | (use-modules (guix build utils) | |
209 | (srfi srfi-26)) | |
210 | ||
211 | (let ((tar (string-append (assoc-ref %build-inputs | |
212 | "tar") | |
213 | "/bin/tar")) | |
214 | (PATH (string-append (assoc-ref %build-inputs | |
215 | "bzip2") | |
216 | "/bin")) | |
217 | (font-dir (string-append %output | |
218 | "/share/fonts/truetype")) | |
219 | (doc-dir (string-append %output "/share/doc/" | |
220 | ,name "-" ,version))) | |
221 | (setenv "PATH" PATH) | |
222 | (system* tar "xvf" (assoc-ref %build-inputs "source")) | |
223 | ||
224 | (mkdir-p font-dir) | |
225 | (mkdir-p doc-dir) | |
226 | (chdir (string-append "ttf-bitstream-vera-" ,version)) | |
227 | (for-each (lambda (ttf) | |
228 | (copy-file ttf | |
229 | (string-append font-dir "/" ttf))) | |
230 | (find-files "." "\\.ttf$")) | |
231 | (for-each (lambda (doc) | |
232 | (copy-file doc | |
233 | (string-append doc-dir "/" doc))) | |
234 | (find-files "." "\\.TXT$")))))) | |
235 | (native-inputs `(("source" ,source) | |
236 | ("tar" ,tar) | |
237 | ("bzip2" ,bzip2))) | |
07af3e5e | 238 | (home-page "http://www.gnome.org/fonts/") |
86f1537d AE |
239 | (synopsis "Bitstream Vera sans-serif typeface") |
240 | (description "Vera is a sans-serif typeface from Bitstream, Inc. This | |
241 | package provides the TrueType (TTF) files.") | |
242 | (license | |
243 | (license:x11-style | |
07af3e5e | 244 | "http://www.gnome.org/fonts/#Final_Bitstream_Vera_Fonts")))) |
86f1537d | 245 | |
71be99b8 LC |
246 | (define-public font-cantarell |
247 | (package | |
248 | (name "font-abattis-cantarell") | |
249 | (version "0.0.24") | |
250 | (source (origin | |
251 | (method url-fetch) | |
252 | (uri (string-append "mirror://gnome/sources/cantarell-fonts/" | |
253 | (version-major+minor version) | |
254 | "/cantarell-fonts-" version ".tar.xz")) | |
255 | (sha256 | |
256 | (base32 | |
257 | "0r4jnc2x9yncf40lixjb1pqgpq8rzbi2fz33pshlqzjgx2d69bcw")))) | |
258 | (build-system gnu-build-system) | |
259 | (home-page "https://wiki.gnome.org/Projects/CantarellFonts") | |
260 | (synopsis "Cantarell sans-serif typeface") | |
261 | (description "The Cantarell font family is a contemporary Humanist | |
262 | sans-serif designed for on-screen reading. It is used by GNOME@tie{}3.") | |
263 | (license license:silofl1.1))) | |
264 | ||
5e6bdf06 | 265 | (define-public font-gnu-freefont-ttf |
86f1537d | 266 | (package |
5e6bdf06 | 267 | (name "font-gnu-freefont-ttf") |
47268eec | 268 | (version "20120503") |
86f1537d AE |
269 | (source (origin |
270 | (method url-fetch) | |
47268eec | 271 | (uri (string-append "mirror://gnu/freefont/freefont-src-" |
86f1537d AE |
272 | version ".tar.gz")) |
273 | (sha256 | |
274 | (base32 | |
47268eec AE |
275 | "0yk58blhcd4hm7nyincmqq4jrzjjk82wif2zmk1l3y2m4vif4qhd")))) |
276 | (build-system gnu-build-system) | |
86f1537d | 277 | (arguments |
47268eec AE |
278 | `(#:phases (modify-phases %standard-phases |
279 | (delete 'configure) | |
280 | (replace 'install | |
281 | (lambda _ | |
282 | (let ((doc-dir (string-append %output "/share/doc/" | |
283 | ,name "-" ,version)) | |
284 | (font-dir (string-append %output | |
285 | "/share/fonts/truetype"))) | |
286 | (mkdir-p doc-dir) | |
287 | (substitute* "Makefile" | |
288 | (("\\$\\(TMPDIR\\)") doc-dir) | |
289 | (("sfd/\\*.ttf") "")) | |
290 | (system* "make" "ttftar") | |
291 | (mkdir-p font-dir) | |
292 | (for-each (lambda (file) | |
86f1537d | 293 | (copy-file file |
47268eec AE |
294 | (string-append font-dir "/" |
295 | (basename file)))) | |
296 | (filter | |
297 | (lambda (file) (string-suffix? "ttf" file)) | |
298 | (find-files "." ""))))))) | |
299 | #:test-target "tests")) | |
300 | ;; replace python 3 with python 2 | |
301 | ;; python 3 support commits aren't yet released in 20120503 | |
302 | ;; so freefont needs python 2 support in fontforge | |
303 | (native-inputs `(("fontforge" ,(package (inherit fontforge) | |
304 | (inputs `(("python-2" ,python-2) | |
305 | ,@(package-inputs fontforge))))))) | |
86f1537d AE |
306 | (home-page "http://www.gnu.org/software/freefont/") |
307 | (synopsis "Unicode-encoded outline fonts") | |
308 | (description | |
309 | "The GNU Freefont project aims to provide a set of free outline | |
310 | (PostScript Type0, TrueType, OpenType...) fonts covering the ISO | |
311 | 10646/Unicode UCS (Universal Character Set).") | |
63e8bb12 LC |
312 | (license license:gpl3+) |
313 | (properties '((upstream-name . "freefont") | |
314 | (ftp-directory . "/gnu/freefont"))))) | |
d41bb065 | 315 | |
16191117 AK |
316 | (define-public font-liberation |
317 | (package | |
318 | (name "font-liberation") | |
319 | (version "2.00.1") | |
320 | (source (origin | |
321 | (method url-fetch) | |
322 | (uri (string-append "https://fedorahosted.org/releases/l/i/" | |
323 | "liberation-fonts/liberation-fonts-ttf-" | |
324 | version ".tar.gz")) | |
325 | (sha256 | |
326 | (base32 | |
327 | "010m4zfqan4w04b6bs9pm3gapn9hsb18bmwwgp2p6y6idj52g43q")))) | |
328 | (build-system trivial-build-system) | |
329 | (arguments | |
330 | `(#:modules ((guix build utils)) | |
331 | #:builder | |
332 | (begin | |
333 | (use-modules (guix build utils)) | |
334 | ||
335 | (let ((tar (string-append (assoc-ref %build-inputs "tar") | |
336 | "/bin/tar")) | |
337 | (PATH (string-append (assoc-ref %build-inputs "gzip") | |
338 | "/bin")) | |
339 | (font-dir (string-append %output "/share/fonts/truetype")) | |
340 | (doc-dir (string-append %output "/share/doc/" ,name))) | |
341 | (setenv "PATH" PATH) | |
342 | (system* tar "xvf" (assoc-ref %build-inputs "source")) | |
343 | (mkdir-p font-dir) | |
344 | (mkdir-p doc-dir) | |
345 | (chdir (string-append "liberation-fonts-ttf-" ,version)) | |
346 | (for-each (lambda (ttf) | |
347 | (copy-file ttf | |
348 | (string-append font-dir "/" | |
349 | (basename ttf)))) | |
350 | (find-files "." "\\.ttf$")) | |
351 | (for-each (lambda (doc) | |
352 | (copy-file doc | |
353 | (string-append doc-dir "/" | |
354 | (basename doc)))) | |
355 | '("AUTHORS" "ChangeLog" "LICENSE" "README" "TODO")))))) | |
356 | (native-inputs | |
357 | `(("source" ,source) | |
358 | ("tar" ,tar) | |
359 | ("gzip" ,gzip))) | |
360 | (home-page "https://fedorahosted.org/liberation-fonts/") | |
361 | (synopsis | |
362 | "Fonts compatible with Arial, Times New Roman, and Courier New") | |
363 | (description | |
364 | "The Liberation font family aims at metric compatibility with | |
365 | Arial, Times New Roman, and Courier New. | |
366 | ||
367 | There are three sets: | |
368 | ||
369 | - Sans (a substitute for Arial, Albany, Helvetica, Nimbus Sans L, and | |
370 | Bitstream Vera Sans); | |
371 | ||
372 | - Serif (a substitute for Times New Roman, Thorndale, Nimbus Roman, and | |
373 | Bitstream Vera Serif); | |
374 | ||
375 | - Mono (a substitute for Courier New, Cumberland, Courier, Nimbus Mono L, | |
376 | and Bitstream Vera Sans Mono). | |
377 | ||
378 | The Liberation Fonts are sponsored by Red Hat.") | |
379 | (license license:silofl1.1))) | |
380 | ||
5e6bdf06 | 381 | (define-public font-terminus |
d41bb065 | 382 | (package |
5e6bdf06 | 383 | (name "font-terminus") |
acb38156 | 384 | (version "4.40") |
d41bb065 JG |
385 | (source |
386 | (origin | |
387 | (method url-fetch) | |
388 | (uri (string-append | |
389 | "mirror://sourceforge/project/terminus-font/terminus-font-" | |
390 | version | |
391 | "/terminus-font-" | |
392 | version | |
393 | ".tar.gz")) | |
394 | (sha256 | |
acb38156 | 395 | (base32 |
396 | "0487cyx5h1f0crbny5sg73a22gmym5vk1i7646gy7hgiscj2rxb4")))) | |
d41bb065 JG |
397 | (build-system gnu-build-system) |
398 | (native-inputs | |
399 | `(("pkg-config" ,pkg-config) | |
400 | ("perl" ,perl) | |
401 | ("bdftopcf" ,bdftopcf) | |
b3546174 | 402 | ("font-util" ,font-util) |
d41bb065 JG |
403 | ("mkfontdir" ,mkfontdir))) |
404 | (arguments | |
405 | `(#:configure-flags (list | |
406 | ;; install fonts into subdirectory of package output | |
407 | ;; instead of font-util-?.?.?/share/fonts/X11 | |
408 | (string-append "--with-fontrootdir=" | |
409 | %output "/share/fonts/X11")) | |
410 | #:tests? #f)) ;; No test target in tarball | |
411 | (home-page "http://terminus-font.sourceforge.net/") | |
412 | (synopsis "Simple bitmap programming font") | |
413 | (description "Terminus Font is a clean, fixed width bitmap font, designed | |
414 | for long (8 and more hours per day) work with computers.") | |
380f2ab6 | 415 | (license license:silofl1.1))) |
692784dd SB |
416 | |
417 | (define-public font-adobe-source-han-sans | |
418 | (package | |
419 | (name "font-adobe-source-han-sans") | |
2666a126 | 420 | (version "1.004") |
692784dd SB |
421 | (source (origin |
422 | (method url-fetch) | |
423 | (uri (string-append | |
424 | "https://github.com/adobe-fonts/source-han-sans/archive/" | |
2666a126 SB |
425 | version "R.tar.gz")) |
426 | (file-name (string-append "source-han-sans-" version "R.tar.gz")) | |
692784dd SB |
427 | (sha256 |
428 | (base32 | |
2666a126 SB |
429 | "1ssx0fw90sy6mj8fv8fv4dgzszpqwbmwpjnlx16g4pvaqzdmybbz")))) |
430 | (outputs '("out" ; OpenType/CFF Collection (OTC), 121 MiB. | |
692784dd SB |
431 | "cn" "jp" "kr" "tw")) ; Region-specific Subset OpenType/CFF. |
432 | (build-system trivial-build-system) | |
433 | (arguments | |
434 | `(#:modules ((guix build utils)) | |
435 | #:builder | |
436 | (begin | |
437 | (use-modules (guix build utils)) | |
438 | (let ((tar (string-append (assoc-ref %build-inputs | |
439 | "tar") | |
440 | "/bin/tar")) | |
441 | (PATH (string-append (assoc-ref %build-inputs | |
442 | "gzip") | |
443 | "/bin")) | |
444 | (install-opentype-fonts | |
445 | (lambda (fonts-dir out) | |
446 | (copy-recursively fonts-dir | |
447 | (string-append (assoc-ref %outputs out) | |
448 | "/share/fonts/opentype"))))) | |
449 | (setenv "PATH" PATH) | |
450 | (system* tar "xvf" (assoc-ref %build-inputs "source")) | |
2666a126 | 451 | (chdir (string-append "source-han-sans-" ,version "R")) |
692784dd SB |
452 | (install-opentype-fonts "OTC" "out") |
453 | (install-opentype-fonts "SubsetOTF/CN" "cn") | |
454 | (install-opentype-fonts "SubsetOTF/JP" "jp") | |
455 | (install-opentype-fonts "SubsetOTF/KR" "kr") | |
2666a126 SB |
456 | (install-opentype-fonts "SubsetOTF/TW" "tw") |
457 | (for-each delete-file (find-files %output "\\.zip$")))))) | |
692784dd SB |
458 | (native-inputs |
459 | `(("gzip" ,gzip) | |
460 | ("tar" ,tar))) | |
461 | (home-page "https://github.com/adobe-fonts/source-han-sans") | |
462 | (synopsis "Pan-CJK fonts") | |
463 | (description | |
464 | "Source Han Sans is a sans serif Pan-CJK font family that is offered in | |
465 | seven weights: ExtraLight, Light, Normal, Regular, Medium, Bold, and Heavy. | |
466 | And in several OpenType/CFF-based deployment configurations to accommodate | |
467 | various system requirements or limitations. As the name suggests, Pan-CJK | |
468 | fonts are intended to support the characters necessary to render or display | |
e881752c | 469 | text in Simplified Chinese, Traditional Chinese, Japanese, and Korean.") |
2666a126 | 470 | (license license:silofl1.1))) |
192b4802 RW |
471 | |
472 | (define-public font-wqy-zenhei | |
473 | (package | |
474 | (name "font-wqy-zenhei") | |
475 | (version "0.9.45") | |
476 | (source (origin | |
477 | (method url-fetch) | |
478 | (uri (string-append | |
de67e922 LF |
479 | "mirror://sourceforge/wqy/wqy-zenhei/" version |
480 | "%20%28Fighting-state%20RC1%29/wqy-zenhei-" | |
192b4802 RW |
481 | version ".tar.gz")) |
482 | (file-name (string-append "wqy-zenhei-" version ".tar.gz")) | |
483 | (sha256 | |
484 | (base32 | |
485 | "1mkmxq8g2hjcglb3zajfqj20r4r88l78ymsp2xyl5yav8w3f7dz4")))) | |
486 | (build-system trivial-build-system) | |
487 | (arguments | |
488 | `(#:modules ((guix build utils)) | |
489 | #:builder | |
490 | (begin | |
491 | (use-modules (guix build utils)) | |
492 | (let ((PATH (string-append (assoc-ref %build-inputs "tar") "/bin:" | |
493 | (assoc-ref %build-inputs "gzip") "/bin")) | |
494 | (font-dir (string-append (assoc-ref %outputs "out") | |
495 | "/share/fonts/wenquanyi/"))) | |
496 | (setenv "PATH" PATH) | |
497 | (mkdir-p font-dir) | |
498 | (system* "tar" "xvf" (assoc-ref %build-inputs "source")) | |
499 | (chdir "wqy-zenhei") | |
500 | (copy-file "wqy-zenhei.ttc" | |
501 | (string-append font-dir "wqy-zenhei.ttc")))))) | |
502 | (native-inputs | |
503 | `(("gzip" ,gzip) | |
504 | ("tar" ,tar))) | |
505 | (home-page "http://wenq.org/wqy2/") | |
506 | (synopsis "CJK font") | |
507 | (description | |
508 | "WenQuanYi Zen Hei is a Hei-Ti style (sans-serif type) Chinese outline | |
509 | font. It is designed for general purpose text formatting and on-screen | |
510 | display of Chinese characters and symbols from many other languages. | |
511 | WenQuanYi Zen Hei provides a rather complete coverage to Chinese Hanzi glyphs, | |
512 | including both simplified and traditional forms. The total glyph number in | |
513 | this font is over 35,000, including over 21,000 Chinese Hanzi. This font has | |
514 | full coverage to GBK(CP936) charset, CJK Unified Ideographs, as well as the | |
515 | code-points needed for zh_cn, zh_sg, zh_tw, zh_hk, zh_mo, ja (Japanese) and | |
516 | ko (Korean) locales for fontconfig.") | |
517 | ;; GPLv2 with font embedding exception | |
518 | (license license:gpl2))) | |
3f88152d RW |
519 | |
520 | (define-public font-tex-gyre | |
521 | (package | |
522 | (name "font-tex-gyre") | |
523 | (version "2.005") | |
524 | (source | |
525 | (origin | |
526 | (method url-fetch) | |
527 | (uri (string-append "http://www.gust.org.pl/projects/e-foundry/" | |
528 | "tex-gyre/whole/tg-" version "otf.zip")) | |
529 | (sha256 | |
530 | (base32 | |
531 | "0kph9l3g7jb2bpmxdbdg5zl56wacmnvdvsdn7is1gc750sqvsn31")))) | |
532 | (build-system trivial-build-system) | |
533 | (arguments | |
534 | `(#:modules ((guix build utils)) | |
535 | #:builder | |
536 | (begin | |
537 | (use-modules (guix build utils)) | |
538 | ||
539 | (let ((unzip (string-append (assoc-ref %build-inputs "unzip") | |
540 | "/bin/unzip")) | |
541 | (font-dir (string-append %output "/share/fonts/opentype"))) | |
542 | (mkdir-p font-dir) | |
543 | (system* unzip | |
544 | (assoc-ref %build-inputs "source") | |
545 | "-d" font-dir))))) | |
546 | (native-inputs | |
547 | `(("unzip" ,unzip))) | |
548 | (home-page "http://www.gust.org.pl/projects/e-foundry/tex-gyre/") | |
549 | (synopsis "Remake of Ghostscript fonts") | |
550 | (description "The TeX Gyre collection of fonts is the result of an | |
551 | extensive remake and extension of the freely available base PostScript fonts | |
552 | distributed with Ghostscript version 4.00. The collection contains the | |
553 | following fonts in the OpenType format: Adventor, Bonum, Chorus, Cursor, | |
554 | Heros, Pagella, Schola, Termes.") | |
555 | (license license:gfl1.0))) | |
761b3d44 LF |
556 | |
557 | (define-public font-anonymous-pro | |
558 | (package | |
559 | (name "font-anonymous-pro") | |
560 | (version "1.002") | |
561 | (source (origin | |
562 | (method url-fetch) | |
563 | (uri (string-append | |
564 | "http://www.marksimonson.com/assets/content/fonts/" | |
565 | "AnonymousPro-" version ".zip")) | |
566 | (sha256 | |
567 | (base32 | |
568 | "1asj6lykvxh46czbal7ymy2k861zlcdqpz8x3s5bbpqwlm3mhrl6")))) | |
569 | (build-system trivial-build-system) | |
570 | (arguments | |
571 | `(#:modules ((guix build utils)) | |
572 | #:builder | |
573 | (begin | |
574 | (use-modules (guix build utils)) | |
575 | (let ((unzip (string-append (assoc-ref %build-inputs "unzip") | |
576 | "/bin/unzip")) | |
577 | (font-dir (string-append %output "/share/fonts/truetype")) | |
578 | (doc-dir (string-append %output "/share/doc/" ,name))) | |
579 | (system* unzip (assoc-ref %build-inputs "source")) | |
580 | (mkdir-p font-dir) | |
581 | (mkdir-p doc-dir) | |
582 | (chdir (string-append "AnonymousPro-" ,version ".001")) | |
583 | (for-each (lambda (ttf) | |
584 | (copy-file ttf | |
585 | (string-append font-dir "/" ttf))) | |
586 | (find-files "." "\\.ttf$")) | |
587 | (for-each (lambda (doc) | |
588 | (copy-file doc | |
589 | (string-append doc-dir "/" doc))) | |
590 | (find-files "." "\\.txt$")))))) | |
591 | (native-inputs | |
592 | `(("unzip" ,unzip))) | |
593 | (home-page "http://www.marksimonson.com/fonts/view/anonymous-pro") | |
594 | (synopsis "Fixed-width fonts designed with coding in mind") | |
595 | (description "Anonymous Pro is a family of four fixed-width fonts designed | |
596 | with coding in mind. Anonymous Pro features an international, Unicode-based | |
597 | character set, with support for most Western and Central European Latin-based | |
598 | languages, plus Greek and Cyrillic.") | |
599 | (license license:silofl1.1))) | |
d032d965 SB |
600 | |
601 | (define-public font-gnu-unifont | |
602 | (package | |
603 | (name "font-gnu-unifont") | |
df320991 | 604 | (version "9.0.01") |
d032d965 SB |
605 | (source (origin |
606 | (method url-fetch) | |
607 | (uri (string-append | |
df320991 | 608 | "mirror://gnu/unifont/unifont-" version "/unifont-" |
d032d965 SB |
609 | version ".tar.gz")) |
610 | (sha256 | |
611 | (base32 | |
df320991 | 612 | "14z4lx6asa94i73m19lsdgzqjn9xzi8320h3dafvzq9ima94pm9b")))) |
d032d965 SB |
613 | (build-system gnu-build-system) |
614 | (outputs '("out" ; TrueType version | |
615 | "pcf" ; PCF (bitmap) version | |
616 | "psf" ; PSF (console) version | |
617 | "bin" ; Utilities to manipulate '.hex' format | |
618 | )) | |
619 | (arguments | |
620 | '(#:parallel-build? #f ; parallel build fails | |
621 | #:tests? #f ; no check target | |
622 | #:phases | |
623 | (modify-phases %standard-phases | |
624 | (replace 'configure | |
625 | (lambda _ | |
626 | (setenv "CC" "gcc"))) | |
627 | (replace | |
628 | 'install | |
629 | (lambda* (#:key outputs #:allow-other-keys) | |
630 | (let* ((ttf (string-append (assoc-ref outputs "out") | |
631 | "/share/fonts/truetype")) | |
632 | (pcf (string-append (assoc-ref outputs "pcf") | |
633 | "/share/fonts/misc")) | |
634 | (psf (string-append (assoc-ref outputs "psf") | |
635 | "/share/consolefonts")) | |
636 | (bin (assoc-ref outputs "bin"))) | |
637 | (system* "make" | |
638 | (string-append "PREFIX=" bin) | |
639 | (string-append "TTFDEST=" ttf) | |
640 | (string-append "PCFDEST=" pcf) | |
641 | (string-append "CONSOLEDEST=" psf) | |
642 | "install") | |
643 | ;; Move Texinfo file to the right place. | |
644 | (mkdir (string-append bin "/share/info")) | |
645 | (rename-file (string-append bin "/share/unifont/unifont.info.gz") | |
646 | (string-append bin "/share/info/unifont.info.gz")) | |
647 | #t)))))) | |
648 | (inputs | |
649 | `(("perl" ,perl))) ; for utilities | |
650 | (synopsis | |
651 | "Large bitmap font covering Unicode's Basic Multilingual Plane") | |
652 | (description | |
653 | "GNU Unifont is a bitmap font covering essentially all of | |
654 | Unicode's Basic Multilingual Plane. The package also includes | |
655 | utilities to ease adding new glyphs to the font.") | |
656 | (home-page "http://unifoundry.com/unifont.html") | |
657 | (license license:gpl2+))) | |
b6ecac93 J |
658 | |
659 | (define-public font-google-noto | |
660 | (package | |
661 | (name "font-google-noto") | |
662 | (version "20150929") | |
663 | (source (origin | |
664 | (method url-fetch) | |
665 | (uri (string-append "https://noto-website-2.storage.googleapis.com/" | |
666 | "pkgs/Noto-hinted.zip")) | |
667 | (sha256 | |
668 | (base32 | |
669 | "13jhpqzhsqhyby8n0ksqg155a3jyaif3nzj9anzbq8s2gn1xjyd9")))) | |
670 | (build-system trivial-build-system) | |
671 | (arguments | |
672 | `(#:modules ((guix build utils)) | |
673 | #:builder (begin | |
674 | (use-modules (guix build utils) | |
675 | (srfi srfi-26)) | |
676 | ||
677 | (let ((PATH (string-append (assoc-ref %build-inputs | |
678 | "unzip") | |
679 | "/bin")) | |
680 | (font-dir (string-append %output | |
681 | "/share/fonts/truetype"))) | |
682 | (setenv "PATH" PATH) | |
683 | (system* "unzip" (assoc-ref %build-inputs "source")) | |
684 | ||
685 | (mkdir-p font-dir) | |
686 | (for-each (lambda (ttf) | |
687 | (copy-file ttf | |
688 | (string-append font-dir "/" ttf))) | |
689 | (find-files "." "\\.ttf$")) | |
690 | (for-each (lambda (otf) | |
691 | (copy-file otf | |
692 | (string-append font-dir "/" otf))) | |
693 | (find-files "." "\\.otf$")))))) | |
694 | (native-inputs `(("unzip" ,unzip))) | |
695 | (home-page "https://www.google.com/get/noto/") | |
696 | (synopsis "Fonts aimed to cover all languages") | |
697 | (description "Googe Noto Fonts is a family of fonts aimed to support all | |
698 | languages with a consistent look and aesthetic. It's goal is to have no Unicode | |
699 | symbols unable to be displayed properly.") | |
700 | (license license:silofl1.1))) | |
aae6b4b9 | 701 | |
702 | (define-public font-un | |
703 | (package | |
704 | (name "font-un") | |
705 | (version "1.0.2-080608") | |
706 | ;; The upstream server at kldp.net is serving us broken MIME. | |
707 | ;; See <http://bugs.gnu.org/22908>. | |
708 | (source (origin | |
709 | (method url-fetch) | |
710 | (uri (list | |
711 | (string-append | |
712 | "http://krosos.sdf.org/static/unix/" | |
713 | "un-fonts-core-" version ".tar.gz") | |
714 | ;; XXX: The upstream server at kldp.net | |
715 | (string-append | |
716 | "https://kldp.net/projects/unfonts/download/4695?filename=" | |
717 | "un-fonts-core-" version ".tar.gz"))) | |
718 | (file-name (string-append name "-" version ".tar.gz")) | |
719 | (sha256 | |
720 | (base32 | |
721 | "13liaz2pmww3aqabm55la5npd08m1skh334ky7qfidxaz5s742iv")))) | |
722 | (build-system trivial-build-system) | |
723 | (arguments | |
724 | `(#:modules ((guix build utils)) | |
725 | #:builder | |
726 | (begin | |
727 | (use-modules (guix build utils)) | |
728 | ||
729 | (let ((tar (string-append (assoc-ref %build-inputs "tar") | |
730 | "/bin/tar")) | |
731 | (PATH (string-append (assoc-ref %build-inputs "gzip") | |
732 | "/bin")) | |
733 | (font-dir (string-append %output "/share/fonts/truetype")) | |
734 | (doc-dir (string-append %output "/share/doc/" ,name))) | |
735 | (setenv "PATH" PATH) | |
736 | (system* tar "xvf" (assoc-ref %build-inputs "source")) | |
737 | (mkdir-p font-dir) | |
738 | (mkdir-p doc-dir) | |
739 | (chdir (string-append "un-fonts")) | |
740 | (for-each (lambda (ttf) | |
741 | (copy-file ttf | |
742 | (string-append font-dir "/" | |
743 | (basename ttf)))) | |
744 | (find-files "." "\\.ttf$")) | |
745 | (for-each (lambda (doc) | |
746 | (copy-file doc | |
747 | (string-append doc-dir "/" | |
748 | (basename doc)))) | |
749 | '("COPYING" "README")))))) | |
750 | (native-inputs | |
751 | `(("tar" ,tar) | |
752 | ("gzip" ,gzip))) | |
753 | (home-page "https://kldp.net/projects/unfonts/") | |
754 | (synopsis "Collection of Korean fonts") | |
755 | (description | |
756 | "Un-fonts is a family of mainly Korean fonts. | |
757 | It contains the following fonts and styles: | |
758 | ||
759 | @enumerate | |
760 | @item UnBatang, UnBatangBold: serif; | |
761 | @item UnDotum, UnDotumBold: sans-serif; | |
762 | @item UnGraphic, UnGraphicBold: sans-serif style; | |
763 | @item UnDinaru, UnDinaruBold, UnDinaruLight; | |
764 | @item UnPilgi, UnPilgiBold: script; | |
765 | @item UnGungseo: cursive, brush-stroke. | |
766 | @end enumerate\n") | |
767 | (license license:gpl2+))) | |
f85cafde EB |
768 | |
769 | (define-public font-fantasque-sans | |
770 | (package | |
771 | (name "font-fantasque-sans") | |
772 | (version "1.7.1") | |
773 | (source | |
774 | (origin | |
775 | (method url-fetch) | |
776 | (uri (string-append "https://github.com/belluzj/fantasque-sans/" | |
777 | "archive/v" version ".tar.gz")) | |
778 | (file-name (string-append name "-" version ".tar.gz")) | |
779 | (sha256 | |
780 | (base32 | |
781 | "07fpy53k2x2nz5q61swkab6cfk9gw2kc4x4brsj6zjgbm16fap85")))) | |
782 | (build-system gnu-build-system) | |
783 | (native-inputs | |
784 | `(("ttfautohint" ,ttfautohint) | |
785 | ("woff-tools" ,woff-tools) | |
786 | ("fontforge" ,fontforge) | |
787 | ("woff2" ,woff2) | |
788 | ("ttf2eot" ,ttf2eot))) | |
789 | (arguments | |
790 | `(#:tests? #f ;test target intended for visual inspection | |
791 | #:phases (modify-phases %standard-phases | |
792 | (delete 'configure) ;no configuration | |
793 | (replace 'install | |
794 | ;; 'make install' wants to install to ~/.fonts, install to | |
795 | ;; output instead. | |
796 | (lambda* (#:key outputs #:allow-other-keys) | |
797 | (let* ((out (assoc-ref outputs "out")) | |
798 | (font-dir (string-append out "/share/fonts")) | |
799 | (truetype-dir (string-append font-dir "/truetype")) | |
800 | (opentype-dir (string-append font-dir "/opentype")) | |
801 | (webfonts-dir (string-append font-dir "/webfonts"))) | |
802 | (copy-recursively "OTF" opentype-dir) | |
803 | (for-each (lambda (f) (install-file f truetype-dir)) | |
804 | (find-files "." "\\.ttf$")) | |
805 | (copy-recursively "Webfonts" webfonts-dir) | |
806 | #t)))))) | |
807 | (synopsis "Font family with a monospaced variant for programmers") | |
808 | (description | |
809 | "Fantasque Sans Mono is a programming font designed with functionality in | |
810 | mind. The font includes a bold version and a good italic version with new | |
811 | glyph designs, not just an added slant.") | |
812 | (home-page "https://fontlibrary.org/en/font/fantasque-sans-mono") | |
813 | (license license:silofl1.1))) | |
73c8d39c | 814 | |
815 | (define-public font-hack | |
816 | (package | |
817 | (name "font-hack") | |
818 | (version "2.020") | |
819 | (source (origin | |
820 | (method url-fetch) | |
821 | (uri (string-append | |
822 | "https://github.com/chrissimpkins/Hack/releases/download/v" | |
823 | version "/Hack-v" | |
824 | (string-replace-substring version "." "_") | |
825 | "-ttf.zip")) | |
826 | (sha256 | |
827 | (base32 | |
828 | "16kkmc3psckw1b7k07ccn1gi5ymhlg9djh43nqjzg065g6p6d184")))) | |
829 | (build-system trivial-build-system) | |
830 | (arguments | |
831 | `(#:modules ((guix build utils)) | |
832 | #:builder (begin | |
833 | (use-modules (guix build utils) | |
834 | (srfi srfi-26)) | |
835 | ||
836 | (let ((PATH (string-append (assoc-ref %build-inputs | |
837 | "unzip") | |
838 | "/bin")) | |
839 | (font-dir (string-append %output | |
840 | "/share/fonts/truetype")) | |
841 | (doc-dir (string-append %output "/share/doc/" | |
842 | ,name "-" ,version))) | |
843 | (setenv "PATH" PATH) | |
844 | (system* "unzip" (assoc-ref %build-inputs "source")) | |
845 | ||
846 | (mkdir-p font-dir) | |
847 | (mkdir-p doc-dir) | |
848 | (for-each (lambda (ttf) | |
849 | (copy-file ttf | |
850 | (string-append font-dir "/" ttf))) | |
851 | (find-files "." "\\.ttf$")) | |
852 | (for-each (lambda (doc) | |
853 | (copy-file doc | |
854 | (string-append doc-dir "/" doc))) | |
855 | (find-files "." "\\.txt$")))))) | |
856 | (native-inputs | |
857 | `(("source" ,source) | |
858 | ("unzip" ,unzip))) | |
859 | (home-page "https://sourcefoundry.org/hack/") | |
860 | (synopsis "Typeface designed for sourcecode") | |
861 | (description | |
862 | "Hack is designed to be a workhorse typeface for code, it expands upon | |
863 | the Bitstream Vera & DejaVu projects, provides 1561 glyphs including | |
864 | powerline support.") | |
865 | (license (license:x11-style | |
866 | "https://github.com/chrissimpkins/Hack/blob/master/LICENSE.md" | |
867 | "Hack Open Font License v2.0")))) |