flybrain/infra/config/fonts-local.conf
acamilo 660c3cf00d
Some checks failed
ci / node 22 (test + typecheck) (push) Has been cancelled
ci / rust stable (cargo test --workspace --release) (push) Has been cancelled
ci / infra/tests/lint.sh (push) Has been cancelled
ci / playwright apps/stage (allowed to fail) (push) Has been cancelled
flybrain v0.4.0: public tree (history retained privately)
2026-09-21 15:09:46 +00:00

29 lines
1.4 KiB
XML

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<!--
infra/config/fonts-local.conf — pushed to /etc/fonts/local.conf.
Grayscale antialiasing, to match the "disable-lcd-text" Chromium flag
flystage passes (docs/design/infra.md: "subpixel antialiasing becomes
colour fringing after 4:2:0 subsampling"). Disables subpixel (LCD)
rendering and the associated RGBA hinting so Chromium's own flag is not
fighting a fontconfig default that still tries to emit colour fringes.
NOTE for editors: no double hyphen anywhere in this comment. XML forbids
it inside a comment, and fontconfig rejects the WHOLE file when it finds
one: "/etc/fonts/local.conf", line 6: not well-formed (invalid token),
after which none of the settings below apply and the stream gets exactly
the colour fringing this file exists to prevent. That is what the flag
name spelled with its leading dashes used to do here (found on the release container's
provisioning run, 2026-09-16; fc-cache is the only thing that reports
it, and it reports it as a warning on stderr).
-->
<fontconfig>
<match target="font">
<edit name="rgba" mode="assign"><const>none</const></edit>
<edit name="lcdfilter" mode="assign"><const>lcdnone</const></edit>
<edit name="antialias" mode="assign"><bool>true</bool></edit>
<edit name="hinting" mode="assign"><bool>true</bool></edit>
<edit name="hintstyle" mode="assign"><const>hintslight</const></edit>
</match>
</fontconfig>