gnu: font-awesome: Use 'font-build-system'.
[jackhill/guix/guix.git] / gnu / packages / fonts.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2014, 2017 Mark H Weaver <mhw@netris.org>
4 ;;; Copyright © 2014 Joshua Grant <tadni@riseup.net>
5 ;;; Copyright © 2014 Alex Kost <alezost@gmail.com>
6 ;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
7 ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
8 ;;; Copyright © 2015, 2017 Ricardo Wurmus <rekado@elephly.net>
9 ;;; Copyright © 2015, 2016 Leo Famulari <leo@famulari.name>
10 ;;; Copyright © 2016, 2017 ng0 <ng0@no-reply.pragmatique.xyz>
11 ;;; Copyright © 2016 Jookia <166291@gmail.com>
12 ;;; Copyright © 2016 Eric Bavier <bavier@member.fsf.org>
13 ;;; Copyright © 2016 Dmitry Nikolaev <cameltheman@gmail.com>
14 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
15 ;;; Copyright © 2016 Marius Bakke <mbakke@fastmail.com>
16 ;;; Copyright © 2016 Toni Reina <areina@riseup.net>
17 ;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
18 ;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.com>
19 ;;; Copyright © 2017 Alex Griffin <a@ajgrf.com>
20 ;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org>
21 ;;; Copyright © 2017 Brendan Tildesley <brendan.tildesley@openmailbox.org>
22 ;;;
23 ;;; This file is part of GNU Guix.
24 ;;;
25 ;;; GNU Guix is free software; you can redistribute it and/or modify it
26 ;;; under the terms of the GNU General Public License as published by
27 ;;; the Free Software Foundation; either version 3 of the License, or (at
28 ;;; your option) any later version.
29 ;;;
30 ;;; GNU Guix is distributed in the hope that it will be useful, but
31 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
32 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
33 ;;; GNU General Public License for more details.
34 ;;;
35 ;;; You should have received a copy of the GNU General Public License
36 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
37
38 (define-module (gnu packages fonts)
39 #:use-module (ice-9 regex)
40 #:use-module (guix utils)
41 #:use-module ((guix licenses) #:prefix license:)
42 #:use-module (guix packages)
43 #:use-module (guix download)
44 #:use-module (guix git-download)
45 #:use-module (guix build-system font)
46 #:use-module (guix build-system gnu)
47 #:use-module (guix build-system trivial)
48 #:use-module (gnu packages base)
49 #:use-module (gnu packages compression)
50 #:use-module (gnu packages fontutils)
51 #:use-module (gnu packages golang)
52 #:use-module (gnu packages perl)
53 #:use-module (gnu packages pkg-config)
54 #:use-module (gnu packages python)
55 #:use-module (gnu packages xorg)
56 #:use-module (gnu packages zip))
57
58 (define-public font-inconsolata
59 (package
60 (name "font-inconsolata")
61 (version "0.80")
62 (source (origin
63 (method url-fetch)
64 (uri "http://www.levien.com/type/myfonts/Inconsolata.otf")
65 (sha256
66 (base32
67 "06js6znbcf7swn8y3b8ki416bz96ay7d3yvddqnvi88lqhbfcq8m"))))
68 (build-system font-build-system)
69 (home-page "http://levien.com/type/myfonts/inconsolata.html")
70 (synopsis "Monospace font")
71 (description "A monospace font, designed for code listings and the like,
72 in print. With attention to detail for high resolution rendering.")
73 (license license:silofl1.1)))
74
75 (define-public font-ubuntu
76 (package
77 (name "font-ubuntu")
78 (version "0.83")
79 (source (origin
80 (method url-fetch)
81 (uri (string-append
82 "http://font.ubuntu.com/download/ubuntu-font-family-"
83 version ".zip"))
84 (sha256
85 (base32
86 "0hjvq2x758dx0sfwqhzflns0ns035qm7h6ygskbx1svzg517sva5"))))
87 (build-system font-build-system)
88 (home-page "http://font.ubuntu.com/")
89 (synopsis "The Ubuntu Font Family")
90 (description "The Ubuntu Font Family is a unique, custom designed font
91 that has a very distinctive look and feel. This package provides the
92 TrueType (TTF) files.")
93 (license
94 (license:non-copyleft
95 "http://font.ubuntu.com/ufl/ubuntu-font-licence-1.0.txt"
96 "Ubuntu Font License v1.0"))))
97
98 (define-public font-dejavu
99 (package
100 (name "font-dejavu")
101 (version "2.37")
102 (source (origin
103 (method url-fetch)
104 (uri (string-append "mirror://sourceforge/dejavu/dejavu/"
105 version "/dejavu-fonts-ttf-"
106 version ".tar.bz2"))
107 (sha256
108 (base32
109 "1mqpds24wfs5cmfhj57fsfs07mji2z8812i5c4pi5pbi738s977s"))))
110 (build-system trivial-build-system)
111 (build-system font-build-system)
112 (arguments
113 `(#:phases
114 (modify-phases %standard-phases
115 (add-after 'install 'install-conf
116 (lambda* (#:key outputs #:allow-other-keys)
117 (let ((conf-dir (string-append (assoc-ref outputs "out")
118 "/share/fontconfig/conf.avail")))
119 (copy-recursively "fontconfig" conf-dir)))))))
120 (home-page "http://dejavu-fonts.org/")
121 (synopsis "Vera font family derivate with additional characters")
122 (description "DejaVu provides an expanded version of the Vera font family
123 aiming for quality and broader Unicode coverage while retaining the original
124 Vera style. DejaVu currently works towards conformance to the Multilingual
125 European Standards (MES-1 and MES-2) for Unicode coverage. The DejaVu fonts
126 provide serif, sans and monospaced variants.")
127 (license
128 (license:x11-style
129 "http://dejavu-fonts.org/"))))
130
131 (define-public font-bitstream-vera
132 (package
133 (name "font-bitstream-vera")
134 (version "1.10")
135 (source (origin
136 (method url-fetch)
137 (uri (string-append "mirror://gnome/sources/ttf-bitstream-vera/"
138 version "/ttf-bitstream-vera-"
139 version ".tar.bz2"))
140 (sha256
141 (base32
142 "1p3qs51x5327gnk71yq8cvmxc6wgx79sqxfvxcv80cdvgggjfnyv"))))
143 (build-system font-build-system)
144 (home-page "http://www.gnome.org/fonts/")
145 (synopsis "Bitstream Vera sans-serif typeface")
146 (description "Vera is a sans-serif typeface from Bitstream, Inc. This
147 package provides the TrueType (TTF) files.")
148 (license
149 (license:fsdg-compatible
150 "https://www.gnome.org/fonts/#Final_Bitstream_Vera_Fonts"
151 "The Font Software may be sold as part of a larger software package but
152 no copy of one or more of the Font Software typefaces may be sold by
153 itself."))))
154
155 (define-public font-cantarell
156 (package
157 (name "font-abattis-cantarell")
158 (version "0.0.25")
159 (source (origin
160 (method url-fetch)
161 (uri (string-append "mirror://gnome/sources/cantarell-fonts/"
162 (version-major+minor version)
163 "/cantarell-fonts-" version ".tar.xz"))
164 (sha256
165 (base32
166 "0zvkd8cm1cg2919v1js9qmzwa02sjl7qajj3gcvgqvai1fm2i8hl"))))
167 (build-system gnu-build-system)
168 (home-page "https://wiki.gnome.org/Projects/CantarellFonts")
169 (synopsis "Cantarell sans-serif typeface")
170 (description "The Cantarell font family is a contemporary Humanist
171 sans-serif designed for on-screen reading. It is used by GNOME@tie{}3.")
172 (license license:silofl1.1)))
173
174 (define-public font-gnu-freefont-ttf
175 (package
176 (name "font-gnu-freefont-ttf")
177 (version "20120503")
178 (source (origin
179 (method url-fetch)
180 (uri (string-append "mirror://gnu/freefont/freefont-src-"
181 version ".tar.gz"))
182 (sha256
183 (base32
184 "0yk58blhcd4hm7nyincmqq4jrzjjk82wif2zmk1l3y2m4vif4qhd"))))
185 (build-system gnu-build-system)
186 (arguments
187 `(#:phases (modify-phases %standard-phases
188 (delete 'configure)
189 (replace 'install
190 (lambda _
191 (let ((doc-dir (string-append %output "/share/doc/"
192 ,name "-" ,version))
193 (font-dir (string-append %output
194 "/share/fonts/truetype")))
195 (mkdir-p doc-dir)
196 (substitute* "Makefile"
197 (("\\$\\(TMPDIR\\)") doc-dir)
198 (("sfd/\\*.ttf") ""))
199 (system* "make" "ttftar")
200 (mkdir-p font-dir)
201 (for-each (lambda (file)
202 (install-file file font-dir))
203 (filter
204 (lambda (file) (string-suffix? "ttf" file))
205 (find-files "." "")))))))
206 #:test-target "tests"))
207 ;; replace python 3 with python 2
208 ;; python 3 support commits aren't yet released in 20120503
209 ;; so freefont needs python 2 support in fontforge
210 (native-inputs `(("fontforge" ,(package (inherit fontforge)
211 (inputs `(("python-2" ,python-2)
212 ,@(package-inputs fontforge)))))))
213 (home-page "https://www.gnu.org/software/freefont/")
214 (synopsis "Unicode-encoded outline fonts")
215 (description
216 "The GNU Freefont project aims to provide a set of free outline
217 (PostScript Type0, TrueType, OpenType...) fonts covering the ISO
218 10646/Unicode UCS (Universal Character Set).")
219 (license license:gpl3+)
220 (properties '((upstream-name . "freefont")
221 (ftp-directory . "/gnu/freefont")))))
222
223 (define-public font-liberation
224 (package
225 (name "font-liberation")
226 (version "2.00.1")
227 (source (origin
228 (method url-fetch)
229 (uri (string-append "https://releases.pagure.org/"
230 "liberation-fonts/liberation-fonts-ttf-"
231 version ".tar.gz"))
232 (sha256
233 (base32
234 "010m4zfqan4w04b6bs9pm3gapn9hsb18bmwwgp2p6y6idj52g43q"))))
235 (build-system trivial-build-system)
236 (arguments
237 `(#:modules ((guix build utils))
238 #:builder
239 (begin
240 (use-modules (guix build utils))
241
242 (let ((tar (string-append (assoc-ref %build-inputs "tar")
243 "/bin/tar"))
244 (PATH (string-append (assoc-ref %build-inputs "gzip")
245 "/bin"))
246 (font-dir (string-append %output "/share/fonts/truetype"))
247 (doc-dir (string-append %output "/share/doc/" ,name)))
248 (setenv "PATH" PATH)
249 (system* tar "xvf" (assoc-ref %build-inputs "source"))
250 (mkdir-p font-dir)
251 (mkdir-p doc-dir)
252 (chdir (string-append "liberation-fonts-ttf-" ,version))
253 (for-each (lambda (ttf)
254 (install-file ttf font-dir))
255 (find-files "." "\\.ttf$"))
256 (for-each (lambda (doc)
257 (install-file doc doc-dir))
258 '("AUTHORS" "ChangeLog" "LICENSE" "README" "TODO"))))))
259 (native-inputs
260 `(("source" ,source)
261 ("tar" ,tar)
262 ("gzip" ,gzip)))
263 (home-page "https://pagure.io/liberation-fonts/")
264 (synopsis
265 "Fonts compatible with Arial, Times New Roman, and Courier New")
266 (description
267 "The Liberation font family aims at metric compatibility with
268 Arial, Times New Roman, and Courier New.
269 There are three sets:
270
271 @enumerate
272 @item Sans (a substitute for Arial, Albany, Helvetica, Nimbus Sans L, and
273 Bitstream Vera Sans);
274 @item Serif (a substitute for Times New Roman, Thorndale, Nimbus Roman, and
275 Bitstream Vera Serif);
276 @item Mono (a substitute for Courier New, Cumberland, Courier, Nimbus Mono L,
277 and Bitstream Vera Sans Mono).
278 @end enumerate
279
280 The Liberation Fonts are sponsored by Red Hat.")
281 (license license:silofl1.1)))
282
283 (define-public font-linuxlibertine
284 (package
285 (name "font-linuxlibertine")
286 (version "5.3.0")
287 (source (origin
288 (method url-fetch/tarbomb)
289 (uri (string-append "mirror://sourceforge/linuxlibertine/"
290 "linuxlibertine/" version
291 "/LinLibertineSRC_" version "_2012_07_02.tgz"))
292 (sha256
293 (base32
294 "0x7cz6hvhpil1rh03rax9zsfzm54bh7r4bbrq8rz673gl9h47v0v"))))
295 (build-system gnu-build-system)
296 (arguments
297 `(#:tests? #f ; there are no tests
298 #:modules ((guix build utils)
299 (guix build gnu-build-system)
300 (srfi srfi-1)
301 (srfi srfi-26))
302 #:phases
303 (modify-phases %standard-phases
304 (delete 'configure)
305 (replace 'build
306 (lambda _
307 (let ((compile
308 (lambda (name ext)
309 (zero? (system*
310 "fontforge" "-lang=ff"
311 "-c" (string-append "Open('" name "');"
312 "Generate('"
313 (basename name "sfd") ext
314 "')"))))))
315 (every (lambda (name)
316 (and (compile name "ttf")
317 (compile name "otf")))
318 (find-files "." "\\.sfd$")))))
319 (replace 'install
320 (lambda* (#:key outputs #:allow-other-keys)
321 (let ((font-dir (string-append (assoc-ref outputs "out")
322 "/share/fonts/truetype")))
323 (mkdir-p font-dir)
324 (for-each (cut install-file <> font-dir)
325 (find-files "." "\\.(otf|ttf)$"))
326 #t))))))
327 (native-inputs
328 `(("fontforge" ,fontforge)))
329 (home-page "http://www.linuxlibertine.org/")
330 (synopsis "Serif and sans serif typefaces")
331 (description "The Linux Libertine fonts is a set of typefaces containing
332 both a Serif version (\"Linux Libertine\") and a Sans Serif (\"Linux
333 Biolinum\") designed to be used together as an alternative for Times/Times New
334 Roman and Helvetica/Arial. The Serif typeface comes in two shapes and two
335 weights, and with a Small Capitals version of the regular typeface. Linux
336 Biolinum is available in both Regular and Bold weights.")
337 ;; The fonts are released under either of these licenses.
338 (license (list license:gpl2+ license:silofl1.1))))
339
340 (define-public font-terminus
341 (package
342 (name "font-terminus")
343 (version "4.40")
344 (source
345 (origin
346 (method url-fetch)
347 (uri (string-append
348 "mirror://sourceforge/terminus-font/terminus-font-"
349 version
350 "/terminus-font-"
351 version
352 ".tar.gz"))
353 (sha256
354 (base32
355 "0487cyx5h1f0crbny5sg73a22gmym5vk1i7646gy7hgiscj2rxb4"))))
356 (build-system gnu-build-system)
357 (native-inputs
358 `(("pkg-config" ,pkg-config)
359 ("perl" ,perl)
360 ("bdftopcf" ,bdftopcf)
361 ("font-util" ,font-util)
362 ("mkfontdir" ,mkfontdir)))
363 (arguments
364 `(#:configure-flags (list
365 ;; install fonts into subdirectory of package output
366 ;; instead of font-util-?.?.?/share/fonts/X11
367 (string-append "--with-fontrootdir="
368 %output "/share/fonts/X11"))
369 #:tests? #f)) ;; No test target in tarball
370 (home-page "http://terminus-font.sourceforge.net/")
371 (synopsis "Simple bitmap programming font")
372 (description "Terminus Font is a clean, fixed-width bitmap font, designed
373 for long periods of working with computers (8 or more hours per day).")
374 (license license:silofl1.1)))
375
376 (define-public font-adobe-source-han-sans
377 (package
378 (name "font-adobe-source-han-sans")
379 (version "1.004")
380 (source (origin
381 (method url-fetch)
382 (uri (string-append
383 "https://github.com/adobe-fonts/source-han-sans/archive/"
384 version "R.tar.gz"))
385 (file-name (string-append "source-han-sans-" version "R.tar.gz"))
386 (sha256
387 (base32
388 "1ssx0fw90sy6mj8fv8fv4dgzszpqwbmwpjnlx16g4pvaqzdmybbz"))))
389 (outputs '("out" ; OpenType/CFF Collection (OTC), 121 MiB.
390 "cn" "jp" "kr" "tw")) ; Region-specific Subset OpenType/CFF.
391 (build-system trivial-build-system)
392 (arguments
393 `(#:modules ((guix build utils))
394 #:builder
395 (begin
396 (use-modules (guix build utils))
397 (let ((tar (string-append (assoc-ref %build-inputs
398 "tar")
399 "/bin/tar"))
400 (PATH (string-append (assoc-ref %build-inputs
401 "gzip")
402 "/bin"))
403 (install-opentype-fonts
404 (lambda (fonts-dir out)
405 (copy-recursively fonts-dir
406 (string-append (assoc-ref %outputs out)
407 "/share/fonts/opentype")))))
408 (setenv "PATH" PATH)
409 (system* tar "xvf" (assoc-ref %build-inputs "source"))
410 (chdir (string-append "source-han-sans-" ,version "R"))
411 (install-opentype-fonts "OTC" "out")
412 (install-opentype-fonts "SubsetOTF/CN" "cn")
413 (install-opentype-fonts "SubsetOTF/JP" "jp")
414 (install-opentype-fonts "SubsetOTF/KR" "kr")
415 (install-opentype-fonts "SubsetOTF/TW" "tw")
416 (for-each delete-file (find-files %output "\\.zip$"))))))
417 (native-inputs
418 `(("gzip" ,gzip)
419 ("tar" ,tar)))
420 (home-page "https://github.com/adobe-fonts/source-han-sans")
421 (synopsis "Pan-CJK fonts")
422 (description
423 "Source Han Sans is a sans serif Pan-CJK font family that is offered in
424 seven weights: ExtraLight, Light, Normal, Regular, Medium, Bold, and Heavy.
425 And in several OpenType/CFF-based deployment configurations to accommodate
426 various system requirements or limitations. As the name suggests, Pan-CJK
427 fonts are intended to support the characters necessary to render or display
428 text in Simplified Chinese, Traditional Chinese, Japanese, and Korean.")
429 (license license:silofl1.1)))
430
431 (define-public font-cns11643
432 (package
433 (name "font-cns11643")
434 (version "98.1.20170405")
435 (source (origin
436 (method url-fetch)
437 (uri "http://www.cns11643.gov.tw/AIDB/Open_Data.zip")
438 (sha256
439 (base32
440 "02kb3bwjrra0k2hlr2p8xswd2y0xs6j8d9vm6yrby734h02a40qf"))))
441 (outputs '("out" "tw-kai" "tw-sung"))
442 (build-system trivial-build-system)
443 (native-inputs
444 `(("unzip" ,unzip)))
445 (arguments
446 `(#:modules ((guix build utils))
447 #:builder
448 (begin
449 (use-modules (guix build utils))
450 (let* ((font-dir "/share/fonts/truetype/cns11643")
451 (out (string-append
452 (assoc-ref %outputs "out") font-dir))
453 (tw-kai (string-append
454 (assoc-ref %outputs "tw-kai") font-dir))
455 (tw-sung (string-append
456 (assoc-ref %outputs "tw-sung") font-dir))
457 (unzip (string-append
458 (assoc-ref %build-inputs "unzip") "/bin/unzip")))
459 (system* unzip (assoc-ref %build-inputs "source"))
460 (chdir "Open_Data/Fonts/")
461 (install-file "TW-Kai-98_1.ttf" tw-kai)
462 (install-file "TW-Sung-98_1.ttf" tw-sung)
463 (install-file "TW-Kai-98_1.ttf" out)
464 (install-file "TW-Kai-Ext-B-98_1.ttf" out)
465 (install-file "TW-Kai-Plus-98_1.ttf" out)
466 (install-file "TW-Sung-98_1.ttf" out)
467 (install-file "TW-Sung-Ext-B-98_1.ttf" out)
468 (install-file "TW-Sung-Plus-98_1.ttf" out)
469 #t))))
470 (home-page "http://www.cns11643.gov.tw/AIDB/welcome.do")
471 (synopsis "CJK TrueType fonts, TW-Kai and TW-Sung")
472 (description
473 "@code{CNS 11643} character set (Chinese National Standard, or Chinese
474 Standard Interchange Code) is the standard character set of the Republic of
475 China (Taiwan) for Chinese Characters and other Unicode symbols. Contained
476 are six TrueType fonts based on two script styles, Regular script (Kai), and
477 Sung/Ming script, each with three variants:
478
479 @itemize
480 @item @code{CNS 11643} (@code{TW-Kai} and @code{TW-Sung}): Tens of thousands
481 of CJK characters from frequency tables published by the Taiwanese
482 Ministry of Education. ISO 10646 and Unicode compatible encoding.
483 @item @code{Big-5 Plus}: Several thousand frequently used CJK characters
484 encoded in the user defined area of the Big-5 code.
485 @item @code{Big-5 Extended}: A Big-5 character set based on the
486 @code{Big-5 Plus} and @code{CNS 11643} character sets.
487 @end itemize\n")
488 (license (license:non-copyleft
489 "http://data.gov.tw/license")))) ; CC-BY 4.0 compatible
490
491 (define-public font-cns11643-swjz
492 (package
493 (name "font-cns11643-swjz")
494 (version "1")
495 (source
496 (origin
497 (method url-fetch)
498 (uri "https://www.moedict.tw/fonts/truetype/cns11643/ebas927.ttf")
499 (sha256
500 (base32
501 "1qkljldbmb53zp1rcmpsb8rzy67rnsqcjxi549m9743ifk4isl78"))))
502 (build-system trivial-build-system)
503 (arguments
504 `(#:modules ((guix build utils))
505 #:builder
506 (begin
507 (use-modules (guix build utils))
508 (let ((font-dir (string-append %output
509 "/share/fonts/truetype/cns11643"))
510 (source (assoc-ref %build-inputs "source")))
511 (mkdir-p font-dir)
512 (copy-file source
513 (string-append font-dir "/" "ebas927.ttf"))
514 #t))))
515 (home-page
516 (string-append "http://www.cns11643.gov.tw/AIDB/download.do"
517 "?name=%E5%AD%97%E5%9E%8B%E4%B8%8B%E8%BC%89"))
518 (synopsis "TrueType seal script font")
519 (description
520 "@code{Shuowen Jiezi} is a TrueType seal script font based on the ancient
521 text of the same name published by the Executive Yuan of Taiwan. 6721 glyphs
522 are included, at Unicode compatible code points corresponding to their modern
523 variants.")
524 ;; Original text only available in Chinese. More info at
525 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=26703#11
526 (license (license:non-copyleft
527 "http://www.cns11643.gov.tw/AIDB/copyright.do"))))
528
529 (define-public font-wqy-zenhei
530 (package
531 (name "font-wqy-zenhei")
532 (version "0.9.45")
533 (source (origin
534 (method url-fetch)
535 (uri (string-append
536 "mirror://sourceforge/wqy/wqy-zenhei/" version
537 "%20%28Fighting-state%20RC1%29/wqy-zenhei-"
538 version ".tar.gz"))
539 (file-name (string-append "wqy-zenhei-" version ".tar.gz"))
540 (sha256
541 (base32
542 "1mkmxq8g2hjcglb3zajfqj20r4r88l78ymsp2xyl5yav8w3f7dz4"))))
543 (build-system trivial-build-system)
544 (arguments
545 `(#:modules ((guix build utils))
546 #:builder
547 (begin
548 (use-modules (guix build utils))
549 (let ((PATH (string-append (assoc-ref %build-inputs "tar") "/bin:"
550 (assoc-ref %build-inputs "gzip") "/bin"))
551 (font-dir (string-append (assoc-ref %outputs "out")
552 "/share/fonts/wenquanyi/")))
553 (setenv "PATH" PATH)
554 (mkdir-p font-dir)
555 (system* "tar" "xvf" (assoc-ref %build-inputs "source"))
556 (chdir "wqy-zenhei")
557 (install-file "wqy-zenhei.ttc" font-dir)))))
558 (native-inputs
559 `(("gzip" ,gzip)
560 ("tar" ,tar)))
561 (home-page "http://wenq.org/wqy2/")
562 (synopsis "CJK font")
563 (description
564 "WenQuanYi Zen Hei is a Hei-Ti style (sans-serif type) Chinese outline
565 font. It is designed for general purpose text formatting and on-screen
566 display of Chinese characters and symbols from many other languages.
567 WenQuanYi Zen Hei provides a rather complete coverage of Chinese Hanzi glyphs,
568 including both simplified and traditional forms. The total glyph number in
569 this font is over 35,000, including over 21,000 Chinese Hanzi. This font has
570 full coverage of the GBK (CP936) charset, CJK Unified Ideographs, as well as
571 the code-points needed for zh_cn, zh_sg, zh_tw, zh_hk, zh_mo, ja (Japanese) and
572 ko (Korean) locales for @code{fontconfig}.")
573 ;; GPLv2 with font embedding exception
574 (license license:gpl2)))
575
576 (define-public font-wqy-microhei
577 (package
578 (name "font-wqy-microhei")
579 (version "0.2.0-beta")
580 (source (origin
581 (method url-fetch)
582 (uri (string-append "mirror://sourceforge/wqy/wqy-microhei/"
583 version "/wqy-microhei-" version ".tar.gz"))
584 (sha256
585 (base32
586 "0gi1yxqph8xx869ichpzzxvx6y50wda5hi77lrpacdma4f0aq0i8"))))
587 (build-system trivial-build-system)
588 (arguments
589 `(#:modules ((guix build utils))
590 #:builder
591 (begin
592 (use-modules (guix build utils))
593 (let ((PATH (string-append (assoc-ref %build-inputs "tar") "/bin:"
594 (assoc-ref %build-inputs "gzip") "/bin"))
595 (font-dir (string-append (assoc-ref %outputs "out")
596 "/share/fonts/wenquanyi")))
597 (mkdir-p font-dir)
598 (setenv "PATH" PATH)
599 (system* "tar" "xvf" (assoc-ref %build-inputs "source"))
600 (install-file "wqy-microhei/wqy-microhei.ttc" font-dir)))))
601 (native-inputs
602 `(("gzip" ,gzip)
603 ("tar" ,tar)))
604 (home-page "http://wenq.org/wqy2/")
605 (synopsis "CJK font")
606 (description
607 "WenQuanYi Micro Hei is a Sans-Serif style (also known as Hei, Gothic or
608 Dotum among the Chinese/Japanese/Korean users) high quality CJK outline font.
609 It was derived from \"Droid Sans Fallback\" and \"Droid Sans\" released by
610 Google Inc. This font contains all the unified CJK Han glyphs in the range of
611 U+4E00-U+9FC3 defined in Unicode Standard 5.1, together with many other
612 languages unicode blocks, including Latins, Extended Latins, Hanguls and
613 Kanas. The font file is extremely compact (~4M) compared with most known CJK
614 fonts.")
615 ;; This font is licensed under Apache2.0 or GPLv3 with font embedding
616 ;; exceptions.
617 (license license:gpl3)))
618
619 (define-public font-tex-gyre
620 (package
621 (name "font-tex-gyre")
622 (version "2.005")
623 (source
624 (origin
625 (method url-fetch)
626 (uri (string-append "http://www.gust.org.pl/projects/e-foundry/"
627 "tex-gyre/whole/tg-" version "otf.zip"))
628 (sha256
629 (base32
630 "0kph9l3g7jb2bpmxdbdg5zl56wacmnvdvsdn7is1gc750sqvsn31"))))
631 (build-system trivial-build-system)
632 (arguments
633 `(#:modules ((guix build utils))
634 #:builder
635 (begin
636 (use-modules (guix build utils))
637
638 (let ((unzip (string-append (assoc-ref %build-inputs "unzip")
639 "/bin/unzip"))
640 (font-dir (string-append %output "/share/fonts/opentype")))
641 (mkdir-p font-dir)
642 (system* unzip
643 (assoc-ref %build-inputs "source")
644 "-d" font-dir)))))
645 (native-inputs
646 `(("unzip" ,unzip)))
647 (home-page "http://www.gust.org.pl/projects/e-foundry/tex-gyre/")
648 (synopsis "Remake of Ghostscript fonts")
649 (description "The TeX Gyre collection of fonts is the result of an
650 extensive remake and extension of the freely available base PostScript fonts
651 distributed with Ghostscript version 4.00. The collection contains the
652 following fonts in the OpenType format: Adventor, Bonum, Chorus, Cursor,
653 Heros, Pagella, Schola, Termes.")
654 (license license:gfl1.0)))
655
656 (define-public font-anonymous-pro
657 (package
658 (name "font-anonymous-pro")
659 (version "1.002")
660 (source (origin
661 (method url-fetch)
662 (uri (string-append
663 "http://www.marksimonson.com/assets/content/fonts/"
664 "AnonymousPro-" version ".zip"))
665 (sha256
666 (base32
667 "1asj6lykvxh46czbal7ymy2k861zlcdqpz8x3s5bbpqwlm3mhrl6"))))
668 (build-system trivial-build-system)
669 (arguments
670 `(#:modules ((guix build utils))
671 #:builder
672 (begin
673 (use-modules (guix build utils))
674 (let ((unzip (string-append (assoc-ref %build-inputs "unzip")
675 "/bin/unzip"))
676 (font-dir (string-append %output "/share/fonts/truetype"))
677 (doc-dir (string-append %output "/share/doc/" ,name)))
678 (system* unzip (assoc-ref %build-inputs "source"))
679 (mkdir-p font-dir)
680 (mkdir-p doc-dir)
681 (chdir (string-append "AnonymousPro-" ,version ".001"))
682 (for-each (lambda (ttf)
683 (install-file ttf font-dir))
684 (find-files "." "\\.ttf$"))
685 (for-each (lambda (doc)
686 (install-file doc doc-dir))
687 (find-files "." "\\.txt$"))))))
688 (native-inputs
689 `(("unzip" ,unzip)))
690 (home-page "http://www.marksimonson.com/fonts/view/anonymous-pro")
691 (synopsis "Fixed-width fonts designed with coding in mind")
692 (description "Anonymous Pro is a family of four fixed-width fonts designed
693 with coding in mind. Anonymous Pro features an international, Unicode-based
694 character set, with support for most Western and Central European Latin-based
695 languages, plus Greek and Cyrillic.")
696 (license license:silofl1.1)))
697
698 (define-public font-gnu-unifont
699 (package
700 (name "font-gnu-unifont")
701 (version "9.0.06")
702 (source (origin
703 (method url-fetch)
704 (uri (string-append
705 "mirror://gnu/unifont/unifont-" version "/unifont-"
706 version ".tar.gz"))
707 (sha256
708 (base32
709 "0ybyraxi8pngibazfq4zlsqmg8kn5xlhvaiwnxb11znhfi61vi87"))))
710 (build-system gnu-build-system)
711 (outputs '("out" ; TrueType version
712 "pcf" ; PCF (bitmap) version
713 "psf" ; PSF (console) version
714 "bin" ; Utilities to manipulate '.hex' format
715 ))
716 (arguments
717 '(#:parallel-build? #f ; parallel build fails
718 #:tests? #f ; no check target
719 #:phases
720 (modify-phases %standard-phases
721 (replace
722 'configure
723 (lambda _ (setenv "CC" "gcc") #t))
724 (replace
725 'install
726 (lambda* (#:key outputs #:allow-other-keys)
727 (let* ((ttf (string-append (assoc-ref outputs "out")
728 "/share/fonts/truetype"))
729 (pcf (string-append (assoc-ref outputs "pcf")
730 "/share/fonts/misc"))
731 (psf (string-append (assoc-ref outputs "psf")
732 "/share/consolefonts"))
733 (bin (assoc-ref outputs "bin")))
734 (system* "make"
735 (string-append "PREFIX=" bin)
736 (string-append "TTFDEST=" ttf)
737 (string-append "PCFDEST=" pcf)
738 (string-append "CONSOLEDEST=" psf)
739 "install")
740 ;; Move Texinfo file to the right place.
741 (mkdir (string-append bin "/share/info"))
742 (rename-file (string-append bin "/share/unifont/unifont.info.gz")
743 (string-append bin "/share/info/unifont.info.gz"))
744 #t))))))
745 (inputs
746 `(("perl" ,perl))) ; for utilities
747 (synopsis
748 "Large bitmap font covering Unicode's Basic Multilingual Plane")
749 (description
750 "GNU Unifont is a bitmap font covering essentially all of
751 Unicode's Basic Multilingual Plane. The package also includes
752 utilities to ease adding new glyphs to the font.")
753 (home-page "http://unifoundry.com/unifont.html")
754 (license license:gpl2+)))
755
756 (define-public font-google-noto
757 (package
758 (name "font-google-noto")
759 (version "20150929")
760 (source (origin
761 (method url-fetch)
762 (uri (string-append "https://noto-website-2.storage.googleapis.com/"
763 "pkgs/Noto-hinted.zip"))
764 (sha256
765 (base32
766 "13jhpqzhsqhyby8n0ksqg155a3jyaif3nzj9anzbq8s2gn1xjyd9"))))
767 (build-system trivial-build-system)
768 (arguments
769 `(#:modules ((guix build utils))
770 #:builder (begin
771 (use-modules (guix build utils)
772 (srfi srfi-26))
773
774 (let ((PATH (string-append (assoc-ref %build-inputs
775 "unzip")
776 "/bin"))
777 (font-dir (string-append %output
778 "/share/fonts/truetype")))
779 (setenv "PATH" PATH)
780 (system* "unzip" (assoc-ref %build-inputs "source"))
781
782 (mkdir-p font-dir)
783 (for-each (lambda (ttf)
784 (install-file ttf font-dir))
785 (find-files "." "\\.ttf$"))
786 (for-each (lambda (otf)
787 (install-file otf font-dir))
788 (find-files "." "\\.otf$"))))))
789 (native-inputs `(("unzip" ,unzip)))
790 (home-page "https://www.google.com/get/noto/")
791 (synopsis "Fonts to cover all languages")
792 (description "Google Noto Fonts is a family of fonts designed to support
793 all languages with a consistent look and aesthetic. Its goal is to properly
794 display all Unicode symbols.")
795 (license license:silofl1.1)))
796
797 (define-public font-google-roboto
798 (package
799 (name "font-google-roboto")
800 (version "2.136")
801 (source
802 (origin
803 (method url-fetch)
804 (uri (string-append "https://github.com/google/roboto/releases/download/"
805 "v" version "/roboto-hinted.zip"))
806 (file-name (string-append name "-" version ".zip"))
807 (sha256
808 (base32
809 "0spscx08fad7i8qs7icns96iwcapniq8lwwqqvbf7bamvs8qfln4"))))
810 (native-inputs `(("unzip" ,unzip)))
811 (build-system trivial-build-system)
812 (arguments
813 `(#:modules ((guix build utils))
814 #:builder (begin
815 (use-modules (guix build utils)
816 (srfi srfi-26))
817
818 (let ((PATH (string-append (assoc-ref %build-inputs
819 "unzip")
820 "/bin"))
821 (font-dir (string-append %output
822 "/share/fonts/truetype")))
823 (setenv "PATH" PATH)
824 (system* "unzip" (assoc-ref %build-inputs "source"))
825
826 (mkdir-p font-dir)
827 (chdir "roboto-hinted")
828 (for-each (lambda (ttf)
829 (install-file ttf font-dir))
830 (find-files "." "\\.ttf$"))))))
831 (home-page "https://github.com/google/roboto")
832 (synopsis "The Roboto family of fonts")
833 (description
834 "Roboto is Google’s signature family of fonts, the default font on Android
835 and Chrome OS, and the recommended font for the
836 visual language \"Material Design\".")
837 (license license:asl2.0)))
838
839 (define-public font-un
840 (package
841 (name "font-un")
842 (version "1.0.2-080608")
843 (source (origin
844 (method url-fetch)
845 (uri (string-append
846 "https://kldp.net/unfonts/release/2607-"
847 "un-fonts-core-" version ".tar.gz"))
848 (file-name (string-append name "-" version ".tar.gz"))
849 (sha256
850 (base32
851 "13liaz2pmww3aqabm55la5npd08m1skh334ky7qfidxaz5s742iv"))))
852 (build-system trivial-build-system)
853 (arguments
854 `(#:modules ((guix build utils))
855 #:builder
856 (begin
857 (use-modules (guix build utils))
858
859 (let ((tar (string-append (assoc-ref %build-inputs "tar")
860 "/bin/tar"))
861 (PATH (string-append (assoc-ref %build-inputs "gzip")
862 "/bin"))
863 (font-dir (string-append %output "/share/fonts/truetype"))
864 (doc-dir (string-append %output "/share/doc/" ,name)))
865 (setenv "PATH" PATH)
866 (system* tar "xvf" (assoc-ref %build-inputs "source"))
867 (mkdir-p font-dir)
868 (mkdir-p doc-dir)
869 (chdir (string-append "un-fonts"))
870 (for-each (lambda (ttf)
871 (install-file ttf font-dir))
872 (find-files "." "\\.ttf$"))
873 (for-each (lambda (doc)
874 (install-file doc doc-dir))
875 '("COPYING" "README"))))))
876 (native-inputs
877 `(("tar" ,tar)
878 ("gzip" ,gzip)))
879 (home-page "https://kldp.net/projects/unfonts/")
880 (synopsis "Collection of Korean fonts")
881 (description
882 "Un-fonts is a family of mainly Korean fonts.
883 It contains the following fonts and styles:
884
885 @enumerate
886 @item UnBatang, UnBatangBold: serif;
887 @item UnDotum, UnDotumBold: sans-serif;
888 @item UnGraphic, UnGraphicBold: sans-serif style;
889 @item UnDinaru, UnDinaruBold, UnDinaruLight;
890 @item UnPilgi, UnPilgiBold: script;
891 @item UnGungseo: cursive, brush-stroke.
892 @end enumerate\n")
893 (license license:gpl2+)))
894
895 (define-public font-fantasque-sans
896 (package
897 (name "font-fantasque-sans")
898 (version "1.7.1")
899 (source
900 (origin
901 (method url-fetch)
902 (uri (string-append "https://github.com/belluzj/fantasque-sans/"
903 "archive/v" version ".tar.gz"))
904 (file-name (string-append name "-" version ".tar.gz"))
905 (sha256
906 (base32
907 "07fpy53k2x2nz5q61swkab6cfk9gw2kc4x4brsj6zjgbm16fap85"))))
908 (build-system gnu-build-system)
909 (native-inputs
910 `(("ttfautohint" ,ttfautohint)
911 ("woff-tools" ,woff-tools)
912 ("fontforge" ,fontforge)
913 ("woff2" ,woff2)
914 ("ttf2eot" ,ttf2eot)))
915 (arguments
916 `(#:tests? #f ;test target intended for visual inspection
917 #:phases (modify-phases %standard-phases
918 (delete 'configure) ;no configuration
919 (replace 'install
920 ;; 'make install' wants to install to ~/.fonts, install to
921 ;; output instead.
922 (lambda* (#:key outputs #:allow-other-keys)
923 (let* ((out (assoc-ref outputs "out"))
924 (font-dir (string-append out "/share/fonts"))
925 (truetype-dir (string-append font-dir "/truetype"))
926 (opentype-dir (string-append font-dir "/opentype"))
927 (webfonts-dir (string-append font-dir "/webfonts")))
928 (copy-recursively "OTF" opentype-dir)
929 (for-each (lambda (f) (install-file f truetype-dir))
930 (find-files "." "\\.ttf$"))
931 (copy-recursively "Webfonts" webfonts-dir)
932 #t))))))
933 (synopsis "Font family with a monospaced variant for programmers")
934 (description
935 "Fantasque Sans Mono is a programming font designed with functionality in
936 mind. The font includes a bold version and a good italic version with new
937 glyph designs, not just an added slant.")
938 (home-page "https://fontlibrary.org/en/font/fantasque-sans-mono")
939 (license license:silofl1.1)))
940
941 (define-public font-hack
942 (package
943 (name "font-hack")
944 (version "2.020")
945 (source (origin
946 (method url-fetch)
947 (uri (string-append
948 "https://github.com/chrissimpkins/Hack/releases/download/v"
949 version "/Hack-v"
950 (string-replace-substring version "." "_")
951 "-ttf.zip"))
952 (sha256
953 (base32
954 "16kkmc3psckw1b7k07ccn1gi5ymhlg9djh43nqjzg065g6p6d184"))))
955 (build-system trivial-build-system)
956 (arguments
957 `(#:modules ((guix build utils))
958 #:builder (begin
959 (use-modules (guix build utils)
960 (srfi srfi-26))
961
962 (let ((PATH (string-append (assoc-ref %build-inputs
963 "unzip")
964 "/bin"))
965 (font-dir (string-append %output
966 "/share/fonts/truetype")))
967 (setenv "PATH" PATH)
968 (system* "unzip" (assoc-ref %build-inputs "source"))
969
970 (mkdir-p font-dir)
971 (for-each (lambda (ttf)
972 (install-file ttf font-dir))
973 (find-files "." "\\.ttf$"))))))
974 (native-inputs
975 `(("source" ,source)
976 ("unzip" ,unzip)))
977 (home-page "https://sourcefoundry.org/hack/")
978 (synopsis "Typeface designed for source code")
979 (description
980 "Hack is designed to be a workhorse typeface for code. It expands upon
981 the Bitstream Vera & DejaVu projects, provides 1561 glyphs, and includes
982 Powerline support.")
983 (license (license:x11-style
984 "https://github.com/chrissimpkins/Hack/blob/master/LICENSE.md"
985 "Hack Open Font License v2.0"))))
986
987 (define-public font-adobe-source-code-pro
988 (package
989 (name "font-adobe-source-code-pro")
990 (version "2.030R-ro-1.050R-it")
991 (source (origin
992 (method url-fetch)
993 (uri (string-append
994 "https://github.com/adobe-fonts/source-code-pro/archive/"
995 (regexp-substitute/global
996 ;; The upstream tag uses "/" between the roman and italic
997 ;; versions, so substitute our "-" separator here.
998 #f "R-ro-" version 'pre "R-ro/" 'post) ".tar.gz"))
999 (file-name (string-append name "-" version ".tar.gz"))
1000 (sha256
1001 (base32
1002 "0arhhsf3i7ss39ykn73d1j8k4n8vx7115xph6jwkd970p1cxvr54"))))
1003 (build-system trivial-build-system)
1004 (arguments
1005 `(#:modules ((guix build utils))
1006 #:builder
1007 (begin
1008 (use-modules (guix build utils))
1009 (let ((tar (string-append (assoc-ref %build-inputs "tar")
1010 "/bin/tar"))
1011 (PATH (string-append (assoc-ref %build-inputs "gzip")
1012 "/bin"))
1013 (font-dir (string-append %output "/share/fonts/opentype")))
1014 (setenv "PATH" PATH)
1015 (mkdir-p font-dir)
1016 (zero? (system* tar "-C" font-dir "--strip-components=2"
1017 "-xvf" (assoc-ref %build-inputs "source")
1018 (string-append "source-code-pro-"
1019 ,version "/OTF")))))))
1020 (native-inputs
1021 `(("gzip" ,gzip)
1022 ("tar" ,tar)))
1023 (home-page "https://github.com/adobe-fonts/source-code-pro")
1024 (synopsis
1025 "Monospaced font family for user interface and coding environments")
1026 (description
1027 "Source Code Pro is a set of monospaced OpenType fonts that have been
1028 designed to work well in user interface environments.")
1029 (license license:silofl1.1)))
1030
1031 (define-public font-fira-mono
1032 (package
1033 (name "font-fira-mono")
1034 (version "3.206")
1035 (source (origin
1036 (method url-fetch)
1037 (uri (string-append "https://carrois.com/downloads/fira_mono_3_2/"
1038 "FiraMonoFonts"
1039 (string-replace-substring version "." "")
1040 ".zip"))
1041 (sha256
1042 (base32
1043 "1z65x0dw5dq6rs6p9wyfrir50rlh95vgzsxr8jcd40nqazw4jhpi"))))
1044 (build-system trivial-build-system)
1045 (arguments
1046 `(#:modules ((guix build utils))
1047 #:builder
1048 (begin
1049 (use-modules (guix build utils))
1050 (let ((unzip (string-append (assoc-ref %build-inputs "unzip")
1051 "/bin/unzip"))
1052 (font-dir (string-append %output "/share/fonts/opentype")))
1053 (mkdir-p font-dir)
1054 (system* unzip
1055 "-j"
1056 (assoc-ref %build-inputs "source")
1057 "*.otf"
1058 "-d" font-dir)))))
1059 (native-inputs
1060 `(("unzip" ,unzip)))
1061 (home-page "http://mozilla.github.io/Fira/")
1062 (synopsis "Mozilla's monospace font")
1063 (description "This is the typeface used by Mozilla in Firefox OS.")
1064 (license license:silofl1.1)))
1065
1066 (define-public font-awesome
1067 (package
1068 (name "font-awesome")
1069 (version "4.7.0")
1070 (source (origin
1071 (method url-fetch)
1072 (uri (string-append "http://fontawesome.io/assets/"
1073 name "-" version ".zip"))
1074 (sha256
1075 (base32
1076 "1m1rfwm4sjkv10j3xd2dhwk286a5912b2zgvc692cmxi5gxs68jf"))))
1077 (build-system font-build-system)
1078 (home-page "http://fontawesome.io")
1079 (synopsis "Font that contains a rich iconset")
1080 (description
1081 "Font Awesome is a full suite of pictographic icons for easy scalable
1082 vector graphics.")
1083 (license license:silofl1.1)))
1084
1085 (define-public font-tamzen
1086 (package
1087 (name "font-tamzen")
1088 (version "1.11.4")
1089 (source
1090 (origin
1091 (method url-fetch)
1092 (uri (string-append "https://github.com/sunaku/tamzen-font/archive/"
1093 "Tamzen-" version ".tar.gz"))
1094 (file-name (string-append name "-" version ".tar.gz"))
1095 (sha256
1096 (base32
1097 "1ryd7gp6qiwaqw73jqbmh4kwlriyd8xykh4j7z90z8xp9fm7lrys"))))
1098 (build-system trivial-build-system)
1099 (arguments
1100 `(#:modules ((guix build utils))
1101 #:builder
1102 (begin
1103 (use-modules (guix build utils))
1104
1105 (let ((tar (string-append (assoc-ref %build-inputs "tar")
1106 "/bin/tar"))
1107 (PATH (string-append (assoc-ref %build-inputs "gzip")
1108 "/bin"))
1109 (font-dir (string-append %output "/share/fonts/misc"))
1110 (psf-dir (string-append %output "/share/kbd/consolefonts"))
1111 (src-pcf-dir (string-append "tamzen-font-Tamzen-"
1112 ,version "/pcf")))
1113 (setenv "PATH" PATH)
1114 (system* tar "xvf" (assoc-ref %build-inputs "source"))
1115 (mkdir-p font-dir)
1116 (mkdir-p psf-dir)
1117 (chdir src-pcf-dir)
1118 (for-each (lambda (pcf)
1119 (install-file pcf font-dir))
1120 (find-files "." "\\.pcf$"))
1121 (chdir "../psf")
1122 (for-each (lambda (psf)
1123 (install-file psf psf-dir))
1124 (find-files "." "\\.psf$"))
1125 #t))))
1126 (native-inputs
1127 `(("tar" ,tar)
1128 ("gzip" ,gzip)))
1129 (home-page "https://github.com/sunaku/tamzen-font")
1130 (synopsis "Monospaced bitmap font for console and X11")
1131 (description
1132 "Tamzen is a fork of the @code{Tamsyn} font. It is programatically forked
1133 from @code{Tamsyn} version 1.11, backporting glyphs from older versions while
1134 deleting deliberately empty glyphs (which are marked as unimplemented) to
1135 allow secondary/fallback fonts to provide real glyphs at those codepoints.
1136
1137 The @code{TamzenForPowerline} fonts provide additional @code{Powerline} symbols,
1138 which are programatically injected with @code{bitmap-font-patcher} and
1139 later hand-tweaked with the gbdfed(1) editor:
1140
1141 @enumerate
1142 @item all icons are expanded to occupy the maximum available space
1143 @item the branch of the fork icon ( U+E0A0) was made larger than the trunk
1144 @item for the newline icon ( U+E0A1), the @emph{N} was made larger at the bottom
1145 @item the keyhole in the padlock icon ( U+E0A2) was replaced with @emph{//} lines.
1146 @end enumerate\n")
1147 (license (license:non-copyleft "file://LICENSE"))))
1148
1149 (define-public font-comic-neue
1150 (package
1151 (name "font-comic-neue")
1152 (version "2.3")
1153 (source (origin
1154 (method url-fetch)
1155 (uri (string-append
1156 "http://www.comicneue.com/comic-neue-" version ".zip"))
1157 (sha256
1158 (base32
1159 "1695hkpd8kqnr2a88p8xs496slgzxjjkzpa9aa33ml3pnh7519zk"))))
1160 (build-system trivial-build-system)
1161 (arguments
1162 `(#:modules ((guix build utils))
1163 #:builder (begin
1164 (use-modules (guix build utils))
1165 (let ((font-dir (string-append %output
1166 "/share/fonts/truetype"))
1167 (source (assoc-ref %build-inputs "source"))
1168 (unzip (string-append (assoc-ref %build-inputs "unzip")
1169 "/bin/unzip")))
1170 (mkdir-p font-dir)
1171 (system* unzip source)
1172 (with-directory-excursion
1173 (string-append "Web")
1174 (for-each (lambda (ttf)
1175 (install-file ttf font-dir))
1176 (find-files "." "\\.ttf$")))))))
1177 (native-inputs `(("unzip" ,unzip)))
1178 (home-page "http://www.comicneue.com/")
1179 (synopsis "Font that fixes the shortcomings of Comic Sans")
1180 (description
1181 "Comic Neue is a font that attempts to create a respectable casual
1182 typeface, by mimicking Comic Sans while fixing its most obvious shortcomings.")
1183 (license license:silofl1.1)))
1184
1185 (define-public font-iosevka
1186 (package
1187 (name "font-iosevka")
1188 (version "1.12.5")
1189 (source (origin
1190 (method url-fetch/zipbomb)
1191 (uri (string-append
1192 "https://github.com/be5invis/Iosevka/releases/download/v"
1193 version "/iosevka-pack-" version ".zip"))
1194 (sha256
1195 (base32
1196 "0s3g6mk0ngwsrw9h9dqinb50cd9i8zhqdcmmh93fhyf4d87yfwyi"))))
1197 (build-system font-build-system)
1198 (home-page "https://be5invis.github.io/Iosevka/")
1199 (synopsis "Coders' typeface, built from code")
1200 (description
1201 "Iosevka is a slender monospace sans-serif or slab-serif typeface inspired
1202 by Pragmata Pro, M+, and PF DIN Mono, designed to be the ideal font for
1203 programming. Iosevka is completely generated from its source code.")
1204 (license (list license:silofl1.1 ; build artifacts (i.e. the fonts)
1205 license:bsd-3)))) ; supporting code
1206
1207 (define-public font-go
1208 (let ((commit "f03a046406d4d7fbfd4ed29f554da8f6114049fc")
1209 (revision "1"))
1210 (package
1211 (name "font-go")
1212 (version (string-append "20170330-" revision "." (string-take commit 7)))
1213 (source (origin
1214 (file-name (string-append "go-image-" version "-checkout"))
1215 (method git-fetch)
1216 (uri (git-reference
1217 (url "https://go.googlesource.com/image")
1218 (commit commit)))
1219 (sha256
1220 (base32
1221 "1aq6mnjayks55gd9ahavk6jfydlq5lm4xm0xk4pd5sqa74p5p74d"))))
1222 (build-system font-build-system)
1223 (arguments
1224 `(#:phases
1225 (modify-phases %standard-phases
1226 (add-before 'install 'chdir
1227 (lambda _
1228 (chdir "font/gofont/ttfs")
1229 #t)))))
1230 (home-page "https://blog.golang.org/go-fonts")
1231 (synopsis "The Go font family")
1232 (description
1233 "The Go font family is a set of WGL4 TrueType fonts from the Bigelow &
1234 Holmes type foundry, released under the same license as the Go programming
1235 language. It includes a set of proportional, sans-serif fonts, and a set of
1236 monospace, slab-serif fonts.")
1237 (license (package-license go-1.4)))))
1238
1239 (define-public font-google-material-design-icons
1240 (package
1241 (name "font-google-material-design-icons")
1242 (version "3.0.1")
1243 (source (origin
1244 (method url-fetch)
1245 (uri (string-append
1246 "https://github.com/google/material-design-icons/archive/"
1247 version ".tar.gz"))
1248 (sha256
1249 (base32
1250 "183n0qv3q8w6n27libarq1fhc4mqv2d3sasbfmbn7x9r5pw9c6ga"))
1251 (file-name (string-append name "-" version ".tar.gz"))))
1252 (build-system trivial-build-system)
1253 (native-inputs
1254 `(("tar" ,tar)
1255 ("gzip" ,gzip)))
1256 (arguments
1257 `(#:modules ((guix build utils))
1258 #:builder (begin
1259 (use-modules (guix build utils))
1260 (let* ((font-dir (string-append %output
1261 "/share/fonts/truetype"))
1262 (source (assoc-ref %build-inputs "source"))
1263 (font-filename "MaterialIcons-Regular.ttf")
1264 (src-ttf-file (string-append "material-design-icons-"
1265 ,version
1266 "/iconfont/"
1267 font-filename))
1268 (dest-ttf-file (string-append font-dir font-filename))
1269 (gzip (assoc-ref %build-inputs "gzip"))
1270 (tar (assoc-ref %build-inputs "tar")))
1271 (setenv "PATH" (string-append gzip "/bin:"
1272 tar "/bin:"))
1273 (system* "tar" "xf" source)
1274 (mkdir-p font-dir)
1275 (copy-file src-ttf-file dest-ttf-file)))))
1276 (home-page "http://google.github.io/material-design-icons")
1277 (synopsis "Icon font of Google Material Design icons")
1278 (description
1279 "Material design system icons are simple, modern, friendly, and sometimes
1280 quirky. Each icon is created using our design guidelines to depict in simple
1281 and minimal forms the universal concepts used commonly throughout a UI.
1282 Ensuring readability and clarity at both large and small sizes, these icons
1283 have been optimized for beautiful display on all common platforms and display
1284 resolutions.")
1285 (license license:asl2.0)))