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>
10 ;;; This file is part of GNU Guix.
12 ;;; GNU Guix is free software; you can redistribute it and/or modify it
13 ;;; under the terms of the GNU General Public License as published by
14 ;;; the Free Software Foundation; either version 3 of the License, or (at
15 ;;; your option) any later version.
17 ;;; GNU Guix is distributed in the hope that it will be useful, but
18 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
19 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 ;;; GNU General Public License for more details.
22 ;;; You should have received a copy of the GNU General Public License
23 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
25 (define-module (gnu packages fonts)
26 #:use-module ((guix licenses) #:prefix license:)
27 #:use-module (guix packages)
28 #:use-module (guix download)
29 #:use-module (guix build-system gnu)
30 #:use-module (guix build-system trivial)
31 #:use-module (gnu packages base)
32 #:use-module (gnu packages compression)
33 #:use-module (gnu packages zip)
34 #:use-module (gnu packages perl)
35 #:use-module (gnu packages xorg)
36 #:use-module (gnu packages pkg-config))
38 (define-public font-inconsolata
40 (name "font-inconsolata")
44 (uri "http://www.levien.com/type/myfonts/Inconsolata.otf")
47 "06js6znbcf7swn8y3b8ki416bz96ay7d3yvddqnvi88lqhbfcq8m"))))
48 (build-system trivial-build-system)
50 `(#:modules ((guix build utils))
52 (use-modules (guix build utils))
53 (let ((font-dir (string-append %output
54 "/share/fonts/opentype"))
55 (source (assoc-ref %build-inputs "source")))
58 (string-append font-dir "/" "inconsolata.otf"))))))
59 (native-inputs `(("source" ,source)))
60 (home-page "http://levien.com/type/myfonts/inconsolata.html")
61 (synopsis "Monospace font")
62 (description "A monospace font, designed for code listings and the like,
63 in print. With attention to detail for high resolution rendering.")
64 (license license:silofl1.1)))
66 (define-public font-ubuntu
72 (uri (string-append "http://font.ubuntu.com/download/ubuntu-font-family-"
76 "0k4f548riq23gmw4zhn30qqkcpaj4g2ab5rbc3lflfxwkc4p0w8h"))))
77 (build-system trivial-build-system)
79 `(#:modules ((guix build utils))
81 (use-modules (guix build utils)
84 (let ((PATH (string-append (assoc-ref %build-inputs
87 (font-dir (string-append %output
88 "/share/fonts/truetype"))
89 (doc-dir (string-append %output "/share/doc/"
92 (system* "unzip" (assoc-ref %build-inputs "source"))
96 (chdir (string-append "ubuntu-font-family-" ,version))
97 (for-each (lambda (ttf)
99 (string-append font-dir "/" ttf)))
100 (find-files "." "\\.ttf$"))
101 (for-each (lambda (doc)
103 (string-append doc-dir "/" doc)))
104 (find-files "." "\\.txt$"))))))
105 (native-inputs `(("source" ,source)
107 (home-page "http://font.ubuntu.com/")
108 (synopsis "The Ubuntu Font Family")
109 (description "The Ubuntu Font Family is a unique, custom designed font
110 that has a very distinctive look and feel. This package provides the
111 TrueType (TTF) files.")
113 (license:non-copyleft
114 "http://font.ubuntu.com/ufl/ubuntu-font-licence-1.0.txt"
115 "Ubuntu Font License v1.0"))))
117 (define-public font-dejavu
123 (uri (string-append "mirror://sourceforge/dejavu/"
124 version "/dejavu-fonts-ttf-"
128 "0pgb0a3ngamidacmrvasg51ck3gp8gn93w6sf1s8snwzx4x2r9yh"))))
129 (build-system trivial-build-system)
131 `(#:modules ((guix build utils))
133 (use-modules (guix build utils))
135 (let ((tar (string-append (assoc-ref %build-inputs
138 (PATH (string-append (assoc-ref %build-inputs
141 (font-dir (string-append
142 %output "/share/fonts/truetype"))
143 (conf-dir (string-append
144 %output "/share/fontconfig/conf.avail"))
145 (doc-dir (string-append
146 %output "/share/doc/" ,name "-" ,version)))
148 (system* tar "xvf" (assoc-ref %build-inputs "source"))
153 (chdir (string-append "dejavu-fonts-ttf-" ,version))
154 (for-each (lambda (ttf)
156 (string-append font-dir "/"
158 (find-files "ttf" "\\.ttf$"))
159 (for-each (lambda (conf)
161 (string-append conf-dir "/"
163 (find-files "fontconfig" "\\.conf$"))
164 (for-each (lambda (doc)
166 (string-append doc-dir "/"
168 (find-files "." "\\.txt$|^[A-Z][A-Z]*$"))))))
169 (native-inputs `(("source" ,source)
172 (home-page "http://dejavu-fonts.org/")
173 (synopsis "Vera font family derivate with additional characters")
174 (description "DejaVu provides an expanded version of the Vera font family
175 aiming for quality and broader Unicode coverage while retaining the original
176 Vera style. DejaVu currently works towards conformance with the Multilingual
177 European Standards (MES-1 and MES-2) for Unicode coverage. The DejaVu fonts
178 provide serif, sans and monospaced variants.")
181 "http://dejavu-fonts.org/"))))
183 (define-public font-bitstream-vera
185 (name "font-bitstream-vera")
189 (uri (string-append "mirror://gnome/sources/ttf-bitstream-vera/"
190 version "/ttf-bitstream-vera-"
194 "1p3qs51x5327gnk71yq8cvmxc6wgx79sqxfvxcv80cdvgggjfnyv"))))
195 (build-system trivial-build-system)
197 `(#:modules ((guix build utils))
199 (use-modules (guix build utils)
202 (let ((tar (string-append (assoc-ref %build-inputs
205 (PATH (string-append (assoc-ref %build-inputs
208 (font-dir (string-append %output
209 "/share/fonts/truetype"))
210 (doc-dir (string-append %output "/share/doc/"
211 ,name "-" ,version)))
213 (system* tar "xvf" (assoc-ref %build-inputs "source"))
217 (chdir (string-append "ttf-bitstream-vera-" ,version))
218 (for-each (lambda (ttf)
220 (string-append font-dir "/" ttf)))
221 (find-files "." "\\.ttf$"))
222 (for-each (lambda (doc)
224 (string-append doc-dir "/" doc)))
225 (find-files "." "\\.TXT$"))))))
226 (native-inputs `(("source" ,source)
229 (home-page "http://www.gnome.org/fonts/")
230 (synopsis "Bitstream Vera sans-serif typeface")
231 (description "Vera is a sans-serif typeface from Bitstream, Inc. This
232 package provides the TrueType (TTF) files.")
235 "http://www.gnome.org/fonts/#Final_Bitstream_Vera_Fonts"))))
237 (define-public font-gnu-freefont-ttf
239 (name "font-gnu-freefont-ttf")
243 (uri (string-append "mirror://gnu/freefont/freefont-ttf-"
247 "1q3h5jp1mbdkinkwxy0lfd0a1q7azlbagraydlzaa2ng82836wg4"))))
248 (build-system trivial-build-system)
250 `(#:modules ((guix build utils))
252 (use-modules (guix build utils)
255 (let ((tar (string-append (assoc-ref %build-inputs
258 (PATH (string-append (assoc-ref %build-inputs
261 (font-dir (string-append %output
262 "/share/fonts/truetype"))
263 (doc-dir (string-append %output "/share/doc/"
264 ,name "-" ,version)))
266 (system* tar "xvf" (assoc-ref %build-inputs "source"))
270 (chdir (string-append "freefont-" ,version))
271 (for-each (lambda (file)
272 (let ((dir (if (string-suffix? "ttf" file)
276 (string-append dir "/" file))))
277 (find-files "." ""))))))
278 (native-inputs `(("source" ,source)
281 (home-page "http://www.gnu.org/software/freefont/")
282 (synopsis "Unicode-encoded outline fonts")
284 "The GNU Freefont project aims to provide a set of free outline
285 (PostScript Type0, TrueType, OpenType...) fonts covering the ISO
286 10646/Unicode UCS (Universal Character Set).")
287 (license license:gpl3+)))
289 (define-public font-liberation
291 (name "font-liberation")
295 (uri (string-append "https://fedorahosted.org/releases/l/i/"
296 "liberation-fonts/liberation-fonts-ttf-"
300 "010m4zfqan4w04b6bs9pm3gapn9hsb18bmwwgp2p6y6idj52g43q"))))
301 (build-system trivial-build-system)
303 `(#:modules ((guix build utils))
306 (use-modules (guix build utils))
308 (let ((tar (string-append (assoc-ref %build-inputs "tar")
310 (PATH (string-append (assoc-ref %build-inputs "gzip")
312 (font-dir (string-append %output "/share/fonts/truetype"))
313 (doc-dir (string-append %output "/share/doc/" ,name)))
315 (system* tar "xvf" (assoc-ref %build-inputs "source"))
318 (chdir (string-append "liberation-fonts-ttf-" ,version))
319 (for-each (lambda (ttf)
321 (string-append font-dir "/"
323 (find-files "." "\\.ttf$"))
324 (for-each (lambda (doc)
326 (string-append doc-dir "/"
328 '("AUTHORS" "ChangeLog" "LICENSE" "README" "TODO"))))))
333 (home-page "https://fedorahosted.org/liberation-fonts/")
335 "Fonts compatible with Arial, Times New Roman, and Courier New")
337 "The Liberation font family aims at metric compatibility with
338 Arial, Times New Roman, and Courier New.
340 There are three sets:
342 - Sans (a substitute for Arial, Albany, Helvetica, Nimbus Sans L, and
343 Bitstream Vera Sans);
345 - Serif (a substitute for Times New Roman, Thorndale, Nimbus Roman, and
346 Bitstream Vera Serif);
348 - Mono (a substitute for Courier New, Cumberland, Courier, Nimbus Mono L,
349 and Bitstream Vera Sans Mono).
351 The Liberation Fonts are sponsored by Red Hat.")
352 (license license:silofl1.1)))
354 (define-public font-terminus
356 (name "font-terminus")
362 "mirror://sourceforge/project/terminus-font/terminus-font-"
369 "1gzmn7zakvy6yrvmswyjfklnsvqrjm0imhq8rjws8rdkhqwkh21i"))))
370 (build-system gnu-build-system)
372 `(("pkg-config" ,pkg-config)
374 ("bdftopcf" ,bdftopcf)
375 ("font-util", font-util)
376 ("mkfontdir" ,mkfontdir)))
378 `(#:configure-flags (list
379 ;; install fonts into subdirectory of package output
380 ;; instead of font-util-?.?.?/share/fonts/X11
381 (string-append "--with-fontrootdir="
382 %output "/share/fonts/X11"))
383 #:tests? #f)) ;; No test target in tarball
384 (home-page "http://terminus-font.sourceforge.net/")
385 (synopsis "Simple bitmap programming font")
386 (description "Terminus Font is a clean, fixed width bitmap font, designed
387 for long (8 and more hours per day) work with computers.")
388 (license license:silofl1.1)))
390 (define-public font-adobe-source-han-sans
392 (name "font-adobe-source-han-sans")
397 "https://github.com/adobe-fonts/source-han-sans/archive/"
399 (file-name (string-append "source-han-sans-" version ".tar.gz"))
402 "0cwz3d8jancl0a7vbjxhnh1vgwsjba62lahfjya9yrjkp1ndxlap"))))
403 (outputs '("out" ; OpenType/CFF Collection (OTC), 119 MiB.
404 "cn" "jp" "kr" "tw")) ; Region-specific Subset OpenType/CFF.
405 (build-system trivial-build-system)
407 `(#:modules ((guix build utils))
410 (use-modules (guix build utils))
411 (let ((tar (string-append (assoc-ref %build-inputs
414 (PATH (string-append (assoc-ref %build-inputs
417 (install-opentype-fonts
418 (lambda (fonts-dir out)
419 (copy-recursively fonts-dir
420 (string-append (assoc-ref %outputs out)
421 "/share/fonts/opentype")))))
423 (system* tar "xvf" (assoc-ref %build-inputs "source"))
424 (chdir (string-append "source-han-sans-" ,version))
425 (install-opentype-fonts "OTC" "out")
426 (install-opentype-fonts "SubsetOTF/CN" "cn")
427 (install-opentype-fonts "SubsetOTF/JP" "jp")
428 (install-opentype-fonts "SubsetOTF/KR" "kr")
429 (install-opentype-fonts "SubsetOTF/TW" "tw")))))
433 (home-page "https://github.com/adobe-fonts/source-han-sans")
434 (synopsis "Pan-CJK fonts")
436 "Source Han Sans is a sans serif Pan-CJK font family that is offered in
437 seven weights: ExtraLight, Light, Normal, Regular, Medium, Bold, and Heavy.
438 And in several OpenType/CFF-based deployment configurations to accommodate
439 various system requirements or limitations. As the name suggests, Pan-CJK
440 fonts are intended to support the characters necessary to render or display
441 text in Simplified Chinese, Traditional Chinese, Japanese, and Korean.")
442 (license license:asl2.0)))
444 (define-public font-wqy-zenhei
446 (name "font-wqy-zenhei")
451 "mirror://sourceforge/wqy/wqy-zenhei-"
453 (file-name (string-append "wqy-zenhei-" version ".tar.gz"))
456 "1mkmxq8g2hjcglb3zajfqj20r4r88l78ymsp2xyl5yav8w3f7dz4"))))
457 (build-system trivial-build-system)
459 `(#:modules ((guix build utils))
462 (use-modules (guix build utils))
463 (let ((PATH (string-append (assoc-ref %build-inputs "tar") "/bin:"
464 (assoc-ref %build-inputs "gzip") "/bin"))
465 (font-dir (string-append (assoc-ref %outputs "out")
466 "/share/fonts/wenquanyi/")))
469 (system* "tar" "xvf" (assoc-ref %build-inputs "source"))
471 (copy-file "wqy-zenhei.ttc"
472 (string-append font-dir "wqy-zenhei.ttc"))))))
476 (home-page "http://wenq.org/wqy2/")
477 (synopsis "CJK font")
479 "WenQuanYi Zen Hei is a Hei-Ti style (sans-serif type) Chinese outline
480 font. It is designed for general purpose text formatting and on-screen
481 display of Chinese characters and symbols from many other languages.
482 WenQuanYi Zen Hei provides a rather complete coverage to Chinese Hanzi glyphs,
483 including both simplified and traditional forms. The total glyph number in
484 this font is over 35,000, including over 21,000 Chinese Hanzi. This font has
485 full coverage to GBK(CP936) charset, CJK Unified Ideographs, as well as the
486 code-points needed for zh_cn, zh_sg, zh_tw, zh_hk, zh_mo, ja (Japanese) and
487 ko (Korean) locales for fontconfig.")
488 ;; GPLv2 with font embedding exception
489 (license license:gpl2)))
491 (define-public font-tex-gyre
493 (name "font-tex-gyre")
498 (uri (string-append "http://www.gust.org.pl/projects/e-foundry/"
499 "tex-gyre/whole/tg-" version "otf.zip"))
502 "0kph9l3g7jb2bpmxdbdg5zl56wacmnvdvsdn7is1gc750sqvsn31"))))
503 (build-system trivial-build-system)
505 `(#:modules ((guix build utils))
508 (use-modules (guix build utils))
510 (let ((unzip (string-append (assoc-ref %build-inputs "unzip")
512 (font-dir (string-append %output "/share/fonts/opentype")))
515 (assoc-ref %build-inputs "source")
519 (home-page "http://www.gust.org.pl/projects/e-foundry/tex-gyre/")
520 (synopsis "Remake of Ghostscript fonts")
521 (description "The TeX Gyre collection of fonts is the result of an
522 extensive remake and extension of the freely available base PostScript fonts
523 distributed with Ghostscript version 4.00. The collection contains the
524 following fonts in the OpenType format: Adventor, Bonum, Chorus, Cursor,
525 Heros, Pagella, Schola, Termes.")
526 (license license:gfl1.0)))
528 (define-public font-anonymous-pro
530 (name "font-anonymous-pro")
535 "http://www.marksimonson.com/assets/content/fonts/"
536 "AnonymousPro-" version ".zip"))
539 "1asj6lykvxh46czbal7ymy2k861zlcdqpz8x3s5bbpqwlm3mhrl6"))))
540 (build-system trivial-build-system)
542 `(#:modules ((guix build utils))
545 (use-modules (guix build utils))
546 (let ((unzip (string-append (assoc-ref %build-inputs "unzip")
548 (font-dir (string-append %output "/share/fonts/truetype"))
549 (doc-dir (string-append %output "/share/doc/" ,name)))
550 (system* unzip (assoc-ref %build-inputs "source"))
553 (chdir (string-append "AnonymousPro-" ,version ".001"))
554 (for-each (lambda (ttf)
556 (string-append font-dir "/" ttf)))
557 (find-files "." "\\.ttf$"))
558 (for-each (lambda (doc)
560 (string-append doc-dir "/" doc)))
561 (find-files "." "\\.txt$"))))))
564 (home-page "http://www.marksimonson.com/fonts/view/anonymous-pro")
565 (synopsis "Fixed-width fonts designed with coding in mind")
566 (description "Anonymous Pro is a family of four fixed-width fonts designed
567 with coding in mind. Anonymous Pro features an international, Unicode-based
568 character set, with support for most Western and Central European Latin-based
569 languages, plus Greek and Cyrillic.")
570 (license license:silofl1.1)))
572 (define-public font-gnu-unifont
574 (name "font-gnu-unifont")
579 "mirror://gnu/unifont/unifont-8.0.01/unifont-"
583 "176bzc2y3i49xavrmbyyz5lkqp0qq3bkj7rjrl197kib873by82b"))))
584 (build-system gnu-build-system)
585 (outputs '("out" ; TrueType version
586 "pcf" ; PCF (bitmap) version
587 "psf" ; PSF (console) version
588 "bin" ; Utilities to manipulate '.hex' format
591 '(#:parallel-build? #f ; parallel build fails
592 #:tests? #f ; no check target
594 (modify-phases %standard-phases
597 (setenv "CC" "gcc")))
600 (lambda* (#:key outputs #:allow-other-keys)
601 (let* ((ttf (string-append (assoc-ref outputs "out")
602 "/share/fonts/truetype"))
603 (pcf (string-append (assoc-ref outputs "pcf")
604 "/share/fonts/misc"))
605 (psf (string-append (assoc-ref outputs "psf")
606 "/share/consolefonts"))
607 (bin (assoc-ref outputs "bin")))
609 (string-append "PREFIX=" bin)
610 (string-append "TTFDEST=" ttf)
611 (string-append "PCFDEST=" pcf)
612 (string-append "CONSOLEDEST=" psf)
614 ;; Move Texinfo file to the right place.
615 (mkdir (string-append bin "/share/info"))
616 (rename-file (string-append bin "/share/unifont/unifont.info.gz")
617 (string-append bin "/share/info/unifont.info.gz"))
620 `(("perl" ,perl))) ; for utilities
622 "Large bitmap font covering Unicode's Basic Multilingual Plane")
624 "GNU Unifont is a bitmap font covering essentially all of
625 Unicode's Basic Multilingual Plane. The package also includes
626 utilities to ease adding new glyphs to the font.")
627 (home-page "http://unifoundry.com/unifont.html")
628 (license license:gpl2+)))