From e8b86fa5c6aa4551ca30e5d93985cbc7060168d4 Mon Sep 17 00:00:00 2001 From: daijro Date: Mon, 8 Jun 2026 07:15:15 -0500 Subject: [PATCH] fontconfig path compatibility with older releases Merged from cloverlabs repo --- pythonlib/camoufox/utils.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pythonlib/camoufox/utils.py b/pythonlib/camoufox/utils.py index cde6f47..1819322 100644 --- a/pythonlib/camoufox/utils.py +++ b/pythonlib/camoufox/utils.py @@ -110,7 +110,11 @@ def get_env_vars( 'win': 'windows', } os_dir = directory_map.get(user_agent_os, user_agent_os) + + # v150+ uses "fontconfig/" (matching the Go launcher); older bundles shipped "fontconfigs/". fontconfig_path = get_path(os.path.join("fontconfig", os_dir)) + if not os.path.exists(os.path.join(fontconfig_path, "fonts.conf")): + fontconfig_path = get_path(os.path.join("fontconfigs", os_dir)) # assert that fonts.conf exists in the directory if not os.path.exists(os.path.join(fontconfig_path, "fonts.conf")):