aboutsummaryrefslogtreecommitdiff
path: root/scripts/theme-studio/styles.css
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-06-24 14:04:48 -0400
committerCraig Jennings <c@cjennings.net>2026-06-24 14:04:48 -0400
commit7bdcafe43c410b725cc6a2c83bed7ac79929394c (patch)
tree5267e297563c2f6a1ea72b7738647cd77be48ab1 /scripts/theme-studio/styles.css
parentdea08e095b94be8b06de9ce14188beb9a47e6aa1 (diff)
downloaddotemacs-7bdcafe43c410b725cc6a2c83bed7ac79929394c.tar.gz
dotemacs-7bdcafe43c410b725cc6a2c83bed7ac79929394c.zip
fix(theme-studio): render nerd-icon glyphs in previews instead of tofu
The legend, dashboard, and package previews drew nerd-icon glyphs as empty boxes. The font-family never reached them: PREVIEW_FONT was spliced into inline style="..." attributes with a double-quoted family name, so the inner quote closed the attribute early and the font was silently dropped. Dropping the quotes fixes it. A no-space family name needs none. I embedded the glyph font directly: Symbols Nerd Font Mono, encoded with fontTools (woff2_compress output is rejected by headed Chrome and Firefox), inlined as a data: URI under the unique family name ThemeStudioNerd so it resolves to the embed rather than a system-installed copy of the same name. The page is self-contained and renders on any clone. I added a #fonttest gate that parses previewLines output and asserts the resolved font-family plus glyph coverage, plus a make font target that re-encodes the woff2 with fontTools.
Diffstat (limited to 'scripts/theme-studio/styles.css')
-rw-r--r--scripts/theme-studio/styles.css1
1 files changed, 1 insertions, 0 deletions
diff --git a/scripts/theme-studio/styles.css b/scripts/theme-studio/styles.css
index d77359801..5ad5eeb18 100644
--- a/scripts/theme-studio/styles.css
+++ b/scripts/theme-studio/styles.css
@@ -1,3 +1,4 @@
+ @font-face{font-family:"ThemeStudioNerd";src:url("SymbolsNerdFontMono-Regular.woff2") format("woff2");font-display:swap}
body{background:#0d0b0a;color:#cdced1;font:15px/1.55 monospace;margin:20px}
h1{font-size:22px;font-weight:normal;color:#e8bd30;margin:26px 0 10px;border-bottom:1px solid #252321;padding-bottom:6px}
h2{font-size:10pt;color:#8a9496;font-weight:normal;margin:0 0 4px}