* bug#25147: 25.1; rgba font rendering not honoring fontconfig
@ 2016-12-09 15:56 Yuri D'Elia
2019-11-17 7:35 ` Lars Ingebrigtsen
0 siblings, 1 reply; 2+ messages in thread
From: Yuri D'Elia @ 2016-12-09 15:56 UTC (permalink / raw)
To: 25147
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* bug#25147: 25.1; rgba font rendering not honoring fontconfig
2016-12-09 15:56 bug#25147: 25.1; rgba font rendering not honoring fontconfig Yuri D'Elia
@ 2019-11-17 7:35 ` Lars Ingebrigtsen
0 siblings, 0 replies; 2+ messages in thread
From: Lars Ingebrigtsen @ 2019-11-17 7:35 UTC (permalink / raw)
To: Yuri D'Elia; +Cc: 25147
Yuri D'Elia <wavexx@thregr.org> 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-11-17 7:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-09 15:56 bug#25147: 25.1; rgba font rendering not honoring fontconfig Yuri D'Elia
2019-11-17 7:35 ` Lars Ingebrigtsen
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.