GNU bug report logs - #25147
25.1; rgba font rendering not honoring fontconfig

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Yuri D'Elia <wavexx@HIDDEN>; Keywords: confirmed; dated Fri, 9 Dec 2016 15:57:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Added tag(s) confirmed. Request was from Lars Ingebrigtsen <larsi@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 25147 <at> debbugs.gnu.org:


Received: (at 25147) by debbugs.gnu.org; 17 Nov 2019 07:35:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Nov 17 02:35:12 2019
Received: from localhost ([127.0.0.1]:40117 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iWF5U-0007Bg-9V
	for submit <at> debbugs.gnu.org; Sun, 17 Nov 2019 02:35:12 -0500
Received: from quimby.gnus.org ([95.216.78.240]:43768)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1iWF5S-0007BN-Gu
 for 25147 <at> debbugs.gnu.org; Sun, 17 Nov 2019 02:35:11 -0500
Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1iWF5J-0004W4-7B; Sun, 17 Nov 2019 08:35:03 +0100
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Yuri D'Elia <wavexx@HIDDEN>
Subject: Re: bug#25147: 25.1; rgba font rendering not honoring fontconfig
References: <8760mtqeob.fsf@HIDDEN>
Date: Sun, 17 Nov 2019 08:35:00 +0100
In-Reply-To: <8760mtqeob.fsf@HIDDEN> (Yuri D'Elia's message of
 "Fri, 09 Dec 2016 16:56:36 +0100")
Message-ID: <87imnjc5wb.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview:  Yuri D'Elia <wavexx@HIDDEN> writes: > To test, remove
 any X resource (xrdb -remove), and install the following > fontconfig snippet
 somewhere in ~/.config/fontconfig/conf.d: > > <?xml version="1.0"?> >
 <fontconfig> > <match target="font [...] 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 0.0 URIBL_BLOCKED          ADMINISTRATOR NOTICE: The query to URIBL was
 blocked.  See
 http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block
 for more information. [URIs: ingebrigtsen.no]
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 25147
Cc: 25147 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Yuri D'Elia <wavexx@HIDDEN> writes:

> To test, remove any X resource (xrdb -remove), and install the following
> fontconfig snippet somewhere in ~/.config/fontconfig/conf.d:
>
> <?xml version="1.0"?>
> <fontconfig>
>   <match target="font">
>     <edit name="hinting" mode="assign">
>       <bool>true</bool>
>     </edit>
>     <edit name="rgba" mode="assign">
>       <const>rgb</const>
>     </edit>
>   </match>
> </fontconfig>

fontconfig on my system didn't seem to want to look in that directory,
so I put it in

/usr/share/fontconfig/conf.avail/09-foo.conf

> Run emacs, and notice how subpixel hinting is not enabled.
> Run with FC_DEBUG=5 set in the env for confirmation that the rgba=rgb is
> in effect.

And it was loaded:

Add Rule(kind:1, name: /usr/share/fontconfig/conf.avail/09-foo.conf) [edit]
        Edit hinting Assign true;
        Edit rgba Assign rgb;

I'm able to reproduce this bug in Emacs 27 -- I should probably get
colour fringing with this setting, but I'm not.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#25147; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 9 Dec 2016 15:56:57 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Dec 09 10:56:57 2016
Received: from localhost ([127.0.0.1]:36184 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1cFNXd-0005To-Ff
	for submit <at> debbugs.gnu.org; Fri, 09 Dec 2016 10:56:57 -0500
Received: from eggs.gnu.org ([208.118.235.92]:50416)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <wavexx@HIDDEN>) id 1cFNXb-0005Ta-W7
 for submit <at> debbugs.gnu.org; Fri, 09 Dec 2016 10:56:56 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <wavexx@HIDDEN>) id 1cFNXV-0004p2-U5
 for submit <at> debbugs.gnu.org; Fri, 09 Dec 2016 10:56:50 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled
 version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:54934)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <wavexx@HIDDEN>) id 1cFNXV-0004ou-S3
 for submit <at> debbugs.gnu.org; Fri, 09 Dec 2016 10:56:49 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:41379)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <wavexx@HIDDEN>) id 1cFNXU-0004nb-GV
 for bug-gnu-emacs@HIDDEN; Fri, 09 Dec 2016 10:56:49 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <wavexx@HIDDEN>) id 1cFNXO-0004mN-R8
 for bug-gnu-emacs@HIDDEN; Fri, 09 Dec 2016 10:56:48 -0500
Received: from e.thregr.org ([80.68.88.20]:49038)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <wavexx@HIDDEN>) id 1cFNXO-0004lt-Lq
 for bug-gnu-emacs@HIDDEN; Fri, 09 Dec 2016 10:56:42 -0500
Received: from [2a02:27e8:20:9049:56ee:75ff:fe83:444c] (helo=localhost)
 by e.thregr.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.88) (envelope-from <wavexx@HIDDEN>) id 1cFNXH-0001dO-Bx
 for bug-gnu-emacs@HIDDEN; Fri, 09 Dec 2016 16:56:35 +0100
User-agent: mu4e 0.9.17; emacs 25.1.1
From: Yuri D'Elia <wavexx@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 25.1; rgba font rendering not honoring fontconfig
Date: Fri, 09 Dec 2016 16:56:36 +0100
Message-ID: <8760mtqeob.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.1 (----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.1 (----)

On emacs 25.1.1 and emacs 24.5.1 (lucid, from debian unstable) all font
rendering settings (hinting/antialias/autohint/etc) seems to correctly
come from fontconfig, with the exception of the "rgba" setting (subpixel
hinting), which just defaults to disabled.

The Xft.rgba X resource *does* have effect though.

Emacs should honor the fontconfig's rgba setting correctly, with
priority over Xft.* resources, as done for the other settings.

To test, remove any X resource (xrdb -remove), and install the following
fontconfig snippet somewhere in ~/.config/fontconfig/conf.d:

<?xml version="1.0"?>
<fontconfig>
  <match target="font">
    <edit name="hinting" mode="assign">
      <bool>true</bool>
    </edit>
    <edit name="rgba" mode="assign">
      <const>rgb</const>
    </edit>
  </match>
</fontconfig>

Run emacs, and notice how subpixel hinting is not enabled.
Run with FC_DEBUG=5 set in the env for confirmation that the rgba=rgb is
in effect.

Then run emacs -xrm 'Xft.rgba:rgb' and notice the difference (color
fringing should be visible).

extra info:

In GNU Emacs 25.1.1 (x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2016-12-01, modified by Debian built on trouble
Windowing system distributor 'The X.Org Foundation', version 11.0.11900000
System Description:	Debian GNU/Linux unstable (sid)

Configured using:
 'configure --build x86_64-linux-gnu --prefix=/usr
 --sharedstatedir=/var/lib --libexecdir=/usr/lib
 --localstatedir=/var/lib --infodir=/usr/share/info
 --mandir=/usr/share/man --with-pop=yes
 --enable-locallisppath=/etc/emacs25:/etc/emacs:/usr/local/share/emacs/25.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/25.1/site-lisp:/usr/share/emacs/site-lisp
 --with-sound=alsa --build x86_64-linux-gnu --prefix=/usr
 --sharedstatedir=/var/lib --libexecdir=/usr/lib
 --localstatedir=/var/lib --infodir=/usr/share/info
 --mandir=/usr/share/man --with-pop=yes
 --enable-locallisppath=/etc/emacs25:/etc/emacs:/usr/local/share/emacs/25.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/25.1/site-lisp:/usr/share/emacs/site-lisp
 --with-sound=alsa --with-x=yes --with-x-toolkit=lucid
 --with-toolkit-scroll-bars --without-gconf --without-gsettings
 'CFLAGS=-g -O2
 -fdebug-prefix-map=/build/emacs25-Fs4LPA/emacs25-25.1+1=.
 -fstack-protector-strong -Wformat -Werror=format-security -Wall'
 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2' LDFLAGS=-Wl,-z,relro'

Configured features:
XAW3D XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS NOTIFY ACL
LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS LUCID X11

Important settings:
  value of $LC_COLLATE: C
  value of $LC_TIME: en_GB.UTF-8
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix




Acknowledgement sent to Yuri D'Elia <wavexx@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#25147; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 25 Nov 2019 12:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.