Merge pull request #24624 from taku0/source-han-serif
add Source Han Serif font
This commit is contained in:
commit
4984e7e053
@ -501,6 +501,7 @@
|
||||
tailhook = "Paul Colomiets <paul@colomiets.name>";
|
||||
takikawa = "Asumu Takikawa <asumu@igalia.com>";
|
||||
taktoa = "Remy Goldschmidt <taktoa@gmail.com>";
|
||||
taku0 = "Takuo Yonezawa <mxxouy6x3m_github@tatapa.org>";
|
||||
tavyc = "Octavian Cerna <octavian.cerna@gmail.com>";
|
||||
teh = "Tom Hunger <tehunger@gmail.com>";
|
||||
telotortium = "Robert Irelan <rirelan@gmail.com>";
|
||||
|
@ -23,10 +23,11 @@ let
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "${language} subset of an open source Pan-CJK typeface";
|
||||
description = "${language} subset of an open source Pan-CJK sans-serif typeface";
|
||||
homepage = https://github.com/adobe-fonts/source-han-sans;
|
||||
license = stdenv.lib.licenses.ofl;
|
||||
platforms = stdenv.lib.platforms.unix;
|
||||
maintainers = with stdenv.lib.maintainers; [ taku0 ];
|
||||
};
|
||||
};
|
||||
in
|
||||
|
59
pkgs/data/fonts/source-han-serif/default.nix
Normal file
59
pkgs/data/fonts/source-han-serif/default.nix
Normal file
@ -0,0 +1,59 @@
|
||||
{stdenv, fetchurl, unzip}:
|
||||
|
||||
let
|
||||
makePackage = {variant, language, region, sha256}: stdenv.mkDerivation rec {
|
||||
version = "1.000R";
|
||||
name = "source-han-serif-${variant}-${version}";
|
||||
revision = "f6cf97d92b22e7bd77e355a61fe549ae44b6de76";
|
||||
|
||||
buildInputs = [ unzip ];
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/adobe-fonts/source-han-serif/raw/${revision}/SubsetOTF/SourceHanSerif${region}.zip";
|
||||
inherit sha256;
|
||||
};
|
||||
|
||||
setSourceRoot = ''
|
||||
sourceRoot=$( echo SourceHanSerif* )
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/share/fonts/opentype
|
||||
cp $( find . -name '*.otf' ) $out/share/fonts/opentype
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "${language} subset of an open source Pan-CJK serif typeface";
|
||||
homepage = https://github.com/adobe-fonts/source-han-sans;
|
||||
license = stdenv.lib.licenses.ofl;
|
||||
platforms = stdenv.lib.platforms.unix;
|
||||
maintainers = with stdenv.lib.maintainers; [ taku0 ];
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
japanese = makePackage {
|
||||
variant = "japanese";
|
||||
language = "Japanese";
|
||||
region = "JP";
|
||||
sha256 = "0488zxr6jpwinzayrznc4ciy8mqcq9afx80xnp37pl9gcxsv0jp7";
|
||||
};
|
||||
korean = makePackage {
|
||||
variant = "korean";
|
||||
language = "Korean";
|
||||
region = "KR";
|
||||
sha256 = "1kwsqrb3s52nminq65n3la540dgvahnhvgwv5h168nrmz881ni9r";
|
||||
};
|
||||
simplified-chinese = makePackage {
|
||||
variant = "simplified-chinese";
|
||||
language = "Simplified Chinese";
|
||||
region = "CN";
|
||||
sha256 = "0y6js0hjgf1i8mf7kzklcl02qg0bi7j8n7j1l4awmkij1ix2yc43";
|
||||
};
|
||||
traditional-chinese = makePackage {
|
||||
variant = "traditional-chinese";
|
||||
language = "Traditional Chinese";
|
||||
region = "TW";
|
||||
sha256 = "0q52dn0vh3pqpr9gn4r4qk99lkvhf2gl12y99n9423brrqyfbi6h";
|
||||
};
|
||||
}
|
@ -12636,6 +12636,11 @@ with pkgs;
|
||||
source-han-sans-korean = sourceHanSansPackages.korean;
|
||||
source-han-sans-simplified-chinese = sourceHanSansPackages.simplified-chinese;
|
||||
source-han-sans-traditional-chinese = sourceHanSansPackages.traditional-chinese;
|
||||
sourceHanSerifPackages = callPackage ../data/fonts/source-han-serif { };
|
||||
source-han-serif-japanese = sourceHanSerifPackages.japanese;
|
||||
source-han-serif-korean = sourceHanSerifPackages.korean;
|
||||
source-han-serif-simplified-chinese = sourceHanSerifPackages.simplified-chinese;
|
||||
source-han-serif-traditional-chinese = sourceHanSerifPackages.traditional-chinese;
|
||||
|
||||
inherit (callPackages ../data/fonts/tai-languages { }) tai-ahom;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user