Skip to content
Snippets Groups Projects
Unverified Commit 5483a2d0 authored by Raghav Gururajan's avatar Raghav Gururajan Committed by Leo Famulari
Browse files

gnu: font-gnu-freefont: Add otf and woff font types.


* gnu/packages/fonts.scm (font-gnu-freefont): Add otf and woff font types.
* gnu/packages/genealogy.scm (gramps)[inputs]: Replace font-gnu-freefont-tff
with font-gnu-freefont.
* doc/guix.texi: Adjust a reference to the package.

Signed-off-by: default avatarLeo Famulari <leo@famulari.name>
parent 9fb2b7ee
No related branches found
No related tags found
No related merge requests found
...@@ -1691,7 +1691,7 @@ package in Guix looks for fonts in @file{$HOME/.guix-profile} ...@@ -1691,7 +1691,7 @@ package in Guix looks for fonts in @file{$HOME/.guix-profile}
by default. Thus, to allow graphical applications installed with Guix by default. Thus, to allow graphical applications installed with Guix
to display fonts, you have to install fonts with Guix as well. to display fonts, you have to install fonts with Guix as well.
Essential font packages include @code{gs-fonts}, @code{font-dejavu}, and Essential font packages include @code{gs-fonts}, @code{font-dejavu}, and
@code{font-gnu-freefont-ttf}. @code{font-gnu-freefont}.
   
@cindex @code{fc-cache} @cindex @code{fc-cache}
@cindex font cache @cindex font cache
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
;;; Copyright © 2020 Amin Bandali <bandali@gnu.org> ;;; Copyright © 2020 Amin Bandali <bandali@gnu.org>
;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de> ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
;;; Copyright © 2020 John Soo <jsoo1@asu.edu> ;;; Copyright © 2020 John Soo <jsoo1@asu.edu>
;;; Copyright © 2020 Raghav Gururajan <raghavgururajan@disroot.org>
;;; ;;;
;;; This file is part of GNU Guix. ;;; This file is part of GNU Guix.
;;; ;;;
...@@ -232,9 +233,9 @@ (define-public font-lato ...@@ -232,9 +233,9 @@ (define-public font-lato
50 Cyrillic-based languages as well as Greek and IPA phonetics.") 50 Cyrillic-based languages as well as Greek and IPA phonetics.")
(license license:silofl1.1))) (license license:silofl1.1)))
(define-public font-gnu-freefont-ttf (define-public font-gnu-freefont
(package (package
(name "font-gnu-freefont-ttf") (name "font-gnu-freefont")
(version "20120503") (version "20120503")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
...@@ -251,18 +252,41 @@ (define-public font-gnu-freefont-ttf ...@@ -251,18 +252,41 @@ (define-public font-gnu-freefont-ttf
(lambda _ (lambda _
(let ((doc-dir (string-append %output "/share/doc/" (let ((doc-dir (string-append %output "/share/doc/"
,name "-" ,version)) ,name "-" ,version))
(font-dir (string-append %output (ttf-font-dir (string-append %output
"/share/fonts/truetype"))) "/share/fonts/ttf"))
(otf-font-dir (string-append %output
"/share/fonts/otf"))
(woff-font-dir (string-append %output
"/share/fonts/woff")))
(mkdir-p doc-dir) (mkdir-p doc-dir)
(substitute* "Makefile" (substitute* "Makefile"
(("\\$\\(TMPDIR\\)") doc-dir) (("\\$\\(TMPDIR\\)") doc-dir)
(("sfd/\\*.ttf") "")) (("sfd/\\*.ttf") "")
(system* "make" "ttftar") (("sfd/\\*.otf") "")
(mkdir-p font-dir) (("sfd/\\*.woff") ""))
;; XXX The FreeFont Makefile tries to use the current
;; time and date as names for generated files, and fails
;; silently. But the fonts are still installed, so we
;; leave the issue alone for now.
;; See <https://bugs.gnu.org/40783>
(system* "make" "ttftar" "otftar" "wofftar")
(mkdir-p ttf-font-dir)
(mkdir-p otf-font-dir)
(mkdir-p woff-font-dir)
(for-each (lambda (file) (for-each (lambda (file)
(install-file file font-dir)) (install-file file ttf-font-dir))
(filter (filter
(lambda (file) (string-suffix? "ttf" file)) (lambda (file) (string-suffix? "ttf" file))
(find-files "." "")))
(for-each (lambda (file)
(install-file file otf-font-dir))
(filter
(lambda (file) (string-suffix? "otf" file))
(find-files "." "")))
(for-each (lambda (file)
(install-file file woff-font-dir))
(filter
(lambda (file) (string-suffix? "woff" file))
(find-files "." ""))))))) (find-files "." "")))))))
#:test-target "tests")) #:test-target "tests"))
;; replace python 3 with python 2 ;; replace python 3 with python 2
......
...@@ -55,7 +55,7 @@ (define-public gramps ...@@ -55,7 +55,7 @@ (define-public gramps
("intltool" ,intltool))) ("intltool" ,intltool)))
(inputs (inputs
`(("cairo" ,cairo) `(("cairo" ,cairo)
("font-gnu-freefont-ttf" ,font-gnu-freefont-ttf) ("font-gnu-freefont" ,font-gnu-freefont)
("geocode-glib" ,geocode-glib) ("geocode-glib" ,geocode-glib)
("gexiv2" ,gexiv2) ("gexiv2" ,gexiv2)
("ghostscript" ,ghostscript) ("ghostscript" ,ghostscript)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment