From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Leatherman Newsgroups: gmane.emacs.bugs Subject: bug#11450: 24.1.50; NS regression: fallback font used even when glyph available in primary font Date: Tue, 14 Aug 2012 21:23:35 -0400 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1344994652 8769 80.91.229.3 (15 Aug 2012 01:37:32 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 15 Aug 2012 01:37:32 +0000 (UTC) To: 11450@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Aug 15 03:37:33 2012 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 1T1SY2-0005qk-UF for geb-bug-gnu-emacs@m.gmane.org; Wed, 15 Aug 2012 03:37:27 +0200 Original-Received: from localhost ([::1]:52283 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T1SY2-0002ri-1I for geb-bug-gnu-emacs@m.gmane.org; Tue, 14 Aug 2012 21:37:26 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:56084) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T1SXz-0002rU-2l for bug-gnu-emacs@gnu.org; Tue, 14 Aug 2012 21:37:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T1SXx-000176-Jt for bug-gnu-emacs@gnu.org; Tue, 14 Aug 2012 21:37:23 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:47756) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T1SXx-000170-Gf for bug-gnu-emacs@gnu.org; Tue, 14 Aug 2012 21:37:21 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1T1SgM-0002kZ-1n for bug-gnu-emacs@gnu.org; Tue, 14 Aug 2012 21:46:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: David Leatherman Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 15 Aug 2012 01:46:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11450 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 11450-submit@debbugs.gnu.org id=B11450.134499511810516 (code B ref 11450); Wed, 15 Aug 2012 01:46:01 +0000 Original-Received: (at 11450) by debbugs.gnu.org; 15 Aug 2012 01:45:18 +0000 Original-Received: from localhost ([127.0.0.1]:57302 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T1Sfd-0002jX-2b for submit@debbugs.gnu.org; Tue, 14 Aug 2012 21:45:17 -0400 Original-Received: from mail-qc0-f172.google.com ([209.85.216.172]:37666) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T1ST7-0002RX-Au for 11450@debbugs.gnu.org; Tue, 14 Aug 2012 21:32:22 -0400 Original-Received: by qcac10 with SMTP id c10so972924qca.3 for <11450@debbugs.gnu.org>; Tue, 14 Aug 2012 18:23:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:user-agent:date:message-id:mime-version :content-type; bh=2gHMnaIqo07++BaFKMpcoT6vIKrqyZjSLnFGYRXV/qM=; b=aSiCZj09tq0QPgm8F553J6nwCZ9Gdr0LkcFtjd6NDyj3IrZmme2t/J6rsUQxNbEKuF ePk5kIIad5Sz3NUKqIkyYjPwZwMZaRbce4xGL1+W+oFle06G5qod4LhmMoXvOebwZ4cT O4JHHO3DJ0HtNr4vbikoNhW8fsFdP/yn4RrsL4Kuwpy+vlOkEszVeRAuIP3KH2GXV5fC 3yDL97k5Uj8zEAD2wyn1TQD//PqfTZVCXqQcXQkzfUMu6ExmZAiNCr8HwvUzu1ibGcOb b0+nyRNDlFCcxXuCMP5YGFwXKO2AHbkEridP1wsg0b4JgMab3NysSYkf0quP8NGhDFgM H0Rw== Original-Received: by 10.224.213.4 with SMTP id gu4mr37310300qab.0.1344993820106; Tue, 14 Aug 2012 18:23:40 -0700 (PDT) Original-Received: from localhost (pool-108-49-228-247.bstnma.fios.verizon.net. [108.49.228.247]) by mx.google.com with ESMTPS id gi10sm637008qab.11.2012.08.14.18.23.37 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 14 Aug 2012 18:23:38 -0700 (PDT) User-Agent: Notmuch/0.13.2 (http://notmuchmail.org) Emacs/24.0.93.1 (x86_64-apple-darwin) X-Mailman-Approved-At: Tue, 14 Aug 2012 21:45:15 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) 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:63179 Archived-At: I managed to isolate the issue to the commit in which it was introduced as well as the offending lines in the commit. The git commit when the bug first started happening is 97665d8445c7f8b142cae9db2d81bdcafa310243 which was pushed on Sat, Feb 18 with the following commit message: "Update char-script-table from the latest Unicode Database. lisp/international/characters.el (script-list): Sync with the latest Unicode Character Database." In lisp/international/characters.el the addition of either of the following two symbol character ranges will cause the issue: (taken out of context here) (#x2900 #x2BFF symbol) (#x2E00 #x2E7F symbol) If either of these lines remain, then the font will be incorrectly chosen. I had to rebuild Emacs to test this despite the file being an Emacs Lisp file, but it could be that I simply failed to figure out how to change this file and make it work (I changed it, byte compiled it, etc. with no effect). YMMV. I turned on NSFONT_TRACE as suggested earlier and the below is from starting emacs -Q, changing the font to Menlo, and inserting the EMPTY SET character. The first trace is from the code with the two lines of code removed (i.e., will produce the desired behavior). The second is from the incorrect behavior. I've trimmed out non-essential differences. The first substantial difference to me is the additional two lines in the second diff (the second and third dotted pair at the beginning). This addition seems to prevent nsfont.m from returning the 4 entities that it returns in the correct case. ** First - correct font chosen ** Emacs[73145:307] Request covering families for script: 'symbol' (8192 . 10239) (127232 . 127487) (127744 . 128591) (128640 . 128895) Emacs[73145:307] returning 4 families Emacs[73145:307] Got desc NSCTFontDescriptor <0x1011e2e50> = { NSFontFamilyAttribute = Menlo; } and found 4 matching fonts from it: created font_entity: # created font_entity: # created font_entity: # created font_entity: # Returning 4 entities. nsfont: open size 12 of fontentity: # Emacs[73145:307] "Menlo-Regular 12.00 pt. P [] (0x100ae1270) fobj=0x101169740, spc=7.22" *** nsfont_open CACHE HIT! 0x101819188 Finding glyphs for glyphs in block 34 0x101819188 Computing metrics for glyphs in block 7 ** Second - incorrect font chosen ** Emacs[36212:307] Request covering families for script: 'symbol' (8192 . 10239) (10496 . 11263) (11776 . 11903) (127232 . 127487) (127744 . 128591) (128640 . 128895) Emacs[36212:307] returning 1 families Emacs[36212:307] Got desc NSCTFontDescriptor <0x100adf8b0> = { NSFontFamilyAttribute = Menlo; } and found 4 matching fonts from it: Returning 0 entities. nsfont: list for fontspec: # Emacs[36212:307] Request covering families for script: 'symbol' Emacs[36212:307] returning 1 families Emacs[36212:307] Got desc NSCTFontDescriptor <0x104408050> = { NSFontFamilyAttribute = Menlo; } and found 4 matching fonts from it: Returning 0 entities. nsfont: list for fontspec: # Emacs[36212:307] Request covering families for script: 'symbol' Emacs[36212:307] returning 1 families Emacs[36212:307] Got desc NSCTFontDescriptor <0x104405dd0> = { } and found 330 matching fonts from it: created font_entity: # created font_entity: # created font_entity: # created font_entity: # Returning 4 entities. nsfont: open size 12 of fontentity: # Emacs[36212:307] "STIXGeneral-Regular 12.00 pt. P [] (0x100ae4ec0) fobj=0x100aac290, spc=3.00" 0x1049bde68 Finding glyphs for glyphs in block 34 0x1049bde68 Computing metrics for glyphs in block 4 ***** I hope this is helpful. I don't know the cause to these effects except to observe that somehow the extra two character ranges in characters.el end up causing nsfont.m to look up the wrong font. Let me know if I can help or answer any questions. -- David