From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.bugs Subject: bug#3174: NS font selection still broken Date: Mon, 02 Nov 2009 13:06:51 +0900 Message-ID: References: <5AA4186F-3AFD-482E-AC4F-F60E9E2517B0@gmail.com> <2FBE059F-5AE1-4DB7-A325-80F49ACF2490@gmail.com> Reply-To: Kenichi Handa , 3174@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1257136059 32168 80.91.229.12 (2 Nov 2009 04:27:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 2 Nov 2009 04:27:39 +0000 (UTC) Cc: david.reitter@gmail.com, cmenzel@tamu.edu, 3174@emacsbugs.donarmstrong.com To: Adrian Robert , 3174@emacsbugs.donarmstrong.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Nov 02 05:27:31 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1N4oVs-0004xD-RW for geb-bug-gnu-emacs@m.gmane.org; Mon, 02 Nov 2009 05:27:29 +0100 Original-Received: from localhost ([127.0.0.1]:48024 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N4oVs-0004pZ-4e for geb-bug-gnu-emacs@m.gmane.org; Sun, 01 Nov 2009 23:27:28 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N4oVn-0004nK-CF for bug-gnu-emacs@gnu.org; Sun, 01 Nov 2009 23:27:23 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N4oVi-0004j4-IC for bug-gnu-emacs@gnu.org; Sun, 01 Nov 2009 23:27:23 -0500 Original-Received: from [199.232.76.173] (port=45525 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N4oVi-0004iw-Du for bug-gnu-emacs@gnu.org; Sun, 01 Nov 2009 23:27:18 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:57607) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1N4oVh-0005Hq-VJ for bug-gnu-emacs@gnu.org; Sun, 01 Nov 2009 23:27:18 -0500 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nA24RFpx021667; Sun, 1 Nov 2009 20:27:15 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id nA24F48h020272; Sun, 1 Nov 2009 20:15:04 -0800 Resent-Date: Sun, 1 Nov 2009 20:15:04 -0800 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Kenichi Handa Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs , owner@emacsbugs.donarmstrong.com 2Resent-Date: Mon, 02 Nov 2009 04:15:04 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 3174 X-Emacs-PR-Package: emacs,ns X-Emacs-PR-Keywords: Original-Received: via spool by 3174-submit@emacsbugs.donarmstrong.com id=B3174.125713481619449 (code B ref 3174); Mon, 02 Nov 2009 04:15:04 +0000 Original-Received: (at 3174) by emacsbugs.donarmstrong.com; 2 Nov 2009 04:06:56 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from mx1.aist.go.jp (mx1.aist.go.jp [150.29.246.133]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nA246sUT019446 for <3174@emacsbugs.donarmstrong.com>; Sun, 1 Nov 2009 20:06:55 -0800 Original-Received: from rqsmtp1.aist.go.jp (rqsmtp1.aist.go.jp [150.29.254.115]) by mx1.aist.go.jp with ESMTP id nA246qPY006848; Mon, 2 Nov 2009 13:06:52 +0900 (JST) env-from (handa@m17n.org) Original-Received: from smtp3.aist.go.jp by rqsmtp1.aist.go.jp with ESMTP id nA246q9T006778; Mon, 2 Nov 2009 13:06:52 +0900 (JST) env-from (handa@m17n.org) Original-Received: by smtp3.aist.go.jp with ESMTP id nA246prt020026; Mon, 2 Nov 2009 13:06:51 +0900 (JST) env-from (handa@m17n.org) Original-Received: from handa by etlken with local (Exim 4.69) (envelope-from ) id 1N4oBv-0003Vn-6e; Mon, 02 Nov 2009 13:06:51 +0900 In-Reply-To: <2FBE059F-5AE1-4DB7-A325-80F49ACF2490@gmail.com> (message from Adrian Robert on Fri, 30 Oct 2009 10:51:45 -0400) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Sun, 01 Nov 2009 23:27:23 -0500 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:32355 Archived-At: In article <2FBE059F-5AE1-4DB7-A325-80F49ACF2490@gmail.com>, Adrian Robert writes: > > At first (top of list), it tries to find "Apple Lucida Grande" and > > "Lucida Grande" with a particular "registry" and for the symbol > > script. This fails, because the `val' variable in > > font_list_entities ends up being Qnil. > This is as expected. The first query asks for fonts with > family=Lucida Grande, that cover script=symbol. The way the second > criterion is handled is the issue. ns_findfonts() has no idea whether > the font is being requested just for some particular character or for > rendering the script in general, so it tries to deliver a font that > has "good coverage" of the requested script. This is handled by > ns_get_covering_families() for the script, which looks at the whole > set of characters provided by the font and returns those that cover a > certain percentage of the characters in the unicode range for the > script. > I don't see what other behavior would be reasonable here. > Perhaps the 90% criterion (nsfont.m line 507) could be lowered; this > might lead to other problems though -- I did experiment with this when > setting it. The best thing at this point might be to do a similar > trace against X11 or w32 and see where things differ. Of course, the > available fonts will be different, so it is impossible to duplicate > the conditions. For selecting a font that supports a specific script, xft backend utilizes script-representative-chars which maps a script to a few representative characters of the script. >From a set of fonts found that way, the code in fontset.c chooses the best font that actually supports the target character. --- Kenichi Handa handa@m17n.org