guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: gnu: Add font-termsyn.


From: guix-commits
Subject: branch master updated: gnu: Add font-termsyn.
Date: Mon, 21 Feb 2022 09:27:46 -0500

This is an automated email from the git hooks/post-receive script.

iyzsong pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
     new 1c7f754424 gnu: Add font-termsyn.
1c7f754424 is described below

commit 1c7f7544249b93492db169777122729cca92d325
Author: kitzman <kitzman@disroot.org>
AuthorDate: Sun Feb 20 21:43:08 2022 +0200

    gnu: Add font-termsyn.
    
    * gnu/packages/fonts.scm (font-termsyn): New variable.
    
    Signed-off-by: 宋文武 <iyzsong@member.fsf.org>
---
 gnu/packages/fonts.scm | 72 +++++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 71 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm
index 536892ee0d..4e51942a85 100644
--- a/gnu/packages/fonts.scm
+++ b/gnu/packages/fonts.scm
@@ -44,6 +44,7 @@
 ;;; Copyright © 2021 Paul A. Patience <paul@apatience.com>
 ;;; Copyright © 2021 Taiju HIGASHI <higashi@taiju.info>
 ;;; Copyright © 2022 Philip McGrath <philip@philipmcgrath.com>
+;;; Copyright © 2022 Kitzman <kitzman@disroot.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -2463,4 +2464,73 @@ converted from the Type 1 originals by Matthew 
Butterick.")
          "Bitstream contributed the Charter family "
          "to the X Consortium in 1992.  "
          "The license is also embedded in the font metadata."))))))
-/
+
+(define-public font-termsyn
+  (package
+    (name "font-termsyn")
+    (version "1.8.7")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://sourceforge/termsyn/termsyn-"
+                                  version ".tar.gz"))
+              (sha256
+               (base32
+                "15vsmc3nmzl0pkgdpr2993da7p38fiw2rvcg01pwldzmpqrmkpn6"))))
+    (build-system font-build-system)
+    (outputs '("out" "psf" "otf"))
+    (native-inputs (list fontforge))
+    (arguments
+     `(#:phases (modify-phases %standard-phases
+                  (add-before 'install 'build
+                    (lambda _
+                      (use-modules (ice-9 regex)
+                                   (ice-9 match))
+                      (define (pcf2 name ext)
+                        (invoke "fontforge" "-lang=ff" "-c"
+                                (string-append "Open('"
+                                               name
+                                               "');"
+                                               "Generate('"
+                                               (basename name "pcf")
+                                               ext
+                                               "','ttf')")))
+                      (for-each (lambda (pcf)
+                                  (pcf2 pcf "otf"))
+                                (find-files "." "\\.pcf$")) #t))
+                  (replace 'install
+                    (lambda* (#:key outputs #:allow-other-keys)
+                      (let* ((pcf (assoc-ref outputs "out")) (psf (assoc-ref
+                                                                   outputs
+                                                                   "psf"))
+                             (otf (assoc-ref outputs "otf"))
+                             (pcf-font-dir (string-append pcf
+                                            "/share/fonts/termsyn"))
+                             (otf-font-dir (string-append otf
+                                            "/share/fonts/termsyn-otf"))
+                             (psf-font-dir (string-append psf
+                                            "/share/kbd/consolefonts")))
+                        (mkdir-p pcf-font-dir)
+                        (mkdir-p otf-font-dir)
+                        (mkdir-p psf-font-dir)
+                        (for-each (lambda (pcf)
+                                    (install-file pcf pcf-font-dir))
+                                  (find-files "." "\\.pcf$"))
+                        (for-each (lambda (psfu)
+                                    (install-file psfu psf-font-dir))
+                                  (find-files "." "\\.psfu$"))
+                        (for-each (lambda (otf)
+                                    (install-file otf otf-font-dir))
+                                  (find-files "." "\\.otf$"))) #t)))))
+    (home-page "https://sourceforge.net/projects/termsyn/";)
+    (synopsis "Monospaced font based on terminus and tamsyn")
+    (description
+     "Termsyn is a clean monospaced bitmap font based on Terminus and Tamsyn.
+
+This package contains the following outputs:
+@enumerate
+@item out: pcf font
+@item otf: otf font
+@item psf: psfu font
+@end enumerate
+")
+    (license license:gpl2)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]