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