From c9ff9b2f5434ff09b02a3ab33eada2d8721d242f Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Thu, 17 Sep 2026 10:04:09 +0200 Subject: feat: give the clock its own font Installs Oswald (OFL-1.1, from googlefonts/OswaldFont) under ~/.fonts/o/Oswald with its license, and points the clock numerals at it for the squared look the rounded Noto Sans Black did not have. Per-widget fonts needed no new machinery: card.font() already takes any family string, so FONT_* are shared defaults rather than a restriction. FONT_CLOCK joins them, and the weather card keeps FONT_HEAVY, so the two no longer have to agree. Cairo still cannot ask for a weight above bold, so a heavier cut is selected by family name as FONT_HEAVY already did. Worth knowing that fontconfig substitutes a default for a family it does not recognise, which is indistinguishable from the font not applying; fc-match tells you which happened. Co-Authored-By: Claude Opus 5 --- widgets/clock.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'widgets') diff --git a/widgets/clock.lua b/widgets/clock.lua index c3e9712..b7c80d9 100644 --- a/widgets/clock.lua +++ b/widgets/clock.lua @@ -33,7 +33,7 @@ function M.draw(cr, rect, colors) local avail = (bottom - date_band) - inner.y local size = math.min(avail * 0.46, inner.w * 0.95) - card.font(cr, card.FONT_HEAVY, size, false) + card.font(cr, card.FONT_CLOCK, size, true) card.rgba(cr, colors.body) -- Baselines. Cairo's y is the baseline, so the first sits one cap-height -- cgit v1.2.3