mirror of
https://github.com/daijro/camoufox.git
synced 2026-09-03 08:01:00 +00:00
0cd6c782d0
Without FONTCONFIG_FILE, fontconfig loads the system's /etc/fonts/fonts.conf which includes system font directories. This means system fonts leak into the rendering pipeline for fallback glyphs (emoji, CJK, etc.), even though the font enumeration whitelist hides them from JavaScript. The result is environment-dependent font metrics that differ between machines with different system font packages installed. Generate a runtime fontconfig at ~/.cache/camoufox/fontconfig/ that resolves the bundled font directory absolutely (the bundled fonts.conf uses prefix="cwd" relative paths which break under Playwright), and point FONTCONFIG_FILE at it.