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#4895: 23.1; Incorrect font selected Date: Mon, 09 Jul 2012 19:41:20 +0300 Message-ID: <83d344lwen.fsf@gnu.org> References: <5f0660120911092215v48f00477l5f2c68855507ab4b@mail.gmail.com> <87hbt1siju.fsf@mail.jurta.org> <87wr2d33og.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: dough.gmane.org 1341852125 13865 80.91.229.3 (9 Jul 2012 16:42:05 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 9 Jul 2012 16:42:05 +0000 (UTC) Cc: 4895@debbugs.gnu.org, cmr.pent@gmail.com, handa@m17n.org To: Chong Yidong Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jul 09 18:42:02 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 1SoH26-0004tH-Oh for geb-bug-gnu-emacs@m.gmane.org; Mon, 09 Jul 2012 18:41:58 +0200 Original-Received: from localhost ([::1]:52505 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SoH25-0000ts-RV for geb-bug-gnu-emacs@m.gmane.org; Mon, 09 Jul 2012 12:41:57 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:47590) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SoH1x-0000sU-W1 for bug-gnu-emacs@gnu.org; Mon, 09 Jul 2012 12:41:55 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SoH1w-0002Jb-29 for bug-gnu-emacs@gnu.org; Mon, 09 Jul 2012 12:41:49 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:48814) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SoH1v-0002JV-Uu for bug-gnu-emacs@gnu.org; Mon, 09 Jul 2012 12:41:47 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SoH71-0006iP-3u for bug-gnu-emacs@gnu.org; Mon, 09 Jul 2012 12:47:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 09 Jul 2012 16:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 4895 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 4895-submit@debbugs.gnu.org id=B4895.134185241325786 (code B ref 4895); Mon, 09 Jul 2012 16:47:02 +0000 Original-Received: (at 4895) by debbugs.gnu.org; 9 Jul 2012 16:46:53 +0000 Original-Received: from localhost ([127.0.0.1]:58356 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SoH6q-0006hr-U9 for submit@debbugs.gnu.org; Mon, 09 Jul 2012 12:46:53 -0400 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:63155) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SoH6m-0006hh-6W for 4895@debbugs.gnu.org; Mon, 09 Jul 2012 12:46:50 -0400 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0M6W00J00JP0WS00@a-mtaout22.012.net.il> for 4895@debbugs.gnu.org; Mon, 09 Jul 2012 19:41:29 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.210.75]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0M6W00IF9JP4PUQ0@a-mtaout22.012.net.il>; Mon, 09 Jul 2012 19:41:29 +0300 (IDT) In-reply-to: <87wr2d33og.fsf@gnu.org> X-012-Sender: halo1@inter.net.il 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:61764 Archived-At: > From: Chong Yidong > Date: Mon, 09 Jul 2012 13:26:55 +0800 > Cc: 4895@debbugs.gnu.org, cmr.pent@gmail.com, Kenichi Handa > > Also, where in the code does this > > >> when you read a file with cp1251, the charset property > >> `cp1251' is put on the buffer text. Thus the font-selector > >> prefers a font whose registry is "microsoft-cp1251". > > occur? decode_coding calls produce_annotation that calls produce_charset, which puts the 'charset' text property on the decoded text. Then font_for_char uses this property to get the charset ID with which it calls fontset_font, which in turn calls fontset_find_font, which prefers fonts whose repertory matches that ID. > I took a quick look at the documentation, e.g. the docstring of > new-fontset, and couldn't find the explanation of how the > font-selector chooses the font to use from the list of font > specifications. If the list of font specifications is not given in > order of priority, that should be clearly explained somewhere. The documentation of fontset stuff could use a lot of improvement.