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