1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2014, 2015 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>
11 ;;; This file is part of GNU Guix.
13 ;;; GNU Guix is free software; you can redistribute it and/or modify it
14 ;;; under the terms of the GNU General Public License as published by
15 ;;; the Free Software Foundation; either version 3 of the License, or (at
16 ;;; your option) any later version.
18 ;;; GNU Guix is distributed in the hope that it will be useful, but
19 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
20 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 ;;; GNU General Public License for more details.
23 ;;; You should have received a copy of the GNU General Public License
24 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
26 (define-module (gnu packages fonts)
27 #:use-module ((guix licenses) #:prefix license:)
28 #:use-module (guix packages)
29 #:use-module (guix download)
30 #:use-module (guix build-system gnu)
31 #:use-module (guix build-system trivial)
32 #:use-module (gnu packages base)
33 #:use-module (gnu packages compression)
34 #:use-module (gnu packages zip)
35 #:use-module (gnu packages perl)
36 #:use-module (gnu packages xorg)
37 #:use-module (gnu packages pkg-config))
39 (define-public font-inconsolata
41 (name "font-inconsolata")
45 (uri "http://www.levien.com/type/myfonts/Inconsolata.otf")
48 "06js6znbcf7swn8y3b8ki416bz96ay7d3yvddqnvi88lqhbfcq8m"))))
49 (build-system trivial-build-system)
51 `(#:modules ((guix build utils))
53 (use-modules (guix build utils))
54 (let ((font-dir (string-append %output
55 "/share/fonts/opentype"))
56 (source (assoc-ref %build-inputs "source")))
59 (string-append font-dir "/" "inconsolata.otf"))))))
60 (native-inputs `(("source" ,source)))
61 (home-page "http://levien.com/type/myfonts/inconsolata.html")
62 (synopsis "Monospace font")
63 (description "A monospace font, designed for code listings and the like,
64 in print. With attention to detail for high resolution rendering.")
65 (license license:silofl1.1)))
67 (define-public font-ubuntu
73 (uri (string-append "http://font.ubuntu.com/download/ubuntu-font-family-"
77 "0k4f548riq23gmw4zhn30qqkcpaj4g2ab5rbc3lflfxwkc4p0w8h"))))
78 (build-system trivial-build-system)
80 `(#:modules ((guix build utils))
82 (use-modules (guix build utils)
85 (let ((PATH (string-append (assoc-ref %build-inputs
88 (font-dir (string-append %output
89 "/share/fonts/truetype"))
90 (doc-dir (string-append %output "/share/doc/"
93 (system* "unzip" (assoc-ref %build-inputs "source"))
97 (chdir (string-append "ubuntu-font-family-" ,version))
98 (for-each (lambda (ttf)
100 (string-append font-dir "/" ttf)))
101 (find-files "." "\\.ttf$"))
102 (for-each (lambda (doc)
104 (string-append doc-dir "/" doc)))
105 (find-files "." "\\.txt$"))))))
106 (native-inputs `(("source" ,source)
108 (home-page "http://font.ubuntu.com/")
109 (synopsis "The Ubuntu Font Family")
110 (description "The Ubuntu Font Family is a unique, custom designed font
111 that has a very distinctive look and feel. This package provides the
112 TrueType (TTF) files.")
114 (license:non-copyleft
115 "http://font.ubuntu.com/ufl/ubuntu-font-licence-1.0.txt"
116 "Ubuntu Font License v1.0"))))
118 (define-public font-dejavu
124 (uri (string-append "mirror://sourceforge/dejavu/"
125 version "/dejavu-fonts-ttf-"
129 "0pgb0a3ngamidacmrvasg51ck3gp8gn93w6sf1s8snwzx4x2r9yh"))))
130 (build-system trivial-build-system)
132 `(#:modules ((guix build utils))
134 (use-modules (guix build utils))
136 (let ((tar (string-append (assoc-ref %build-inputs
139 (PATH (string-append (assoc-ref %build-inputs
142 (font-dir (string-append
143 %output "/share/fonts/truetype"))
144 (conf-dir (string-append
145 %output "/share/fontconfig/conf.avail"))
146 (doc-dir (string-append
147 %output "/share/doc/" ,name "-" ,version)))
149 (system* tar "xvf" (assoc-ref %build-inputs "source"))
154 (chdir (string-append "dejavu-fonts-ttf-" ,version))
155 (for-each (lambda (ttf)
157 (string-append font-dir "/"
159 (find-files "ttf" "\\.ttf$"))
160 (for-each (lambda (conf)
162 (string-append conf-dir "/"
164 (find-files "fontconfig" "\\.conf$"))
165 (for-each (lambda (doc)
167 (string-append doc-dir "/"
169 (find-files "." "\\.txt$|^[A-Z][A-Z]*$"))))))
170 (native-inputs `(("source" ,source)
173 (home-page "http://dejavu-fonts.org/")
174 (synopsis "Vera font family derivate with additional characters")
175 (description "DejaVu provides an expanded version of the Vera font family
176 aiming for quality and broader Unicode coverage while retaining the original
177 Vera style. DejaVu currently works towards conformance with the Multilingual
178 European Standards (MES-1 and MES-2) for Unicode coverage. The DejaVu fonts
179 provide serif, sans and monospaced variants.")
182 "http://dejavu-fonts.org/"))))
184 (define-public font-bitstream-vera
186 (name "font-bitstream-vera")
190 (uri (string-append "mirror://gnome/sources/ttf-bitstream-vera/"
191 version "/ttf-bitstream-vera-"
195 "1p3qs51x5327gnk71yq8cvmxc6wgx79sqxfvxcv80cdvgggjfnyv"))))
196 (build-system trivial-build-system)
198 `(#:modules ((guix build utils))
200 (use-modules (guix build utils)
203 (let ((tar (string-append (assoc-ref %build-inputs
206 (PATH (string-append (assoc-ref %build-inputs
209 (font-dir (string-append %output
210 "/share/fonts/truetype"))
211 (doc-dir (string-append %output "/share/doc/"
212 ,name "-" ,version)))
214 (system* tar "xvf" (assoc-ref %build-inputs "source"))
218 (chdir (string-append "ttf-bitstream-vera-" ,version))
219 (for-each (lambda (ttf)
221 (string-append font-dir "/" ttf)))
222 (find-files "." "\\.ttf$"))
223 (for-each (lambda (doc)
225 (string-append doc-dir "/" doc)))
226 (find-files "." "\\.TXT$"))))))
227 (native-inputs `(("source" ,source)
230 (home-page "http://www.gnome.org/fonts/")
231 (synopsis "Bitstream Vera sans-serif typeface")
232 (description "Vera is a sans-serif typeface from Bitstream, Inc. This
233 package provides the TrueType (TTF) files.")
236 "http://www.gnome.org/fonts/#Final_Bitstream_Vera_Fonts"))))
238 (define-public font-gnu-freefont-ttf
240 (name "font-gnu-freefont-ttf")
244 (uri (string-append "mirror://gnu/freefont/freefont-ttf-"
248 "1q3h5jp1mbdkinkwxy0lfd0a1q7azlbagraydlzaa2ng82836wg4"))))
249 (build-system trivial-build-system)
251 `(#:modules ((guix build utils))
253 (use-modules (guix build utils)
256 (let ((tar (string-append (assoc-ref %build-inputs
259 (PATH (string-append (assoc-ref %build-inputs
262 (font-dir (string-append %output
263 "/share/fonts/truetype"))
264 (doc-dir (string-append %output "/share/doc/"
265 ,name "-" ,version)))
267 (system* tar "xvf" (assoc-ref %build-inputs "source"))
271 (chdir (string-append "freefont-" ,version))
272 (for-each (lambda (file)
273 (let ((dir (if (string-suffix? "ttf" file)
277 (string-append dir "/" file))))
278 (find-files "." ""))))))
279 (native-inputs `(("source" ,source)
282 (home-page "http://www.gnu.org/software/freefont/")
283 (synopsis "Unicode-encoded outline fonts")
285 "The GNU Freefont project aims to provide a set of free outline
286 (PostScript Type0, TrueType, OpenType...) fonts covering the ISO
287 10646/Unicode UCS (Universal Character Set).")
288 (license license:gpl3+)))
290 (define-public font-liberation
292 (name "font-liberation")
296 (uri (string-append "https://fedorahosted.org/releases/l/i/"
297 "liberation-fonts/liberation-fonts-ttf-"
301 "010m4zfqan4w04b6bs9pm3gapn9hsb18bmwwgp2p6y6idj52g43q"))))
302 (build-system trivial-build-system)
304 `(#:modules ((guix build utils))
307 (use-modules (guix build utils))
309 (let ((tar (string-append (assoc-ref %build-inputs "tar")
311 (PATH (string-append (assoc-ref %build-inputs "gzip")
313 (font-dir (string-append %output "/share/fonts/truetype"))
314 (doc-dir (string-append %output "/share/doc/" ,name)))
316 (system* tar "xvf" (assoc-ref %build-inputs "source"))
319 (chdir (string-append "liberation-fonts-ttf-" ,version))
320 (for-each (lambda (ttf)
322 (string-append font-dir "/"
324 (find-files "." "\\.ttf$"))
325 (for-each (lambda (doc)
327 (string-append doc-dir "/"
329 '("AUTHORS" "ChangeLog" "LICENSE" "README" "TODO"))))))
334 (home-page "https://fedorahosted.org/liberation-fonts/")
336 "Fonts compatible with Arial, Times New Roman, and Courier New")
338 "The Liberation font family aims at metric compatibility with
339 Arial, Times New Roman, and Courier New.
341 There are three sets:
343 - Sans (a substitute for Arial, Albany, Helvetica, Nimbus Sans L, and
344 Bitstream Vera Sans);
346 - Serif (a substitute for Times New Roman, Thorndale, Nimbus Roman, and
347 Bitstream Vera Serif);
349 - Mono (a substitute for Courier New, Cumberland, Courier, Nimbus Mono L,
350 and Bitstream Vera Sans Mono).
352 The Liberation Fonts are sponsored by Red Hat.")
353 (license license:silofl1.1)))
355 (define-public font-terminus
357 (name "font-terminus")
363 "mirror://sourceforge/project/terminus-font/terminus-font-"
370 "0487cyx5h1f0crbny5sg73a22gmym5vk1i7646gy7hgiscj2rxb4"))))
371 (build-system gnu-build-system)
373 `(("pkg-config" ,pkg-config)
375 ("bdftopcf" ,bdftopcf)
376 ("font-util" ,font-util)
377 ("mkfontdir" ,mkfontdir)))
379 `(#:configure-flags (list
380 ;; install fonts into subdirectory of package output
381 ;; instead of font-util-?.?.?/share/fonts/X11
382 (string-append "--with-fontrootdir="
383 %output "/share/fonts/X11"))
384 #:tests? #f)) ;; No test target in tarball
385 (home-page "http://terminus-font.sourceforge.net/")
386 (synopsis "Simple bitmap programming font")
387 (description "Terminus Font is a clean, fixed width bitmap font, designed
388 for long (8 and more hours per day) work with computers.")
389 (license license:silofl1.1)))
391 (define-public font-adobe-source-han-sans
393 (name "font-adobe-source-han-sans")
398 "https://github.com/adobe-fonts/source-han-sans/archive/"
400 (file-name (string-append "source-han-sans-" version "R.tar.gz"))
403 "1ssx0fw90sy6mj8fv8fv4dgzszpqwbmwpjnlx16g4pvaqzdmybbz"))))
404 (outputs '("out" ; OpenType/CFF Collection (OTC), 121 MiB.
405 "cn" "jp" "kr" "tw")) ; Region-specific Subset OpenType/CFF.
406 (build-system trivial-build-system)
408 `(#:modules ((guix build utils))
411 (use-modules (guix build utils))
412 (let ((tar (string-append (assoc-ref %build-inputs
415 (PATH (string-append (assoc-ref %build-inputs
418 (install-opentype-fonts
419 (lambda (fonts-dir out)
420 (copy-recursively fonts-dir
421 (string-append (assoc-ref %outputs out)
422 "/share/fonts/opentype")))))
424 (system* tar "xvf" (assoc-ref %build-inputs "source"))
425 (chdir (string-append "source-han-sans-" ,version "R"))
426 (install-opentype-fonts "OTC" "out")
427 (install-opentype-fonts "SubsetOTF/CN" "cn")
428 (install-opentype-fonts "SubsetOTF/JP" "jp")
429 (install-opentype-fonts "SubsetOTF/KR" "kr")
430 (install-opentype-fonts "SubsetOTF/TW" "tw")
431 (for-each delete-file (find-files %output "\\.zip$"))))))
435 (home-page "https://github.com/adobe-fonts/source-han-sans")
436 (synopsis "Pan-CJK fonts")
438 "Source Han Sans is a sans serif Pan-CJK font family that is offered in
439 seven weights: ExtraLight, Light, Normal, Regular, Medium, Bold, and Heavy.
440 And in several OpenType/CFF-based deployment configurations to accommodate
441 various system requirements or limitations. As the name suggests, Pan-CJK
442 fonts are intended to support the characters necessary to render or display
443 text in Simplified Chinese, Traditional Chinese, Japanese, and Korean.")
444 (license license:silofl1.1)))
446 (define-public font-wqy-zenhei
448 (name "font-wqy-zenhei")
453 "mirror://sourceforge/wqy/wqy-zenhei-"
455 (file-name (string-append "wqy-zenhei-" version ".tar.gz"))
458 "1mkmxq8g2hjcglb3zajfqj20r4r88l78ymsp2xyl5yav8w3f7dz4"))))
459 (build-system trivial-build-system)
461 `(#:modules ((guix build utils))
464 (use-modules (guix build utils))
465 (let ((PATH (string-append (assoc-ref %build-inputs "tar") "/bin:"
466 (assoc-ref %build-inputs "gzip") "/bin"))
467 (font-dir (string-append (assoc-ref %outputs "out")
468 "/share/fonts/wenquanyi/")))
471 (system* "tar" "xvf" (assoc-ref %build-inputs "source"))
473 (copy-file "wqy-zenhei.ttc"
474 (string-append font-dir "wqy-zenhei.ttc"))))))
478 (home-page "http://wenq.org/wqy2/")
479 (synopsis "CJK font")
481 "WenQuanYi Zen Hei is a Hei-Ti style (sans-serif type) Chinese outline
482 font. It is designed for general purpose text formatting and on-screen
483 display of Chinese characters and symbols from many other languages.
484 WenQuanYi Zen Hei provides a rather complete coverage to Chinese Hanzi glyphs,
485 including both simplified and traditional forms. The total glyph number in
486 this font is over 35,000, including over 21,000 Chinese Hanzi. This font has
487 full coverage to GBK(CP936) charset, CJK Unified Ideographs, as well as the
488 code-points needed for zh_cn, zh_sg, zh_tw, zh_hk, zh_mo, ja (Japanese) and
489 ko (Korean) locales for fontconfig.")
490 ;; GPLv2 with font embedding exception
491 (license license:gpl2)))
493 (define-public font-tex-gyre
495 (name "font-tex-gyre")
500 (uri (string-append "http://www.gust.org.pl/projects/e-foundry/"
501 "tex-gyre/whole/tg-" version "otf.zip"))
504 "0kph9l3g7jb2bpmxdbdg5zl56wacmnvdvsdn7is1gc750sqvsn31"))))
505 (build-system trivial-build-system)
507 `(#:modules ((guix build utils))
510 (use-modules (guix build utils))
512 (let ((unzip (string-append (assoc-ref %build-inputs "unzip")
514 (font-dir (string-append %output "/share/fonts/opentype")))
517 (assoc-ref %build-inputs "source")
521 (home-page "http://www.gust.org.pl/projects/e-foundry/tex-gyre/")
522 (synopsis "Remake of Ghostscript fonts")
523 (description "The TeX Gyre collection of fonts is the result of an
524 extensive remake and extension of the freely available base PostScript fonts
525 distributed with Ghostscript version 4.00. The collection contains the
526 following fonts in the OpenType format: Adventor, Bonum, Chorus, Cursor,
527 Heros, Pagella, Schola, Termes.")
528 (license license:gfl1.0)))
530 (define-public font-anonymous-pro
532 (name "font-anonymous-pro")
537 "http://www.marksimonson.com/assets/content/fonts/"
538 "AnonymousPro-" version ".zip"))
541 "1asj6lykvxh46czbal7ymy2k861zlcdqpz8x3s5bbpqwlm3mhrl6"))))
542 (build-system trivial-build-system)
544 `(#:modules ((guix build utils))
547 (use-modules (guix build utils))
548 (let ((unzip (string-append (assoc-ref %build-inputs "unzip")
550 (font-dir (string-append %output "/share/fonts/truetype"))
551 (doc-dir (string-append %output "/share/doc/" ,name)))
552 (system* unzip (assoc-ref %build-inputs "source"))
555 (chdir (string-append "AnonymousPro-" ,version ".001"))
556 (for-each (lambda (ttf)
558 (string-append font-dir "/" ttf)))
559 (find-files "." "\\.ttf$"))
560 (for-each (lambda (doc)
562 (string-append doc-dir "/" doc)))
563 (find-files "." "\\.txt$"))))))
566 (home-page "http://www.marksimonson.com/fonts/view/anonymous-pro")
567 (synopsis "Fixed-width fonts designed with coding in mind")
568 (description "Anonymous Pro is a family of four fixed-width fonts designed
569 with coding in mind. Anonymous Pro features an international, Unicode-based
570 character set, with support for most Western and Central European Latin-based
571 languages, plus Greek and Cyrillic.")
572 (license license:silofl1.1)))
574 (define-public font-gnu-unifont
576 (name "font-gnu-unifont")
581 "mirror://gnu/unifont/unifont-8.0.01/unifont-"
585 "176bzc2y3i49xavrmbyyz5lkqp0qq3bkj7rjrl197kib873by82b"))))
586 (build-system gnu-build-system)
587 (outputs '("out" ; TrueType version
588 "pcf" ; PCF (bitmap) version
589 "psf" ; PSF (console) version
590 "bin" ; Utilities to manipulate '.hex' format
593 '(#:parallel-build? #f ; parallel build fails
594 #:tests? #f ; no check target
596 (modify-phases %standard-phases
599 (setenv "CC" "gcc")))
602 (lambda* (#:key outputs #:allow-other-keys)
603 (let* ((ttf (string-append (assoc-ref outputs "out")
604 "/share/fonts/truetype"))
605 (pcf (string-append (assoc-ref outputs "pcf")
606 "/share/fonts/misc"))
607 (psf (string-append (assoc-ref outputs "psf")
608 "/share/consolefonts"))
609 (bin (assoc-ref outputs "bin")))
611 (string-append "PREFIX=" bin)
612 (string-append "TTFDEST=" ttf)
613 (string-append "PCFDEST=" pcf)
614 (string-append "CONSOLEDEST=" psf)
616 ;; Move Texinfo file to the right place.
617 (mkdir (string-append bin "/share/info"))
618 (rename-file (string-append bin "/share/unifont/unifont.info.gz")
619 (string-append bin "/share/info/unifont.info.gz"))
622 `(("perl" ,perl))) ; for utilities
624 "Large bitmap font covering Unicode's Basic Multilingual Plane")
626 "GNU Unifont is a bitmap font covering essentially all of
627 Unicode's Basic Multilingual Plane. The package also includes
628 utilities to ease adding new glyphs to the font.")
629 (home-page "http://unifoundry.com/unifont.html")
630 (license license:gpl2+)))