sup

A curses threads-with-tags style email client

sup-website.git

git clone https://supmua.dev/git/sup-website/
commit 20a82ec7edb5470246f113381b7b7e2c3bf8f851
parent 0cc1dcf5b9c1ee8d20ff04249ef520b522937292
Author: Dan Callaghan <djc@djc.id.au>
Date:   Sun, 18 Oct 2026 20:19:39 +1100

change font to Iosevka

Diffstat:
A _plugins/webfonts.nix | 98 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
A _plugins/webfonts.rb | 13 +++++++++++++
M stylesheets/public-inbox.css | 18 ++++++++++++------
M stylesheets/stylesheet.css | 27 +++++++++++++++++----------
4 files changed, 140 insertions(+), 16 deletions(-)
diff --git a/_plugins/webfonts.nix b/_plugins/webfonts.nix
@@ -0,0 +1,98 @@
+let
+  pkgs = import <nixpkgs> { };
+in
+(pkgs.iosevka.override {
+  privateBuildPlan = ''
+    [buildPlans.IosevkaAile]
+    family = "Iosevka Aile SS09"
+    spacing = "quasi-proportional"
+    serifs = "sans"
+    noLigation = true
+    webfontFormats = ["WOFF2"]
+    [buildPlans.IosevkaAile.variants]
+    inherits = "ss09"
+    [buildPlans.IosevkaAile.variants.design]
+    f = "narrow-serifless-crossbar-at-x-height"
+    i = "serifed-flat-tailed"
+    r = "narrow-hook-serifless"
+    t = "flat-hook-short-neck"
+    [buildPlans.IosevkaAile.weights]
+    Light = "default.Light"
+    Regular = "default.Regular"
+    Bold = "default.Bold"
+    [buildPlans.IosevkaAile.widths]
+    Normal = "default.Extended"
+    [buildPlans.IosevkaAile.slopes]
+    Upright = "default.Upright"
+    Italic = "default.Italic"
+    [buildPlans.IosevkaAile.subset.include]
+    ranges = [
+      # https://github.com/zachleat/glyphhanger/blob/8b81f57dc214cb2a1d1b5abb209e1d39454d7c51/src/GlyphHangerWhitelist.js#L14
+      [0, 255],
+      [305, 305],
+      [338, 339],
+      [699, 700],
+      [710, 710],
+      [730, 730],
+      [732, 732],
+      [8192, 8303],
+      [8308, 8308],
+      [8364, 8364],
+      [8482, 8482],
+      [8593, 8593],
+      [8595, 8595],
+      [8722, 8722],
+      [8725, 8725],
+      [65279, 65279],
+      [65533, 65533],
+    ]
+    [buildPlans.Iosevka]
+    family = "Iosevka SS09"
+    spacing = "normal"
+    serifs = "sans"
+    noLigation = true
+    webfontFormats = ["WOFF2"]
+    [buildPlans.Iosevka.variants]
+    inherits = "ss09"
+    [buildPlans.Iosevka.weights]
+    Light = "default.Light"
+    Regular = "default.Regular"
+    [buildPlans.Iosevka.widths]
+    Normal = "default.Extended"
+    [buildPlans.Iosevka.slopes]
+    Upright = "default.Upright"
+    [buildPlans.Iosevka.subset.include]
+    ranges = [
+      # https://github.com/zachleat/glyphhanger/blob/8b81f57dc214cb2a1d1b5abb209e1d39454d7c51/src/GlyphHangerWhitelist.js#L14
+      [0, 255],
+      [305, 305],
+      [338, 339],
+      [699, 700],
+      [710, 710],
+      [730, 730],
+      [732, 732],
+      [8192, 8303],
+      [8308, 8308],
+      [8364, 8364],
+      [8482, 8482],
+      [8593, 8593],
+      [8595, 8595],
+      [8722, 8722],
+      [8725, 8725],
+      [65279, 65279],
+      [65533, 65533],
+    ]
+  '';
+  set = "CustomSupWebsite";
+}).overrideAttrs (finalAttrs: previousAttrs: {
+  buildPhase = ''
+    export HOME=$TMPDIR
+    cat private-build-plans.toml
+    npm run build --no-update-notifier --targets webfont::IosevkaAile webfont::Iosevka -- --jCmd=$NIX_BUILD_CORES --verbosity=9 | cat
+  '';
+  installPhase = ''
+    install -d $out
+    cp dist/*/*.css $out/
+    cp -r dist/*/WOFF2 $out/
+  '';
+})
diff --git a/_plugins/webfonts.rb b/_plugins/webfonts.rb
@@ -0,0 +1,13 @@
+require 'fileutils'
+require 'open3'
+
+Jekyll::Hooks.register :site, :post_write do |site|
+  Jekyll.logger.info "Fonts:", "Building"
+  out, err, status = Open3.capture3 "nix-build", "_plugins/webfonts.nix", "--no-out-link"
+  raise "nix-build failed: #{err}" unless status.success?
+  result = out.strip
+  FileUtils.mkdir_p "#{site.dest}/fonts"
+  Dir["#{result}/*.css"].each { |f| FileUtils.cp f, "#{site.dest}/fonts" }
+  FileUtils.mkdir_p "#{site.dest}/fonts/WOFF2"
+  Dir["#{result}/WOFF2/*"].each { |f| FileUtils.cp f, "#{site.dest}/fonts/WOFF2" }
+end
diff --git a/stylesheets/public-inbox.css b/stylesheets/public-inbox.css
@@ -1,9 +1,16 @@
+@import "../fonts/Iosevka.css";
+@import "../fonts/IosevkaAile.css";
 body {
   background: #151515 url("/images/bkg.png") 0 0;
   color: #eaeaea;
   font-size: 16px;
   line-height: 1.5;
-  font-family: Monaco, "Bitstream Vera Sans Mono", "Lucida Console", Terminal, monospace;
+  font-family: "Iosevka SS09 Web", monospace;
+  font-weight: 300;
+}
+/* public-inbox injects a rule: *{font-family:monospace;} so override it here: */
+* {
+  font-family: "Iosevka SS09 Web", monospace;
 }
 a {
   color: #ffcc00;
@@ -18,9 +25,8 @@ a {
 a:hover {
   color: #ffeb9b;
 }
-b {
-  font-weight: 500;
-  font-family: Monaco, "Bitstream Vera Sans Mono", "Lucida Console", Terminal, monospace;
+b, strong {
+  font-weight: 400;
   color: #b5e853;
 }
 u {
@@ -45,7 +51,7 @@ input[type="submit"] {
   border-bottom: 2px solid rgba(0, 0, 0, 0.7);
   border-top: 2px solid rgba(0, 0, 0, 1);
   color: rgba(255, 255, 255, 0.8);
-  font-family: sans-serif;
+  font-family: "Iosevka Aile SS09 Web", sans-serif;
   font-weight: bold;
   font-size: 13px;
   text-decoration: none;
@@ -64,7 +70,7 @@ input[type="text"] {
   border-bottom: 2px solid rgba(0, 0, 0, 0.7);
   border-top: 2px solid rgba(0, 0, 0, 1);
   color: rgba(255, 255, 255, 0.8);
-  font-family: Helvetica, Arial, sans-serif;
+  font-family: "Iosevka Aile SS09 Web", sans-serif;
   font-size: 13px;
   text-decoration: none;
   text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.75);
diff --git a/stylesheets/stylesheet.css b/stylesheets/stylesheet.css
@@ -1,3 +1,6 @@
+@import "../fonts/Iosevka.css";
+@import "../fonts/IosevkaAile.css";
+
 body {
   margin: 0;
   padding: 0;
@@ -5,7 +8,11 @@ body {
   color: #eaeaea;
   font-size: 16px;
   line-height: 1.5;
-  font-family: Monaco, "Bitstream Vera Sans Mono", "Lucida Console", Terminal, monospace;
+  font-family: "Iosevka Aile SS09 Web", monospace;
+  font-weight: 300;
+}
+b, strong {
+  font-weight: 700;
 }
 
 /* General & 'Reset' Stuff */
@@ -64,9 +71,8 @@ header {
 header h1 {
   font-size: 30px;
   line-height: 1.5;
-  margin: 0 0 0 -40px;
+  margin: 0 0 0 -1em;
   font-weight: bold;
-  font-family: Monaco, "Bitstream Vera Sans Mono", "Lucida Console", Terminal, monospace;
   color: #b5e853;
   text-shadow: 0 1px 1px rgba(0, 0, 0, 0.1),
                0 0 5px rgba(181, 232, 83, 0.1),
@@ -110,8 +116,7 @@ section img {
 }
 
 h1, h2, h3, h4, h5, h6 {
-  font-weight: normal;
-  font-family: Monaco, "Bitstream Vera Sans Mono", "Lucida Console", Terminal, monospace;
+  font-weight: 400;
   color: #b5e853;
   letter-spacing: -0.03em;
   text-shadow: 0 1px 1px rgba(0, 0, 0, 0.1),
@@ -181,6 +186,8 @@ blockquote {
 
 tt.code, pre.code {
   color: #b5e853;
+  font-family: "Iosevka SS09 Web", monospace;
+  font-weight: 400;
 }
 pre.code {
   background: rgba(0, 0, 0, 0.9);
@@ -235,7 +242,6 @@ hr {
   border-bottom: 2px solid rgba(0, 0, 0, 0.7);
   border-top: 2px solid rgba(0, 0, 0, 1);
   color: rgba(255, 255, 255, 0.8);
-  font-family: Helvetica, Arial, sans-serif;
   font-weight: bold;
   font-size: 13px;
   text-decoration: none;
@@ -299,8 +305,13 @@ a:hover {
   max-width: 1200px;
 }
 
+.git, .git pre {
+  font-family: "Iosevka SS09 Web", monospace;
+}
+
 .git .url {
   margin: -10px 0 10px 0;
+  font-weight: 400;
   color: #666;
 }
 .git .url:before {
@@ -328,9 +339,6 @@ a.line {
   text-decoration: none;
 }
 
-#blob {
-  line-height: 1.25;
-}
 #blob a {
   color: #888;
 }
@@ -342,7 +350,6 @@ a.line {
   width: auto;
 }
 .git table thead td {
-  font-weight: 300;
   color: #b5e853;
 }
 .git table td {