···11+{ lib, stdenv, fetchFromGitHub }:
22+33+stdenv.mkDerivation rec {
44+ pname = "kanit";
55+ version = "unstable-2020-06-16";
66+77+ src = fetchFromGitHub {
88+ owner = "cadsondemak";
99+ repo = pname;
1010+ rev = "467dfe842185681d8042cd608b8291199dd37cda";
1111+ sha256 = "0p0klb0376r8ki4ap2j99j7jcsq6wgb7m1hf3j1dkncwm7ikmg3h";
1212+ };
1313+1414+ installPhase = ''
1515+ mkdir -p $out/share/doc/${pname}/css/ $out/share/fonts/{opentype,truetype}
1616+1717+ cp $src/OFL.txt $src/documentation/{BRIEF.md,features.html} $out/share/doc/${pname}
1818+ cp $src/documentation/css/fonts.css $out/share/doc/${pname}/css
1919+ cp $src/fonts/otf/*.otf $out/share/fonts/opentype
2020+ cp $src/fonts/ttf/*.ttf $out/share/fonts/truetype
2121+ '';
2222+2323+ meta = with lib; {
2424+ homepage = "https://cadsondemak.github.io/kanit/";
2525+ description = "A loopless Thai and sans serif Latin typeface for contemporary and futuristic uses";
2626+ longDescription = ''
2727+ Kanit means mathematics in Thai, and the Kanit typeface family is a formal
2828+ Loopless Thai and Sans Latin design. It is a combination of concepts,
2929+ mixing a Humanist Sans Serif motif with the curves of Capsulated Geometric
3030+ styles that makes it suitable for various uses, contemporary and
3131+ futuristic. A notable detail is that the stroke terminals have flat angles,
3232+ which allows the design to enjoy decreased spacing between letters while
3333+ preserving readability and legibility at smaller point sizes.
3434+ '';
3535+ license = licenses.ofl;
3636+ platforms = platforms.all;
3737+ maintainers = [ maintainers.toastal ];
3838+ };
3939+}