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 fontutils)
37 #:use-module (gnu packages perl)
38 #:use-module (gnu packages pkg-config)
39 #:use-module (gnu packages python)
40 #:use-module (gnu packages xorg)
41 #:use-module (gnu packages zip))
43 (define-public font-inconsolata
45 (name "font-inconsolata")
49 (uri "http://www.levien.com/type/myfonts/Inconsolata.otf")
52 "06js6znbcf7swn8y3b8ki416bz96ay7d3yvddqnvi88lqhbfcq8m"))))
53 (build-system trivial-build-system)
55 `(#:modules ((guix build utils))
57 (use-modules (guix build utils))
58 (let ((font-dir (string-append %output
59 "/share/fonts/opentype"))
60 (source (assoc-ref %build-inputs "source")))
63 (string-append font-dir "/" "inconsolata.otf"))))))
64 (native-inputs `(("source" ,source)))
65 (home-page "http://levien.com/type/myfonts/inconsolata.html")
66 (synopsis "Monospace font")
67 (description "A monospace font, designed for code listings and the like,
68 in print. With attention to detail for high resolution rendering.")
69 (license license:silofl1.1)))
71 (define-public font-ubuntu
78 "http://font.ubuntu.com/download/ubuntu-font-family-"
82 "0hjvq2x758dx0sfwqhzflns0ns035qm7h6ygskbx1svzg517sva5"))))
83 (build-system trivial-build-system)
85 `(#:modules ((guix build utils))
87 (use-modules (guix build utils)
90 (let ((PATH (string-append (assoc-ref %build-inputs
93 (font-dir (string-append %output
94 "/share/fonts/truetype"))
95 (doc-dir (string-append %output "/share/doc/"
98 (system* "unzip" (assoc-ref %build-inputs "source"))
102 (chdir (string-append "ubuntu-font-family-" ,version))
103 (for-each (lambda (ttf)
105 (string-append font-dir "/" ttf)))
106 (find-files "." "\\.ttf$"))
107 (for-each (lambda (doc)
109 (string-append doc-dir "/" doc)))
110 (find-files "." "\\.txt$"))))))
111 (native-inputs `(("source" ,source)
113 (home-page "http://font.ubuntu.com/")
114 (synopsis "The Ubuntu Font Family")
115 (description "The Ubuntu Font Family is a unique, custom designed font
116 that has a very distinctive look and feel. This package provides the
117 TrueType (TTF) files.")
119 (license:non-copyleft
120 "http://font.ubuntu.com/ufl/ubuntu-font-licence-1.0.txt"
121 "Ubuntu Font License v1.0"))))
123 (define-public font-dejavu
129 (uri (string-append "mirror://sourceforge/dejavu/"
130 version "/dejavu-fonts-ttf-"
134 "0pgb0a3ngamidacmrvasg51ck3gp8gn93w6sf1s8snwzx4x2r9yh"))))
135 (build-system trivial-build-system)
137 `(#:modules ((guix build utils))
139 (use-modules (guix build utils))
141 (let ((tar (string-append (assoc-ref %build-inputs
144 (PATH (string-append (assoc-ref %build-inputs
147 (font-dir (string-append
148 %output "/share/fonts/truetype"))
149 (conf-dir (string-append
150 %output "/share/fontconfig/conf.avail"))
151 (doc-dir (string-append
152 %output "/share/doc/" ,name "-" ,version)))
154 (system* tar "xvf" (assoc-ref %build-inputs "source"))
159 (chdir (string-append "dejavu-fonts-ttf-" ,version))
160 (for-each (lambda (ttf)
162 (string-append font-dir "/"
164 (find-files "ttf" "\\.ttf$"))
165 (for-each (lambda (conf)
167 (string-append conf-dir "/"
169 (find-files "fontconfig" "\\.conf$"))
170 (for-each (lambda (doc)
172 (string-append doc-dir "/"
174 (find-files "." "\\.txt$|^[A-Z][A-Z]*$"))))))
175 (native-inputs `(("source" ,source)
178 (home-page "http://dejavu-fonts.org/")
179 (synopsis "Vera font family derivate with additional characters")
180 (description "DejaVu provides an expanded version of the Vera font family
181 aiming for quality and broader Unicode coverage while retaining the original
182 Vera style. DejaVu currently works towards conformance with the Multilingual
183 European Standards (MES-1 and MES-2) for Unicode coverage. The DejaVu fonts
184 provide serif, sans and monospaced variants.")
187 "http://dejavu-fonts.org/"))))
189 (define-public font-bitstream-vera
191 (name "font-bitstream-vera")
195 (uri (string-append "mirror://gnome/sources/ttf-bitstream-vera/"
196 version "/ttf-bitstream-vera-"
200 "1p3qs51x5327gnk71yq8cvmxc6wgx79sqxfvxcv80cdvgggjfnyv"))))
201 (build-system trivial-build-system)
203 `(#:modules ((guix build utils))
205 (use-modules (guix build utils)
208 (let ((tar (string-append (assoc-ref %build-inputs
211 (PATH (string-append (assoc-ref %build-inputs
214 (font-dir (string-append %output
215 "/share/fonts/truetype"))
216 (doc-dir (string-append %output "/share/doc/"
217 ,name "-" ,version)))
219 (system* tar "xvf" (assoc-ref %build-inputs "source"))
223 (chdir (string-append "ttf-bitstream-vera-" ,version))
224 (for-each (lambda (ttf)
226 (string-append font-dir "/" ttf)))
227 (find-files "." "\\.ttf$"))
228 (for-each (lambda (doc)
230 (string-append doc-dir "/" doc)))
231 (find-files "." "\\.TXT$"))))))
232 (native-inputs `(("source" ,source)
235 (home-page "http://www.gnome.org/fonts/")
236 (synopsis "Bitstream Vera sans-serif typeface")
237 (description "Vera is a sans-serif typeface from Bitstream, Inc. This
238 package provides the TrueType (TTF) files.")
241 "http://www.gnome.org/fonts/#Final_Bitstream_Vera_Fonts"))))
243 (define-public font-cantarell
245 (name "font-abattis-cantarell")
249 (uri (string-append "mirror://gnome/sources/cantarell-fonts/"
250 (version-major+minor version)
251 "/cantarell-fonts-" version ".tar.xz"))
254 "0r4jnc2x9yncf40lixjb1pqgpq8rzbi2fz33pshlqzjgx2d69bcw"))))
255 (build-system gnu-build-system)
256 (home-page "https://wiki.gnome.org/Projects/CantarellFonts")
257 (synopsis "Cantarell sans-serif typeface")
258 (description "The Cantarell font family is a contemporary Humanist
259 sans-serif designed for on-screen reading. It is used by GNOME@tie{}3.")
260 (license license:silofl1.1)))
262 (define-public font-gnu-freefont-ttf
264 (name "font-gnu-freefont-ttf")
268 (uri (string-append "mirror://gnu/freefont/freefont-src-"
272 "0yk58blhcd4hm7nyincmqq4jrzjjk82wif2zmk1l3y2m4vif4qhd"))))
273 (build-system gnu-build-system)
275 `(#:phases (modify-phases %standard-phases
279 (let ((doc-dir (string-append %output "/share/doc/"
281 (font-dir (string-append %output
282 "/share/fonts/truetype")))
284 (substitute* "Makefile"
285 (("\\$\\(TMPDIR\\)") doc-dir)
286 (("sfd/\\*.ttf") ""))
287 (system* "make" "ttftar")
289 (for-each (lambda (file)
291 (string-append 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)
345 (string-append font-dir "/"
347 (find-files "." "\\.ttf$"))
348 (for-each (lambda (doc)
350 (string-append doc-dir "/"
352 '("AUTHORS" "ChangeLog" "LICENSE" "README" "TODO"))))))
357 (home-page "https://fedorahosted.org/liberation-fonts/")
359 "Fonts compatible with Arial, Times New Roman, and Courier New")
361 "The Liberation font family aims at metric compatibility with
362 Arial, Times New Roman, and Courier New.
364 There are three sets:
366 - Sans (a substitute for Arial, Albany, Helvetica, Nimbus Sans L, and
367 Bitstream Vera Sans);
369 - Serif (a substitute for Times New Roman, Thorndale, Nimbus Roman, and
370 Bitstream Vera Serif);
372 - Mono (a substitute for Courier New, Cumberland, Courier, Nimbus Mono L,
373 and Bitstream Vera Sans Mono).
375 The Liberation Fonts are sponsored by Red Hat.")
376 (license license:silofl1.1)))
378 (define-public font-terminus
380 (name "font-terminus")
386 "mirror://sourceforge/project/terminus-font/terminus-font-"
393 "0487cyx5h1f0crbny5sg73a22gmym5vk1i7646gy7hgiscj2rxb4"))))
394 (build-system gnu-build-system)
396 `(("pkg-config" ,pkg-config)
398 ("bdftopcf" ,bdftopcf)
399 ("font-util" ,font-util)
400 ("mkfontdir" ,mkfontdir)))
402 `(#:configure-flags (list
403 ;; install fonts into subdirectory of package output
404 ;; instead of font-util-?.?.?/share/fonts/X11
405 (string-append "--with-fontrootdir="
406 %output "/share/fonts/X11"))
407 #:tests? #f)) ;; No test target in tarball
408 (home-page "http://terminus-font.sourceforge.net/")
409 (synopsis "Simple bitmap programming font")
410 (description "Terminus Font is a clean, fixed width bitmap font, designed
411 for long (8 and more hours per day) work with computers.")
412 (license license:silofl1.1)))
414 (define-public font-adobe-source-han-sans
416 (name "font-adobe-source-han-sans")
421 "https://github.com/adobe-fonts/source-han-sans/archive/"
423 (file-name (string-append "source-han-sans-" version "R.tar.gz"))
426 "1ssx0fw90sy6mj8fv8fv4dgzszpqwbmwpjnlx16g4pvaqzdmybbz"))))
427 (outputs '("out" ; OpenType/CFF Collection (OTC), 121 MiB.
428 "cn" "jp" "kr" "tw")) ; Region-specific Subset OpenType/CFF.
429 (build-system trivial-build-system)
431 `(#:modules ((guix build utils))
434 (use-modules (guix build utils))
435 (let ((tar (string-append (assoc-ref %build-inputs
438 (PATH (string-append (assoc-ref %build-inputs
441 (install-opentype-fonts
442 (lambda (fonts-dir out)
443 (copy-recursively fonts-dir
444 (string-append (assoc-ref %outputs out)
445 "/share/fonts/opentype")))))
447 (system* tar "xvf" (assoc-ref %build-inputs "source"))
448 (chdir (string-append "source-han-sans-" ,version "R"))
449 (install-opentype-fonts "OTC" "out")
450 (install-opentype-fonts "SubsetOTF/CN" "cn")
451 (install-opentype-fonts "SubsetOTF/JP" "jp")
452 (install-opentype-fonts "SubsetOTF/KR" "kr")
453 (install-opentype-fonts "SubsetOTF/TW" "tw")
454 (for-each delete-file (find-files %output "\\.zip$"))))))
458 (home-page "https://github.com/adobe-fonts/source-han-sans")
459 (synopsis "Pan-CJK fonts")
461 "Source Han Sans is a sans serif Pan-CJK font family that is offered in
462 seven weights: ExtraLight, Light, Normal, Regular, Medium, Bold, and Heavy.
463 And in several OpenType/CFF-based deployment configurations to accommodate
464 various system requirements or limitations. As the name suggests, Pan-CJK
465 fonts are intended to support the characters necessary to render or display
466 text in Simplified Chinese, Traditional Chinese, Japanese, and Korean.")
467 (license license:silofl1.1)))
469 (define-public font-wqy-zenhei
471 (name "font-wqy-zenhei")
476 "mirror://sourceforge/wqy/wqy-zenhei-"
478 (file-name (string-append "wqy-zenhei-" version ".tar.gz"))
481 "1mkmxq8g2hjcglb3zajfqj20r4r88l78ymsp2xyl5yav8w3f7dz4"))))
482 (build-system trivial-build-system)
484 `(#:modules ((guix build utils))
487 (use-modules (guix build utils))
488 (let ((PATH (string-append (assoc-ref %build-inputs "tar") "/bin:"
489 (assoc-ref %build-inputs "gzip") "/bin"))
490 (font-dir (string-append (assoc-ref %outputs "out")
491 "/share/fonts/wenquanyi/")))
494 (system* "tar" "xvf" (assoc-ref %build-inputs "source"))
496 (copy-file "wqy-zenhei.ttc"
497 (string-append font-dir "wqy-zenhei.ttc"))))))
501 (home-page "http://wenq.org/wqy2/")
502 (synopsis "CJK font")
504 "WenQuanYi Zen Hei is a Hei-Ti style (sans-serif type) Chinese outline
505 font. It is designed for general purpose text formatting and on-screen
506 display of Chinese characters and symbols from many other languages.
507 WenQuanYi Zen Hei provides a rather complete coverage to Chinese Hanzi glyphs,
508 including both simplified and traditional forms. The total glyph number in
509 this font is over 35,000, including over 21,000 Chinese Hanzi. This font has
510 full coverage to GBK(CP936) charset, CJK Unified Ideographs, as well as the
511 code-points needed for zh_cn, zh_sg, zh_tw, zh_hk, zh_mo, ja (Japanese) and
512 ko (Korean) locales for fontconfig.")
513 ;; GPLv2 with font embedding exception
514 (license license:gpl2)))
516 (define-public font-tex-gyre
518 (name "font-tex-gyre")
523 (uri (string-append "http://www.gust.org.pl/projects/e-foundry/"
524 "tex-gyre/whole/tg-" version "otf.zip"))
527 "0kph9l3g7jb2bpmxdbdg5zl56wacmnvdvsdn7is1gc750sqvsn31"))))
528 (build-system trivial-build-system)
530 `(#:modules ((guix build utils))
533 (use-modules (guix build utils))
535 (let ((unzip (string-append (assoc-ref %build-inputs "unzip")
537 (font-dir (string-append %output "/share/fonts/opentype")))
540 (assoc-ref %build-inputs "source")
544 (home-page "http://www.gust.org.pl/projects/e-foundry/tex-gyre/")
545 (synopsis "Remake of Ghostscript fonts")
546 (description "The TeX Gyre collection of fonts is the result of an
547 extensive remake and extension of the freely available base PostScript fonts
548 distributed with Ghostscript version 4.00. The collection contains the
549 following fonts in the OpenType format: Adventor, Bonum, Chorus, Cursor,
550 Heros, Pagella, Schola, Termes.")
551 (license license:gfl1.0)))
553 (define-public font-anonymous-pro
555 (name "font-anonymous-pro")
560 "http://www.marksimonson.com/assets/content/fonts/"
561 "AnonymousPro-" version ".zip"))
564 "1asj6lykvxh46czbal7ymy2k861zlcdqpz8x3s5bbpqwlm3mhrl6"))))
565 (build-system trivial-build-system)
567 `(#:modules ((guix build utils))
570 (use-modules (guix build utils))
571 (let ((unzip (string-append (assoc-ref %build-inputs "unzip")
573 (font-dir (string-append %output "/share/fonts/truetype"))
574 (doc-dir (string-append %output "/share/doc/" ,name)))
575 (system* unzip (assoc-ref %build-inputs "source"))
578 (chdir (string-append "AnonymousPro-" ,version ".001"))
579 (for-each (lambda (ttf)
581 (string-append font-dir "/" ttf)))
582 (find-files "." "\\.ttf$"))
583 (for-each (lambda (doc)
585 (string-append doc-dir "/" doc)))
586 (find-files "." "\\.txt$"))))))
589 (home-page "http://www.marksimonson.com/fonts/view/anonymous-pro")
590 (synopsis "Fixed-width fonts designed with coding in mind")
591 (description "Anonymous Pro is a family of four fixed-width fonts designed
592 with coding in mind. Anonymous Pro features an international, Unicode-based
593 character set, with support for most Western and Central European Latin-based
594 languages, plus Greek and Cyrillic.")
595 (license license:silofl1.1)))
597 (define-public font-gnu-unifont
599 (name "font-gnu-unifont")
604 "mirror://gnu/unifont/unifont-8.0.01/unifont-"
608 "176bzc2y3i49xavrmbyyz5lkqp0qq3bkj7rjrl197kib873by82b"))))
609 (build-system gnu-build-system)
610 (outputs '("out" ; TrueType version
611 "pcf" ; PCF (bitmap) version
612 "psf" ; PSF (console) version
613 "bin" ; Utilities to manipulate '.hex' format
616 '(#:parallel-build? #f ; parallel build fails
617 #:tests? #f ; no check target
619 (modify-phases %standard-phases
622 (setenv "CC" "gcc")))
625 (lambda* (#:key outputs #:allow-other-keys)
626 (let* ((ttf (string-append (assoc-ref outputs "out")
627 "/share/fonts/truetype"))
628 (pcf (string-append (assoc-ref outputs "pcf")
629 "/share/fonts/misc"))
630 (psf (string-append (assoc-ref outputs "psf")
631 "/share/consolefonts"))
632 (bin (assoc-ref outputs "bin")))
634 (string-append "PREFIX=" bin)
635 (string-append "TTFDEST=" ttf)
636 (string-append "PCFDEST=" pcf)
637 (string-append "CONSOLEDEST=" psf)
639 ;; Move Texinfo file to the right place.
640 (mkdir (string-append bin "/share/info"))
641 (rename-file (string-append bin "/share/unifont/unifont.info.gz")
642 (string-append bin "/share/info/unifont.info.gz"))
645 `(("perl" ,perl))) ; for utilities
647 "Large bitmap font covering Unicode's Basic Multilingual Plane")
649 "GNU Unifont is a bitmap font covering essentially all of
650 Unicode's Basic Multilingual Plane. The package also includes
651 utilities to ease adding new glyphs to the font.")
652 (home-page "http://unifoundry.com/unifont.html")
653 (license license:gpl2+)))
655 (define-public font-google-noto
657 (name "font-google-noto")
661 (uri (string-append "https://noto-website-2.storage.googleapis.com/"
662 "pkgs/Noto-hinted.zip"))
665 "13jhpqzhsqhyby8n0ksqg155a3jyaif3nzj9anzbq8s2gn1xjyd9"))))
666 (build-system trivial-build-system)
668 `(#:modules ((guix build utils))
670 (use-modules (guix build utils)
673 (let ((PATH (string-append (assoc-ref %build-inputs
676 (font-dir (string-append %output
677 "/share/fonts/truetype")))
679 (system* "unzip" (assoc-ref %build-inputs "source"))
682 (for-each (lambda (ttf)
684 (string-append font-dir "/" ttf)))
685 (find-files "." "\\.ttf$"))
686 (for-each (lambda (otf)
688 (string-append font-dir "/" otf)))
689 (find-files "." "\\.otf$"))))))
690 (native-inputs `(("unzip" ,unzip)))
691 (home-page "https://www.google.com/get/noto/")
692 (synopsis "Fonts aimed to cover all languages")
693 (description "Googe Noto Fonts is a family of fonts aimed to support all
694 languages with a consistent look and aesthetic. It's goal is to have no Unicode
695 symbols unable to be displayed properly.")
696 (license license:silofl1.1)))
698 (define-public font-un
701 (version "1.0.2-080608")
702 ;; The upstream server at kldp.net is serving us broken MIME.
703 ;; See <http://bugs.gnu.org/22908>.
708 "http://krosos.sdf.org/static/unix/"
709 "un-fonts-core-" version ".tar.gz")
710 ;; XXX: The upstream server at kldp.net
712 "https://kldp.net/projects/unfonts/download/4695?filename="
713 "un-fonts-core-" version ".tar.gz")))
714 (file-name (string-append name "-" version ".tar.gz"))
717 "13liaz2pmww3aqabm55la5npd08m1skh334ky7qfidxaz5s742iv"))))
718 (build-system trivial-build-system)
720 `(#:modules ((guix build utils))
723 (use-modules (guix build utils))
725 (let ((tar (string-append (assoc-ref %build-inputs "tar")
727 (PATH (string-append (assoc-ref %build-inputs "gzip")
729 (font-dir (string-append %output "/share/fonts/truetype"))
730 (doc-dir (string-append %output "/share/doc/" ,name)))
732 (system* tar "xvf" (assoc-ref %build-inputs "source"))
735 (chdir (string-append "un-fonts"))
736 (for-each (lambda (ttf)
738 (string-append font-dir "/"
740 (find-files "." "\\.ttf$"))
741 (for-each (lambda (doc)
743 (string-append doc-dir "/"
745 '("COPYING" "README"))))))
749 (home-page "https://kldp.net/projects/unfonts/")
750 (synopsis "Collection of Korean fonts")
752 "Un-fonts is a family of mainly Korean fonts.
753 It contains the following fonts and styles:
756 @item UnBatang, UnBatangBold: serif;
757 @item UnDotum, UnDotumBold: sans-serif;
758 @item UnGraphic, UnGraphicBold: sans-serif style;
759 @item UnDinaru, UnDinaruBold, UnDinaruLight;
760 @item UnPilgi, UnPilgiBold: script;
761 @item UnGungseo: cursive, brush-stroke.
763 (license license:gpl2+)))