unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#54076] [PATCH] gnu: added font-termsyn
@ 2022-02-20 19:43 kitzman via Guix-patches via
  2022-02-21 14:30 ` bug#54076: " 宋文武
  0 siblings, 1 reply; 2+ messages in thread
From: kitzman via Guix-patches via @ 2022-02-20 19:43 UTC (permalink / raw)
  To: 54076

[-- Attachment #1: Type: text/plain, Size: 93 bytes --]

I have attached inline a patch adding, to gnu/packages/fonts.scm, the
font-termsyn package.


[-- Attachment #2: font-termsyn patch --]
[-- Type: text/x-diff, Size: 3751 bytes --]

From ca77fce8c54f25c0a634347d74bdcf5e0557d45b Mon Sep 17 00:00:00 2001
From: kitzman <kitzman@disroot.org>
Date: Sun, 20 Feb 2022 21:39:35 +0200
Subject: [PATCH] gnu: added font-termsyn

---
 gnu/packages/fonts.scm | 75 +++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 74 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm
index 536892ee0d..195f5cd4b9 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,76 @@ (define-public font-charter
          "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 `(("fontforge" ,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
+     "Monospaced 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\n
+")
+    (license license:gpl2)))
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* bug#54076: [PATCH] gnu: added font-termsyn
  2022-02-20 19:43 [bug#54076] [PATCH] gnu: added font-termsyn kitzman via Guix-patches via
@ 2022-02-21 14:30 ` 宋文武
  0 siblings, 0 replies; 2+ messages in thread
From: 宋文武 @ 2022-02-21 14:30 UTC (permalink / raw)
  To: kitzman; +Cc: 54076-done

kitzman <kitzman@disroot.org> writes:

> I have attached inline a patch adding, to gnu/packages/fonts.scm, the
> font-termsyn package.

With some small changes:
1. Change the description to use a full sentence.
2. use (list fontforge) as native-inputs.

Pushed, thank you!




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-02-21 14:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-20 19:43 [bug#54076] [PATCH] gnu: added font-termsyn kitzman via Guix-patches via
2022-02-21 14:30 ` bug#54076: " 宋文武

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).