diff mbox series

[bug#49021,2/2] gnu: font-terminus: Build Open Type Bitmap.

Message ID 20210614133113.25870-1-boris.dekshteyn@gmail.com
State Accepted
Headers show
Series [bug#49021,1/2] gnu: font-terminus: Update to 4.49.1. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Boris A. Dekshteyn June 14, 2021, 1:31 p.m. UTC
* gnu/packages/fonts.scm (font-terminus): Build Open Type Bitmap version.
---
 gnu/packages/fonts.scm | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

Comments

Efraim Flashner June 15, 2021, 6:19 p.m. UTC | #1
What do the Open Type Bitmap bits do? Is it actually worth putting it in
a separate output or would it make more sense to install it by default?

On Tue, Jun 15, 2021 at 01:31:13AM +1200, Boris A. Dekshteyn wrote:
> * gnu/packages/fonts.scm (font-terminus): Build Open Type Bitmap version.
> ---
>  gnu/packages/fonts.scm | 11 ++++++++++-
>  1 file changed, 10 insertions(+), 1 deletion(-)
> 
> diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm
> index b2aad5a011..2f0a55e3ff 100644
> --- a/gnu/packages/fonts.scm
> +++ b/gnu/packages/fonts.scm
> @@ -423,7 +423,7 @@ The unified Libertinus family consists of:
>         (sha256
>          (base32 "0yggffiplk22lgqklfmd2c0rw8gwchynjh5kz4bz8yv2h6vw2qfr"))))
>      (build-system gnu-build-system)
> -    (outputs (list "out" "pcf-8bit"))
> +    (outputs (list "out" "pcf-8bit" "otb"))
>      (arguments
>       `(#:tests? #f                      ; no test target in tarball
>         #:phases
> @@ -438,6 +438,15 @@ The unified Libertinus family consists of:
>               (let ((pcf-8bit (assoc-ref outputs "pcf-8bit")))
>                 (apply invoke "make" "install-pcf-8bit" (string-append "prefix="
>                                                                        pcf-8bit)
> +                      make-flags))))
> +         (add-after 'build-more-bits 'build-otb
> +           ;; Build Open Type Bitmap
> +           (lambda* (#:key make-flags #:allow-other-keys)
> +             (apply invoke "make" "otb" make-flags)))
> +         (add-after 'install 'install-otb
> +           (lambda* (#:key make-flags outputs #:allow-other-keys)
> +             (let ((otb (assoc-ref outputs "otb")))
> +               (apply invoke "make" "install-otb" (string-append "prefix=" otb)
>                        make-flags)))))))
>      (native-inputs
>       `(("bdftopcf" ,bdftopcf)
> -- 
> 2.32.0
> 
> 
> 
>
Boris A. Dekshteyn June 16, 2021, 5:48 a.m. UTC | #2
Hi,

Efraim Flashner <efraim@flashner.co.il> writes:

> What do the Open Type Bitmap bits do? Is it actually worth putting it in
> a separate output or would it make more sense to install it by default?

As of version 1.44, pango no longer supports bitmap fonts other than
in Opentype format. So, without the OTB format, you cannot use terminus in pango
enabled apps (most x apps).

The package already has a separate output for pcf-8bit, so I decided to
make a separate output for the OTB format. Which might make sense for users
without x/wayland environments.
Efraim Flashner June 21, 2021, 12:20 p.m. UTC | #3
On Wed, Jun 16, 2021 at 05:48:33PM +1200, Boris A. Dekshteyn wrote:
> Hi,
> 
> Efraim Flashner <efraim@flashner.co.il> writes:
> 
> > What do the Open Type Bitmap bits do? Is it actually worth putting it in
> > a separate output or would it make more sense to install it by default?
> 
> As of version 1.44, pango no longer supports bitmap fonts other than
> in Opentype format. So, without the OTB format, you cannot use terminus in pango
> enabled apps (most x apps).
> 
> The package already has a separate output for pcf-8bit, so I decided to
> make a separate output for the OTB format. Which might make sense for users
> without x/wayland environments.
> 

Makes sense to me. (Other) Patch pushed!
diff mbox series

Patch

diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm
index b2aad5a011..2f0a55e3ff 100644
--- a/gnu/packages/fonts.scm
+++ b/gnu/packages/fonts.scm
@@ -423,7 +423,7 @@  The unified Libertinus family consists of:
        (sha256
         (base32 "0yggffiplk22lgqklfmd2c0rw8gwchynjh5kz4bz8yv2h6vw2qfr"))))
     (build-system gnu-build-system)
-    (outputs (list "out" "pcf-8bit"))
+    (outputs (list "out" "pcf-8bit" "otb"))
     (arguments
      `(#:tests? #f                      ; no test target in tarball
        #:phases
@@ -438,6 +438,15 @@  The unified Libertinus family consists of:
              (let ((pcf-8bit (assoc-ref outputs "pcf-8bit")))
                (apply invoke "make" "install-pcf-8bit" (string-append "prefix="
                                                                       pcf-8bit)
+                      make-flags))))
+         (add-after 'build-more-bits 'build-otb
+           ;; Build Open Type Bitmap
+           (lambda* (#:key make-flags #:allow-other-keys)
+             (apply invoke "make" "otb" make-flags)))
+         (add-after 'install 'install-otb
+           (lambda* (#:key make-flags outputs #:allow-other-keys)
+             (let ((otb (assoc-ref outputs "otb")))
+               (apply invoke "make" "install-otb" (string-append "prefix=" otb)
                       make-flags)))))))
     (native-inputs
      `(("bdftopcf" ,bdftopcf)