From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#20727: 24.5; Font fallback doesn't work for the Emoji range Date: Sat, 13 Jun 2015 21:31:32 +0300 Message-ID: <83oakjpiij.fsf@gnu.org> References: <557B47B6.4080600@cs.ucla.edu> <837fr8q8dr.fsf@gnu.org> <83y4jnq0vz.fsf@gnu.org> <557C53E2.6070706@cs.ucla.edu> <83si9vpo0i.fsf@gnu.org> <83r3pfpmit.fsf@gnu.org> <557C63ED.8050005@cs.ucla.edu> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1434220346 24113 80.91.229.3 (13 Jun 2015 18:32:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 13 Jun 2015 18:32:26 +0000 (UTC) Cc: v.schneidermann@gmail.com, andrewjmoreton@gmail.com, 20727@debbugs.gnu.org To: Paul Eggert Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jun 13 20:32:15 2015 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 1Z3qE0-00072X-TS for geb-bug-gnu-emacs@m.gmane.org; Sat, 13 Jun 2015 20:32:13 +0200 Original-Received: from localhost ([::1]:56688 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z3qE0-00012n-5I for geb-bug-gnu-emacs@m.gmane.org; Sat, 13 Jun 2015 14:32:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51409) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z3qDw-00012h-Qk for bug-gnu-emacs@gnu.org; Sat, 13 Jun 2015 14:32:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z3qDq-00006e-GD for bug-gnu-emacs@gnu.org; Sat, 13 Jun 2015 14:32:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:38468) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z3qDq-00006a-DB for bug-gnu-emacs@gnu.org; Sat, 13 Jun 2015 14:32:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Z3qDp-0006Io-Tl for bug-gnu-emacs@gnu.org; Sat, 13 Jun 2015 14:32:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 13 Jun 2015 18:32:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20727 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed Original-Received: via spool by 20727-submit@debbugs.gnu.org id=B20727.143422030524201 (code B ref 20727); Sat, 13 Jun 2015 18:32:01 +0000 Original-Received: (at 20727) by debbugs.gnu.org; 13 Jun 2015 18:31:45 +0000 Original-Received: from localhost ([127.0.0.1]:52928 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z3qDY-0006IH-5h for submit@debbugs.gnu.org; Sat, 13 Jun 2015 14:31:44 -0400 Original-Received: from mtaout25.012.net.il ([80.179.55.181]:57959) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z3qDV-0006Hy-N6 for 20727@debbugs.gnu.org; Sat, 13 Jun 2015 14:31:43 -0400 Original-Received: from conversion-daemon.mtaout25.012.net.il by mtaout25.012.net.il (HyperSendmail v2007.08) id <0NPW00N00AUXPJ00@mtaout25.012.net.il> for 20727@debbugs.gnu.org; Sat, 13 Jun 2015 21:27:06 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout25.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NPW00LLGB96R230@mtaout25.012.net.il>; Sat, 13 Jun 2015 21:27:06 +0300 (IDT) In-reply-to: <557C63ED.8050005@cs.ucla.edu> X-012-Sender: halo1@inter.net.il 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:103907 Archived-At: > Date: Sat, 13 Jun 2015 10:10:05 -0700 > From: Paul Eggert > CC: v.schneidermann@gmail.com, andrewjmoreton@gmail.com, > 20727@debbugs.gnu.org > > Eli Zaretskii wrote: > > Actually, an even better solution might be this: we explicitly specify > > fixed-medium font with iso10646-1 registry for these popular > > characters_before_ Symbola. This is justified, I think, since the > > standard-fontset-spec on X specifies a fixed-medium font, so fit is > > iso10646-1 variant supports these commonly-used punctuation > > characters, it is a better candidate than Symbola, while the latter > > will still be used as fallback. > > > > WDYT? Could you try this on your system and see if it work? > > I'd be happy to try, but I'm afraid this is an area I don't know well Neither do I, so please bear with me. > and I > don't see why the existing code doesn't already do what you'r suggesting. > setup-default-fontset invokes (set-fontset-font "fontset-default" ... "Symbola" > nil 'prepend), and later invokes (set-fontset-font "fontset-default" nil '(nil . > "iso10646-1") nil 'prepend), so doesn't that mean that the iso10646-1 fonts are > prepended before Symbola and so should take priority over Symbola already? No, not according to my understanding. The latter part is fallback for when nothing is specified as either the script or the character range, which is not the case we are discussing. > Anyway, If you can send me a patch along the lines you're thinking, I can try it. Here's an example of the 1st idea. If it works well, we can exempt more ranges from Symbola (if you could tell me where to download the fixed-medium font, I could look at its coverage to decide which other ranges to exempt): diff --git a/lisp/international/fontset.el b/lisp/international/fontset.el index 696940e..cb32daa 100644 --- a/lisp/international/fontset.el +++ b/lisp/international/fontset.el @@ -697,7 +697,11 @@ (defun setup-default-fontset () ;; covered well by Symbola. (dolist (symbol-subgroup '((#x0250 . #x02AF) ;; IPA Extensions - (#x2000 . #x206F) ;; General Punctuation + (#x2000 . #x2012) ;; General Punctuation + (#x2015 . #x2017) + (#x201F . #x202F) + (#x2031 . #x2038) + (#x203B . #x206F) (#x2070 . #x209F) ;; Superscripts and Subscripts (#x20A0 . #x20CF) ;; Currency Symbols (#x2100 . #x214F) ;; Letterlike Symbols The second idea is to add (set-fontset-font "fontset-default" '(#x2013 . #x2014) "-*-fixed-medium-r-*-*-*-*-*-*-*-*-iso10646-1" nil 'prepend) (set-fontset-font "fontset-default" '(#x2018 . #x201E) "-*-fixed-medium-r-*-*-*-*-*-*-*-*-iso10646-1" nil 'prepend) (set-fontset-font "fontset-default" '(#x2039 . #x203A) "-*-fixed-medium-r-*-*-*-*-*-*-*-*-iso10646-1" nil 'prepend) (and similarly for other ranges where that font has coverage) to setup-default-fontset _after_ the Symbola portion.