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>
23 ;;; This file is part of GNU Guix.
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.
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.
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/>.
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))
58 (define-public font-inconsolata
60 (name "font-inconsolata")
64 (uri "http://www.levien.com/type/myfonts/Inconsolata.otf")
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)))
75 (define-public font-ubuntu
82 "http://font.ubuntu.com/download/ubuntu-font-family-"
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.")
95 "http://font.ubuntu.com/ufl/ubuntu-font-licence-1.0.txt"
96 "Ubuntu Font License v1.0"))))
98 (define-public font-dejavu
104 (uri (string-append "mirror://sourceforge/dejavu/dejavu/"
105 version "/dejavu-fonts-ttf-"
109 "1mqpds24wfs5cmfhj57fsfs07mji2z8812i5c4pi5pbi738s977s"))))
110 (build-system trivial-build-system)
111 (build-system font-build-system)
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.")
129 "http://dejavu-fonts.org/"))))
131 (define-public font-bitstream-vera
133 (name "font-bitstream-vera")
137 (uri (string-append "mirror://gnome/sources/ttf-bitstream-vera/"
138 version "/ttf-bitstream-vera-"
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.")
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
155 (define-public font-cantarell
157 (name "font-abattis-cantarell")
161 (uri (string-append "mirror://gnome/sources/cantarell-fonts/"
162 (version-major+minor version)
163 "/cantarell-fonts-" version ".tar.xz"))
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)))
174 (define-public font-gnu-freefont-ttf
176 (name "font-gnu-freefont-ttf")
180 (uri (string-append "mirror://gnu/freefont/freefont-src-"
184 "0yk58blhcd4hm7nyincmqq4jrzjjk82wif2zmk1l3y2m4vif4qhd"))))
185 (build-system gnu-build-system)
187 `(#:phases (modify-phases %standard-phases
191 (let ((doc-dir (string-append %output "/share/doc/"
193 (font-dir (string-append %output
194 "/share/fonts/truetype")))
196 (substitute* "Makefile"
197 (("\\$\\(TMPDIR\\)") doc-dir)
198 (("sfd/\\*.ttf") ""))
199 (system* "make" "ttftar")
201 (for-each (lambda (file)
202 (install-file file font-dir))
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")
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")))))
223 (define-public font-liberation
225 (name "font-liberation")
229 (uri (string-append "https://releases.pagure.org/"
230 "liberation-fonts/liberation-fonts-ttf-"
234 "010m4zfqan4w04b6bs9pm3gapn9hsb18bmwwgp2p6y6idj52g43q"))))
235 (build-system trivial-build-system)
237 `(#:modules ((guix build utils))
240 (use-modules (guix build utils))
242 (let ((tar (string-append (assoc-ref %build-inputs "tar")
244 (PATH (string-append (assoc-ref %build-inputs "gzip")
246 (font-dir (string-append %output "/share/fonts/truetype"))
247 (doc-dir (string-append %output "/share/doc/" ,name)))
249 (system* tar "xvf" (assoc-ref %build-inputs "source"))
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"))))))
263 (home-page "https://pagure.io/liberation-fonts/")
265 "Fonts compatible with Arial, Times New Roman, and Courier New")
267 "The Liberation font family aims at metric compatibility with
268 Arial, Times New Roman, and Courier New.
269 There are three sets:
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).
280 The Liberation Fonts are sponsored by Red Hat.")
281 (license license:silofl1.1)))
283 (define-public font-linuxlibertine
285 (name "font-linuxlibertine")
288 (method url-fetch/tarbomb)
289 (uri (string-append "mirror://sourceforge/linuxlibertine/"
290 "linuxlibertine/" version
291 "/LinLibertineSRC_" version "_2012_07_02.tgz"))
294 "0x7cz6hvhpil1rh03rax9zsfzm54bh7r4bbrq8rz673gl9h47v0v"))))
295 (build-system gnu-build-system)
297 `(#:tests? #f ; there are no tests
298 #:modules ((guix build utils)
299 (guix build gnu-build-system)
303 (modify-phases %standard-phases
310 "fontforge" "-lang=ff"
311 "-c" (string-append "Open('" name "');"
313 (basename name "sfd") ext
315 (every (lambda (name)
316 (and (compile name "ttf")
317 (compile name "otf")))
318 (find-files "." "\\.sfd$")))))
320 (lambda* (#:key outputs #:allow-other-keys)
321 (let ((font-dir (string-append (assoc-ref outputs "out")
322 "/share/fonts/truetype")))
324 (for-each (cut install-file <> font-dir)
325 (find-files "." "\\.(otf|ttf)$"))
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))))
340 (define-public font-terminus
342 (name "font-terminus")
348 "mirror://sourceforge/terminus-font/terminus-font-"
355 "0487cyx5h1f0crbny5sg73a22gmym5vk1i7646gy7hgiscj2rxb4"))))
356 (build-system gnu-build-system)
358 `(("pkg-config" ,pkg-config)
360 ("bdftopcf" ,bdftopcf)
361 ("font-util" ,font-util)
362 ("mkfontdir" ,mkfontdir)))
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)))
376 (define-public font-adobe-source-han-sans
378 (name "font-adobe-source-han-sans")
383 "https://github.com/adobe-fonts/source-han-sans/archive/"
385 (file-name (string-append "source-han-sans-" version "R.tar.gz"))
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)
393 `(#:modules ((guix build utils))
396 (use-modules (guix build utils))
397 (let ((tar (string-append (assoc-ref %build-inputs
400 (PATH (string-append (assoc-ref %build-inputs
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")))))
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$"))))))
420 (home-page "https://github.com/adobe-fonts/source-han-sans")
421 (synopsis "Pan-CJK fonts")
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)))
431 (define-public font-cns11643
433 (name "font-cns11643")
434 (version "98.1.20170405")
437 (uri "http://www.cns11643.gov.tw/AIDB/Open_Data.zip")
440 "02kb3bwjrra0k2hlr2p8xswd2y0xs6j8d9vm6yrby734h02a40qf"))))
441 (outputs '("out" "tw-kai" "tw-sung"))
442 (build-system trivial-build-system)
446 `(#:modules ((guix build utils))
449 (use-modules (guix build utils))
450 (let* ((font-dir "/share/fonts/truetype/cns11643")
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)
470 (home-page "http://www.cns11643.gov.tw/AIDB/welcome.do")
471 (synopsis "CJK TrueType fonts, TW-Kai and TW-Sung")
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:
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.
488 (license (license:non-copyleft
489 "http://data.gov.tw/license")))) ; CC-BY 4.0 compatible
491 (define-public font-cns11643-swjz
493 (name "font-cns11643-swjz")
498 (uri "https://www.moedict.tw/fonts/truetype/cns11643/ebas927.ttf")
501 "1qkljldbmb53zp1rcmpsb8rzy67rnsqcjxi549m9743ifk4isl78"))))
502 (build-system trivial-build-system)
504 `(#:modules ((guix build utils))
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")))
513 (string-append font-dir "/" "ebas927.ttf"))
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")
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
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"))))
529 (define-public font-wqy-zenhei
531 (name "font-wqy-zenhei")
536 "mirror://sourceforge/wqy/wqy-zenhei/" version
537 "%20%28Fighting-state%20RC1%29/wqy-zenhei-"
539 (file-name (string-append "wqy-zenhei-" version ".tar.gz"))
542 "1mkmxq8g2hjcglb3zajfqj20r4r88l78ymsp2xyl5yav8w3f7dz4"))))
543 (build-system trivial-build-system)
545 `(#:modules ((guix build utils))
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/")))
555 (system* "tar" "xvf" (assoc-ref %build-inputs "source"))
557 (install-file "wqy-zenhei.ttc" font-dir)))))
561 (home-page "http://wenq.org/wqy2/")
562 (synopsis "CJK font")
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)))
576 (define-public font-wqy-microhei
578 (name "font-wqy-microhei")
579 (version "0.2.0-beta")
582 (uri (string-append "mirror://sourceforge/wqy/wqy-microhei/"
583 version "/wqy-microhei-" version ".tar.gz"))
586 "0gi1yxqph8xx869ichpzzxvx6y50wda5hi77lrpacdma4f0aq0i8"))))
587 (build-system trivial-build-system)
589 `(#:modules ((guix build utils))
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")))
599 (system* "tar" "xvf" (assoc-ref %build-inputs "source"))
600 (install-file "wqy-microhei/wqy-microhei.ttc" font-dir)))))
604 (home-page "http://wenq.org/wqy2/")
605 (synopsis "CJK font")
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
615 ;; This font is licensed under Apache2.0 or GPLv3 with font embedding
617 (license license:gpl3)))
619 (define-public font-tex-gyre
621 (name "font-tex-gyre")
626 (uri (string-append "http://www.gust.org.pl/projects/e-foundry/"
627 "tex-gyre/whole/tg-" version "otf.zip"))
630 "0kph9l3g7jb2bpmxdbdg5zl56wacmnvdvsdn7is1gc750sqvsn31"))))
631 (build-system trivial-build-system)
633 `(#:modules ((guix build utils))
636 (use-modules (guix build utils))
638 (let ((unzip (string-append (assoc-ref %build-inputs "unzip")
640 (font-dir (string-append %output "/share/fonts/opentype")))
643 (assoc-ref %build-inputs "source")
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)))
656 (define-public font-anonymous-pro
658 (name "font-anonymous-pro")
663 "http://www.marksimonson.com/assets/content/fonts/"
664 "AnonymousPro-" version ".zip"))
667 "1asj6lykvxh46czbal7ymy2k861zlcdqpz8x3s5bbpqwlm3mhrl6"))))
668 (build-system trivial-build-system)
670 `(#:modules ((guix build utils))
673 (use-modules (guix build utils))
674 (let ((unzip (string-append (assoc-ref %build-inputs "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"))
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$"))))))
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)))
698 (define-public font-gnu-unifont
700 (name "font-gnu-unifont")
705 "mirror://gnu/unifont/unifont-" version "/unifont-"
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
717 '(#:parallel-build? #f ; parallel build fails
718 #:tests? #f ; no check target
720 (modify-phases %standard-phases
723 (lambda _ (setenv "CC" "gcc") #t))
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")))
735 (string-append "PREFIX=" bin)
736 (string-append "TTFDEST=" ttf)
737 (string-append "PCFDEST=" pcf)
738 (string-append "CONSOLEDEST=" psf)
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"))
746 `(("perl" ,perl))) ; for utilities
748 "Large bitmap font covering Unicode's Basic Multilingual Plane")
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+)))
756 (define-public font-google-noto
758 (name "font-google-noto")
762 (uri (string-append "https://noto-website-2.storage.googleapis.com/"
763 "pkgs/Noto-hinted.zip"))
766 "13jhpqzhsqhyby8n0ksqg155a3jyaif3nzj9anzbq8s2gn1xjyd9"))))
767 (build-system trivial-build-system)
769 `(#:modules ((guix build utils))
771 (use-modules (guix build utils)
774 (let ((PATH (string-append (assoc-ref %build-inputs
777 (font-dir (string-append %output
778 "/share/fonts/truetype")))
780 (system* "unzip" (assoc-ref %build-inputs "source"))
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)))
797 (define-public font-google-roboto
799 (name "font-google-roboto")
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"))
809 "0spscx08fad7i8qs7icns96iwcapniq8lwwqqvbf7bamvs8qfln4"))))
810 (native-inputs `(("unzip" ,unzip)))
811 (build-system trivial-build-system)
813 `(#:modules ((guix build utils))
815 (use-modules (guix build utils)
818 (let ((PATH (string-append (assoc-ref %build-inputs
821 (font-dir (string-append %output
822 "/share/fonts/truetype")))
824 (system* "unzip" (assoc-ref %build-inputs "source"))
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")
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)))
839 (define-public font-un
842 (version "1.0.2-080608")
846 "https://kldp.net/unfonts/release/2607-"
847 "un-fonts-core-" version ".tar.gz"))
848 (file-name (string-append name "-" version ".tar.gz"))
851 "13liaz2pmww3aqabm55la5npd08m1skh334ky7qfidxaz5s742iv"))))
852 (build-system trivial-build-system)
854 `(#:modules ((guix build utils))
857 (use-modules (guix build utils))
859 (let ((tar (string-append (assoc-ref %build-inputs "tar")
861 (PATH (string-append (assoc-ref %build-inputs "gzip")
863 (font-dir (string-append %output "/share/fonts/truetype"))
864 (doc-dir (string-append %output "/share/doc/" ,name)))
866 (system* tar "xvf" (assoc-ref %build-inputs "source"))
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"))))))
879 (home-page "https://kldp.net/projects/unfonts/")
880 (synopsis "Collection of Korean fonts")
882 "Un-fonts is a family of mainly Korean fonts.
883 It contains the following fonts and styles:
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.
893 (license license:gpl2+)))
895 (define-public font-fantasque-sans
897 (name "font-fantasque-sans")
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"))
907 "07fpy53k2x2nz5q61swkab6cfk9gw2kc4x4brsj6zjgbm16fap85"))))
908 (build-system gnu-build-system)
910 `(("ttfautohint" ,ttfautohint)
911 ("woff-tools" ,woff-tools)
912 ("fontforge" ,fontforge)
914 ("ttf2eot" ,ttf2eot)))
916 `(#:tests? #f ;test target intended for visual inspection
917 #:phases (modify-phases %standard-phases
918 (delete 'configure) ;no configuration
920 ;; 'make install' wants to install to ~/.fonts, install to
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)
933 (synopsis "Font family with a monospaced variant for programmers")
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)))
941 (define-public font-hack
948 "https://github.com/chrissimpkins/Hack/releases/download/v"
950 (string-replace-substring version "." "_")
954 "16kkmc3psckw1b7k07ccn1gi5ymhlg9djh43nqjzg065g6p6d184"))))
955 (build-system trivial-build-system)
957 `(#:modules ((guix build utils))
959 (use-modules (guix build utils)
962 (let ((PATH (string-append (assoc-ref %build-inputs
965 (font-dir (string-append %output
966 "/share/fonts/truetype")))
968 (system* "unzip" (assoc-ref %build-inputs "source"))
971 (for-each (lambda (ttf)
972 (install-file ttf font-dir))
973 (find-files "." "\\.ttf$"))))))
977 (home-page "https://sourcefoundry.org/hack/")
978 (synopsis "Typeface designed for source code")
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
983 (license (license:x11-style
984 "https://github.com/chrissimpkins/Hack/blob/master/LICENSE.md"
985 "Hack Open Font License v2.0"))))
987 (define-public font-adobe-source-code-pro
989 (name "font-adobe-source-code-pro")
990 (version "2.030R-ro-1.050R-it")
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"))
1002 "0arhhsf3i7ss39ykn73d1j8k4n8vx7115xph6jwkd970p1cxvr54"))))
1003 (build-system trivial-build-system)
1005 `(#:modules ((guix build utils))
1008 (use-modules (guix build utils))
1009 (let ((tar (string-append (assoc-ref %build-inputs "tar")
1011 (PATH (string-append (assoc-ref %build-inputs "gzip")
1013 (font-dir (string-append %output "/share/fonts/opentype")))
1014 (setenv "PATH" PATH)
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")))))))
1023 (home-page "https://github.com/adobe-fonts/source-code-pro")
1025 "Monospaced font family for user interface and coding environments")
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)))
1031 (define-public font-fira-mono
1033 (name "font-fira-mono")
1037 (uri (string-append "https://carrois.com/downloads/fira_mono_3_2/"
1039 (string-replace-substring version "." "")
1043 "1z65x0dw5dq6rs6p9wyfrir50rlh95vgzsxr8jcd40nqazw4jhpi"))))
1044 (build-system trivial-build-system)
1046 `(#:modules ((guix build utils))
1049 (use-modules (guix build utils))
1050 (let ((unzip (string-append (assoc-ref %build-inputs "unzip")
1052 (font-dir (string-append %output "/share/fonts/opentype")))
1056 (assoc-ref %build-inputs "source")
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)))
1066 (define-public font-awesome
1068 (name "font-awesome")
1072 (uri (string-append "http://fontawesome.io/assets/"
1073 name "-" version ".zip"))
1076 "1m1rfwm4sjkv10j3xd2dhwk286a5912b2zgvc692cmxi5gxs68jf"))))
1077 (build-system font-build-system)
1078 (home-page "http://fontawesome.io")
1079 (synopsis "Font that contains a rich iconset")
1081 "Font Awesome is a full suite of pictographic icons for easy scalable
1083 (license license:silofl1.1)))
1085 (define-public font-tamzen
1087 (name "font-tamzen")
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"))
1097 "1ryd7gp6qiwaqw73jqbmh4kwlriyd8xykh4j7z90z8xp9fm7lrys"))))
1098 (build-system trivial-build-system)
1100 `(#:modules ((guix build utils))
1103 (use-modules (guix build utils))
1105 (let ((tar (string-append (assoc-ref %build-inputs "tar")
1107 (PATH (string-append (assoc-ref %build-inputs "gzip")
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-"
1113 (setenv "PATH" PATH)
1114 (system* tar "xvf" (assoc-ref %build-inputs "source"))
1118 (for-each (lambda (pcf)
1119 (install-file pcf font-dir))
1120 (find-files "." "\\.pcf$"))
1122 (for-each (lambda (psf)
1123 (install-file psf psf-dir))
1124 (find-files "." "\\.psf$"))
1129 (home-page "https://github.com/sunaku/tamzen-font")
1130 (synopsis "Monospaced bitmap font for console and X11")
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.
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:
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.
1147 (license (license:non-copyleft "file://LICENSE"))))
1149 (define-public font-comic-neue
1151 (name "font-comic-neue")
1156 "http://www.comicneue.com/comic-neue-" version ".zip"))
1159 "1695hkpd8kqnr2a88p8xs496slgzxjjkzpa9aa33ml3pnh7519zk"))))
1160 (build-system trivial-build-system)
1162 `(#:modules ((guix build utils))
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")
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")
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)))
1185 (define-public font-iosevka
1187 (name "font-iosevka")
1190 (method url-fetch/zipbomb)
1192 "https://github.com/be5invis/Iosevka/releases/download/v"
1193 version "/iosevka-pack-" version ".zip"))
1196 "0s3g6mk0ngwsrw9h9dqinb50cd9i8zhqdcmmh93fhyf4d87yfwyi"))))
1197 (build-system font-build-system)
1198 (home-page "https://be5invis.github.io/Iosevka/")
1199 (synopsis "Coders' typeface, built from code")
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
1207 (define-public font-go
1208 (let ((commit "f03a046406d4d7fbfd4ed29f554da8f6114049fc")
1212 (version (string-append "20170330-" revision "." (string-take commit 7)))
1214 (file-name (string-append "go-image-" version "-checkout"))
1217 (url "https://go.googlesource.com/image")
1221 "1aq6mnjayks55gd9ahavk6jfydlq5lm4xm0xk4pd5sqa74p5p74d"))))
1222 (build-system font-build-system)
1225 (modify-phases %standard-phases
1226 (add-before 'install 'chdir
1228 (chdir "font/gofont/ttfs")
1230 (home-page "https://blog.golang.org/go-fonts")
1231 (synopsis "The Go font family")
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)))))
1239 (define-public font-google-material-design-icons
1241 (name "font-google-material-design-icons")
1246 "https://github.com/google/material-design-icons/archive/"
1250 "183n0qv3q8w6n27libarq1fhc4mqv2d3sasbfmbn7x9r5pw9c6ga"))
1251 (file-name (string-append name "-" version ".tar.gz"))))
1252 (build-system trivial-build-system)
1257 `(#:modules ((guix build utils))
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-"
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:"
1273 (system* "tar" "xf" source)
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")
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
1285 (license license:asl2.0)))