Public bug reported:

Package: fontconfig 2.17.1-3ubuntu1 (Ubuntu 26.04 "resolute")

Any application that requests a specific family together with spacing=100
(terminal emulators such as Ghostty do) silently gets DejaVu Sans Mono
instead of the configured font.

Minimal reproduction:
  $ fc-match 'JetBrainsMono NFM:spacing=100'
  DejaVuSansMono.ttf: "DejaVu Sans Mono" "Book"          # wrong
  $ fc-match 'JetBrainsMono NFM'
  JetBrainsMonoNerdFontMono-Regular.ttf: "JetBrainsMono Nerd Font Mono" 
"Regular"

Cause: /etc/fonts/conf.d/48-spacing.conf prepends the literal `monospace`
to the query's `family` list when spacing=100 is requested:
  <edit name="family" mode="prepend"><string>monospace</string></edit>
fontconfig family matching is positional, so the injected generic name
outranks the family the application actually asked for.

Fixed upstream in fontconfig 2.18.2:
  https://gitlab.freedesktop.org/fontconfig/fontconfig/-/work_items/539
  https://gitlab.freedesktop.org/fontconfig/fontconfig/-/merge_requests/532
The upstream fix uses the `genericfamily` pattern object that only exists
since 2.18.0, so it cannot be applied verbatim to 2.17.1; the equivalent
change for 2.17.1 is mode="prepend" -> mode="append" in 48-spacing.conf.

Request: update fontconfig to >= 2.18.2 (or apply the 2.17-compatible
equivalent).

** Affects: fontconfig (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2169400

Title:
  fontconfig 2.17.1: 48-spacing.conf overrides the application-selected
  font family

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/fontconfig/+bug/2169400/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to