1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2014, 2015, 2016, 2018 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, 2018 Nils Gillmann <ng0@n0.is>
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, 2017, 2018 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, 2018 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 ;;; Copyright © 2017, 2018 Arun Isaac <arunisaac@systemreboot.net>
23 ;;; Copyright © 2017 Mohammed Sadiq <sadiq@sadiqpk.org>
24 ;;; Copyright © 2018 Charlie Ritter <chewzerita@posteo.net>
26 ;;; This file is part of GNU Guix.
28 ;;; GNU Guix is free software; you can redistribute it and/or modify it
29 ;;; under the terms of the GNU General Public License as published by
30 ;;; the Free Software Foundation; either version 3 of the License, or (at
31 ;;; your option) any later version.
33 ;;; GNU Guix is distributed in the hope that it will be useful, but
34 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
35 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
36 ;;; GNU General Public License for more details.
38 ;;; You should have received a copy of the GNU General Public License
39 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
41 (define-module (gnu packages fonts)
42 #:use-module (ice-9 regex)
43 #:use-module (guix utils)
44 #:use-module ((guix licenses) #:prefix license:)
45 #:use-module (guix packages)
46 #:use-module (guix download)
47 #:use-module (guix git-download)
48 #:use-module (guix build-system font)
49 #:use-module (guix build-system gnu)
50 #:use-module (guix build-system trivial)
51 #:use-module (gnu packages base)
52 #:use-module (gnu packages compression)
53 #:use-module (gnu packages fontutils)
54 #:use-module (gnu packages perl)
55 #:use-module (gnu packages pkg-config)
56 #:use-module (gnu packages python)
57 #:use-module (gnu packages xorg))
59 (define-public font-ibm-plex
61 (name "font-ibm-plex")
66 "https://github.com/IBM/plex/releases/download/"
67 "v" version "/OpenType.zip"))
70 "0nzxw9z6waixslam248yr26ci3fbk83c7jf6m90hncnaj6zxx795"))))
71 (build-system font-build-system)
72 (home-page "https://github.com/IBM/plex")
73 (synopsis "IBM Plex typeface")
74 (description "This package provides the Plex font family. It comes in a
75 Sans, Serif, Mono and Sans Condensed, all with roman and true italics. The
76 fonts have been designed to work well in user interface (UI) environments as
77 well as other mediums.")
78 (license license:silofl1.1)))
80 (define-public font-inconsolata
82 (name "font-inconsolata")
86 (uri "http://www.levien.com/type/myfonts/Inconsolata.otf")
89 "06js6znbcf7swn8y3b8ki416bz96ay7d3yvddqnvi88lqhbfcq8m"))))
90 (build-system font-build-system)
91 (home-page "http://levien.com/type/myfonts/inconsolata.html")
92 (synopsis "Monospace font")
93 (description "A monospace font, designed for code listings and the like,
94 in print. With attention to detail for high resolution rendering.")
95 (license license:silofl1.1)))
97 (define-public font-ubuntu
104 "http://font.ubuntu.com/download/ubuntu-font-family-"
108 "0hjvq2x758dx0sfwqhzflns0ns035qm7h6ygskbx1svzg517sva5"))))
109 (build-system font-build-system)
110 (home-page "http://font.ubuntu.com/")
111 (synopsis "The Ubuntu Font Family")
112 (description "The Ubuntu Font Family is a unique, custom designed font
113 that has a very distinctive look and feel. This package provides the
114 TrueType (TTF) files.")
116 (license:non-copyleft
117 "http://font.ubuntu.com/ufl/ubuntu-font-licence-1.0.txt"
118 "Ubuntu Font License v1.0"))))
120 (define-public font-dejavu
126 (uri (string-append "mirror://sourceforge/dejavu/dejavu/"
127 version "/dejavu-fonts-ttf-"
131 "1mqpds24wfs5cmfhj57fsfs07mji2z8812i5c4pi5pbi738s977s"))))
132 (build-system font-build-system)
135 (modify-phases %standard-phases
136 (add-after 'install 'install-conf
137 (lambda* (#:key outputs #:allow-other-keys)
138 (let ((conf-dir (string-append (assoc-ref outputs "out")
139 "/share/fontconfig/conf.avail")))
140 (copy-recursively "fontconfig" conf-dir)
142 (home-page "https://dejavu-fonts.github.io/")
143 (synopsis "Vera font family derivate with additional characters")
144 (description "DejaVu provides an expanded version of the Vera font family
145 aiming for quality and broader Unicode coverage while retaining the original
146 Vera style. DejaVu currently works towards conformance to the Multilingual
147 European Standards (MES-1 and MES-2) for Unicode coverage. The DejaVu fonts
148 provide serif, sans and monospaced variants.")
151 "http://dejavu-fonts.org/"))))
153 (define-public font-bitstream-vera
155 (name "font-bitstream-vera")
159 (uri (string-append "mirror://gnome/sources/ttf-bitstream-vera/"
160 version "/ttf-bitstream-vera-"
164 "1p3qs51x5327gnk71yq8cvmxc6wgx79sqxfvxcv80cdvgggjfnyv"))))
165 (build-system font-build-system)
166 (home-page "https://www.gnome.org/fonts/")
167 (synopsis "Bitstream Vera sans-serif typeface")
168 (description "Vera is a sans-serif typeface from Bitstream, Inc. This
169 package provides the TrueType (TTF) files.")
171 (license:fsdg-compatible
172 "https://www.gnome.org/fonts/#Final_Bitstream_Vera_Fonts"
173 "The Font Software may be sold as part of a larger software package but
174 no copy of one or more of the Font Software typefaces may be sold by
177 (define-public font-cantarell
179 (name "font-abattis-cantarell")
183 (uri (string-append "mirror://gnome/sources/cantarell-fonts/"
184 (version-major+minor version)
185 "/cantarell-fonts-" version ".tar.xz"))
188 "0zvkd8cm1cg2919v1js9qmzwa02sjl7qajj3gcvgqvai1fm2i8hl"))))
189 (build-system gnu-build-system)
190 (home-page "https://wiki.gnome.org/Projects/CantarellFonts")
191 (synopsis "Cantarell sans-serif typeface")
192 (description "The Cantarell font family is a contemporary Humanist
193 sans-serif designed for on-screen reading. It is used by GNOME@tie{}3.")
194 (license license:silofl1.1)))
196 (define-public font-lato
201 (method url-fetch/zipbomb)
202 (uri (string-append "http://www.latofonts.com/download/Lato2OFL.zip"))
205 "1f5540g0ja1nx3ddd3ywn77xc81ssrxpq8n3gyb9sabyq2b4xda2"))))
206 (build-system font-build-system)
207 (home-page "http://www.latofonts.com/lato-free-fonts/")
208 (synopsis "Lato sans-serif typeface")
210 "Lato is a sanserif typeface family. It covers over 3000 glyphs per style.
211 The Lato 2.010 family supports more than 100 Latin-based languages, over
212 50 Cyrillic-based languages as well as Greek and IPA phonetics.")
213 (license license:silofl1.1)))
215 (define-public font-gnu-freefont-ttf
217 (name "font-gnu-freefont-ttf")
221 (uri (string-append "mirror://gnu/freefont/freefont-src-"
225 "0yk58blhcd4hm7nyincmqq4jrzjjk82wif2zmk1l3y2m4vif4qhd"))))
226 (build-system gnu-build-system)
228 `(#:phases (modify-phases %standard-phases
232 (let ((doc-dir (string-append %output "/share/doc/"
234 (font-dir (string-append %output
235 "/share/fonts/truetype")))
237 (substitute* "Makefile"
238 (("\\$\\(TMPDIR\\)") doc-dir)
239 (("sfd/\\*.ttf") ""))
240 (system* "make" "ttftar")
242 (for-each (lambda (file)
243 (install-file file font-dir))
245 (lambda (file) (string-suffix? "ttf" file))
246 (find-files "." "")))))))
247 #:test-target "tests"))
248 ;; replace python 3 with python 2
249 ;; python 3 support commits aren't yet released in 20120503
250 ;; so freefont needs python 2 support in fontforge
251 (native-inputs `(("fontforge" ,(package (inherit fontforge)
252 (inputs `(("python-2" ,python-2)
253 ,@(package-inputs fontforge)))))))
254 (home-page "https://www.gnu.org/software/freefont/")
255 (synopsis "Unicode-encoded outline fonts")
257 "The GNU Freefont project aims to provide a set of free outline
258 (PostScript Type0, TrueType, OpenType...) fonts covering the ISO
259 10646/Unicode UCS (Universal Character Set).")
260 (license license:gpl3+)
261 (properties '((upstream-name . "freefont")
262 (ftp-directory . "/gnu/freefont")))))
264 (define-public font-liberation
266 (name "font-liberation")
270 (uri (string-append "https://releases.pagure.org/"
271 "liberation-fonts/liberation-fonts-ttf-"
275 "010m4zfqan4w04b6bs9pm3gapn9hsb18bmwwgp2p6y6idj52g43q"))))
276 (build-system font-build-system)
277 (home-page "https://pagure.io/liberation-fonts/")
279 "Fonts compatible with Arial, Times New Roman, and Courier New")
281 "The Liberation font family aims at metric compatibility with
282 Arial, Times New Roman, and Courier New.
283 There are three sets:
286 @item Sans (a substitute for Arial, Albany, Helvetica, Nimbus Sans L, and
287 Bitstream Vera Sans);
288 @item Serif (a substitute for Times New Roman, Thorndale, Nimbus Roman, and
289 Bitstream Vera Serif);
290 @item Mono (a substitute for Courier New, Cumberland, Courier, Nimbus Mono L,
291 and Bitstream Vera Sans Mono).
294 The Liberation Fonts are sponsored by Red Hat.")
295 (license license:silofl1.1)))
297 (define-public font-linuxlibertine
299 (name "font-linuxlibertine")
302 (method url-fetch/tarbomb)
303 (uri (string-append "mirror://sourceforge/linuxlibertine/"
304 "linuxlibertine/" version
305 "/LinLibertineSRC_" version "_2012_07_02.tgz"))
308 "0x7cz6hvhpil1rh03rax9zsfzm54bh7r4bbrq8rz673gl9h47v0v"))))
309 (build-system font-build-system)
312 (modify-phases %standard-phases
313 (add-before 'install 'build
318 "fontforge" "-lang=ff"
319 "-c" (string-append "Open('" name "');"
321 (basename name "sfd") ext
323 (for-each (lambda (name)
324 (and (compile name "ttf")
325 (compile name "otf")))
326 (find-files "." "\\.sfd$"))
329 `(("fontforge" ,fontforge)))
330 (home-page "http://www.linuxlibertine.org/")
331 (synopsis "Serif and sans serif typefaces")
332 (description "The Linux Libertine fonts is a set of typefaces containing
333 both a Serif version (\"Linux Libertine\") and a Sans Serif (\"Linux
334 Biolinum\") designed to be used together as an alternative for Times/Times New
335 Roman and Helvetica/Arial. The Serif typeface comes in two shapes and two
336 weights, and with a Small Capitals version of the regular typeface. Linux
337 Biolinum is available in both Regular and Bold weights.")
338 ;; The fonts are released under either of these licenses.
339 (license (list license:gpl2+ license:silofl1.1))))
341 (define-public font-terminus
343 (name "font-terminus")
349 "mirror://sourceforge/terminus-font/terminus-font-"
356 "0487cyx5h1f0crbny5sg73a22gmym5vk1i7646gy7hgiscj2rxb4"))))
357 (build-system gnu-build-system)
359 `(("pkg-config" ,pkg-config)
361 ("bdftopcf" ,bdftopcf)
362 ("font-util" ,font-util)
363 ("mkfontdir" ,mkfontdir)))
365 `(#:configure-flags (list
366 ;; install fonts into subdirectory of package output
367 ;; instead of font-util-?.?.?/share/fonts/X11
368 (string-append "--with-fontrootdir="
369 %output "/share/fonts/X11"))
370 #:tests? #f)) ;; No test target in tarball
371 (home-page "http://terminus-font.sourceforge.net/")
372 (synopsis "Simple bitmap programming font")
373 (description "Terminus Font is a clean, fixed-width bitmap font, designed
374 for long periods of working with computers (8 or more hours per day).")
375 (license license:silofl1.1)))
377 (define-public font-adobe-source-han-sans
379 (name "font-adobe-source-han-sans")
384 "https://github.com/adobe-fonts/source-han-sans/archive/"
386 (file-name (string-append "source-han-sans-" version "R.tar.gz"))
389 "1ssx0fw90sy6mj8fv8fv4dgzszpqwbmwpjnlx16g4pvaqzdmybbz"))))
390 (outputs '("out" ; OpenType/CFF Collection (OTC), 121 MiB.
391 "cn" "jp" "kr" "tw")) ; Region-specific Subset OpenType/CFF.
392 (build-system trivial-build-system)
394 `(#:modules ((guix build utils))
397 (use-modules (guix build utils))
398 (let ((tar (string-append (assoc-ref %build-inputs
401 (PATH (string-append (assoc-ref %build-inputs
404 (install-opentype-fonts
405 (lambda (fonts-dir out)
406 (copy-recursively fonts-dir
407 (string-append (assoc-ref %outputs out)
408 "/share/fonts/opentype")))))
410 (invoke tar "xvf" (assoc-ref %build-inputs "source"))
411 (chdir (string-append "source-han-sans-" ,version "R"))
412 (install-opentype-fonts "OTC" "out")
413 (install-opentype-fonts "SubsetOTF/CN" "cn")
414 (install-opentype-fonts "SubsetOTF/JP" "jp")
415 (install-opentype-fonts "SubsetOTF/KR" "kr")
416 (install-opentype-fonts "SubsetOTF/TW" "tw")
417 (for-each delete-file (find-files %output "\\.zip$"))
422 (home-page "https://github.com/adobe-fonts/source-han-sans")
423 (synopsis "Pan-CJK fonts")
425 "Source Han Sans is a sans serif Pan-CJK font family that is offered in
426 seven weights: ExtraLight, Light, Normal, Regular, Medium, Bold, and Heavy.
427 And in several OpenType/CFF-based deployment configurations to accommodate
428 various system requirements or limitations. As the name suggests, Pan-CJK
429 fonts are intended to support the characters necessary to render or display
430 text in Simplified Chinese, Traditional Chinese, Japanese, and Korean.")
431 (license license:silofl1.1)))
433 (define-public font-cns11643
434 ;; Since upstream doesn't provide any version numbers, the date of the last
435 ;; edit is used, taken from https://data.gov.tw/dataset/5961
436 ;; XXX: The source is also updated in-place, so it may be desirable to mirror
437 ;; it elsewhere to avoid suddenly losing the current source file.
439 (name "font-cns11643")
440 (version "98.1.20180605")
443 (uri "http://www.cns11643.gov.tw/AIDB/Open_Data.zip")
446 "000a9whrjr1cd4pjc23pbl60zwkq3wcb5g61p9qi7fn3hwkp0kyw"))))
447 (build-system font-build-system)
448 (home-page "http://www.cns11643.gov.tw/AIDB/welcome.do")
449 (synopsis "CJK TrueType fonts, TW-Kai and TW-Sung")
451 "@code{CNS 11643} character set (Chinese National Standard, or Chinese
452 Standard Interchange Code) is the standard character set of the Republic of
453 China (Taiwan) for Chinese Characters and other Unicode symbols. Contained
454 are six TrueType fonts based on two script styles, Regular script (Kai), and
455 Sung/Ming script, each with three variants:
458 @item @code{CNS 11643} (@code{TW-Kai} and @code{TW-Sung}): Tens of thousands
459 of CJK characters from frequency tables published by the Taiwanese
460 Ministry of Education. ISO 10646 and Unicode compatible encoding.
461 @item @code{Big-5 Plus}: Several thousand frequently used CJK characters
462 encoded in the user defined area of the Big-5 code.
463 @item @code{Big-5 Extended}: A Big-5 character set based on the
464 @code{Big-5 Plus} and @code{CNS 11643} character sets.
466 (license (license:non-copyleft
467 "http://data.gov.tw/license")))) ; CC-BY 4.0 compatible
469 (define-public font-cns11643-swjz
471 (name "font-cns11643-swjz")
476 (uri "https://www.moedict.tw/fonts/truetype/cns11643/ebas927.ttf")
479 "1qkljldbmb53zp1rcmpsb8rzy67rnsqcjxi549m9743ifk4isl78"))))
480 (build-system font-build-system)
482 (string-append "http://www.cns11643.gov.tw/AIDB/download.do"
483 "?name=%E5%AD%97%E5%9E%8B%E4%B8%8B%E8%BC%89"))
484 (synopsis "TrueType seal script font")
486 "@code{Shuowen Jiezi} is a TrueType seal script font based on the ancient
487 text of the same name published by the Executive Yuan of Taiwan. 6721 glyphs
488 are included, at Unicode compatible code points corresponding to their modern
490 ;; Original text only available in Chinese. More info at
491 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=26703#11
492 (license (license:non-copyleft
493 "http://www.cns11643.gov.tw/AIDB/copyright.do"))))
495 (define-public font-wqy-zenhei
497 (name "font-wqy-zenhei")
502 "mirror://sourceforge/wqy/wqy-zenhei/" version
503 "%20%28Fighting-state%20RC1%29/wqy-zenhei-"
505 (file-name (string-append "wqy-zenhei-" version ".tar.gz"))
508 "1mkmxq8g2hjcglb3zajfqj20r4r88l78ymsp2xyl5yav8w3f7dz4"))))
509 (build-system font-build-system)
510 (home-page "http://wenq.org/wqy2/")
511 (synopsis "CJK font")
513 "WenQuanYi Zen Hei is a Hei-Ti style (sans-serif type) Chinese outline
514 font. It is designed for general purpose text formatting and on-screen
515 display of Chinese characters and symbols from many other languages.
516 WenQuanYi Zen Hei provides a rather complete coverage of Chinese Hanzi glyphs,
517 including both simplified and traditional forms. The total glyph number in
518 this font is over 35,000, including over 21,000 Chinese Hanzi. This font has
519 full coverage of the GBK (CP936) charset, CJK Unified Ideographs, as well as
520 the code-points needed for zh_cn, zh_sg, zh_tw, zh_hk, zh_mo, ja (Japanese) and
521 ko (Korean) locales for @code{fontconfig}.")
522 ;; GPLv2 with font embedding exception
523 (license license:gpl2)))
525 (define-public font-wqy-microhei
527 (name "font-wqy-microhei")
528 (version "0.2.0-beta")
531 (uri (string-append "mirror://sourceforge/wqy/wqy-microhei/"
532 version "/wqy-microhei-" version ".tar.gz"))
535 "0gi1yxqph8xx869ichpzzxvx6y50wda5hi77lrpacdma4f0aq0i8"))))
536 (build-system font-build-system)
537 (home-page "http://wenq.org/wqy2/")
538 (synopsis "CJK font")
540 "WenQuanYi Micro Hei is a Sans-Serif style (also known as Hei, Gothic or
541 Dotum among the Chinese/Japanese/Korean users) high quality CJK outline font.
542 It was derived from \"Droid Sans Fallback\" and \"Droid Sans\" released by
543 Google Inc. This font contains all the unified CJK Han glyphs in the range of
544 U+4E00-U+9FC3 defined in Unicode Standard 5.1, together with many other
545 languages unicode blocks, including Latins, Extended Latins, Hanguls and
546 Kanas. The font file is extremely compact (~4M) compared with most known CJK
548 ;; This font is licensed under Apache2.0 or GPLv3 with font embedding
550 (license license:gpl3)))
552 (define-public font-rachana
554 (name "font-rachana")
560 "https://gitlab.com/smc/rachana/repository/archive.tar.gz?ref=Version"
562 (file-name (string-append name "-" version ".tar.gz"))
565 "0jc091gshna6p1dd6lf507jxkgk6rsja835fc9dm71mcplq53bm1"))))
566 (build-system font-build-system)
567 (home-page "https://smc.org.in")
568 (synopsis "Malayalam font")
570 "Rachana is a Malayalam font designed by Hussain K H. The project was
571 part of Rachana Aksharavedi for the original script of Malayalam in computing.
572 Rachana has about 1,200+ glyphs for Malayalam and contains glyphs required for
573 printing old Malayalam books without compromising the writing style.")
574 ;; This font is licensed under SIL 1.1 or GPLv3+ with font embedding
576 (license (list license:silofl1.1 license:gpl3+))))
578 (define-public font-tex-gyre
580 (name "font-tex-gyre")
584 (method url-fetch/zipbomb)
585 (uri (string-append "http://www.gust.org.pl/projects/e-foundry/"
586 "tex-gyre/whole/tg-" version "otf.zip"))
589 "0kph9l3g7jb2bpmxdbdg5zl56wacmnvdvsdn7is1gc750sqvsn31"))))
590 (build-system font-build-system)
591 (home-page "http://www.gust.org.pl/projects/e-foundry/tex-gyre/")
592 (synopsis "Remake of Ghostscript fonts")
593 (description "The TeX Gyre collection of fonts is the result of an
594 extensive remake and extension of the freely available base PostScript fonts
595 distributed with Ghostscript version 4.00. The collection contains the
596 following fonts in the OpenType format: Adventor, Bonum, Chorus, Cursor,
597 Heros, Pagella, Schola, Termes.")
598 (license license:gfl1.0)))
600 (define-public font-anonymous-pro
602 (name "font-anonymous-pro")
607 "http://www.marksimonson.com/assets/content/fonts/"
608 "AnonymousPro-" version ".zip"))
611 "1asj6lykvxh46czbal7ymy2k861zlcdqpz8x3s5bbpqwlm3mhrl6"))))
612 (build-system font-build-system)
613 (home-page "http://www.marksimonson.com/fonts/view/anonymous-pro")
614 (synopsis "Fixed-width fonts designed with coding in mind")
615 (description "Anonymous Pro is a family of four fixed-width fonts designed
616 with coding in mind. Anonymous Pro features an international, Unicode-based
617 character set, with support for most Western and Central European Latin-based
618 languages, plus Greek and Cyrillic.")
619 (license license:silofl1.1)))
621 (define-public font-gnu-unifont
623 (name "font-gnu-unifont")
628 "mirror://gnu/unifont/unifont-" version "/unifont-"
632 "1di8i44c163b9l5f08jcrjfijnqz0j7p7hpfvf8dcms6cm6s4wvy"))))
633 (build-system gnu-build-system)
634 (outputs '("out" ; TrueType version
635 "pcf" ; PCF (bitmap) version
636 "psf" ; PSF (console) version
637 "bin" ; Utilities to manipulate '.hex' format
640 '(#:parallel-build? #f ; parallel build fails
641 #:tests? #f ; no check target
643 (modify-phases %standard-phases
646 (lambda _ (setenv "CC" "gcc") #t))
649 (lambda* (#:key outputs #:allow-other-keys)
650 (let* ((ttf (string-append (assoc-ref outputs "out")
651 "/share/fonts/truetype"))
652 (pcf (string-append (assoc-ref outputs "pcf")
653 "/share/fonts/misc"))
654 (psf (string-append (assoc-ref outputs "psf")
655 "/share/consolefonts"))
656 (bin (assoc-ref outputs "bin")))
658 (string-append "PREFIX=" bin)
659 (string-append "TTFDEST=" ttf)
660 (string-append "PCFDEST=" pcf)
661 (string-append "CONSOLEDEST=" psf)
663 ;; Move Texinfo file to the right place.
664 (mkdir (string-append bin "/share/info"))
665 (invoke "gzip" "-9n" "doc/unifont.info")
666 (install-file "doc/unifont.info.gz"
667 (string-append bin "/share/info"))
670 `(("perl" ,perl))) ; for utilities
672 "Large bitmap font covering Unicode's Basic Multilingual Plane")
674 "GNU Unifont is a bitmap font covering essentially all of
675 Unicode's Basic Multilingual Plane. The package also includes
676 utilities to ease adding new glyphs to the font.")
677 (home-page "http://unifoundry.com/unifont.html")
678 (properties '((upstream-name . "unifont")))
679 (license license:gpl2+)))
681 (define-public font-google-noto
683 (name "font-google-noto")
686 (method url-fetch/zipbomb)
687 (uri (string-append "https://noto-website.storage.googleapis.com/"
688 "pkgs/Noto-hinted.zip"))
689 (file-name (string-append name "-" version ".zip"))
692 "1p92a6dvs7wqwjfpp1ahr9z1wz35am0l8r78521383spd77bmrfm"))))
693 (build-system font-build-system)
694 (home-page "https://www.google.com/get/noto/")
695 (synopsis "Fonts to cover all languages")
696 (description "Google Noto Fonts is a family of fonts designed to support
697 all languages with a consistent look and aesthetic. Its goal is to properly
698 display all Unicode symbols.")
699 (license license:silofl1.1)))
701 (define-public font-google-roboto
703 (name "font-google-roboto")
708 (uri (string-append "https://github.com/google/roboto/releases/download/"
709 "v" version "/roboto-hinted.zip"))
710 (file-name (string-append name "-" version ".zip"))
713 "0spscx08fad7i8qs7icns96iwcapniq8lwwqqvbf7bamvs8qfln4"))))
714 (build-system font-build-system)
715 (home-page "https://github.com/google/roboto")
716 (synopsis "The Roboto family of fonts")
718 "Roboto is Google’s signature family of fonts, the default font on Android
719 and Chrome OS, and the recommended font for the
720 visual language \"Material Design\".")
721 (license license:asl2.0)))
723 (define-public font-un
726 (version "1.0.2-080608")
730 "https://kldp.net/unfonts/release/2607-"
731 "un-fonts-core-" version ".tar.gz"))
732 (file-name (string-append name "-" version ".tar.gz"))
735 "13liaz2pmww3aqabm55la5npd08m1skh334ky7qfidxaz5s742iv"))))
736 (build-system font-build-system)
737 (home-page "https://kldp.net/projects/unfonts/")
738 (synopsis "Collection of Korean fonts")
740 "Un-fonts is a family of mainly Korean fonts.
741 It contains the following fonts and styles:
744 @item UnBatang, UnBatangBold: serif;
745 @item UnDotum, UnDotumBold: sans-serif;
746 @item UnGraphic, UnGraphicBold: sans-serif style;
747 @item UnDinaru, UnDinaruBold, UnDinaruLight;
748 @item UnPilgi, UnPilgiBold: script;
749 @item UnGungseo: cursive, brush-stroke.
751 (license license:gpl2+)))
753 (define-public font-fantasque-sans
755 (name "font-fantasque-sans")
760 (uri (string-append "https://github.com/belluzj/fantasque-sans/"
761 "archive/v" version ".tar.gz"))
762 (file-name (string-append name "-" version ".tar.gz"))
765 "07fpy53k2x2nz5q61swkab6cfk9gw2kc4x4brsj6zjgbm16fap85"))))
766 (build-system gnu-build-system)
768 `(("ttfautohint" ,ttfautohint)
769 ("woff-tools" ,woff-tools)
770 ("fontforge" ,fontforge)
772 ("ttf2eot" ,ttf2eot)))
774 `(#:tests? #f ;test target intended for visual inspection
775 #:phases (modify-phases %standard-phases
776 (delete 'configure) ;no configuration
778 ;; 'make install' wants to install to ~/.fonts, install to
780 (lambda* (#:key outputs #:allow-other-keys)
781 (let* ((out (assoc-ref outputs "out"))
782 (font-dir (string-append out "/share/fonts"))
783 (truetype-dir (string-append font-dir "/truetype"))
784 (opentype-dir (string-append font-dir "/opentype"))
785 (webfonts-dir (string-append font-dir "/webfonts")))
786 (copy-recursively "OTF" opentype-dir)
787 (for-each (lambda (f) (install-file f truetype-dir))
788 (find-files "." "\\.ttf$"))
789 (copy-recursively "Webfonts" webfonts-dir)
791 (synopsis "Font family with a monospaced variant for programmers")
793 "Fantasque Sans Mono is a programming font designed with functionality in
794 mind. The font includes a bold version and a good italic version with new
795 glyph designs, not just an added slant.")
796 (home-page "https://fontlibrary.org/en/font/fantasque-sans-mono")
797 (license license:silofl1.1)))
799 (define-public font-hack
804 (method url-fetch/zipbomb)
806 "https://github.com/source-foundry/Hack/releases/download/v"
807 version "/Hack-v" version "-ttf.zip"))
810 "18fpaczj2rxfwgnrqpkxq0qn01parhmngglc4i1n3gchyzdsrh0x"))))
811 (build-system font-build-system)
812 (home-page "https://sourcefoundry.org/hack/")
813 (synopsis "Typeface designed for source code")
815 "Hack is designed to be a workhorse typeface for code. It expands upon
816 the Bitstream Vera & DejaVu projects, provides 1561 glyphs, and includes
819 ;; See https://github.com/source-foundry/Hack/issues/271 for details.
820 (list license:expat ; the Hack modifications to...
821 license:public-domain ; ...the DejaVu modifications to...
822 (license:x11-style ; ...the Bitstream Vera typeface
823 "file://LICENSE.md" "Bitstream Vera License")))))
825 (define-public font-adobe-source-code-pro
827 (name "font-adobe-source-code-pro")
828 (version "2.030R-ro-1.050R-it")
832 "https://github.com/adobe-fonts/source-code-pro/archive/"
833 (regexp-substitute/global
834 ;; The upstream tag uses "/" between the roman and italic
835 ;; versions, so substitute our "-" separator here.
836 #f "R-ro-" version 'pre "R-ro/" 'post) ".tar.gz"))
837 (file-name (string-append name "-" version ".tar.gz"))
840 "0arhhsf3i7ss39ykn73d1j8k4n8vx7115xph6jwkd970p1cxvr54"))))
841 (build-system font-build-system)
842 (home-page "https://github.com/adobe-fonts/source-code-pro")
844 "Monospaced font family for user interface and coding environments")
846 "Source Code Pro is a set of monospaced OpenType fonts that have been
847 designed to work well in user interface environments.")
848 (license license:silofl1.1)))
850 (define-public font-fira-mono
852 (name "font-fira-mono")
856 (uri (string-append "https://carrois.com/downloads/fira_mono_3_2/"
858 (string-replace-substring version "." "")
862 "1z65x0dw5dq6rs6p9wyfrir50rlh95vgzsxr8jcd40nqazw4jhpi"))))
863 (build-system font-build-system)
864 (home-page "https://mozilla.github.io/Fira/")
865 (synopsis "Mozilla's monospace font")
866 (description "This is the typeface used by Mozilla in Firefox OS.")
867 (license license:silofl1.1)))
869 (define-public font-fira-sans
871 (name "font-fira-sans")
875 (uri (string-append "https://github.com/mozilla/Fira/archive/"
877 (file-name (string-append name "-" version ".tar.gz"))
880 "1r6zdnqqp4bgq5nmgqbj0vvj7x1h9w912851ggbl9wc7fdjnjqnq"))))
881 (build-system font-build-system)
882 (home-page "https://mozilla.github.io/Fira/")
883 (synopsis "Mozilla's Fira Sans Font")
884 (description "This is the typeface used by Mozilla in Firefox OS.")
885 (license license:silofl1.1)))
887 (define-public font-fira-code
889 (name "font-fira-code")
892 (method url-fetch/zipbomb)
893 (uri (string-append "https://github.com/tonsky/FiraCode/releases/"
895 "/FiraCode_" version ".zip"))
898 "13bxgf59g6fw5191xclcjzn22hj8jk9k5jjwf7vz07mpjbgadcl5"))))
899 (build-system font-build-system)
900 (home-page "https://mozilla.github.io/Fira/")
901 (synopsis "Monospaced font with programming ligatures")
903 "Fira Code is an extension of the Fira Mono font containing a set of ligatures
904 for common programming multi-character combinations. This is just a font rendering
905 feature: underlying code remains ASCII-compatible. This helps to read and understand
906 code faster. For some frequent sequences like .. or //, ligatures allow us to
908 (license license:silofl1.1)))
910 (define-public font-awesome
912 (name "font-awesome")
916 (uri (string-append "http://fontawesome.io/assets/"
917 name "-" version ".zip"))
920 "1m1rfwm4sjkv10j3xd2dhwk286a5912b2zgvc692cmxi5gxs68jf"))))
921 (build-system font-build-system)
922 (home-page "http://fontawesome.io")
923 (synopsis "Font that contains a rich iconset")
925 "Font Awesome is a full suite of pictographic icons for easy scalable
927 (license license:silofl1.1)))
929 (define-public font-tamzen
936 (uri (string-append "https://github.com/sunaku/tamzen-font/archive/"
937 "Tamzen-" version ".tar.gz"))
938 (file-name (string-append name "-" version ".tar.gz"))
941 "1ryd7gp6qiwaqw73jqbmh4kwlriyd8xykh4j7z90z8xp9fm7lrys"))))
942 (build-system trivial-build-system)
944 `(#:modules ((guix build utils))
947 (use-modules (guix build utils))
949 (let ((tar (string-append (assoc-ref %build-inputs "tar")
951 (PATH (string-append (assoc-ref %build-inputs "gzip")
953 (font-dir (string-append %output "/share/fonts/misc"))
954 (psf-dir (string-append %output "/share/kbd/consolefonts"))
955 (src-pcf-dir (string-append "tamzen-font-Tamzen-"
958 (invoke tar "xvf" (assoc-ref %build-inputs "source"))
962 (for-each (lambda (pcf)
963 (install-file pcf font-dir))
964 (find-files "." "\\.pcf$"))
966 (for-each (lambda (psf)
967 (install-file psf psf-dir))
968 (find-files "." "\\.psf$"))
973 (home-page "https://github.com/sunaku/tamzen-font")
974 (synopsis "Monospaced bitmap font for console and X11")
976 "Tamzen is a fork of the @code{Tamsyn} font. It is programatically forked
977 from @code{Tamsyn} version 1.11, backporting glyphs from older versions while
978 deleting deliberately empty glyphs (which are marked as unimplemented) to
979 allow secondary/fallback fonts to provide real glyphs at those codepoints.
981 The @code{TamzenForPowerline} fonts provide additional @code{Powerline} symbols,
982 which are programatically injected with @code{bitmap-font-patcher} and
983 later hand-tweaked with the gbdfed(1) editor:
986 @item all icons are expanded to occupy the maximum available space
987 @item the branch of the fork icon ( U+E0A0) was made larger than the trunk
988 @item for the newline icon ( U+E0A1), the @emph{N} was made larger at the bottom
989 @item the keyhole in the padlock icon ( U+E0A2) was replaced with @emph{//} lines.
991 (license (license:non-copyleft "file://LICENSE"))))
993 (define-public font-comic-neue
995 (name "font-comic-neue")
998 (method url-fetch/zipbomb)
1000 "http://www.comicneue.com/comic-neue-" version ".zip"))
1003 "1695hkpd8kqnr2a88p8xs496slgzxjjkzpa9aa33ml3pnh7519zk"))))
1004 (build-system font-build-system)
1007 (modify-phases %standard-phases
1008 ;; Delete Mac OS X specific files. If not deleted, these cause
1009 ;; several hidden files to be installed.
1010 (add-before 'install 'delete-macosx-files
1012 (delete-file-recursively "__MACOSX")
1014 (add-after 'install 'install-conf
1015 (lambda* (#:key outputs #:allow-other-keys)
1016 (let ((conf-dir (string-append (assoc-ref outputs "out")
1017 "/share/fontconfig/conf.avail")))
1019 (call-with-output-file
1020 (string-append conf-dir "/30-comic-neue.conf")
1022 (format port "<?xml version=\"1.0\"?>
1023 <!DOCTYPE fontconfig SYSTEM \"fonts.dtd\">
1025 <!-- If Comic Sans is missing, use Comic Neue instead. -->
1027 <family>Comic Sans MS</family>
1029 <family>Comic Neue</family>
1032 </fontconfig>\n"))))
1034 (home-page "http://www.comicneue.com/")
1035 (synopsis "Font that fixes the shortcomings of Comic Sans")
1037 "Comic Neue is a font that attempts to create a respectable casual
1038 typeface, by mimicking Comic Sans while fixing its most obvious shortcomings.")
1039 (license license:silofl1.1)))
1041 (define-public font-iosevka
1043 (name "font-iosevka")
1046 (method url-fetch/zipbomb)
1048 "https://github.com/be5invis/Iosevka/releases/download/v"
1049 version "/iosevka-pack-" version ".zip"))
1052 "0s3g6mk0ngwsrw9h9dqinb50cd9i8zhqdcmmh93fhyf4d87yfwyi"))))
1053 (build-system font-build-system)
1054 (home-page "https://be5invis.github.io/Iosevka/")
1055 (synopsis "Coders' typeface, built from code")
1057 "Iosevka is a slender monospace sans-serif or slab-serif typeface inspired
1058 by Pragmata Pro, M+, and PF DIN Mono, designed to be the ideal font for
1059 programming. Iosevka is completely generated from its source code.")
1060 (license (list license:silofl1.1 ; build artifacts (i.e. the fonts)
1061 license:bsd-3)))) ; supporting code
1063 (define-public font-go
1064 (let ((commit "f03a046406d4d7fbfd4ed29f554da8f6114049fc")
1068 (version (string-append "20170330-" revision "." (string-take commit 7)))
1070 (file-name (string-append "go-image-" version "-checkout"))
1073 (url "https://go.googlesource.com/image")
1077 "1aq6mnjayks55gd9ahavk6jfydlq5lm4xm0xk4pd5sqa74p5p74d"))))
1078 (build-system font-build-system)
1081 (modify-phases %standard-phases
1082 (add-before 'install 'chdir
1084 (chdir "font/gofont/ttfs")
1086 (home-page "https://blog.golang.org/go-fonts")
1087 (synopsis "The Go font family")
1089 "The Go font family is a set of WGL4 TrueType fonts from the Bigelow &
1090 Holmes type foundry, released under the same license as the Go programming
1091 language. It includes a set of proportional, sans-serif fonts, and a set of
1092 monospace, slab-serif fonts.")
1093 (license license:bsd-3))))
1095 (define-public font-google-material-design-icons
1097 (name "font-google-material-design-icons")
1102 "https://github.com/google/material-design-icons/archive/"
1106 "018i3za9r6kf6svci33z09lc5pr5yz4164m8gzzwjzzqcrng0p5j"))
1107 (file-name (string-append name "-" version ".tar.gz"))))
1108 (build-system font-build-system)
1109 (home-page "http://google.github.io/material-design-icons")
1110 (synopsis "Icon font of Google Material Design icons")
1112 "Material design system icons are simple, modern, friendly, and sometimes
1113 quirky. Each icon is created using our design guidelines to depict in simple
1114 and minimal forms the universal concepts used commonly throughout a UI.
1115 Ensuring readability and clarity at both large and small sizes, these icons
1116 have been optimized for beautiful display on all common platforms and display
1118 (license license:asl2.0)))
1120 (define-public font-open-dyslexic
1122 (name "font-open-dyslexic")
1123 (version "20160623")
1127 (uri (string-append "https://github.com/antijingoist/open-dyslexic/"
1128 "archive/" version "-Stable.tar.gz"))
1129 (file-name (string-append name "-" version ".tar.gz"))
1132 "0al0j9kb32kfavcpq1kigsd36yzvf5yhzqhds0jkh7ngbxyxwkx4"))))
1133 (build-system font-build-system)
1134 (home-page "https://opendyslexic.org")
1135 (synopsis "Font for dyslexics and high readability")
1136 (description "OpenDyslexic is a font designed to help readability for some
1137 of the symptoms of dyslexia. Letters have heavy weighted bottoms to provide
1138 an indication of orientation to make it more difficult to confuse with other
1139 similar letters. Consistently weighted bottoms can also help reinforce the
1140 line of text. The unique shapes of each letter can help prevent flipping and
1141 swapping. The italic style for OpenDyslexic has been crafted to be used for
1142 emphasis while still being readable.")
1144 (license:fsdg-compatible
1145 "https://www.gnome.org/fonts/#Final_Bitstream_Vera_Fonts"
1146 "The Font Software may be sold as part of a larger software package but
1147 no copy of one or more of the Font Software typefaces may be sold by
1150 (define-public font-dosis
1157 (uri (string-append "http://www.impallari.com/media/releases/dosis-"
1158 "v" version ".zip"))
1161 "1qhci68f68mf87jd69vjf9qjq3wydgw1q7ivn3amjb65ls1s0c4s"))))
1162 (build-system trivial-build-system)
1164 `(#:modules ((guix build utils))
1166 (use-modules (guix build utils)
1169 (let ((PATH (string-append (assoc-ref %build-inputs
1172 (ttf-dir (string-append %output
1173 "/share/fonts/truetype"))
1174 (otf-dir (string-append %output
1175 "/share/fonts/opentype")))
1176 (setenv "PATH" PATH)
1177 (invoke "unzip" (assoc-ref %build-inputs "source"))
1181 (for-each (lambda (ttf)
1182 (install-file ttf ttf-dir))
1183 (find-files "." "\\.ttf$"))
1184 (for-each (lambda (otf)
1185 (install-file otf otf-dir))
1186 (find-files "." "\\.otf$"))
1188 (native-inputs `(("unzip" ,unzip)))
1189 (home-page "http://www.impallari.com/dosis")
1190 (synopsis "Very simple, rounded, sans serif family")
1192 "Dosis is a very simple, rounded, sans serif family.
1193 The lighter weights are minimalist. The bolder weights have more personality.
1194 The medium weight is nice and balanced. The overall result is a family
1195 that's clean and modern, and can express a wide range of voices & feelings.
1196 It comes in 7 incremental weights:
1197 ExtraLight, Light, Book, Medium, Semibold, Bold & ExtraBold")
1198 (license license:silofl1.1)))
1200 (define-public font-culmus
1202 (name "font-culmus")
1207 (uri (string-append "https://sourceforge.net/projects/"
1208 "culmus/files/culmus/" version "/culmus-src-"
1212 "1djxalm26r7bcq33ckmfa15xfs6pmqzvcl64d5lqa1dl01bl4j4z"))))
1213 (build-system font-build-system)
1216 (modify-phases %standard-phases
1217 (add-before 'install 'build
1222 "fontforge" "-lang=ff"
1223 "-c" (string-append "Open('" name "');"
1225 (basename name "sfd") ext
1227 ;; This part based on the fonts shipped in the non-source package.
1228 (for-each (lambda (name)
1229 (compile name "ttf"))
1230 (find-files "." "^[^Nachlieli].*\\.sfd$"))
1231 (for-each (lambda (name)
1232 (compile name "otf"))
1233 (find-files "." "^Nachlieli.*\\.sfd$"))
1236 `(("fontforge" ,fontforge)))
1237 (home-page "http://culmus.sourceforge.net/")
1238 (synopsis "TrueType Hebrew Fonts for X11")
1239 (description "14 Hebrew trivial families. Contain ASCII glyphs from various
1240 sources. Those families provide a basic set of a serif (Frank Ruehl), sans
1241 serif (Nachlieli) and monospaced (Miriam Mono) trivials. Also included Miriam,
1242 Drugulin, Aharoni, David, Hadasim etc. Cantillation marks support is
1243 available in Keter YG.")
1244 (license license:gpl2))) ; consult the LICENSE file included
1246 (define-public font-lohit
1249 (version "20140220")
1253 (uri (string-append "https://releases.pagure.org/lohit/lohit-ttf-"
1257 "1rmgr445hw1n851ywy28csfvswz1i6hnc8mzp88qw2xk9j4dn32d"))))
1258 (build-system font-build-system)
1259 (home-page "https://pagure.io/lohit")
1260 (synopsis "Lohit TrueType Indic fonts")
1261 (description "Lohit is a font family designed to cover Indic scripts.
1262 Lohit supports the Assamese, Bengali, Devanagari (Hindi, Kashmiri, Konkani,
1263 Maithili, Marathi, Nepali, Sindhi, Santali, Bodo, Dogri languages), Gujarati,
1264 Kannada, Malayalam, Manipuri, Oriya, Punjabi, Tamil and Telugu scripts.")
1265 (license license:silofl1.1)))
1267 (define-public font-blackfoundry-inria
1269 (name "font-blackfoundry-inria")
1271 (home-page "https://github.com/BlackFoundry/InriaFonts")
1276 (commit (string-append "v" version))))
1279 "06775y99lyh6hj5hzvrx56iybdck8a8xfqkipqd5c4cldg0a9hh8"))
1280 (file-name (string-append name "-" version "-checkout"))))
1281 ;; XXX: There are .ufo directories (the "source") so in theory we should
1282 ;; be able to rebuild TTF and OTF files with FontForge. Unfortunately a
1285 ;; fontforge -lang=ff -c "Open('InriaSans-Regular.ufo'); Generate('foo.ttf');"
1287 ;; segfaults in '_UFOLoadGlyph', which calls out to libpython. :-/
1288 ;; In the meantime we ship the precompiled OTF and TTF files.
1289 (build-system font-build-system)
1290 (synopsis "Inria Sans and Inria Serif type family")
1292 "Inria Sans and Inria Serif are the two members of a type family designed
1293 for Inria, a public research institute in computer science and mathematics.")
1294 (license license:silofl1.1)))