[Bug 268668] x11-fonts/fontconfig does not honor lcdfilter setting

From: <bugzilla-noreply_at_freebsd.org>
Date: Sat, 31 Dec 2022 11:26:13 UTC

            Bug ID: 268668
           Summary: x11-fonts/fontconfig does not honor lcdfilter setting
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: desktop@FreeBSD.org
          Reporter: bsdpr@phoe.frmug.org
          Assignee: desktop@FreeBSD.org
             Flags: maintainer-feedback?(desktop@FreeBSD.org)

Created attachment 239148
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=239148&action=edit
Screenshot of the test program runing on the affected host

I recently did a full system upgrade that brought fontconfig 2.14.0 in, since
then I observed that my reading ability is impeded. I rooted this to fontconfig
which no longer honor lcdfilter settings in fonts.conf. I can't remember when I
disabled LCD filtering to improve text display, for maybe ten years I have the
followinf lines in ~/.config/fontconfig/fonts.conf file:

    <!--  Disable sub-pixel rendering but we still use antialias -->
    <match target="font">
        <edit mode="assign" name="rgba">
        <edit mode="assign" name="lcdfilter">
        <edit mode="assign" name="antialias">
    <!-- Enable hinting when provided by the font -->
    <match target="font">
        <edit mode="assign" name="hinting">
        <edit mode="assign" name="hintstyle">
        <edit mode="assign" name="autohint">

I initially thought this might be caused by toolkits forcing lcdfilering on so
I wrote a small test program using only xlib and xft. Despite the settings
shown above, even using this basic display interface the characters rendered
through xft are lcdfiltered and came to the conclusion that the culprit is
either fontconfig or xft (the former is more probable).

To support my claim, I join the test program and two screenshots, made on the
same display server, of two instances of the same test client running on two
different hosts. Please note that the unaffected host is remote.

You are receiving this mail because:
You are the assignee for the bug.