Subject: 25.1.50; Subpixel rendering is broken when not running under gnome-session

From: Matthew Leach <[email-masked]>
Date: Mon, 28 Mar 2016 22:16:45 +0100

Hi all,

I sometimes switch between two WMs, namely i3 and GNOME3.  I've noticed
that under GNOME3, the font rendering in Emacs seems to be, in my
opinion, nicer than in i3.  The difference is that under GNOME3 Emacs
uses subpixel rendering and not in i3.

I've tried several configs to get subpixel rendering working in Emacs
under i3: fontconfig and ~/.Xresources (attached).  Unfortunately, Emacs
doesn't conform and still doesn't use subpixel rendering even though
most other applications (gnome-terminal, rhythmbox, firefox, etc...)
do.

I tried running i3 under gnome-session as described at [1] and strangely
this fixes the issue!  Why would running Emacs under gnome-session fix
this?

[1]: http://blog.hugochinchilla.net/2013/03/using-gnome-3-with-i3-window-manager/

In GNU Emacs 25.1.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.18.9)
 of 2016-03-24 built on spline
Repository revision: 39577d07124ee16895b9c6aab7e2c6e7d41cc715
Windowing system distributor 'The X.Org Foundation', version 11.0.11802000
Configured using:
 'configure --prefix=/usr/local'

Configured features:
XPM JPEG TIFF GIF PNG RSVG SOUND GPM DBUS GSETTINGS NOTIFY ACL GNUTLS
LIBXML2 FREETYPE XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11

Important settings:
  value of $LANG: en_GB.UTF8
  locale-coding-system: utf-8-unix

Major mode: Group

Minor modes in effect:
  gnus-topic-mode: t
  gnus-undo-mode: t
  diff-auto-refine-mode: t
  erc-list-mode: t
  erc-menu-mode: t
  erc-autojoin-mode: t
  erc-ring-mode: t
  erc-networks-mode: t
  erc-pcomplete-mode: t
  erc-track-mode: t
  erc-track-minor-mode: t
  erc-match-mode: t
  erc-button-mode: t
  erc-fill-mode: t
  erc-stamp-mode: t
  erc-netsplit-mode: t
  erc-irccontrols-mode: t
  erc-noncommands-mode: t
  erc-move-to-prompt-mode: t
  erc-readonly-mode: t
  show-paren-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-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
  buffer-read-only: t
  line-number-mode: t
  transient-mark-mode: t

Recent messages:
Opening connection to mx0.mattleach.net via tls...
Opening connection to mx0.mattleach.net...done
Opening nnimap server on Home...done
6 new newsgroups have arrived
Checking new news...
Reading active file via nndraft...done
Checking new news...done
Gnus-Topic mode enabled in current buffer
Mark set
Making completion list...

Load-path shadows:
/home/matthew/.emacs.d/elpa/emms-20160304.920/tq hides /usr/local/share/emacs/25.1.50/lisp/emacs-lisp/tq

Features:
(bbdb-message gnus-topic nndraft nnmh utf-7 nnfolder network-stream puny
nsm starttls gnus-agent gnus-srvr gnus-score score-mode nnvirtual
gnus-msg gnus-art mm-uu mml2015 mm-view mml-smime smime dig gnus-cache
gnus-sum bbdb-gnus bbdb-mua bbdb-com crm bbdb bbdb-site timezone
gnus-demon nntp gnus-group gnus-undo gnus-article-treat-patch diff-mode
gnus-start gnus-cloud nnimap nnmail mail-source tls gnutls utf7 netrc
nnoo parse-time gnus-spec gnus-int gnus-range gnus-win gnus nnheader
subr-x conf-mode face-remap misearch multi-isearch shadow mail-extr
emacsbug message rfc822 mml mml-sec epa derived epg gnus-util rmail
rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
mm-util mail-prsvr mail-utils ispell erc-list erc-menu erc-join erc-ring
erc-networks erc-pcomplete erc-track erc-match erc-button wid-edit
erc-fill erc-stamp erc-netsplit erc-goodies erc erc-backend erc-compat
conf-toplev conf-sp smartparens dash conf-coffee conf-windmove windmove
conf-whitespace conf-slime slime-repl slime-parse slime compile etags
xref project arc-mode archive-mode noutline outline pp hyperspec
browse-url conf-faces hl-sexp thingatpt conf-eshell em-term term
disp-table ehelp em-smart pcomplete comint ansi-color ring esh-var
esh-io esh-cmd esh-opt esh-ext esh-proc esh-arg esh-groups eshell
esh-module esh-mode esh-util conf-erc conf-emms emms-librefm-stream xml
emms-librefm-scrobbler emms-playlist-limit emms-volume easy-mmode
emms-volume-amixer emms-i18n emms-history emms-score emms-stream-info
emms-metaplaylist-mode emms-bookmarks emms-cue emms-mode-line-icon
emms-browser sort emms-playlist-sort emms-last-played emms-player-xine
emms-player-mpd tq emms-lyrics emms-url url url-proxy url-privacy
url-expand url-methods url-history url-cookie url-domsuf url-util
mailcap emms-streams emms-show-all emms-tag-editor format-spec emms-mark
emms-cache emms-info-ogginfo emms-info-mp3info emms-playlist-mode
emms-player-vlc advice emms-source-playlist emms-source-file locate
dired dired-loaddefs emms-player-mplayer emms-playing-time
emms-player-simple emms-info later-do emms-setup emms-mode-line emms
emms-compat conf-elisp conf-packages conf-dir conf-dired conf-c-mode
conf-auctex conf-asm conf-ace-jump conf-personal ido seq edmacro kmacro
paren preview-latex tex-site auto-loads finder-inf slime-autoloads
url-auth info package epg-config url-handlers url-parse auth-source
cl-seq eieio byte-opt bytecomp byte-compile cl-extra help-mode easymenu
cconv eieio-core cl-macs gv eieio-loaddefs cl-loaddefs pcase cl-lib
password-cache url-vars time-date mule-util tooltip eldoc electric
uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win
term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list newcomment elisp-mode lisp-mode prog-mode register page
menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core term/tty-colors frame cl-generic cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese charscript case-table epa-hook
jka-cmpr-hook help simple abbrev obarray minibuffer cl-preloaded nadvice
loaddefs button faces cus-face macroexp files text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote dbusbind inotify dynamic-setting
system-font-setting font-render-setting move-toolbar gtk x-toolkit x
multi-tty make-network-process emacs)

Memory information:
((conses 16 296882 26791)
 (symbols 48 49352 1)
 (miscs 40 161 521)
 (strings 32 89793 13003)
 (string-bytes 1 2712243)
 (vectors 16 40953)
 (vector-slots 8 761847 8414)
 (floats 8 544 465)
 (intervals 56 1825 949)
 (buffers 976 29)
 (heap 1024 71285 1843))

-- 
Matt