gnu: Add font-comic-neue.
[jackhill/guix/guix.git] / gnu / packages / fonts.scm
CommitLineData
86f1537d 1;;; GNU Guix --- Functional package management for GNU
71be99b8 2;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
b18e5945 3;;; Copyright © 2014, 2017 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>
bb0756c7 10;;; Copyright © 2016, 2017 ng0 <ng0@libertad.pw>
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>
d7284b6a 14;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
6e1d7aa9 15;;; Copyright © 2016 Marius Bakke <mbakke@fastmail.com>
c3e2a247 16;;; Copyright © 2016 Toni Reina <areina@riseup.net>
8837860c 17;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
83421fc7 18;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.com>
446e1d51 19;;; Copyright © 2017 Alex Griffin <a@ajgrf.com>
86f1537d
AE
20;;;
21;;; This file is part of GNU Guix.
22;;;
23;;; GNU Guix is free software; you can redistribute it and/or modify it
24;;; under the terms of the GNU General Public License as published by
25;;; the Free Software Foundation; either version 3 of the License, or (at
26;;; your option) any later version.
27;;;
28;;; GNU Guix is distributed in the hope that it will be useful, but
29;;; WITHOUT ANY WARRANTY; without even the implied warranty of
30;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
31;;; GNU General Public License for more details.
32;;;
33;;; You should have received a copy of the GNU General Public License
34;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
35
36(define-module (gnu packages fonts)
6e1d7aa9 37 #:use-module (ice-9 regex)
71be99b8 38 #:use-module (guix utils)
b5b73a82 39 #:use-module ((guix licenses) #:prefix license:)
86f1537d
AE
40 #:use-module (guix packages)
41 #:use-module (guix download)
d41bb065 42 #:use-module (guix build-system gnu)
86f1537d 43 #:use-module (guix build-system trivial)
56b7a338 44 #:use-module (gnu packages base)
d41bb065 45 #:use-module (gnu packages compression)
47268eec 46 #:use-module (gnu packages fontutils)
d41bb065 47 #:use-module (gnu packages perl)
47268eec
AE
48 #:use-module (gnu packages pkg-config)
49 #:use-module (gnu packages python)
d41bb065 50 #:use-module (gnu packages xorg)
47268eec 51 #:use-module (gnu packages zip))
86f1537d 52
477ac94b 53(define-public font-inconsolata
dede51a1
ED
54 (package
55 (name "font-inconsolata")
56 (version "0.80")
57 (source (origin
58 (method url-fetch)
59 (uri "http://www.levien.com/type/myfonts/Inconsolata.otf")
60 (sha256
61 (base32
62 "06js6znbcf7swn8y3b8ki416bz96ay7d3yvddqnvi88lqhbfcq8m"))))
63 (build-system trivial-build-system)
64 (arguments
65 `(#:modules ((guix build utils))
66 #:builder (begin
67 (use-modules (guix build utils))
68 (let ((font-dir (string-append %output
69 "/share/fonts/opentype"))
70 (source (assoc-ref %build-inputs "source")))
71 (mkdir-p font-dir)
72 (copy-file source
73 (string-append font-dir "/" "inconsolata.otf"))))))
74 (native-inputs `(("source" ,source)))
75 (home-page "http://levien.com/type/myfonts/inconsolata.html")
76 (synopsis "Monospace font")
77 (description "A monospace font, designed for code listings and the like,
78in print. With attention to detail for high resolution rendering.")
79 (license license:silofl1.1)))
80
e93b88f7
ED
81(define-public font-ubuntu
82 (package
83 (name "font-ubuntu")
29f9abb4 84 (version "0.83")
e93b88f7
ED
85 (source (origin
86 (method url-fetch)
29f9abb4
AK
87 (uri (string-append
88 "http://font.ubuntu.com/download/ubuntu-font-family-"
89 version ".zip"))
e93b88f7
ED
90 (sha256
91 (base32
29f9abb4 92 "0hjvq2x758dx0sfwqhzflns0ns035qm7h6ygskbx1svzg517sva5"))))
e93b88f7
ED
93 (build-system trivial-build-system)
94 (arguments
95 `(#:modules ((guix build utils))
96 #:builder (begin
97 (use-modules (guix build utils)
98 (srfi srfi-26))
99
100 (let ((PATH (string-append (assoc-ref %build-inputs
101 "unzip")
102 "/bin"))
103 (font-dir (string-append %output
104 "/share/fonts/truetype"))
105 (doc-dir (string-append %output "/share/doc/"
106 ,name "-" ,version)))
107 (setenv "PATH" PATH)
108 (system* "unzip" (assoc-ref %build-inputs "source"))
109
110 (mkdir-p font-dir)
111 (mkdir-p doc-dir)
112 (chdir (string-append "ubuntu-font-family-" ,version))
113 (for-each (lambda (ttf)
8837860c 114 (install-file ttf font-dir))
e93b88f7
ED
115 (find-files "." "\\.ttf$"))
116 (for-each (lambda (doc)
8837860c 117 (install-file doc doc-dir))
e93b88f7
ED
118 (find-files "." "\\.txt$"))))))
119 (native-inputs `(("source" ,source)
120 ("unzip" ,unzip)))
121 (home-page "http://font.ubuntu.com/")
122 (synopsis "The Ubuntu Font Family")
123 (description "The Ubuntu Font Family is a unique, custom designed font
124that has a very distinctive look and feel. This package provides the
125TrueType (TTF) files.")
126 (license
127 (license:non-copyleft
128 "http://font.ubuntu.com/ufl/ubuntu-font-licence-1.0.txt"
129 "Ubuntu Font License v1.0"))))
130
5e6bdf06 131(define-public font-dejavu
72f210ea 132 (package
5e6bdf06 133 (name "font-dejavu")
d7284b6a 134 (version "2.37")
72f210ea
MW
135 (source (origin
136 (method url-fetch)
de67e922 137 (uri (string-append "mirror://sourceforge/dejavu/dejavu/"
72f210ea
MW
138 version "/dejavu-fonts-ttf-"
139 version ".tar.bz2"))
140 (sha256
141 (base32
d7284b6a 142 "1mqpds24wfs5cmfhj57fsfs07mji2z8812i5c4pi5pbi738s977s"))))
72f210ea
MW
143 (build-system trivial-build-system)
144 (arguments
145 `(#:modules ((guix build utils))
146 #:builder (begin
147 (use-modules (guix build utils))
148
149 (let ((tar (string-append (assoc-ref %build-inputs
150 "tar")
151 "/bin/tar"))
152 (PATH (string-append (assoc-ref %build-inputs
153 "bzip2")
154 "/bin"))
155 (font-dir (string-append
156 %output "/share/fonts/truetype"))
157 (conf-dir (string-append
158 %output "/share/fontconfig/conf.avail"))
159 (doc-dir (string-append
160 %output "/share/doc/" ,name "-" ,version)))
161 (setenv "PATH" PATH)
162 (system* tar "xvf" (assoc-ref %build-inputs "source"))
163
164 (mkdir-p font-dir)
165 (mkdir-p conf-dir)
166 (mkdir-p doc-dir)
167 (chdir (string-append "dejavu-fonts-ttf-" ,version))
168 (for-each (lambda (ttf)
8837860c 169 (install-file ttf font-dir))
72f210ea
MW
170 (find-files "ttf" "\\.ttf$"))
171 (for-each (lambda (conf)
8837860c 172 (install-file conf conf-dir))
72f210ea
MW
173 (find-files "fontconfig" "\\.conf$"))
174 (for-each (lambda (doc)
8837860c 175 (install-file doc doc-dir))
72f210ea
MW
176 (find-files "." "\\.txt$|^[A-Z][A-Z]*$"))))))
177 (native-inputs `(("source" ,source)
178 ("tar" ,tar)
179 ("bzip2" ,bzip2)))
180 (home-page "http://dejavu-fonts.org/")
181 (synopsis "Vera font family derivate with additional characters")
182 (description "DejaVu provides an expanded version of the Vera font family
183aiming for quality and broader Unicode coverage while retaining the original
b4774d87 184Vera style. DejaVu currently works towards conformance to the Multilingual
72f210ea
MW
185European Standards (MES-1 and MES-2) for Unicode coverage. The DejaVu fonts
186provide serif, sans and monospaced variants.")
187 (license
188 (license:x11-style
189 "http://dejavu-fonts.org/"))))
190
5e6bdf06 191(define-public font-bitstream-vera
86f1537d 192 (package
5e6bdf06 193 (name "font-bitstream-vera")
86f1537d
AE
194 (version "1.10")
195 (source (origin
196 (method url-fetch)
197 (uri (string-append "mirror://gnome/sources/ttf-bitstream-vera/"
198 version "/ttf-bitstream-vera-"
199 version ".tar.bz2"))
200 (sha256
201 (base32
202 "1p3qs51x5327gnk71yq8cvmxc6wgx79sqxfvxcv80cdvgggjfnyv"))))
203 (build-system trivial-build-system)
204 (arguments
205 `(#:modules ((guix build utils))
206 #:builder (begin
207 (use-modules (guix build utils)
208 (srfi srfi-26))
209
210 (let ((tar (string-append (assoc-ref %build-inputs
211 "tar")
212 "/bin/tar"))
213 (PATH (string-append (assoc-ref %build-inputs
214 "bzip2")
215 "/bin"))
216 (font-dir (string-append %output
217 "/share/fonts/truetype"))
218 (doc-dir (string-append %output "/share/doc/"
219 ,name "-" ,version)))
220 (setenv "PATH" PATH)
221 (system* tar "xvf" (assoc-ref %build-inputs "source"))
222
223 (mkdir-p font-dir)
224 (mkdir-p doc-dir)
225 (chdir (string-append "ttf-bitstream-vera-" ,version))
226 (for-each (lambda (ttf)
8837860c 227 (install-file ttf font-dir))
86f1537d
AE
228 (find-files "." "\\.ttf$"))
229 (for-each (lambda (doc)
8837860c 230 (install-file doc doc-dir))
86f1537d
AE
231 (find-files "." "\\.TXT$"))))))
232 (native-inputs `(("source" ,source)
233 ("tar" ,tar)
234 ("bzip2" ,bzip2)))
07af3e5e 235 (home-page "http://www.gnome.org/fonts/")
86f1537d
AE
236 (synopsis "Bitstream Vera sans-serif typeface")
237 (description "Vera is a sans-serif typeface from Bitstream, Inc. This
238package provides the TrueType (TTF) files.")
239 (license
240 (license:x11-style
07af3e5e 241 "http://www.gnome.org/fonts/#Final_Bitstream_Vera_Fonts"))))
86f1537d 242
71be99b8
LC
243(define-public font-cantarell
244 (package
245 (name "font-abattis-cantarell")
b18e5945 246 (version "0.0.25")
71be99b8
LC
247 (source (origin
248 (method url-fetch)
249 (uri (string-append "mirror://gnome/sources/cantarell-fonts/"
250 (version-major+minor version)
251 "/cantarell-fonts-" version ".tar.xz"))
252 (sha256
253 (base32
b18e5945 254 "0zvkd8cm1cg2919v1js9qmzwa02sjl7qajj3gcvgqvai1fm2i8hl"))))
71be99b8
LC
255 (build-system gnu-build-system)
256 (home-page "https://wiki.gnome.org/Projects/CantarellFonts")
257 (synopsis "Cantarell sans-serif typeface")
258 (description "The Cantarell font family is a contemporary Humanist
259sans-serif designed for on-screen reading. It is used by GNOME@tie{}3.")
260 (license license:silofl1.1)))
261
5e6bdf06 262(define-public font-gnu-freefont-ttf
86f1537d 263 (package
5e6bdf06 264 (name "font-gnu-freefont-ttf")
47268eec 265 (version "20120503")
86f1537d
AE
266 (source (origin
267 (method url-fetch)
47268eec 268 (uri (string-append "mirror://gnu/freefont/freefont-src-"
86f1537d
AE
269 version ".tar.gz"))
270 (sha256
271 (base32
47268eec
AE
272 "0yk58blhcd4hm7nyincmqq4jrzjjk82wif2zmk1l3y2m4vif4qhd"))))
273 (build-system gnu-build-system)
86f1537d 274 (arguments
47268eec
AE
275 `(#:phases (modify-phases %standard-phases
276 (delete 'configure)
277 (replace 'install
278 (lambda _
279 (let ((doc-dir (string-append %output "/share/doc/"
280 ,name "-" ,version))
281 (font-dir (string-append %output
282 "/share/fonts/truetype")))
283 (mkdir-p doc-dir)
284 (substitute* "Makefile"
285 (("\\$\\(TMPDIR\\)") doc-dir)
286 (("sfd/\\*.ttf") ""))
287 (system* "make" "ttftar")
288 (mkdir-p font-dir)
289 (for-each (lambda (file)
8837860c 290 (install-file file font-dir))
47268eec
AE
291 (filter
292 (lambda (file) (string-suffix? "ttf" file))
293 (find-files "." "")))))))
294 #:test-target "tests"))
295 ;; replace python 3 with python 2
296 ;; python 3 support commits aren't yet released in 20120503
297 ;; so freefont needs python 2 support in fontforge
298 (native-inputs `(("fontforge" ,(package (inherit fontforge)
299 (inputs `(("python-2" ,python-2)
300 ,@(package-inputs fontforge)))))))
86f1537d
AE
301 (home-page "http://www.gnu.org/software/freefont/")
302 (synopsis "Unicode-encoded outline fonts")
303 (description
304 "The GNU Freefont project aims to provide a set of free outline
305 (PostScript Type0, TrueType, OpenType...) fonts covering the ISO
30610646/Unicode UCS (Universal Character Set).")
63e8bb12
LC
307 (license license:gpl3+)
308 (properties '((upstream-name . "freefont")
309 (ftp-directory . "/gnu/freefont")))))
d41bb065 310
16191117
AK
311(define-public font-liberation
312 (package
313 (name "font-liberation")
314 (version "2.00.1")
315 (source (origin
316 (method url-fetch)
317 (uri (string-append "https://fedorahosted.org/releases/l/i/"
318 "liberation-fonts/liberation-fonts-ttf-"
319 version ".tar.gz"))
320 (sha256
321 (base32
322 "010m4zfqan4w04b6bs9pm3gapn9hsb18bmwwgp2p6y6idj52g43q"))))
323 (build-system trivial-build-system)
324 (arguments
325 `(#:modules ((guix build utils))
326 #:builder
327 (begin
328 (use-modules (guix build utils))
329
330 (let ((tar (string-append (assoc-ref %build-inputs "tar")
331 "/bin/tar"))
332 (PATH (string-append (assoc-ref %build-inputs "gzip")
333 "/bin"))
334 (font-dir (string-append %output "/share/fonts/truetype"))
335 (doc-dir (string-append %output "/share/doc/" ,name)))
336 (setenv "PATH" PATH)
337 (system* tar "xvf" (assoc-ref %build-inputs "source"))
338 (mkdir-p font-dir)
339 (mkdir-p doc-dir)
340 (chdir (string-append "liberation-fonts-ttf-" ,version))
341 (for-each (lambda (ttf)
8837860c 342 (install-file ttf font-dir))
16191117
AK
343 (find-files "." "\\.ttf$"))
344 (for-each (lambda (doc)
8837860c 345 (install-file doc doc-dir))
16191117
AK
346 '("AUTHORS" "ChangeLog" "LICENSE" "README" "TODO"))))))
347 (native-inputs
348 `(("source" ,source)
349 ("tar" ,tar)
350 ("gzip" ,gzip)))
351 (home-page "https://fedorahosted.org/liberation-fonts/")
352 (synopsis
353 "Fonts compatible with Arial, Times New Roman, and Courier New")
354 (description
355 "The Liberation font family aims at metric compatibility with
356Arial, Times New Roman, and Courier New.
16191117
AK
357There are three sets:
358
0102fba2 359@enumerate
ec460a2a 360@item Sans (a substitute for Arial, Albany, Helvetica, Nimbus Sans L, and
16191117 361Bitstream Vera Sans);
ec460a2a 362@item Serif (a substitute for Times New Roman, Thorndale, Nimbus Roman, and
16191117 363Bitstream Vera Serif);
ec460a2a 364@item Mono (a substitute for Courier New, Cumberland, Courier, Nimbus Mono L,
16191117 365and Bitstream Vera Sans Mono).
0102fba2 366@end enumerate
16191117
AK
367
368The Liberation Fonts are sponsored by Red Hat.")
369 (license license:silofl1.1)))
370
5e6bdf06 371(define-public font-terminus
d41bb065 372 (package
5e6bdf06 373 (name "font-terminus")
acb38156 374 (version "4.40")
d41bb065
JG
375 (source
376 (origin
377 (method url-fetch)
378 (uri (string-append
0f971a04 379 "mirror://sourceforge/terminus-font/terminus-font-"
d41bb065
JG
380 version
381 "/terminus-font-"
382 version
383 ".tar.gz"))
384 (sha256
acb38156 385 (base32
386 "0487cyx5h1f0crbny5sg73a22gmym5vk1i7646gy7hgiscj2rxb4"))))
d41bb065
JG
387 (build-system gnu-build-system)
388 (native-inputs
389 `(("pkg-config" ,pkg-config)
390 ("perl" ,perl)
391 ("bdftopcf" ,bdftopcf)
b3546174 392 ("font-util" ,font-util)
d41bb065
JG
393 ("mkfontdir" ,mkfontdir)))
394 (arguments
395 `(#:configure-flags (list
396 ;; install fonts into subdirectory of package output
397 ;; instead of font-util-?.?.?/share/fonts/X11
398 (string-append "--with-fontrootdir="
399 %output "/share/fonts/X11"))
400 #:tests? #f)) ;; No test target in tarball
401 (home-page "http://terminus-font.sourceforge.net/")
402 (synopsis "Simple bitmap programming font")
b4774d87
TGR
403 (description "Terminus Font is a clean, fixed-width bitmap font, designed
404for long periods of working with computers (8 or more hours per day).")
380f2ab6 405 (license license:silofl1.1)))
692784dd
SB
406
407(define-public font-adobe-source-han-sans
408 (package
409 (name "font-adobe-source-han-sans")
2666a126 410 (version "1.004")
692784dd
SB
411 (source (origin
412 (method url-fetch)
413 (uri (string-append
414 "https://github.com/adobe-fonts/source-han-sans/archive/"
2666a126
SB
415 version "R.tar.gz"))
416 (file-name (string-append "source-han-sans-" version "R.tar.gz"))
692784dd
SB
417 (sha256
418 (base32
2666a126
SB
419 "1ssx0fw90sy6mj8fv8fv4dgzszpqwbmwpjnlx16g4pvaqzdmybbz"))))
420 (outputs '("out" ; OpenType/CFF Collection (OTC), 121 MiB.
692784dd
SB
421 "cn" "jp" "kr" "tw")) ; Region-specific Subset OpenType/CFF.
422 (build-system trivial-build-system)
423 (arguments
424 `(#:modules ((guix build utils))
425 #:builder
426 (begin
427 (use-modules (guix build utils))
428 (let ((tar (string-append (assoc-ref %build-inputs
429 "tar")
430 "/bin/tar"))
431 (PATH (string-append (assoc-ref %build-inputs
432 "gzip")
433 "/bin"))
434 (install-opentype-fonts
435 (lambda (fonts-dir out)
436 (copy-recursively fonts-dir
437 (string-append (assoc-ref %outputs out)
438 "/share/fonts/opentype")))))
439 (setenv "PATH" PATH)
440 (system* tar "xvf" (assoc-ref %build-inputs "source"))
2666a126 441 (chdir (string-append "source-han-sans-" ,version "R"))
692784dd
SB
442 (install-opentype-fonts "OTC" "out")
443 (install-opentype-fonts "SubsetOTF/CN" "cn")
444 (install-opentype-fonts "SubsetOTF/JP" "jp")
445 (install-opentype-fonts "SubsetOTF/KR" "kr")
2666a126
SB
446 (install-opentype-fonts "SubsetOTF/TW" "tw")
447 (for-each delete-file (find-files %output "\\.zip$"))))))
692784dd
SB
448 (native-inputs
449 `(("gzip" ,gzip)
450 ("tar" ,tar)))
451 (home-page "https://github.com/adobe-fonts/source-han-sans")
452 (synopsis "Pan-CJK fonts")
453 (description
454 "Source Han Sans is a sans serif Pan-CJK font family that is offered in
455seven weights: ExtraLight, Light, Normal, Regular, Medium, Bold, and Heavy.
456And in several OpenType/CFF-based deployment configurations to accommodate
457various system requirements or limitations. As the name suggests, Pan-CJK
458fonts are intended to support the characters necessary to render or display
e881752c 459text in Simplified Chinese, Traditional Chinese, Japanese, and Korean.")
2666a126 460 (license license:silofl1.1)))
192b4802
RW
461
462(define-public font-wqy-zenhei
463 (package
464 (name "font-wqy-zenhei")
465 (version "0.9.45")
466 (source (origin
467 (method url-fetch)
468 (uri (string-append
de67e922
LF
469 "mirror://sourceforge/wqy/wqy-zenhei/" version
470 "%20%28Fighting-state%20RC1%29/wqy-zenhei-"
192b4802
RW
471 version ".tar.gz"))
472 (file-name (string-append "wqy-zenhei-" version ".tar.gz"))
473 (sha256
474 (base32
475 "1mkmxq8g2hjcglb3zajfqj20r4r88l78ymsp2xyl5yav8w3f7dz4"))))
476 (build-system trivial-build-system)
477 (arguments
478 `(#:modules ((guix build utils))
479 #:builder
480 (begin
481 (use-modules (guix build utils))
482 (let ((PATH (string-append (assoc-ref %build-inputs "tar") "/bin:"
483 (assoc-ref %build-inputs "gzip") "/bin"))
484 (font-dir (string-append (assoc-ref %outputs "out")
485 "/share/fonts/wenquanyi/")))
486 (setenv "PATH" PATH)
487 (mkdir-p font-dir)
488 (system* "tar" "xvf" (assoc-ref %build-inputs "source"))
489 (chdir "wqy-zenhei")
8837860c 490 (install-file "wqy-zenhei.ttc" font-dir)))))
192b4802
RW
491 (native-inputs
492 `(("gzip" ,gzip)
493 ("tar" ,tar)))
494 (home-page "http://wenq.org/wqy2/")
495 (synopsis "CJK font")
496 (description
497 "WenQuanYi Zen Hei is a Hei-Ti style (sans-serif type) Chinese outline
498font. It is designed for general purpose text formatting and on-screen
499display of Chinese characters and symbols from many other languages.
b4774d87 500WenQuanYi Zen Hei provides a rather complete coverage of Chinese Hanzi glyphs,
192b4802
RW
501including both simplified and traditional forms. The total glyph number in
502this font is over 35,000, including over 21,000 Chinese Hanzi. This font has
b4774d87
TGR
503full coverage of the GBK (CP936) charset, CJK Unified Ideographs, as well as
504the code-points needed for zh_cn, zh_sg, zh_tw, zh_hk, zh_mo, ja (Japanese) and
505ko (Korean) locales for @code{fontconfig}.")
192b4802
RW
506 ;; GPLv2 with font embedding exception
507 (license license:gpl2)))
3f88152d 508
12b8f6b4
FS
509(define-public font-wqy-microhei
510 (package
511 (name "font-wqy-microhei")
512 (version "0.2.0-beta")
513 (source (origin
514 (method url-fetch)
515 (uri (string-append "mirror://sourceforge/wqy/wqy-microhei/"
516 version "/wqy-microhei-" version ".tar.gz"))
517 (sha256
518 (base32
519 "0gi1yxqph8xx869ichpzzxvx6y50wda5hi77lrpacdma4f0aq0i8"))))
520 (build-system trivial-build-system)
521 (arguments
522 `(#:modules ((guix build utils))
523 #:builder
524 (begin
525 (use-modules (guix build utils))
526 (let ((PATH (string-append (assoc-ref %build-inputs "tar") "/bin:"
527 (assoc-ref %build-inputs "gzip") "/bin"))
528 (font-dir (string-append (assoc-ref %outputs "out")
4dcb3db0 529 "/share/fonts/wenquanyi")))
12b8f6b4 530 (mkdir-p font-dir)
4dcb3db0 531 (setenv "PATH" PATH)
12b8f6b4 532 (system* "tar" "xvf" (assoc-ref %build-inputs "source"))
4dcb3db0 533 (install-file "wqy-microhei/wqy-microhei.ttc" font-dir)))))
12b8f6b4
FS
534 (native-inputs
535 `(("gzip" ,gzip)
536 ("tar" ,tar)))
537 (home-page "http://wenq.org/wqy2/")
538 (synopsis "CJK font")
539 (description
540 "WenQuanYi Micro Hei is a Sans-Serif style (also known as Hei, Gothic or
541Dotum among the Chinese/Japanese/Korean users) high quality CJK outline font.
542It was derived from \"Droid Sans Fallback\" and \"Droid Sans\" released by
543Google Inc. This font contains all the unified CJK Han glyphs in the range of
544U+4E00-U+9FC3 defined in Unicode Standard 5.1, together with many other
545languages unicode blocks, including Latins, Extended Latins, Hanguls and
546Kanas. The font file is extremely compact (~4M) compared with most known CJK
547fonts.")
548 ;; This font is licensed under Apache2.0 or GPLv3 with font embedding
549 ;; exceptions.
550 (license license:gpl3)))
551
3f88152d
RW
552(define-public font-tex-gyre
553 (package
554 (name "font-tex-gyre")
555 (version "2.005")
556 (source
557 (origin
558 (method url-fetch)
559 (uri (string-append "http://www.gust.org.pl/projects/e-foundry/"
560 "tex-gyre/whole/tg-" version "otf.zip"))
561 (sha256
562 (base32
563 "0kph9l3g7jb2bpmxdbdg5zl56wacmnvdvsdn7is1gc750sqvsn31"))))
564 (build-system trivial-build-system)
565 (arguments
566 `(#:modules ((guix build utils))
567 #:builder
568 (begin
569 (use-modules (guix build utils))
570
571 (let ((unzip (string-append (assoc-ref %build-inputs "unzip")
572 "/bin/unzip"))
573 (font-dir (string-append %output "/share/fonts/opentype")))
574 (mkdir-p font-dir)
575 (system* unzip
576 (assoc-ref %build-inputs "source")
577 "-d" font-dir)))))
578 (native-inputs
579 `(("unzip" ,unzip)))
580 (home-page "http://www.gust.org.pl/projects/e-foundry/tex-gyre/")
581 (synopsis "Remake of Ghostscript fonts")
582 (description "The TeX Gyre collection of fonts is the result of an
583extensive remake and extension of the freely available base PostScript fonts
584distributed with Ghostscript version 4.00. The collection contains the
585following fonts in the OpenType format: Adventor, Bonum, Chorus, Cursor,
586Heros, Pagella, Schola, Termes.")
587 (license license:gfl1.0)))
761b3d44
LF
588
589(define-public font-anonymous-pro
590 (package
591 (name "font-anonymous-pro")
592 (version "1.002")
593 (source (origin
594 (method url-fetch)
595 (uri (string-append
596 "http://www.marksimonson.com/assets/content/fonts/"
597 "AnonymousPro-" version ".zip"))
598 (sha256
599 (base32
600 "1asj6lykvxh46czbal7ymy2k861zlcdqpz8x3s5bbpqwlm3mhrl6"))))
601 (build-system trivial-build-system)
602 (arguments
603 `(#:modules ((guix build utils))
604 #:builder
605 (begin
606 (use-modules (guix build utils))
607 (let ((unzip (string-append (assoc-ref %build-inputs "unzip")
608 "/bin/unzip"))
609 (font-dir (string-append %output "/share/fonts/truetype"))
610 (doc-dir (string-append %output "/share/doc/" ,name)))
611 (system* unzip (assoc-ref %build-inputs "source"))
612 (mkdir-p font-dir)
613 (mkdir-p doc-dir)
614 (chdir (string-append "AnonymousPro-" ,version ".001"))
615 (for-each (lambda (ttf)
8837860c 616 (install-file ttf font-dir))
761b3d44
LF
617 (find-files "." "\\.ttf$"))
618 (for-each (lambda (doc)
8837860c 619 (install-file doc doc-dir))
761b3d44
LF
620 (find-files "." "\\.txt$"))))))
621 (native-inputs
622 `(("unzip" ,unzip)))
623 (home-page "http://www.marksimonson.com/fonts/view/anonymous-pro")
624 (synopsis "Fixed-width fonts designed with coding in mind")
625 (description "Anonymous Pro is a family of four fixed-width fonts designed
626with coding in mind. Anonymous Pro features an international, Unicode-based
627character set, with support for most Western and Central European Latin-based
628languages, plus Greek and Cyrillic.")
629 (license license:silofl1.1)))
d032d965
SB
630
631(define-public font-gnu-unifont
632 (package
633 (name "font-gnu-unifont")
c88bee0a 634 (version "9.0.06")
d032d965
SB
635 (source (origin
636 (method url-fetch)
637 (uri (string-append
df320991 638 "mirror://gnu/unifont/unifont-" version "/unifont-"
d032d965
SB
639 version ".tar.gz"))
640 (sha256
641 (base32
c88bee0a 642 "0ybyraxi8pngibazfq4zlsqmg8kn5xlhvaiwnxb11znhfi61vi87"))))
d032d965
SB
643 (build-system gnu-build-system)
644 (outputs '("out" ; TrueType version
645 "pcf" ; PCF (bitmap) version
646 "psf" ; PSF (console) version
647 "bin" ; Utilities to manipulate '.hex' format
648 ))
649 (arguments
650 '(#:parallel-build? #f ; parallel build fails
651 #:tests? #f ; no check target
652 #:phases
653 (modify-phases %standard-phases
c88bee0a
EF
654 (replace
655 'configure
656 (lambda _ (setenv "CC" "gcc") #t))
d032d965
SB
657 (replace
658 'install
659 (lambda* (#:key outputs #:allow-other-keys)
660 (let* ((ttf (string-append (assoc-ref outputs "out")
661 "/share/fonts/truetype"))
662 (pcf (string-append (assoc-ref outputs "pcf")
663 "/share/fonts/misc"))
664 (psf (string-append (assoc-ref outputs "psf")
665 "/share/consolefonts"))
666 (bin (assoc-ref outputs "bin")))
667 (system* "make"
668 (string-append "PREFIX=" bin)
669 (string-append "TTFDEST=" ttf)
670 (string-append "PCFDEST=" pcf)
671 (string-append "CONSOLEDEST=" psf)
672 "install")
673 ;; Move Texinfo file to the right place.
674 (mkdir (string-append bin "/share/info"))
675 (rename-file (string-append bin "/share/unifont/unifont.info.gz")
676 (string-append bin "/share/info/unifont.info.gz"))
677 #t))))))
678 (inputs
679 `(("perl" ,perl))) ; for utilities
680 (synopsis
681 "Large bitmap font covering Unicode's Basic Multilingual Plane")
682 (description
683 "GNU Unifont is a bitmap font covering essentially all of
684Unicode's Basic Multilingual Plane. The package also includes
685utilities to ease adding new glyphs to the font.")
686 (home-page "http://unifoundry.com/unifont.html")
687 (license license:gpl2+)))
b6ecac93
J
688
689(define-public font-google-noto
690 (package
691 (name "font-google-noto")
692 (version "20150929")
693 (source (origin
694 (method url-fetch)
695 (uri (string-append "https://noto-website-2.storage.googleapis.com/"
696 "pkgs/Noto-hinted.zip"))
697 (sha256
698 (base32
699 "13jhpqzhsqhyby8n0ksqg155a3jyaif3nzj9anzbq8s2gn1xjyd9"))))
700 (build-system trivial-build-system)
701 (arguments
702 `(#:modules ((guix build utils))
703 #:builder (begin
704 (use-modules (guix build utils)
705 (srfi srfi-26))
706
707 (let ((PATH (string-append (assoc-ref %build-inputs
708 "unzip")
709 "/bin"))
710 (font-dir (string-append %output
711 "/share/fonts/truetype")))
712 (setenv "PATH" PATH)
713 (system* "unzip" (assoc-ref %build-inputs "source"))
714
715 (mkdir-p font-dir)
716 (for-each (lambda (ttf)
8837860c 717 (install-file ttf font-dir))
b6ecac93
J
718 (find-files "." "\\.ttf$"))
719 (for-each (lambda (otf)
8837860c 720 (install-file otf font-dir))
b6ecac93
J
721 (find-files "." "\\.otf$"))))))
722 (native-inputs `(("unzip" ,unzip)))
723 (home-page "https://www.google.com/get/noto/")
b4774d87
TGR
724 (synopsis "Fonts to cover all languages")
725 (description "Google Noto Fonts is a family of fonts designed to support
726all languages with a consistent look and aesthetic. Its goal is to properly
727display all Unicode symbols.")
b6ecac93 728 (license license:silofl1.1)))
aae6b4b9 729
bb0756c7 730(define-public font-google-roboto
731 (package
732 (name "font-google-roboto")
733 (version "2.136")
734 (source
735 (origin
736 (method url-fetch)
737 (uri (string-append "https://github.com/google/roboto/releases/download/"
738 "v" version "/roboto-hinted.zip"))
739 (file-name (string-append name "-" version ".zip"))
740 (sha256
741 (base32
742 "0spscx08fad7i8qs7icns96iwcapniq8lwwqqvbf7bamvs8qfln4"))))
743 (native-inputs `(("unzip" ,unzip)))
744 (build-system trivial-build-system)
745 (arguments
746 `(#:modules ((guix build utils))
747 #:builder (begin
748 (use-modules (guix build utils)
749 (srfi srfi-26))
750
751 (let ((PATH (string-append (assoc-ref %build-inputs
752 "unzip")
753 "/bin"))
754 (font-dir (string-append %output
755 "/share/fonts/truetype")))
756 (setenv "PATH" PATH)
757 (system* "unzip" (assoc-ref %build-inputs "source"))
758
759 (mkdir-p font-dir)
760 (chdir "roboto-hinted")
761 (for-each (lambda (ttf)
4dcb3db0 762 (install-file ttf font-dir))
bb0756c7 763 (find-files "." "\\.ttf$"))))))
764 (home-page "https://github.com/google/roboto")
765 (synopsis "The Roboto family of fonts")
766 (description
767 "Roboto is Google’s signature family of fonts, the default font on Android
768and Chrome OS, and the recommended font for the
769visual language \"Material Design\".")
770 (license license:asl2.0)))
771
aae6b4b9 772(define-public font-un
773 (package
774 (name "font-un")
775 (version "1.0.2-080608")
aae6b4b9 776 (source (origin
777 (method url-fetch)
99a61dad 778 (uri (string-append
779 "https://kldp.net/unfonts/release/2607-"
780 "un-fonts-core-" version ".tar.gz"))
aae6b4b9 781 (file-name (string-append name "-" version ".tar.gz"))
782 (sha256
783 (base32
784 "13liaz2pmww3aqabm55la5npd08m1skh334ky7qfidxaz5s742iv"))))
785 (build-system trivial-build-system)
786 (arguments
787 `(#:modules ((guix build utils))
788 #:builder
789 (begin
790 (use-modules (guix build utils))
791
792 (let ((tar (string-append (assoc-ref %build-inputs "tar")
793 "/bin/tar"))
794 (PATH (string-append (assoc-ref %build-inputs "gzip")
795 "/bin"))
796 (font-dir (string-append %output "/share/fonts/truetype"))
797 (doc-dir (string-append %output "/share/doc/" ,name)))
798 (setenv "PATH" PATH)
799 (system* tar "xvf" (assoc-ref %build-inputs "source"))
800 (mkdir-p font-dir)
801 (mkdir-p doc-dir)
802 (chdir (string-append "un-fonts"))
803 (for-each (lambda (ttf)
8837860c 804 (install-file ttf font-dir))
aae6b4b9 805 (find-files "." "\\.ttf$"))
806 (for-each (lambda (doc)
8837860c 807 (install-file doc doc-dir))
aae6b4b9 808 '("COPYING" "README"))))))
809 (native-inputs
810 `(("tar" ,tar)
811 ("gzip" ,gzip)))
812 (home-page "https://kldp.net/projects/unfonts/")
813 (synopsis "Collection of Korean fonts")
814 (description
815 "Un-fonts is a family of mainly Korean fonts.
816It contains the following fonts and styles:
817
818@enumerate
819@item UnBatang, UnBatangBold: serif;
820@item UnDotum, UnDotumBold: sans-serif;
821@item UnGraphic, UnGraphicBold: sans-serif style;
822@item UnDinaru, UnDinaruBold, UnDinaruLight;
823@item UnPilgi, UnPilgiBold: script;
824@item UnGungseo: cursive, brush-stroke.
825@end enumerate\n")
826 (license license:gpl2+)))
f85cafde
EB
827
828(define-public font-fantasque-sans
829 (package
830 (name "font-fantasque-sans")
831 (version "1.7.1")
832 (source
833 (origin
834 (method url-fetch)
835 (uri (string-append "https://github.com/belluzj/fantasque-sans/"
836 "archive/v" version ".tar.gz"))
837 (file-name (string-append name "-" version ".tar.gz"))
838 (sha256
839 (base32
840 "07fpy53k2x2nz5q61swkab6cfk9gw2kc4x4brsj6zjgbm16fap85"))))
841 (build-system gnu-build-system)
842 (native-inputs
843 `(("ttfautohint" ,ttfautohint)
844 ("woff-tools" ,woff-tools)
845 ("fontforge" ,fontforge)
846 ("woff2" ,woff2)
847 ("ttf2eot" ,ttf2eot)))
848 (arguments
849 `(#:tests? #f ;test target intended for visual inspection
850 #:phases (modify-phases %standard-phases
851 (delete 'configure) ;no configuration
852 (replace 'install
853 ;; 'make install' wants to install to ~/.fonts, install to
854 ;; output instead.
855 (lambda* (#:key outputs #:allow-other-keys)
856 (let* ((out (assoc-ref outputs "out"))
857 (font-dir (string-append out "/share/fonts"))
858 (truetype-dir (string-append font-dir "/truetype"))
859 (opentype-dir (string-append font-dir "/opentype"))
860 (webfonts-dir (string-append font-dir "/webfonts")))
861 (copy-recursively "OTF" opentype-dir)
862 (for-each (lambda (f) (install-file f truetype-dir))
863 (find-files "." "\\.ttf$"))
864 (copy-recursively "Webfonts" webfonts-dir)
865 #t))))))
866 (synopsis "Font family with a monospaced variant for programmers")
867 (description
868 "Fantasque Sans Mono is a programming font designed with functionality in
869mind. The font includes a bold version and a good italic version with new
870glyph designs, not just an added slant.")
871 (home-page "https://fontlibrary.org/en/font/fantasque-sans-mono")
872 (license license:silofl1.1)))
73c8d39c 873
874(define-public font-hack
875 (package
876 (name "font-hack")
877 (version "2.020")
878 (source (origin
879 (method url-fetch)
880 (uri (string-append
881 "https://github.com/chrissimpkins/Hack/releases/download/v"
882 version "/Hack-v"
883 (string-replace-substring version "." "_")
884 "-ttf.zip"))
885 (sha256
886 (base32
887 "16kkmc3psckw1b7k07ccn1gi5ymhlg9djh43nqjzg065g6p6d184"))))
888 (build-system trivial-build-system)
889 (arguments
890 `(#:modules ((guix build utils))
891 #:builder (begin
892 (use-modules (guix build utils)
893 (srfi srfi-26))
894
895 (let ((PATH (string-append (assoc-ref %build-inputs
896 "unzip")
897 "/bin"))
898 (font-dir (string-append %output
b94ee996 899 "/share/fonts/truetype")))
73c8d39c 900 (setenv "PATH" PATH)
901 (system* "unzip" (assoc-ref %build-inputs "source"))
902
903 (mkdir-p font-dir)
73c8d39c 904 (for-each (lambda (ttf)
8837860c 905 (install-file ttf font-dir))
b94ee996 906 (find-files "." "\\.ttf$"))))))
73c8d39c 907 (native-inputs
908 `(("source" ,source)
909 ("unzip" ,unzip)))
910 (home-page "https://sourcefoundry.org/hack/")
b4774d87 911 (synopsis "Typeface designed for source code")
73c8d39c 912 (description
b4774d87
TGR
913 "Hack is designed to be a workhorse typeface for code. It expands upon
914the Bitstream Vera & DejaVu projects, provides 1561 glyphs, and includes
915Powerline support.")
73c8d39c 916 (license (license:x11-style
917 "https://github.com/chrissimpkins/Hack/blob/master/LICENSE.md"
918 "Hack Open Font License v2.0"))))
6e1d7aa9
MB
919
920(define-public font-adobe-source-code-pro
921 (package
922 (name "font-adobe-source-code-pro")
923 (version "2.030R-ro-1.050R-it")
924 (source (origin
925 (method url-fetch)
926 (uri (string-append
927 "https://github.com/adobe-fonts/source-code-pro/archive/"
928 (regexp-substitute/global
929 ;; The upstream tag uses "/" between the roman and italic
930 ;; versions, so substitute our "-" separator here.
931 #f "R-ro-" version 'pre "R-ro/" 'post) ".tar.gz"))
932 (file-name (string-append name "-" version ".tar.gz"))
933 (sha256
934 (base32
935 "0arhhsf3i7ss39ykn73d1j8k4n8vx7115xph6jwkd970p1cxvr54"))))
936 (build-system trivial-build-system)
937 (arguments
938 `(#:modules ((guix build utils))
939 #:builder
940 (begin
941 (use-modules (guix build utils))
942 (let ((tar (string-append (assoc-ref %build-inputs "tar")
943 "/bin/tar"))
944 (PATH (string-append (assoc-ref %build-inputs "gzip")
945 "/bin"))
946 (font-dir (string-append %output "/share/fonts/opentype")))
947 (setenv "PATH" PATH)
948 (mkdir-p font-dir)
949 (zero? (system* tar "-C" font-dir "--strip-components=2"
950 "-xvf" (assoc-ref %build-inputs "source")
951 (string-append "source-code-pro-"
952 ,version "/OTF")))))))
953 (native-inputs
954 `(("gzip" ,gzip)
955 ("tar" ,tar)))
956 (home-page "https://github.com/adobe-fonts/source-code-pro")
957 (synopsis
958 "Monospaced font family for user interface and coding environments")
959 (description
960 "Source Code Pro is a set of monospaced OpenType fonts that have been
961designed to work well in user interface environments.")
962 (license license:silofl1.1)))
c3e2a247
TR
963
964(define-public font-fira-mono
965 (package
966 (name "font-fira-mono")
967 (version "3.206")
968 (source (origin
969 (method url-fetch)
970 (uri (string-append "https://carrois.com/downloads/fira_mono_3_2/"
971 "FiraMonoFonts"
972 (string-replace-substring version "." "")
973 ".zip"))
974 (sha256
975 (base32
976 "1z65x0dw5dq6rs6p9wyfrir50rlh95vgzsxr8jcd40nqazw4jhpi"))))
977 (build-system trivial-build-system)
978 (arguments
979 `(#:modules ((guix build utils))
980 #:builder
981 (begin
982 (use-modules (guix build utils))
983 (let ((unzip (string-append (assoc-ref %build-inputs "unzip")
984 "/bin/unzip"))
985 (font-dir (string-append %output "/share/fonts/opentype")))
986 (mkdir-p font-dir)
987 (system* unzip
988 "-j"
989 (assoc-ref %build-inputs "source")
990 "*.otf"
991 "-d" font-dir)))))
992 (native-inputs
993 `(("unzip" ,unzip)))
994 (home-page "http://mozilla.github.io/Fira/")
995 (synopsis "Mozilla's monospace font")
996 (description "This is the typeface used by Mozilla in Firefox OS.")
997 (license license:silofl1.1)))
83421fc7
JMSG
998
999(define-public font-awesome
1000 (package
1001 (name "font-awesome")
1002 (version "4.7.0")
1003 (source (origin
1004 (method url-fetch)
1005 (uri (string-append "http://fontawesome.io/assets/"
1006 name "-" version ".zip"))
1007 (sha256
1008 (base32
1009 "1frhmw41lnnm9rda2zs202pvfi5vzlrsw4xfp4mswl0qgws61mcd"))))
1010 (build-system trivial-build-system)
1011 (native-inputs
1012 `(("unzip" ,unzip)))
1013 (arguments
1014 `(#:modules ((guix build utils))
1015 #:builder (begin
1016 (use-modules (guix build utils))
1017 (let* ((font-dir (string-append %output
1018 "/share/fonts/opentype"))
1019 (source (assoc-ref %build-inputs "source"))
1020 (src-otf-file (string-append "font-awesome-"
1021 ,version
1022 "/fonts/FontAwesome.otf"))
1023 (dest-otf-file (string-append font-dir "/FontAwesome.otf"))
1024 (unzip (assoc-ref %build-inputs "unzip")))
1025 (setenv "PATH" (string-append unzip "/bin"))
1026 (mkdir-p font-dir)
1027 (system* "unzip" source "-d" ".")
1028 (copy-file src-otf-file dest-otf-file)))))
1029 (home-page "http://fontawesome.io")
1030 (synopsis "Font that contains a rich iconset")
1031 (description
1032 "Font Awesome is a full suite of pictographic icons for easy scalable
1033vector graphics.")
1034 (license license:silofl1.1)))
446e1d51
AG
1035
1036(define-public font-comic-neue
1037 (package
1038 (name "font-comic-neue")
1039 (version "2.3")
1040 (source (origin
1041 (method url-fetch)
1042 (uri (string-append
1043 "http://www.comicneue.com/comic-neue-" version ".zip"))
1044 (sha256
1045 (base32
1046 "1695hkpd8kqnr2a88p8xs496slgzxjjkzpa9aa33ml3pnh7519zk"))))
1047 (build-system trivial-build-system)
1048 (arguments
1049 `(#:modules ((guix build utils))
1050 #:builder (begin
1051 (use-modules (guix build utils))
1052 (let ((font-dir (string-append %output
1053 "/share/fonts/truetype"))
1054 (source (assoc-ref %build-inputs "source"))
1055 (unzip (string-append (assoc-ref %build-inputs "unzip")
1056 "/bin/unzip")))
1057 (mkdir-p font-dir)
1058 (system* unzip source)
1059 (with-directory-excursion
1060 (string-append "Web")
1061 (for-each (lambda (ttf)
1062 (install-file ttf font-dir))
1063 (find-files "." "\\.ttf$")))))))
1064 (native-inputs `(("unzip" ,unzip)))
1065 (home-page "http://www.comicneue.com/")
1066 (synopsis "Font that fixes the shortcomings of Comic Sans")
1067 (description
1068 "Comic Neue is a font that attempts to create a respectable casual
1069typeface, by mimicking Comic Sans while fixing its most obvious shortcomings.")
1070 (license license:silofl1.1)))