13755dfd17ad92f862082ff746594ec2bf93c6bb
[jackhill/guix/guix.git] / gnu / packages / fonts.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2014, 2015, 2016, 2018, 2019 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, 2018 ng0 <ng0@n0.is>
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, 2017, 2018, 2019, 2020 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, 2018, 2019, 2020 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 <mail@brendan.scot>
22 ;;; Copyright © 2017, 2018, 2019 Arun Isaac <arunisaac@systemreboot.net>
23 ;;; Copyright © 2017 Mohammed Sadiq <sadiq@sadiqpk.org>
24 ;;; Copyright © 2018 Charlie Ritter <chewzerita@posteo.net>
25 ;;; Copyright © 2018 Gabriel Hondet <gabrielhondet@gmail.com>
26 ;;; Copyright © 2019 Jens Mølgaard <jens@zete.tk>
27 ;;; Copyright © 2019 Nicolas Goaziou <mail@nicolasgoaziou.fr>
28 ;;; Copyright © 2019 Baptiste Strazzulla <bstrazzull@hotmail.fr>
29 ;;; Copyright © 2019 Alva <alva@skogen.is>
30 ;;; Copyright © 2019 Alexandros Theodotou <alex@zrythm.org>
31 ;;; Copyright © 2020 Damien Cassou <damien@cassou.me>
32 ;;; Copyright © 2020 Amin Bandali <bandali@gnu.org>
33 ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
34 ;;;
35 ;;; This file is part of GNU Guix.
36 ;;;
37 ;;; GNU Guix is free software; you can redistribute it and/or modify it
38 ;;; under the terms of the GNU General Public License as published by
39 ;;; the Free Software Foundation; either version 3 of the License, or (at
40 ;;; your option) any later version.
41 ;;;
42 ;;; GNU Guix is distributed in the hope that it will be useful, but
43 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
44 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
45 ;;; GNU General Public License for more details.
46 ;;;
47 ;;; You should have received a copy of the GNU General Public License
48 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
49
50 (define-module (gnu packages fonts)
51 #:use-module (ice-9 regex)
52 #:use-module (guix utils)
53 #:use-module ((guix licenses) #:prefix license:)
54 #:use-module (guix packages)
55 #:use-module (guix download)
56 #:use-module (guix git-download)
57 #:use-module (guix build-system font)
58 #:use-module (guix build-system gnu)
59 #:use-module (guix build-system meson)
60 #:use-module (guix build-system trivial)
61 #:use-module (gnu packages base)
62 #:use-module (gnu packages compression)
63 #:use-module (gnu packages fontutils)
64 #:use-module (gnu packages gettext)
65 #:use-module (gnu packages glib)
66 #:use-module (gnu packages perl)
67 #:use-module (gnu packages pkg-config)
68 #:use-module (gnu packages python)
69 #:use-module (gnu packages xorg))
70
71 (define-public font-ibm-plex
72 (package
73 (name "font-ibm-plex")
74 (version "4.0.2")
75 (source (origin
76 (method url-fetch)
77 (uri (string-append
78 "https://github.com/IBM/plex/releases/download/"
79 "v" version "/OpenType.zip"))
80 (sha256
81 (base32
82 "17bd84ic7z9hkcjy4bwnh4z51bnkh2vrjzwvs9g6lwzmxjswa5b6"))))
83 (build-system font-build-system)
84 (home-page "https://github.com/IBM/plex")
85 (synopsis "IBM Plex typeface")
86 (description "This package provides the Plex font family. It comes in a
87 Sans, Serif, Mono and Sans Condensed, all with roman and true italics. The
88 fonts have been designed to work well in user interface (UI) environments as
89 well as other mediums.")
90 (license license:silofl1.1)))
91
92 (define-public font-inconsolata
93 (package
94 (name "font-inconsolata")
95 (version "3.000")
96 (source
97 (origin
98 (method url-fetch)
99 (uri (string-append "https://github.com/googlefonts/Inconsolata/"
100 "releases/download/v" version "/fonts_otf.zip"))
101 (sha256
102 (base32 "1wavvv86nwsqm5sbmnkv1bprj7l7zdrkxpvjy6w8yag93k6hrlx1"))))
103 (build-system font-build-system)
104 (home-page "https://levien.com/type/myfonts/inconsolata.html")
105 (synopsis "Monospace font")
106 (description "A monospace font, designed for code listings and the like,
107 in print. With attention to detail for high resolution rendering.")
108 (license license:silofl1.1)))
109
110 (define-public font-ubuntu
111 (package
112 (name "font-ubuntu")
113 (version "0.83")
114 (source (origin
115 (method git-fetch)
116 (uri (git-reference
117 (url "https://salsa.debian.org/fonts-team/fonts-ubuntu")
118 (commit (string-append "upstream/" version))))
119 (file-name (git-file-name name version))
120 (sha256
121 (base32
122 "1d2xrjpxy70f3nsgqiggwv6pj06qglf5vj2847pqx60w3ygi903g"))))
123 (build-system font-build-system)
124 (home-page "http://font.ubuntu.com/")
125 (synopsis "The Ubuntu Font Family")
126 (description "The Ubuntu Font Family is a unique, custom designed font
127 that has a very distinctive look and feel. This package provides the
128 TrueType (TTF) files.")
129 (license
130 (license:non-copyleft
131 "http://font.ubuntu.com/ufl/ubuntu-font-licence-1.0.txt"
132 "Ubuntu Font License v1.0"))))
133
134 (define-public font-dejavu
135 (package
136 (name "font-dejavu")
137 (version "2.37")
138 (source (origin
139 (method url-fetch)
140 (uri (string-append "mirror://sourceforge/dejavu/dejavu/"
141 version "/dejavu-fonts-ttf-"
142 version ".tar.bz2"))
143 (sha256
144 (base32
145 "1mqpds24wfs5cmfhj57fsfs07mji2z8812i5c4pi5pbi738s977s"))))
146 (build-system font-build-system)
147 (arguments
148 `(#:phases
149 (modify-phases %standard-phases
150 (add-after 'install 'install-conf
151 (lambda* (#:key outputs #:allow-other-keys)
152 (let ((conf-dir (string-append (assoc-ref outputs "out")
153 "/share/fontconfig/conf.avail")))
154 (copy-recursively "fontconfig" conf-dir)
155 #t))))))
156 (home-page "https://dejavu-fonts.github.io/")
157 (synopsis "Vera font family derivate with additional characters")
158 (description "DejaVu provides an expanded version of the Vera font family
159 aiming for quality and broader Unicode coverage while retaining the original
160 Vera style. DejaVu currently works towards conformance to the Multilingual
161 European Standards (MES-1 and MES-2) for Unicode coverage. The DejaVu fonts
162 provide serif, sans and monospaced variants.")
163 (license
164 (license:x11-style
165 "http://dejavu-fonts.org/"))))
166
167 (define-public font-bitstream-vera
168 (package
169 (name "font-bitstream-vera")
170 (version "1.10")
171 (source (origin
172 (method url-fetch)
173 (uri (string-append "mirror://gnome/sources/ttf-bitstream-vera/"
174 version "/ttf-bitstream-vera-"
175 version ".tar.bz2"))
176 (sha256
177 (base32
178 "1p3qs51x5327gnk71yq8cvmxc6wgx79sqxfvxcv80cdvgggjfnyv"))))
179 (build-system font-build-system)
180 (home-page "https://www.gnome.org/fonts/")
181 (synopsis "Bitstream Vera sans-serif typeface")
182 (description "Vera is a sans-serif typeface from Bitstream, Inc. This
183 package provides the TrueType (TTF) files.")
184 (license
185 (license:fsdg-compatible
186 "https://www.gnome.org/fonts/#Final_Bitstream_Vera_Fonts"
187 "The Font Software may be sold as part of a larger software package but
188 no copy of one or more of the Font Software typefaces may be sold by
189 itself."))))
190
191 (define-public font-cantarell
192 (package
193 (name "font-abattis-cantarell")
194 (version "0.111")
195 (source (origin
196 (method url-fetch)
197 (uri (string-append "mirror://gnome/sources/cantarell-fonts/"
198 (version-major+minor version)
199 "/cantarell-fonts-" version ".tar.xz"))
200 (sha256
201 (base32
202 "05hpnhihwm9sxlq1qn993g03pwkmpjbn0dvnba71r1gfjv0jp2w5"))))
203 (build-system meson-build-system)
204 (native-inputs
205 `(("appstream-glib" ,appstream-glib)
206 ("gettext" ,gettext-minimal))) ;for msgfmt
207 (home-page "https://wiki.gnome.org/Projects/CantarellFonts")
208 (synopsis "Cantarell sans-serif typeface")
209 (description "The Cantarell font family is a contemporary Humanist
210 sans-serif designed for on-screen reading. It is used by GNOME@tie{}3.")
211 (license license:silofl1.1)))
212
213 (define-public font-lato
214 (package
215 (name "font-lato")
216 (version "2.015") ; also update description
217 (source (origin
218 (method url-fetch/zipbomb)
219 (uri (string-append "https://www.latofonts.com/download/Lato2OFL.zip"))
220 (sha256
221 (base32
222 "1f5540g0ja1nx3ddd3ywn77xc81ssrxpq8n3gyb9sabyq2b4xda2"))))
223 (build-system font-build-system)
224 (home-page "https://www.latofonts.com/lato-free-fonts/")
225 (synopsis "Lato sans-serif typeface")
226 (description
227 "Lato is a sanserif typeface family. It covers over 3000 glyphs per style.
228 The Lato 2.010 family supports more than 100 Latin-based languages, over
229 50 Cyrillic-based languages as well as Greek and IPA phonetics.")
230 (license license:silofl1.1)))
231
232 (define-public font-gnu-freefont-ttf
233 (package
234 (name "font-gnu-freefont-ttf")
235 (version "20120503")
236 (source (origin
237 (method url-fetch)
238 (uri (string-append "mirror://gnu/freefont/freefont-src-"
239 version ".tar.gz"))
240 (sha256
241 (base32
242 "0yk58blhcd4hm7nyincmqq4jrzjjk82wif2zmk1l3y2m4vif4qhd"))))
243 (build-system gnu-build-system)
244 (arguments
245 `(#:phases (modify-phases %standard-phases
246 (delete 'configure)
247 (replace 'install
248 (lambda _
249 (let ((doc-dir (string-append %output "/share/doc/"
250 ,name "-" ,version))
251 (font-dir (string-append %output
252 "/share/fonts/truetype")))
253 (mkdir-p doc-dir)
254 (substitute* "Makefile"
255 (("\\$\\(TMPDIR\\)") doc-dir)
256 (("sfd/\\*.ttf") ""))
257 (system* "make" "ttftar")
258 (mkdir-p font-dir)
259 (for-each (lambda (file)
260 (install-file file font-dir))
261 (filter
262 (lambda (file) (string-suffix? "ttf" file))
263 (find-files "." "")))))))
264 #:test-target "tests"))
265 ;; replace python 3 with python 2
266 ;; python 3 support commits aren't yet released in 20120503
267 ;; so freefont needs python 2 support in fontforge
268 (native-inputs `(("fontforge" ,(package (inherit fontforge)
269 (inputs `(("python-2" ,python-2)
270 ,@(package-inputs fontforge)))))))
271 (home-page "https://www.gnu.org/software/freefont/")
272 (synopsis "Unicode-encoded outline fonts")
273 (description
274 "The GNU Freefont project aims to provide a set of free outline
275 (PostScript Type0, TrueType, OpenType...) fonts covering the ISO
276 10646/Unicode UCS (Universal Character Set).")
277 (license license:gpl3+)
278 (properties '((upstream-name . "freefont")
279 (ftp-directory . "/gnu/freefont")))))
280
281 (define-public font-liberation
282 (package
283 (name "font-liberation")
284 (version "2.00.5")
285 (source
286 (origin
287 (method url-fetch)
288 (uri (string-append "https://github.com/liberationfonts/liberation-fonts/"
289 "files/2926169/liberation-fonts-ttf-" version ".tar.gz"))
290 (sha256
291 (base32 "0kdjsbf0y716k1kv0i0ixdpvg7b9b8xkcsg6favaxdc7pshg0kzi"))))
292 (build-system font-build-system)
293 (home-page "https://github.com/liberationfonts")
294 (synopsis "Fonts compatible with Arial, Times New Roman, and Courier New")
295 (description
296 "The Liberation font family aims at metric compatibility with
297 Arial, Times New Roman, and Courier New.
298 There are three sets:
299
300 @enumerate
301 @item Sans (a substitute for Arial, Albany, Helvetica, Nimbus Sans L, and
302 Bitstream Vera Sans);
303 @item Serif (a substitute for Times New Roman, Thorndale, Nimbus Roman, and
304 Bitstream Vera Serif);
305 @item Mono (a substitute for Courier New, Cumberland, Courier, Nimbus Mono L,
306 and Bitstream Vera Sans Mono).
307 @end enumerate
308
309 The Liberation Fonts are sponsored by Red Hat.")
310 (license license:silofl1.1)))
311
312 (define-public font-linuxlibertine
313 (package
314 (name "font-linuxlibertine")
315 (version "5.3.0")
316 (source (origin
317 (method url-fetch/tarbomb)
318 (uri (string-append "mirror://sourceforge/linuxlibertine/"
319 "linuxlibertine/" version
320 "/LinLibertineSRC_" version "_2012_07_02.tgz"))
321 (sha256
322 (base32
323 "0x7cz6hvhpil1rh03rax9zsfzm54bh7r4bbrq8rz673gl9h47v0v"))))
324 (build-system font-build-system)
325 (arguments
326 `(#:phases
327 (modify-phases %standard-phases
328 (add-before 'install 'build
329 (lambda _
330 (let ((compile
331 (lambda (name ext)
332 (invoke
333 "fontforge" "-lang=ff"
334 "-c" (string-append "Open('" name "');"
335 "Generate('"
336 (basename name "sfd") ext
337 "')")))))
338 (for-each (lambda (name)
339 (and (compile name "ttf")
340 (compile name "otf")))
341 (find-files "." "\\.sfd$"))
342 #t))))))
343 (native-inputs
344 `(("fontforge" ,fontforge)))
345 (home-page "http://www.linuxlibertine.org/")
346 (synopsis "Serif and sans serif typefaces")
347 (description "The Linux Libertine fonts is a set of typefaces containing
348 both a Serif version (\"Linux Libertine\") and a Sans Serif (\"Linux
349 Biolinum\") designed to be used together as an alternative for Times/Times New
350 Roman and Helvetica/Arial. The Serif typeface comes in two shapes and two
351 weights, and with a Small Capitals version of the regular typeface. Linux
352 Biolinum is available in both Regular and Bold weights.")
353 ;; The fonts are released under either of these licenses.
354 (license (list license:gpl2+ license:silofl1.1))))
355
356 (define-public font-terminus
357 (package
358 (name "font-terminus")
359 (version "4.48")
360 (source
361 (origin
362 (method url-fetch)
363 (uri (string-append "mirror://sourceforge/terminus-font/terminus-font-"
364 version "/terminus-font-" version ".tar.gz"))
365 (sha256
366 (base32 "1bwlkj39rqbyq57v5yssayav6hzv1n11b9ml2s0dpiyfsn6rqy9l"))))
367 (build-system gnu-build-system)
368 (outputs (list "out" "pcf-8bit"))
369 (arguments
370 `(#:tests? #f ; no test target in tarball
371 #:phases
372 (modify-phases %standard-phases
373 (add-after 'build 'build-more-bits
374 ;; X11 8-bit code pages aren't installed by default (they were
375 ;; until version 4.46). Build and install them separately.
376 (lambda* (#:key make-flags #:allow-other-keys)
377 (apply invoke "make" "pcf-8bit" make-flags)))
378 (add-after 'install 'install-more-bits
379 (lambda* (#:key make-flags outputs #:allow-other-keys)
380 (let ((pcf-8bit (assoc-ref outputs "pcf-8bit")))
381 (apply invoke "make" "install-pcf-8bit" (string-append "prefix="
382 pcf-8bit)
383 make-flags)))))))
384 (native-inputs
385 `(("bdftopcf" ,bdftopcf)
386 ("font-util" ,font-util)
387 ("mkfontdir" ,mkfontdir)
388 ("pkg-config" ,pkg-config)
389 ("python" ,python)))
390 (home-page "http://terminus-font.sourceforge.net/")
391 (synopsis "Simple bitmap programming font")
392 (description "Terminus Font is a clean, fixed-width bitmap font, designed
393 for long periods of working with computers (8 or more hours per day).")
394 (license license:silofl1.1)))
395
396 (define-public font-adobe-source-han-sans
397 (package
398 (name "font-adobe-source-han-sans")
399 (version "1.004")
400 (source (origin
401 (method git-fetch)
402 (uri (git-reference
403 (url "https://github.com/adobe-fonts/source-han-sans.git")
404 (commit (string-append version "R"))))
405 (file-name (git-file-name name version))
406 (sha256
407 (base32
408 "0zm884d8fp5gvirq324050kqv7am9khyqhs9kk4r4rr3jzn61jpk"))))
409 (outputs '("out" ; OpenType/CFF Collection (OTC), 121 MiB.
410 "cn" "jp" "kr" "tw")) ; Region-specific Subset OpenType/CFF.
411 (build-system trivial-build-system)
412 (arguments
413 `(#:modules ((guix build utils))
414 #:builder
415 (begin
416 (use-modules (guix build utils))
417 (let ((install-opentype-fonts
418 (lambda (fonts-dir out)
419 (copy-recursively fonts-dir
420 (string-append (assoc-ref %outputs out)
421 "/share/fonts/opentype")))))
422 (chdir (assoc-ref %build-inputs "source"))
423 (install-opentype-fonts "OTC" "out")
424 (install-opentype-fonts "SubsetOTF/CN" "cn")
425 (install-opentype-fonts "SubsetOTF/JP" "jp")
426 (install-opentype-fonts "SubsetOTF/KR" "kr")
427 (install-opentype-fonts "SubsetOTF/TW" "tw")
428 (for-each delete-file (find-files %output "\\.zip$"))
429 #t))))
430 (home-page "https://github.com/adobe-fonts/source-han-sans")
431 (synopsis "Pan-CJK fonts")
432 (description
433 "Source Han Sans is a sans serif Pan-CJK font family that is offered in
434 seven weights: ExtraLight, Light, Normal, Regular, Medium, Bold, and Heavy.
435 And in several OpenType/CFF-based deployment configurations to accommodate
436 various system requirements or limitations. As the name suggests, Pan-CJK
437 fonts are intended to support the characters necessary to render or display
438 text in Simplified Chinese, Traditional Chinese, Japanese, and Korean.")
439 (license license:silofl1.1)))
440
441 (define-public font-cns11643
442 ;; Since upstream doesn't provide any version numbers, the date of the last
443 ;; edit is used, taken from https://data.gov.tw/dataset/5961
444 ;; XXX: The source is also updated in-place, so it may be desirable to mirror
445 ;; it elsewhere to avoid suddenly losing the current source file.
446 (package
447 (name "font-cns11643")
448 (version "98.1.20180605")
449 (source (origin
450 (method url-fetch)
451 (uri "http://www.cns11643.gov.tw/AIDB/Open_Data.zip")
452 (sha256
453 (base32
454 "000a9whrjr1cd4pjc23pbl60zwkq3wcb5g61p9qi7fn3hwkp0kyw"))))
455 (build-system font-build-system)
456 (home-page "http://www.cns11643.gov.tw/AIDB/welcome.do")
457 (synopsis "CJK TrueType fonts, TW-Kai and TW-Sung")
458 (description
459 "@code{CNS 11643} character set (Chinese National Standard, or Chinese
460 Standard Interchange Code) is the standard character set of the Republic of
461 China (Taiwan) for Chinese Characters and other Unicode symbols. Contained
462 are six TrueType fonts based on two script styles, Regular script (Kai), and
463 Sung/Ming script, each with three variants:
464
465 @itemize
466 @item @code{CNS 11643} (@code{TW-Kai} and @code{TW-Sung}): Tens of thousands
467 of CJK characters from frequency tables published by the Taiwanese
468 Ministry of Education. ISO 10646 and Unicode compatible encoding.
469 @item @code{Big-5 Plus}: Several thousand frequently used CJK characters
470 encoded in the user defined area of the Big-5 code.
471 @item @code{Big-5 Extended}: A Big-5 character set based on the
472 @code{Big-5 Plus} and @code{CNS 11643} character sets.
473 @end itemize\n")
474 (license (license:non-copyleft
475 "http://data.gov.tw/license")))) ; CC-BY 4.0 compatible
476
477 (define-public font-cns11643-swjz
478 (package
479 (name "font-cns11643-swjz")
480 (version "1")
481 (source
482 (origin
483 (method url-fetch)
484 (uri "https://www.moedict.tw/fonts/truetype/cns11643/ebas927.ttf")
485 (sha256
486 (base32
487 "1qkljldbmb53zp1rcmpsb8rzy67rnsqcjxi549m9743ifk4isl78"))))
488 (build-system font-build-system)
489 (home-page
490 (string-append "http://www.cns11643.gov.tw/AIDB/download.do"
491 "?name=%E5%AD%97%E5%9E%8B%E4%B8%8B%E8%BC%89"))
492 (synopsis "TrueType seal script font")
493 (description
494 "@code{Shuowen Jiezi} is a TrueType seal script font based on the ancient
495 text of the same name published by the Executive Yuan of Taiwan. 6721 glyphs
496 are included, at Unicode compatible code points corresponding to their modern
497 variants.")
498 ;; Original text only available in Chinese. More info at
499 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=26703#11
500 (license (license:non-copyleft
501 "http://www.cns11643.gov.tw/AIDB/copyright.do"))))
502
503 (define-public font-wqy-zenhei
504 (package
505 (name "font-wqy-zenhei")
506 (version "0.9.45")
507 (source (origin
508 (method url-fetch)
509 (uri (string-append
510 "mirror://sourceforge/wqy/wqy-zenhei/" version
511 "%20%28Fighting-state%20RC1%29/wqy-zenhei-"
512 version ".tar.gz"))
513 (sha256
514 (base32
515 "1mkmxq8g2hjcglb3zajfqj20r4r88l78ymsp2xyl5yav8w3f7dz4"))))
516 (build-system font-build-system)
517 (home-page "http://wenq.org/wqy2/")
518 (synopsis "CJK font")
519 (description
520 "WenQuanYi Zen Hei is a Hei-Ti style (sans-serif type) Chinese outline
521 font. It is designed for general purpose text formatting and on-screen
522 display of Chinese characters and symbols from many other languages.
523 WenQuanYi Zen Hei provides a rather complete coverage of Chinese Hanzi glyphs,
524 including both simplified and traditional forms. The total glyph number in
525 this font is over 35,000, including over 21,000 Chinese Hanzi. This font has
526 full coverage of the GBK (CP936) charset, CJK Unified Ideographs, as well as
527 the code-points needed for zh_cn, zh_sg, zh_tw, zh_hk, zh_mo, ja (Japanese) and
528 ko (Korean) locales for @code{fontconfig}.")
529 ;; GPLv2 with font embedding exception.
530 (license license:gpl2)))
531
532 (define-public font-wqy-microhei
533 (package
534 (name "font-wqy-microhei")
535 (version "0.2.0-beta")
536 (source (origin
537 (method url-fetch)
538 (uri (string-append "mirror://sourceforge/wqy/wqy-microhei/"
539 version "/wqy-microhei-" version ".tar.gz"))
540 (sha256
541 (base32
542 "0gi1yxqph8xx869ichpzzxvx6y50wda5hi77lrpacdma4f0aq0i8"))))
543 (build-system font-build-system)
544 (home-page "http://wenq.org/wqy2/")
545 (synopsis "CJK font")
546 (description
547 "WenQuanYi Micro Hei is a Sans-Serif style (also known as Hei, Gothic or
548 Dotum among the Chinese/Japanese/Korean users) high quality CJK outline font.
549 It was derived from \"Droid Sans Fallback\" and \"Droid Sans\" released by
550 Google Inc. This font contains all the unified CJK Han glyphs in the range of
551 U+4E00-U+9FC3 defined in Unicode Standard 5.1, together with many other
552 languages unicode blocks, including Latins, Extended Latins, Hanguls and
553 Kanas. The font file is extremely compact (~4M) compared with most known CJK
554 fonts.")
555 ;; This font is licensed under Apache2.0 or GPLv3 with font embedding
556 ;; exceptions.
557 (license license:gpl3)))
558
559 (define-public font-rachana
560 (package
561 (name "font-rachana")
562 (version "7.0.3")
563 (source
564 (origin
565 (method url-fetch)
566 (uri (string-append
567 "https://gitlab.com/smc/rachana/repository/archive.tar.gz?ref=Version"
568 version))
569 (file-name (string-append name "-" version ".tar.gz"))
570 (sha256
571 (base32 "17w7n2dxl0a98wrgfmdx5sars4dd3dy5krrz57fv28867zcij8ac"))))
572 (build-system font-build-system)
573 (home-page "https://smc.org.in")
574 (synopsis "Malayalam font")
575 (description
576 "Rachana is a Malayalam font designed by Hussain K H. The project was
577 part of Rachana Aksharavedi for the original script of Malayalam in computing.
578 Rachana has about 1,200+ glyphs for Malayalam and contains glyphs required for
579 printing old Malayalam books without compromising the writing style.")
580 ;; This font is licensed under SIL 1.1 or GPLv3+ with font embedding
581 ;; exceptions.
582 (license (list license:silofl1.1 license:gpl3+))))
583
584 (define-public font-tex-gyre
585 (package
586 (name "font-tex-gyre")
587 (version "2.005")
588 (source
589 (origin
590 (method url-fetch/zipbomb)
591 (uri (string-append "http://www.gust.org.pl/projects/e-foundry/"
592 "tex-gyre/whole/tg-" version "otf.zip"))
593 (sha256
594 (base32
595 "0kph9l3g7jb2bpmxdbdg5zl56wacmnvdvsdn7is1gc750sqvsn31"))))
596 (build-system font-build-system)
597 (home-page "http://www.gust.org.pl/projects/e-foundry/tex-gyre/")
598 (synopsis "Remake of Ghostscript fonts")
599 (description "The TeX Gyre collection of fonts is the result of an
600 extensive remake and extension of the freely available base PostScript fonts
601 distributed with Ghostscript version 4.00. The collection contains the
602 following fonts in the OpenType format: Adventor, Bonum, Chorus, Cursor,
603 Heros, Pagella, Schola, Termes.")
604 (license license:gfl1.0)))
605
606 (define-public font-anonymous-pro
607 (package
608 (name "font-anonymous-pro")
609 (version "1.002")
610 (source (origin
611 (method url-fetch)
612 (uri (string-append
613 "https://www.marksimonson.com/assets/content/fonts/"
614 "AnonymousPro-" version ".zip"))
615 (sha256
616 (base32
617 "1asj6lykvxh46czbal7ymy2k861zlcdqpz8x3s5bbpqwlm3mhrl6"))))
618 (build-system font-build-system)
619 (home-page "https://www.marksimonson.com/fonts/view/anonymous-pro")
620 (synopsis "Fixed-width fonts designed with coding in mind")
621 (description "Anonymous Pro is a family of four fixed-width fonts designed
622 with coding in mind. Anonymous Pro features an international, Unicode-based
623 character set, with support for most Western and Central European Latin-based
624 languages, plus Greek and Cyrillic.")
625 (license license:silofl1.1)))
626
627 (define-public font-anonymous-pro-minus
628 (package
629 (inherit font-anonymous-pro)
630 (name "font-anonymous-pro-minus")
631 ;; The -Minus variant doesn't necessarily track the regular version above.
632 (version "1.003")
633 (source
634 (origin
635 (method url-fetch)
636 (uri (string-append "https://www.marksimonson.com/assets/content/fonts/"
637 "AnonymousProMinus-" version ".zip"))
638 (sha256
639 (base32 "1p2n91jja37d2cshp5pjwld9lq0v7gnpk7ywwn2blq7k46q6vq38"))))
640 (synopsis "Fixed-width fonts designed with coding in mind, without bitmaps")
641 (description "Anonymous Pro is a family of four fixed-width fonts designed
642 with coding in mind. Anonymous Pro features an international, Unicode-based
643 character set, with support for most Western and Central European Latin-based
644 languages, plus Greek and Cyrillic.
645
646 Anonymous Pro Minus is identical to Anonymous Pro, minus its embedded bitmaps
647 for use at smaller text sizes")))
648
649 (define-public font-gnu-unifont
650 (package
651 (name "font-gnu-unifont")
652 (version "12.1.04")
653 (source
654 (origin
655 (method url-fetch)
656 (uri (list
657 (string-append "http://unifoundry.com/pub/unifont/unifont-"
658 version "/unifont-" version ".tar.gz")
659 (string-append "mirror://gnu/unifont/unifont-"
660 version "/unifont-" version ".tar.gz")))
661 (sha256
662 (base32 "1h5dyhg4j8sh4qpbwnsn34igb8mfapz5b3nf4k71hq1c5z3j0mcv"))))
663 (build-system gnu-build-system)
664 (outputs '("out" ; TrueType version
665 "pcf" ; PCF (bitmap) version
666 "psf" ; PSF (console) version
667 "bin")) ; Utilities to manipulate '.hex' format
668 (arguments
669 '(#:tests? #f ; no check target
670 #:phases
671 (modify-phases %standard-phases
672 (replace
673 'configure
674 (lambda _ (setenv "CC" "gcc") #t))
675 (replace
676 'install
677 (lambda* (#:key outputs #:allow-other-keys)
678 (let* ((ttf (string-append (assoc-ref outputs "out")
679 "/share/fonts/truetype"))
680 (pcf (string-append (assoc-ref outputs "pcf")
681 "/share/fonts/misc"))
682 (psf (string-append (assoc-ref outputs "psf")
683 "/share/consolefonts"))
684 (bin (assoc-ref outputs "bin")))
685 (invoke "make"
686 (string-append "PREFIX=" bin)
687 (string-append "TTFDEST=" ttf)
688 (string-append "PCFDEST=" pcf)
689 (string-append "CONSOLEDEST=" psf)
690 "install")
691 ;; Move Texinfo file to the right place.
692 (mkdir (string-append bin "/share/info"))
693 (invoke "gzip" "-9n" "doc/unifont.info")
694 (install-file "doc/unifont.info.gz"
695 (string-append bin "/share/info"))
696 #t))))))
697 (inputs
698 `(("perl" ,perl))) ; for utilities
699 (synopsis
700 "Large bitmap font covering Unicode's Basic Multilingual Plane")
701 (description
702 "GNU Unifont is a bitmap font covering essentially all of
703 Unicode's Basic Multilingual Plane. The package also includes
704 utilities to ease adding new glyphs to the font.")
705 (home-page "http://unifoundry.com/unifont.html")
706 (properties '((upstream-name . "unifont")))
707 (license license:gpl2+)))
708
709 (define-public font-google-noto
710 (package
711 (name "font-google-noto")
712 (version "20171025")
713 (source
714 (origin
715 (method url-fetch/zipbomb)
716 (uri (string-append "https://noto-website-2.storage.googleapis.com/"
717 "pkgs/Noto-hinted.zip"))
718 (file-name (string-append name "-" version ".zip"))
719 (sha256
720 (base32 "1bp42whyin7xcgmrbnfvz3rvd98xmxaz3ywqybbjmqzwaa9llyw3"))))
721 (build-system font-build-system)
722 (home-page "https://www.google.com/get/noto/")
723 (synopsis "Fonts to cover all languages")
724 (description "Google Noto Fonts is a family of fonts designed to support
725 all languages with a consistent look and aesthetic. Its goal is to properly
726 display all Unicode symbols.")
727 (license license:silofl1.1)))
728
729 (define-public font-google-roboto
730 (package
731 (name "font-google-roboto")
732 (version "2.136")
733 (source
734 (origin
735 (method url-fetch)
736 (uri (string-append "https://github.com/google/roboto/releases/download/"
737 "v" version "/roboto-hinted.zip"))
738 (file-name (string-append name "-" version ".zip"))
739 (sha256
740 (base32
741 "0spscx08fad7i8qs7icns96iwcapniq8lwwqqvbf7bamvs8qfln4"))))
742 (build-system font-build-system)
743 (home-page "https://github.com/google/roboto")
744 (synopsis "The Roboto family of fonts")
745 (description
746 "Roboto is Google’s signature family of fonts, the default font on Android
747 and Chrome OS, and the recommended font for the
748 visual language \"Material Design\".")
749 (license license:asl2.0)))
750
751 (define-public font-un
752 (package
753 (name "font-un")
754 (version "1.0.2-080608")
755 (source (origin
756 (method url-fetch)
757 (uri (string-append
758 "https://kldp.net/unfonts/release/2607-"
759 "un-fonts-core-" version ".tar.gz"))
760 (file-name (string-append name "-" version ".tar.gz"))
761 (sha256
762 (base32
763 "13liaz2pmww3aqabm55la5npd08m1skh334ky7qfidxaz5s742iv"))))
764 (build-system font-build-system)
765 (home-page "https://kldp.net/projects/unfonts/")
766 (synopsis "Collection of Korean fonts")
767 (description
768 "Un-fonts is a family of mainly Korean fonts.
769 It contains the following fonts and styles:
770
771 @enumerate
772 @item UnBatang, UnBatangBold: serif;
773 @item UnDotum, UnDotumBold: sans-serif;
774 @item UnGraphic, UnGraphicBold: sans-serif style;
775 @item UnDinaru, UnDinaruBold, UnDinaruLight;
776 @item UnPilgi, UnPilgiBold: script;
777 @item UnGungseo: cursive, brush-stroke.
778 @end enumerate\n")
779 (license license:gpl2+)))
780
781 (define-public font-fantasque-sans
782 (package
783 (name "font-fantasque-sans")
784 (version "1.8.0")
785 (source
786 (origin
787 (method git-fetch)
788 (uri (git-reference
789 (url "https://github.com/belluzj/fantasque-sans.git")
790 (commit (string-append "v" version))))
791 (file-name (git-file-name name version))
792 (sha256
793 (base32 "17l18488qyl9gdj80r8pcym3gp3jkgsdikwalnrp5rgvwidqx507"))))
794 (build-system gnu-build-system)
795 (native-inputs
796 `(("ttfautohint" ,ttfautohint)
797 ("woff-tools" ,woff-tools)
798 ("fontforge" ,fontforge)
799 ("woff2" ,woff2)
800 ("zip" ,zip)))
801 (arguments
802 `(#:tests? #f ;test target intended for visual inspection
803 #:phases (modify-phases %standard-phases
804 (delete 'configure) ;no configuration
805 (add-before 'build 'support-python@3
806 ;; Rather than use a Python 2 fontforge, replace Python-2-
807 ;; specific code with a passable Python 3 equivalent.
808 (lambda _
809 (substitute* "Scripts/fontbuilder.py"
810 (("xrange") "range"))
811 (substitute* "Scripts/features.py"
812 (("f\\.write\\(fea_code\\)")
813 "f.write(str.encode(fea_code))"))
814 #t))
815 (replace 'install
816 ;; 'make install' wants to install to ~/.fonts, install to
817 ;; output instead. Install only the "Normal" variant.
818 (lambda* (#:key outputs #:allow-other-keys)
819 (let* ((out (assoc-ref outputs "out"))
820 (font-dir (string-append out "/share/fonts"))
821 (truetype-dir (string-append font-dir "/truetype"))
822 (opentype-dir (string-append font-dir "/opentype"))
823 (webfonts-dir (string-append font-dir "/webfonts")))
824 (with-directory-excursion "Variants/Normal"
825 (copy-recursively "OTF" opentype-dir)
826 (for-each (lambda (f) (install-file f truetype-dir))
827 (find-files "." "\\.ttf$"))
828 (copy-recursively "Webfonts" webfonts-dir)
829 #t)))))))
830 (synopsis "Font family with a monospaced variant for programmers")
831 (description
832 "Fantasque Sans Mono is a programming font designed with functionality in
833 mind. The font includes a bold version and a good italic version with new
834 glyph designs, not just an added slant.")
835 (home-page "https://fontlibrary.org/en/font/fantasque-sans-mono")
836 (license license:silofl1.1)))
837
838 (define-public font-hack
839 (package
840 (name "font-hack")
841 (version "3.003")
842 (source (origin
843 (method url-fetch/zipbomb)
844 (uri (string-append
845 "https://github.com/source-foundry/Hack/releases/download/v"
846 version "/Hack-v" version "-ttf.zip"))
847 (sha256
848 (base32
849 "1b4hh8zkrx92m2v2vfkja1napb0192p0j3laqr0m018z3dih89hc"))))
850 (build-system font-build-system)
851 (home-page "https://sourcefoundry.org/hack/")
852 (synopsis "Typeface designed for source code")
853 (description
854 "Hack is designed to be a workhorse typeface for code. It expands upon
855 the Bitstream Vera & DejaVu projects, provides over 1,500 glyphs, and includes
856 Powerline support.")
857 (license
858 ;; See https://github.com/source-foundry/Hack/issues/271 for details.
859 (list license:expat ; the Hack modifications to...
860 license:public-domain ; ...the DejaVu modifications to...
861 (license:x11-style ; ...the Bitstream Vera typeface
862 "file://LICENSE.md" "Bitstream Vera License")))))
863
864 (define-public font-adobe-source-code-pro
865 (package
866 (name "font-adobe-source-code-pro")
867 (version "2.030R-ro-1.050R-it")
868 (source
869 (origin
870 (method git-fetch)
871 (uri (git-reference
872 (url "https://github.com/adobe-fonts/source-code-pro.git")
873 (commit (regexp-substitute/global
874 ;; The upstream tag uses "/" between the roman and italic
875 ;; versions, so substitute our "-" separator here.
876 #f "R-ro-" version 'pre "R-ro/" 'post))))
877 (file-name (git-file-name name version))
878 (sha256
879 (base32 "0hc5kflr8xzqgdm0c3gbgb1paygznxmnivkylid69ipc7wnicx1n"))))
880 (build-system font-build-system)
881 (home-page "https://github.com/adobe-fonts/source-code-pro")
882 (synopsis
883 "Monospaced font family for user interface and coding environments")
884 (description
885 "Source Code Pro is a set of monospaced OpenType fonts that have been
886 designed to work well in user interface environments.")
887 (license license:silofl1.1)))
888
889 (define-public font-adobe-source-sans-pro
890 (package
891 (name "font-adobe-source-sans-pro")
892 (version "2.040R-ro-1.090R-it")
893 (source
894 (origin
895 (method git-fetch)
896 (uri (git-reference
897 (url "https://github.com/adobe-fonts/source-sans-pro.git")
898 (commit (regexp-substitute/global
899 ;; The upstream tag uses "/" between the roman and italic
900 ;; versions, so substitute our "-" separator here.
901 #f "R-ro-" version 'pre "R-ro/" 'post))))
902 (file-name (git-file-name name version))
903 (sha256
904 (base32 "1lzin2hfwidbvhps7shs201p1bpxy6220xmhhprv9fc8bknd4c45"))))
905 (build-system font-build-system)
906 (home-page "https://github.com/adobe-fonts/source-sans-pro")
907 (synopsis
908 "Sans serif font family for user interface environments")
909 (description
910 "Source Sans Pro is a set of OpenType fonts that have been designed to
911 work well in user interface (UI) environments.")
912 (license license:silofl1.1)))
913
914 (define-public font-adobe-source-serif-pro
915 (package
916 (name "font-adobe-source-serif-pro")
917 (version "2.007R-ro-1.007R-it")
918 (source
919 (origin
920 (method git-fetch)
921 (uri (git-reference
922 (url "https://github.com/adobe-fonts/source-serif-pro.git")
923 (commit (regexp-substitute/global
924 ;; The upstream tag uses "/" between the roman and italic
925 ;; versions, so substitute our "-" separator here.
926 #f "R-ro-" version 'pre "R-ro/" 'post))))
927 (file-name (git-file-name name version))
928 (sha256
929 (base32 "1vvzfhjpi47m84bzkapylkd5fri8bdm8qng2hiylmmlw0wk4gpas"))))
930 (build-system font-build-system)
931 (home-page "https://github.com/adobe-fonts/source-serif-pro")
932 (synopsis
933 "Serif typeface to complement Source Sans Pro for setting text")
934 (description
935 "Source Serif Pro is a set of OpenType fonts to complement the Source
936 Sans Pro family.")
937 (license license:silofl1.1)))
938
939 (define-public font-fira-mono
940 (package
941 (name "font-fira-mono")
942 (version "3.206")
943 (source (origin
944 (method url-fetch)
945 (uri (string-append "https://carrois.com/downloads/fira_mono_3_2/"
946 "FiraMonoFonts"
947 (string-replace-substring version "." "")
948 ".zip"))
949 (sha256
950 (base32
951 "1z65x0dw5dq6rs6p9wyfrir50rlh95vgzsxr8jcd40nqazw4jhpi"))))
952 (build-system font-build-system)
953 (home-page "https://mozilla.github.io/Fira/")
954 (synopsis "Mozilla's monospace font")
955 (description "This is the typeface used by Mozilla in Firefox OS.")
956 (license license:silofl1.1)))
957
958 (define-public font-fira-sans
959 (package
960 (name "font-fira-sans")
961 (version "4.202")
962 (source (origin
963 (method git-fetch)
964 (uri (git-reference
965 (url "https://github.com/mozilla/Fira.git")
966 (commit version)))
967 (file-name (git-file-name name version))
968 (sha256
969 (base32
970 "116j26gdj5g1r124b4669372f7490vfjqw7apiwp2ggl0am5xd0w"))))
971 (build-system font-build-system)
972 (home-page "https://mozilla.github.io/Fira/")
973 (synopsis "Mozilla's Fira Sans Font")
974 (description "This is the typeface used by Mozilla in Firefox OS.")
975 (license license:silofl1.1)))
976
977 (define-public font-fira-code
978 (package
979 (name "font-fira-code")
980 (version "1.206")
981 (source (origin
982 (method url-fetch/zipbomb)
983 (uri (string-append "https://github.com/tonsky/FiraCode/releases/"
984 "download/" version
985 "/FiraCode_" version ".zip"))
986 (sha256
987 (base32
988 "02r1lcp0c9135ps71v66wdvbsrcxwirrp0blqsa1xbjkkq2rwgj3"))))
989 (build-system font-build-system)
990 (home-page "https://mozilla.github.io/Fira/")
991 (synopsis "Monospaced font with programming ligatures")
992 (description
993 "Fira Code is an extension of the Fira Mono font containing a set of ligatures
994 for common programming multi-character combinations. This is just a font rendering
995 feature: underlying code remains ASCII-compatible. This helps to read and understand
996 code faster. For some frequent sequences like .. or //, ligatures allow us to
997 correct spacing.")
998 (license license:silofl1.1)))
999
1000 (define-public font-awesome
1001 (package
1002 (name "font-awesome")
1003 ;; XXX The build scripts of version 5 are not freely licensed and
1004 ;; so we have to stick with version 4 for now:
1005 ;; <https://bugs.gnu.org/32916>
1006 (version "4.7.0")
1007 (source (origin
1008 (method git-fetch)
1009 (uri (git-reference
1010 (url "https://github.com/FortAwesome/Font-Awesome.git")
1011 (commit (string-append "v" version))))
1012 (file-name (git-file-name name version))
1013 (sha256
1014 (base32
1015 "0w30y26jp8nvxa3iiw7ayl6rkza1rz62msl9xw3srvxya1c77grc"))))
1016 (build-system font-build-system)
1017 (arguments
1018 '(#:phases
1019 (modify-phases %standard-phases
1020 (replace 'install
1021 (lambda* (#:key outputs #:allow-other-keys)
1022 (let* ((out (assoc-ref outputs "out"))
1023 (source (string-append (getcwd) "/fonts"))
1024 (fonts (string-append out "/share/fonts")))
1025 (for-each (lambda (file)
1026 (install-file file (string-append fonts "/truetype")))
1027 (find-files source "\\.(ttf|ttc)$"))
1028 (for-each (lambda (file)
1029 (install-file file (string-append fonts "/opentype")))
1030 (find-files source "\\.(otf|otc)$"))
1031 #t))))))
1032 (home-page "https://fontawesome.com/")
1033 (synopsis "Font that contains a rich iconset")
1034 (description
1035 "Font Awesome is a full suite of pictographic icons for easy scalable
1036 vector graphics.")
1037 (license license:silofl1.1)))
1038
1039 (define-public font-tamzen
1040 (package
1041 (name "font-tamzen")
1042 (version "1.11.4")
1043 (source
1044 (origin
1045 (method git-fetch)
1046 (uri (git-reference
1047 (url "https://github.com/sunaku/tamzen-font.git")
1048 (commit (string-append "Tamzen-" version))))
1049 (file-name (git-file-name name version))
1050 (sha256
1051 (base32
1052 "17kgmvg6q32mqhx9g44hjvzv0si0mnpprga4z7na930g2zdd8846"))))
1053 (build-system trivial-build-system)
1054 (arguments
1055 `(#:modules ((guix build utils))
1056 #:builder
1057 (begin
1058 (use-modules (guix build utils))
1059
1060 (let* ((out (assoc-ref %outputs "out"))
1061 (font-dir (string-append out "/share/fonts/misc"))
1062 (psf-dir (string-append out "/share/kbd/consolefonts")))
1063 (chdir (assoc-ref %build-inputs "source"))
1064 (mkdir-p font-dir)
1065 (mkdir-p psf-dir)
1066 (for-each (lambda (pcf)
1067 (install-file pcf font-dir))
1068 (find-files "pcf" "\\.pcf$"))
1069 (for-each (lambda (psf)
1070 (install-file psf psf-dir))
1071 (find-files "psf" "\\.psf$"))
1072 #t))))
1073 (home-page "https://github.com/sunaku/tamzen-font")
1074 (synopsis "Monospaced bitmap font for console and X11")
1075 (description
1076 "Tamzen is a fork of the @code{Tamsyn} font. It is programmatically forked
1077 from @code{Tamsyn} version 1.11, backporting glyphs from older versions while
1078 deleting deliberately empty glyphs (which are marked as unimplemented) to
1079 allow secondary/fallback fonts to provide real glyphs at those codepoints.
1080
1081 The @code{TamzenForPowerline} fonts provide additional @code{Powerline} symbols,
1082 which are programmatically injected with @code{bitmap-font-patcher} and
1083 later hand-tweaked with the gbdfed(1) editor:
1084
1085 @enumerate
1086 @item all icons are expanded to occupy the maximum available space
1087 @item the branch of the fork icon ( U+E0A0) was made larger than the trunk
1088 @item for the newline icon ( U+E0A1), the @emph{N} was made larger at the bottom
1089 @item the keyhole in the padlock icon ( U+E0A2) was replaced with @emph{//} lines.
1090 @end enumerate\n")
1091 (license (license:non-copyleft "file://LICENSE"))))
1092
1093 (define-public font-comic-neue
1094 (package
1095 (name "font-comic-neue")
1096 ;; The ‘v2.3’ and ‘v2.4’ releases at https://github.com/crozynski/comicneue
1097 ;; are equivalent. The home page hosts 2.3, not 2.4, so we use that here.
1098 (version "2.3")
1099 (source (origin
1100 (method url-fetch/zipbomb)
1101 (uri (string-append
1102 "http://www.comicneue.com/comic-neue-" version ".zip"))
1103 (sha256
1104 (base32
1105 "1695hkpd8kqnr2a88p8xs496slgzxjjkzpa9aa33ml3pnh7519zk"))))
1106 (build-system font-build-system)
1107 (arguments
1108 `(#:phases
1109 (modify-phases %standard-phases
1110 ;; Delete Mac OS X specific files. If not deleted, these cause
1111 ;; several hidden files to be installed.
1112 (add-before 'install 'delete-macosx-files
1113 (lambda _
1114 (delete-file-recursively "__MACOSX")
1115 #t))
1116 (add-after 'install 'install-conf
1117 (lambda* (#:key outputs #:allow-other-keys)
1118 (let ((conf-dir (string-append (assoc-ref outputs "out")
1119 "/share/fontconfig/conf.avail")))
1120 (mkdir-p conf-dir)
1121 (call-with-output-file
1122 (string-append conf-dir "/30-comic-neue.conf")
1123 (lambda (port)
1124 (format port "<?xml version=\"1.0\"?>
1125 <!DOCTYPE fontconfig SYSTEM \"fonts.dtd\">
1126 <fontconfig>
1127 <!-- If Comic Sans is missing, use Comic Neue instead. -->
1128 <alias>
1129 <family>Comic Sans MS</family>
1130 <prefer>
1131 <family>Comic Neue</family>
1132 </prefer>
1133 </alias>
1134 </fontconfig>\n"))))
1135 #t)))))
1136 (home-page "http://www.comicneue.com/")
1137 (synopsis "Font that fixes the shortcomings of Comic Sans")
1138 (description
1139 "Comic Neue is a font that attempts to create a respectable casual
1140 typeface, by mimicking Comic Sans while fixing its most obvious shortcomings.")
1141 (license license:silofl1.1)))
1142
1143 (define-public font-iosevka
1144 (package
1145 (name "font-iosevka")
1146 ;; When updating, also update the hash of the Iosevka variant(s) below.
1147 (version "2.3.3")
1148 (source
1149 (origin
1150 (method url-fetch/zipbomb)
1151 (uri (string-append "https://github.com/be5invis/Iosevka"
1152 "/releases/download/v" version
1153 "/ttc-iosevka-" version ".zip"))
1154 (sha256
1155 (base32 "0jkv5rkg5hi0avhwyhcjiqzjslp6zjj77f09vxx2gj9l93byz731"))))
1156 (build-system font-build-system)
1157 (home-page "https://be5invis.github.io/Iosevka/")
1158 (synopsis "Coders' typeface, built from code")
1159 (description
1160 "Iosevka is a slender monospace sans-serif or slab-serif typeface inspired
1161 by Pragmata Pro, M+, and PF DIN Mono, designed to be the ideal font for
1162 programming. Iosevka is completely generated from its source code.")
1163 (license (list license:silofl1.1 ; build artifacts (i.e. the fonts)
1164 license:bsd-3)))) ; supporting code
1165
1166 (define-public font-iosevka-slab
1167 (package
1168 (inherit font-iosevka)
1169 (name "font-iosevka-slab")
1170 (version (package-version font-iosevka))
1171 (source
1172 (origin
1173 (method url-fetch/zipbomb)
1174 (uri (string-append "https://github.com/be5invis/Iosevka"
1175 "/releases/download/v" version
1176 "/ttc-iosevka-slab-" version ".zip"))
1177 (sha256
1178 (base32 "1rkmgi08kknc1fg54zpa6w92m3b3v7pc8cpwygz22kgd2h0mdrr8"))))))
1179
1180 (define-public font-go
1181 (let ((commit "f03a046406d4d7fbfd4ed29f554da8f6114049fc")
1182 (revision "1"))
1183 (package
1184 (name "font-go")
1185 (version (string-append "20170330-" revision "." (string-take commit 7)))
1186 (source (origin
1187 (file-name (string-append "go-image-" version "-checkout"))
1188 (method git-fetch)
1189 (uri (git-reference
1190 (url "https://go.googlesource.com/image")
1191 (commit commit)))
1192 (sha256
1193 (base32
1194 "1aq6mnjayks55gd9ahavk6jfydlq5lm4xm0xk4pd5sqa74p5p74d"))))
1195 (build-system font-build-system)
1196 (arguments
1197 `(#:phases
1198 (modify-phases %standard-phases
1199 (add-before 'install 'chdir
1200 (lambda _
1201 (chdir "font/gofont/ttfs")
1202 #t)))))
1203 (home-page "https://blog.golang.org/go-fonts")
1204 (synopsis "The Go font family")
1205 (description
1206 "The Go font family is a set of WGL4 TrueType fonts from the Bigelow &
1207 Holmes type foundry, released under the same license as the Go programming
1208 language. It includes a set of proportional, sans-serif fonts, and a set of
1209 monospace, slab-serif fonts.")
1210 (license license:bsd-3))))
1211
1212 (define-public font-google-material-design-icons
1213 (package
1214 (name "font-google-material-design-icons")
1215 (version "3.0.1")
1216 (source (origin
1217 (method git-fetch)
1218 (uri (git-reference
1219 (url "https://github.com/google/material-design-icons.git")
1220 (commit version)))
1221 (file-name (git-file-name name version))
1222 (sha256
1223 (base32
1224 "17q5brcqyyc8gbjdgpv38p89s60cwxjlwy2ljnrvas5cj0s62np0"))))
1225 (build-system font-build-system)
1226 (home-page "https://google.github.io/material-design-icons")
1227 (synopsis "Icon font of Google Material Design icons")
1228 (description
1229 "Material design system icons are simple, modern, friendly, and sometimes
1230 quirky. Each icon is created using our design guidelines to depict in simple
1231 and minimal forms the universal concepts used commonly throughout a UI.
1232 Ensuring readability and clarity at both large and small sizes, these icons
1233 have been optimized for beautiful display on all common platforms and display
1234 resolutions.")
1235 (license license:asl2.0)))
1236
1237 (define-public font-opendyslexic
1238 (package
1239 (name "font-opendyslexic")
1240 (version "0.91.12")
1241 (source
1242 (origin
1243 (method url-fetch/zipbomb)
1244 (uri (string-append "https://github.com/antijingoist/opendyslexic/"
1245 "releases/download/v" version
1246 "/opendyslexic-0.910.12-rc2-2019.10.17.zip"))
1247 (sha256
1248 (base32
1249 "11ml7v4iyf3hr0fbnkwz8afb8vi58wbcfnmn4gyvrwh9jk5pybdr"))))
1250 (build-system font-build-system)
1251 (native-inputs `(("unzip" ,unzip)))
1252 (home-page "https://opendyslexic.org/")
1253 (synopsis "Font for dyslexics and high readability")
1254 (description "OpenDyslexic is a font designed to help readability for some
1255 of the symptoms of dyslexia. Letters have heavy weighted bottoms to provide
1256 an indication of orientation to make it more difficult to confuse with other
1257 similar letters. Consistently weighted bottoms can also help reinforce the
1258 line of text. The unique shapes of each letter can help prevent flipping and
1259 swapping. The italic style for OpenDyslexic has been crafted to be used for
1260 emphasis while still being readable.")
1261 (license license:silofl1.1)))
1262
1263 (define-public font-open-dyslexic
1264 (deprecated-package "font-open-dyslexic" font-opendyslexic))
1265
1266 (define-public font-dosis
1267 (package
1268 (name "font-dosis")
1269 (version "1.7")
1270 (source
1271 (origin
1272 (method url-fetch/zipbomb)
1273 (uri (string-append "https://web.archive.org/web/20180228233737/"
1274 "https://www.impallari.com/media/releases/dosis-"
1275 "v" version ".zip"))
1276 (sha256
1277 (base32 "1qhci68f68mf87jd69vjf9qjq3wydgw1q7ivn3amjb65ls1s0c4s"))))
1278 (build-system font-build-system)
1279 (home-page (string-append "https://web.archive.org/web/20180228233737/"
1280 "https://www.impallari.com/dosis"))
1281 (synopsis "Very simple, rounded, sans serif family")
1282 (description
1283 "Dosis is a very simple, rounded, sans serif family.
1284 The lighter weights are minimalist. The bolder weights have more personality.
1285 The medium weight is nice and balanced. The overall result is a family
1286 that's clean and modern, and can express a wide range of voices & feelings.
1287 It comes in 7 incremental weights:
1288 ExtraLight, Light, Book, Medium, Semibold, Bold & ExtraBold")
1289 (license license:silofl1.1)))
1290
1291 (define-public font-culmus
1292 (package
1293 (name "font-culmus")
1294 (version "0.133")
1295 (source
1296 (origin
1297 (method url-fetch)
1298 (uri (string-append "https://sourceforge.net/projects/"
1299 "culmus/files/culmus/" version "/culmus-src-"
1300 version ".tar.gz"))
1301 (sha256
1302 (base32
1303 "02akysgsqhi15cck54xcacm16q5raf4l7shgb8fnj7xr3c1pbfyp"))))
1304 (build-system font-build-system)
1305 (arguments
1306 `(#:phases
1307 (modify-phases %standard-phases
1308 (add-before 'install 'build
1309 (lambda _
1310 (let ((compile
1311 (lambda (name ext)
1312 (invoke
1313 "fontforge" "-lang=ff"
1314 "-c" (string-append "Open('" name "');"
1315 "Generate('"
1316 (basename name "sfd") ext
1317 "')")))))
1318 ;; This part based on the fonts shipped in the non-source package.
1319 (for-each (lambda (name)
1320 (compile name "ttf"))
1321 (find-files "." "^[^Nachlieli].*\\.sfd$"))
1322 (for-each (lambda (name)
1323 (compile name "otf"))
1324 (find-files "." "^Nachlieli.*\\.sfd$"))
1325 #t))))))
1326 (native-inputs
1327 `(("fontforge" ,fontforge)))
1328 (home-page "http://culmus.sourceforge.net/")
1329 (synopsis "TrueType Hebrew Fonts for X11")
1330 (description "14 Hebrew trivial families. Contain ASCII glyphs from various
1331 sources. Those families provide a basic set of a serif (Frank Ruehl), sans
1332 serif (Nachlieli) and monospaced (Miriam Mono) trivials. Also included Miriam,
1333 Drugulin, Aharoni, David, Hadasim etc. Cantillation marks support is
1334 available in Keter YG.")
1335 (license license:gpl2))) ; consult the LICENSE file included
1336
1337 (define-public font-lohit
1338 (package
1339 (name "font-lohit")
1340 (version "20140220")
1341 (source
1342 (origin
1343 (method url-fetch)
1344 (uri (string-append "https://releases.pagure.org/lohit/lohit-ttf-"
1345 version ".tar.gz"))
1346 (sha256
1347 (base32
1348 "1rmgr445hw1n851ywy28csfvswz1i6hnc8mzp88qw2xk9j4dn32d"))))
1349 (build-system font-build-system)
1350 (home-page "https://pagure.io/lohit")
1351 (synopsis "Lohit TrueType Indic fonts")
1352 (description "Lohit is a font family designed to cover Indic scripts.
1353 Lohit supports the Assamese, Bengali, Devanagari (Hindi, Kashmiri, Konkani,
1354 Maithili, Marathi, Nepali, Sindhi, Santali, Bodo, Dogri languages), Gujarati,
1355 Kannada, Malayalam, Manipuri, Oriya, Punjabi, Tamil and Telugu scripts.")
1356 (license license:silofl1.1)))
1357
1358 (define-public font-blackfoundry-inria
1359 (package
1360 (name "font-blackfoundry-inria")
1361 (version "1.200")
1362 (home-page "https://github.com/BlackFoundry/InriaFonts")
1363 (source (origin
1364 (method git-fetch)
1365 (uri (git-reference
1366 (url home-page)
1367 (commit (string-append "v" version))))
1368 (sha256
1369 (base32
1370 "06775y99lyh6hj5hzvrx56iybdck8a8xfqkipqd5c4cldg0a9hh8"))
1371 (file-name (string-append name "-" version "-checkout"))))
1372 ;; XXX: There are .ufo directories (the "source") so in theory we should
1373 ;; be able to rebuild TTF and OTF files with FontForge. Unfortunately a
1374 ;; command like:
1375 ;;
1376 ;; fontforge -lang=ff -c "Open('InriaSans-Regular.ufo'); Generate('foo.ttf');"
1377 ;;
1378 ;; segfaults in '_UFOLoadGlyph', which calls out to libpython. :-/
1379 ;; In the meantime we ship the precompiled OTF and TTF files.
1380 (build-system font-build-system)
1381 (synopsis "Inria Sans and Inria Serif type family")
1382 (description
1383 "Inria Sans and Inria Serif are the two members of a type family designed
1384 for Inria, a public research institute in computer science and mathematics.")
1385 (license license:silofl1.1)))
1386
1387 (define-public font-sil-gentium
1388 (package
1389 (name "font-sil-gentium")
1390 (version "5.000")
1391 (source (origin
1392 (method url-fetch)
1393 (uri (string-append
1394 "https://software.sil.org/downloads/r/gentium/GentiumPlus-"
1395 version ".zip"))
1396 (sha256
1397 (base32
1398 "0m7189870hha217n1vgpmf89mwggrxkh679ffi1lxpnjggqi2n9k"))))
1399 ;; Note: The zip file provides TTF files only, but the developer release,
1400 ;; which contains additional files, has a 'SOURCES.txt' file that says
1401 ;; that "the primary source files for the fonts are the fonts themselves".
1402 ;; Thus it looks like the TTF can be considered source.
1403 (build-system font-build-system)
1404 (synopsis "Serif font for the Cyrillic, Greek, and Latin alphabets")
1405 (description
1406 "Gentium is a typeface family designed to enable the diverse ethnic
1407 groups around the world who use the Latin, Cyrillic and Greek scripts to
1408 produce readable, high-quality publications. The font comes with regular and
1409 italics shapes. This package provides only TrueType files (TTF).")
1410 (home-page "https://software.sil.org/gentium/")
1411 (license license:silofl1.1)))
1412
1413 (define-public font-sil-andika
1414 (package
1415 (name "font-sil-andika")
1416 (version "5.000")
1417 (source (origin
1418 (method url-fetch)
1419 (uri (string-append
1420 "https://software.sil.org/downloads/r/andika/Andika-"
1421 version ".zip"))
1422 (sha256
1423 (base32
1424 "01zm7p32gxfwmv7h3cfj2vx59846w2y6rxqy67grn2dyjh8pljv0"))))
1425 ;; As for Gentium (see above), the TTF files are considered source.
1426 (build-system font-build-system)
1427 (synopsis "Sans serif font designed especially for literacy use")
1428 (description
1429 "Andika SIL is a sans serif, Unicode-compliant font designed especially
1430 for literacy use, taking into account the needs of beginning readers. The
1431 focus is on clear, easy-to-perceive letterforms that will not be readily
1432 confused with one another. This package provides only TrueType files (TTF).")
1433 (home-page "https://software.sil.org/andika/")
1434 (license license:silofl1.1)))
1435
1436 (define-public font-sil-charis
1437 (package
1438 (name "font-sil-charis")
1439 (version "5.000")
1440 (source (origin
1441 (method url-fetch)
1442 (uri (string-append
1443 "https://software.sil.org/downloads/r/charis/CharisSIL-"
1444 version ".zip"))
1445 (sha256
1446 (base32
1447 "1zcvw37f1a7gkml3yfm6hxh93844llm7xj4w52600qq3ndrm8gjy"))))
1448 ;; As for Gentium (see above), the TTF files are considered source.
1449 (build-system font-build-system)
1450 (synopsis "Serif font for the Cyrillic and Latin alphabets")
1451 (description
1452 "Charis SIL is a Unicode-based font family that supports the wide range
1453 of languages that use the Latin and Cyrillic scripts. It is specially
1454 designed to make long texts pleasant and easy to read, even in less than ideal
1455 reproduction and display environments. This package provides only TrueType
1456 files (TTF).")
1457 (home-page "https://software.sil.org/charis/")
1458 (license license:silofl1.1)))
1459
1460 (define-public font-mononoki
1461 (package
1462 (name "font-mononoki")
1463 (version "1.2")
1464 (source (origin
1465 (method git-fetch)
1466 (uri (git-reference
1467 (url "https://github.com/madmalik/mononoki/")
1468 (commit version)))
1469 (sha256
1470 (base32
1471 "1rkzyxn30rn8qv2h2xz324j7q15hzg2lci8790a7cdl1dfgic4xi"))
1472 (file-name (git-file-name name version))))
1473 (build-system font-build-system)
1474 (synopsis "Font for programming and code review")
1475 (description
1476 "Mononoki is a typeface by Matthias Tellen, created to enhance code
1477 formatting.")
1478 (home-page "https://madmalik.github.io/mononoki/")
1479 (license license:silofl1.1)))
1480
1481 (define-public font-public-sans
1482 (package
1483 (name "font-public-sans")
1484 (version "1.008")
1485 (source
1486 (origin
1487 (method git-fetch)
1488 (uri (git-reference
1489 (url "https://github.com/uswds/public-sans.git")
1490 (commit (string-append "v" version))))
1491 (file-name (git-file-name name version))
1492 (sha256
1493 (base32 "1qhyxbjv1rnydfpqzd18fbiyz75p4sabphy8yj07hyq0hidp5xsf"))))
1494 (build-system font-build-system)
1495 (home-page "https://public-sans.digital.gov/")
1496 (synopsis "Neutral typeface for interfaces, text, and headings")
1497 (description
1498 "Public Sans is a strong, neutral, sans-serif typeface for text or
1499 display based on Libre Franklin.")
1500 (license license:silofl1.1)))
1501
1502 (define-public font-hermit
1503 (package
1504 (name "font-hermit")
1505 (version "2.0")
1506 (source (origin
1507 (method url-fetch/tarbomb)
1508 (uri (string-append "https://pcaro.es/d/otf-hermit-" version
1509 ".tar.gz"))
1510 (sha256
1511 (base32
1512 "09rmy3sbf1j1hr8zidighjgqc8kp0wsra115y27vrnlf10ml6jy0"))))
1513 (build-system font-build-system)
1514 (arguments
1515 `(#:tests? #f))
1516 (home-page "https://pcaro.es/p/hermit/")
1517 (synopsis "Monospace font")
1518 (description
1519 "Hermit is a monospace font designed to be clear, pragmatic and very
1520 readable. Its creation has been focused on programming. Every glyph was
1521 carefully planned and calculated, according to defined principles and rules.
1522 For this reason, Hermit is coherent and regular.
1523
1524 Symbols stand out from common text. Dots and commas are easily seen, and
1525 operators are clear even when not surrounded by spaces. Similar characters
1526 have been designed to be very distinguishable from each other.")
1527 (license license:silofl1.1)))
1528
1529 (define-public font-dseg
1530 (package
1531 (name "font-dseg")
1532 (version "0.45")
1533 (source
1534 (origin
1535 (method url-fetch/zipbomb)
1536 (uri
1537 (string-append "https://github.com/keshikan/DSEG/"
1538 "releases/download/v" version
1539 "/fonts-DSEG_v"
1540 (string-concatenate (string-split version #\.))
1541 ".zip"))
1542 (sha256
1543 (base32
1544 "0v8sghh4vl286faf8pvi74znz07pyf0qii8z4wjllisqwc35sx72"))))
1545 (build-system font-build-system)
1546 (arguments
1547 `(#:phases
1548 (modify-phases %standard-phases
1549 (replace 'install
1550 (lambda* (#:key outputs #:allow-other-keys)
1551 (let* ((out (assoc-ref outputs "out"))
1552 (font-dir (string-append out "/share/fonts"))
1553 (truetype-dir (string-append font-dir "/truetype")))
1554 (with-directory-excursion
1555 (string-append "fonts-DSEG_v"
1556 (apply string-append (string-split ,version
1557 #\.)))
1558 (for-each (lambda (f) (install-file f truetype-dir))
1559 (find-files "." "\\.ttf$"))
1560 #t)))))))
1561 (home-page "https://www.keshikan.net/fonts-e.html")
1562 (synopsis "DSEG: 7-segment and 14-segment fonts")
1563 (description
1564 "DSEG is a font family that imitates seven- and fourteen-segment LCD
1565 displays (7SEG, 14SEG). DSEG includes the roman alphabet and symbol glyphs.
1566 This package provides the TrueType fonts.")
1567 (license license:silofl1.1)))
1568
1569 (define-public font-jetbrains-mono
1570 (package
1571 (name "font-jetbrains-mono")
1572 (version "1.0.3")
1573 (source
1574 (origin
1575 (method url-fetch)
1576 (uri
1577 (string-append "https://download.jetbrains.com/fonts/"
1578 "JetBrainsMono-" version ".zip"))
1579 (sha256
1580 (base32 "0zvhwmpdwpm4vywmm6i9a4najz0c7vfi411yikgkd66l5hwd1p6f"))))
1581 (build-system font-build-system)
1582 (home-page "https://www.jetbrains.com/lp/mono/")
1583 (synopsis "Mono typeface for developers")
1584 (description
1585 "JetBrains Mono is a font family dedicated to developers. JetBrains
1586 Mono’s typeface forms are simple and free from unnecessary details. Rendered
1587 in small sizes, the text looks crisper.")
1588 (license license:asl2.0)))
1589
1590 (define-public font-vazir
1591 (package
1592 (name "font-vazir")
1593 (version "22.1.0")
1594 (source
1595 (origin
1596 (method url-fetch/zipbomb)
1597 (uri
1598 (string-append "https://github.com/rastikerdar/vazir-font/"
1599 "releases/download/v" version
1600 "/vazir-font-v" version ".zip"))
1601 (sha256
1602 (base32
1603 "0w3gwb5q33x5llw7cfs8qhaxr4ssg6rsx4b9day3993zn24xq031"))))
1604 (build-system font-build-system)
1605 (home-page "https://rastikerdar.github.io/vazir-font/")
1606 (synopsis "Vazir Persian typeface")
1607 (description
1608 "Vazir is a beautiful and elegant Persian typeface originally based on
1609 DejaVu, and comes in six variants: Thin, Light, Normal, Medium, Bold, and
1610 Black. This package provides four versions of Vazir:
1611
1612 @itemize
1613 @item @code{Vazir}: The main version; includes Latin glyphs from Roboto.
1614 @item @code{Vazir-FD}: Like @code{Vazir}, but (always) uses Farsi digit glyphs
1615 instead of Latin ones.
1616 @item @code{Vazir-WOL}: Like @code{Vazir}, but without Roboto's Latin glyphs.
1617 @item @code{Vazir-FD-WOL}: Combination of @code{Vazir-FD} and @code{Vazir-WOL}:
1618 always uses Farsi digits, and does not include Latin glyphs from Roboto.
1619 @end itemize\n")
1620 (license
1621 ;; See https://github.com/rastikerdar/vazir-font/blob/master/LICENSE for
1622 ;; details.
1623 (list license:public-domain ; the Vazir modifications to DejaVu
1624 ; and the DejaVu modifications to...
1625 (license:x11-style ; ...the Bitstream Vera typeface
1626 "file://LICENSE" "Bitstream Vera License")
1627 license:asl2.0)))) ; Latin glyphs from Roboto