gnu: Add font-ipa.

* gnu/packages/fonts.scm (font-ipa): New variable.

Signed-off-by: Nicolas Goaziou <mail@nicolasgoaziou.fr>
This commit is contained in:
Wolf 2023-05-24 23:22:53 +02:00 committed by Nicolas Goaziou
parent 14d4ff6cae
commit 8c8ca87c19
No known key found for this signature in database
GPG key ID: DA00B4F048E92F2D

View file

@ -2515,6 +2515,47 @@ (define-public font-meera-inimai
characteristic so that they sit smoothly with the Tamil glyphs.")
(license license:silofl1.1)))
(define-public font-ipa
(package
(name "font-ipa")
(version "003.03")
(source (origin
(method url-fetch/zipbomb)
(uri (string-append
"https://moji.or.jp/wp-content/ipafont/IPAfont/IPAfont"
(string-join (string-split version #\.) "") ".zip"))
(sha256
(base32
"1rbgfq14ld0cwas6bx5h7pwyv2hkfa8ihnphsaz1brxqliwysmgp"))))
(build-system font-build-system)
(arguments
(list
#:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'make-read-only
(lambda _
;; Otherwise the files have the executable bit set.
(for-each (lambda (file) (chmod file #o444))
(find-files "." #:directories? #f))))
(add-after 'install 'install-doc
(lambda _
(let ((font+version
#$(string-append "IPAfont"
(string-join (string-split version #\.)
"")))
(doc-dir (string-append #$output "/share/doc/" #$name)))
(with-directory-excursion font+version
(mkdir-p doc-dir)
(copy-file (string-append "Readme_" font+version ".txt")
(string-append doc-dir "/README"))
(copy-file "IPA_Font_License_Agreement_v1.0.txt"
(string-append doc-dir "/LICENSE")))))))))
(home-page "https://moji.or.jp/ipafont/")
(synopsis "Japanese font from the Information-technology Promotion Agency")
(description "This package provides Japanese outline fonts by
Information-technology Promotion Agency, Japan (IPA)")
(license license:ipa)))
(define-public font-ipa-ex
(package
(name "font-ipa-ex")