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#17813: 24.3.91; bad linum display with `text-scale-adjust' Date: Fri, 20 Jun 2014 17:27:57 +0300 Message-ID: <83tx7fr6z6.fsf@gnu.org> References: <37CF8BE3769E04shigeru.fukaya@gmail.com> <838uosrkql.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1403274566 20138 80.91.229.3 (20 Jun 2014 14:29:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 20 Jun 2014 14:29:26 +0000 (UTC) Cc: shigeru.fukaya@gmail.com, 17813@debbugs.gnu.org, miles@gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jun 20 16:29:20 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 1Wxzob-00037y-PP for geb-bug-gnu-emacs@m.gmane.org; Fri, 20 Jun 2014 16:29:17 +0200 Original-Received: from localhost ([::1]:41372 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wxzob-0000sj-BQ for geb-bug-gnu-emacs@m.gmane.org; Fri, 20 Jun 2014 10:29:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49744) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WxzoR-0000kH-VK for bug-gnu-emacs@gnu.org; Fri, 20 Jun 2014 10:29:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WxzoM-0004nX-Me for bug-gnu-emacs@gnu.org; Fri, 20 Jun 2014 10:29:07 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:35452) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WxzoM-0004nJ-JG for bug-gnu-emacs@gnu.org; Fri, 20 Jun 2014 10:29:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WxzoL-0002Qr-Tq for bug-gnu-emacs@gnu.org; Fri, 20 Jun 2014 10:29:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 20 Jun 2014 14:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17813 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 17813-submit@debbugs.gnu.org id=B17813.14032744999296 (code B ref 17813); Fri, 20 Jun 2014 14:29:01 +0000 Original-Received: (at 17813) by debbugs.gnu.org; 20 Jun 2014 14:28:19 +0000 Original-Received: from localhost ([127.0.0.1]:54835 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Wxznf-0002Pq-3Z for submit@debbugs.gnu.org; Fri, 20 Jun 2014 10:28:19 -0400 Original-Received: from mtaout27.012.net.il ([80.179.55.183]:36677) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Wxznc-0002Pb-P8 for 17813@debbugs.gnu.org; Fri, 20 Jun 2014 10:28:17 -0400 Original-Received: from conversion-daemon.mtaout27.012.net.il by mtaout27.012.net.il (HyperSendmail v2007.08) id <0N7H00O001CINO00@mtaout27.012.net.il> for 17813@debbugs.gnu.org; Fri, 20 Jun 2014 17:25:01 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout27.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N7H00E4R1DP3LA0@mtaout27.012.net.il>; Fri, 20 Jun 2014 17:25:01 +0300 (IDT) In-reply-to: X-012-Sender: halo1@inter.net.il 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:90591 Archived-At: > From: Stefan Monnier > Cc: shigeru.fukaya@gmail.com, 17813@debbugs.gnu.org, miles@gnu.org > Date: Fri, 20 Jun 2014 09:35:32 -0400 > > >> I think the right solution is to scale the margin width by the ratio > >> "linum font size / base font size". Then users can set their `linum' > >> face the way want and choose between (1) and (2). > >> But it turns out that face-attribute can't be used for that because it > >> does not pay attention to face-remapping-alist. > > Not sure what you mean by that: attributes don't care about remapping, > > because remapping doesn't change the attributes, it only changes their > > values. > > I mean the following: > > a way to know "if I apply face `foo' (and only face `foo') to a chunk > of text in the current buffer, what will it look like: will it be bold? > what will be its size? ..." > > `face-attribute' doesn't work here because it fails to take into account > the effect of face-remapping-alist. APIs that need to take face remapping into account need to be specifically programmed to do that. Some were, some weren't; face-font belongs to the former. > > (aref (font-info (face-font 'default)) 2) > > Indeed, that seems to work, thanks. > > > But note that font's size and its "width" (which is actually the > > average width recorded in the font file) are not identical. We don't > > have a Lisp API to get the average width of a non-default font; > > Indeed, that's an additional problem. > > > perhaps we should. > > I'm all for it. Would it be OK to add that as the last element to the array returned by font-info?