From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Fangwen Yu Newsgroups: gmane.emacs.bugs Subject: bug#17792: 24.3; hintstyle specified via fontconfig is ignored by Emacs Date: Wed, 18 Jun 2014 12:44:04 +0800 Message-ID: References: <874mzki66x.fsf@gentoo.i-did-not-set--mail-host-address--so-tickle-me> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7b2e3e44ef380604fc14e8e1 X-Trace: ger.gmane.org 1403066726 18184 80.91.229.3 (18 Jun 2014 04:45:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 18 Jun 2014 04:45:26 +0000 (UTC) Cc: 17792@debbugs.gnu.org To: Jan =?UTF-8?Q?Dj=C3=A4rv?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jun 18 06:45:19 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Wx7kL-0007Dy-Gg for geb-bug-gnu-emacs@m.gmane.org; Wed, 18 Jun 2014 06:45:17 +0200 Original-Received: from localhost ([::1]:54890 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wx7kL-0005aE-3K for geb-bug-gnu-emacs@m.gmane.org; Wed, 18 Jun 2014 00:45:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38044) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wx7kC-0005Y4-W5 for bug-gnu-emacs@gnu.org; Wed, 18 Jun 2014 00:45:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wx7k7-0006cL-Mg for bug-gnu-emacs@gnu.org; Wed, 18 Jun 2014 00:45:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:59930) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wx7k7-0006bU-JT for bug-gnu-emacs@gnu.org; Wed, 18 Jun 2014 00:45:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Wx7k6-0003sB-RH for bug-gnu-emacs@gnu.org; Wed, 18 Jun 2014 00:45:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Fangwen Yu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 18 Jun 2014 04:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17792 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 17792-submit@debbugs.gnu.org id=B17792.140306665614792 (code B ref 17792); Wed, 18 Jun 2014 04:45:02 +0000 Original-Received: (at 17792) by debbugs.gnu.org; 18 Jun 2014 04:44:16 +0000 Original-Received: from localhost ([127.0.0.1]:51080 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Wx7jL-0003qU-Cq for submit@debbugs.gnu.org; Wed, 18 Jun 2014 00:44:16 -0400 Original-Received: from mail-pa0-f54.google.com ([209.85.220.54]:52963) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Wx7jG-0003qD-Ob for 17792@debbugs.gnu.org; Wed, 18 Jun 2014 00:44:12 -0400 Original-Received: by mail-pa0-f54.google.com with SMTP id et14so311225pad.13 for <17792@debbugs.gnu.org>; Tue, 17 Jun 2014 21:44:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=C9rUezm82Ez6L5bwfiXfzAZQe1FUOZsVXc1O6ygUvbc=; b=vueFBOuvc7f2vmrE/Usw4z7zk0oRIPDUa7Rx9ZEdF6hTEqHBibj6+yf355zWJlQN9W UK06J0UeU0Vx9Gyf0XoVfy0EvJWuQW3FyMmgKDytPtHN3zZr+dezNI8Its01ZS7JWqmv 19LFEkzY8XwceOsAjrrI9gJ8/VNMhHxDvSGWLO4lSk/QWWSCqW+1ovUjB3NiedieO30T lh1kx+AIXXs6Gqo0J0JFp4Wc0EMtOWHdTIApUf13B2Sqom69sbpnkJOq278L4Vy/5rFG k9mGeZRiLb/jSO7XVsv54JDWjM3qaLpZCH8MfvWd2y0wXbGutRcINvN5ZhmIZYiotpMn +fiA== X-Received: by 10.66.121.197 with SMTP id lm5mr37797323pab.118.1403066644377; Tue, 17 Jun 2014 21:44:04 -0700 (PDT) Original-Received: by 10.70.4.1 with HTTP; Tue, 17 Jun 2014 21:44:04 -0700 (PDT) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:90493 Archived-At: --047d7b2e3e44ef380604fc14e8e1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Clearly the fontconfig version on my system understands hint setting. As I have said, if I have hintnone in fonts.conf and hintslight in X resources, Emacs will use hintslight and all other gtk applications like gedit, gnome-terminal will use hintnone. Since Emacs is also a gtk application, why doesn't it respect fontconfig settings? On Tue, Jun 17, 2014 at 11:28 PM, Jan Dj=C3=A4rv wrote= : > Hello. > > 17 jun 2014 kl. 05:08 skrev yynyygy@gmail.com: > > > I've noticed font rendering differences between Emacs and other gtk > > applications like gedit. In short, Emacs ignores hintstyle setting in > > fontconfig. I have hintstyle set to hintslight in > > ~/.config/fontconfig/fonts.conf, but I have to add 'Xft.hintstyle: > > hintslight' in Xresources to get the desired effect. > > > > The strange thing is that while ignoring hintstyle setting, Emacs still > > respect part of fontconfig settings, for example, anti-aliasing setting > > in fonts.conf will affect Emacs's font rendering. > > > > Hint setting is newer than the rest so it is possible your Emacs was > compiled against a fontconfig that don't have it. > Another possibility is that you have GSettings or GConf settings that are > different than fonts.conf or from the X resources. > > Emacs by itself does not read fonts.conf or apply X resources, it is all > done by fontconfig/Xft-libraries. Emacs do apply GSettings and/or GConf > settings. > > Jan D. > > > > To be more precise, if I disable anti-aliasing in fonts.conf and enable > > it in Xresources, Emacs will not have anti-aliasing; if I have > > hintslight in fonts.conf and hintnone in Xresources, Emacs will use > > hintnone. > > > > I have tested with DejaVu Sans Mono 12 and Ubuntu Mono 13, but clearly > > it is not the fonts' problem. > > > > > > In GNU Emacs 24.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.10.8) > > of 2014-06-11 on gentoo > > Windowing system distributor `The X.Org Foundation', version > 11.0.11500000 > > System Description: NAME=3DGentoo > > > > Configured using: > > `configure '--prefix=3D/usr' '--build=3Dx86_64-pc-linux-gnu' > > '--host=3Dx86_64-pc-linux-gnu' '--mandir=3D/usr/share/man' > > '--infodir=3D/usr/share/info' '--datadir=3D/usr/share' '--sysconfdir=3D= /etc' > > '--localstatedir=3D/var/lib' '--libdir=3D/usr/lib64' > > '--disable-silent-rules' '--disable-dependency-tracking' > > '--program-suffix=3D-emacs-24' '--infodir=3D/usr/share/info/emacs-24' > > '--localstatedir=3D/var' > > '--enable-locallisppath=3D/etc/emacs:/usr/share/emacs/site-lisp' > > '--with-crt-dir=3D/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/../../../../li= b64' > > '--with-gameuser=3Dgames' '--without-compress-info' '--without-hesiod' > > '--without-kerberos' '--without-kerberos5' '--with-gpm' '--with-dbus' > > '--without-gnutls' '--without-xml2' '--without-selinux' > > '--without-wide-int' '--with-sound' '--with-x' '--without-ns' > > '--without-gconf' '--without-gsettings' '--without-toolkit-scroll-bars' > > '--with-gif' '--with-jpeg' '--with-png' '--with-rsvg' '--with-tiff' > > '--with-xpm' '--without-imagemagick' '--with-xft' '--without-libotf' > > '--without-m17n-flt' '--with-x-toolkit=3Dgtk3' > > 'GENTOO_PACKAGE=3Dapp-editors/emacs-24.3-r6' > > 'build_alias=3Dx86_64-pc-linux-gnu' 'host_alias=3Dx86_64-pc-linux-gnu' > > 'CFLAGS=3D-march=3Dnative -O2 -pipe' 'LDFLAGS=3D-Wl,-O1 -Wl,--as-needed= ' > > 'CPPFLAGS=3D'' > > > > Important settings: > > value of $LC_COLLATE: C > > value of $LC_CTYPE: zh_CN.UTF-8 > > value of $LANG: en_US.UTF-8 > > value of $XMODIFIERS: @im=3Dfcitx > > locale-coding-system: utf-8-unix > > default enable-multibyte-characters: t > > > > Major mode: Lisp Interaction > > > > Minor modes in effect: > > tooltip-mode: t > > mouse-wheel-mode: t > > tool-bar-mode: t > > menu-bar-mode: t > > file-name-shadow-mode: t > > global-font-lock-mode: t > > font-lock-mode: t > > blink-cursor-mode: t > > auto-composition-mode: t > > auto-encryption-mode: t > > auto-compression-mode: t > > line-number-mode: t > > transient-mark-mode: t > > > > Recent input: > > M-x r e p o r C-y > > M-x M-p > > > > Recent messages: > > For information about GNU Emacs and the GNU system, type C-h C-a. > > current-kill: Kill ring is empty > > delete-backward-char: Text is read-only [2 times] > > Quit > > > > Load-path shadows: > > None found. > > > > Features: > > (shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mm= l > > easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 > > mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums > > mm-util mail-prsvr mail-utils time-date china-util tooltip ediff-hook > > vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image > > regexp-opt fringe tabulated-list newcomment lisp-mode register page > > menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock > > syntax facemenu font-core frame cham georgian utf-8-lang misc-lang > > vietnamese tibetan thai tai-viet lao korean japanese hebrew greek > > romanian slovak czech european ethiopic indian cyrillic chinese > > case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer loaddef= s > > button faces cus-face macroexp files text-properties overlay sha1 md5 > > base64 format env code-pages mule custom widget hashtable-print-readabl= e > > backquote make-network-process dbusbind dynamic-setting > > font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs) > > > > > > --047d7b2e3e44ef380604fc14e8e1 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Clearly the fontconfig version on my system understands hi= nt setting. As I have said, if I have hintnone in fonts.conf and hintslight= in X resources,=C2=A0Emacs will use hintslight and=C2=A0all=C2=A0other gtk= applications like gedit, gnome-terminal will use hintnone.

Since Emacs is also a gtk application, why doesn't it re= spect fontconfig settings?


On Tue, Jun 17, 2014 at 11:28 PM, Jan Dj=C3=A4rv <= span dir=3D"ltr"><jan.h.d@swipnet.se> wrote:
Hello.

17 jun 2014 kl. 05:08 skrev yynyygy@gm= ail.com:

> I've noticed font rendering differences between Emacs and other gt= k
> applications like gedit. In short, Emacs ignores hintstyle setting in<= br> > fontconfig. I have hintstyle set to hintslight in
> ~/.config/fontconfig/fonts.conf, but I have to add 'Xft.hintstyle:=
> hintslight' in Xresources to get the desired effect.
>
> The strange thing is that while ignoring hintstyle setting, Emacs stil= l
> respect part of fontconfig settings, for example, anti-aliasing settin= g
> in fonts.conf will affect Emacs's font rendering.
>

Hint setting is newer than the rest so it is possible your Emacs was compil= ed against a fontconfig that don't have it.
Another possibility is that you have GSettings or GConf settings that are d= ifferent than fonts.conf or from the X resources.

Emacs by itself does not read fonts.conf or apply X resources, it is all do= ne by fontconfig/Xft-libraries. =C2=A0Emacs do apply GSettings and/or GConf= settings.

=C2=A0 =C2=A0 =C2=A0 =C2=A0 Jan D.


> To be more precise, if I disable anti-aliasing in fonts.conf and enabl= e
> it in Xresources, Emacs will not have anti-aliasing; if I have
> hintslight in fonts.conf and hintnone in Xresources, Emacs will use > hintnone.
>
> I have tested with DejaVu Sans Mono 12 and Ubuntu Mono 13, but clearly=
> it is not the fonts' problem.
>
>
> In GNU Emacs 24.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.10.8)
> of 2014-06-11 on gentoo
> Windowing system distributor `The X.Org Foundation', version 11.0.= 11500000
> System Description: =C2=A0 NAME=3DGentoo
>
> Configured using:
> `configure '--prefix=3D/usr' '--build=3Dx86_64-pc-linux-gn= u'
> '--host=3Dx86_64-pc-linux-gnu' '--mandir=3D/usr/share/man&= #39;
> '--infodir=3D/usr/share/info' '--datadir=3D/usr/share'= '--sysconfdir=3D/etc'
> '--localstatedir=3D/var/lib' '--libdir=3D/usr/lib64' > '--disable-silent-rules' '--disable-dependency-tracking= 9;
> '--program-suffix=3D-emacs-24' '--infodir=3D/usr/share/inf= o/emacs-24'
> '--localstatedir=3D/var'
> '--enable-locallisppath=3D/etc/emacs:/usr/share/emacs/site-lisp= 9;
> '--with-crt-dir=3D/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/../../../= ../lib64'
> '--with-gameuser=3Dgames' '--without-compress-info' &#= 39;--without-hesiod'
> '--without-kerberos' '--without-kerberos5' '--with= -gpm' '--with-dbus'
> '--without-gnutls' '--without-xml2' '--without-sel= inux'
> '--without-wide-int' '--with-sound' '--with-x'= '--without-ns'
> '--without-gconf' '--without-gsettings' '--without= -toolkit-scroll-bars'
> '--with-gif' '--with-jpeg' '--with-png' '-= -with-rsvg' '--with-tiff'
> '--with-xpm' '--without-imagemagick' '--with-xft&#= 39; '--without-libotf'
> '--without-m17n-flt' '--with-x-toolkit=3Dgtk3'
> 'GENTOO_PACKAGE=3Dapp-editors/emacs-24.3-r6'
> 'build_alias=3Dx86_64-pc-linux-gnu' 'host_alias=3Dx86_64-p= c-linux-gnu'
> 'CFLAGS=3D-march=3Dnative -O2 -pipe' 'LDFLAGS=3D-Wl,-O1 -W= l,--as-needed'
> 'CPPFLAGS=3D''
>
> Important settings:
> =C2=A0value of $LC_COLLATE: C
> =C2=A0value of $LC_CTYPE: zh_CN.UTF-8
> =C2=A0value of $LANG: en_US.UTF-8
> =C2=A0value of $XMODIFIERS: @im=3Dfcitx
> =C2=A0locale-coding-system: utf-8-unix
> =C2=A0default enable-multibyte-characters: t
>
> Major mode: Lisp Interaction
>
> Minor modes in effect:
> =C2=A0tooltip-mode: t
> =C2=A0mouse-wheel-mode: t
> =C2=A0tool-bar-mode: t
> =C2=A0menu-bar-mode: t
> =C2=A0file-name-shadow-mode: t
> =C2=A0global-font-lock-mode: t
> =C2=A0font-lock-mode: t
> =C2=A0blink-cursor-mode: t
> =C2=A0auto-composition-mode: t
> =C2=A0auto-encryption-mode: t
> =C2=A0auto-compression-mode: t
> =C2=A0line-number-mode: t
> =C2=A0transient-mark-mode: t
>
> Recent input:
> M-x r e p o r <tab> <return> C-y <backspace> <bac= kspace>
> M-x M-p <return>
>
> Recent messages:
> For information about GNU Emacs and the GNU system, type C-h C-a.
> current-kill: Kill ring is empty
> delete-backward-char: Text is read-only [2 times]
> Quit
>
> Load-path shadows:
> None found.
>
> Features:
> (shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 m= ml
> easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231
> mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums > mm-util mail-prsvr mail-utils time-date china-util tooltip ediff-hook<= br> > vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image=
> regexp-opt fringe tabulated-list newcomment lisp-mode register page > menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock<= br> > syntax facemenu font-core frame cham georgian utf-8-lang misc-lang
> vietnamese tibetan thai tai-viet lao korean japanese hebrew greek
> romanian slovak czech european ethiopic indian cyrillic chinese
> case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer loadde= fs
> button faces cus-face macroexp files text-properties overlay sha1 md5<= br> > base64 format env code-pages mule custom widget hashtable-print-readab= le
> backquote make-network-process dbusbind dynamic-setting
> font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs)
>
>


--047d7b2e3e44ef380604fc14e8e1--