GNU bug report logs - #69424
[PATCH 0/5] Update Noto fonts and switch them to variable fonts (77% size reduced).

Previous Next

Package: guix-patches;

Reported by: Hilton Chain <hako <at> ultrarare.space>

Date: Tue, 27 Feb 2024 12:53:02 UTC

Severity: normal

Tags: patch

Done: Hilton Chain <hako <at> ultrarare.space>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 69424 in the body.
You can then email your comments to 69424 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to all_but_last <at> 163.com, iyzsong <at> envs.net, yangjiwei <at> protonmail.com, guix-patches <at> gnu.org:
bug#69424; Package guix-patches. (Tue, 27 Feb 2024 12:53:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Hilton Chain <hako <at> ultrarare.space>:
New bug report received and forwarded. Copy sent to all_but_last <at> 163.com, iyzsong <at> envs.net, yangjiwei <at> protonmail.com, guix-patches <at> gnu.org. (Tue, 27 Feb 2024 12:53:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Hilton Chain <hako <at> ultrarare.space>
To: guix-patches <at> gnu.org
Cc: Hilton Chain <hako <at> ultrarare.space>
Subject: [PATCH 0/5] Update Noto fonts and switch them to variable fonts (77%
 size reduced).
Date: Tue, 27 Feb 2024 20:49:58 +0800
Before:
--8<---------------cut here---------------start------------->8---
$ guix size font-google-noto
store item                                                       total    self
/gnu/store/jcaffgp0yzjh3y0c6lfgdazhmrbh26nn-font-google-noto-23.11.1   564.2   564.2 100.0%
total: 564.2 MiB

$ guix size font-google-noto-sans-cjk
store item                                                       total    self
/gnu/store/afgaar19vjahvxxnx2xy7807l74v62wj-font-google-noto-sans-cjk-2.004   124.6   124.6 100.0%
total: 124.6 MiB

$ guix size font-google-noto-serif-cjk
store item                                                       total    self
/gnu/store/qrw5hdllxp8r006rzkplma7r5is5li7g-font-google-noto-serif-cjk-2.001   173.2   173.2 100.0%
total: 173.2 MiB
--8<---------------cut here---------------end--------------->8---


After:
--8<---------------cut here---------------start------------->8---
$ ./pre-inst-env guix size font-google-noto
store item                                                       total    self
/gnu/store/fpmdqfgsrjmkp6adjgpxzsvl9x2islxw-font-google-noto-24.2.1    81.5    81.5 100.0%
total: 81.5 MiB

$ ./pre-inst-env guix size font-google-noto-sans-cjk
store item                                                       total    self
/gnu/store/py51ihmwln5ys69lm37wglqw8sq6139b-font-google-noto-sans-cjk-2.004    61.6    61.6 100.0%
total: 61.6 MiB

$ ./pre-inst-env guix size font-google-noto-serif-cjk
store item                                                       total    self
/gnu/store/nfhsf0dkd66s3r2lqi76qbh3bgazyf5v-font-google-noto-serif-cjk-2.002    54.2    54.2 100.0%
total: 54.2 MiB
--8<---------------cut here---------------end--------------->8---

Hilton Chain (5):
  gnu: font-google-noto: Update to 24.2.1.
  gnu: font-google-noto: Keep only variable fonts when available.
  gnu: font-google-noto-emoji: Update to 2.042.
  gnu: font-google-noto-sans-cjk: Switch to variable fonts.
  gnu: font-google-noto-serif-cjk: Update to 2.002.

 gnu/packages/fonts.scm | 89 +++++++++++++++++++++++++++++++++++-------
 1 file changed, 75 insertions(+), 14 deletions(-)


base-commit: 75bad75367fcf2c289fae3b40dbcc850f92177be
--
2.41.0




Information forwarded to all_but_last <at> 163.com, iyzsong <at> envs.net, yangjiwei <at> protonmail.com, guix-patches <at> gnu.org:
bug#69424; Package guix-patches. (Tue, 27 Feb 2024 12:57:02 GMT) Full text and rfc822 format available.

Message #8 received at 69424 <at> debbugs.gnu.org (full text, mbox):

From: Hilton Chain <hako <at> ultrarare.space>
To: 69424 <at> debbugs.gnu.org
Cc: Hilton Chain <hako <at> ultrarare.space>, Jiwei YANG <yangjiwei <at> protonmail.com>
Subject: [PATCH 2/5] gnu: font-google-noto: Keep only variable fonts when
 available.
Date: Tue, 27 Feb 2024 20:54:23 +0800
* gnu/packages/fonts.scm (font-google-noto)[arguments]: When available, keep
only variable fonts.

Suggested-by: Jiwei YANG <yangjiwei <at> protonmail.com>
Change-Id: Icac2927fb6c35d08504c379e273a5fc03b08ac46
---
 gnu/packages/fonts.scm | 42 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)

diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm
index 72bf0124c4..1ed648f5a2 100644
--- a/gnu/packages/fonts.scm
+++ b/gnu/packages/fonts.scm
@@ -1092,6 +1092,48 @@ (define-public font-google-noto
        (sha256
         (base32 "087jg8ahpq35xwyrmvm9ivxl0wjic2j4r28bbrwqmgdva9brms40"))))
     (build-system font-build-system)
+    (arguments
+     (list
+      #:modules
+      '((guix build font-build-system)
+        (guix build utils)
+        (ice-9 ftw)
+        (srfi srfi-26))
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-before 'install 'delete-extra-fonts
+            (lambda _
+              (define (scan-directory name)
+                (scandir name (lambda (file)
+                                (not (member file '("." ".." "LICENSE"))))))
+              (define (delete-extra-font-formats variant)
+                "Keep one font format, variable or OTF or TTF."
+                (with-directory-excursion variant
+                  (let ((formats (scan-directory ".")))
+                    (for-each
+                     delete-file-recursively
+                     (cond
+                      ((member "variable-ttf" formats)
+                       (delete "variable-ttf" formats))
+                      ((member "otf" formats)
+                       (delete "otf" formats))
+                      ((member "ttf" formats)
+                       (delete "ttf" formats)))))))
+              (define (delete-extra-font-variants font)
+                "Keep one font variant, full or unhinted."
+                (with-directory-excursion font
+                  (let ((variants (scan-directory ".")))
+                    (for-each
+                     delete-file-recursively
+                     (cond
+                      ((member "full" variants)
+                       (delete-extra-font-formats "full")
+                       (delete "full" variants))
+                      ((member "unhinted" variants)
+                       (delete-extra-font-formats "unhinted")
+                       (delete "unhinted" variants)))))))
+              (with-directory-excursion "fonts"
+                (for-each delete-extra-font-variants (scan-directory "."))))))))
     (home-page "https://www.google.com/get/noto/")
     (synopsis "Fonts to cover all languages")
     (description "Google Noto Fonts is a family of fonts designed to support
--
2.41.0




Information forwarded to all_but_last <at> 163.com, iyzsong <at> envs.net, yangjiwei <at> protonmail.com, guix-patches <at> gnu.org:
bug#69424; Package guix-patches. (Tue, 27 Feb 2024 12:57:03 GMT) Full text and rfc822 format available.

Message #11 received at 69424 <at> debbugs.gnu.org (full text, mbox):

From: Hilton Chain <hako <at> ultrarare.space>
To: 69424 <at> debbugs.gnu.org
Cc: Hilton Chain <hako <at> ultrarare.space>
Subject: [PATCH 3/5] gnu: font-google-noto-emoji: Update to 2.042.
Date: Tue, 27 Feb 2024 20:54:25 +0800
* gnu/packages/fonts.scm (font-google-noto-emoji): Update to 2.042.
[arguments]<#:phases>: Remove 'remove-unsupported.
Replace install phase instead.

Change-Id: I76cfbf3f8d34c484ed59b99969da7d93aaf41d72
---
 gnu/packages/fonts.scm | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm
index 1ed648f5a2..472853afa4 100644
--- a/gnu/packages/fonts.scm
+++ b/gnu/packages/fonts.scm
@@ -1144,7 +1144,7 @@ (define-public font-google-noto
 (define-public font-google-noto-emoji
   (package
     (name "font-google-noto-emoji")
-    (version "2.038")
+    (version "2.042")
     (source
      (origin
        (method git-fetch)
@@ -1154,7 +1154,7 @@ (define-public font-google-noto-emoji
        (file-name (git-file-name name version))
        (sha256
         (base32
-         "1rgmcc6nqq805iqr8kvxxlk5cf50q714xaxk3ld6rjrd69kb8ix9"))))
+         "17i7awyqz9jv0j2blcf0smmpas375c3pdhjv1zqzl861g8qm1lm2"))))
     (build-system font-build-system)
     (arguments
      (list
@@ -1164,11 +1164,10 @@ (define-public font-google-noto-emoji
             (lambda _
               ;; Note this ensures the correct license file is installed.
               (chdir "fonts")))
-          (add-after 'enter-font-directory 'remove-unsupported
-            (lambda* _
-              (delete-file "NotoColorEmoji_WindowsCompatible.ttf")
-              (delete-file "Noto-COLRv1-noflags.ttf")
-              (delete-file "Noto-COLRv1.ttf"))))))
+          (replace 'install
+            (lambda _
+              (let (dir ((string-append #$output "/share/fonts/truetype")))
+                (install-file "NotoColorEmoji.ttf" dir)))))))
     (home-page "https://fonts.google.com/noto/specimen/Noto+Color+Emoji")
     (synopsis "Font for rendering color emoji characters")
     (description
--
2.41.0




Information forwarded to all_but_last <at> 163.com, iyzsong <at> envs.net, yangjiwei <at> protonmail.com, guix-patches <at> gnu.org:
bug#69424; Package guix-patches. (Tue, 27 Feb 2024 13:11:02 GMT) Full text and rfc822 format available.

Message #14 received at 69424 <at> debbugs.gnu.org (full text, mbox):

From: Hilton Chain <hako <at> ultrarare.space>
To: 69424 <at> debbugs.gnu.org
Cc: Hilton Chain <hako <at> ultrarare.space>
Subject: [PATCH 4/5] gnu: font-google-noto-sans-cjk: Switch to variable fonts.
Date: Tue, 27 Feb 2024 20:54:27 +0800
* gnu/packages/fonts.scm (font-google-noto-sans-cjk)[source]: Switch to
variable fonts.
[arguments]<#:phases>: Only install ttc files.

Change-Id: I996d75b7892333bc69d21af53a5243a442e3a6b3
---
 gnu/packages/fonts.scm | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm
index 472853afa4..69a2c62474 100644
--- a/gnu/packages/fonts.scm
+++ b/gnu/packages/fonts.scm
@@ -1184,11 +1184,23 @@ (define-public font-google-noto-sans-cjk
        (method url-fetch)
        (uri (string-append
              "https://github.com/googlefonts/noto-cjk/releases/download/Sans"
-             version "/03_NotoSansCJK-OTC.zip"))
+             version "/01_NotoSansCJK-OTF-VF.zip"))
        (file-name (string-append name "-" version ".zip"))
        (sha256
-        (base32 "1v9yda7r98g4a3pk0y3cjbgc1i2lv4ax0f0v6aqasfzz4ldlx3sj"))))
+        (base32 "1ka37kqyd0sfqwk485nv6ihrdjl5xycr38m4jq40r2lzmpmkmqym"))))
     (build-system font-build-system)
+    (arguments
+     (list #:phases
+           #~(modify-phases %standard-phases
+               (replace 'install
+                 (lambda _
+                   (let ((dir (string-append #$output "/share/fonts/truetype")))
+                     (with-directory-excursion "OTC"
+                       (for-each
+                        (lambda (font)
+                          (install-file font dir))
+                        '("NotoSansCJK-VF.otf.ttc"
+                          "NotoSansMonoCJK-VF.otf.ttc")))))))))
     (home-page "https://www.google.com/get/noto/")
     (synopsis "Fonts to cover all languages")
     (description "Google Noto Fonts is a family of fonts designed to support
--
2.41.0




Information forwarded to all_but_last <at> 163.com, iyzsong <at> envs.net, yangjiwei <at> protonmail.com, guix-patches <at> gnu.org:
bug#69424; Package guix-patches. (Tue, 27 Feb 2024 13:11:02 GMT) Full text and rfc822 format available.

Message #17 received at 69424 <at> debbugs.gnu.org (full text, mbox):

From: Hilton Chain <hako <at> ultrarare.space>
To: 69424 <at> debbugs.gnu.org
Cc: Hilton Chain <hako <at> ultrarare.space>
Subject: [PATCH 5/5] gnu: font-google-noto-serif-cjk: Update to 2.002.
Date: Tue, 27 Feb 2024 20:54:29 +0800
* gnu/packages/fonts.scm (font-google-noto-serif-cjk): Update to 2.002.
[source]: Switch to variable fonts.
[arguments]<#:phases>: Only install ttc files.

Change-Id: Id22401ce85028951b6044ba418dbad764d581f01
---
 gnu/packages/fonts.scm | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm
index 69a2c62474..61b3118529 100644
--- a/gnu/packages/fonts.scm
+++ b/gnu/packages/fonts.scm
@@ -1212,17 +1212,25 @@ (define-public font-google-noto-sans-cjk
 (define-public font-google-noto-serif-cjk
   (package
     (name "font-google-noto-serif-cjk")
-    (version "2.001")
+    (version "2.002")
     (source
      (origin
        (method url-fetch)
        (uri (string-append
              "https://github.com/googlefonts/noto-cjk/releases/download/Serif"
-             version "/04_NotoSerifCJKOTC.zip"))
+             version "/02_NotoSerifCJK-OTF-VF.zip"))
        (file-name (string-append name "-" version ".zip"))
        (sha256
-        (base32 "1l6r3sz2s0vcyfx6ria7wqcq45zp40gxgg97lh8hpmajhzw301ig"))))
+        (base32 "007jk7rmfapq5zq4ji9d1l5gpp34p98l9ylhiw33q42d66v2g717"))))
     (build-system font-build-system)
+    (arguments
+     (list #:phases
+           #~(modify-phases %standard-phases
+               (replace 'install
+                 (lambda _
+                   (let ((dir (string-append #$output "/share/fonts/truetype")))
+                     (with-directory-excursion "OTC"
+                       (install-file "NotoSerifCJK-VF.otf.ttc" dir))))))))
     (home-page "https://www.google.com/get/noto/")
     (synopsis "Fonts to cover all languages")
     (description "Google Noto Fonts is a family of fonts designed to support
--
2.41.0




Information forwarded to all_but_last <at> 163.com, iyzsong <at> envs.net, yangjiwei <at> protonmail.com, guix-patches <at> gnu.org:
bug#69424; Package guix-patches. (Tue, 27 Feb 2024 13:26:01 GMT) Full text and rfc822 format available.

Message #20 received at 69424 <at> debbugs.gnu.org (full text, mbox):

From: Hilton Chain <hako <at> ultrarare.space>
To: 69424 <at> debbugs.gnu.org
Cc: Hilton Chain <hako <at> ultrarare.space>
Subject: [PATCH 1/5] gnu: font-google-noto: Update to 24.2.1.
Date: Tue, 27 Feb 2024 20:54:21 +0800
* gnu/packages/fonts.scm (font-google-noto): Update to 24.2.1.

Change-Id: I238f914388a2d808b817de1252ba8ee84c6299bd
---
 gnu/packages/fonts.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm
index 2cc420f7ba..72bf0124c4 100644
--- a/gnu/packages/fonts.scm
+++ b/gnu/packages/fonts.scm
@@ -1081,7 +1081,7 @@ (define-public font-gnu-unifont
 (define-public font-google-noto
   (package
     (name "font-google-noto")
-    (version "23.11.1")
+    (version "24.2.1")
     (source
      (origin
        (method git-fetch)
@@ -1090,7 +1090,7 @@ (define-public font-google-noto
              (commit (string-append "noto-monthly-release-" version))))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "0vvxhky35l4i0ha60yw0gj26f3v33hpf2zax17yyj16mww4cn4d8"))))
+        (base32 "087jg8ahpq35xwyrmvm9ivxl0wjic2j4r28bbrwqmgdva9brms40"))))
     (build-system font-build-system)
     (home-page "https://www.google.com/get/noto/")
     (synopsis "Fonts to cover all languages")
--
2.41.0




Information forwarded to hako <at> ultrarare.space, all_but_last <at> 163.com, iyzsong <at> envs.net, guix-patches <at> gnu.org:
bug#69424; Package guix-patches. (Wed, 28 Feb 2024 03:10:02 GMT) Full text and rfc822 format available.

Message #23 received at 69424 <at> debbugs.gnu.org (full text, mbox):

From: Hilton Chain <hako <at> ultrarare.space>
To: 69424 <at> debbugs.gnu.org
Cc: Hilton Chain <hako <at> ultrarare.space>
Subject: [PATCH v2 0/5] Update Noto fonts and switch them to variable fonts
 (77% size reduced).
Date: Wed, 28 Feb 2024 11:08:31 +0800
V1->V2: Simplify phases and add extra outputs.

--8<---------------cut here---------------start------------->8---
$ ./pre-inst-env guix build font-google-noto | xargs guix size
store item                                                       total    self
/gnu/store/3xvvlfcffnyp0qdczlqjjzzwb6ylr8dx-font-google-noto-24.2.1-ttf   431.3   431.3  87.1%
/gnu/store/668z8k5qw3prsm7lhk33wym1hszdc4r3-font-google-noto-24.2.1    63.8    63.8  12.9%
total: 495.1 MiB

$ ./pre-inst-env guix build font-google-noto-sans-cjk | xargs guix size
store item                                                       total    self
/gnu/store/im0c6mgyxnvbz4h9dc22vg6h3lqmh9c6-font-google-noto-sans-cjk-2.004-otf   340.6   340.6  84.7%
/gnu/store/7ihawxmfk5z9ji544l6i1nh0is315h9q-font-google-noto-sans-cjk-2.004    61.6    61.6  15.3%
total: 402.2 MiB

$ ./pre-inst-env guix build font-google-noto-serif-cjk | xargs guix size
store item                                                       total    self
/gnu/store/qp5d7yrq3vnmfil1y4m2gbz8z114w6dw-font-google-noto-serif-cjk-2.002-otf   343.7   343.7  86.4%
/gnu/store/xr6w9vfbqval1g5238b3d9wcp7vgcydv-font-google-noto-serif-cjk-2.002    54.2    54.2  13.6%
total: 397.9 MiB
--8<---------------cut here---------------end--------------->8---

Before:
--8<---------------cut here---------------start------------->8---
$ guix size font-google-noto font-google-noto-sans-cjk font-google-noto-serif-cjk
store item                                                       total    self
/gnu/store/jcaffgp0yzjh3y0c6lfgdazhmrbh26nn-font-google-noto-23.11.1   564.2   564.2  65.5%
/gnu/store/qrw5hdllxp8r006rzkplma7r5is5li7g-font-google-noto-serif-cjk-2.001   173.2   173.2  20.1%
/gnu/store/afgaar19vjahvxxnx2xy7807l74v62wj-font-google-noto-sans-cjk-2.004   124.6   124.6  14.5%
total: 862.0 MiB
--8<---------------cut here---------------end--------------->8---

After:
--8<---------------cut here---------------start------------->8---
$ ./pre-inst-env guix size \
      /gnu/store/668z8k5qw3prsm7lhk33wym1hszdc4r3-font-google-noto-24.2.1 \
      /gnu/store/7ihawxmfk5z9ji544l6i1nh0is315h9q-font-google-noto-sans-cjk-2.004 \
      /gnu/store/xr6w9vfbqval1g5238b3d9wcp7vgcydv-font-google-noto-serif-cjk-2.002
store item                                                       total    self
/gnu/store/668z8k5qw3prsm7lhk33wym1hszdc4r3-font-google-noto-24.2.1    63.8    63.8  35.5%
/gnu/store/7ihawxmfk5z9ji544l6i1nh0is315h9q-font-google-noto-sans-cjk-2.004    61.6    61.6  34.3%
/gnu/store/xr6w9vfbqval1g5238b3d9wcp7vgcydv-font-google-noto-serif-cjk-2.002    54.2    54.2  30.2%
total: 179.5 MiB
--8<---------------cut here---------------end--------------->8---

Hilton Chain (5):
  gnu: font-google-noto: Update to 24.2.1.
  gnu: font-google-noto: Prefer variable fonts and split outputs.
  gnu: font-google-noto-emoji: Update to 2.042.
  gnu: font-google-noto-sans-cjk: Switch to variable fonts.
  gnu: font-google-noto-serif-cjk: Update to 2.002.

 gnu/packages/fonts.scm | 93 +++++++++++++++++++++++++++++++++++-------
 1 file changed, 79 insertions(+), 14 deletions(-)


base-commit: 8c0282cf543fe205a5b89201cd7bb8889121a07c
--
2.41.0




Information forwarded to hako <at> ultrarare.space, all_but_last <at> 163.com, iyzsong <at> envs.net, guix-patches <at> gnu.org:
bug#69424; Package guix-patches. (Wed, 28 Feb 2024 03:10:02 GMT) Full text and rfc822 format available.

Message #26 received at 69424 <at> debbugs.gnu.org (full text, mbox):

From: Hilton Chain <hako <at> ultrarare.space>
To: 69424 <at> debbugs.gnu.org
Cc: Hilton Chain <hako <at> ultrarare.space>
Subject: [PATCH v2 1/5] gnu: font-google-noto: Update to 24.2.1.
Date: Wed, 28 Feb 2024 11:08:32 +0800
* gnu/packages/fonts.scm (font-google-noto): Update to 24.2.1.

Change-Id: I238f914388a2d808b817de1252ba8ee84c6299bd
---
 gnu/packages/fonts.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm
index 2cc420f7ba..72bf0124c4 100644
--- a/gnu/packages/fonts.scm
+++ b/gnu/packages/fonts.scm
@@ -1081,7 +1081,7 @@ (define-public font-gnu-unifont
 (define-public font-google-noto
   (package
     (name "font-google-noto")
-    (version "23.11.1")
+    (version "24.2.1")
     (source
      (origin
        (method git-fetch)
@@ -1090,7 +1090,7 @@ (define-public font-google-noto
              (commit (string-append "noto-monthly-release-" version))))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "0vvxhky35l4i0ha60yw0gj26f3v33hpf2zax17yyj16mww4cn4d8"))))
+        (base32 "087jg8ahpq35xwyrmvm9ivxl0wjic2j4r28bbrwqmgdva9brms40"))))
     (build-system font-build-system)
     (home-page "https://www.google.com/get/noto/")
     (synopsis "Fonts to cover all languages")
-- 
2.41.0





Information forwarded to hako <at> ultrarare.space, all_but_last <at> 163.com, iyzsong <at> envs.net, guix-patches <at> gnu.org:
bug#69424; Package guix-patches. (Wed, 28 Feb 2024 03:10:04 GMT) Full text and rfc822 format available.

Message #29 received at 69424 <at> debbugs.gnu.org (full text, mbox):

From: Hilton Chain <hako <at> ultrarare.space>
To: 69424 <at> debbugs.gnu.org
Cc: Hilton Chain <hako <at> ultrarare.space>, Jiwei YANG <yangjiwei <at> protonmail.com>
Subject: [PATCH v2 2/5] gnu: font-google-noto: Prefer variable fonts and split
 outputs.
Date: Wed, 28 Feb 2024 11:08:33 +0800
* gnu/packages/fonts.scm (font-google-noto)
[arguments]<#:phase>: Only install variable fonts to "out" when available.
Install hinted TTFs into "ttf" output.
[outputs]: Add "ttf".

Suggested-by: Jiwei YANG <yangjiwei <at> protonmail.com>
Change-Id: Icac2927fb6c35d08504c379e273a5fc03b08ac46
---
 gnu/packages/fonts.scm | 44 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 44 insertions(+)

diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm
index 72bf0124c4..9a268364d7 100644
--- a/gnu/packages/fonts.scm
+++ b/gnu/packages/fonts.scm
@@ -1092,6 +1092,50 @@ (define-public font-google-noto
        (sha256
         (base32 "087jg8ahpq35xwyrmvm9ivxl0wjic2j4r28bbrwqmgdva9brms40"))))
     (build-system font-build-system)
+    (arguments
+     (list
+      #:modules
+      '((guix build font-build-system)
+        (guix build utils)
+        (ice-9 ftw))
+      #:phases
+      #~(modify-phases %standard-phases
+          (replace 'install
+            (lambda _
+              (define install
+                (assoc-ref %standard-phases 'install))
+              (define (scan-directory name)
+                (scandir name (lambda (file)
+                                (not (member file '("." ".." "LICENSE"))))))
+              (define (install-font-variant variant)
+                "Given font variant VARIANT, install one of its formats,
+variable TTF or OTF or TTF."
+                (with-directory-excursion variant
+                  (let ((formats (scan-directory ".")))
+                    (cond
+                     ((member "variable-ttf" formats)
+                      (with-directory-excursion "variable-ttf"
+                        (install #:outputs `(("out" . ,#$output)))))
+                     ((member "otf" formats)
+                      (with-directory-excursion "otf"
+                        (install #:outputs `(("out" . ,#$output)))))
+                     ((member "ttf" formats)
+                      (with-directory-excursion "ttf"
+                        (install #:outputs `(("out" . ,#$output)))))))))
+              (define (install-font font)
+                "Given font FONT, install one of its variants, full or unhinted,
+and install its hinted variant into 'ttf' output.
+
+unhinted and hinted variants are always available."
+                (with-directory-excursion font
+                  (if (member "full" (scan-directory "."))
+                      (install-font-variant "full")
+                      (install-font-variant "unhinted"))
+                  (with-directory-excursion "hinted"
+                    (install #:outputs `(("out" . ,#$output:ttf))))))
+              (with-directory-excursion "fonts"
+                (for-each install-font (scan-directory "."))))))))
+    (outputs '("out" "ttf"))
     (home-page "https://www.google.com/get/noto/")
     (synopsis "Fonts to cover all languages")
     (description "Google Noto Fonts is a family of fonts designed to support
-- 
2.41.0





Information forwarded to hako <at> ultrarare.space, all_but_last <at> 163.com, iyzsong <at> envs.net, guix-patches <at> gnu.org:
bug#69424; Package guix-patches. (Wed, 28 Feb 2024 03:10:05 GMT) Full text and rfc822 format available.

Message #32 received at 69424 <at> debbugs.gnu.org (full text, mbox):

From: Hilton Chain <hako <at> ultrarare.space>
To: 69424 <at> debbugs.gnu.org
Cc: Hilton Chain <hako <at> ultrarare.space>
Subject: [PATCH v2 3/5] gnu: font-google-noto-emoji: Update to 2.042.
Date: Wed, 28 Feb 2024 11:08:34 +0800
* gnu/packages/fonts.scm (font-google-noto-emoji): Update to 2.042.
[arguments]<#:phases>: Remove 'remove-unsupported.
Replace install phase instead.

Change-Id: I76cfbf3f8d34c484ed59b99969da7d93aaf41d72
---
 gnu/packages/fonts.scm | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm
index 9a268364d7..9674f9bab5 100644
--- a/gnu/packages/fonts.scm
+++ b/gnu/packages/fonts.scm
@@ -1146,7 +1146,7 @@ (define-public font-google-noto
 (define-public font-google-noto-emoji
   (package
     (name "font-google-noto-emoji")
-    (version "2.038")
+    (version "2.042")
     (source
      (origin
        (method git-fetch)
@@ -1156,7 +1156,7 @@ (define-public font-google-noto-emoji
        (file-name (git-file-name name version))
        (sha256
         (base32
-         "1rgmcc6nqq805iqr8kvxxlk5cf50q714xaxk3ld6rjrd69kb8ix9"))))
+         "17i7awyqz9jv0j2blcf0smmpas375c3pdhjv1zqzl861g8qm1lm2"))))
     (build-system font-build-system)
     (arguments
      (list
@@ -1166,11 +1166,10 @@ (define-public font-google-noto-emoji
             (lambda _
               ;; Note this ensures the correct license file is installed.
               (chdir "fonts")))
-          (add-after 'enter-font-directory 'remove-unsupported
-            (lambda* _
-              (delete-file "NotoColorEmoji_WindowsCompatible.ttf")
-              (delete-file "Noto-COLRv1-noflags.ttf")
-              (delete-file "Noto-COLRv1.ttf"))))))
+          (replace 'install
+            (lambda _
+              (let (dir ((string-append #$output "/share/fonts/truetype")))
+                (install-file "NotoColorEmoji.ttf" dir)))))))
     (home-page "https://fonts.google.com/noto/specimen/Noto+Color+Emoji")
     (synopsis "Font for rendering color emoji characters")
     (description
-- 
2.41.0





Information forwarded to hako <at> ultrarare.space, all_but_last <at> 163.com, iyzsong <at> envs.net, guix-patches <at> gnu.org:
bug#69424; Package guix-patches. (Wed, 28 Feb 2024 03:10:06 GMT) Full text and rfc822 format available.

Message #35 received at 69424 <at> debbugs.gnu.org (full text, mbox):

From: Hilton Chain <hako <at> ultrarare.space>
To: 69424 <at> debbugs.gnu.org
Cc: Hilton Chain <hako <at> ultrarare.space>
Subject: [PATCH v2 4/5] gnu: font-google-noto-sans-cjk: Switch to variable
 fonts.
Date: Wed, 28 Feb 2024 11:08:35 +0800
* gnu/packages/fonts.scm (font-google-noto-sans-cjk)
[source]: Switch to variable fonts.
[arguments]<#:phases>: Keep only TTCs in "out".
Install OTFs into "otf" output.
[outputs]: Add "otf".

Change-Id: I996d75b7892333bc69d21af53a5243a442e3a6b3
---
 gnu/packages/fonts.scm | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm
index 9674f9bab5..356103c6a1 100644
--- a/gnu/packages/fonts.scm
+++ b/gnu/packages/fonts.scm
@@ -1186,11 +1186,22 @@ (define-public font-google-noto-sans-cjk
        (method url-fetch)
        (uri (string-append
              "https://github.com/googlefonts/noto-cjk/releases/download/Sans"
-             version "/03_NotoSansCJK-OTC.zip"))
+             version "/01_NotoSansCJK-OTF-VF.zip"))
        (file-name (string-append name "-" version ".zip"))
        (sha256
-        (base32 "1v9yda7r98g4a3pk0y3cjbgc1i2lv4ax0f0v6aqasfzz4ldlx3sj"))))
+        (base32 "1ka37kqyd0sfqwk485nv6ihrdjl5xycr38m4jq40r2lzmpmkmqym"))))
     (build-system font-build-system)
+    (arguments
+     (list #:phases
+           #~(modify-phases %standard-phases
+               (replace 'install
+                 (lambda _
+                   (let ((install (assoc-ref %standard-phases 'install)))
+                     (with-directory-excursion "OTC"
+                       (install #:outputs `(("out" . ,#$output))))
+                     (with-directory-excursion "OTF"
+                       (install #:outputs `(("out" . ,#$output:otf))))))))))
+    (outputs '("out" "otf"))
     (home-page "https://www.google.com/get/noto/")
     (synopsis "Fonts to cover all languages")
     (description "Google Noto Fonts is a family of fonts designed to support
-- 
2.41.0





Information forwarded to hako <at> ultrarare.space, all_but_last <at> 163.com, iyzsong <at> envs.net, guix-patches <at> gnu.org:
bug#69424; Package guix-patches. (Wed, 28 Feb 2024 03:11:02 GMT) Full text and rfc822 format available.

Message #38 received at 69424 <at> debbugs.gnu.org (full text, mbox):

From: Hilton Chain <hako <at> ultrarare.space>
To: 69424 <at> debbugs.gnu.org
Cc: Hilton Chain <hako <at> ultrarare.space>
Subject: [PATCH v2 5/5] gnu: font-google-noto-serif-cjk: Update to 2.002.
Date: Wed, 28 Feb 2024 11:08:36 +0800
* gnu/packages/fonts.scm (font-google-noto-serif-cjk): Update to 2.002.
[source]: Switch to variable fonts.
[arguments]<#:phases>: Keep only TTCs in "out".
Install OTFs into "otf" output.
[outputs]: Add "otf".

Change-Id: Id22401ce85028951b6044ba418dbad764d581f01
---
 gnu/packages/fonts.scm | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm
index 356103c6a1..02c299cdd4 100644
--- a/gnu/packages/fonts.scm
+++ b/gnu/packages/fonts.scm
@@ -1213,17 +1213,28 @@ (define-public font-google-noto-sans-cjk
 (define-public font-google-noto-serif-cjk
   (package
     (name "font-google-noto-serif-cjk")
-    (version "2.001")
+    (version "2.002")
     (source
      (origin
        (method url-fetch)
        (uri (string-append
              "https://github.com/googlefonts/noto-cjk/releases/download/Serif"
-             version "/04_NotoSerifCJKOTC.zip"))
+             version "/02_NotoSerifCJK-OTF-VF.zip"))
        (file-name (string-append name "-" version ".zip"))
        (sha256
-        (base32 "1l6r3sz2s0vcyfx6ria7wqcq45zp40gxgg97lh8hpmajhzw301ig"))))
+        (base32 "007jk7rmfapq5zq4ji9d1l5gpp34p98l9ylhiw33q42d66v2g717"))))
     (build-system font-build-system)
+    (arguments
+     (list #:phases
+           #~(modify-phases %standard-phases
+               (replace 'install
+                 (lambda _
+                   (let ((install (assoc-ref %standard-phases 'install)))
+                     (with-directory-excursion "OTC"
+                       (install #:outputs `(("out" . ,#$output))))
+                     (with-directory-excursion "OTF"
+                       (install #:outputs `(("out" . ,#$output:otf))))))))))
+    (outputs '("out" "otf"))
     (home-page "https://www.google.com/get/noto/")
     (synopsis "Fonts to cover all languages")
     (description "Google Noto Fonts is a family of fonts designed to support
-- 
2.41.0





Information forwarded to all_but_last <at> 163.com, iyzsong <at> envs.net, guix-patches <at> gnu.org:
bug#69424; Package guix-patches. (Wed, 28 Feb 2024 13:33:01 GMT) Full text and rfc822 format available.

Message #41 received at 69424 <at> debbugs.gnu.org (full text, mbox):

From: Hilton Chain <hako <at> ultrarare.space>
To: 69424 <at> debbugs.gnu.org
Cc: Hilton Chain <hako <at> ultrarare.space>
Subject: [PATCH v3 0/5] Update Noto fonts and switch them to variable fonts
 (77% size reduced).
Date: Wed, 28 Feb 2024 21:31:32 +0800
V2 -> V3:
    - Fix malformed ‘let’ for font-google-noto-emoji.
    - Simplify phases for font-google-noto again.
    - Adjust commit messages.

V1 -> V2: Simplify phases and add extra outputs.

Hilton Chain (5):
  gnu: font-google-noto: Update to 24.2.1.
  gnu: font-google-noto: Prefer variable fonts and split outputs.
  gnu: font-google-noto-emoji: Update to 2.042.
  gnu: font-google-noto-sans-cjk: Switch to variable fonts.
  gnu: font-google-noto-serif-cjk: Update to 2.002.

 gnu/packages/fonts.scm | 94 +++++++++++++++++++++++++++++++++++-------
 1 file changed, 80 insertions(+), 14 deletions(-)


base-commit: 8c0282cf543fe205a5b89201cd7bb8889121a07c
--
2.41.0




Information forwarded to all_but_last <at> 163.com, iyzsong <at> envs.net, guix-patches <at> gnu.org:
bug#69424; Package guix-patches. (Wed, 28 Feb 2024 13:34:02 GMT) Full text and rfc822 format available.

Message #44 received at 69424 <at> debbugs.gnu.org (full text, mbox):

From: Hilton Chain <hako <at> ultrarare.space>
To: 69424 <at> debbugs.gnu.org
Cc: Hilton Chain <hako <at> ultrarare.space>
Subject: [PATCH v3 4/5] gnu: font-google-noto-sans-cjk: Switch to variable
 fonts.
Date: Wed, 28 Feb 2024 21:32:21 +0800
* gnu/packages/fonts.scm (font-google-noto-sans-cjk)
[source]: Switch to variable fonts.
[outputs]: Add "otf".
[arguments]<#:phases>: Install OTFs into it.
Keep TTCs in "out".

Change-Id: I996d75b7892333bc69d21af53a5243a442e3a6b3
---
 gnu/packages/fonts.scm | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm
index e1e1127ab5..42ebda3ef4 100644
--- a/gnu/packages/fonts.scm
+++ b/gnu/packages/fonts.scm
@@ -1187,11 +1187,22 @@ (define-public font-google-noto-sans-cjk
        (method url-fetch)
        (uri (string-append
              "https://github.com/googlefonts/noto-cjk/releases/download/Sans"
-             version "/03_NotoSansCJK-OTC.zip"))
+             version "/01_NotoSansCJK-OTF-VF.zip"))
        (file-name (string-append name "-" version ".zip"))
        (sha256
-        (base32 "1v9yda7r98g4a3pk0y3cjbgc1i2lv4ax0f0v6aqasfzz4ldlx3sj"))))
+        (base32 "1ka37kqyd0sfqwk485nv6ihrdjl5xycr38m4jq40r2lzmpmkmqym"))))
     (build-system font-build-system)
+    (arguments
+     (list #:phases
+           #~(modify-phases %standard-phases
+               (replace 'install
+                 (lambda _
+                   (let ((install (assoc-ref %standard-phases 'install)))
+                     (with-directory-excursion "OTC"
+                       (install #:outputs `(("out" . ,#$output))))
+                     (with-directory-excursion "OTF"
+                       (install #:outputs `(("out" . ,#$output:otf))))))))))
+    (outputs '("out" "otf"))
     (home-page "https://www.google.com/get/noto/")
     (synopsis "Fonts to cover all languages")
     (description "Google Noto Fonts is a family of fonts designed to support
-- 
2.41.0





Information forwarded to all_but_last <at> 163.com, iyzsong <at> envs.net, guix-patches <at> gnu.org:
bug#69424; Package guix-patches. (Wed, 28 Feb 2024 13:34:02 GMT) Full text and rfc822 format available.

Message #47 received at 69424 <at> debbugs.gnu.org (full text, mbox):

From: Hilton Chain <hako <at> ultrarare.space>
To: 69424 <at> debbugs.gnu.org
Cc: Hilton Chain <hako <at> ultrarare.space>
Subject: [PATCH v3 5/5] gnu: font-google-noto-serif-cjk: Update to 2.002.
Date: Wed, 28 Feb 2024 21:32:22 +0800
* gnu/packages/fonts.scm (font-google-noto-serif-cjk): Update to 2.002.
[source]: Switch to variable fonts.
[outputs]: Add "otf".
[arguments]<#:phases>: Install OTFs into it.
Keep TTCs in "out".

Change-Id: Id22401ce85028951b6044ba418dbad764d581f01
---
 gnu/packages/fonts.scm | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm
index 42ebda3ef4..cdd6e80655 100644
--- a/gnu/packages/fonts.scm
+++ b/gnu/packages/fonts.scm
@@ -1214,17 +1214,28 @@ (define-public font-google-noto-sans-cjk
 (define-public font-google-noto-serif-cjk
   (package
     (name "font-google-noto-serif-cjk")
-    (version "2.001")
+    (version "2.002")
     (source
      (origin
        (method url-fetch)
        (uri (string-append
              "https://github.com/googlefonts/noto-cjk/releases/download/Serif"
-             version "/04_NotoSerifCJKOTC.zip"))
+             version "/02_NotoSerifCJK-OTF-VF.zip"))
        (file-name (string-append name "-" version ".zip"))
        (sha256
-        (base32 "1l6r3sz2s0vcyfx6ria7wqcq45zp40gxgg97lh8hpmajhzw301ig"))))
+        (base32 "007jk7rmfapq5zq4ji9d1l5gpp34p98l9ylhiw33q42d66v2g717"))))
     (build-system font-build-system)
+    (arguments
+     (list #:phases
+           #~(modify-phases %standard-phases
+               (replace 'install
+                 (lambda _
+                   (let ((install (assoc-ref %standard-phases 'install)))
+                     (with-directory-excursion "OTC"
+                       (install #:outputs `(("out" . ,#$output))))
+                     (with-directory-excursion "OTF"
+                       (install #:outputs `(("out" . ,#$output:otf))))))))))
+    (outputs '("out" "otf"))
     (home-page "https://www.google.com/get/noto/")
     (synopsis "Fonts to cover all languages")
     (description "Google Noto Fonts is a family of fonts designed to support
-- 
2.41.0





Information forwarded to all_but_last <at> 163.com, iyzsong <at> envs.net, guix-patches <at> gnu.org:
bug#69424; Package guix-patches. (Wed, 28 Feb 2024 13:41:01 GMT) Full text and rfc822 format available.

Message #50 received at 69424 <at> debbugs.gnu.org (full text, mbox):

From: Hilton Chain <hako <at> ultrarare.space>
To: 69424 <at> debbugs.gnu.org
Cc: Hilton Chain <hako <at> ultrarare.space>
Subject: [PATCH v3 1/5] gnu: font-google-noto: Update to 24.2.1.
Date: Wed, 28 Feb 2024 21:32:18 +0800
* gnu/packages/fonts.scm (font-google-noto): Update to 24.2.1.

Change-Id: I238f914388a2d808b817de1252ba8ee84c6299bd
---
 gnu/packages/fonts.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm
index 2cc420f7ba..72bf0124c4 100644
--- a/gnu/packages/fonts.scm
+++ b/gnu/packages/fonts.scm
@@ -1081,7 +1081,7 @@ (define-public font-gnu-unifont
 (define-public font-google-noto
   (package
     (name "font-google-noto")
-    (version "23.11.1")
+    (version "24.2.1")
     (source
      (origin
        (method git-fetch)
@@ -1090,7 +1090,7 @@ (define-public font-google-noto
              (commit (string-append "noto-monthly-release-" version))))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "0vvxhky35l4i0ha60yw0gj26f3v33hpf2zax17yyj16mww4cn4d8"))))
+        (base32 "087jg8ahpq35xwyrmvm9ivxl0wjic2j4r28bbrwqmgdva9brms40"))))
     (build-system font-build-system)
     (home-page "https://www.google.com/get/noto/")
     (synopsis "Fonts to cover all languages")
-- 
2.41.0





Information forwarded to all_but_last <at> 163.com, iyzsong <at> envs.net, guix-patches <at> gnu.org:
bug#69424; Package guix-patches. (Wed, 28 Feb 2024 13:41:02 GMT) Full text and rfc822 format available.

Message #53 received at 69424 <at> debbugs.gnu.org (full text, mbox):

From: Hilton Chain <hako <at> ultrarare.space>
To: 69424 <at> debbugs.gnu.org
Cc: Hilton Chain <hako <at> ultrarare.space>
Subject: [PATCH v3 3/5] gnu: font-google-noto-emoji: Update to 2.042.
Date: Wed, 28 Feb 2024 21:32:20 +0800
* gnu/packages/fonts.scm (font-google-noto-emoji): Update to 2.042.
[arguments]<#:phases>: Remove 'remove-unsupported.
Install only "NotoColorEmoji.ttf".

Change-Id: I76cfbf3f8d34c484ed59b99969da7d93aaf41d72
---
 gnu/packages/fonts.scm | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm
index 4f9400047f..e1e1127ab5 100644
--- a/gnu/packages/fonts.scm
+++ b/gnu/packages/fonts.scm
@@ -1147,7 +1147,7 @@ (define-public font-google-noto
 (define-public font-google-noto-emoji
   (package
     (name "font-google-noto-emoji")
-    (version "2.038")
+    (version "2.042")
     (source
      (origin
        (method git-fetch)
@@ -1157,7 +1157,7 @@ (define-public font-google-noto-emoji
        (file-name (git-file-name name version))
        (sha256
         (base32
-         "1rgmcc6nqq805iqr8kvxxlk5cf50q714xaxk3ld6rjrd69kb8ix9"))))
+         "17i7awyqz9jv0j2blcf0smmpas375c3pdhjv1zqzl861g8qm1lm2"))))
     (build-system font-build-system)
     (arguments
      (list
@@ -1167,11 +1167,10 @@ (define-public font-google-noto-emoji
             (lambda _
               ;; Note this ensures the correct license file is installed.
               (chdir "fonts")))
-          (add-after 'enter-font-directory 'remove-unsupported
-            (lambda* _
-              (delete-file "NotoColorEmoji_WindowsCompatible.ttf")
-              (delete-file "Noto-COLRv1-noflags.ttf")
-              (delete-file "Noto-COLRv1.ttf"))))))
+          (replace 'install
+            (lambda _
+              (let ((dir (string-append #$output "/share/fonts/truetype")))
+                (install-file "NotoColorEmoji.ttf" dir)))))))
     (home-page "https://fonts.google.com/noto/specimen/Noto+Color+Emoji")
     (synopsis "Font for rendering color emoji characters")
     (description
-- 
2.41.0





Information forwarded to all_but_last <at> 163.com, iyzsong <at> envs.net, guix-patches <at> gnu.org:
bug#69424; Package guix-patches. (Wed, 28 Feb 2024 13:53:01 GMT) Full text and rfc822 format available.

Message #56 received at 69424 <at> debbugs.gnu.org (full text, mbox):

From: Hilton Chain <hako <at> ultrarare.space>
To: 69424 <at> debbugs.gnu.org
Cc: Hilton Chain <hako <at> ultrarare.space>, Jiwei YANG <yangjiwei <at> protonmail.com>
Subject: [PATCH v3 2/5] gnu: font-google-noto: Prefer variable fonts and split
 outputs.
Date: Wed, 28 Feb 2024 21:32:19 +0800
* gnu/packages/fonts.scm (font-google-noto)[outputs]: Add "ttf".
[arguments]<#:phase>: Move hinted TTFs into it.
Prefer variable fonts.

Suggested-by: Jiwei YANG <yangjiwei <at> protonmail.com>
Change-Id: Icac2927fb6c35d08504c379e273a5fc03b08ac46
---
 gnu/packages/fonts.scm | 45 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 45 insertions(+)

diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm
index 72bf0124c4..4f9400047f 100644
--- a/gnu/packages/fonts.scm
+++ b/gnu/packages/fonts.scm
@@ -1092,6 +1092,51 @@ (define-public font-google-noto
        (sha256
         (base32 "087jg8ahpq35xwyrmvm9ivxl0wjic2j4r28bbrwqmgdva9brms40"))))
     (build-system font-build-system)
+    (arguments
+     (list
+      #:modules
+      '((guix build font-build-system)
+        (guix build utils)
+        (ice-9 ftw))
+      #:phases
+      #~(modify-phases %standard-phases
+          (replace 'install
+            (lambda _
+              (define* (install source #:optional (output #$output))
+                (let ((%install (assoc-ref %standard-phases 'install)))
+                  (with-directory-excursion source
+                    (%install #:outputs `(("out" . ,output))))))
+
+              (define (scan-directory name)
+                (scandir name (lambda (file)
+                                (not (member file '("." ".." "LICENSE"))))))
+
+              (define (install-font-variant variant)
+                "Given font variant VARIANT, install one of its formats,
+variable TTF or OTF or TTF."
+                (with-directory-excursion variant
+                  (let ((formats (scan-directory ".")))
+                    (cond
+                     ((member "variable-ttf" formats)
+                      (install "variable-ttf"))
+                     ((member "otf" formats)
+                      (install "otf"))
+                     ((member "ttf" formats)
+                      (install "ttf"))))))
+
+              (define (install-font font)
+                "Given FONT, install one of its variants, either full or
+unhinted, and install its hinted variant into 'ttf' output.  According to the
+source, unhinted and hinted variants are always available."
+                (with-directory-excursion font
+                  (if (member "full" (scan-directory "."))
+                      (install-font-variant "full")
+                      (install-font-variant "unhinted"))
+                  (install "hinted" #$output:ttf)))
+
+              (with-directory-excursion "fonts"
+                (for-each install-font (scan-directory "."))))))))
+    (outputs '("out" "ttf"))
     (home-page "https://www.google.com/get/noto/")
     (synopsis "Fonts to cover all languages")
     (description "Google Noto Fonts is a family of fonts designed to support
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#69424; Package guix-patches. (Wed, 28 Feb 2024 16:26:02 GMT) Full text and rfc822 format available.

Message #59 received at 69424 <at> debbugs.gnu.org (full text, mbox):

From: Jiwei YANG <yangjiwei <at> protonmail.com>
To: "69424 <at> debbugs.gnu.org" <69424 <at> debbugs.gnu.org>
Subject: (No Subject)
Date: Wed, 28 Feb 2024 12:19:41 +0000
[Message part 1 (text/plain, inline)]
Thanks! For font-google-noto-sans-cjk and font-google-noto-serif-cjk, will it be good to use "Super OTC" fonts? In my case, LibreOffice (flatpak version) was unable to recognize "Super OTC" edition but it is fixed now. There may still be some compatibility problems that I have not noticed.
[Message part 2 (text/html, inline)]
[publickey - yangjiwei@protonmail.com - 0xF13E1C55.asc (application/pgp-keys, attachment)]
[signature.asc (application/pgp-signature, attachment)]

Information forwarded to guix-patches <at> gnu.org:
bug#69424; Package guix-patches. (Thu, 29 Feb 2024 05:33:02 GMT) Full text and rfc822 format available.

Message #62 received at 69424 <at> debbugs.gnu.org (full text, mbox):

From: Hilton Chain <hako <at> ultrarare.space>
To: Jiwei YANG <yangjiwei <at> protonmail.com>
Cc: 69424 <at> debbugs.gnu.org
Subject: Re: [bug#69424] (No Subject)
Date: Thu, 29 Feb 2024 13:16:36 +0800
Hi!

On Wed, 28 Feb 2024 20:19:41 +0800,
Jiwei YANG via Guix-patches via wrote:
>
> Thanks! For font-google-noto-sans-cjk and font-google-noto-serif-cjk, will it
> be good to use "Super OTC" fonts? In my case, LibreOffice (flatpak version)
> was unable to recognize "Super OTC" edition but it is fixed now. There may
> still be some compatibility problems that I have not noticed.

Since in this series I'm switching to variable fonts, the (static) "Super OTC"
format has no advantage in either feature or size.


Thanks




Reply sent to Hilton Chain <hako <at> ultrarare.space>:
You have taken responsibility. (Sun, 17 Mar 2024 01:13:01 GMT) Full text and rfc822 format available.

Notification sent to Hilton Chain <hako <at> ultrarare.space>:
bug acknowledged by developer. (Sun, 17 Mar 2024 01:13:02 GMT) Full text and rfc822 format available.

Message #67 received at 69424-done <at> debbugs.gnu.org (full text, mbox):

From: Hilton Chain <hako <at> ultrarare.space>
To: 69424-done <at> debbugs.gnu.org
Cc: Zhu Zihao <all_but_last <at> 163.com>,
 宋文武 <iyzsong <at> envs.net>,
 Jiwei YANG <yangjiwei <at> protonmail.com>
Subject: Re: [bug#69424] [PATCH 0/5] Update Noto fonts and switch them to
 variable fonts (77% size reduced).
Date: Sun, 17 Mar 2024 09:09:17 +0800
Applied the series as 17b1350f68d5...b6835ef46224, closing.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 14 Apr 2024 11:24:11 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 61 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.