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> |
72f210ea | 3 | ;;; Copyright © 2014 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> |
3f88152d | 8 | ;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net> |
df320991 | 9 | ;;; Copyright © 2015, 2016 Leo Famulari <leo@famulari.name> |
679b535b | 10 | ;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is> |
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> |
86f1537d AE |
16 | ;;; |
17 | ;;; This file is part of GNU Guix. | |
18 | ;;; | |
19 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
20 | ;;; under the terms of the GNU General Public License as published by | |
21 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
22 | ;;; your option) any later version. | |
23 | ;;; | |
24 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
25 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
26 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
27 | ;;; GNU General Public License for more details. | |
28 | ;;; | |
29 | ;;; You should have received a copy of the GNU General Public License | |
30 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
31 | ||
32 | (define-module (gnu packages fonts) | |
6e1d7aa9 | 33 | #:use-module (ice-9 regex) |
71be99b8 | 34 | #:use-module (guix utils) |
b5b73a82 | 35 | #:use-module ((guix licenses) #:prefix license:) |
86f1537d AE |
36 | #:use-module (guix packages) |
37 | #:use-module (guix download) | |
d41bb065 | 38 | #:use-module (guix build-system gnu) |
86f1537d | 39 | #:use-module (guix build-system trivial) |
56b7a338 | 40 | #:use-module (gnu packages base) |
d41bb065 | 41 | #:use-module (gnu packages compression) |
47268eec | 42 | #:use-module (gnu packages fontutils) |
d41bb065 | 43 | #:use-module (gnu packages perl) |
47268eec AE |
44 | #:use-module (gnu packages pkg-config) |
45 | #:use-module (gnu packages python) | |
d41bb065 | 46 | #:use-module (gnu packages xorg) |
47268eec | 47 | #:use-module (gnu packages zip)) |
86f1537d | 48 | |
477ac94b | 49 | (define-public font-inconsolata |
dede51a1 ED |
50 | (package |
51 | (name "font-inconsolata") | |
52 | (version "0.80") | |
53 | (source (origin | |
54 | (method url-fetch) | |
55 | (uri "http://www.levien.com/type/myfonts/Inconsolata.otf") | |
56 | (sha256 | |
57 | (base32 | |
58 | "06js6znbcf7swn8y3b8ki416bz96ay7d3yvddqnvi88lqhbfcq8m")))) | |
59 | (build-system trivial-build-system) | |
60 | (arguments | |
61 | `(#:modules ((guix build utils)) | |
62 | #:builder (begin | |
63 | (use-modules (guix build utils)) | |
64 | (let ((font-dir (string-append %output | |
65 | "/share/fonts/opentype")) | |
66 | (source (assoc-ref %build-inputs "source"))) | |
67 | (mkdir-p font-dir) | |
68 | (copy-file source | |
69 | (string-append font-dir "/" "inconsolata.otf")))))) | |
70 | (native-inputs `(("source" ,source))) | |
71 | (home-page "http://levien.com/type/myfonts/inconsolata.html") | |
72 | (synopsis "Monospace font") | |
73 | (description "A monospace font, designed for code listings and the like, | |
74 | in print. With attention to detail for high resolution rendering.") | |
75 | (license license:silofl1.1))) | |
76 | ||
e93b88f7 ED |
77 | (define-public font-ubuntu |
78 | (package | |
79 | (name "font-ubuntu") | |
29f9abb4 | 80 | (version "0.83") |
e93b88f7 ED |
81 | (source (origin |
82 | (method url-fetch) | |
29f9abb4 AK |
83 | (uri (string-append |
84 | "http://font.ubuntu.com/download/ubuntu-font-family-" | |
85 | version ".zip")) | |
e93b88f7 ED |
86 | (sha256 |
87 | (base32 | |
29f9abb4 | 88 | "0hjvq2x758dx0sfwqhzflns0ns035qm7h6ygskbx1svzg517sva5")))) |
e93b88f7 ED |
89 | (build-system trivial-build-system) |
90 | (arguments | |
91 | `(#:modules ((guix build utils)) | |
92 | #:builder (begin | |
93 | (use-modules (guix build utils) | |
94 | (srfi srfi-26)) | |
95 | ||
96 | (let ((PATH (string-append (assoc-ref %build-inputs | |
97 | "unzip") | |
98 | "/bin")) | |
99 | (font-dir (string-append %output | |
100 | "/share/fonts/truetype")) | |
101 | (doc-dir (string-append %output "/share/doc/" | |
102 | ,name "-" ,version))) | |
103 | (setenv "PATH" PATH) | |
104 | (system* "unzip" (assoc-ref %build-inputs "source")) | |
105 | ||
106 | (mkdir-p font-dir) | |
107 | (mkdir-p doc-dir) | |
108 | (chdir (string-append "ubuntu-font-family-" ,version)) | |
109 | (for-each (lambda (ttf) | |
110 | (copy-file ttf | |
111 | (string-append font-dir "/" ttf))) | |
112 | (find-files "." "\\.ttf$")) | |
113 | (for-each (lambda (doc) | |
114 | (copy-file doc | |
115 | (string-append doc-dir "/" doc))) | |
116 | (find-files "." "\\.txt$")))))) | |
117 | (native-inputs `(("source" ,source) | |
118 | ("unzip" ,unzip))) | |
119 | (home-page "http://font.ubuntu.com/") | |
120 | (synopsis "The Ubuntu Font Family") | |
121 | (description "The Ubuntu Font Family is a unique, custom designed font | |
122 | that has a very distinctive look and feel. This package provides the | |
123 | TrueType (TTF) files.") | |
124 | (license | |
125 | (license:non-copyleft | |
126 | "http://font.ubuntu.com/ufl/ubuntu-font-licence-1.0.txt" | |
127 | "Ubuntu Font License v1.0")))) | |
128 | ||
5e6bdf06 | 129 | (define-public font-dejavu |
72f210ea | 130 | (package |
5e6bdf06 | 131 | (name "font-dejavu") |
d7284b6a | 132 | (version "2.37") |
72f210ea MW |
133 | (source (origin |
134 | (method url-fetch) | |
de67e922 | 135 | (uri (string-append "mirror://sourceforge/dejavu/dejavu/" |
72f210ea MW |
136 | version "/dejavu-fonts-ttf-" |
137 | version ".tar.bz2")) | |
138 | (sha256 | |
139 | (base32 | |
d7284b6a | 140 | "1mqpds24wfs5cmfhj57fsfs07mji2z8812i5c4pi5pbi738s977s")))) |
72f210ea MW |
141 | (build-system trivial-build-system) |
142 | (arguments | |
143 | `(#:modules ((guix build utils)) | |
144 | #:builder (begin | |
145 | (use-modules (guix build utils)) | |
146 | ||
147 | (let ((tar (string-append (assoc-ref %build-inputs | |
148 | "tar") | |
149 | "/bin/tar")) | |
150 | (PATH (string-append (assoc-ref %build-inputs | |
151 | "bzip2") | |
152 | "/bin")) | |
153 | (font-dir (string-append | |
154 | %output "/share/fonts/truetype")) | |
155 | (conf-dir (string-append | |
156 | %output "/share/fontconfig/conf.avail")) | |
157 | (doc-dir (string-append | |
158 | %output "/share/doc/" ,name "-" ,version))) | |
159 | (setenv "PATH" PATH) | |
160 | (system* tar "xvf" (assoc-ref %build-inputs "source")) | |
161 | ||
162 | (mkdir-p font-dir) | |
163 | (mkdir-p conf-dir) | |
164 | (mkdir-p doc-dir) | |
165 | (chdir (string-append "dejavu-fonts-ttf-" ,version)) | |
166 | (for-each (lambda (ttf) | |
167 | (copy-file ttf | |
168 | (string-append font-dir "/" | |
169 | (basename ttf)))) | |
170 | (find-files "ttf" "\\.ttf$")) | |
171 | (for-each (lambda (conf) | |
172 | (copy-file conf | |
173 | (string-append conf-dir "/" | |
174 | (basename conf)))) | |
175 | (find-files "fontconfig" "\\.conf$")) | |
176 | (for-each (lambda (doc) | |
177 | (copy-file doc | |
178 | (string-append doc-dir "/" | |
179 | (basename doc)))) | |
180 | (find-files "." "\\.txt$|^[A-Z][A-Z]*$")))))) | |
181 | (native-inputs `(("source" ,source) | |
182 | ("tar" ,tar) | |
183 | ("bzip2" ,bzip2))) | |
184 | (home-page "http://dejavu-fonts.org/") | |
185 | (synopsis "Vera font family derivate with additional characters") | |
186 | (description "DejaVu provides an expanded version of the Vera font family | |
187 | aiming for quality and broader Unicode coverage while retaining the original | |
188 | Vera style. DejaVu currently works towards conformance with the Multilingual | |
189 | European Standards (MES-1 and MES-2) for Unicode coverage. The DejaVu fonts | |
190 | provide serif, sans and monospaced variants.") | |
191 | (license | |
192 | (license:x11-style | |
193 | "http://dejavu-fonts.org/")))) | |
194 | ||
5e6bdf06 | 195 | (define-public font-bitstream-vera |
86f1537d | 196 | (package |
5e6bdf06 | 197 | (name "font-bitstream-vera") |
86f1537d AE |
198 | (version "1.10") |
199 | (source (origin | |
200 | (method url-fetch) | |
201 | (uri (string-append "mirror://gnome/sources/ttf-bitstream-vera/" | |
202 | version "/ttf-bitstream-vera-" | |
203 | version ".tar.bz2")) | |
204 | (sha256 | |
205 | (base32 | |
206 | "1p3qs51x5327gnk71yq8cvmxc6wgx79sqxfvxcv80cdvgggjfnyv")))) | |
207 | (build-system trivial-build-system) | |
208 | (arguments | |
209 | `(#:modules ((guix build utils)) | |
210 | #:builder (begin | |
211 | (use-modules (guix build utils) | |
212 | (srfi srfi-26)) | |
213 | ||
214 | (let ((tar (string-append (assoc-ref %build-inputs | |
215 | "tar") | |
216 | "/bin/tar")) | |
217 | (PATH (string-append (assoc-ref %build-inputs | |
218 | "bzip2") | |
219 | "/bin")) | |
220 | (font-dir (string-append %output | |
221 | "/share/fonts/truetype")) | |
222 | (doc-dir (string-append %output "/share/doc/" | |
223 | ,name "-" ,version))) | |
224 | (setenv "PATH" PATH) | |
225 | (system* tar "xvf" (assoc-ref %build-inputs "source")) | |
226 | ||
227 | (mkdir-p font-dir) | |
228 | (mkdir-p doc-dir) | |
229 | (chdir (string-append "ttf-bitstream-vera-" ,version)) | |
230 | (for-each (lambda (ttf) | |
231 | (copy-file ttf | |
232 | (string-append font-dir "/" ttf))) | |
233 | (find-files "." "\\.ttf$")) | |
234 | (for-each (lambda (doc) | |
235 | (copy-file doc | |
236 | (string-append doc-dir "/" doc))) | |
237 | (find-files "." "\\.TXT$")))))) | |
238 | (native-inputs `(("source" ,source) | |
239 | ("tar" ,tar) | |
240 | ("bzip2" ,bzip2))) | |
07af3e5e | 241 | (home-page "http://www.gnome.org/fonts/") |
86f1537d AE |
242 | (synopsis "Bitstream Vera sans-serif typeface") |
243 | (description "Vera is a sans-serif typeface from Bitstream, Inc. This | |
244 | package provides the TrueType (TTF) files.") | |
245 | (license | |
246 | (license:x11-style | |
07af3e5e | 247 | "http://www.gnome.org/fonts/#Final_Bitstream_Vera_Fonts")))) |
86f1537d | 248 | |
71be99b8 LC |
249 | (define-public font-cantarell |
250 | (package | |
251 | (name "font-abattis-cantarell") | |
252 | (version "0.0.24") | |
253 | (source (origin | |
254 | (method url-fetch) | |
255 | (uri (string-append "mirror://gnome/sources/cantarell-fonts/" | |
256 | (version-major+minor version) | |
257 | "/cantarell-fonts-" version ".tar.xz")) | |
258 | (sha256 | |
259 | (base32 | |
260 | "0r4jnc2x9yncf40lixjb1pqgpq8rzbi2fz33pshlqzjgx2d69bcw")))) | |
261 | (build-system gnu-build-system) | |
262 | (home-page "https://wiki.gnome.org/Projects/CantarellFonts") | |
263 | (synopsis "Cantarell sans-serif typeface") | |
264 | (description "The Cantarell font family is a contemporary Humanist | |
265 | sans-serif designed for on-screen reading. It is used by GNOME@tie{}3.") | |
266 | (license license:silofl1.1))) | |
267 | ||
5e6bdf06 | 268 | (define-public font-gnu-freefont-ttf |
86f1537d | 269 | (package |
5e6bdf06 | 270 | (name "font-gnu-freefont-ttf") |
47268eec | 271 | (version "20120503") |
86f1537d AE |
272 | (source (origin |
273 | (method url-fetch) | |
47268eec | 274 | (uri (string-append "mirror://gnu/freefont/freefont-src-" |
86f1537d AE |
275 | version ".tar.gz")) |
276 | (sha256 | |
277 | (base32 | |
47268eec AE |
278 | "0yk58blhcd4hm7nyincmqq4jrzjjk82wif2zmk1l3y2m4vif4qhd")))) |
279 | (build-system gnu-build-system) | |
86f1537d | 280 | (arguments |
47268eec AE |
281 | `(#:phases (modify-phases %standard-phases |
282 | (delete 'configure) | |
283 | (replace 'install | |
284 | (lambda _ | |
285 | (let ((doc-dir (string-append %output "/share/doc/" | |
286 | ,name "-" ,version)) | |
287 | (font-dir (string-append %output | |
288 | "/share/fonts/truetype"))) | |
289 | (mkdir-p doc-dir) | |
290 | (substitute* "Makefile" | |
291 | (("\\$\\(TMPDIR\\)") doc-dir) | |
292 | (("sfd/\\*.ttf") "")) | |
293 | (system* "make" "ttftar") | |
294 | (mkdir-p font-dir) | |
295 | (for-each (lambda (file) | |
86f1537d | 296 | (copy-file file |
47268eec AE |
297 | (string-append font-dir "/" |
298 | (basename file)))) | |
299 | (filter | |
300 | (lambda (file) (string-suffix? "ttf" file)) | |
301 | (find-files "." ""))))))) | |
302 | #:test-target "tests")) | |
303 | ;; replace python 3 with python 2 | |
304 | ;; python 3 support commits aren't yet released in 20120503 | |
305 | ;; so freefont needs python 2 support in fontforge | |
306 | (native-inputs `(("fontforge" ,(package (inherit fontforge) | |
307 | (inputs `(("python-2" ,python-2) | |
308 | ,@(package-inputs fontforge))))))) | |
86f1537d AE |
309 | (home-page "http://www.gnu.org/software/freefont/") |
310 | (synopsis "Unicode-encoded outline fonts") | |
311 | (description | |
312 | "The GNU Freefont project aims to provide a set of free outline | |
313 | (PostScript Type0, TrueType, OpenType...) fonts covering the ISO | |
314 | 10646/Unicode UCS (Universal Character Set).") | |
63e8bb12 LC |
315 | (license license:gpl3+) |
316 | (properties '((upstream-name . "freefont") | |
317 | (ftp-directory . "/gnu/freefont"))))) | |
d41bb065 | 318 | |
16191117 AK |
319 | (define-public font-liberation |
320 | (package | |
321 | (name "font-liberation") | |
322 | (version "2.00.1") | |
323 | (source (origin | |
324 | (method url-fetch) | |
325 | (uri (string-append "https://fedorahosted.org/releases/l/i/" | |
326 | "liberation-fonts/liberation-fonts-ttf-" | |
327 | version ".tar.gz")) | |
328 | (sha256 | |
329 | (base32 | |
330 | "010m4zfqan4w04b6bs9pm3gapn9hsb18bmwwgp2p6y6idj52g43q")))) | |
331 | (build-system trivial-build-system) | |
332 | (arguments | |
333 | `(#:modules ((guix build utils)) | |
334 | #:builder | |
335 | (begin | |
336 | (use-modules (guix build utils)) | |
337 | ||
338 | (let ((tar (string-append (assoc-ref %build-inputs "tar") | |
339 | "/bin/tar")) | |
340 | (PATH (string-append (assoc-ref %build-inputs "gzip") | |
341 | "/bin")) | |
342 | (font-dir (string-append %output "/share/fonts/truetype")) | |
343 | (doc-dir (string-append %output "/share/doc/" ,name))) | |
344 | (setenv "PATH" PATH) | |
345 | (system* tar "xvf" (assoc-ref %build-inputs "source")) | |
346 | (mkdir-p font-dir) | |
347 | (mkdir-p doc-dir) | |
348 | (chdir (string-append "liberation-fonts-ttf-" ,version)) | |
349 | (for-each (lambda (ttf) | |
350 | (copy-file ttf | |
351 | (string-append font-dir "/" | |
352 | (basename ttf)))) | |
353 | (find-files "." "\\.ttf$")) | |
354 | (for-each (lambda (doc) | |
355 | (copy-file doc | |
356 | (string-append doc-dir "/" | |
357 | (basename doc)))) | |
358 | '("AUTHORS" "ChangeLog" "LICENSE" "README" "TODO")))))) | |
359 | (native-inputs | |
360 | `(("source" ,source) | |
361 | ("tar" ,tar) | |
362 | ("gzip" ,gzip))) | |
363 | (home-page "https://fedorahosted.org/liberation-fonts/") | |
364 | (synopsis | |
365 | "Fonts compatible with Arial, Times New Roman, and Courier New") | |
366 | (description | |
367 | "The Liberation font family aims at metric compatibility with | |
368 | Arial, Times New Roman, and Courier New. | |
369 | ||
370 | There are three sets: | |
371 | ||
372 | - Sans (a substitute for Arial, Albany, Helvetica, Nimbus Sans L, and | |
373 | Bitstream Vera Sans); | |
374 | ||
375 | - Serif (a substitute for Times New Roman, Thorndale, Nimbus Roman, and | |
376 | Bitstream Vera Serif); | |
377 | ||
378 | - Mono (a substitute for Courier New, Cumberland, Courier, Nimbus Mono L, | |
379 | and Bitstream Vera Sans Mono). | |
380 | ||
381 | The Liberation Fonts are sponsored by Red Hat.") | |
382 | (license license:silofl1.1))) | |
383 | ||
5e6bdf06 | 384 | (define-public font-terminus |
d41bb065 | 385 | (package |
5e6bdf06 | 386 | (name "font-terminus") |
acb38156 | 387 | (version "4.40") |
d41bb065 JG |
388 | (source |
389 | (origin | |
390 | (method url-fetch) | |
391 | (uri (string-append | |
0f971a04 | 392 | "mirror://sourceforge/terminus-font/terminus-font-" |
d41bb065 JG |
393 | version |
394 | "/terminus-font-" | |
395 | version | |
396 | ".tar.gz")) | |
397 | (sha256 | |
acb38156 | 398 | (base32 |
399 | "0487cyx5h1f0crbny5sg73a22gmym5vk1i7646gy7hgiscj2rxb4")))) | |
d41bb065 JG |
400 | (build-system gnu-build-system) |
401 | (native-inputs | |
402 | `(("pkg-config" ,pkg-config) | |
403 | ("perl" ,perl) | |
404 | ("bdftopcf" ,bdftopcf) | |
b3546174 | 405 | ("font-util" ,font-util) |
d41bb065 JG |
406 | ("mkfontdir" ,mkfontdir))) |
407 | (arguments | |
408 | `(#:configure-flags (list | |
409 | ;; install fonts into subdirectory of package output | |
410 | ;; instead of font-util-?.?.?/share/fonts/X11 | |
411 | (string-append "--with-fontrootdir=" | |
412 | %output "/share/fonts/X11")) | |
413 | #:tests? #f)) ;; No test target in tarball | |
414 | (home-page "http://terminus-font.sourceforge.net/") | |
415 | (synopsis "Simple bitmap programming font") | |
416 | (description "Terminus Font is a clean, fixed width bitmap font, designed | |
417 | for long (8 and more hours per day) work with computers.") | |
380f2ab6 | 418 | (license license:silofl1.1))) |
692784dd SB |
419 | |
420 | (define-public font-adobe-source-han-sans | |
421 | (package | |
422 | (name "font-adobe-source-han-sans") | |
2666a126 | 423 | (version "1.004") |
692784dd SB |
424 | (source (origin |
425 | (method url-fetch) | |
426 | (uri (string-append | |
427 | "https://github.com/adobe-fonts/source-han-sans/archive/" | |
2666a126 SB |
428 | version "R.tar.gz")) |
429 | (file-name (string-append "source-han-sans-" version "R.tar.gz")) | |
692784dd SB |
430 | (sha256 |
431 | (base32 | |
2666a126 SB |
432 | "1ssx0fw90sy6mj8fv8fv4dgzszpqwbmwpjnlx16g4pvaqzdmybbz")))) |
433 | (outputs '("out" ; OpenType/CFF Collection (OTC), 121 MiB. | |
692784dd SB |
434 | "cn" "jp" "kr" "tw")) ; Region-specific Subset OpenType/CFF. |
435 | (build-system trivial-build-system) | |
436 | (arguments | |
437 | `(#:modules ((guix build utils)) | |
438 | #:builder | |
439 | (begin | |
440 | (use-modules (guix build utils)) | |
441 | (let ((tar (string-append (assoc-ref %build-inputs | |
442 | "tar") | |
443 | "/bin/tar")) | |
444 | (PATH (string-append (assoc-ref %build-inputs | |
445 | "gzip") | |
446 | "/bin")) | |
447 | (install-opentype-fonts | |
448 | (lambda (fonts-dir out) | |
449 | (copy-recursively fonts-dir | |
450 | (string-append (assoc-ref %outputs out) | |
451 | "/share/fonts/opentype"))))) | |
452 | (setenv "PATH" PATH) | |
453 | (system* tar "xvf" (assoc-ref %build-inputs "source")) | |
2666a126 | 454 | (chdir (string-append "source-han-sans-" ,version "R")) |
692784dd SB |
455 | (install-opentype-fonts "OTC" "out") |
456 | (install-opentype-fonts "SubsetOTF/CN" "cn") | |
457 | (install-opentype-fonts "SubsetOTF/JP" "jp") | |
458 | (install-opentype-fonts "SubsetOTF/KR" "kr") | |
2666a126 SB |
459 | (install-opentype-fonts "SubsetOTF/TW" "tw") |
460 | (for-each delete-file (find-files %output "\\.zip$")))))) | |
692784dd SB |
461 | (native-inputs |
462 | `(("gzip" ,gzip) | |
463 | ("tar" ,tar))) | |
464 | (home-page "https://github.com/adobe-fonts/source-han-sans") | |
465 | (synopsis "Pan-CJK fonts") | |
466 | (description | |
467 | "Source Han Sans is a sans serif Pan-CJK font family that is offered in | |
468 | seven weights: ExtraLight, Light, Normal, Regular, Medium, Bold, and Heavy. | |
469 | And in several OpenType/CFF-based deployment configurations to accommodate | |
470 | various system requirements or limitations. As the name suggests, Pan-CJK | |
471 | fonts are intended to support the characters necessary to render or display | |
e881752c | 472 | text in Simplified Chinese, Traditional Chinese, Japanese, and Korean.") |
2666a126 | 473 | (license license:silofl1.1))) |
192b4802 RW |
474 | |
475 | (define-public font-wqy-zenhei | |
476 | (package | |
477 | (name "font-wqy-zenhei") | |
478 | (version "0.9.45") | |
479 | (source (origin | |
480 | (method url-fetch) | |
481 | (uri (string-append | |
de67e922 LF |
482 | "mirror://sourceforge/wqy/wqy-zenhei/" version |
483 | "%20%28Fighting-state%20RC1%29/wqy-zenhei-" | |
192b4802 RW |
484 | version ".tar.gz")) |
485 | (file-name (string-append "wqy-zenhei-" version ".tar.gz")) | |
486 | (sha256 | |
487 | (base32 | |
488 | "1mkmxq8g2hjcglb3zajfqj20r4r88l78ymsp2xyl5yav8w3f7dz4")))) | |
489 | (build-system trivial-build-system) | |
490 | (arguments | |
491 | `(#:modules ((guix build utils)) | |
492 | #:builder | |
493 | (begin | |
494 | (use-modules (guix build utils)) | |
495 | (let ((PATH (string-append (assoc-ref %build-inputs "tar") "/bin:" | |
496 | (assoc-ref %build-inputs "gzip") "/bin")) | |
497 | (font-dir (string-append (assoc-ref %outputs "out") | |
498 | "/share/fonts/wenquanyi/"))) | |
499 | (setenv "PATH" PATH) | |
500 | (mkdir-p font-dir) | |
501 | (system* "tar" "xvf" (assoc-ref %build-inputs "source")) | |
502 | (chdir "wqy-zenhei") | |
503 | (copy-file "wqy-zenhei.ttc" | |
504 | (string-append font-dir "wqy-zenhei.ttc")))))) | |
505 | (native-inputs | |
506 | `(("gzip" ,gzip) | |
507 | ("tar" ,tar))) | |
508 | (home-page "http://wenq.org/wqy2/") | |
509 | (synopsis "CJK font") | |
510 | (description | |
511 | "WenQuanYi Zen Hei is a Hei-Ti style (sans-serif type) Chinese outline | |
512 | font. It is designed for general purpose text formatting and on-screen | |
513 | display of Chinese characters and symbols from many other languages. | |
514 | WenQuanYi Zen Hei provides a rather complete coverage to Chinese Hanzi glyphs, | |
515 | including both simplified and traditional forms. The total glyph number in | |
516 | this font is over 35,000, including over 21,000 Chinese Hanzi. This font has | |
517 | full coverage to GBK(CP936) charset, CJK Unified Ideographs, as well as the | |
518 | code-points needed for zh_cn, zh_sg, zh_tw, zh_hk, zh_mo, ja (Japanese) and | |
519 | ko (Korean) locales for fontconfig.") | |
520 | ;; GPLv2 with font embedding exception | |
521 | (license license:gpl2))) | |
3f88152d RW |
522 | |
523 | (define-public font-tex-gyre | |
524 | (package | |
525 | (name "font-tex-gyre") | |
526 | (version "2.005") | |
527 | (source | |
528 | (origin | |
529 | (method url-fetch) | |
530 | (uri (string-append "http://www.gust.org.pl/projects/e-foundry/" | |
531 | "tex-gyre/whole/tg-" version "otf.zip")) | |
532 | (sha256 | |
533 | (base32 | |
534 | "0kph9l3g7jb2bpmxdbdg5zl56wacmnvdvsdn7is1gc750sqvsn31")))) | |
535 | (build-system trivial-build-system) | |
536 | (arguments | |
537 | `(#:modules ((guix build utils)) | |
538 | #:builder | |
539 | (begin | |
540 | (use-modules (guix build utils)) | |
541 | ||
542 | (let ((unzip (string-append (assoc-ref %build-inputs "unzip") | |
543 | "/bin/unzip")) | |
544 | (font-dir (string-append %output "/share/fonts/opentype"))) | |
545 | (mkdir-p font-dir) | |
546 | (system* unzip | |
547 | (assoc-ref %build-inputs "source") | |
548 | "-d" font-dir))))) | |
549 | (native-inputs | |
550 | `(("unzip" ,unzip))) | |
551 | (home-page "http://www.gust.org.pl/projects/e-foundry/tex-gyre/") | |
552 | (synopsis "Remake of Ghostscript fonts") | |
553 | (description "The TeX Gyre collection of fonts is the result of an | |
554 | extensive remake and extension of the freely available base PostScript fonts | |
555 | distributed with Ghostscript version 4.00. The collection contains the | |
556 | following fonts in the OpenType format: Adventor, Bonum, Chorus, Cursor, | |
557 | Heros, Pagella, Schola, Termes.") | |
558 | (license license:gfl1.0))) | |
761b3d44 LF |
559 | |
560 | (define-public font-anonymous-pro | |
561 | (package | |
562 | (name "font-anonymous-pro") | |
563 | (version "1.002") | |
564 | (source (origin | |
565 | (method url-fetch) | |
566 | (uri (string-append | |
567 | "http://www.marksimonson.com/assets/content/fonts/" | |
568 | "AnonymousPro-" version ".zip")) | |
569 | (sha256 | |
570 | (base32 | |
571 | "1asj6lykvxh46czbal7ymy2k861zlcdqpz8x3s5bbpqwlm3mhrl6")))) | |
572 | (build-system trivial-build-system) | |
573 | (arguments | |
574 | `(#:modules ((guix build utils)) | |
575 | #:builder | |
576 | (begin | |
577 | (use-modules (guix build utils)) | |
578 | (let ((unzip (string-append (assoc-ref %build-inputs "unzip") | |
579 | "/bin/unzip")) | |
580 | (font-dir (string-append %output "/share/fonts/truetype")) | |
581 | (doc-dir (string-append %output "/share/doc/" ,name))) | |
582 | (system* unzip (assoc-ref %build-inputs "source")) | |
583 | (mkdir-p font-dir) | |
584 | (mkdir-p doc-dir) | |
585 | (chdir (string-append "AnonymousPro-" ,version ".001")) | |
586 | (for-each (lambda (ttf) | |
587 | (copy-file ttf | |
588 | (string-append font-dir "/" ttf))) | |
589 | (find-files "." "\\.ttf$")) | |
590 | (for-each (lambda (doc) | |
591 | (copy-file doc | |
592 | (string-append doc-dir "/" doc))) | |
593 | (find-files "." "\\.txt$")))))) | |
594 | (native-inputs | |
595 | `(("unzip" ,unzip))) | |
596 | (home-page "http://www.marksimonson.com/fonts/view/anonymous-pro") | |
597 | (synopsis "Fixed-width fonts designed with coding in mind") | |
598 | (description "Anonymous Pro is a family of four fixed-width fonts designed | |
599 | with coding in mind. Anonymous Pro features an international, Unicode-based | |
600 | character set, with support for most Western and Central European Latin-based | |
601 | languages, plus Greek and Cyrillic.") | |
602 | (license license:silofl1.1))) | |
d032d965 SB |
603 | |
604 | (define-public font-gnu-unifont | |
605 | (package | |
606 | (name "font-gnu-unifont") | |
ddfd10c8 | 607 | (version "9.0.02") |
d032d965 SB |
608 | (source (origin |
609 | (method url-fetch) | |
610 | (uri (string-append | |
df320991 | 611 | "mirror://gnu/unifont/unifont-" version "/unifont-" |
d032d965 SB |
612 | version ".tar.gz")) |
613 | (sha256 | |
614 | (base32 | |
ddfd10c8 | 615 | "1ss6cp2bs8mzz3jqjbmmi877jfdb1jjcd29dvyk3i8qy7r0d44qm")))) |
d032d965 SB |
616 | (build-system gnu-build-system) |
617 | (outputs '("out" ; TrueType version | |
618 | "pcf" ; PCF (bitmap) version | |
619 | "psf" ; PSF (console) version | |
620 | "bin" ; Utilities to manipulate '.hex' format | |
621 | )) | |
622 | (arguments | |
623 | '(#:parallel-build? #f ; parallel build fails | |
624 | #:tests? #f ; no check target | |
625 | #:phases | |
626 | (modify-phases %standard-phases | |
627 | (replace 'configure | |
628 | (lambda _ | |
629 | (setenv "CC" "gcc"))) | |
630 | (replace | |
631 | 'install | |
632 | (lambda* (#:key outputs #:allow-other-keys) | |
633 | (let* ((ttf (string-append (assoc-ref outputs "out") | |
634 | "/share/fonts/truetype")) | |
635 | (pcf (string-append (assoc-ref outputs "pcf") | |
636 | "/share/fonts/misc")) | |
637 | (psf (string-append (assoc-ref outputs "psf") | |
638 | "/share/consolefonts")) | |
639 | (bin (assoc-ref outputs "bin"))) | |
640 | (system* "make" | |
641 | (string-append "PREFIX=" bin) | |
642 | (string-append "TTFDEST=" ttf) | |
643 | (string-append "PCFDEST=" pcf) | |
644 | (string-append "CONSOLEDEST=" psf) | |
645 | "install") | |
646 | ;; Move Texinfo file to the right place. | |
647 | (mkdir (string-append bin "/share/info")) | |
648 | (rename-file (string-append bin "/share/unifont/unifont.info.gz") | |
649 | (string-append bin "/share/info/unifont.info.gz")) | |
650 | #t)))))) | |
651 | (inputs | |
652 | `(("perl" ,perl))) ; for utilities | |
653 | (synopsis | |
654 | "Large bitmap font covering Unicode's Basic Multilingual Plane") | |
655 | (description | |
656 | "GNU Unifont is a bitmap font covering essentially all of | |
657 | Unicode's Basic Multilingual Plane. The package also includes | |
658 | utilities to ease adding new glyphs to the font.") | |
659 | (home-page "http://unifoundry.com/unifont.html") | |
660 | (license license:gpl2+))) | |
b6ecac93 J |
661 | |
662 | (define-public font-google-noto | |
663 | (package | |
664 | (name "font-google-noto") | |
665 | (version "20150929") | |
666 | (source (origin | |
667 | (method url-fetch) | |
668 | (uri (string-append "https://noto-website-2.storage.googleapis.com/" | |
669 | "pkgs/Noto-hinted.zip")) | |
670 | (sha256 | |
671 | (base32 | |
672 | "13jhpqzhsqhyby8n0ksqg155a3jyaif3nzj9anzbq8s2gn1xjyd9")))) | |
673 | (build-system trivial-build-system) | |
674 | (arguments | |
675 | `(#:modules ((guix build utils)) | |
676 | #:builder (begin | |
677 | (use-modules (guix build utils) | |
678 | (srfi srfi-26)) | |
679 | ||
680 | (let ((PATH (string-append (assoc-ref %build-inputs | |
681 | "unzip") | |
682 | "/bin")) | |
683 | (font-dir (string-append %output | |
684 | "/share/fonts/truetype"))) | |
685 | (setenv "PATH" PATH) | |
686 | (system* "unzip" (assoc-ref %build-inputs "source")) | |
687 | ||
688 | (mkdir-p font-dir) | |
689 | (for-each (lambda (ttf) | |
690 | (copy-file ttf | |
691 | (string-append font-dir "/" ttf))) | |
692 | (find-files "." "\\.ttf$")) | |
693 | (for-each (lambda (otf) | |
694 | (copy-file otf | |
695 | (string-append font-dir "/" otf))) | |
696 | (find-files "." "\\.otf$")))))) | |
697 | (native-inputs `(("unzip" ,unzip))) | |
698 | (home-page "https://www.google.com/get/noto/") | |
699 | (synopsis "Fonts aimed to cover all languages") | |
700 | (description "Googe Noto Fonts is a family of fonts aimed to support all | |
701 | languages with a consistent look and aesthetic. It's goal is to have no Unicode | |
702 | symbols unable to be displayed properly.") | |
703 | (license license:silofl1.1))) | |
aae6b4b9 | 704 | |
705 | (define-public font-un | |
706 | (package | |
707 | (name "font-un") | |
708 | (version "1.0.2-080608") | |
aae6b4b9 | 709 | (source (origin |
710 | (method url-fetch) | |
99a61dad | 711 | (uri (string-append |
712 | "https://kldp.net/unfonts/release/2607-" | |
713 | "un-fonts-core-" version ".tar.gz")) | |
aae6b4b9 | 714 | (file-name (string-append name "-" version ".tar.gz")) |
715 | (sha256 | |
716 | (base32 | |
717 | "13liaz2pmww3aqabm55la5npd08m1skh334ky7qfidxaz5s742iv")))) | |
718 | (build-system trivial-build-system) | |
719 | (arguments | |
720 | `(#:modules ((guix build utils)) | |
721 | #:builder | |
722 | (begin | |
723 | (use-modules (guix build utils)) | |
724 | ||
725 | (let ((tar (string-append (assoc-ref %build-inputs "tar") | |
726 | "/bin/tar")) | |
727 | (PATH (string-append (assoc-ref %build-inputs "gzip") | |
728 | "/bin")) | |
729 | (font-dir (string-append %output "/share/fonts/truetype")) | |
730 | (doc-dir (string-append %output "/share/doc/" ,name))) | |
731 | (setenv "PATH" PATH) | |
732 | (system* tar "xvf" (assoc-ref %build-inputs "source")) | |
733 | (mkdir-p font-dir) | |
734 | (mkdir-p doc-dir) | |
735 | (chdir (string-append "un-fonts")) | |
736 | (for-each (lambda (ttf) | |
737 | (copy-file ttf | |
738 | (string-append font-dir "/" | |
739 | (basename ttf)))) | |
740 | (find-files "." "\\.ttf$")) | |
741 | (for-each (lambda (doc) | |
742 | (copy-file doc | |
743 | (string-append doc-dir "/" | |
744 | (basename doc)))) | |
745 | '("COPYING" "README")))))) | |
746 | (native-inputs | |
747 | `(("tar" ,tar) | |
748 | ("gzip" ,gzip))) | |
749 | (home-page "https://kldp.net/projects/unfonts/") | |
750 | (synopsis "Collection of Korean fonts") | |
751 | (description | |
752 | "Un-fonts is a family of mainly Korean fonts. | |
753 | It contains the following fonts and styles: | |
754 | ||
755 | @enumerate | |
756 | @item UnBatang, UnBatangBold: serif; | |
757 | @item UnDotum, UnDotumBold: sans-serif; | |
758 | @item UnGraphic, UnGraphicBold: sans-serif style; | |
759 | @item UnDinaru, UnDinaruBold, UnDinaruLight; | |
760 | @item UnPilgi, UnPilgiBold: script; | |
761 | @item UnGungseo: cursive, brush-stroke. | |
762 | @end enumerate\n") | |
763 | (license license:gpl2+))) | |
f85cafde EB |
764 | |
765 | (define-public font-fantasque-sans | |
766 | (package | |
767 | (name "font-fantasque-sans") | |
768 | (version "1.7.1") | |
769 | (source | |
770 | (origin | |
771 | (method url-fetch) | |
772 | (uri (string-append "https://github.com/belluzj/fantasque-sans/" | |
773 | "archive/v" version ".tar.gz")) | |
774 | (file-name (string-append name "-" version ".tar.gz")) | |
775 | (sha256 | |
776 | (base32 | |
777 | "07fpy53k2x2nz5q61swkab6cfk9gw2kc4x4brsj6zjgbm16fap85")))) | |
778 | (build-system gnu-build-system) | |
779 | (native-inputs | |
780 | `(("ttfautohint" ,ttfautohint) | |
781 | ("woff-tools" ,woff-tools) | |
782 | ("fontforge" ,fontforge) | |
783 | ("woff2" ,woff2) | |
784 | ("ttf2eot" ,ttf2eot))) | |
785 | (arguments | |
786 | `(#:tests? #f ;test target intended for visual inspection | |
787 | #:phases (modify-phases %standard-phases | |
788 | (delete 'configure) ;no configuration | |
789 | (replace 'install | |
790 | ;; 'make install' wants to install to ~/.fonts, install to | |
791 | ;; output instead. | |
792 | (lambda* (#:key outputs #:allow-other-keys) | |
793 | (let* ((out (assoc-ref outputs "out")) | |
794 | (font-dir (string-append out "/share/fonts")) | |
795 | (truetype-dir (string-append font-dir "/truetype")) | |
796 | (opentype-dir (string-append font-dir "/opentype")) | |
797 | (webfonts-dir (string-append font-dir "/webfonts"))) | |
798 | (copy-recursively "OTF" opentype-dir) | |
799 | (for-each (lambda (f) (install-file f truetype-dir)) | |
800 | (find-files "." "\\.ttf$")) | |
801 | (copy-recursively "Webfonts" webfonts-dir) | |
802 | #t)))))) | |
803 | (synopsis "Font family with a monospaced variant for programmers") | |
804 | (description | |
805 | "Fantasque Sans Mono is a programming font designed with functionality in | |
806 | mind. The font includes a bold version and a good italic version with new | |
807 | glyph designs, not just an added slant.") | |
808 | (home-page "https://fontlibrary.org/en/font/fantasque-sans-mono") | |
809 | (license license:silofl1.1))) | |
73c8d39c | 810 | |
811 | (define-public font-hack | |
812 | (package | |
813 | (name "font-hack") | |
814 | (version "2.020") | |
815 | (source (origin | |
816 | (method url-fetch) | |
817 | (uri (string-append | |
818 | "https://github.com/chrissimpkins/Hack/releases/download/v" | |
819 | version "/Hack-v" | |
820 | (string-replace-substring version "." "_") | |
821 | "-ttf.zip")) | |
822 | (sha256 | |
823 | (base32 | |
824 | "16kkmc3psckw1b7k07ccn1gi5ymhlg9djh43nqjzg065g6p6d184")))) | |
825 | (build-system trivial-build-system) | |
826 | (arguments | |
827 | `(#:modules ((guix build utils)) | |
828 | #:builder (begin | |
829 | (use-modules (guix build utils) | |
830 | (srfi srfi-26)) | |
831 | ||
832 | (let ((PATH (string-append (assoc-ref %build-inputs | |
833 | "unzip") | |
834 | "/bin")) | |
835 | (font-dir (string-append %output | |
b94ee996 | 836 | "/share/fonts/truetype"))) |
73c8d39c | 837 | (setenv "PATH" PATH) |
838 | (system* "unzip" (assoc-ref %build-inputs "source")) | |
839 | ||
840 | (mkdir-p font-dir) | |
73c8d39c | 841 | (for-each (lambda (ttf) |
842 | (copy-file ttf | |
843 | (string-append font-dir "/" ttf))) | |
b94ee996 | 844 | (find-files "." "\\.ttf$")))))) |
73c8d39c | 845 | (native-inputs |
846 | `(("source" ,source) | |
847 | ("unzip" ,unzip))) | |
848 | (home-page "https://sourcefoundry.org/hack/") | |
849 | (synopsis "Typeface designed for sourcecode") | |
850 | (description | |
851 | "Hack is designed to be a workhorse typeface for code, it expands upon | |
852 | the Bitstream Vera & DejaVu projects, provides 1561 glyphs including | |
853 | powerline support.") | |
854 | (license (license:x11-style | |
855 | "https://github.com/chrissimpkins/Hack/blob/master/LICENSE.md" | |
856 | "Hack Open Font License v2.0")))) | |
6e1d7aa9 MB |
857 | |
858 | (define-public font-adobe-source-code-pro | |
859 | (package | |
860 | (name "font-adobe-source-code-pro") | |
861 | (version "2.030R-ro-1.050R-it") | |
862 | (source (origin | |
863 | (method url-fetch) | |
864 | (uri (string-append | |
865 | "https://github.com/adobe-fonts/source-code-pro/archive/" | |
866 | (regexp-substitute/global | |
867 | ;; The upstream tag uses "/" between the roman and italic | |
868 | ;; versions, so substitute our "-" separator here. | |
869 | #f "R-ro-" version 'pre "R-ro/" 'post) ".tar.gz")) | |
870 | (file-name (string-append name "-" version ".tar.gz")) | |
871 | (sha256 | |
872 | (base32 | |
873 | "0arhhsf3i7ss39ykn73d1j8k4n8vx7115xph6jwkd970p1cxvr54")))) | |
874 | (build-system trivial-build-system) | |
875 | (arguments | |
876 | `(#:modules ((guix build utils)) | |
877 | #:builder | |
878 | (begin | |
879 | (use-modules (guix build utils)) | |
880 | (let ((tar (string-append (assoc-ref %build-inputs "tar") | |
881 | "/bin/tar")) | |
882 | (PATH (string-append (assoc-ref %build-inputs "gzip") | |
883 | "/bin")) | |
884 | (font-dir (string-append %output "/share/fonts/opentype"))) | |
885 | (setenv "PATH" PATH) | |
886 | (mkdir-p font-dir) | |
887 | (zero? (system* tar "-C" font-dir "--strip-components=2" | |
888 | "-xvf" (assoc-ref %build-inputs "source") | |
889 | (string-append "source-code-pro-" | |
890 | ,version "/OTF"))))))) | |
891 | (native-inputs | |
892 | `(("gzip" ,gzip) | |
893 | ("tar" ,tar))) | |
894 | (home-page "https://github.com/adobe-fonts/source-code-pro") | |
895 | (synopsis | |
896 | "Monospaced font family for user interface and coding environments") | |
897 | (description | |
898 | "Source Code Pro is a set of monospaced OpenType fonts that have been | |
899 | designed to work well in user interface environments.") | |
900 | (license license:silofl1.1))) |