Files
budget2.0/scripts/screenshot-fonts.conf
T
Lucas WintherandClaude Opus 5 bd5a01e03e chore(tooling): make the screenshot recipe work with no setup
Two things this session depended on lived only in a scratchpad, so the next
agent would have had to reinvent them from a prose hint:

- scripts/screenshot-fonts.conf, now applied by screenshot.ts itself. Without
  it this container renders every generic font family as Fira Code and the UI
  looks monospaced in a way no user sees — a trap that nearly produced a "fix"
  for a font bug that does not exist.
- scripts/demo-data.ts, which seeds a visibly synthetic dataset. Without it
  every screenshot shows an app full of zeros, because Chrome starts from a
  fresh profile each run.

CLAUDE.md now carries the two-command recipe verbatim instead of "point
FONTCONFIG_FILE at an override", and says why --reload is mandatory. Verified
from a clean shell with no environment set.

Also flags docs/superpowers/plans/2026-09-01-budget-app.md as a historical
record: its snippets still show CURRENCIES and CURRENCY_DIGITS, which no
longer exist, and an agent reading it as current would be misled.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
2026-09-02 16:07:09 +02:00

43 lines
2.0 KiB
XML

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<!-- Screenshot-only. This container resolves every generic family to Fira
Code, a monospace font, which makes the whole UI look monospaced in a way
no real user ever sees. Remap the generics to installed fonts that stand
in for a desktop system. Never applied to the app itself. -->
<fontconfig>
<include ignore_missing="yes">/etc/fonts/fonts.conf</include>
<match target="pattern">
<test name="family"><string>sans-serif</string></test>
<edit name="family" mode="prepend_first" binding="strong"><string>Inter</string></edit>
</match>
<match target="pattern">
<test name="family"><string>system-ui</string></test>
<edit name="family" mode="prepend_first" binding="strong"><string>Inter</string></edit>
</match>
<match target="pattern">
<test name="family"><string>ui-sans-serif</string></test>
<edit name="family" mode="prepend_first" binding="strong"><string>Inter</string></edit>
</match>
<match target="pattern">
<test name="family"><string>Segoe UI</string></test>
<edit name="family" mode="prepend_first" binding="strong"><string>Inter</string></edit>
</match>
<match target="pattern">
<test name="family"><string>Segoe UI Variable Display</string></test>
<edit name="family" mode="prepend_first" binding="strong"><string>Inter</string></edit>
</match>
<match target="pattern">
<test name="family"><string>monospace</string></test>
<edit name="family" mode="prepend_first" binding="strong"><string>JetBrains Mono</string></edit>
</match>
<match target="pattern">
<test name="family"><string>ui-monospace</string></test>
<edit name="family" mode="prepend_first" binding="strong"><string>JetBrains Mono</string></edit>
</match>
<match target="pattern">
<test name="family"><string>SF Mono</string></test>
<edit name="family" mode="prepend_first" binding="strong"><string>JetBrains Mono</string></edit>
</match>
</fontconfig>