Merge pull request #269224 from eclairevoyant/nomnatong

nomnatong: init at 5.07
This commit is contained in:
Peder Bergebakken Sundt 2023-12-09 02:11:10 +01:00 committed by GitHub
commit 0aca9bc27e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -0,0 +1,51 @@
{ lib
, stdenvNoCC
, fetchFromGitHub
, python3Packages
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "nomnatong";
version = "5.07";
src = fetchFromGitHub {
owner = "nomfoundation";
repo = "font";
rev = "v${finalAttrs.version}";
hash = "sha256-31sqjOIrJByfTx4Ez6KvQDApCeVYMQnGeiM9INMR3zI=";
};
nativeBuildInputs = [
python3Packages.afdko
python3Packages.fonttools
];
sourceRoot = "${finalAttrs.src.name}/src";
buildPhase = ''
runHook preBuild
makeotf -r -f font.pfa -omitMacNames -ff features.txt -mf FontMenuNameDB -ga -ci UnicodeVariationSequences.txt
otf2ttf NomNaTong-Regular.otf
sfntedit -d DSIG NomNaTong-Regular.otf
runHook postBuild
'';
installPhase = ''
runHook preInstall
install -Dm444 NomNaTong-Regular.otf -t $out/share/fonts/opentype/
install -Dm444 NomNaTong-Regular.ttf -t $out/share/fonts/truetype/
runHook postInstall
'';
meta = {
homepage = "http://nomfoundation.org/nom-tools/Nom-Font";
description = "The Hán-Nôm Coded Character Set and Nom Na Tong Regular Reference Font";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ eclairevoyant ];
platforms = lib.platforms.all;
};
})