diff options
author | Tris Emmy Wilson <tris@tris.fyi> | 2021-11-28 15:15:20 -0600 |
---|---|---|
committer | Tris Emmy Wilson <tris@tris.fyi> | 2022-04-21 14:31:35 -0500 |
commit | 9f227ab554aacf331b4c8bb2f6663fe3ad63e937 (patch) | |
tree | 3b66c8e0e435a69976f2010213b5a24c8332b22d /pkgs/data/fonts | |
parent | 4590810a5dae05be8842f78bf8cbddcee0521f3c (diff) |
comic-mono: init at 2020-12-28
Diffstat (limited to 'pkgs/data/fonts')
-rw-r--r-- | pkgs/data/fonts/comic-mono/comic-mono-weight.conf | 14 | ||||
-rw-r--r-- | pkgs/data/fonts/comic-mono/default.nix | 35 |
2 files changed, 49 insertions, 0 deletions
diff --git a/pkgs/data/fonts/comic-mono/comic-mono-weight.conf b/pkgs/data/fonts/comic-mono/comic-mono-weight.conf new file mode 100644 index 0000000000000..97cfa3d83fdfa --- /dev/null +++ b/pkgs/data/fonts/comic-mono/comic-mono-weight.conf @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd"> +<fontconfig> + <!-- Fix missing/incorrect font weight data in Comic Mono. --> + + <match target="scan"> + <test name="fullname"> + <string>Comic Mono</string> + </test> + <edit name="weight"> + <const>book</const> + </edit> + </match> +</fontconfig> diff --git a/pkgs/data/fonts/comic-mono/default.nix b/pkgs/data/fonts/comic-mono/default.nix new file mode 100644 index 0000000000000..0c915f21c132e --- /dev/null +++ b/pkgs/data/fonts/comic-mono/default.nix @@ -0,0 +1,35 @@ +{ lib, fetchFromGitHub }: + +let + version = "2020-12-28"; +in fetchFromGitHub { + name = "comic-mono-font-${version}"; + + owner = "dtinth"; + repo = "comic-mono-font"; + rev = "9a96d04cdd2919964169192e7d9de5012ef66de4"; + + postFetch = '' + mkdir -p $out/share/fonts + tar -z -f $downloadedFile --wildcards -x \*.ttf --one-top-level=$out/share/fonts + + mkdir -p $out/etc/fonts/conf.d + ln -s ${./comic-mono-weight.conf} $out/etc/fonts/conf.d/30-comic-mono.conf + ''; + + hash = "sha256-poMU+WfDZcsyWyFiiXKJ284X22CJlxQIzcJtApnIdAY="; + + meta = with lib; { + description = "A legible monospace font that looks like Comic Sans"; + longDescription = '' + A legible monospace font... the very typeface you’ve been trained to + recognize since childhood. This font is a fork of Shannon Miwa’s Comic + Shanns (version 1). + ''; + homepage = "https://dtinth.github.io/comic-mono-font/"; + + license = licenses.mit; + maintainers = with maintainers; [ an-empty-string totoroot ]; + platforms = platforms.all; + }; +} |