Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

source-{sans,serif}-pro: reintroduce older font versions #163619

Merged
merged 1 commit into from
Mar 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions pkgs/data/fonts/source-sans-pro/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{ lib, fetchzip }:

# Source Sans Pro got renamed to Source Sans 3 (see
# https://github.com/adobe-fonts/source-sans/issues/192). This is the
# last version named "Pro". It is useful for backward compatibility
# with older documents/templates/etc.
let
version = "3.006";
in fetchzip {
name = "source-sans-pro-${version}";

url = "https://github.com/adobe-fonts/source-sans/archive/${version}R.zip";

postFetch = ''
mkdir -p $out/share/fonts/{opentype,truetype,variable}
unzip -j $downloadedFile "*/OTF/*.otf" -d $out/share/fonts/opentype
unzip -j $downloadedFile "*/TTF/*.ttf" -d $out/share/fonts/truetype
unzip -j $downloadedFile "*/VAR/*.otf" -d $out/share/fonts/variable
'';

sha256 = "sha256-uWr/dFyLF65v0o6+oN/3RQoe4ziPspzGB1rgiBkoTYY=";

meta = with lib; {
homepage = "https://adobe-fonts.github.io/source-sans/";
description = "Sans serif font family for user interface environments";
license = licenses.ofl;
platforms = platforms.all;
maintainers = with maintainers; [ ttuegel ];
};
}
30 changes: 30 additions & 0 deletions pkgs/data/fonts/source-serif-pro/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{ lib, fetchzip }:

# Source Serif Pro got renamed to Source Serif 4 (see
# https://github.com/adobe-fonts/source-serif/issues/77). This is the
# last version named "Pro". It is useful for backward compatibility
# with older documents/templates/etc.
let
version = "3.001";
in fetchzip {
name = "source-serif-pro-${version}";

url = "https://github.com/adobe-fonts/source-serif/releases/download/${version}R/source-serif-pro-${version}R.zip";

postFetch = ''
mkdir -p $out/share/fonts/{opentype,truetype,variable}
unzip -j $downloadedFile "*/OTF/*.otf" -d $out/share/fonts/opentype
unzip -j $downloadedFile "*/TTF/*.ttf" -d $out/share/fonts/truetype
unzip -j $downloadedFile "*/VAR/*.otf" -d $out/share/fonts/variable
'';

sha256 = "sha256-rYWk8D41QMuuSP+cQMk8ttT7uX3a7gBk4OqjA7K9udk=";

meta = with lib; {
homepage = "https://adobe-fonts.github.io/source-serif/";
description = "Typeface for setting text in many sizes, weights, and languages. Designed to complement Source Sans";
license = licenses.ofl;
platforms = platforms.all;
maintainers = with maintainers; [ ttuegel ];
};
}
2 changes: 0 additions & 2 deletions pkgs/top-level/aliases.nix
Original file line number Diff line number Diff line change
Expand Up @@ -1123,8 +1123,6 @@ mapAliases ({
source-han-serif-korean = source-han-serif;
source-han-serif-simplified-chinese = source-han-serif;
source-han-serif-traditional-chinese = source-han-serif;
source-sans-pro = source-sans; # Added 2021-10-20
source-serif-pro = source-serif; # Added 2021-10-20

spaceOrbit = throw "'spaceOrbit' has been renamed to/replaced by 'space-orbit'"; # Converted to throw 2022-02-22
spectral = neochat; # Added 2020-12-27
Expand Down
2 changes: 2 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24239,8 +24239,10 @@ with pkgs;
source-code-pro = callPackage ../data/fonts/source-code-pro {};

source-sans = callPackage ../data/fonts/source-sans { };
source-sans-pro = callPackage ../data/fonts/source-sans-pro { };

source-serif = callPackage ../data/fonts/source-serif { };
source-serif-pro = callPackage ../data/fonts/source-serif-pro { };

source-han-code-jp = callPackage ../data/fonts/source-han-code-jp { };

Expand Down