From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: handa@gnu.org (K. Handa) Newsgroups: gmane.emacs.bugs Subject: bug#17973: Thin space not thin at all Date: Mon, 14 Jul 2014 00:12:58 +0900 Message-ID: <874myle1hh.fsf@gnu.org> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1405264459 27001 80.91.229.3 (13 Jul 2014 15:14:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 13 Jul 2014 15:14:19 +0000 (UTC) Cc: 17973@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jul 13 17:14:12 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 1X6LTc-0000T2-N0 for geb-bug-gnu-emacs@m.gmane.org; Sun, 13 Jul 2014 17:14:08 +0200 Original-Received: from localhost ([::1]:52650 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X6LTc-0003nO-4i for geb-bug-gnu-emacs@m.gmane.org; Sun, 13 Jul 2014 11:14:08 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53950) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X6LTY-0003nE-3F for bug-gnu-emacs@gnu.org; Sun, 13 Jul 2014 11:14:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X6LTW-00069d-Ve for bug-gnu-emacs@gnu.org; Sun, 13 Jul 2014 11:14:04 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:58557) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X6LTW-00069T-Sr for bug-gnu-emacs@gnu.org; Sun, 13 Jul 2014 11:14:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1X6LTW-00051L-8j for bug-gnu-emacs@gnu.org; Sun, 13 Jul 2014 11:14:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: handa@gnu.org (K. Handa) Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 13 Jul 2014 15:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17973 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 17973-submit@debbugs.gnu.org id=B17973.140526439619219 (code B ref 17973); Sun, 13 Jul 2014 15:14:02 +0000 Original-Received: (at 17973) by debbugs.gnu.org; 13 Jul 2014 15:13:16 +0000 Original-Received: from localhost ([127.0.0.1]:53823 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X6LSm-0004zu-3C for submit@debbugs.gnu.org; Sun, 13 Jul 2014 11:13:16 -0400 Original-Received: from fencepost.gnu.org ([208.118.235.10]:48752 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X6LSj-0004zm-Oy for 17973@debbugs.gnu.org; Sun, 13 Jul 2014 11:13:14 -0400 Original-Received: from fl1-119-240-91-99.iba.mesh.ad.jp ([119.240.91.99]:46320 helo=wanchai) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1X6LSi-0003Ku-Vt; Sun, 13 Jul 2014 11:13:13 -0400 Original-Received: from handa by wanchai with local (Exim 4.80) (envelope-from ) id 1X6LSU-0001Cr-Qz; Mon, 14 Jul 2014 00:12:58 +0900 In-Reply-To: (message from Stefan Monnier on Thu, 10 Jul 2014 12:37:27 -0400) 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:91507 Archived-At: In article , Stefan Monnier writes: > Ah, right, that explains it. Hmm... I guess ideally, Emacs should > consider a height that's "too far" from the requested one as a failure > and then try again ignoring some of the specs. font_find_for_lface has a code to do that, but I found that it is called with full font properties in SPEC. This function does not try a font of different properties (foundry, family, registry, adstyle). > The patch below expresses the first part, but it looks like the second > part doesn't exit: Emacs just doesn't find any font to use for the "thin > space" of C-x SPC and indicates it to me with one of those big squares > that say "0020", which is a lot more intrusive than the problem I'm > trying to fix. In addition to your patch, could you please try the following patch? === modified file 'src/xfaces.c' --- src/xfaces.c 2014-07-07 23:33:05 +0000 +++ src/xfaces.c 2014-07-13 15:09:21 +0000 @@ -5547,7 +5547,7 @@ } if (! FONT_OBJECT_P (attrs[LFACE_FONT_INDEX])) attrs[LFACE_FONT_INDEX] - = font_load_for_lface (f, attrs, attrs[LFACE_FONT_INDEX]); + = font_load_for_lface (f, attrs, Ffont_spec (0, NULL)); if (FONT_OBJECT_P (attrs[LFACE_FONT_INDEX])) { face->font = XFONT_OBJECT (attrs[LFACE_FONT_INDEX]); > PS: The patch below also happens to give me assertion failures > fontset.c:897: Emacs fatal error: assertion failed: fontset_id_valid_p (face->fontset) > I haven't investigated any further, tho (and the line number might be off > because of local changes anyway). I didn't face with that error, but I'll keep on checking the code. --- Kenichi Handa handa@gnu.org