#1029145 fontconfig: the selection of the Bitstream font is broken, increasing the height, e.g. in the menus #1029145
- Package:
- fontconfig
- Source:
- fontconfig
- Description:
- generic font configuration library - support binaries
- Submitter:
- Vincent Lefevre
- Date:
- 2023-01-20 23:18:02 UTC
- Severity:
- normal
After the upgrade from fontconfig 2.13.1-4.5 to fontconfig 2.14.1-3, the selection of the Bitstream font is broken: With fontconfig 2.13.1-4.5, cventin% fc-match Bitstream Vera.ttf: "Bitstream Vera Sans" "Roman" With fontconfig 2.14.1-3, cventin% fc-match Bitstream NotoSans-Regular.ttf: "Noto Sans" "Regular" One of the consequences is that this unnecessarily increases the height in various applications, e.g. in the menus. For instance, see the attached snapshots of some FVWM menu: * windowops-fc213.png with fontconfig 2.13.1-4.5 * windowops-fc214.png with fontconfig 2.14.1-3
There is no font of that name in Debian. Bitstream is (was?) a font
foundry, not a font, so asking for a font named "Bitstream" is like
asking for an application named "Microsoft" if what you actually wanted
was Microsoft Word.
font named "Bitstream" installed (and neither do I), so fontconfig is
falling back to looking for *any* font, for which its default seems to be
to go through a list of sans-serif fonts in preference order:
$ fc-match "Bitstream Vera Sans"
Vera.ttf: "Bitstream Vera Sans" "Roman"
$ fc-match "Bitstream"
NotoSans-Regular.ttf: "Noto Sans" "Regular"
$ fc-match "hello, world"
NotoSans-Regular.ttf: "Noto Sans" "Regular"
So I think this is probably working as intended, and the configuration
change that prompted your different font rendering is that fontconfig
2.13.1 had Bitstream Vera Sans as its fallback font, whereas 2.14.1 has
Noto Sans and DejaVu Sans listed as its preferred sans-serif fonts for
Latin text, as a result of
<https://gitlab.freedesktop.org/fontconfig/fontconfig/-/commit/fcb042028126d79ea5a5fa015b2b034b98656e73>
and then
<https://gitlab.freedesktop.org/fontconfig/fontconfig/-/commit/ad70d785974992c569b30108923875e5b5e9dc5e>.
In a bullseye container with the older fontconfig:
# apt install fontconfig fonts-noto ttf-bitstream-vera
# fc-match "hello, world"
Vera.ttf: "Bitstream Vera Sans" "Roman"
which would seem consistent with what I said above.
Please configure applications to use Bitstream Vera Sans, Bitstream
Vera Serif or Bitstream Vera Sans Mono, whichever is most appropriate
for your use-case, instead of "Bitstream".
However, Bitstream Vera is essentially unmaintained, so consider using
the DejaVu family (community-maintained forks of Bitstream Vera with
wider glyph coverage, which had to change the name for licensing reasons)
from the fonts-dejavu-core and optionally fonts-dejavu-extra packages,
in preference to ttf-bitstream-vera.
smcv
Yes, I don't know what I put only "Bitstream", probably because it worked with no warnings or errors (I've got this setting since 2010). Anyway... "fc-match matches pattern (empty pattern by default) [...]" This is a pattern matching. Even with explicit wildcards, this doesn't work: $ fc-match "*Bitstream*" NotoSans-Regular.ttf: "Noto Sans" "Regular" This change was not announced. I think that the change of the default font is quite a big change. I've just noticed that I also did a mistake when I retrieved the /etc/fonts contents to compare them, which led the symlinks to be excluded. :( [...] Yes, I already use the DejaVu family in some other applications (Emacs, Firefox).
Actually, this is now Noto, which explains the behavior: https://gitlab.freedesktop.org/fontconfig/fontconfig/-/commit/ad70d785974992c569b30108923875e5b5e9dc5e BTW, I'm wondering whether this isn't configurable in a simple way.
for that, as this is a major setting? I can see that /var/lib/dpkg/info/fontconfig-config.postinst has just things related to hinting, subpixel rendering and bitmap fonts.