From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Ralf Jung Newsgroups: gmane.emacs.bugs Subject: bug#26605: 25.1; emacs picks unsuitable fallback fonts for monospace default font Date: Sat, 22 Apr 2017 15:06:49 +0200 Message-ID: <999a78da-e8c2-07b4-0716-8c2e3c40eb6a@ralfj.de> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1492866492 23874 195.159.176.226 (22 Apr 2017 13:08:12 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 22 Apr 2017 13:08:12 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 To: 26605@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Apr 22 15:08:08 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d1ulk-00065Y-FG for geb-bug-gnu-emacs@m.gmane.org; Sat, 22 Apr 2017 15:08:08 +0200 Original-Received: from localhost ([::1]:35603 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d1ulo-0003yk-HX for geb-bug-gnu-emacs@m.gmane.org; Sat, 22 Apr 2017 09:08:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41454) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d1ulh-0003xs-KG for bug-gnu-emacs@gnu.org; Sat, 22 Apr 2017 09:08:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d1ule-0001v1-E7 for bug-gnu-emacs@gnu.org; Sat, 22 Apr 2017 09:08:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:35069) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d1ule-0001ux-99 for bug-gnu-emacs@gnu.org; Sat, 22 Apr 2017 09:08:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1d1ule-0001R7-1G for bug-gnu-emacs@gnu.org; Sat, 22 Apr 2017 09:08:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ralf Jung Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 22 Apr 2017 13:08:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 26605 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.14928664285443 (code B ref -1); Sat, 22 Apr 2017 13:08:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 22 Apr 2017 13:07:08 +0000 Original-Received: from localhost ([127.0.0.1]:33268 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d1ukl-0001Pj-WC for submit@debbugs.gnu.org; Sat, 22 Apr 2017 09:07:08 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:50306) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d1ukk-0001PD-52 for submit@debbugs.gnu.org; Sat, 22 Apr 2017 09:07:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d1ukd-0001em-Hj for submit@debbugs.gnu.org; Sat, 22 Apr 2017 09:07:00 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:41333) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d1ukd-0001ei-Dk for submit@debbugs.gnu.org; Sat, 22 Apr 2017 09:06:59 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41275) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d1ukb-0003rY-RM for bug-gnu-emacs@gnu.org; Sat, 22 Apr 2017 09:06:59 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d1ukY-0001b7-L5 for bug-gnu-emacs@gnu.org; Sat, 22 Apr 2017 09:06:57 -0400 Original-Received: from eins.ralfj.de ([85.214.220.216]:39280) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d1ukY-0001al-9r for bug-gnu-emacs@gnu.org; Sat, 22 Apr 2017 09:06:54 -0400 Original-Received: from [192.168.10.97] (unknown [193.110.198.7]) by mx.ralfj.de (Postfix) with ESMTPSA id 4EF1717D0940 for ; Sat, 22 Apr 2017 15:06:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=ralfj.de; s=mail; t=1492866411; bh=QHc2Yjpde1FB21YsWziWFqbq6fiQfsG0HKOf7ZJvAyM=; h=To:Subject:From:Date:From; b=Njq/POjKUlT4ts7miSFCGDRZQSd59FChAWGa4LCIPAX8OcJ2TtZGkER+UYufwoz1q QgQp0xYEAM9nrkM0NMBonWsUyf2ZJe20yN+s4OnvExWE53qpTkHipzJEXZx1QLe0bl lJ0IpsmH29MG7DZW1m7aB5jTkyvdZXsYRW0kMcz8= 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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" Xref: news.gmane.org gmane.emacs.bugs:131863 Archived-At: Hi all, I have my system set up to use "Fira Mono" as the default font for "Monospace", and my code editors (emacs and Kate) use that font as their default font. However, if I use emacs without any further configuration, it picks unsuitable fallback fonts for characters not supported my Fira Mono. "Unsuitable" here means in particular that the chosen fallback font is not monospace, so lines that contain fallback characters break the grid. At the same time, I do have suitable fonts installed, as witnessed by Kate being able to preserve the grid. Concretely, consider the following example text (pieced together from a codebase using unicode characters for mathematical operators): mixin_cmra_pcore_mono x y cx : x =E2=89=BC y =E2=86=92 pcore x =3D Some cx =E2=86=92 =E2=88=83 cy, p= core y =3D Some cy =E2=88=A7 cx =E2=89=BC cy; =E2=9C=93{n} x =E2=86=92 x =E2=89=A1{n}=E2=89=A1 y1 =E2=8B=85 y2 =E2=86= =92 z1 z2, x =E2=89=A1 z1 =E2=8B=85 z2 =E2=88=A7 z1 =E2=89=A1{n}=E2=89=A1= y1 =E2=88=A7 z2 =E2=89=A1{n}=E2=89=A1 y2 =E2=88=80 =E2=9C=93{n} (=E2=88=85:A). }. (At least) the following characters are not supported by Fira Mono, so a fallback is picked: =E2=89=BC =E2=9C=93 =E2=8B=85 =E2=88=A7 =E2=88=85 =E2=88=83 =E2=88=80 As a result, the above text does not stay within the "monotext grid", some characters are significantly wider than the majority (e.g., =E2=89=BC= ) while others are much smaller (=E2=8B=85). However, all of these charact= ers are supported by DejaVu Mono, a font I have installed. I believe that's the font other editors are using to render these characters. When I configure emacs to use DejaVu Mono for characters not supported by Fira Mono, the text above looks entirely as expected. Notice that, for example, =E2=86=92 is supported by both Fira Mono and De= jaVu Mono. In these cases, the editor should use the preferred font, which is Fira Mono in my case. (Actually, the much prettier arrows are one of the reasons I prefer Fira Mono over DejaVu Mono.) Ideally, emacs' default configuration would be such that it prefers monospace over non-monospace fonts when falling back from a monospace fon= t. Kind regards, Ralf In GNU Emacs 25.1.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.5) of 2017-01-01, modified by Debian built on binet Windowing system distributor 'The X.Org Foundation', version 11.0.1190200= 0 System Description: Debian GNU/Linux 9.0 (stretch) Configured using: 'configure --build x86_64-linux-gnu --prefix=3D/usr --sharedstatedir=3D/var/lib --libexecdir=3D/usr/lib --localstatedir=3D/var/lib --infodir=3D/usr/share/info --mandir=3D/usr/share/man --with-pop=3Dyes --enable-locallisppath=3D/etc/emacs25:/etc/emacs:/usr/local/share/emacs/= 25.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/25.1/sit= e-lisp:/usr/share/emacs/site-lisp --with-sound=3Dalsa --build x86_64-linux-gnu --prefix=3D/usr --sharedstatedir=3D/var/lib --libexecdir=3D/usr/lib --localstatedir=3D/var/lib --infodir=3D/usr/share/info --mandir=3D/usr/share/man --with-pop=3Dyes --enable-locallisppath=3D/etc/emacs25:/etc/emacs:/usr/local/share/emacs/= 25.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/25.1/sit= e-lisp:/usr/share/emacs/site-lisp --with-sound=3Dalsa --with-x=3Dyes --with-x-toolkit=3Dgtk3 --with-toolkit-scroll-bars 'CFLAGS=3D-g -O2 -fdebug-prefix-map=3D/build/emacs25-4Gc0bO/emacs25-25.1+1=3D. -fstack-protector-strong -Wformat -Werror=3Dformat-security -Wall' 'CPPFLAGS=3D-Wdate-time -D_FORTIFY_SOURCE=3D2' LDFLAGS=3D-Wl,-z,relro' Configured features: XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GCONF GSETTINGS NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 Important settings: value of $LC_MESSAGES: en_US.utf8 value of $LC_NUMERIC: en_US.utf8 value of $LANG: de_DE.utf8 locale-coding-system: utf-8-unix Major mode: Fundamental Minor modes in effect: tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-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: Loading /etc/emacs/site-start.d/50autoconf.el (source)...done Loading /etc/emacs/site-start.d/50cmake-data.el (source)...done Loading /etc/emacs/site-start.d/50dictionaries-common.el (source)... Loading debian-ispell... Loading /var/cache/dictionaries-common/emacsen-ispell-default.el (source)...done Loading debian-ispell...done Loading /var/cache/dictionaries-common/emacsen-ispell-dicts.el (source)...done Loading /etc/emacs/site-start.d/50dictionaries-common.el (source)...done For information about GNU Emacs and the GNU system, type C-h C-a. funcall-interactively: Buffer is read-only: # Load-path shadows: /usr/share/emacs/25.1/site-lisp/debian-startup hides /usr/share/emacs/site-lisp/debian-startup /usr/share/emacs25/site-lisp/cmake-data/cmake-mode hides /usr/share/emacs/site-lisp/cmake-mode Features: (shadow sort mail-extr emacsbug message dired format-spec rfc822 mml mml-sec password-cache epg gnus-util mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util help-fns mail-prsvr mail-utils finder-inf info tex-site package epg-config seq byte-opt gv bytecomp byte-compile cl-extra help-mode easymenu cconv cl-loaddefs pcase cl-lib time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel 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 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 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 105584 5365) (symbols 48 21593 0) (miscs 40 98 107) (strings 32 21087 4829) (string-bytes 1 611322) (vectors 16 14637) (vector-slots 8 463510 5456) (floats 8 194 6) (intervals 56 296 0) (buffers 976 18))