Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 900681 - media-libs/fontconfig-2.14.2 decrease letter spacing interval
Summary: media-libs/fontconfig-2.14.2 decrease letter spacing interval
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Fonts Team
URL: https://gitlab.freedesktop.org/fontco...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-03-10 10:24 UTC by Alex Efros
Modified: 2023-04-27 06:39 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
fontconfig-delete-bad.patch (file_900681.txt,1.03 KB, patch)
2023-04-26 02:36 UTC, Sam James
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Efros 2023-03-10 10:24:27 UTC
Upgrade from media-libs/fontconfig-2.14.0-r1 to 2.14.2 result in noticeable decrease of letter spacing interval, at least in urxvt.
I'm using monospace D2Coding font patched with Nerd icons. In urxvt this fontconfig upgrade result in increase of $COLUMNS from 100 to 106 for same urxvt window size just because of decreased letter spacing.
To me text became harder to read because of this change.

I'm not sure is this a fontconfig feature/bug/misconfiguration or a font issue.
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-03-10 10:26:19 UTC
Would you mind reporting this upstream at https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues & link the bug here?
Comment 2 Will Simoneau 2023-03-20 16:03:09 UTC
Same for me.

I noticed that media-libs/fontconfig-2.14.2 installs a new /etc/fonts/conf.d/10-sub-pixel-none.conf even though I already have 10-sub-pixel-rgb.conf active:

# eselect fontconfig list | grep 10-sub-pixel
  [11]  10-sub-pixel-bgr.conf
  [12]  10-sub-pixel-none.conf *
  [13]  10-sub-pixel-rgb.conf *
  [14]  10-sub-pixel-vbgr.conf
  [15]  10-sub-pixel-vrgb.conf

# ls -l /etc/fonts/conf.d/10-sub-pixel* 
lrwxrwxrwx 1 root root 36 Mar 20 11:50 /etc/fonts/conf.d/10-sub-pixel-none.conf -> ../conf.avail/10-sub-pixel-none.conf
lrwxrwxrwx 1 root root 35 Mar 20 11:50 /etc/fonts/conf.d/10-sub-pixel-rgb.conf -> ../conf.avail/10-sub-pixel-rgb.conf

Running either of the following commands seems to fix the issue for me:
# eselect fontconfig disable 10-sub-pixel-none.conf
# rm /etc/fonts/conf.d/10-sub-pixel-none.conf

I'm not yet sure whether subsequent merges of fontconfig would reinstall the offending symlink or not.  It doesn't seem to get reinstalled if I "emerge -1v --noconfmem '=media-libs/fontconfig-2.14.2'" right now, which is the behavior I want but not the behavior I expect.
Comment 3 Alex Efros 2023-03-20 16:14:15 UTC
Looks like I've similar setup (on 2.14.0):

# eselect fontconfig list | grep 10-sub-pixel
  [10]  10-sub-pixel-bgr.conf
  [11]  10-sub-pixel-rgb.conf *
  [12]  10-sub-pixel-vbgr.conf
  [13]  10-sub-pixel-vrgb.conf
Comment 4 Alex Efros 2023-03-24 09:01:29 UTC
Upstream response:

> build with --with-default-sub-pixel-rendering=rgb for configure or -Ddefault-sub-pixel-rendering=rgb for meson
> Or simply remove it if you have your own way to enable it.
Comment 5 Larry the Git Cow gentoo-dev 2023-04-15 05:08:22 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aea637aa112edbe47f15e12f1d073bbfa0808977

commit aea637aa112edbe47f15e12f1d073bbfa0808977
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-04-15 03:24:50 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-04-15 03:37:44 +0000

    media-libs/fontconfig: don't enable subpixel rendering by default
    
    This changed in 2.14.2 inadvertently. We have our own mechanism for users
    to choose this (eselect-fontconfig) but the default for this option was installing
    /etc/fonts/conf.d/10-sub-pixel-none.conf.
    
    Stop doing that and now it installs /etc/fonts/conf.avail/10-no-sub-pixel.conf.
    
    Closes: https://bugs.gentoo.org/900681
    Signed-off-by: Sam James <sam@gentoo.org>

 media-libs/fontconfig/fontconfig-2.14.2-r1.ebuild | 220 ++++++++++++++++++++++
 1 file changed, 220 insertions(+)
Comment 6 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-04-25 03:54:47 UTC
Is 2.14.2-r1 OK?
Comment 7 Alex Efros 2023-04-25 06:34:52 UTC
(In reply to Sam James from comment #6)
> Is 2.14.2-r1 OK?

Right after emerging it - no, I still have the issue.
Then after `eselect fontconfig disable 10-sub-pixel-none.conf` - yes, everything looks just as before upgrade.
Comment 8 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-04-26 02:36:35 UTC
Created attachment 860773 [details, diff]
fontconfig-delete-bad.patch

Could you try this?
Comment 9 Alex Efros 2023-04-26 06:21:11 UTC
(In reply to Sam James from comment #8)
> Created attachment 860773 [details, diff] [details, diff]
> fontconfig-delete-bad.patch
> 
> Could you try this?

Here is what I did:

# eselect fontconfig enable 10-sub-pixel-none.conf

(This restored invalid behaviour, so I can do clean reinstall and see is it helps.)

# mkdir /usr/local/portage/media-libs
# cp -a /usr/portage/media-libs/fontconfig /usr/local/portage/media-libs/
# cd /usr/local/portage
# patch -p1 </tmp/fontconfig-delete-bad.patch
# cd media-libs/fontconfig
# ebuild fontconfig-2.14.2-r2.ebuild digest merge

This doesn't helps - I still have the issue, and config is still exists and enabled:

# eselect fontconfig list | grep sub
  [10]  10-sub-pixel-bgr.conf
  [11]  10-sub-pixel-none.conf *
  [12]  10-sub-pixel-rgb.conf *
  [13]  10-sub-pixel-vbgr.conf
  [14]  10-sub-pixel-vrgb.conf
Comment 10 Larry the Git Cow gentoo-dev 2023-04-27 06:39:57 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=994cc012905d733e8dbfb0fa94d7eade79223345

commit 994cc012905d733e8dbfb0fa94d7eade79223345
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-04-27 06:37:56 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-04-27 06:39:38 +0000

    media-libs/fontconfig: don't override user prefs. on antialiasing
    
    2.14.2 installed 10-sub-pixel-none.conf unconditionally outside of our own
    preference management system (eselect). For versions 2.14.2 <= x <= 2.14.2-r2,
    delete that file if it's installed.
    
    Closes: https://bugs.gentoo.org/900681
    Signed-off-by: Sam James <sam@gentoo.org>

 ...ontconfig-2.14.2-r1.ebuild => fontconfig-2.14.2-r2.ebuild} | 11 +++++++++++
 1 file changed, 11 insertions(+)