unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#38157] [PATCH] gnu: Add font-dseg.
@ 2019-11-10  3:20 Alexandros Theodotou
  2019-11-10 12:35 ` Tobias Geerinckx-Rice via Guix-patches via
  0 siblings, 1 reply; 4+ messages in thread
From: Alexandros Theodotou @ 2019-11-10  3:20 UTC (permalink / raw)
  To: 38157


[-- Attachment #1.1: Type: text/plain, Size: 120 bytes --]

There's probably an easy way to remove the dot from the version but I
can't figure it out. Any modifications welcome.

[-- Attachment #1.2: 0001-gnu-Add-font-dseg.patch --]
[-- Type: text/x-patch, Size: 2517 bytes --]

From f82f0cbdf74a2477c6894796090de9ffc3e2aea8 Mon Sep 17 00:00:00 2001
From: Alexandros Theodotou <alex@zrythm.org>
Date: Sun, 10 Nov 2019 01:25:28 +0000
Subject: [PATCH] gnu: Add font-dseg.

* gnu/packages/fonts.scm (font-dseg): New variable.
---
 gnu/packages/fonts.scm | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm
index bb6dc45d94..053b5d4530 100644
--- a/gnu/packages/fonts.scm
+++ b/gnu/packages/fonts.scm
@@ -27,6 +27,7 @@
 ;;; Copyright © 2019 Nicolas Goaziou <mail@nicolasgoaziou.fr>
 ;;; Copyright © 2019 Baptiste Strazzulla <bstrazzull@hotmail.fr>
 ;;; Copyright © 2019 Alva <alva@skogen.is>
+;;; Copyright © 2019 Alexandros Theodotou <alex@zrythm.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1524,3 +1525,38 @@ Symbols stand out from common text.  Dots and commas are easily seen, and
 operators are clear even when not surrounded by spaces.  Similar characters
 have been designed to be very distinguishable from each other.")
     (license license:silofl1.1)))
+
+(define-public font-dseg
+  (package
+    (name "font-dseg")
+    (version "0.45")
+    (source
+      (origin
+        (method url-fetch/zipbomb)
+        (uri
+          (string-append "https://github.com/keshikan/DSEG/"
+                         "releases/download/v" version
+                         ;; not sure how to remove dot from version
+                         "/fonts-DSEG_v045.zip"))
+        (sha256
+          (base32
+            "0v8sghh4vl286faf8pvi74znz07pyf0qii8z4wjllisqwc35sx72"))))
+    (build-system font-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (replace 'install
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (font-dir (string-append out "/share/fonts"))
+                    (truetype-dir (string-append font-dir "/truetype")))
+               (with-directory-excursion "fonts-DSEG_v045"
+                 (for-each (lambda (f) (install-file f truetype-dir))
+                           (find-files "." "\\.ttf$"))
+               #t)))))))
+    (home-page "https://www.keshikan.net/fonts-e.html")
+    (synopsis "DSEG: 7-segment and 14-segment fonts")
+    (description
+     "DSEG is a font family that imitates seven and fourteen segment
+display (7SEG,14SEG). DSEG includes the roman alphabet and symbol glyphs.")
+    (license license:silofl1.1)))
-- 
2.24.0


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* [bug#38157] [PATCH] gnu: Add font-dseg.
  2019-11-10  3:20 [bug#38157] [PATCH] gnu: Add font-dseg Alexandros Theodotou
@ 2019-11-10 12:35 ` Tobias Geerinckx-Rice via Guix-patches via
  2019-11-10 18:11   ` Alexandros Theodotou
  0 siblings, 1 reply; 4+ messages in thread
From: Tobias Geerinckx-Rice via Guix-patches via @ 2019-11-10 12:35 UTC (permalink / raw)
  To: Alexandros Theodotou; +Cc: 38157

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

Alexandros,

Thanks for all these patches!  I look forward to trying Zrythm 
when it comes to Guix.

Alexandros Theodotou 写道:
> There's probably an easy way to remove the dot from the version 
> but I
> can't figure it out. Any modifications welcome.

You could

    (apply string-append (string-split version #\.))
or

    (string-join (string-split version #\.) "")

I think I prefer the STRING-APPEND version but both are fine.

Kind regards,

T G-R

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

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

* [bug#38157] [PATCH] gnu: Add font-dseg.
  2019-11-10 12:35 ` Tobias Geerinckx-Rice via Guix-patches via
@ 2019-11-10 18:11   ` Alexandros Theodotou
  2019-11-19  9:51     ` bug#38157: " Ludovic Courtès
  0 siblings, 1 reply; 4+ messages in thread
From: Alexandros Theodotou @ 2019-11-10 18:11 UTC (permalink / raw)
  To: Tobias Geerinckx-Rice; +Cc: 38157


[-- Attachment #1.1: Type: text/plain, Size: 500 bytes --]

Hi Tobias,

> You could
> 
>     (apply string-append (string-split version #\.))
> or
> 
>     (string-join (string-split version #\.) "")
> 
> I think I prefer the STRING-APPEND version but both are fine.

Thank you for the pointer! Patch updated.

Just a general note that there are some additional WOFF fonts in the
zip, but I think those are only relevant for websites so I am only
installing the truetype fonts. 

I also tested and verified that Zrythm can now find the font.

[-- Attachment #1.2: 0001-gnu-Add-font-dseg.patch --]
[-- Type: text/x-patch, Size: 2735 bytes --]

From ec6c88abe3de6346087d821539e43afb3dff42c8 Mon Sep 17 00:00:00 2001
From: Alexandros Theodotou <alex@zrythm.org>
Date: Sun, 10 Nov 2019 01:25:28 +0000
Subject: [PATCH] gnu: Add font-dseg.

* gnu/packages/fonts.scm (font-dseg): New variable.
---
 gnu/packages/fonts.scm | 40 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)

diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm
index bb6dc45d94..7fe0aee20b 100644
--- a/gnu/packages/fonts.scm
+++ b/gnu/packages/fonts.scm
@@ -27,6 +27,7 @@
 ;;; Copyright © 2019 Nicolas Goaziou <mail@nicolasgoaziou.fr>
 ;;; Copyright © 2019 Baptiste Strazzulla <bstrazzull@hotmail.fr>
 ;;; Copyright © 2019 Alva <alva@skogen.is>
+;;; Copyright © 2019 Alexandros Theodotou <alex@zrythm.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1524,3 +1525,42 @@ Symbols stand out from common text.  Dots and commas are easily seen, and
 operators are clear even when not surrounded by spaces.  Similar characters
 have been designed to be very distinguishable from each other.")
     (license license:silofl1.1)))
+
+(define-public font-dseg
+  (package
+    (name "font-dseg")
+    (version "0.45")
+    (source
+      (origin
+        (method url-fetch/zipbomb)
+        (uri
+          (string-append "https://github.com/keshikan/DSEG/"
+                         "releases/download/v" version
+                         "/fonts-DSEG_v"
+                         (apply string-append (string-split version #\.))
+                         ".zip"))
+        (sha256
+          (base32
+            "0v8sghh4vl286faf8pvi74znz07pyf0qii8z4wjllisqwc35sx72"))))
+    (build-system font-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (replace 'install
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (font-dir (string-append out "/share/fonts"))
+                    (truetype-dir (string-append font-dir "/truetype")))
+               (with-directory-excursion
+                 (string-append "fonts-DSEG_v"
+                                (apply string-append (string-split ,version
+                                                                   #\.)))
+                 (for-each (lambda (f) (install-file f truetype-dir))
+                           (find-files "." "\\.ttf$"))
+               #t)))))))
+    (home-page "https://www.keshikan.net/fonts-e.html")
+    (synopsis "DSEG: 7-segment and 14-segment fonts")
+    (description
+     "DSEG is a font family that imitates seven and fourteen segment
+display (7SEG,14SEG). DSEG includes the roman alphabet and symbol glyphs.")
+    (license license:silofl1.1)))
-- 
2.24.0


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* bug#38157: [PATCH] gnu: Add font-dseg.
  2019-11-10 18:11   ` Alexandros Theodotou
@ 2019-11-19  9:51     ` Ludovic Courtès
  0 siblings, 0 replies; 4+ messages in thread
From: Ludovic Courtès @ 2019-11-19  9:51 UTC (permalink / raw)
  To: Alexandros Theodotou; +Cc: 38157-done, Tobias Geerinckx-Rice

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

Hello Alexandros,

Alexandros Theodotou <alex@zrythm.org> skribis:

> From ec6c88abe3de6346087d821539e43afb3dff42c8 Mon Sep 17 00:00:00 2001
> From: Alexandros Theodotou <alex@zrythm.org>
> Date: Sun, 10 Nov 2019 01:25:28 +0000
> Subject: [PATCH] gnu: Add font-dseg.
>
> * gnu/packages/fonts.scm (font-dseg): New variable.

Nice.  Applied with the minor changes below: addressing a ‘guix lint’
warning, and using an even more appropriate string function.  ;-)

Thanks,
Ludo’.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 1219 bytes --]

diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm
index 7fe0aee20b..83c97444bf 100644
--- a/gnu/packages/fonts.scm
+++ b/gnu/packages/fonts.scm
@@ -1537,7 +1537,7 @@ have been designed to be very distinguishable from each other.")
           (string-append "https://github.com/keshikan/DSEG/"
                          "releases/download/v" version
                          "/fonts-DSEG_v"
-                         (apply string-append (string-split version #\.))
+                         (string-concatenate (string-split version #\.))
                          ".zip"))
         (sha256
           (base32
@@ -1561,6 +1561,7 @@ have been designed to be very distinguishable from each other.")
     (home-page "https://www.keshikan.net/fonts-e.html")
     (synopsis "DSEG: 7-segment and 14-segment fonts")
     (description
-     "DSEG is a font family that imitates seven and fourteen segment
-display (7SEG,14SEG). DSEG includes the roman alphabet and symbol glyphs.")
+     "DSEG is a font family that imitates seven- and fourteen-segment LCD
+displays (7SEG, 14SEG).  DSEG includes the roman alphabet and symbol glyphs.
+This package provides the TrueType fonts.")
     (license license:silofl1.1)))

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

end of thread, other threads:[~2019-11-19  9:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-10  3:20 [bug#38157] [PATCH] gnu: Add font-dseg Alexandros Theodotou
2019-11-10 12:35 ` Tobias Geerinckx-Rice via Guix-patches via
2019-11-10 18:11   ` Alexandros Theodotou
2019-11-19  9:51     ` bug#38157: " Ludovic Courtès

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).