overlays/iosevka: refactor family name in spacing overlay

This commit is contained in:
Primrose 2026-01-23 01:41:44 +01:00
parent 9230f7b378
commit bc67b4226f
Signed by: primrose
GPG key ID: 4E887A4CA9714ADA
3 changed files with 16 additions and 17 deletions

View file

@ -1,24 +1,24 @@
{ lib }:
let
list = [
{ spacing = "normal"; }
{
adjustFamily = old: old;
spacing = "normal";
}
# Iosevka + Ghostty makes "…" display in a odd way.
# We use "term" width to avoid this.
# https://github.com/ghostty-org/ghostty/discussions/10335
{ spacing = "term"; }
{
adjustFamily = old: old + "Term";
spacing = "term";
}
];
in
map (
{ spacing }@cfg:
let
name = lib.toSentenceCase spacing;
in
final: prev:
cfg
// {
family = prev.family + "-${name}";
{ adjustFamily, spacing }:
final: prev: {
family = adjustFamily prev.family;
inherit spacing;
}
) list