SDL3 frontend crashes on startup when a fontconfig fallback font has `[` `]` in its filename

Open
#2,431 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
Half a day
Newbie friendliness
42/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Domain
desktop

Research direction

Reproduce by installing a bracketed variable font and running fc-match -s --format='%{file}\n' monospace | grep '\[', then start the SDL3 build with make sdl3. Trace where the SDL3 frontend reads fontconfig fallback paths and turns them into Lisp pathnames; SBCL is treating [ and ] as wildcard syntax rather than literal filename characters. Done means lem starts with such a font selected, ideally with a regression test covering bracketed font paths.

Written by the indexing model from the issue text.

Description

Error:

debugger invoked on a SB-INT:SIMPLE-FILE-ERROR in thread
#<THREAD "main thread" RUNNING>:
  Can't find the TRUENAME of wild pathname
  /usr/share/fonts/google-noto-vf/NotoSansArabic[wght].ttf
  (physicalized from /usr/share/fonts/google-noto-vf/NotoSansArabic[wght].ttf).

Steps to reproduce

  1. Install a distro font package that ships variable fonts with brackets in the
    filename (on Fedora: any google-noto-*-vf-fonts package, e.g. google-noto-sans-arabic-vf-fonts).
  2. Confirm fontconfig returns one of them for the monospace fallback list:
    fc-match -s --format='%{file}\n' monospace | grep '\['
  3. Run lem (SDL3 build).

Environment

  • Lem: main @ 60cb7c37 (Merge PR #2417 sdl3-next)
  • Build: make sdl3, make install-sdl3
  • OS: Fedora (Linux 7.2, x86_64)
  • Lisp: SBCL
  • Package providing the font: google-noto-sans-arabic-vf-fonts-20251201-2.fc44. The whole google-noto-*-vf-fonts family installs /usr/share/fonts/google-noto-vf/*[wght].ttf; vazirmatn-vf-fonts does too.
Dominant language
Common Lisp
Stars
3.1k
Forks
261
Avg merge
1d 6h
Merged PRs (30d)
133

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from lem-project/lem

All issues in lem-project/lem

Similar issues

More Desktop Dev issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.