feat(setup): search macOS font directories recursively

Extend font lookup on macOS to scan subdirectories when the font is not found
in the top-level font directories. Permission errors during traversal are
silently ignored to avoid installation failures.
This commit is contained in:
Mark Sisson 2026-01-30 14:57:07 -06:00
parent 625e984b12
commit 2035fe7fda
No known key found for this signature in database
GPG key ID: FFA608A31A1ED77C

View file

@ -928,6 +928,12 @@ def add_builtin_fonts(args: Options) -> None:
if os.path.exists(q):
font_file = q
break
for root, _, files in os.walk(candidate, onerror=lambda _: None):
if filename in files:
font_file = os.path.join(root, filename)
break
if font_file:
break
elif is_windows:
for candidate in (
os.path.expandvars(r'%userprofile%\AppData\Local\Microsoft\Windows\Fonts'),