Subject: [bug#69424] [PATCH v3 4/5] gnu: font-google-noto-sans-cjk: Switch to variable fonts.

From: Hilton Chain <[email-masked]>
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