GNU bug report logs - #77662
[PATCH] gnu: font-adobe-source-han-sans: Update to 2.004.

Previous Next

Package: guix-patches;

Reported by: Kurome <hunt31999 <at> gmail.com>

Date: Wed, 9 Apr 2025 05:38:02 UTC

Severity: normal

Tags: patch

Done: Christopher Baines <mail <at> cbaines.net>

To reply to this bug, email your comments to 77662 AT debbugs.gnu.org.
There is no need to reopen the bug first.

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

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


Report forwarded to hako <at> ultrarare.space, iyzsong <at> envs.net, guix-patches <at> gnu.org:
bug#77662; Package guix-patches. (Wed, 09 Apr 2025 05:38:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Kurome <hunt31999 <at> gmail.com>:
New bug report received and forwarded. Copy sent to hako <at> ultrarare.space, iyzsong <at> envs.net, guix-patches <at> gnu.org. (Wed, 09 Apr 2025 05:38:02 GMT) Full text and rfc822 format available.

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

From: Kurome <hunt31999 <at> gmail.com>
To: guix-patches <at> gnu.org
Cc: Kurome <hunt31999 <at> gmail.com>
Subject: [PATCH] gnu: font-adobe-source-han-sans: Update to 2.004.
Date: Wed,  9 Apr 2025 14:36:43 +0900
Since the OTC directory was deleted from the repo, I moved the source for
output "out" from OTC to SuperOTC.  SuperOTC is a combination of all the
weights of OTC.  The contents should not change.

* gnu/packages/fonts.scm: Import (guix build-system copy).
(font-adobe-source-han-sans): Update to 2.004.
[outputs] Add "hk" (Hong Kong).  Switch to SuperOTC for "out".
[build-system] Switch to copy-build-system for simplicity..
[arguments] Fixes for build system transition.  Use G-Expression.
[native-inputs]: Add unzip.

Change-Id: I3b37b9406c932b3e4f936367670cbd2ca4a0f926
---
 gnu/packages/fonts.scm | 60 ++++++++++++++++++++++--------------------
 1 file changed, 31 insertions(+), 29 deletions(-)

diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm
index 9d558eccbc..c3aed12bbd 100644
--- a/gnu/packages/fonts.scm
+++ b/gnu/packages/fonts.scm
@@ -93,6 +93,7 @@ (define-module (gnu packages fonts)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system meson)
   #:use-module (guix build-system trivial)
+  #:use-module (guix build-system copy)
   #:use-module (gnu packages)
   #:use-module (gnu packages c)
   #:use-module (gnu packages base)
@@ -795,46 +796,47 @@ (define-public font-terminus
 (define-public font-adobe-source-han-sans
   (package
     (name "font-adobe-source-han-sans")
-    (version "1.004")
+    (version "2.004")
     (source (origin
               (method git-fetch)
               (uri (git-reference
-                     (url "https://github.com/adobe-fonts/source-han-sans")
-                     (commit (string-append version "R"))))
+                    (url "https://github.com/adobe-fonts/source-han-sans")
+                    (commit (string-append version "R"))))
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "0zm884d8fp5gvirq324050kqv7am9khyqhs9kk4r4rr3jzn61jpk"))))
-    (outputs '("out"                 ; OpenType/CFF Collection (OTC), 121 MiB.
-               "cn" "jp" "kr" "tw")) ; Region-specific Subset OpenType/CFF.
-    (build-system trivial-build-system)
+                "0sgfvdigq9vdmf8wizapy8wcyzqrqj8il9sx1xzfm20qy376qvbf"))))
+    (outputs '("out"                   ; OpenType/CFF Collection (OTC), 112 MiB.
+               "cn" "hk" "jp" "kr" "tw")) ; Region-specific Subset OpenType/CFF.
+    (build-system copy-build-system)
     (arguments
-     `(#:modules ((guix build utils))
-       #:builder
-       (begin
-         (use-modules (guix build utils))
-         (let ((install-opentype-fonts
-                (lambda (fonts-dir out)
-                  (copy-recursively fonts-dir
-                                    (string-append (assoc-ref %outputs out)
-                                                   "/share/fonts/opentype")))))
-           (chdir (assoc-ref %build-inputs "source"))
-           (install-opentype-fonts "OTC" "out")
-           (install-opentype-fonts "SubsetOTF/CN" "cn")
-           (install-opentype-fonts "SubsetOTF/JP" "jp")
-           (install-opentype-fonts "SubsetOTF/KR" "kr")
-           (install-opentype-fonts "SubsetOTF/TW" "tw")
-           (for-each delete-file (find-files %output "\\.zip$"))
-           #t))))
+     (list
+      #:install-plan
+      #~'(("SubsetOTF/CN" "share/fonts/opentype" #:output "cn")
+          ("SubsetOTF/HK" "share/fonts/opentype" #:output "hk")
+          ("SubsetOTF/JP" "share/fonts/opentype" #:output "jp")
+          ("SubsetOTF/KR" "share/fonts/opentype" #:output "kr")
+          ("SubsetOTF/TW" "share/fonts/opentype" #:output "tw"))
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'install 'install-otc
+            (lambda _
+              (let ((destination-directory
+                     (string-append #$output "/share/fonts/opentype")))
+                (mkdir-p destination-directory)
+                (invoke "unzip" "SuperOTC/SourceHanSans.ttc.zip"
+                        "-d" destination-directory)))))))
+    (native-inputs (list unzip))
     (home-page "https://github.com/adobe-fonts/source-han-sans")
     (synopsis "Pan-CJK fonts")
     (description
      "Source Han Sans is a sans serif Pan-CJK font family that is offered in
-seven weights: ExtraLight, Light, Normal, Regular, Medium, Bold, and Heavy.
-And in several OpenType/CFF-based deployment configurations to accommodate
-various system requirements or limitations.  As the name suggests, Pan-CJK
-fonts are intended to support the characters necessary to render or display
-text in Simplified Chinese, Traditional Chinese, Japanese, and Korean.")
+seven weights: ExtraLight, Light, Normal, Regular, Medium, Bold, and Heavy.  And
+in several OpenType/CFF-based deployment configurations to accommodate various
+system requirements or limitations.  As the name suggests, Pan-CJK fonts are
+intended to support the characters necessary to render or display text in
+Simplified Chinese, Traditional Chinese (Taiwan, Hong Kong), Japanese, and
+Korean.")
     (license license:silofl1.1)))
 
 (define-public font-cns11643
-- 
2.49.0





Reply sent to Christopher Baines <mail <at> cbaines.net>:
You have taken responsibility. (Fri, 11 Apr 2025 11:37:03 GMT) Full text and rfc822 format available.

Notification sent to Kurome <hunt31999 <at> gmail.com>:
bug acknowledged by developer. (Fri, 11 Apr 2025 11:37:03 GMT) Full text and rfc822 format available.

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

From: Christopher Baines <mail <at> cbaines.net>
To: Kurome <hunt31999 <at> gmail.com>
Cc: 77662-done <at> debbugs.gnu.org, iyzsong <at> envs.net, hako <at> ultrarare.space
Subject: Re: [bug#77662] [PATCH] gnu: font-adobe-source-han-sans: Update to
 2.004.
Date: Fri, 11 Apr 2025 12:36:46 +0100
[Message part 1 (text/plain, inline)]
Kurome <hunt31999 <at> gmail.com> writes:

> Since the OTC directory was deleted from the repo, I moved the source for
> output "out" from OTC to SuperOTC.  SuperOTC is a combination of all the
> weights of OTC.  The contents should not change.
>
> * gnu/packages/fonts.scm: Import (guix build-system copy).
> (font-adobe-source-han-sans): Update to 2.004.
> [outputs] Add "hk" (Hong Kong).  Switch to SuperOTC for "out".
> [build-system] Switch to copy-build-system for simplicity..
> [arguments] Fixes for build system transition.  Use G-Expression.
> [native-inputs]: Add unzip.
>
> Change-Id: I3b37b9406c932b3e4f936367670cbd2ca4a0f926
> ---
>  gnu/packages/fonts.scm | 60 ++++++++++++++++++++++--------------------
>  1 file changed, 31 insertions(+), 29 deletions(-)

Thanks for the patch, I've pushed this to master as
70aa3b9c2fa4a8d6755fa4345210404223972628.

Chris
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 1 day ago.

Previous Next


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