1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2014 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 © 2016 Nils Gillmann <niasterisk@grrlz.net>
10 ;;; Copyright © 2016 Jookia <166291@gmail.com>
12 ;;; This file is part of GNU Guix.
14 ;;; GNU Guix is free software; you can redistribute it and/or modify it
15 ;;; under the terms of the GNU General Public License as published by
16 ;;; the Free Software Foundation; either version 3 of the License, or (at
17 ;;; your option) any later version.
19 ;;; GNU Guix is distributed in the hope that it will be useful, but
20 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
21 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 ;;; GNU General Public License for more details.
24 ;;; You should have received a copy of the GNU General Public License
25 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
27 (define-module (gnu packages fonts)
28 #:use-module (guix utils)
29 #:use-module ((guix licenses) #:prefix license:)
30 #:use-module (guix packages)
31 #:use-module (guix download)
32 #:use-module (guix build-system gnu)
33 #:use-module (guix build-system trivial)
34 #:use-module (gnu packages base)
35 #:use-module (gnu packages compression)
36 #:use-module (gnu packages zip)
37 #:use-module (gnu packages perl)
38 #:use-module (gnu packages xorg)
39 #:use-module (gnu packages pkg-config))
41 (define-public font-inconsolata
43 (name "font-inconsolata")
47 (uri "http://www.levien.com/type/myfonts/Inconsolata.otf")
50 "06js6znbcf7swn8y3b8ki416bz96ay7d3yvddqnvi88lqhbfcq8m"))))
51 (build-system trivial-build-system)
53 `(#:modules ((guix build utils))
55 (use-modules (guix build utils))
56 (let ((font-dir (string-append %output
57 "/share/fonts/opentype"))
58 (source (assoc-ref %build-inputs "source")))
61 (string-append font-dir "/" "inconsolata.otf"))))))
62 (native-inputs `(("source" ,source)))
63 (home-page "http://levien.com/type/myfonts/inconsolata.html")
64 (synopsis "Monospace font")
65 (description "A monospace font, designed for code listings and the like,
66 in print. With attention to detail for high resolution rendering.")
67 (license license:silofl1.1)))
69 (define-public font-ubuntu
76 "http://font.ubuntu.com/download/ubuntu-font-family-"
80 "0hjvq2x758dx0sfwqhzflns0ns035qm7h6ygskbx1svzg517sva5"))))
81 (build-system trivial-build-system)
83 `(#:modules ((guix build utils))
85 (use-modules (guix build utils)
88 (let ((PATH (string-append (assoc-ref %build-inputs
91 (font-dir (string-append %output
92 "/share/fonts/truetype"))
93 (doc-dir (string-append %output "/share/doc/"
96 (system* "unzip" (assoc-ref %build-inputs "source"))
100 (chdir (string-append "ubuntu-font-family-" ,version))
101 (for-each (lambda (ttf)
103 (string-append font-dir "/" ttf)))
104 (find-files "." "\\.ttf$"))
105 (for-each (lambda (doc)
107 (string-append doc-dir "/" doc)))
108 (find-files "." "\\.txt$"))))))
109 (native-inputs `(("source" ,source)
111 (home-page "http://font.ubuntu.com/")
112 (synopsis "The Ubuntu Font Family")
113 (description "The Ubuntu Font Family is a unique, custom designed font
114 that has a very distinctive look and feel. This package provides the
115 TrueType (TTF) files.")
117 (license:non-copyleft
118 "http://font.ubuntu.com/ufl/ubuntu-font-licence-1.0.txt"
119 "Ubuntu Font License v1.0"))))
121 (define-public font-dejavu
127 (uri (string-append "mirror://sourceforge/dejavu/"
128 version "/dejavu-fonts-ttf-"
132 "0pgb0a3ngamidacmrvasg51ck3gp8gn93w6sf1s8snwzx4x2r9yh"))))
133 (build-system trivial-build-system)
135 `(#:modules ((guix build utils))
137 (use-modules (guix build utils))
139 (let ((tar (string-append (assoc-ref %build-inputs
142 (PATH (string-append (assoc-ref %build-inputs
145 (font-dir (string-append
146 %output "/share/fonts/truetype"))
147 (conf-dir (string-append
148 %output "/share/fontconfig/conf.avail"))
149 (doc-dir (string-append
150 %output "/share/doc/" ,name "-" ,version)))
152 (system* tar "xvf" (assoc-ref %build-inputs "source"))
157 (chdir (string-append "dejavu-fonts-ttf-" ,version))
158 (for-each (lambda (ttf)
160 (string-append font-dir "/"
162 (find-files "ttf" "\\.ttf$"))
163 (for-each (lambda (conf)
165 (string-append conf-dir "/"
167 (find-files "fontconfig" "\\.conf$"))
168 (for-each (lambda (doc)
170 (string-append doc-dir "/"
172 (find-files "." "\\.txt$|^[A-Z][A-Z]*$"))))))
173 (native-inputs `(("source" ,source)
176 (home-page "http://dejavu-fonts.org/")
177 (synopsis "Vera font family derivate with additional characters")
178 (description "DejaVu provides an expanded version of the Vera font family
179 aiming for quality and broader Unicode coverage while retaining the original
180 Vera style. DejaVu currently works towards conformance with the Multilingual
181 European Standards (MES-1 and MES-2) for Unicode coverage. The DejaVu fonts
182 provide serif, sans and monospaced variants.")
185 "http://dejavu-fonts.org/"))))
187 (define-public font-bitstream-vera
189 (name "font-bitstream-vera")
193 (uri (string-append "mirror://gnome/sources/ttf-bitstream-vera/"
194 version "/ttf-bitstream-vera-"
198 "1p3qs51x5327gnk71yq8cvmxc6wgx79sqxfvxcv80cdvgggjfnyv"))))
199 (build-system trivial-build-system)
201 `(#:modules ((guix build utils))
203 (use-modules (guix build utils)
206 (let ((tar (string-append (assoc-ref %build-inputs
209 (PATH (string-append (assoc-ref %build-inputs
212 (font-dir (string-append %output
213 "/share/fonts/truetype"))
214 (doc-dir (string-append %output "/share/doc/"
215 ,name "-" ,version)))
217 (system* tar "xvf" (assoc-ref %build-inputs "source"))
221 (chdir (string-append "ttf-bitstream-vera-" ,version))
222 (for-each (lambda (ttf)
224 (string-append font-dir "/" ttf)))
225 (find-files "." "\\.ttf$"))
226 (for-each (lambda (doc)
228 (string-append doc-dir "/" doc)))
229 (find-files "." "\\.TXT$"))))))
230 (native-inputs `(("source" ,source)
233 (home-page "http://www.gnome.org/fonts/")
234 (synopsis "Bitstream Vera sans-serif typeface")
235 (description "Vera is a sans-serif typeface from Bitstream, Inc. This
236 package provides the TrueType (TTF) files.")
239 "http://www.gnome.org/fonts/#Final_Bitstream_Vera_Fonts"))))
241 (define-public font-cantarell
243 (name "font-abattis-cantarell")
247 (uri (string-append "mirror://gnome/sources/cantarell-fonts/"
248 (version-major+minor version)
249 "/cantarell-fonts-" version ".tar.xz"))
252 "0r4jnc2x9yncf40lixjb1pqgpq8rzbi2fz33pshlqzjgx2d69bcw"))))
253 (build-system gnu-build-system)
254 (home-page "https://wiki.gnome.org/Projects/CantarellFonts")
255 (synopsis "Cantarell sans-serif typeface")
256 (description "The Cantarell font family is a contemporary Humanist
257 sans-serif designed for on-screen reading. It is used by GNOME@tie{}3.")
258 (license license:silofl1.1)))
260 (define-public font-gnu-freefont-ttf
262 (name "font-gnu-freefont-ttf")
266 (uri (string-append "mirror://gnu/freefont/freefont-ttf-"
270 "1q3h5jp1mbdkinkwxy0lfd0a1q7azlbagraydlzaa2ng82836wg4"))))
271 (build-system trivial-build-system)
273 `(#:modules ((guix build utils))
275 (use-modules (guix build utils)
278 (let ((tar (string-append (assoc-ref %build-inputs
281 (PATH (string-append (assoc-ref %build-inputs
284 (font-dir (string-append %output
285 "/share/fonts/truetype"))
286 (doc-dir (string-append %output "/share/doc/"
287 ,name "-" ,version)))
289 (system* tar "xvf" (assoc-ref %build-inputs "source"))
293 (chdir (string-append "freefont-" ,version))
294 (for-each (lambda (file)
295 (let ((dir (if (string-suffix? "ttf" file)
299 (string-append dir "/" file))))
300 (find-files "." ""))))))
301 (native-inputs `(("source" ,source)
304 (home-page "http://www.gnu.org/software/freefont/")
305 (synopsis "Unicode-encoded outline fonts")
307 "The GNU Freefont project aims to provide a set of free outline
308 (PostScript Type0, TrueType, OpenType...) fonts covering the ISO
309 10646/Unicode UCS (Universal Character Set).")
310 (license license:gpl3+)))
312 (define-public font-liberation
314 (name "font-liberation")
318 (uri (string-append "https://fedorahosted.org/releases/l/i/"
319 "liberation-fonts/liberation-fonts-ttf-"
323 "010m4zfqan4w04b6bs9pm3gapn9hsb18bmwwgp2p6y6idj52g43q"))))
324 (build-system trivial-build-system)
326 `(#:modules ((guix build utils))
329 (use-modules (guix build utils))
331 (let ((tar (string-append (assoc-ref %build-inputs "tar")
333 (PATH (string-append (assoc-ref %build-inputs "gzip")
335 (font-dir (string-append %output "/share/fonts/truetype"))
336 (doc-dir (string-append %output "/share/doc/" ,name)))
338 (system* tar "xvf" (assoc-ref %build-inputs "source"))
341 (chdir (string-append "liberation-fonts-ttf-" ,version))
342 (for-each (lambda (ttf)
344 (string-append font-dir "/"
346 (find-files "." "\\.ttf$"))
347 (for-each (lambda (doc)
349 (string-append doc-dir "/"
351 '("AUTHORS" "ChangeLog" "LICENSE" "README" "TODO"))))))
356 (home-page "https://fedorahosted.org/liberation-fonts/")
358 "Fonts compatible with Arial, Times New Roman, and Courier New")
360 "The Liberation font family aims at metric compatibility with
361 Arial, Times New Roman, and Courier New.
363 There are three sets:
365 - Sans (a substitute for Arial, Albany, Helvetica, Nimbus Sans L, and
366 Bitstream Vera Sans);
368 - Serif (a substitute for Times New Roman, Thorndale, Nimbus Roman, and
369 Bitstream Vera Serif);
371 - Mono (a substitute for Courier New, Cumberland, Courier, Nimbus Mono L,
372 and Bitstream Vera Sans Mono).
374 The Liberation Fonts are sponsored by Red Hat.")
375 (license license:silofl1.1)))
377 (define-public font-terminus
379 (name "font-terminus")
385 "mirror://sourceforge/project/terminus-font/terminus-font-"
392 "0487cyx5h1f0crbny5sg73a22gmym5vk1i7646gy7hgiscj2rxb4"))))
393 (build-system gnu-build-system)
395 `(("pkg-config" ,pkg-config)
397 ("bdftopcf" ,bdftopcf)
398 ("font-util" ,font-util)
399 ("mkfontdir" ,mkfontdir)))
401 `(#:configure-flags (list
402 ;; install fonts into subdirectory of package output
403 ;; instead of font-util-?.?.?/share/fonts/X11
404 (string-append "--with-fontrootdir="
405 %output "/share/fonts/X11"))
406 #:tests? #f)) ;; No test target in tarball
407 (home-page "http://terminus-font.sourceforge.net/")
408 (synopsis "Simple bitmap programming font")
409 (description "Terminus Font is a clean, fixed width bitmap font, designed
410 for long (8 and more hours per day) work with computers.")
411 (license license:silofl1.1)))
413 (define-public font-adobe-source-han-sans
415 (name "font-adobe-source-han-sans")
420 "https://github.com/adobe-fonts/source-han-sans/archive/"
422 (file-name (string-append "source-han-sans-" version "R.tar.gz"))
425 "1ssx0fw90sy6mj8fv8fv4dgzszpqwbmwpjnlx16g4pvaqzdmybbz"))))
426 (outputs '("out" ; OpenType/CFF Collection (OTC), 121 MiB.
427 "cn" "jp" "kr" "tw")) ; Region-specific Subset OpenType/CFF.
428 (build-system trivial-build-system)
430 `(#:modules ((guix build utils))
433 (use-modules (guix build utils))
434 (let ((tar (string-append (assoc-ref %build-inputs
437 (PATH (string-append (assoc-ref %build-inputs
440 (install-opentype-fonts
441 (lambda (fonts-dir out)
442 (copy-recursively fonts-dir
443 (string-append (assoc-ref %outputs out)
444 "/share/fonts/opentype")))))
446 (system* tar "xvf" (assoc-ref %build-inputs "source"))
447 (chdir (string-append "source-han-sans-" ,version "R"))
448 (install-opentype-fonts "OTC" "out")
449 (install-opentype-fonts "SubsetOTF/CN" "cn")
450 (install-opentype-fonts "SubsetOTF/JP" "jp")
451 (install-opentype-fonts "SubsetOTF/KR" "kr")
452 (install-opentype-fonts "SubsetOTF/TW" "tw")
453 (for-each delete-file (find-files %output "\\.zip$"))))))
457 (home-page "https://github.com/adobe-fonts/source-han-sans")
458 (synopsis "Pan-CJK fonts")
460 "Source Han Sans is a sans serif Pan-CJK font family that is offered in
461 seven weights: ExtraLight, Light, Normal, Regular, Medium, Bold, and Heavy.
462 And in several OpenType/CFF-based deployment configurations to accommodate
463 various system requirements or limitations. As the name suggests, Pan-CJK
464 fonts are intended to support the characters necessary to render or display
465 text in Simplified Chinese, Traditional Chinese, Japanese, and Korean.")
466 (license license:silofl1.1)))
468 (define-public font-wqy-zenhei
470 (name "font-wqy-zenhei")
475 "mirror://sourceforge/wqy/wqy-zenhei-"
477 (file-name (string-append "wqy-zenhei-" version ".tar.gz"))
480 "1mkmxq8g2hjcglb3zajfqj20r4r88l78ymsp2xyl5yav8w3f7dz4"))))
481 (build-system trivial-build-system)
483 `(#:modules ((guix build utils))
486 (use-modules (guix build utils))
487 (let ((PATH (string-append (assoc-ref %build-inputs "tar") "/bin:"
488 (assoc-ref %build-inputs "gzip") "/bin"))
489 (font-dir (string-append (assoc-ref %outputs "out")
490 "/share/fonts/wenquanyi/")))
493 (system* "tar" "xvf" (assoc-ref %build-inputs "source"))
495 (copy-file "wqy-zenhei.ttc"
496 (string-append font-dir "wqy-zenhei.ttc"))))))
500 (home-page "http://wenq.org/wqy2/")
501 (synopsis "CJK font")
503 "WenQuanYi Zen Hei is a Hei-Ti style (sans-serif type) Chinese outline
504 font. It is designed for general purpose text formatting and on-screen
505 display of Chinese characters and symbols from many other languages.
506 WenQuanYi Zen Hei provides a rather complete coverage to Chinese Hanzi glyphs,
507 including both simplified and traditional forms. The total glyph number in
508 this font is over 35,000, including over 21,000 Chinese Hanzi. This font has
509 full coverage to GBK(CP936) charset, CJK Unified Ideographs, as well as the
510 code-points needed for zh_cn, zh_sg, zh_tw, zh_hk, zh_mo, ja (Japanese) and
511 ko (Korean) locales for fontconfig.")
512 ;; GPLv2 with font embedding exception
513 (license license:gpl2)))
515 (define-public font-tex-gyre
517 (name "font-tex-gyre")
522 (uri (string-append "http://www.gust.org.pl/projects/e-foundry/"
523 "tex-gyre/whole/tg-" version "otf.zip"))
526 "0kph9l3g7jb2bpmxdbdg5zl56wacmnvdvsdn7is1gc750sqvsn31"))))
527 (build-system trivial-build-system)
529 `(#:modules ((guix build utils))
532 (use-modules (guix build utils))
534 (let ((unzip (string-append (assoc-ref %build-inputs "unzip")
536 (font-dir (string-append %output "/share/fonts/opentype")))
539 (assoc-ref %build-inputs "source")
543 (home-page "http://www.gust.org.pl/projects/e-foundry/tex-gyre/")
544 (synopsis "Remake of Ghostscript fonts")
545 (description "The TeX Gyre collection of fonts is the result of an
546 extensive remake and extension of the freely available base PostScript fonts
547 distributed with Ghostscript version 4.00. The collection contains the
548 following fonts in the OpenType format: Adventor, Bonum, Chorus, Cursor,
549 Heros, Pagella, Schola, Termes.")
550 (license license:gfl1.0)))
552 (define-public font-anonymous-pro
554 (name "font-anonymous-pro")
559 "http://www.marksimonson.com/assets/content/fonts/"
560 "AnonymousPro-" version ".zip"))
563 "1asj6lykvxh46czbal7ymy2k861zlcdqpz8x3s5bbpqwlm3mhrl6"))))
564 (build-system trivial-build-system)
566 `(#:modules ((guix build utils))
569 (use-modules (guix build utils))
570 (let ((unzip (string-append (assoc-ref %build-inputs "unzip")
572 (font-dir (string-append %output "/share/fonts/truetype"))
573 (doc-dir (string-append %output "/share/doc/" ,name)))
574 (system* unzip (assoc-ref %build-inputs "source"))
577 (chdir (string-append "AnonymousPro-" ,version ".001"))
578 (for-each (lambda (ttf)
580 (string-append font-dir "/" ttf)))
581 (find-files "." "\\.ttf$"))
582 (for-each (lambda (doc)
584 (string-append doc-dir "/" doc)))
585 (find-files "." "\\.txt$"))))))
588 (home-page "http://www.marksimonson.com/fonts/view/anonymous-pro")
589 (synopsis "Fixed-width fonts designed with coding in mind")
590 (description "Anonymous Pro is a family of four fixed-width fonts designed
591 with coding in mind. Anonymous Pro features an international, Unicode-based
592 character set, with support for most Western and Central European Latin-based
593 languages, plus Greek and Cyrillic.")
594 (license license:silofl1.1)))
596 (define-public font-gnu-unifont
598 (name "font-gnu-unifont")
603 "mirror://gnu/unifont/unifont-8.0.01/unifont-"
607 "176bzc2y3i49xavrmbyyz5lkqp0qq3bkj7rjrl197kib873by82b"))))
608 (build-system gnu-build-system)
609 (outputs '("out" ; TrueType version
610 "pcf" ; PCF (bitmap) version
611 "psf" ; PSF (console) version
612 "bin" ; Utilities to manipulate '.hex' format
615 '(#:parallel-build? #f ; parallel build fails
616 #:tests? #f ; no check target
618 (modify-phases %standard-phases
621 (setenv "CC" "gcc")))
624 (lambda* (#:key outputs #:allow-other-keys)
625 (let* ((ttf (string-append (assoc-ref outputs "out")
626 "/share/fonts/truetype"))
627 (pcf (string-append (assoc-ref outputs "pcf")
628 "/share/fonts/misc"))
629 (psf (string-append (assoc-ref outputs "psf")
630 "/share/consolefonts"))
631 (bin (assoc-ref outputs "bin")))
633 (string-append "PREFIX=" bin)
634 (string-append "TTFDEST=" ttf)
635 (string-append "PCFDEST=" pcf)
636 (string-append "CONSOLEDEST=" psf)
638 ;; Move Texinfo file to the right place.
639 (mkdir (string-append bin "/share/info"))
640 (rename-file (string-append bin "/share/unifont/unifont.info.gz")
641 (string-append bin "/share/info/unifont.info.gz"))
644 `(("perl" ,perl))) ; for utilities
646 "Large bitmap font covering Unicode's Basic Multilingual Plane")
648 "GNU Unifont is a bitmap font covering essentially all of
649 Unicode's Basic Multilingual Plane. The package also includes
650 utilities to ease adding new glyphs to the font.")
651 (home-page "http://unifoundry.com/unifont.html")
652 (license license:gpl2+)))
654 (define-public font-google-noto
656 (name "font-google-noto")
660 (uri (string-append "https://noto-website-2.storage.googleapis.com/"
661 "pkgs/Noto-hinted.zip"))
664 "13jhpqzhsqhyby8n0ksqg155a3jyaif3nzj9anzbq8s2gn1xjyd9"))))
665 (build-system trivial-build-system)
667 `(#:modules ((guix build utils))
669 (use-modules (guix build utils)
672 (let ((PATH (string-append (assoc-ref %build-inputs
675 (font-dir (string-append %output
676 "/share/fonts/truetype")))
678 (system* "unzip" (assoc-ref %build-inputs "source"))
681 (for-each (lambda (ttf)
683 (string-append font-dir "/" ttf)))
684 (find-files "." "\\.ttf$"))
685 (for-each (lambda (otf)
687 (string-append font-dir "/" otf)))
688 (find-files "." "\\.otf$"))))))
689 (native-inputs `(("unzip" ,unzip)))
690 (home-page "https://www.google.com/get/noto/")
691 (synopsis "Fonts aimed to cover all languages")
692 (description "Googe Noto Fonts is a family of fonts aimed to support all
693 languages with a consistent look and aesthetic. It's goal is to have no Unicode
694 symbols unable to be displayed properly.")
695 (license license:silofl1.1)))
697 (define-public font-un
700 (version "1.0.2-080608")
701 ;; The upstream server at kldp.net is serving us broken MIME.
702 ;; See <http://bugs.gnu.org/22908>.
707 "http://krosos.sdf.org/static/unix/"
708 "un-fonts-core-" version ".tar.gz")
709 ;; XXX: The upstream server at kldp.net
711 "https://kldp.net/projects/unfonts/download/4695?filename="
712 "un-fonts-core-" version ".tar.gz")))
713 (file-name (string-append name "-" version ".tar.gz"))
716 "13liaz2pmww3aqabm55la5npd08m1skh334ky7qfidxaz5s742iv"))))
717 (build-system trivial-build-system)
719 `(#:modules ((guix build utils))
722 (use-modules (guix build utils))
724 (let ((tar (string-append (assoc-ref %build-inputs "tar")
726 (PATH (string-append (assoc-ref %build-inputs "gzip")
728 (font-dir (string-append %output "/share/fonts/truetype"))
729 (doc-dir (string-append %output "/share/doc/" ,name)))
731 (system* tar "xvf" (assoc-ref %build-inputs "source"))
734 (chdir (string-append "un-fonts"))
735 (for-each (lambda (ttf)
737 (string-append font-dir "/"
739 (find-files "." "\\.ttf$"))
740 (for-each (lambda (doc)
742 (string-append doc-dir "/"
744 '("COPYING" "README"))))))
748 (home-page "https://kldp.net/projects/unfonts/")
749 (synopsis "Collection of Korean fonts")
751 "Un-fonts is a family of mainly Korean fonts.
752 It contains the following fonts and styles:
755 @item UnBatang, UnBatangBold: serif;
756 @item UnDotum, UnDotumBold: sans-serif;
757 @item UnGraphic, UnGraphicBold: sans-serif style;
758 @item UnDinaru, UnDinaruBold, UnDinaruLight;
759 @item UnPilgi, UnPilgiBold: script;
760 @item UnGungseo: cursive, brush-stroke.
762 (license license:gpl2+)))