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#2667: Still seeing inconsistent fonts Date: Thu, 21 May 2009 10:15:56 +0900 Message-ID: References: <87zldo8dnb.fsf@cyd.mit.edu> Reply-To: Kenichi Handa , 2667@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1242869539 15009 80.91.229.12 (21 May 2009 01:32:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 21 May 2009 01:32:19 +0000 (UTC) Cc: cyd@stupidchicken.com, 2667@emacsbugs.donarmstrong.com To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu May 21 03:32:11 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 1M6x8k-0007cF-2s for geb-bug-gnu-emacs@m.gmane.org; Thu, 21 May 2009 03:32:10 +0200 Original-Received: from localhost ([127.0.0.1]:34393 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M6x8j-0007ZI-62 for geb-bug-gnu-emacs@m.gmane.org; Wed, 20 May 2009 21:32:09 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M6x8e-0007Ws-Ca for bug-gnu-emacs@gnu.org; Wed, 20 May 2009 21:32:04 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M6x8a-0007RE-IN for bug-gnu-emacs@gnu.org; Wed, 20 May 2009 21:32:04 -0400 Original-Received: from [199.232.76.173] (port=36248 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M6x8a-0007R9-Eh for bug-gnu-emacs@gnu.org; Wed, 20 May 2009 21:32:00 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:38860) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1M6x8Z-0005UZ-RG for bug-gnu-emacs@gnu.org; Wed, 20 May 2009 21:32:00 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n4L1VvXf030122; Wed, 20 May 2009 18:31:57 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id n4L1K5QV026102; Wed, 20 May 2009 18:20:05 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Kenichi Handa Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Thu, 21 May 2009 01:20:05 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 2667 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 2667-submit@emacsbugs.donarmstrong.com id=B2667.124286854925197 (code B ref 2667); Thu, 21 May 2009 01:20:05 +0000 Original-Received: (at 2667) by emacsbugs.donarmstrong.com; 21 May 2009 01:15:49 +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.13.8/8.13.8/Debian-3) with ESMTP id n4L1FeT4025185 for <2667@emacsbugs.donarmstrong.com>; Wed, 20 May 2009 18:15:42 -0700 Original-Received: from rqsmtp1.aist.go.jp (rqsmtp1.aist.go.jp [150.29.254.115]) by mx1.aist.go.jp with ESMTP id n4L1FdjW012370; Thu, 21 May 2009 10:15:39 +0900 (JST) env-from (handa@m17n.org) Original-Received: from smtp1.aist.go.jp by rqsmtp1.aist.go.jp with ESMTP id n4L1FcnH019250; Thu, 21 May 2009 10:15:38 +0900 (JST) env-from (handa@m17n.org) Original-Received: by smtp1.aist.go.jp with ESMTP id n4L1FbQd029610; Thu, 21 May 2009 10:15:37 +0900 (JST) env-from (handa@m17n.org) Original-Received: from handa by etlken with local (Exim 4.69) (envelope-from ) id 1M6wt2-0001YM-IL; Thu, 21 May 2009 10:15:56 +0900 In-reply-to: (message from Stefan Monnier on Wed, 20 May 2009 15:43:00 -0400) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Wed, 20 May 2009 21:32:04 -0400 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:28054 Archived-At: In article , Stefan Monnier writes: > > But, if we can use this heuristic: > > X fonts that have the same property values except for > > size related properties supports the same set of > > characters on all display. For example, all these fonts [...] > That assumption is obviously not guaranteed to hold, and I > don't think it really holds in practice, but it looks like > an acceptable tradeoff, since the cases where it doesn't > hold shouldn't be too frequent. So, you mean that we should install that change, right? > > -static Lisp_Object xfont_list_pattern P_ ((Lisp_Object, Display *, char *)); > > +static int xfont_chars_supported P_ ((Lisp_Object, XFontStruct *, > > + struct charset *, struct charset *)); > Please just use ANSI-style declarations rather than K&R in new code. Ah, I didn't realize that we switched to ANSI-style. > > + /* Two special cases to avoid opening rather big fonts. */ > > + if (AREF (props, 2), Qja) > > + return Fcons (intern ("kana"), Fcons (intern ("han"), Qnil)); > > + if (AREF (props, 2), Qko) > > + return Fcons (intern ("hangul"), Qnil); > You need EQ (..) around those two tests. Of course, sorry for the incorrect patch. > > + if (NILP (val)) > > + script = Qnil; > > + else > > + script = XCDR (val); > Aka: script = CDR (val); Ok. I didn't know CDR macro. > > + if (! repertory && NILP (xfont_scripts_cache)) > > + { > > + Lisp_Object args[2]; > > + > > + args[0] = QCtest; > > + args[1] = Qequal; > > + xfont_scripts_cache = Fmake_hash_table (2, args); > > + } > [...] > > @@ -996,6 +1173,8 @@ > > void > > syms_of_xfont () > > { > > + staticpro (&xfont_scripts_cache); > > + xfont_scripts_cache = Qnil; > > xfont_driver.type = Qx; > > register_font_driver (&xfont_driver, NULL); > > } > Why not just: > @@ -996,6 +1173,8 @@ > void > syms_of_xfont () > { > + staticpro (&xfont_scripts_cache); > + { > + Lisp_Object args[2]; > + args[0] = QCtest; > + args[1] = Qequal; > + xfont_scripts_cache = Fmake_hash_table (2, args); > + } > xfont_driver.type = Qx; > register_font_driver (&xfont_driver, NULL); > } I usually hesitate using a Lisp symbol Qxxxx in syms_of_XXX if I don't know where it is initialized, and wanted to avoid increasing the temacs size where possible. --- Kenichi Handa handa@m17n.org