Commit | Line | Data |
---|---|---|
86f1537d | 1 | ;;; GNU Guix --- Functional package management for GNU |
71be99b8 | 2 | ;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org> |
b18e5945 | 3 | ;;; Copyright © 2014, 2017 Mark H Weaver <mhw@netris.org> |
822efdff | 4 | ;;; Copyright © 2014 Joshua Grant <tadni@riseup.net> |
16191117 | 5 | ;;; Copyright © 2014 Alex Kost <alezost@gmail.com> |
692784dd | 6 | ;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com> |
e93b88f7 | 7 | ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr> |
d28fa5cc | 8 | ;;; Copyright © 2015, 2017 Ricardo Wurmus <rekado@elephly.net> |
df320991 | 9 | ;;; Copyright © 2015, 2016 Leo Famulari <leo@famulari.name> |
bb0756c7 | 10 | ;;; Copyright © 2016, 2017 ng0 <ng0@libertad.pw> |
b6ecac93 | 11 | ;;; Copyright © 2016 Jookia <166291@gmail.com> |
f85cafde | 12 | ;;; Copyright © 2016 Eric Bavier <bavier@member.fsf.org> |
73c8d39c | 13 | ;;; Copyright © 2016 Dmitry Nikolaev <cameltheman@gmail.com> |
d7284b6a | 14 | ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il> |
6e1d7aa9 | 15 | ;;; Copyright © 2016 Marius Bakke <mbakke@fastmail.com> |
c3e2a247 | 16 | ;;; Copyright © 2016 Toni Reina <areina@riseup.net> |
8837860c | 17 | ;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr> |
83421fc7 | 18 | ;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.com> |
446e1d51 | 19 | ;;; Copyright © 2017 Alex Griffin <a@ajgrf.com> |
d5b09129 | 20 | ;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org> |
840b7136 | 21 | ;;; Copyright © 2017 Brendan Tildesley <brendan.tildesley@openmailbox.org> |
86f1537d AE |
22 | ;;; |
23 | ;;; This file is part of GNU Guix. | |
24 | ;;; | |
25 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
26 | ;;; under the terms of the GNU General Public License as published by | |
27 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
28 | ;;; your option) any later version. | |
29 | ;;; | |
30 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
31 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
32 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
33 | ;;; GNU General Public License for more details. | |
34 | ;;; | |
35 | ;;; You should have received a copy of the GNU General Public License | |
36 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
37 | ||
38 | (define-module (gnu packages fonts) | |
6e1d7aa9 | 39 | #:use-module (ice-9 regex) |
71be99b8 | 40 | #:use-module (guix utils) |
b5b73a82 | 41 | #:use-module ((guix licenses) #:prefix license:) |
86f1537d AE |
42 | #:use-module (guix packages) |
43 | #:use-module (guix download) | |
49dbae54 | 44 | #:use-module (guix git-download) |
b2f89c19 | 45 | #:use-module (guix build-system font) |
d41bb065 | 46 | #:use-module (guix build-system gnu) |
86f1537d | 47 | #:use-module (guix build-system trivial) |
56b7a338 | 48 | #:use-module (gnu packages base) |
d41bb065 | 49 | #:use-module (gnu packages compression) |
47268eec | 50 | #:use-module (gnu packages fontutils) |
49dbae54 | 51 | #:use-module (gnu packages golang) |
d41bb065 | 52 | #:use-module (gnu packages perl) |
47268eec AE |
53 | #:use-module (gnu packages pkg-config) |
54 | #:use-module (gnu packages python) | |
d41bb065 | 55 | #:use-module (gnu packages xorg) |
47268eec | 56 | #:use-module (gnu packages zip)) |
86f1537d | 57 | |
477ac94b | 58 | (define-public font-inconsolata |
dede51a1 ED |
59 | (package |
60 | (name "font-inconsolata") | |
61 | (version "0.80") | |
62 | (source (origin | |
63 | (method url-fetch) | |
64 | (uri "http://www.levien.com/type/myfonts/Inconsolata.otf") | |
65 | (sha256 | |
66 | (base32 | |
67 | "06js6znbcf7swn8y3b8ki416bz96ay7d3yvddqnvi88lqhbfcq8m")))) | |
b2f89c19 | 68 | (build-system font-build-system) |
dede51a1 ED |
69 | (home-page "http://levien.com/type/myfonts/inconsolata.html") |
70 | (synopsis "Monospace font") | |
71 | (description "A monospace font, designed for code listings and the like, | |
72 | in print. With attention to detail for high resolution rendering.") | |
73 | (license license:silofl1.1))) | |
74 | ||
e93b88f7 ED |
75 | (define-public font-ubuntu |
76 | (package | |
77 | (name "font-ubuntu") | |
29f9abb4 | 78 | (version "0.83") |
e93b88f7 ED |
79 | (source (origin |
80 | (method url-fetch) | |
29f9abb4 AK |
81 | (uri (string-append |
82 | "http://font.ubuntu.com/download/ubuntu-font-family-" | |
83 | version ".zip")) | |
e93b88f7 ED |
84 | (sha256 |
85 | (base32 | |
29f9abb4 | 86 | "0hjvq2x758dx0sfwqhzflns0ns035qm7h6ygskbx1svzg517sva5")))) |
59786588 | 87 | (build-system font-build-system) |
e93b88f7 ED |
88 | (home-page "http://font.ubuntu.com/") |
89 | (synopsis "The Ubuntu Font Family") | |
90 | (description "The Ubuntu Font Family is a unique, custom designed font | |
91 | that has a very distinctive look and feel. This package provides the | |
92 | TrueType (TTF) files.") | |
93 | (license | |
94 | (license:non-copyleft | |
95 | "http://font.ubuntu.com/ufl/ubuntu-font-licence-1.0.txt" | |
96 | "Ubuntu Font License v1.0")))) | |
97 | ||
5e6bdf06 | 98 | (define-public font-dejavu |
72f210ea | 99 | (package |
5e6bdf06 | 100 | (name "font-dejavu") |
d7284b6a | 101 | (version "2.37") |
72f210ea MW |
102 | (source (origin |
103 | (method url-fetch) | |
de67e922 | 104 | (uri (string-append "mirror://sourceforge/dejavu/dejavu/" |
72f210ea MW |
105 | version "/dejavu-fonts-ttf-" |
106 | version ".tar.bz2")) | |
107 | (sha256 | |
108 | (base32 | |
d7284b6a | 109 | "1mqpds24wfs5cmfhj57fsfs07mji2z8812i5c4pi5pbi738s977s")))) |
72f210ea | 110 | (build-system trivial-build-system) |
2e884019 | 111 | (build-system font-build-system) |
72f210ea | 112 | (arguments |
2e884019 AI |
113 | `(#:phases |
114 | (modify-phases %standard-phases | |
115 | (add-after 'install 'install-conf | |
116 | (lambda* (#:key outputs #:allow-other-keys) | |
117 | (let ((conf-dir (string-append (assoc-ref outputs "out") | |
118 | "/share/fontconfig/conf.avail"))) | |
119 | (copy-recursively "fontconfig" conf-dir))))))) | |
72f210ea MW |
120 | (home-page "http://dejavu-fonts.org/") |
121 | (synopsis "Vera font family derivate with additional characters") | |
122 | (description "DejaVu provides an expanded version of the Vera font family | |
123 | aiming for quality and broader Unicode coverage while retaining the original | |
b4774d87 | 124 | Vera style. DejaVu currently works towards conformance to the Multilingual |
72f210ea MW |
125 | European Standards (MES-1 and MES-2) for Unicode coverage. The DejaVu fonts |
126 | provide serif, sans and monospaced variants.") | |
127 | (license | |
128 | (license:x11-style | |
129 | "http://dejavu-fonts.org/")))) | |
130 | ||
5e6bdf06 | 131 | (define-public font-bitstream-vera |
86f1537d | 132 | (package |
5e6bdf06 | 133 | (name "font-bitstream-vera") |
86f1537d AE |
134 | (version "1.10") |
135 | (source (origin | |
136 | (method url-fetch) | |
137 | (uri (string-append "mirror://gnome/sources/ttf-bitstream-vera/" | |
138 | version "/ttf-bitstream-vera-" | |
139 | version ".tar.bz2")) | |
140 | (sha256 | |
141 | (base32 | |
142 | "1p3qs51x5327gnk71yq8cvmxc6wgx79sqxfvxcv80cdvgggjfnyv")))) | |
143 | (build-system trivial-build-system) | |
144 | (arguments | |
145 | `(#:modules ((guix build utils)) | |
146 | #:builder (begin | |
147 | (use-modules (guix build utils) | |
148 | (srfi srfi-26)) | |
149 | ||
150 | (let ((tar (string-append (assoc-ref %build-inputs | |
151 | "tar") | |
152 | "/bin/tar")) | |
153 | (PATH (string-append (assoc-ref %build-inputs | |
154 | "bzip2") | |
155 | "/bin")) | |
156 | (font-dir (string-append %output | |
157 | "/share/fonts/truetype")) | |
158 | (doc-dir (string-append %output "/share/doc/" | |
159 | ,name "-" ,version))) | |
160 | (setenv "PATH" PATH) | |
161 | (system* tar "xvf" (assoc-ref %build-inputs "source")) | |
162 | ||
163 | (mkdir-p font-dir) | |
164 | (mkdir-p doc-dir) | |
165 | (chdir (string-append "ttf-bitstream-vera-" ,version)) | |
166 | (for-each (lambda (ttf) | |
8837860c | 167 | (install-file ttf font-dir)) |
86f1537d AE |
168 | (find-files "." "\\.ttf$")) |
169 | (for-each (lambda (doc) | |
8837860c | 170 | (install-file doc doc-dir)) |
86f1537d AE |
171 | (find-files "." "\\.TXT$")))))) |
172 | (native-inputs `(("source" ,source) | |
173 | ("tar" ,tar) | |
174 | ("bzip2" ,bzip2))) | |
07af3e5e | 175 | (home-page "http://www.gnome.org/fonts/") |
86f1537d AE |
176 | (synopsis "Bitstream Vera sans-serif typeface") |
177 | (description "Vera is a sans-serif typeface from Bitstream, Inc. This | |
178 | package provides the TrueType (TTF) files.") | |
179 | (license | |
d5b09129 CL |
180 | (license:fsdg-compatible |
181 | "https://www.gnome.org/fonts/#Final_Bitstream_Vera_Fonts" | |
182 | "The Font Software may be sold as part of a larger software package but | |
183 | no copy of one or more of the Font Software typefaces may be sold by | |
184 | itself.")))) | |
86f1537d | 185 | |
71be99b8 LC |
186 | (define-public font-cantarell |
187 | (package | |
188 | (name "font-abattis-cantarell") | |
b18e5945 | 189 | (version "0.0.25") |
71be99b8 LC |
190 | (source (origin |
191 | (method url-fetch) | |
192 | (uri (string-append "mirror://gnome/sources/cantarell-fonts/" | |
193 | (version-major+minor version) | |
194 | "/cantarell-fonts-" version ".tar.xz")) | |
195 | (sha256 | |
196 | (base32 | |
b18e5945 | 197 | "0zvkd8cm1cg2919v1js9qmzwa02sjl7qajj3gcvgqvai1fm2i8hl")))) |
71be99b8 LC |
198 | (build-system gnu-build-system) |
199 | (home-page "https://wiki.gnome.org/Projects/CantarellFonts") | |
200 | (synopsis "Cantarell sans-serif typeface") | |
201 | (description "The Cantarell font family is a contemporary Humanist | |
202 | sans-serif designed for on-screen reading. It is used by GNOME@tie{}3.") | |
203 | (license license:silofl1.1))) | |
204 | ||
5e6bdf06 | 205 | (define-public font-gnu-freefont-ttf |
86f1537d | 206 | (package |
5e6bdf06 | 207 | (name "font-gnu-freefont-ttf") |
47268eec | 208 | (version "20120503") |
86f1537d AE |
209 | (source (origin |
210 | (method url-fetch) | |
47268eec | 211 | (uri (string-append "mirror://gnu/freefont/freefont-src-" |
86f1537d AE |
212 | version ".tar.gz")) |
213 | (sha256 | |
214 | (base32 | |
47268eec AE |
215 | "0yk58blhcd4hm7nyincmqq4jrzjjk82wif2zmk1l3y2m4vif4qhd")))) |
216 | (build-system gnu-build-system) | |
86f1537d | 217 | (arguments |
47268eec AE |
218 | `(#:phases (modify-phases %standard-phases |
219 | (delete 'configure) | |
220 | (replace 'install | |
221 | (lambda _ | |
222 | (let ((doc-dir (string-append %output "/share/doc/" | |
223 | ,name "-" ,version)) | |
224 | (font-dir (string-append %output | |
225 | "/share/fonts/truetype"))) | |
226 | (mkdir-p doc-dir) | |
227 | (substitute* "Makefile" | |
228 | (("\\$\\(TMPDIR\\)") doc-dir) | |
229 | (("sfd/\\*.ttf") "")) | |
230 | (system* "make" "ttftar") | |
231 | (mkdir-p font-dir) | |
232 | (for-each (lambda (file) | |
8837860c | 233 | (install-file file font-dir)) |
47268eec AE |
234 | (filter |
235 | (lambda (file) (string-suffix? "ttf" file)) | |
236 | (find-files "." ""))))))) | |
237 | #:test-target "tests")) | |
238 | ;; replace python 3 with python 2 | |
239 | ;; python 3 support commits aren't yet released in 20120503 | |
240 | ;; so freefont needs python 2 support in fontforge | |
241 | (native-inputs `(("fontforge" ,(package (inherit fontforge) | |
242 | (inputs `(("python-2" ,python-2) | |
243 | ,@(package-inputs fontforge))))))) | |
6fd52309 | 244 | (home-page "https://www.gnu.org/software/freefont/") |
86f1537d AE |
245 | (synopsis "Unicode-encoded outline fonts") |
246 | (description | |
247 | "The GNU Freefont project aims to provide a set of free outline | |
248 | (PostScript Type0, TrueType, OpenType...) fonts covering the ISO | |
249 | 10646/Unicode UCS (Universal Character Set).") | |
63e8bb12 LC |
250 | (license license:gpl3+) |
251 | (properties '((upstream-name . "freefont") | |
252 | (ftp-directory . "/gnu/freefont"))))) | |
d41bb065 | 253 | |
16191117 AK |
254 | (define-public font-liberation |
255 | (package | |
256 | (name "font-liberation") | |
257 | (version "2.00.1") | |
258 | (source (origin | |
259 | (method url-fetch) | |
779669ab | 260 | (uri (string-append "https://releases.pagure.org/" |
16191117 AK |
261 | "liberation-fonts/liberation-fonts-ttf-" |
262 | version ".tar.gz")) | |
263 | (sha256 | |
264 | (base32 | |
265 | "010m4zfqan4w04b6bs9pm3gapn9hsb18bmwwgp2p6y6idj52g43q")))) | |
266 | (build-system trivial-build-system) | |
267 | (arguments | |
268 | `(#:modules ((guix build utils)) | |
269 | #:builder | |
270 | (begin | |
271 | (use-modules (guix build utils)) | |
272 | ||
273 | (let ((tar (string-append (assoc-ref %build-inputs "tar") | |
274 | "/bin/tar")) | |
275 | (PATH (string-append (assoc-ref %build-inputs "gzip") | |
276 | "/bin")) | |
277 | (font-dir (string-append %output "/share/fonts/truetype")) | |
278 | (doc-dir (string-append %output "/share/doc/" ,name))) | |
279 | (setenv "PATH" PATH) | |
280 | (system* tar "xvf" (assoc-ref %build-inputs "source")) | |
281 | (mkdir-p font-dir) | |
282 | (mkdir-p doc-dir) | |
283 | (chdir (string-append "liberation-fonts-ttf-" ,version)) | |
284 | (for-each (lambda (ttf) | |
8837860c | 285 | (install-file ttf font-dir)) |
16191117 AK |
286 | (find-files "." "\\.ttf$")) |
287 | (for-each (lambda (doc) | |
8837860c | 288 | (install-file doc doc-dir)) |
16191117 AK |
289 | '("AUTHORS" "ChangeLog" "LICENSE" "README" "TODO")))))) |
290 | (native-inputs | |
291 | `(("source" ,source) | |
292 | ("tar" ,tar) | |
293 | ("gzip" ,gzip))) | |
779669ab | 294 | (home-page "https://pagure.io/liberation-fonts/") |
16191117 AK |
295 | (synopsis |
296 | "Fonts compatible with Arial, Times New Roman, and Courier New") | |
297 | (description | |
298 | "The Liberation font family aims at metric compatibility with | |
299 | Arial, Times New Roman, and Courier New. | |
16191117 AK |
300 | There are three sets: |
301 | ||
0102fba2 | 302 | @enumerate |
ec460a2a | 303 | @item Sans (a substitute for Arial, Albany, Helvetica, Nimbus Sans L, and |
16191117 | 304 | Bitstream Vera Sans); |
ec460a2a | 305 | @item Serif (a substitute for Times New Roman, Thorndale, Nimbus Roman, and |
16191117 | 306 | Bitstream Vera Serif); |
ec460a2a | 307 | @item Mono (a substitute for Courier New, Cumberland, Courier, Nimbus Mono L, |
16191117 | 308 | and Bitstream Vera Sans Mono). |
0102fba2 | 309 | @end enumerate |
16191117 AK |
310 | |
311 | The Liberation Fonts are sponsored by Red Hat.") | |
312 | (license license:silofl1.1))) | |
313 | ||
d28fa5cc RW |
314 | (define-public font-linuxlibertine |
315 | (package | |
316 | (name "font-linuxlibertine") | |
317 | (version "5.3.0") | |
318 | (source (origin | |
319 | (method url-fetch/tarbomb) | |
320 | (uri (string-append "mirror://sourceforge/linuxlibertine/" | |
321 | "linuxlibertine/" version | |
322 | "/LinLibertineSRC_" version "_2012_07_02.tgz")) | |
323 | (sha256 | |
324 | (base32 | |
325 | "0x7cz6hvhpil1rh03rax9zsfzm54bh7r4bbrq8rz673gl9h47v0v")))) | |
326 | (build-system gnu-build-system) | |
327 | (arguments | |
328 | `(#:tests? #f ; there are no tests | |
329 | #:modules ((guix build utils) | |
330 | (guix build gnu-build-system) | |
331 | (srfi srfi-1) | |
332 | (srfi srfi-26)) | |
333 | #:phases | |
334 | (modify-phases %standard-phases | |
335 | (delete 'configure) | |
336 | (replace 'build | |
337 | (lambda _ | |
338 | (let ((compile | |
339 | (lambda (name ext) | |
340 | (zero? (system* | |
341 | "fontforge" "-lang=ff" | |
342 | "-c" (string-append "Open('" name "');" | |
343 | "Generate('" | |
344 | (basename name "sfd") ext | |
345 | "')")))))) | |
346 | (every (lambda (name) | |
347 | (and (compile name "ttf") | |
348 | (compile name "otf"))) | |
349 | (find-files "." "\\.sfd$"))))) | |
350 | (replace 'install | |
351 | (lambda* (#:key outputs #:allow-other-keys) | |
352 | (let ((font-dir (string-append (assoc-ref outputs "out") | |
353 | "/share/fonts/truetype"))) | |
354 | (mkdir-p font-dir) | |
355 | (for-each (cut install-file <> font-dir) | |
356 | (find-files "." "\\.(otf|ttf)$")) | |
357 | #t)))))) | |
358 | (native-inputs | |
359 | `(("fontforge" ,fontforge))) | |
360 | (home-page "http://www.linuxlibertine.org/") | |
361 | (synopsis "Serif and sans serif typefaces") | |
362 | (description "The Linux Libertine fonts is a set of typefaces containing | |
363 | both a Serif version (\"Linux Libertine\") and a Sans Serif (\"Linux | |
364 | Biolinum\") designed to be used together as an alternative for Times/Times New | |
365 | Roman and Helvetica/Arial. The Serif typeface comes in two shapes and two | |
366 | weights, and with a Small Capitals version of the regular typeface. Linux | |
367 | Biolinum is available in both Regular and Bold weights.") | |
368 | ;; The fonts are released under either of these licenses. | |
369 | (license (list license:gpl2+ license:silofl1.1)))) | |
370 | ||
5e6bdf06 | 371 | (define-public font-terminus |
d41bb065 | 372 | (package |
5e6bdf06 | 373 | (name "font-terminus") |
acb38156 | 374 | (version "4.40") |
d41bb065 JG |
375 | (source |
376 | (origin | |
377 | (method url-fetch) | |
378 | (uri (string-append | |
0f971a04 | 379 | "mirror://sourceforge/terminus-font/terminus-font-" |
d41bb065 JG |
380 | version |
381 | "/terminus-font-" | |
382 | version | |
383 | ".tar.gz")) | |
384 | (sha256 | |
acb38156 | 385 | (base32 |
386 | "0487cyx5h1f0crbny5sg73a22gmym5vk1i7646gy7hgiscj2rxb4")))) | |
d41bb065 JG |
387 | (build-system gnu-build-system) |
388 | (native-inputs | |
389 | `(("pkg-config" ,pkg-config) | |
390 | ("perl" ,perl) | |
391 | ("bdftopcf" ,bdftopcf) | |
b3546174 | 392 | ("font-util" ,font-util) |
d41bb065 JG |
393 | ("mkfontdir" ,mkfontdir))) |
394 | (arguments | |
395 | `(#:configure-flags (list | |
396 | ;; install fonts into subdirectory of package output | |
397 | ;; instead of font-util-?.?.?/share/fonts/X11 | |
398 | (string-append "--with-fontrootdir=" | |
399 | %output "/share/fonts/X11")) | |
400 | #:tests? #f)) ;; No test target in tarball | |
401 | (home-page "http://terminus-font.sourceforge.net/") | |
402 | (synopsis "Simple bitmap programming font") | |
b4774d87 TGR |
403 | (description "Terminus Font is a clean, fixed-width bitmap font, designed |
404 | for long periods of working with computers (8 or more hours per day).") | |
380f2ab6 | 405 | (license license:silofl1.1))) |
692784dd SB |
406 | |
407 | (define-public font-adobe-source-han-sans | |
408 | (package | |
409 | (name "font-adobe-source-han-sans") | |
2666a126 | 410 | (version "1.004") |
692784dd SB |
411 | (source (origin |
412 | (method url-fetch) | |
413 | (uri (string-append | |
414 | "https://github.com/adobe-fonts/source-han-sans/archive/" | |
2666a126 SB |
415 | version "R.tar.gz")) |
416 | (file-name (string-append "source-han-sans-" version "R.tar.gz")) | |
692784dd SB |
417 | (sha256 |
418 | (base32 | |
2666a126 SB |
419 | "1ssx0fw90sy6mj8fv8fv4dgzszpqwbmwpjnlx16g4pvaqzdmybbz")))) |
420 | (outputs '("out" ; OpenType/CFF Collection (OTC), 121 MiB. | |
692784dd SB |
421 | "cn" "jp" "kr" "tw")) ; Region-specific Subset OpenType/CFF. |
422 | (build-system trivial-build-system) | |
423 | (arguments | |
424 | `(#:modules ((guix build utils)) | |
425 | #:builder | |
426 | (begin | |
427 | (use-modules (guix build utils)) | |
428 | (let ((tar (string-append (assoc-ref %build-inputs | |
429 | "tar") | |
430 | "/bin/tar")) | |
431 | (PATH (string-append (assoc-ref %build-inputs | |
432 | "gzip") | |
433 | "/bin")) | |
434 | (install-opentype-fonts | |
435 | (lambda (fonts-dir out) | |
436 | (copy-recursively fonts-dir | |
437 | (string-append (assoc-ref %outputs out) | |
438 | "/share/fonts/opentype"))))) | |
439 | (setenv "PATH" PATH) | |
440 | (system* tar "xvf" (assoc-ref %build-inputs "source")) | |
2666a126 | 441 | (chdir (string-append "source-han-sans-" ,version "R")) |
692784dd SB |
442 | (install-opentype-fonts "OTC" "out") |
443 | (install-opentype-fonts "SubsetOTF/CN" "cn") | |
444 | (install-opentype-fonts "SubsetOTF/JP" "jp") | |
445 | (install-opentype-fonts "SubsetOTF/KR" "kr") | |
2666a126 SB |
446 | (install-opentype-fonts "SubsetOTF/TW" "tw") |
447 | (for-each delete-file (find-files %output "\\.zip$")))))) | |
692784dd SB |
448 | (native-inputs |
449 | `(("gzip" ,gzip) | |
450 | ("tar" ,tar))) | |
451 | (home-page "https://github.com/adobe-fonts/source-han-sans") | |
452 | (synopsis "Pan-CJK fonts") | |
453 | (description | |
454 | "Source Han Sans is a sans serif Pan-CJK font family that is offered in | |
455 | seven weights: ExtraLight, Light, Normal, Regular, Medium, Bold, and Heavy. | |
456 | And in several OpenType/CFF-based deployment configurations to accommodate | |
457 | various system requirements or limitations. As the name suggests, Pan-CJK | |
458 | fonts are intended to support the characters necessary to render or display | |
e881752c | 459 | text in Simplified Chinese, Traditional Chinese, Japanese, and Korean.") |
2666a126 | 460 | (license license:silofl1.1))) |
192b4802 | 461 | |
840b7136 BT |
462 | (define-public font-cns11643 |
463 | (package | |
464 | (name "font-cns11643") | |
465 | (version "98.1.20170405") | |
466 | (source (origin | |
467 | (method url-fetch) | |
468 | (uri "http://www.cns11643.gov.tw/AIDB/Open_Data.zip") | |
469 | (sha256 | |
470 | (base32 | |
471 | "02kb3bwjrra0k2hlr2p8xswd2y0xs6j8d9vm6yrby734h02a40qf")))) | |
472 | (outputs '("out" "tw-kai" "tw-sung")) | |
473 | (build-system trivial-build-system) | |
474 | (native-inputs | |
475 | `(("unzip" ,unzip))) | |
476 | (arguments | |
477 | `(#:modules ((guix build utils)) | |
478 | #:builder | |
479 | (begin | |
480 | (use-modules (guix build utils)) | |
481 | (let* ((font-dir "/share/fonts/truetype/cns11643") | |
482 | (out (string-append | |
483 | (assoc-ref %outputs "out") font-dir)) | |
484 | (tw-kai (string-append | |
485 | (assoc-ref %outputs "tw-kai") font-dir)) | |
486 | (tw-sung (string-append | |
487 | (assoc-ref %outputs "tw-sung") font-dir)) | |
488 | (unzip (string-append | |
489 | (assoc-ref %build-inputs "unzip") "/bin/unzip"))) | |
490 | (system* unzip (assoc-ref %build-inputs "source")) | |
491 | (chdir "Open_Data/Fonts/") | |
492 | (install-file "TW-Kai-98_1.ttf" tw-kai) | |
493 | (install-file "TW-Sung-98_1.ttf" tw-sung) | |
494 | (install-file "TW-Kai-98_1.ttf" out) | |
495 | (install-file "TW-Kai-Ext-B-98_1.ttf" out) | |
496 | (install-file "TW-Kai-Plus-98_1.ttf" out) | |
497 | (install-file "TW-Sung-98_1.ttf" out) | |
498 | (install-file "TW-Sung-Ext-B-98_1.ttf" out) | |
499 | (install-file "TW-Sung-Plus-98_1.ttf" out) | |
500 | #t)))) | |
501 | (home-page "http://www.cns11643.gov.tw/AIDB/welcome.do") | |
502 | (synopsis "CJK TrueType fonts, TW-Kai and TW-Sung") | |
503 | (description | |
504 | "@code{CNS 11643} character set (Chinese National Standard, or Chinese | |
505 | Standard Interchange Code) is the standard character set of the Republic of | |
506 | China (Taiwan) for Chinese Characters and other Unicode symbols. Contained | |
507 | are six TrueType fonts based on two script styles, Regular script (Kai), and | |
508 | Sung/Ming script, each with three variants: | |
509 | ||
510 | @itemize | |
511 | @item @code{CNS 11643} (@code{TW-Kai} and @code{TW-Sung}): Tens of thousands | |
512 | of CJK characters from frequency tables published by the Taiwanese | |
513 | Ministry of Education. ISO 10646 and Unicode compatible encoding. | |
514 | @item @code{Big-5 Plus}: Several thousand frequently used CJK characters | |
515 | encoded in the user defined area of the Big-5 code. | |
516 | @item @code{Big-5 Extended}: A Big-5 character set based on the | |
517 | @code{Big-5 Plus} and @code{CNS 11643} character sets. | |
518 | @end itemize\n") | |
519 | (license (license:non-copyleft | |
520 | "http://data.gov.tw/license")))) ; CC-BY 4.0 compatible | |
521 | ||
f3744a01 BT |
522 | (define-public font-cns11643-swjz |
523 | (package | |
524 | (name "font-cns11643-swjz") | |
525 | (version "1") | |
526 | (source | |
527 | (origin | |
528 | (method url-fetch) | |
529 | (uri "https://www.moedict.tw/fonts/truetype/cns11643/ebas927.ttf") | |
530 | (sha256 | |
531 | (base32 | |
532 | "1qkljldbmb53zp1rcmpsb8rzy67rnsqcjxi549m9743ifk4isl78")))) | |
533 | (build-system trivial-build-system) | |
534 | (arguments | |
535 | `(#:modules ((guix build utils)) | |
536 | #:builder | |
537 | (begin | |
538 | (use-modules (guix build utils)) | |
539 | (let ((font-dir (string-append %output | |
540 | "/share/fonts/truetype/cns11643")) | |
541 | (source (assoc-ref %build-inputs "source"))) | |
542 | (mkdir-p font-dir) | |
543 | (copy-file source | |
544 | (string-append font-dir "/" "ebas927.ttf")) | |
545 | #t)))) | |
546 | (home-page | |
547 | (string-append "http://www.cns11643.gov.tw/AIDB/download.do" | |
548 | "?name=%E5%AD%97%E5%9E%8B%E4%B8%8B%E8%BC%89")) | |
549 | (synopsis "TrueType seal script font") | |
550 | (description | |
551 | "@code{Shuowen Jiezi} is a TrueType seal script font based on the ancient | |
552 | text of the same name published by the Executive Yuan of Taiwan. 6721 glyphs | |
553 | are included, at Unicode compatible code points corresponding to their modern | |
554 | variants.") | |
555 | ;; Original text only available in Chinese. More info at | |
556 | ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=26703#11 | |
557 | (license (license:non-copyleft | |
558 | "http://www.cns11643.gov.tw/AIDB/copyright.do")))) | |
559 | ||
192b4802 RW |
560 | (define-public font-wqy-zenhei |
561 | (package | |
562 | (name "font-wqy-zenhei") | |
563 | (version "0.9.45") | |
564 | (source (origin | |
565 | (method url-fetch) | |
566 | (uri (string-append | |
de67e922 LF |
567 | "mirror://sourceforge/wqy/wqy-zenhei/" version |
568 | "%20%28Fighting-state%20RC1%29/wqy-zenhei-" | |
192b4802 RW |
569 | version ".tar.gz")) |
570 | (file-name (string-append "wqy-zenhei-" version ".tar.gz")) | |
571 | (sha256 | |
572 | (base32 | |
573 | "1mkmxq8g2hjcglb3zajfqj20r4r88l78ymsp2xyl5yav8w3f7dz4")))) | |
574 | (build-system trivial-build-system) | |
575 | (arguments | |
576 | `(#:modules ((guix build utils)) | |
577 | #:builder | |
578 | (begin | |
579 | (use-modules (guix build utils)) | |
580 | (let ((PATH (string-append (assoc-ref %build-inputs "tar") "/bin:" | |
581 | (assoc-ref %build-inputs "gzip") "/bin")) | |
582 | (font-dir (string-append (assoc-ref %outputs "out") | |
583 | "/share/fonts/wenquanyi/"))) | |
584 | (setenv "PATH" PATH) | |
585 | (mkdir-p font-dir) | |
586 | (system* "tar" "xvf" (assoc-ref %build-inputs "source")) | |
587 | (chdir "wqy-zenhei") | |
8837860c | 588 | (install-file "wqy-zenhei.ttc" font-dir))))) |
192b4802 RW |
589 | (native-inputs |
590 | `(("gzip" ,gzip) | |
591 | ("tar" ,tar))) | |
592 | (home-page "http://wenq.org/wqy2/") | |
593 | (synopsis "CJK font") | |
594 | (description | |
595 | "WenQuanYi Zen Hei is a Hei-Ti style (sans-serif type) Chinese outline | |
596 | font. It is designed for general purpose text formatting and on-screen | |
597 | display of Chinese characters and symbols from many other languages. | |
b4774d87 | 598 | WenQuanYi Zen Hei provides a rather complete coverage of Chinese Hanzi glyphs, |
192b4802 RW |
599 | including both simplified and traditional forms. The total glyph number in |
600 | this font is over 35,000, including over 21,000 Chinese Hanzi. This font has | |
b4774d87 TGR |
601 | full coverage of the GBK (CP936) charset, CJK Unified Ideographs, as well as |
602 | the code-points needed for zh_cn, zh_sg, zh_tw, zh_hk, zh_mo, ja (Japanese) and | |
603 | ko (Korean) locales for @code{fontconfig}.") | |
192b4802 RW |
604 | ;; GPLv2 with font embedding exception |
605 | (license license:gpl2))) | |
3f88152d | 606 | |
12b8f6b4 FS |
607 | (define-public font-wqy-microhei |
608 | (package | |
609 | (name "font-wqy-microhei") | |
610 | (version "0.2.0-beta") | |
611 | (source (origin | |
612 | (method url-fetch) | |
613 | (uri (string-append "mirror://sourceforge/wqy/wqy-microhei/" | |
614 | version "/wqy-microhei-" version ".tar.gz")) | |
615 | (sha256 | |
616 | (base32 | |
617 | "0gi1yxqph8xx869ichpzzxvx6y50wda5hi77lrpacdma4f0aq0i8")))) | |
618 | (build-system trivial-build-system) | |
619 | (arguments | |
620 | `(#:modules ((guix build utils)) | |
621 | #:builder | |
622 | (begin | |
623 | (use-modules (guix build utils)) | |
624 | (let ((PATH (string-append (assoc-ref %build-inputs "tar") "/bin:" | |
625 | (assoc-ref %build-inputs "gzip") "/bin")) | |
626 | (font-dir (string-append (assoc-ref %outputs "out") | |
4dcb3db0 | 627 | "/share/fonts/wenquanyi"))) |
12b8f6b4 | 628 | (mkdir-p font-dir) |
4dcb3db0 | 629 | (setenv "PATH" PATH) |
12b8f6b4 | 630 | (system* "tar" "xvf" (assoc-ref %build-inputs "source")) |
4dcb3db0 | 631 | (install-file "wqy-microhei/wqy-microhei.ttc" font-dir))))) |
12b8f6b4 FS |
632 | (native-inputs |
633 | `(("gzip" ,gzip) | |
634 | ("tar" ,tar))) | |
635 | (home-page "http://wenq.org/wqy2/") | |
636 | (synopsis "CJK font") | |
637 | (description | |
638 | "WenQuanYi Micro Hei is a Sans-Serif style (also known as Hei, Gothic or | |
639 | Dotum among the Chinese/Japanese/Korean users) high quality CJK outline font. | |
640 | It was derived from \"Droid Sans Fallback\" and \"Droid Sans\" released by | |
641 | Google Inc. This font contains all the unified CJK Han glyphs in the range of | |
642 | U+4E00-U+9FC3 defined in Unicode Standard 5.1, together with many other | |
643 | languages unicode blocks, including Latins, Extended Latins, Hanguls and | |
644 | Kanas. The font file is extremely compact (~4M) compared with most known CJK | |
645 | fonts.") | |
646 | ;; This font is licensed under Apache2.0 or GPLv3 with font embedding | |
647 | ;; exceptions. | |
648 | (license license:gpl3))) | |
649 | ||
3f88152d RW |
650 | (define-public font-tex-gyre |
651 | (package | |
652 | (name "font-tex-gyre") | |
653 | (version "2.005") | |
654 | (source | |
655 | (origin | |
656 | (method url-fetch) | |
657 | (uri (string-append "http://www.gust.org.pl/projects/e-foundry/" | |
658 | "tex-gyre/whole/tg-" version "otf.zip")) | |
659 | (sha256 | |
660 | (base32 | |
661 | "0kph9l3g7jb2bpmxdbdg5zl56wacmnvdvsdn7is1gc750sqvsn31")))) | |
662 | (build-system trivial-build-system) | |
663 | (arguments | |
664 | `(#:modules ((guix build utils)) | |
665 | #:builder | |
666 | (begin | |
667 | (use-modules (guix build utils)) | |
668 | ||
669 | (let ((unzip (string-append (assoc-ref %build-inputs "unzip") | |
670 | "/bin/unzip")) | |
671 | (font-dir (string-append %output "/share/fonts/opentype"))) | |
672 | (mkdir-p font-dir) | |
673 | (system* unzip | |
674 | (assoc-ref %build-inputs "source") | |
675 | "-d" font-dir))))) | |
676 | (native-inputs | |
677 | `(("unzip" ,unzip))) | |
678 | (home-page "http://www.gust.org.pl/projects/e-foundry/tex-gyre/") | |
679 | (synopsis "Remake of Ghostscript fonts") | |
680 | (description "The TeX Gyre collection of fonts is the result of an | |
681 | extensive remake and extension of the freely available base PostScript fonts | |
682 | distributed with Ghostscript version 4.00. The collection contains the | |
683 | following fonts in the OpenType format: Adventor, Bonum, Chorus, Cursor, | |
684 | Heros, Pagella, Schola, Termes.") | |
685 | (license license:gfl1.0))) | |
761b3d44 LF |
686 | |
687 | (define-public font-anonymous-pro | |
688 | (package | |
689 | (name "font-anonymous-pro") | |
690 | (version "1.002") | |
691 | (source (origin | |
692 | (method url-fetch) | |
693 | (uri (string-append | |
694 | "http://www.marksimonson.com/assets/content/fonts/" | |
695 | "AnonymousPro-" version ".zip")) | |
696 | (sha256 | |
697 | (base32 | |
698 | "1asj6lykvxh46czbal7ymy2k861zlcdqpz8x3s5bbpqwlm3mhrl6")))) | |
699 | (build-system trivial-build-system) | |
700 | (arguments | |
701 | `(#:modules ((guix build utils)) | |
702 | #:builder | |
703 | (begin | |
704 | (use-modules (guix build utils)) | |
705 | (let ((unzip (string-append (assoc-ref %build-inputs "unzip") | |
706 | "/bin/unzip")) | |
707 | (font-dir (string-append %output "/share/fonts/truetype")) | |
708 | (doc-dir (string-append %output "/share/doc/" ,name))) | |
709 | (system* unzip (assoc-ref %build-inputs "source")) | |
710 | (mkdir-p font-dir) | |
711 | (mkdir-p doc-dir) | |
712 | (chdir (string-append "AnonymousPro-" ,version ".001")) | |
713 | (for-each (lambda (ttf) | |
8837860c | 714 | (install-file ttf font-dir)) |
761b3d44 LF |
715 | (find-files "." "\\.ttf$")) |
716 | (for-each (lambda (doc) | |
8837860c | 717 | (install-file doc doc-dir)) |
761b3d44 LF |
718 | (find-files "." "\\.txt$")))))) |
719 | (native-inputs | |
720 | `(("unzip" ,unzip))) | |
721 | (home-page "http://www.marksimonson.com/fonts/view/anonymous-pro") | |
722 | (synopsis "Fixed-width fonts designed with coding in mind") | |
723 | (description "Anonymous Pro is a family of four fixed-width fonts designed | |
724 | with coding in mind. Anonymous Pro features an international, Unicode-based | |
725 | character set, with support for most Western and Central European Latin-based | |
726 | languages, plus Greek and Cyrillic.") | |
727 | (license license:silofl1.1))) | |
d032d965 SB |
728 | |
729 | (define-public font-gnu-unifont | |
730 | (package | |
731 | (name "font-gnu-unifont") | |
c88bee0a | 732 | (version "9.0.06") |
d032d965 SB |
733 | (source (origin |
734 | (method url-fetch) | |
735 | (uri (string-append | |
df320991 | 736 | "mirror://gnu/unifont/unifont-" version "/unifont-" |
d032d965 SB |
737 | version ".tar.gz")) |
738 | (sha256 | |
739 | (base32 | |
c88bee0a | 740 | "0ybyraxi8pngibazfq4zlsqmg8kn5xlhvaiwnxb11znhfi61vi87")))) |
d032d965 SB |
741 | (build-system gnu-build-system) |
742 | (outputs '("out" ; TrueType version | |
743 | "pcf" ; PCF (bitmap) version | |
744 | "psf" ; PSF (console) version | |
745 | "bin" ; Utilities to manipulate '.hex' format | |
746 | )) | |
747 | (arguments | |
748 | '(#:parallel-build? #f ; parallel build fails | |
749 | #:tests? #f ; no check target | |
750 | #:phases | |
751 | (modify-phases %standard-phases | |
c88bee0a EF |
752 | (replace |
753 | 'configure | |
754 | (lambda _ (setenv "CC" "gcc") #t)) | |
d032d965 SB |
755 | (replace |
756 | 'install | |
757 | (lambda* (#:key outputs #:allow-other-keys) | |
758 | (let* ((ttf (string-append (assoc-ref outputs "out") | |
759 | "/share/fonts/truetype")) | |
760 | (pcf (string-append (assoc-ref outputs "pcf") | |
761 | "/share/fonts/misc")) | |
762 | (psf (string-append (assoc-ref outputs "psf") | |
763 | "/share/consolefonts")) | |
764 | (bin (assoc-ref outputs "bin"))) | |
765 | (system* "make" | |
766 | (string-append "PREFIX=" bin) | |
767 | (string-append "TTFDEST=" ttf) | |
768 | (string-append "PCFDEST=" pcf) | |
769 | (string-append "CONSOLEDEST=" psf) | |
770 | "install") | |
771 | ;; Move Texinfo file to the right place. | |
772 | (mkdir (string-append bin "/share/info")) | |
773 | (rename-file (string-append bin "/share/unifont/unifont.info.gz") | |
774 | (string-append bin "/share/info/unifont.info.gz")) | |
775 | #t)))))) | |
776 | (inputs | |
777 | `(("perl" ,perl))) ; for utilities | |
778 | (synopsis | |
779 | "Large bitmap font covering Unicode's Basic Multilingual Plane") | |
780 | (description | |
781 | "GNU Unifont is a bitmap font covering essentially all of | |
782 | Unicode's Basic Multilingual Plane. The package also includes | |
783 | utilities to ease adding new glyphs to the font.") | |
784 | (home-page "http://unifoundry.com/unifont.html") | |
785 | (license license:gpl2+))) | |
b6ecac93 J |
786 | |
787 | (define-public font-google-noto | |
788 | (package | |
789 | (name "font-google-noto") | |
790 | (version "20150929") | |
791 | (source (origin | |
792 | (method url-fetch) | |
793 | (uri (string-append "https://noto-website-2.storage.googleapis.com/" | |
794 | "pkgs/Noto-hinted.zip")) | |
795 | (sha256 | |
796 | (base32 | |
797 | "13jhpqzhsqhyby8n0ksqg155a3jyaif3nzj9anzbq8s2gn1xjyd9")))) | |
798 | (build-system trivial-build-system) | |
799 | (arguments | |
800 | `(#:modules ((guix build utils)) | |
801 | #:builder (begin | |
802 | (use-modules (guix build utils) | |
803 | (srfi srfi-26)) | |
804 | ||
805 | (let ((PATH (string-append (assoc-ref %build-inputs | |
806 | "unzip") | |
807 | "/bin")) | |
808 | (font-dir (string-append %output | |
809 | "/share/fonts/truetype"))) | |
810 | (setenv "PATH" PATH) | |
811 | (system* "unzip" (assoc-ref %build-inputs "source")) | |
812 | ||
813 | (mkdir-p font-dir) | |
814 | (for-each (lambda (ttf) | |
8837860c | 815 | (install-file ttf font-dir)) |
b6ecac93 J |
816 | (find-files "." "\\.ttf$")) |
817 | (for-each (lambda (otf) | |
8837860c | 818 | (install-file otf font-dir)) |
b6ecac93 J |
819 | (find-files "." "\\.otf$")))))) |
820 | (native-inputs `(("unzip" ,unzip))) | |
821 | (home-page "https://www.google.com/get/noto/") | |
b4774d87 TGR |
822 | (synopsis "Fonts to cover all languages") |
823 | (description "Google Noto Fonts is a family of fonts designed to support | |
824 | all languages with a consistent look and aesthetic. Its goal is to properly | |
825 | display all Unicode symbols.") | |
b6ecac93 | 826 | (license license:silofl1.1))) |
aae6b4b9 | 827 | |
bb0756c7 | 828 | (define-public font-google-roboto |
829 | (package | |
830 | (name "font-google-roboto") | |
831 | (version "2.136") | |
832 | (source | |
833 | (origin | |
834 | (method url-fetch) | |
835 | (uri (string-append "https://github.com/google/roboto/releases/download/" | |
836 | "v" version "/roboto-hinted.zip")) | |
837 | (file-name (string-append name "-" version ".zip")) | |
838 | (sha256 | |
839 | (base32 | |
840 | "0spscx08fad7i8qs7icns96iwcapniq8lwwqqvbf7bamvs8qfln4")))) | |
841 | (native-inputs `(("unzip" ,unzip))) | |
842 | (build-system trivial-build-system) | |
843 | (arguments | |
844 | `(#:modules ((guix build utils)) | |
845 | #:builder (begin | |
846 | (use-modules (guix build utils) | |
847 | (srfi srfi-26)) | |
848 | ||
849 | (let ((PATH (string-append (assoc-ref %build-inputs | |
850 | "unzip") | |
851 | "/bin")) | |
852 | (font-dir (string-append %output | |
853 | "/share/fonts/truetype"))) | |
854 | (setenv "PATH" PATH) | |
855 | (system* "unzip" (assoc-ref %build-inputs "source")) | |
856 | ||
857 | (mkdir-p font-dir) | |
858 | (chdir "roboto-hinted") | |
859 | (for-each (lambda (ttf) | |
4dcb3db0 | 860 | (install-file ttf font-dir)) |
bb0756c7 | 861 | (find-files "." "\\.ttf$")))))) |
862 | (home-page "https://github.com/google/roboto") | |
863 | (synopsis "The Roboto family of fonts") | |
864 | (description | |
865 | "Roboto is Google’s signature family of fonts, the default font on Android | |
866 | and Chrome OS, and the recommended font for the | |
867 | visual language \"Material Design\".") | |
868 | (license license:asl2.0))) | |
869 | ||
aae6b4b9 | 870 | (define-public font-un |
871 | (package | |
872 | (name "font-un") | |
873 | (version "1.0.2-080608") | |
aae6b4b9 | 874 | (source (origin |
875 | (method url-fetch) | |
99a61dad | 876 | (uri (string-append |
877 | "https://kldp.net/unfonts/release/2607-" | |
878 | "un-fonts-core-" version ".tar.gz")) | |
aae6b4b9 | 879 | (file-name (string-append name "-" version ".tar.gz")) |
880 | (sha256 | |
881 | (base32 | |
882 | "13liaz2pmww3aqabm55la5npd08m1skh334ky7qfidxaz5s742iv")))) | |
883 | (build-system trivial-build-system) | |
884 | (arguments | |
885 | `(#:modules ((guix build utils)) | |
886 | #:builder | |
887 | (begin | |
888 | (use-modules (guix build utils)) | |
889 | ||
890 | (let ((tar (string-append (assoc-ref %build-inputs "tar") | |
891 | "/bin/tar")) | |
892 | (PATH (string-append (assoc-ref %build-inputs "gzip") | |
893 | "/bin")) | |
894 | (font-dir (string-append %output "/share/fonts/truetype")) | |
895 | (doc-dir (string-append %output "/share/doc/" ,name))) | |
896 | (setenv "PATH" PATH) | |
897 | (system* tar "xvf" (assoc-ref %build-inputs "source")) | |
898 | (mkdir-p font-dir) | |
899 | (mkdir-p doc-dir) | |
900 | (chdir (string-append "un-fonts")) | |
901 | (for-each (lambda (ttf) | |
8837860c | 902 | (install-file ttf font-dir)) |
aae6b4b9 | 903 | (find-files "." "\\.ttf$")) |
904 | (for-each (lambda (doc) | |
8837860c | 905 | (install-file doc doc-dir)) |
aae6b4b9 | 906 | '("COPYING" "README")))))) |
907 | (native-inputs | |
908 | `(("tar" ,tar) | |
909 | ("gzip" ,gzip))) | |
910 | (home-page "https://kldp.net/projects/unfonts/") | |
911 | (synopsis "Collection of Korean fonts") | |
912 | (description | |
913 | "Un-fonts is a family of mainly Korean fonts. | |
914 | It contains the following fonts and styles: | |
915 | ||
916 | @enumerate | |
917 | @item UnBatang, UnBatangBold: serif; | |
918 | @item UnDotum, UnDotumBold: sans-serif; | |
919 | @item UnGraphic, UnGraphicBold: sans-serif style; | |
920 | @item UnDinaru, UnDinaruBold, UnDinaruLight; | |
921 | @item UnPilgi, UnPilgiBold: script; | |
922 | @item UnGungseo: cursive, brush-stroke. | |
923 | @end enumerate\n") | |
924 | (license license:gpl2+))) | |
f85cafde EB |
925 | |
926 | (define-public font-fantasque-sans | |
927 | (package | |
928 | (name "font-fantasque-sans") | |
929 | (version "1.7.1") | |
930 | (source | |
931 | (origin | |
932 | (method url-fetch) | |
933 | (uri (string-append "https://github.com/belluzj/fantasque-sans/" | |
934 | "archive/v" version ".tar.gz")) | |
935 | (file-name (string-append name "-" version ".tar.gz")) | |
936 | (sha256 | |
937 | (base32 | |
938 | "07fpy53k2x2nz5q61swkab6cfk9gw2kc4x4brsj6zjgbm16fap85")))) | |
939 | (build-system gnu-build-system) | |
940 | (native-inputs | |
941 | `(("ttfautohint" ,ttfautohint) | |
942 | ("woff-tools" ,woff-tools) | |
943 | ("fontforge" ,fontforge) | |
944 | ("woff2" ,woff2) | |
945 | ("ttf2eot" ,ttf2eot))) | |
946 | (arguments | |
947 | `(#:tests? #f ;test target intended for visual inspection | |
948 | #:phases (modify-phases %standard-phases | |
949 | (delete 'configure) ;no configuration | |
950 | (replace 'install | |
951 | ;; 'make install' wants to install to ~/.fonts, install to | |
952 | ;; output instead. | |
953 | (lambda* (#:key outputs #:allow-other-keys) | |
954 | (let* ((out (assoc-ref outputs "out")) | |
955 | (font-dir (string-append out "/share/fonts")) | |
956 | (truetype-dir (string-append font-dir "/truetype")) | |
957 | (opentype-dir (string-append font-dir "/opentype")) | |
958 | (webfonts-dir (string-append font-dir "/webfonts"))) | |
959 | (copy-recursively "OTF" opentype-dir) | |
960 | (for-each (lambda (f) (install-file f truetype-dir)) | |
961 | (find-files "." "\\.ttf$")) | |
962 | (copy-recursively "Webfonts" webfonts-dir) | |
963 | #t)))))) | |
964 | (synopsis "Font family with a monospaced variant for programmers") | |
965 | (description | |
966 | "Fantasque Sans Mono is a programming font designed with functionality in | |
967 | mind. The font includes a bold version and a good italic version with new | |
968 | glyph designs, not just an added slant.") | |
969 | (home-page "https://fontlibrary.org/en/font/fantasque-sans-mono") | |
970 | (license license:silofl1.1))) | |
73c8d39c | 971 | |
972 | (define-public font-hack | |
973 | (package | |
974 | (name "font-hack") | |
975 | (version "2.020") | |
976 | (source (origin | |
977 | (method url-fetch) | |
978 | (uri (string-append | |
979 | "https://github.com/chrissimpkins/Hack/releases/download/v" | |
980 | version "/Hack-v" | |
981 | (string-replace-substring version "." "_") | |
982 | "-ttf.zip")) | |
983 | (sha256 | |
984 | (base32 | |
985 | "16kkmc3psckw1b7k07ccn1gi5ymhlg9djh43nqjzg065g6p6d184")))) | |
986 | (build-system trivial-build-system) | |
987 | (arguments | |
988 | `(#:modules ((guix build utils)) | |
989 | #:builder (begin | |
990 | (use-modules (guix build utils) | |
991 | (srfi srfi-26)) | |
992 | ||
993 | (let ((PATH (string-append (assoc-ref %build-inputs | |
994 | "unzip") | |
995 | "/bin")) | |
996 | (font-dir (string-append %output | |
b94ee996 | 997 | "/share/fonts/truetype"))) |
73c8d39c | 998 | (setenv "PATH" PATH) |
999 | (system* "unzip" (assoc-ref %build-inputs "source")) | |
1000 | ||
1001 | (mkdir-p font-dir) | |
73c8d39c | 1002 | (for-each (lambda (ttf) |
8837860c | 1003 | (install-file ttf font-dir)) |
b94ee996 | 1004 | (find-files "." "\\.ttf$")))))) |
73c8d39c | 1005 | (native-inputs |
1006 | `(("source" ,source) | |
1007 | ("unzip" ,unzip))) | |
1008 | (home-page "https://sourcefoundry.org/hack/") | |
b4774d87 | 1009 | (synopsis "Typeface designed for source code") |
73c8d39c | 1010 | (description |
b4774d87 TGR |
1011 | "Hack is designed to be a workhorse typeface for code. It expands upon |
1012 | the Bitstream Vera & DejaVu projects, provides 1561 glyphs, and includes | |
1013 | Powerline support.") | |
73c8d39c | 1014 | (license (license:x11-style |
1015 | "https://github.com/chrissimpkins/Hack/blob/master/LICENSE.md" | |
1016 | "Hack Open Font License v2.0")))) | |
6e1d7aa9 MB |
1017 | |
1018 | (define-public font-adobe-source-code-pro | |
1019 | (package | |
1020 | (name "font-adobe-source-code-pro") | |
1021 | (version "2.030R-ro-1.050R-it") | |
1022 | (source (origin | |
1023 | (method url-fetch) | |
1024 | (uri (string-append | |
1025 | "https://github.com/adobe-fonts/source-code-pro/archive/" | |
1026 | (regexp-substitute/global | |
1027 | ;; The upstream tag uses "/" between the roman and italic | |
1028 | ;; versions, so substitute our "-" separator here. | |
1029 | #f "R-ro-" version 'pre "R-ro/" 'post) ".tar.gz")) | |
1030 | (file-name (string-append name "-" version ".tar.gz")) | |
1031 | (sha256 | |
1032 | (base32 | |
1033 | "0arhhsf3i7ss39ykn73d1j8k4n8vx7115xph6jwkd970p1cxvr54")))) | |
1034 | (build-system trivial-build-system) | |
1035 | (arguments | |
1036 | `(#:modules ((guix build utils)) | |
1037 | #:builder | |
1038 | (begin | |
1039 | (use-modules (guix build utils)) | |
1040 | (let ((tar (string-append (assoc-ref %build-inputs "tar") | |
1041 | "/bin/tar")) | |
1042 | (PATH (string-append (assoc-ref %build-inputs "gzip") | |
1043 | "/bin")) | |
1044 | (font-dir (string-append %output "/share/fonts/opentype"))) | |
1045 | (setenv "PATH" PATH) | |
1046 | (mkdir-p font-dir) | |
1047 | (zero? (system* tar "-C" font-dir "--strip-components=2" | |
1048 | "-xvf" (assoc-ref %build-inputs "source") | |
1049 | (string-append "source-code-pro-" | |
1050 | ,version "/OTF"))))))) | |
1051 | (native-inputs | |
1052 | `(("gzip" ,gzip) | |
1053 | ("tar" ,tar))) | |
1054 | (home-page "https://github.com/adobe-fonts/source-code-pro") | |
1055 | (synopsis | |
1056 | "Monospaced font family for user interface and coding environments") | |
1057 | (description | |
1058 | "Source Code Pro is a set of monospaced OpenType fonts that have been | |
1059 | designed to work well in user interface environments.") | |
1060 | (license license:silofl1.1))) | |
c3e2a247 TR |
1061 | |
1062 | (define-public font-fira-mono | |
1063 | (package | |
1064 | (name "font-fira-mono") | |
1065 | (version "3.206") | |
1066 | (source (origin | |
1067 | (method url-fetch) | |
1068 | (uri (string-append "https://carrois.com/downloads/fira_mono_3_2/" | |
1069 | "FiraMonoFonts" | |
1070 | (string-replace-substring version "." "") | |
1071 | ".zip")) | |
1072 | (sha256 | |
1073 | (base32 | |
1074 | "1z65x0dw5dq6rs6p9wyfrir50rlh95vgzsxr8jcd40nqazw4jhpi")))) | |
1075 | (build-system trivial-build-system) | |
1076 | (arguments | |
1077 | `(#:modules ((guix build utils)) | |
1078 | #:builder | |
1079 | (begin | |
1080 | (use-modules (guix build utils)) | |
1081 | (let ((unzip (string-append (assoc-ref %build-inputs "unzip") | |
1082 | "/bin/unzip")) | |
1083 | (font-dir (string-append %output "/share/fonts/opentype"))) | |
1084 | (mkdir-p font-dir) | |
1085 | (system* unzip | |
1086 | "-j" | |
1087 | (assoc-ref %build-inputs "source") | |
1088 | "*.otf" | |
1089 | "-d" font-dir))))) | |
1090 | (native-inputs | |
1091 | `(("unzip" ,unzip))) | |
1092 | (home-page "http://mozilla.github.io/Fira/") | |
1093 | (synopsis "Mozilla's monospace font") | |
1094 | (description "This is the typeface used by Mozilla in Firefox OS.") | |
1095 | (license license:silofl1.1))) | |
83421fc7 JMSG |
1096 | |
1097 | (define-public font-awesome | |
1098 | (package | |
1099 | (name "font-awesome") | |
1100 | (version "4.7.0") | |
1101 | (source (origin | |
1102 | (method url-fetch) | |
1103 | (uri (string-append "http://fontawesome.io/assets/" | |
1104 | name "-" version ".zip")) | |
1105 | (sha256 | |
1106 | (base32 | |
1107 | "1frhmw41lnnm9rda2zs202pvfi5vzlrsw4xfp4mswl0qgws61mcd")))) | |
1108 | (build-system trivial-build-system) | |
1109 | (native-inputs | |
1110 | `(("unzip" ,unzip))) | |
1111 | (arguments | |
1112 | `(#:modules ((guix build utils)) | |
1113 | #:builder (begin | |
1114 | (use-modules (guix build utils)) | |
1115 | (let* ((font-dir (string-append %output | |
1116 | "/share/fonts/opentype")) | |
1117 | (source (assoc-ref %build-inputs "source")) | |
1118 | (src-otf-file (string-append "font-awesome-" | |
1119 | ,version | |
1120 | "/fonts/FontAwesome.otf")) | |
1121 | (dest-otf-file (string-append font-dir "/FontAwesome.otf")) | |
1122 | (unzip (assoc-ref %build-inputs "unzip"))) | |
1123 | (setenv "PATH" (string-append unzip "/bin")) | |
1124 | (mkdir-p font-dir) | |
1125 | (system* "unzip" source "-d" ".") | |
1126 | (copy-file src-otf-file dest-otf-file))))) | |
1127 | (home-page "http://fontawesome.io") | |
1128 | (synopsis "Font that contains a rich iconset") | |
1129 | (description | |
1130 | "Font Awesome is a full suite of pictographic icons for easy scalable | |
1131 | vector graphics.") | |
1132 | (license license:silofl1.1))) | |
446e1d51 | 1133 | |
f2a7ce50 | 1134 | (define-public font-tamzen |
1135 | (package | |
1136 | (name "font-tamzen") | |
1137 | (version "1.11.4") | |
1138 | (source | |
1139 | (origin | |
1140 | (method url-fetch) | |
1141 | (uri (string-append "https://github.com/sunaku/tamzen-font/archive/" | |
1142 | "Tamzen-" version ".tar.gz")) | |
1143 | (file-name (string-append name "-" version ".tar.gz")) | |
1144 | (sha256 | |
1145 | (base32 | |
1146 | "1ryd7gp6qiwaqw73jqbmh4kwlriyd8xykh4j7z90z8xp9fm7lrys")))) | |
1147 | (build-system trivial-build-system) | |
1148 | (arguments | |
1149 | `(#:modules ((guix build utils)) | |
1150 | #:builder | |
1151 | (begin | |
1152 | (use-modules (guix build utils)) | |
1153 | ||
1154 | (let ((tar (string-append (assoc-ref %build-inputs "tar") | |
1155 | "/bin/tar")) | |
1156 | (PATH (string-append (assoc-ref %build-inputs "gzip") | |
1157 | "/bin")) | |
1158 | (font-dir (string-append %output "/share/fonts/misc")) | |
1159 | (psf-dir (string-append %output "/share/kbd/consolefonts")) | |
1160 | (src-pcf-dir (string-append "tamzen-font-Tamzen-" | |
1161 | ,version "/pcf"))) | |
1162 | (setenv "PATH" PATH) | |
1163 | (system* tar "xvf" (assoc-ref %build-inputs "source")) | |
1164 | (mkdir-p font-dir) | |
1165 | (mkdir-p psf-dir) | |
1166 | (chdir src-pcf-dir) | |
1167 | (for-each (lambda (pcf) | |
1168 | (install-file pcf font-dir)) | |
1169 | (find-files "." "\\.pcf$")) | |
1170 | (chdir "../psf") | |
1171 | (for-each (lambda (psf) | |
1172 | (install-file psf psf-dir)) | |
1173 | (find-files "." "\\.psf$")) | |
1174 | #t)))) | |
1175 | (native-inputs | |
1176 | `(("tar" ,tar) | |
1177 | ("gzip" ,gzip))) | |
1178 | (home-page "https://github.com/sunaku/tamzen-font") | |
1179 | (synopsis "Monospaced bitmap font for console and X11") | |
1180 | (description | |
1181 | "Tamzen is a fork of the @code{Tamsyn} font. It is programatically forked | |
1182 | from @code{Tamsyn} version 1.11, backporting glyphs from older versions while | |
1183 | deleting deliberately empty glyphs (which are marked as unimplemented) to | |
1184 | allow secondary/fallback fonts to provide real glyphs at those codepoints. | |
1185 | ||
1186 | The @code{TamzenForPowerline} fonts provide additional @code{Powerline} symbols, | |
1187 | which are programatically injected with @code{bitmap-font-patcher} and | |
1188 | later hand-tweaked with the gbdfed(1) editor: | |
1189 | ||
1190 | @enumerate | |
1191 | @item all icons are expanded to occupy the maximum available space | |
1192 | @item the branch of the fork icon ( U+E0A0) was made larger than the trunk | |
1193 | @item for the newline icon ( U+E0A1), the @emph{N} was made larger at the bottom | |
1194 | @item the keyhole in the padlock icon ( U+E0A2) was replaced with @emph{//} lines. | |
1195 | @end enumerate\n") | |
1196 | (license (license:non-copyleft "file://LICENSE")))) | |
1197 | ||
446e1d51 AG |
1198 | (define-public font-comic-neue |
1199 | (package | |
1200 | (name "font-comic-neue") | |
1201 | (version "2.3") | |
1202 | (source (origin | |
1203 | (method url-fetch) | |
1204 | (uri (string-append | |
1205 | "http://www.comicneue.com/comic-neue-" version ".zip")) | |
1206 | (sha256 | |
1207 | (base32 | |
1208 | "1695hkpd8kqnr2a88p8xs496slgzxjjkzpa9aa33ml3pnh7519zk")))) | |
1209 | (build-system trivial-build-system) | |
1210 | (arguments | |
1211 | `(#:modules ((guix build utils)) | |
1212 | #:builder (begin | |
1213 | (use-modules (guix build utils)) | |
1214 | (let ((font-dir (string-append %output | |
1215 | "/share/fonts/truetype")) | |
1216 | (source (assoc-ref %build-inputs "source")) | |
1217 | (unzip (string-append (assoc-ref %build-inputs "unzip") | |
1218 | "/bin/unzip"))) | |
1219 | (mkdir-p font-dir) | |
1220 | (system* unzip source) | |
1221 | (with-directory-excursion | |
1222 | (string-append "Web") | |
1223 | (for-each (lambda (ttf) | |
1224 | (install-file ttf font-dir)) | |
1225 | (find-files "." "\\.ttf$"))))))) | |
1226 | (native-inputs `(("unzip" ,unzip))) | |
1227 | (home-page "http://www.comicneue.com/") | |
1228 | (synopsis "Font that fixes the shortcomings of Comic Sans") | |
1229 | (description | |
1230 | "Comic Neue is a font that attempts to create a respectable casual | |
1231 | typeface, by mimicking Comic Sans while fixing its most obvious shortcomings.") | |
1232 | (license license:silofl1.1))) | |
de191caf AG |
1233 | |
1234 | (define-public font-iosevka | |
1235 | (package | |
1236 | (name "font-iosevka") | |
1237 | (version "1.11.0") | |
1238 | (source (origin | |
1239 | (method url-fetch) | |
1240 | (uri (string-append | |
1241 | "https://github.com/be5invis/Iosevka/releases/download/v" | |
1242 | version "/iosevka-pack-" version ".zip")) | |
1243 | (sha256 | |
1244 | (base32 | |
1245 | "0d8prdk7s5z94sdfd0y92cvqq531yqrlg7hnadbnhd7fs9jqr5hj")))) | |
1246 | (build-system trivial-build-system) | |
1247 | (arguments | |
1248 | `(#:modules ((guix build utils)) | |
1249 | #:builder (begin | |
1250 | (use-modules (guix build utils)) | |
1251 | (let ((font-dir (string-append %output | |
1252 | "/share/fonts/truetype")) | |
1253 | (source (assoc-ref %build-inputs "source")) | |
1254 | (unzip (string-append (assoc-ref %build-inputs "unzip") | |
1255 | "/bin/unzip"))) | |
1256 | (mkdir-p font-dir) | |
1257 | (system* unzip "-d" font-dir source))))) | |
1258 | (native-inputs `(("unzip" ,unzip))) | |
1259 | (home-page "https://be5invis.github.io/Iosevka/") | |
1260 | (synopsis "Coders' typeface, built from code") | |
1261 | (description | |
1262 | "Iosevka is a slender monospace sans-serif or slab-serif typeface inspired | |
1263 | by Pragmata Pro, M+, and PF DIN Mono, designed to be the ideal font for | |
1264 | programming. Iosevka is completely generated from its source code.") | |
1265 | (license (list license:silofl1.1 ; build artifacts (i.e. the fonts) | |
1266 | license:bsd-3)))) ; supporting code | |
49dbae54 AG |
1267 | |
1268 | (define-public font-go | |
1269 | (let ((commit "b7f8df6bc082334698d4505fb85fa05e99156b72") | |
1270 | (revision "1")) | |
1271 | (package | |
1272 | (name "font-go") | |
1273 | (version (string-append "20161115-" revision "." (string-take commit 7))) | |
1274 | (source (origin | |
1275 | (file-name (string-append "go-image-" version "-checkout")) | |
1276 | (method git-fetch) | |
1277 | (uri (git-reference | |
1278 | (url "https://go.googlesource.com/image") | |
1279 | (commit commit))) | |
1280 | (sha256 | |
1281 | (base32 | |
1282 | "1ywxs6dmcyzwwsmnan3qqza7znprnbvmdi260x6sjmydz6dyq2zs")))) | |
1283 | (build-system trivial-build-system) | |
1284 | (arguments | |
1285 | `(#:modules ((guix build utils)) | |
1286 | #:builder (begin | |
1287 | (use-modules (guix build utils)) | |
1288 | (let ((font-dir (string-append %output | |
1289 | "/share/fonts/truetype")) | |
1290 | (source (assoc-ref %build-inputs "source"))) | |
1291 | (mkdir-p font-dir) | |
1292 | (with-directory-excursion | |
1293 | (string-append source "/font/gofont/ttfs") | |
1294 | (for-each (lambda (ttf) | |
1295 | (install-file ttf font-dir)) | |
1296 | (find-files "." "\\.ttf$"))))))) | |
1297 | (home-page "https://blog.golang.org/go-fonts") | |
1298 | (synopsis "The Go font family") | |
1299 | (description | |
1300 | "The Go font family is a set of WGL4 TrueType fonts from the Bigelow & | |
1301 | Holmes type foundry, released under the same license as the Go programming | |
1302 | language. It includes a set of proportional, sans-serif fonts, and a set of | |
1303 | monospace, slab-serif fonts.") | |
1304 | (license (package-license go-1.4))))) | |
824e5fe6 JMSG |
1305 | |
1306 | (define-public font-google-material-design-icons | |
1307 | (package | |
1308 | (name "font-google-material-design-icons") | |
1309 | (version "3.0.1") | |
1310 | (source (origin | |
1311 | (method url-fetch) | |
1312 | (uri (string-append | |
1313 | "https://github.com/google/material-design-icons/archive/" | |
1314 | version ".tar.gz")) | |
1315 | (sha256 | |
1316 | (base32 | |
1317 | "183n0qv3q8w6n27libarq1fhc4mqv2d3sasbfmbn7x9r5pw9c6ga")) | |
1318 | (file-name (string-append name "-" version ".tar.gz")))) | |
1319 | (build-system trivial-build-system) | |
1320 | (native-inputs | |
1321 | `(("tar" ,tar) | |
1322 | ("gzip" ,gzip))) | |
1323 | (arguments | |
1324 | `(#:modules ((guix build utils)) | |
1325 | #:builder (begin | |
1326 | (use-modules (guix build utils)) | |
1327 | (let* ((font-dir (string-append %output | |
1328 | "/share/fonts/truetype")) | |
1329 | (source (assoc-ref %build-inputs "source")) | |
1330 | (font-filename "MaterialIcons-Regular.ttf") | |
1331 | (src-ttf-file (string-append "material-design-icons-" | |
1332 | ,version | |
1333 | "/iconfont/" | |
1334 | font-filename)) | |
1335 | (dest-ttf-file (string-append font-dir font-filename)) | |
1336 | (gzip (assoc-ref %build-inputs "gzip")) | |
1337 | (tar (assoc-ref %build-inputs "tar"))) | |
1338 | (setenv "PATH" (string-append gzip "/bin:" | |
1339 | tar "/bin:")) | |
1340 | (system* "tar" "xf" source) | |
1341 | (mkdir-p font-dir) | |
1342 | (copy-file src-ttf-file dest-ttf-file))))) | |
1343 | (home-page "http://google.github.io/material-design-icons") | |
1344 | (synopsis "Icon font of Google Material Design icons") | |
1345 | (description | |
1346 | "Material design system icons are simple, modern, friendly, and sometimes | |
1347 | quirky. Each icon is created using our design guidelines to depict in simple | |
1348 | and minimal forms the universal concepts used commonly throughout a UI. | |
1349 | Ensuring readability and clarity at both large and small sizes, these icons | |
1350 | have been optimized for beautiful display on all common platforms and display | |
1351 | resolutions.") | |
1352 | (license license:asl2.0))) |