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 Ricardo Wurmus <rekado@elephly.net>
9 ;;; Copyright © 2015, 2016 Leo Famulari <leo@famulari.name>
10 ;;; Copyright © 2016, 2017 ng0 <ng0@libertad.pw>
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>
21 ;;; This file is part of GNU Guix.
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.
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.
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/>.
36 (define-module (gnu packages fonts)
37 #:use-module (ice-9 regex)
38 #:use-module (guix utils)
39 #:use-module ((guix licenses) #:prefix license:)
40 #:use-module (guix packages)
41 #:use-module (guix download)
42 #:use-module (guix git-download)
43 #:use-module (guix build-system gnu)
44 #:use-module (guix build-system trivial)
45 #:use-module (gnu packages base)
46 #:use-module (gnu packages compression)
47 #:use-module (gnu packages fontutils)
48 #:use-module (gnu packages golang)
49 #:use-module (gnu packages perl)
50 #:use-module (gnu packages pkg-config)
51 #:use-module (gnu packages python)
52 #:use-module (gnu packages xorg)
53 #:use-module (gnu packages zip))
55 (define-public font-inconsolata
57 (name "font-inconsolata")
61 (uri "http://www.levien.com/type/myfonts/Inconsolata.otf")
64 "06js6znbcf7swn8y3b8ki416bz96ay7d3yvddqnvi88lqhbfcq8m"))))
65 (build-system trivial-build-system)
67 `(#:modules ((guix build utils))
69 (use-modules (guix build utils))
70 (let ((font-dir (string-append %output
71 "/share/fonts/opentype"))
72 (source (assoc-ref %build-inputs "source")))
75 (string-append font-dir "/" "inconsolata.otf"))))))
76 (native-inputs `(("source" ,source)))
77 (home-page "http://levien.com/type/myfonts/inconsolata.html")
78 (synopsis "Monospace font")
79 (description "A monospace font, designed for code listings and the like,
80 in print. With attention to detail for high resolution rendering.")
81 (license license:silofl1.1)))
83 (define-public font-ubuntu
90 "http://font.ubuntu.com/download/ubuntu-font-family-"
94 "0hjvq2x758dx0sfwqhzflns0ns035qm7h6ygskbx1svzg517sva5"))))
95 (build-system trivial-build-system)
97 `(#:modules ((guix build utils))
99 (use-modules (guix build utils)
102 (let ((PATH (string-append (assoc-ref %build-inputs
105 (font-dir (string-append %output
106 "/share/fonts/truetype"))
107 (doc-dir (string-append %output "/share/doc/"
108 ,name "-" ,version)))
110 (system* "unzip" (assoc-ref %build-inputs "source"))
114 (chdir (string-append "ubuntu-font-family-" ,version))
115 (for-each (lambda (ttf)
116 (install-file ttf font-dir))
117 (find-files "." "\\.ttf$"))
118 (for-each (lambda (doc)
119 (install-file doc doc-dir))
120 (find-files "." "\\.txt$"))))))
121 (native-inputs `(("source" ,source)
123 (home-page "http://font.ubuntu.com/")
124 (synopsis "The Ubuntu Font Family")
125 (description "The Ubuntu Font Family is a unique, custom designed font
126 that has a very distinctive look and feel. This package provides the
127 TrueType (TTF) files.")
129 (license:non-copyleft
130 "http://font.ubuntu.com/ufl/ubuntu-font-licence-1.0.txt"
131 "Ubuntu Font License v1.0"))))
133 (define-public font-dejavu
139 (uri (string-append "mirror://sourceforge/dejavu/dejavu/"
140 version "/dejavu-fonts-ttf-"
144 "1mqpds24wfs5cmfhj57fsfs07mji2z8812i5c4pi5pbi738s977s"))))
145 (build-system trivial-build-system)
147 `(#:modules ((guix build utils))
149 (use-modules (guix build utils))
151 (let ((tar (string-append (assoc-ref %build-inputs
154 (PATH (string-append (assoc-ref %build-inputs
157 (font-dir (string-append
158 %output "/share/fonts/truetype"))
159 (conf-dir (string-append
160 %output "/share/fontconfig/conf.avail"))
161 (doc-dir (string-append
162 %output "/share/doc/" ,name "-" ,version)))
164 (system* tar "xvf" (assoc-ref %build-inputs "source"))
169 (chdir (string-append "dejavu-fonts-ttf-" ,version))
170 (for-each (lambda (ttf)
171 (install-file ttf font-dir))
172 (find-files "ttf" "\\.ttf$"))
173 (for-each (lambda (conf)
174 (install-file conf conf-dir))
175 (find-files "fontconfig" "\\.conf$"))
176 (for-each (lambda (doc)
177 (install-file doc doc-dir))
178 (find-files "." "\\.txt$|^[A-Z][A-Z]*$"))))))
179 (native-inputs `(("source" ,source)
182 (home-page "http://dejavu-fonts.org/")
183 (synopsis "Vera font family derivate with additional characters")
184 (description "DejaVu provides an expanded version of the Vera font family
185 aiming for quality and broader Unicode coverage while retaining the original
186 Vera style. DejaVu currently works towards conformance to the Multilingual
187 European Standards (MES-1 and MES-2) for Unicode coverage. The DejaVu fonts
188 provide serif, sans and monospaced variants.")
191 "http://dejavu-fonts.org/"))))
193 (define-public font-bitstream-vera
195 (name "font-bitstream-vera")
199 (uri (string-append "mirror://gnome/sources/ttf-bitstream-vera/"
200 version "/ttf-bitstream-vera-"
204 "1p3qs51x5327gnk71yq8cvmxc6wgx79sqxfvxcv80cdvgggjfnyv"))))
205 (build-system trivial-build-system)
207 `(#:modules ((guix build utils))
209 (use-modules (guix build utils)
212 (let ((tar (string-append (assoc-ref %build-inputs
215 (PATH (string-append (assoc-ref %build-inputs
218 (font-dir (string-append %output
219 "/share/fonts/truetype"))
220 (doc-dir (string-append %output "/share/doc/"
221 ,name "-" ,version)))
223 (system* tar "xvf" (assoc-ref %build-inputs "source"))
227 (chdir (string-append "ttf-bitstream-vera-" ,version))
228 (for-each (lambda (ttf)
229 (install-file ttf font-dir))
230 (find-files "." "\\.ttf$"))
231 (for-each (lambda (doc)
232 (install-file doc doc-dir))
233 (find-files "." "\\.TXT$"))))))
234 (native-inputs `(("source" ,source)
237 (home-page "http://www.gnome.org/fonts/")
238 (synopsis "Bitstream Vera sans-serif typeface")
239 (description "Vera is a sans-serif typeface from Bitstream, Inc. This
240 package provides the TrueType (TTF) files.")
243 "http://www.gnome.org/fonts/#Final_Bitstream_Vera_Fonts"))))
245 (define-public font-cantarell
247 (name "font-abattis-cantarell")
251 (uri (string-append "mirror://gnome/sources/cantarell-fonts/"
252 (version-major+minor version)
253 "/cantarell-fonts-" version ".tar.xz"))
256 "0zvkd8cm1cg2919v1js9qmzwa02sjl7qajj3gcvgqvai1fm2i8hl"))))
257 (build-system gnu-build-system)
258 (home-page "https://wiki.gnome.org/Projects/CantarellFonts")
259 (synopsis "Cantarell sans-serif typeface")
260 (description "The Cantarell font family is a contemporary Humanist
261 sans-serif designed for on-screen reading. It is used by GNOME@tie{}3.")
262 (license license:silofl1.1)))
264 (define-public font-gnu-freefont-ttf
266 (name "font-gnu-freefont-ttf")
270 (uri (string-append "mirror://gnu/freefont/freefont-src-"
274 "0yk58blhcd4hm7nyincmqq4jrzjjk82wif2zmk1l3y2m4vif4qhd"))))
275 (build-system gnu-build-system)
277 `(#:phases (modify-phases %standard-phases
281 (let ((doc-dir (string-append %output "/share/doc/"
283 (font-dir (string-append %output
284 "/share/fonts/truetype")))
286 (substitute* "Makefile"
287 (("\\$\\(TMPDIR\\)") doc-dir)
288 (("sfd/\\*.ttf") ""))
289 (system* "make" "ttftar")
291 (for-each (lambda (file)
292 (install-file file font-dir))
294 (lambda (file) (string-suffix? "ttf" file))
295 (find-files "." "")))))))
296 #:test-target "tests"))
297 ;; replace python 3 with python 2
298 ;; python 3 support commits aren't yet released in 20120503
299 ;; so freefont needs python 2 support in fontforge
300 (native-inputs `(("fontforge" ,(package (inherit fontforge)
301 (inputs `(("python-2" ,python-2)
302 ,@(package-inputs fontforge)))))))
303 (home-page "http://www.gnu.org/software/freefont/")
304 (synopsis "Unicode-encoded outline fonts")
306 "The GNU Freefont project aims to provide a set of free outline
307 (PostScript Type0, TrueType, OpenType...) fonts covering the ISO
308 10646/Unicode UCS (Universal Character Set).")
309 (license license:gpl3+)
310 (properties '((upstream-name . "freefont")
311 (ftp-directory . "/gnu/freefont")))))
313 (define-public font-liberation
315 (name "font-liberation")
319 (uri (string-append "https://fedorahosted.org/releases/l/i/"
320 "liberation-fonts/liberation-fonts-ttf-"
324 "010m4zfqan4w04b6bs9pm3gapn9hsb18bmwwgp2p6y6idj52g43q"))))
325 (build-system trivial-build-system)
327 `(#:modules ((guix build utils))
330 (use-modules (guix build utils))
332 (let ((tar (string-append (assoc-ref %build-inputs "tar")
334 (PATH (string-append (assoc-ref %build-inputs "gzip")
336 (font-dir (string-append %output "/share/fonts/truetype"))
337 (doc-dir (string-append %output "/share/doc/" ,name)))
339 (system* tar "xvf" (assoc-ref %build-inputs "source"))
342 (chdir (string-append "liberation-fonts-ttf-" ,version))
343 (for-each (lambda (ttf)
344 (install-file ttf font-dir))
345 (find-files "." "\\.ttf$"))
346 (for-each (lambda (doc)
347 (install-file doc doc-dir))
348 '("AUTHORS" "ChangeLog" "LICENSE" "README" "TODO"))))))
353 (home-page "https://fedorahosted.org/liberation-fonts/")
355 "Fonts compatible with Arial, Times New Roman, and Courier New")
357 "The Liberation font family aims at metric compatibility with
358 Arial, Times New Roman, and Courier New.
359 There are three sets:
362 @item Sans (a substitute for Arial, Albany, Helvetica, Nimbus Sans L, and
363 Bitstream Vera Sans);
364 @item Serif (a substitute for Times New Roman, Thorndale, Nimbus Roman, and
365 Bitstream Vera Serif);
366 @item Mono (a substitute for Courier New, Cumberland, Courier, Nimbus Mono L,
367 and Bitstream Vera Sans Mono).
370 The Liberation Fonts are sponsored by Red Hat.")
371 (license license:silofl1.1)))
373 (define-public font-terminus
375 (name "font-terminus")
381 "mirror://sourceforge/terminus-font/terminus-font-"
388 "0487cyx5h1f0crbny5sg73a22gmym5vk1i7646gy7hgiscj2rxb4"))))
389 (build-system gnu-build-system)
391 `(("pkg-config" ,pkg-config)
393 ("bdftopcf" ,bdftopcf)
394 ("font-util" ,font-util)
395 ("mkfontdir" ,mkfontdir)))
397 `(#:configure-flags (list
398 ;; install fonts into subdirectory of package output
399 ;; instead of font-util-?.?.?/share/fonts/X11
400 (string-append "--with-fontrootdir="
401 %output "/share/fonts/X11"))
402 #:tests? #f)) ;; No test target in tarball
403 (home-page "http://terminus-font.sourceforge.net/")
404 (synopsis "Simple bitmap programming font")
405 (description "Terminus Font is a clean, fixed-width bitmap font, designed
406 for long periods of working with computers (8 or more hours per day).")
407 (license license:silofl1.1)))
409 (define-public font-adobe-source-han-sans
411 (name "font-adobe-source-han-sans")
416 "https://github.com/adobe-fonts/source-han-sans/archive/"
418 (file-name (string-append "source-han-sans-" version "R.tar.gz"))
421 "1ssx0fw90sy6mj8fv8fv4dgzszpqwbmwpjnlx16g4pvaqzdmybbz"))))
422 (outputs '("out" ; OpenType/CFF Collection (OTC), 121 MiB.
423 "cn" "jp" "kr" "tw")) ; Region-specific Subset OpenType/CFF.
424 (build-system trivial-build-system)
426 `(#:modules ((guix build utils))
429 (use-modules (guix build utils))
430 (let ((tar (string-append (assoc-ref %build-inputs
433 (PATH (string-append (assoc-ref %build-inputs
436 (install-opentype-fonts
437 (lambda (fonts-dir out)
438 (copy-recursively fonts-dir
439 (string-append (assoc-ref %outputs out)
440 "/share/fonts/opentype")))))
442 (system* tar "xvf" (assoc-ref %build-inputs "source"))
443 (chdir (string-append "source-han-sans-" ,version "R"))
444 (install-opentype-fonts "OTC" "out")
445 (install-opentype-fonts "SubsetOTF/CN" "cn")
446 (install-opentype-fonts "SubsetOTF/JP" "jp")
447 (install-opentype-fonts "SubsetOTF/KR" "kr")
448 (install-opentype-fonts "SubsetOTF/TW" "tw")
449 (for-each delete-file (find-files %output "\\.zip$"))))))
453 (home-page "https://github.com/adobe-fonts/source-han-sans")
454 (synopsis "Pan-CJK fonts")
456 "Source Han Sans is a sans serif Pan-CJK font family that is offered in
457 seven weights: ExtraLight, Light, Normal, Regular, Medium, Bold, and Heavy.
458 And in several OpenType/CFF-based deployment configurations to accommodate
459 various system requirements or limitations. As the name suggests, Pan-CJK
460 fonts are intended to support the characters necessary to render or display
461 text in Simplified Chinese, Traditional Chinese, Japanese, and Korean.")
462 (license license:silofl1.1)))
464 (define-public font-wqy-zenhei
466 (name "font-wqy-zenhei")
471 "mirror://sourceforge/wqy/wqy-zenhei/" version
472 "%20%28Fighting-state%20RC1%29/wqy-zenhei-"
474 (file-name (string-append "wqy-zenhei-" version ".tar.gz"))
477 "1mkmxq8g2hjcglb3zajfqj20r4r88l78ymsp2xyl5yav8w3f7dz4"))))
478 (build-system trivial-build-system)
480 `(#:modules ((guix build utils))
483 (use-modules (guix build utils))
484 (let ((PATH (string-append (assoc-ref %build-inputs "tar") "/bin:"
485 (assoc-ref %build-inputs "gzip") "/bin"))
486 (font-dir (string-append (assoc-ref %outputs "out")
487 "/share/fonts/wenquanyi/")))
490 (system* "tar" "xvf" (assoc-ref %build-inputs "source"))
492 (install-file "wqy-zenhei.ttc" font-dir)))))
496 (home-page "http://wenq.org/wqy2/")
497 (synopsis "CJK font")
499 "WenQuanYi Zen Hei is a Hei-Ti style (sans-serif type) Chinese outline
500 font. It is designed for general purpose text formatting and on-screen
501 display of Chinese characters and symbols from many other languages.
502 WenQuanYi Zen Hei provides a rather complete coverage of Chinese Hanzi glyphs,
503 including both simplified and traditional forms. The total glyph number in
504 this font is over 35,000, including over 21,000 Chinese Hanzi. This font has
505 full coverage of the GBK (CP936) charset, CJK Unified Ideographs, as well as
506 the code-points needed for zh_cn, zh_sg, zh_tw, zh_hk, zh_mo, ja (Japanese) and
507 ko (Korean) locales for @code{fontconfig}.")
508 ;; GPLv2 with font embedding exception
509 (license license:gpl2)))
511 (define-public font-wqy-microhei
513 (name "font-wqy-microhei")
514 (version "0.2.0-beta")
517 (uri (string-append "mirror://sourceforge/wqy/wqy-microhei/"
518 version "/wqy-microhei-" version ".tar.gz"))
521 "0gi1yxqph8xx869ichpzzxvx6y50wda5hi77lrpacdma4f0aq0i8"))))
522 (build-system trivial-build-system)
524 `(#:modules ((guix build utils))
527 (use-modules (guix build utils))
528 (let ((PATH (string-append (assoc-ref %build-inputs "tar") "/bin:"
529 (assoc-ref %build-inputs "gzip") "/bin"))
530 (font-dir (string-append (assoc-ref %outputs "out")
531 "/share/fonts/wenquanyi")))
534 (system* "tar" "xvf" (assoc-ref %build-inputs "source"))
535 (install-file "wqy-microhei/wqy-microhei.ttc" font-dir)))))
539 (home-page "http://wenq.org/wqy2/")
540 (synopsis "CJK font")
542 "WenQuanYi Micro Hei is a Sans-Serif style (also known as Hei, Gothic or
543 Dotum among the Chinese/Japanese/Korean users) high quality CJK outline font.
544 It was derived from \"Droid Sans Fallback\" and \"Droid Sans\" released by
545 Google Inc. This font contains all the unified CJK Han glyphs in the range of
546 U+4E00-U+9FC3 defined in Unicode Standard 5.1, together with many other
547 languages unicode blocks, including Latins, Extended Latins, Hanguls and
548 Kanas. The font file is extremely compact (~4M) compared with most known CJK
550 ;; This font is licensed under Apache2.0 or GPLv3 with font embedding
552 (license license:gpl3)))
554 (define-public font-tex-gyre
556 (name "font-tex-gyre")
561 (uri (string-append "http://www.gust.org.pl/projects/e-foundry/"
562 "tex-gyre/whole/tg-" version "otf.zip"))
565 "0kph9l3g7jb2bpmxdbdg5zl56wacmnvdvsdn7is1gc750sqvsn31"))))
566 (build-system trivial-build-system)
568 `(#:modules ((guix build utils))
571 (use-modules (guix build utils))
573 (let ((unzip (string-append (assoc-ref %build-inputs "unzip")
575 (font-dir (string-append %output "/share/fonts/opentype")))
578 (assoc-ref %build-inputs "source")
582 (home-page "http://www.gust.org.pl/projects/e-foundry/tex-gyre/")
583 (synopsis "Remake of Ghostscript fonts")
584 (description "The TeX Gyre collection of fonts is the result of an
585 extensive remake and extension of the freely available base PostScript fonts
586 distributed with Ghostscript version 4.00. The collection contains the
587 following fonts in the OpenType format: Adventor, Bonum, Chorus, Cursor,
588 Heros, Pagella, Schola, Termes.")
589 (license license:gfl1.0)))
591 (define-public font-anonymous-pro
593 (name "font-anonymous-pro")
598 "http://www.marksimonson.com/assets/content/fonts/"
599 "AnonymousPro-" version ".zip"))
602 "1asj6lykvxh46czbal7ymy2k861zlcdqpz8x3s5bbpqwlm3mhrl6"))))
603 (build-system trivial-build-system)
605 `(#:modules ((guix build utils))
608 (use-modules (guix build utils))
609 (let ((unzip (string-append (assoc-ref %build-inputs "unzip")
611 (font-dir (string-append %output "/share/fonts/truetype"))
612 (doc-dir (string-append %output "/share/doc/" ,name)))
613 (system* unzip (assoc-ref %build-inputs "source"))
616 (chdir (string-append "AnonymousPro-" ,version ".001"))
617 (for-each (lambda (ttf)
618 (install-file ttf font-dir))
619 (find-files "." "\\.ttf$"))
620 (for-each (lambda (doc)
621 (install-file doc doc-dir))
622 (find-files "." "\\.txt$"))))))
625 (home-page "http://www.marksimonson.com/fonts/view/anonymous-pro")
626 (synopsis "Fixed-width fonts designed with coding in mind")
627 (description "Anonymous Pro is a family of four fixed-width fonts designed
628 with coding in mind. Anonymous Pro features an international, Unicode-based
629 character set, with support for most Western and Central European Latin-based
630 languages, plus Greek and Cyrillic.")
631 (license license:silofl1.1)))
633 (define-public font-gnu-unifont
635 (name "font-gnu-unifont")
640 "mirror://gnu/unifont/unifont-" version "/unifont-"
644 "0ybyraxi8pngibazfq4zlsqmg8kn5xlhvaiwnxb11znhfi61vi87"))))
645 (build-system gnu-build-system)
646 (outputs '("out" ; TrueType version
647 "pcf" ; PCF (bitmap) version
648 "psf" ; PSF (console) version
649 "bin" ; Utilities to manipulate '.hex' format
652 '(#:parallel-build? #f ; parallel build fails
653 #:tests? #f ; no check target
655 (modify-phases %standard-phases
658 (lambda _ (setenv "CC" "gcc") #t))
661 (lambda* (#:key outputs #:allow-other-keys)
662 (let* ((ttf (string-append (assoc-ref outputs "out")
663 "/share/fonts/truetype"))
664 (pcf (string-append (assoc-ref outputs "pcf")
665 "/share/fonts/misc"))
666 (psf (string-append (assoc-ref outputs "psf")
667 "/share/consolefonts"))
668 (bin (assoc-ref outputs "bin")))
670 (string-append "PREFIX=" bin)
671 (string-append "TTFDEST=" ttf)
672 (string-append "PCFDEST=" pcf)
673 (string-append "CONSOLEDEST=" psf)
675 ;; Move Texinfo file to the right place.
676 (mkdir (string-append bin "/share/info"))
677 (rename-file (string-append bin "/share/unifont/unifont.info.gz")
678 (string-append bin "/share/info/unifont.info.gz"))
681 `(("perl" ,perl))) ; for utilities
683 "Large bitmap font covering Unicode's Basic Multilingual Plane")
685 "GNU Unifont is a bitmap font covering essentially all of
686 Unicode's Basic Multilingual Plane. The package also includes
687 utilities to ease adding new glyphs to the font.")
688 (home-page "http://unifoundry.com/unifont.html")
689 (license license:gpl2+)))
691 (define-public font-google-noto
693 (name "font-google-noto")
697 (uri (string-append "https://noto-website-2.storage.googleapis.com/"
698 "pkgs/Noto-hinted.zip"))
701 "13jhpqzhsqhyby8n0ksqg155a3jyaif3nzj9anzbq8s2gn1xjyd9"))))
702 (build-system trivial-build-system)
704 `(#:modules ((guix build utils))
706 (use-modules (guix build utils)
709 (let ((PATH (string-append (assoc-ref %build-inputs
712 (font-dir (string-append %output
713 "/share/fonts/truetype")))
715 (system* "unzip" (assoc-ref %build-inputs "source"))
718 (for-each (lambda (ttf)
719 (install-file ttf font-dir))
720 (find-files "." "\\.ttf$"))
721 (for-each (lambda (otf)
722 (install-file otf font-dir))
723 (find-files "." "\\.otf$"))))))
724 (native-inputs `(("unzip" ,unzip)))
725 (home-page "https://www.google.com/get/noto/")
726 (synopsis "Fonts to cover all languages")
727 (description "Google Noto Fonts is a family of fonts designed to support
728 all languages with a consistent look and aesthetic. Its goal is to properly
729 display all Unicode symbols.")
730 (license license:silofl1.1)))
732 (define-public font-google-roboto
734 (name "font-google-roboto")
739 (uri (string-append "https://github.com/google/roboto/releases/download/"
740 "v" version "/roboto-hinted.zip"))
741 (file-name (string-append name "-" version ".zip"))
744 "0spscx08fad7i8qs7icns96iwcapniq8lwwqqvbf7bamvs8qfln4"))))
745 (native-inputs `(("unzip" ,unzip)))
746 (build-system trivial-build-system)
748 `(#:modules ((guix build utils))
750 (use-modules (guix build utils)
753 (let ((PATH (string-append (assoc-ref %build-inputs
756 (font-dir (string-append %output
757 "/share/fonts/truetype")))
759 (system* "unzip" (assoc-ref %build-inputs "source"))
762 (chdir "roboto-hinted")
763 (for-each (lambda (ttf)
764 (install-file ttf font-dir))
765 (find-files "." "\\.ttf$"))))))
766 (home-page "https://github.com/google/roboto")
767 (synopsis "The Roboto family of fonts")
769 "Roboto is Google’s signature family of fonts, the default font on Android
770 and Chrome OS, and the recommended font for the
771 visual language \"Material Design\".")
772 (license license:asl2.0)))
774 (define-public font-un
777 (version "1.0.2-080608")
781 "https://kldp.net/unfonts/release/2607-"
782 "un-fonts-core-" version ".tar.gz"))
783 (file-name (string-append name "-" version ".tar.gz"))
786 "13liaz2pmww3aqabm55la5npd08m1skh334ky7qfidxaz5s742iv"))))
787 (build-system trivial-build-system)
789 `(#:modules ((guix build utils))
792 (use-modules (guix build utils))
794 (let ((tar (string-append (assoc-ref %build-inputs "tar")
796 (PATH (string-append (assoc-ref %build-inputs "gzip")
798 (font-dir (string-append %output "/share/fonts/truetype"))
799 (doc-dir (string-append %output "/share/doc/" ,name)))
801 (system* tar "xvf" (assoc-ref %build-inputs "source"))
804 (chdir (string-append "un-fonts"))
805 (for-each (lambda (ttf)
806 (install-file ttf font-dir))
807 (find-files "." "\\.ttf$"))
808 (for-each (lambda (doc)
809 (install-file doc doc-dir))
810 '("COPYING" "README"))))))
814 (home-page "https://kldp.net/projects/unfonts/")
815 (synopsis "Collection of Korean fonts")
817 "Un-fonts is a family of mainly Korean fonts.
818 It contains the following fonts and styles:
821 @item UnBatang, UnBatangBold: serif;
822 @item UnDotum, UnDotumBold: sans-serif;
823 @item UnGraphic, UnGraphicBold: sans-serif style;
824 @item UnDinaru, UnDinaruBold, UnDinaruLight;
825 @item UnPilgi, UnPilgiBold: script;
826 @item UnGungseo: cursive, brush-stroke.
828 (license license:gpl2+)))
830 (define-public font-fantasque-sans
832 (name "font-fantasque-sans")
837 (uri (string-append "https://github.com/belluzj/fantasque-sans/"
838 "archive/v" version ".tar.gz"))
839 (file-name (string-append name "-" version ".tar.gz"))
842 "07fpy53k2x2nz5q61swkab6cfk9gw2kc4x4brsj6zjgbm16fap85"))))
843 (build-system gnu-build-system)
845 `(("ttfautohint" ,ttfautohint)
846 ("woff-tools" ,woff-tools)
847 ("fontforge" ,fontforge)
849 ("ttf2eot" ,ttf2eot)))
851 `(#:tests? #f ;test target intended for visual inspection
852 #:phases (modify-phases %standard-phases
853 (delete 'configure) ;no configuration
855 ;; 'make install' wants to install to ~/.fonts, install to
857 (lambda* (#:key outputs #:allow-other-keys)
858 (let* ((out (assoc-ref outputs "out"))
859 (font-dir (string-append out "/share/fonts"))
860 (truetype-dir (string-append font-dir "/truetype"))
861 (opentype-dir (string-append font-dir "/opentype"))
862 (webfonts-dir (string-append font-dir "/webfonts")))
863 (copy-recursively "OTF" opentype-dir)
864 (for-each (lambda (f) (install-file f truetype-dir))
865 (find-files "." "\\.ttf$"))
866 (copy-recursively "Webfonts" webfonts-dir)
868 (synopsis "Font family with a monospaced variant for programmers")
870 "Fantasque Sans Mono is a programming font designed with functionality in
871 mind. The font includes a bold version and a good italic version with new
872 glyph designs, not just an added slant.")
873 (home-page "https://fontlibrary.org/en/font/fantasque-sans-mono")
874 (license license:silofl1.1)))
876 (define-public font-hack
883 "https://github.com/chrissimpkins/Hack/releases/download/v"
885 (string-replace-substring version "." "_")
889 "16kkmc3psckw1b7k07ccn1gi5ymhlg9djh43nqjzg065g6p6d184"))))
890 (build-system trivial-build-system)
892 `(#:modules ((guix build utils))
894 (use-modules (guix build utils)
897 (let ((PATH (string-append (assoc-ref %build-inputs
900 (font-dir (string-append %output
901 "/share/fonts/truetype")))
903 (system* "unzip" (assoc-ref %build-inputs "source"))
906 (for-each (lambda (ttf)
907 (install-file ttf font-dir))
908 (find-files "." "\\.ttf$"))))))
912 (home-page "https://sourcefoundry.org/hack/")
913 (synopsis "Typeface designed for source code")
915 "Hack is designed to be a workhorse typeface for code. It expands upon
916 the Bitstream Vera & DejaVu projects, provides 1561 glyphs, and includes
918 (license (license:x11-style
919 "https://github.com/chrissimpkins/Hack/blob/master/LICENSE.md"
920 "Hack Open Font License v2.0"))))
922 (define-public font-adobe-source-code-pro
924 (name "font-adobe-source-code-pro")
925 (version "2.030R-ro-1.050R-it")
929 "https://github.com/adobe-fonts/source-code-pro/archive/"
930 (regexp-substitute/global
931 ;; The upstream tag uses "/" between the roman and italic
932 ;; versions, so substitute our "-" separator here.
933 #f "R-ro-" version 'pre "R-ro/" 'post) ".tar.gz"))
934 (file-name (string-append name "-" version ".tar.gz"))
937 "0arhhsf3i7ss39ykn73d1j8k4n8vx7115xph6jwkd970p1cxvr54"))))
938 (build-system trivial-build-system)
940 `(#:modules ((guix build utils))
943 (use-modules (guix build utils))
944 (let ((tar (string-append (assoc-ref %build-inputs "tar")
946 (PATH (string-append (assoc-ref %build-inputs "gzip")
948 (font-dir (string-append %output "/share/fonts/opentype")))
951 (zero? (system* tar "-C" font-dir "--strip-components=2"
952 "-xvf" (assoc-ref %build-inputs "source")
953 (string-append "source-code-pro-"
954 ,version "/OTF")))))))
958 (home-page "https://github.com/adobe-fonts/source-code-pro")
960 "Monospaced font family for user interface and coding environments")
962 "Source Code Pro is a set of monospaced OpenType fonts that have been
963 designed to work well in user interface environments.")
964 (license license:silofl1.1)))
966 (define-public font-fira-mono
968 (name "font-fira-mono")
972 (uri (string-append "https://carrois.com/downloads/fira_mono_3_2/"
974 (string-replace-substring version "." "")
978 "1z65x0dw5dq6rs6p9wyfrir50rlh95vgzsxr8jcd40nqazw4jhpi"))))
979 (build-system trivial-build-system)
981 `(#:modules ((guix build utils))
984 (use-modules (guix build utils))
985 (let ((unzip (string-append (assoc-ref %build-inputs "unzip")
987 (font-dir (string-append %output "/share/fonts/opentype")))
991 (assoc-ref %build-inputs "source")
996 (home-page "http://mozilla.github.io/Fira/")
997 (synopsis "Mozilla's monospace font")
998 (description "This is the typeface used by Mozilla in Firefox OS.")
999 (license license:silofl1.1)))
1001 (define-public font-awesome
1003 (name "font-awesome")
1007 (uri (string-append "http://fontawesome.io/assets/"
1008 name "-" version ".zip"))
1011 "1frhmw41lnnm9rda2zs202pvfi5vzlrsw4xfp4mswl0qgws61mcd"))))
1012 (build-system trivial-build-system)
1014 `(("unzip" ,unzip)))
1016 `(#:modules ((guix build utils))
1018 (use-modules (guix build utils))
1019 (let* ((font-dir (string-append %output
1020 "/share/fonts/opentype"))
1021 (source (assoc-ref %build-inputs "source"))
1022 (src-otf-file (string-append "font-awesome-"
1024 "/fonts/FontAwesome.otf"))
1025 (dest-otf-file (string-append font-dir "/FontAwesome.otf"))
1026 (unzip (assoc-ref %build-inputs "unzip")))
1027 (setenv "PATH" (string-append unzip "/bin"))
1029 (system* "unzip" source "-d" ".")
1030 (copy-file src-otf-file dest-otf-file)))))
1031 (home-page "http://fontawesome.io")
1032 (synopsis "Font that contains a rich iconset")
1034 "Font Awesome is a full suite of pictographic icons for easy scalable
1036 (license license:silofl1.1)))
1038 (define-public font-comic-neue
1040 (name "font-comic-neue")
1045 "http://www.comicneue.com/comic-neue-" version ".zip"))
1048 "1695hkpd8kqnr2a88p8xs496slgzxjjkzpa9aa33ml3pnh7519zk"))))
1049 (build-system trivial-build-system)
1051 `(#:modules ((guix build utils))
1053 (use-modules (guix build utils))
1054 (let ((font-dir (string-append %output
1055 "/share/fonts/truetype"))
1056 (source (assoc-ref %build-inputs "source"))
1057 (unzip (string-append (assoc-ref %build-inputs "unzip")
1060 (system* unzip source)
1061 (with-directory-excursion
1062 (string-append "Web")
1063 (for-each (lambda (ttf)
1064 (install-file ttf font-dir))
1065 (find-files "." "\\.ttf$")))))))
1066 (native-inputs `(("unzip" ,unzip)))
1067 (home-page "http://www.comicneue.com/")
1068 (synopsis "Font that fixes the shortcomings of Comic Sans")
1070 "Comic Neue is a font that attempts to create a respectable casual
1071 typeface, by mimicking Comic Sans while fixing its most obvious shortcomings.")
1072 (license license:silofl1.1)))
1074 (define-public font-iosevka
1076 (name "font-iosevka")
1081 "https://github.com/be5invis/Iosevka/releases/download/v"
1082 version "/iosevka-pack-" version ".zip"))
1085 "0d8prdk7s5z94sdfd0y92cvqq531yqrlg7hnadbnhd7fs9jqr5hj"))))
1086 (build-system trivial-build-system)
1088 `(#:modules ((guix build utils))
1090 (use-modules (guix build utils))
1091 (let ((font-dir (string-append %output
1092 "/share/fonts/truetype"))
1093 (source (assoc-ref %build-inputs "source"))
1094 (unzip (string-append (assoc-ref %build-inputs "unzip")
1097 (system* unzip "-d" font-dir source)))))
1098 (native-inputs `(("unzip" ,unzip)))
1099 (home-page "https://be5invis.github.io/Iosevka/")
1100 (synopsis "Coders' typeface, built from code")
1102 "Iosevka is a slender monospace sans-serif or slab-serif typeface inspired
1103 by Pragmata Pro, M+, and PF DIN Mono, designed to be the ideal font for
1104 programming. Iosevka is completely generated from its source code.")
1105 (license (list license:silofl1.1 ; build artifacts (i.e. the fonts)
1106 license:bsd-3)))) ; supporting code
1108 (define-public font-go
1109 (let ((commit "b7f8df6bc082334698d4505fb85fa05e99156b72")
1113 (version (string-append "20161115-" revision "." (string-take commit 7)))
1115 (file-name (string-append "go-image-" version "-checkout"))
1118 (url "https://go.googlesource.com/image")
1122 "1ywxs6dmcyzwwsmnan3qqza7znprnbvmdi260x6sjmydz6dyq2zs"))))
1123 (build-system trivial-build-system)
1125 `(#:modules ((guix build utils))
1127 (use-modules (guix build utils))
1128 (let ((font-dir (string-append %output
1129 "/share/fonts/truetype"))
1130 (source (assoc-ref %build-inputs "source")))
1132 (with-directory-excursion
1133 (string-append source "/font/gofont/ttfs")
1134 (for-each (lambda (ttf)
1135 (install-file ttf font-dir))
1136 (find-files "." "\\.ttf$")))))))
1137 (home-page "https://blog.golang.org/go-fonts")
1138 (synopsis "The Go font family")
1140 "The Go font family is a set of WGL4 TrueType fonts from the Bigelow &
1141 Holmes type foundry, released under the same license as the Go programming
1142 language. It includes a set of proportional, sans-serif fonts, and a set of
1143 monospace, slab-serif fonts.")
1144 (license (package-license go-1.4)))))
1146 (define-public font-google-material-design-icons
1148 (name "font-google-material-design-icons")
1153 "https://github.com/google/material-design-icons/archive/"
1157 "183n0qv3q8w6n27libarq1fhc4mqv2d3sasbfmbn7x9r5pw9c6ga"))
1158 (file-name (string-append name "-" version ".tar.gz"))))
1159 (build-system trivial-build-system)
1164 `(#:modules ((guix build utils))
1166 (use-modules (guix build utils))
1167 (let* ((font-dir (string-append %output
1168 "/share/fonts/truetype"))
1169 (source (assoc-ref %build-inputs "source"))
1170 (font-filename "MaterialIcons-Regular.ttf")
1171 (src-ttf-file (string-append "material-design-icons-"
1175 (dest-ttf-file (string-append font-dir font-filename))
1176 (gzip (assoc-ref %build-inputs "gzip"))
1177 (tar (assoc-ref %build-inputs "tar")))
1178 (setenv "PATH" (string-append gzip "/bin:"
1180 (system* "tar" "xf" source)
1182 (copy-file src-ttf-file dest-ttf-file)))))
1183 (home-page "http://google.github.io/material-design-icons")
1184 (synopsis "Icon font of Google Material Design icons")
1186 "Material design system icons are simple, modern, friendly, and sometimes
1187 quirky. Each icon is created using our design guidelines to depict in simple
1188 and minimal forms the universal concepts used commonly throughout a UI.
1189 Ensuring readability and clarity at both large and small sizes, these icons
1190 have been optimized for beautiful display on all common platforms and display
1192 (license license:asl2.0)))