diff options
Diffstat (limited to 'nongnu/packages/fonts.scm')
-rw-r--r-- | nongnu/packages/fonts.scm | 185 |
1 files changed, 168 insertions, 17 deletions
diff --git a/nongnu/packages/fonts.scm b/nongnu/packages/fonts.scm index 7120fef..7b6eb75 100644 --- a/nongnu/packages/fonts.scm +++ b/nongnu/packages/fonts.scm @@ -1,26 +1,14 @@ -;;; GNU Guix --- Functional package management for GNU +;;; SPDX-License-Identifier: GPL-3.0-or-later ;;; Copyright © 2021 Korytov Pavel <thexcloud@gmail.com> ;;; Copyright © 2021 Jonathan Brielmaier <jonathan.brielmaier@web.de> -;;; -;;; This file is not part of GNU Guix. -;;; -;;; GNU Guix is free software; you can redistribute it and/or modify it -;;; under the terms of the GNU General Public License as published by -;;; the Free Software Foundation; either version 3 of the License, or (at -;;; your option) any later version. -;;; -;;; GNU Guix is distributed in the hope that it will be useful, but -;;; WITHOUT ANY WARRANTY; without even the implied warranty of -;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;;; GNU General Public License for more details. -;;; -;;; You should have received a copy of the GNU General Public License -;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. +;;; Copyright © 2023 Krzysztof Baranowski <pharcosyle@gmail.com> (define-module (nongnu packages fonts) #:use-module (ice-9 string-fun) #:use-module (gnu packages compression) + #:use-module (guix deprecation) #:use-module (guix download) + #:use-module (guix gexp) #:use-module (guix packages) #:use-module (guix build-system font) #:use-module (guix build-system copy) @@ -90,13 +78,16 @@ font from the pack of Microsoft core fonts for the web.")) #:font-name "Comic Sans MS" #:hash "0ki0rljjc1pxkbsxg515fwx15yc95bdyaksa3pjd89nyxzzg6vcw")) -(define-public font-microsoft-couirer-new +(define-public font-microsoft-courier-new (mscorefont "courie32" #:version "2.82" #:font-name "Courier New" #:hash "111k3waxki9yyxpjwl2qrdkswvsd2dmvhbjmmrwyipam2s31sldv")) +(define-public font-microsoft-couirer-new + (deprecated-package "font-microsoft-couirer-new" font-microsoft-courier-new)) + (define-public font-microsoft-georgia (mscorefont "georgi32" @@ -174,3 +165,163 @@ Included fonts: ("font-microsoft-trebuchet-ms" ,font-microsoft-trebuchet-ms) ("font-microsoft-verdana" ,font-microsoft-verdana) ("font-microsoft-webdings" ,font-microsoft-webdings))))) + +(define* (apple-font #:key + font-name + archive-timestamp + version + file + hash + synopsis + description) + (package + (name (string-append "font-apple-" + (string-replace-substring + (string-downcase font-name) + " " "-"))) + (version version) + (source + (origin + (method url-fetch) + (uri (string-append + ;; Download link is unversioned, use a stable snapshot. + "https://web.archive.org/web/" archive-timestamp "/" + "https://devimages-cdn.apple.com/design/resources/download/" + file ".dmg")) + (sha256 + (base32 hash)))) + (build-system font-build-system) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (replace 'unpack + (lambda* (#:key source inputs #:allow-other-keys) + (let ((7z-exe (search-input-file inputs "/bin/7z"))) + (invoke 7z-exe "x" source) + (invoke 7z-exe "x" (car (find-files "." "\\.pkg$"))) + (invoke 7z-exe "x" "Payload~"))))))) + (native-inputs (list p7zip)) + (home-page "https://developer.apple.com/fonts") + (synopsis (string-append font-name " typeface by Apple.")) + (description description) + (license + (nonfree + "https://www.apple.com" + "Specific license information is embedded in the font files.")))) + +(define-public font-apple-sf-pro + (apple-font + #:font-name "SF Pro" + #:archive-timestamp "20230710073336" + #:file "SF-Pro" + #:version "19.0d6e1" + #:hash "19qa6fs6x5614sqw9a6idlizzsssw8256crz1ps2p2n6gwp2fvaq" + #:description "This neutral, flexible, sans-serif typeface is the system +font for iOS, iPad OS, macOS and tvOS. SF Pro features nine weights, variable +optical sizes for optimal legibility, four widths, and includes a rounded +variant. SF Pro supports over 150 languages across Latin, Greek, and Cyrillic +scripts.")) + +(define-public font-apple-sf-compact + (apple-font + #:font-name "SF Compact" + #:archive-timestamp "20230710073418" + #:file "SF-Compact" + #:version "19.0d6e1" + #:hash "02127drlqvwscq6vaphmvsp85cn8j4zfhi0kb9a3fzc0z8b95hdq" + #:description "Sharing many features with SF Pro, SF Compact features an +efficient, compact design that is optimized for small sizes and narrow columns. +SF Compact is the system font for watchOS and includes a rounded variant.")) + +(define-public font-apple-sf-mono + (apple-font + #:font-name "SF Mono" + #:archive-timestamp "20230710073457" + #:file "SF-Mono" + #:version "19.0d6e1" + #:hash "0vjdpl3xyxl2rmfrnjsxpxdizpdr4canqa1nm63s5d3djs01iad6" + #:description "This monospaced variant of San Francisco enables alignment +between rows and columns of text, and is used in coding environments like Xcode. +SF Mono features six weights and supports Latin, Greek, and Cyrillic scripts.")) + +(define-public font-apple-sf-arabic + (apple-font + #:font-name "SF Arabic" + #:archive-timestamp "20230710073501" + #:file "SF-Arabic" + #:version "19.0d6e1" + #:hash "0phl3wi0lq7djcg8nqg1ml1f73bsfjzmvd2n8hkl6dbprmw614jp" + #:description "A contemporary interpretation of the Naskh style with a +rational and flexible design, this extension of San Francisco is the Arabic +system font on Apple platforms. Like San Francisco, SF Arabic features nine +weights, variable optical sizes that automatically adjust spacing and contrast +based on the point size, and includes a rounded variant.")) + +(define-public font-apple-new-york + (apple-font + #:font-name "New York" + #:archive-timestamp "20230710073506" + #:file "NY" + #:version "17.0d5e1" + #:hash "1hgxyizpgam7y1xh36fsypd3a1nn417wdnnfk1zahq9vhxrrds2w" + #:description "A companion to San Francisco, this serif typeface is based on +essential aspects of historical type styles. New York features six weights, +supports Latin, Greek and Cyrillic scripts, and features variable optical sizes +allowing it to perform as a traditional reading face at small sizes and a +graphic display face at larger sizes.")) + +;; At the time of this writing, `sf-symbols' is just `sf-pro' and `sf-compact' +;; together plus one extra file, SFSymbolsFallback.otf. This package is +;; probably of limited use on non-macOS but we'll include it for completeness +;; and in case the situation changes in the future. +(define-public font-apple-sf-symbols + (apple-font + #:font-name "SF Symbols" + #:archive-timestamp "20230710073513" + #:file "SF-Symbols-5" + #:version "5" + #:hash "1bwlq1nf75bv0x36qdk371r2pd5slf3jlv50wgsl0kpj1dds22sf" + #:description "With over 5,000 symbols, SF Symbols is a library of +iconography designed to integrate seamlessly with San Francisco, the system +font for Apple platforms. Symbols come in nine weights and three scales, and +automatically align with text labels.")) + +(define-public font-apple-color-emoji + (package + (name "font-apple-color-emoji") + (version "18.0d4e1") + (source + (origin + (method url-fetch) + (uri (string-append + "https://github.com/pharcosyle/apple-fonts" + "/releases/download" + "/Apple-Color-Emoji-" version "/Apple.Color.Emoji.ttc")) + (sha256 + (base32 "06i1ady7b2g1i2hl3f8yxn64g2i82c2ni9vdw25gpdqdj28vyqw3")))) + (build-system font-build-system) + (home-page "https://www.apple.com") + (synopsis "Apple Color Emoji typeface by Apple.") + (description "Color and black-and-white Apple emoji fonts.") + (license (nonfree "https://www.apple.com")))) + +(define-public font-apple-symbols + (package + (name "font-apple-symbols") + (version "17.0d1e2") + (source + (origin + (method url-fetch) + (uri (string-append + "https://github.com/pharcosyle/apple-fonts" + "/releases/download" + "/Apple-Symbols-" version "/Apple.Symbols.ttf")) + (sha256 + (base32 "14ivhsiszmy1ql69kpr1f33n07qgpaj7w43w2p5qnmlwcrvs3ccr")))) + (build-system font-build-system) + (home-page "https://www.apple.com") + (synopsis "Apple Symbols typeface by Apple.") + (description "An Apple system font intended to provide coverage for +characters defined as symbols in the Unicode Standard.") + (license (nonfree "https://www.apple.com")))) |