fonts.scm 3.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. ;;; fonts.scm --- Font packages
  2. ;; Copyright © 2014, 2015, 2017–2018, 2020 Alex Kost
  3. ;; Author: Alex Kost <alezost@gmail.com>
  4. ;; Created: 22 Oct 2014
  5. ;; This program is free software; you can redistribute it and/or modify
  6. ;; it under the terms of the GNU General Public License as published by
  7. ;; the Free Software Foundation, either version 3 of the License, or
  8. ;; (at your option) any later version.
  9. ;;
  10. ;; This program is distributed in the hope that it will be useful,
  11. ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. ;; GNU General Public License for more details.
  14. ;;
  15. ;; You should have received a copy of the GNU General Public License
  16. ;; along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. ;;; Commentary:
  18. ;; Various font packages.
  19. ;;; Code:
  20. (define-module (al guix packages fonts)
  21. #:use-module (guix packages)
  22. #:use-module (guix download)
  23. #:use-module (guix build-system trivial)
  24. #:use-module ((guix licenses) #:prefix license:)
  25. #:use-module (gnu packages xorg)
  26. #:use-module (gnu packages compression))
  27. (define-public font-alias-pure
  28. (package
  29. (inherit font-alias)
  30. (name "font-alias-pure")
  31. (arguments '())
  32. (synopsis (string-append (package-synopsis font-alias)
  33. " (upstream package without modifications)"))))
  34. (define-public font-symbola
  35. (package
  36. (name "font-symbola")
  37. (version "13.00")
  38. (source (origin
  39. (method url-fetch)
  40. (uri "https://dn-works.com/wp-content/uploads/2020/UFAS-Fonts/Symbola.zip")
  41. (sha256
  42. (base32
  43. "101nk6aar67zlqqbzskggbiybjmq4p7d8jc0vnsi789bz67ls0fs"))))
  44. (build-system trivial-build-system)
  45. (arguments
  46. `(#:modules ((guix build utils))
  47. #:builder
  48. (begin
  49. (use-modules (guix build utils))
  50. (let ((unzip (string-append (assoc-ref %build-inputs "unzip")
  51. "/bin/unzip"))
  52. (font-dir (string-append %output "/share/fonts/opentype"))
  53. (doc-dir (string-append %output "/share/doc/" ,name)))
  54. (system* unzip (assoc-ref %build-inputs "source"))
  55. (mkdir-p font-dir)
  56. (mkdir-p doc-dir)
  57. (for-each (lambda (font)
  58. (copy-file font
  59. (string-append font-dir "/"
  60. (basename font))))
  61. (find-files "." "\\.otf$"))
  62. (for-each (lambda (doc)
  63. (copy-file doc
  64. (string-append doc-dir "/"
  65. (basename doc))))
  66. (find-files "." "\\.pdf$"))))))
  67. (native-inputs
  68. `(("source" ,source)
  69. ("unzip" ,unzip)))
  70. (home-page "https://dn-works.com/ufas/")
  71. (synopsis "Font with many Unicode symbols")
  72. (description
  73. "Symbola is a TrueType font providing basic Latin, Greek, Cyrillic and many
  74. Symbol blocks of Unicode.")
  75. ;; The license is vague; that's why Symbola font is not a part of
  76. ;; Guix. See:
  77. ;; <http://lists.gnu.org/archive/html/guix-devel/2014-10/msg00283.html>,
  78. ;; <http://lists.gnu.org/archive/html/guix-devel/2015-01/msg00200.html>.
  79. ;; All we have is the following cite from the home page:
  80. ;; In lieu of a licence: Fonts and documents in this site are not
  81. ;; pieces of property or merchandise items; they carry no
  82. ;; trademark, copyright, license or other market tags; they are
  83. ;; free for any use.
  84. (license license:public-domain)))