complete-computing-environment/vulfpeck_fonts_are_fun.org

3.5 KiB

Vulfpeck Fonts are Fun

I choose to standardize my interfaces on an opinionated font preference, using Vulf Mono and its sibling Vulf Sans, in most places I can get away with expressing a preference. These fonts were commissioned for Vulfpeck's website, an ascii-art band site for a bunch of funky nerds1. It's a really fun font, and variable-width variant is nice to use in most places. It's available for sale reasonably priced from the foundry, and I use it for my systems and sites. I do, unfortunately, feel a bit tied to fixed-width fonts in spite of the development of Vulf Sans in Emacs, whether or not I am writing code or processing data. There's too many rough edges, text editing quibbles, etc, that you have to deal with when your text is variably-set.

(defun cce/set-font-vulf ()
  (interactive)
  (set-face-attribute 'default nil        :family "Vulf Mono")
  (set-face-attribute 'fixed-pitch nil    :family "Vulf Mono")
  (set-face-attribute 'variable-pitch nil :family "Vulf Mono" :slant 'oblique))
(add-hook 'after-cce-hook #'cce/set-font-vulf)
(provide 'cce/vulfpeck)

Vulfpeck fonts on My NixOS configuration

A derivation for Vulf Mono.

{ pkgs, lib, stdenv, ...}:

stdenv.mkDerivation {
  name="vulfpeck-fonts";

  src=/home/rrix/sync/vulf-mono.zip;

  nativeBuildInputs = [ pkgs.unzip ];

  phases = [ "unpackPhase" ];

  unpackPhase = ''
    mkdir -p $out/share/fonts
    unzip -d $out/share/fonts/truetype $src Desktop/*.otf
  '';

  meta = {
    homepage="https://ohnotype.co/";
    license = lib.licenses.unfree;
    platforms = lib.platforms.all;
  };
}

A derivation for Vulf Sans.

{ pkgs, lib, stdenv, ...}:

stdenv.mkDerivation {
  name="vulfpeck-fonts";

  src=/home/rrix/sync/vulf-sans.zip;

  nativeBuildInputs = [ pkgs.unzip ];

  phases = [ "unpackPhase" ];

  unpackPhase = ''
    mkdir -p $out/share/fonts
    unzip -d $out/share/fonts/truetype $src Desktop/*.otf
  '';

  meta = {
    homepage="https://ohnotype.co/";
    license = lib.licenses.unfree;
    platforms = lib.platforms.all;
  };
}

I configure My NixOS to use Vulfpeck fonts where I can, and fall back to the free fonts otherwise:

{ pkgs, ... }:

let
 vulf_mono = pkgs.callPackage ../lib/vulfpeck.nix {};
 vulf_sans = pkgs.callPackage ../lib/vulfpeck-sans.nix {};
in
{
  fonts = {
    fontconfig.defaultFonts.monospace = ["Vulf Mono" "Deja Vu Sans Mono" "Noto Color Emoji" ];
    fontconfig.defaultFonts.sansSerif = ["Vulf Sans" "Deja Vu Sans" "Noto Color Emoji" ];
    packages = [ vulf_mono vulf_sans ];
  };
}