From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#17813: 24.3.91; bad linum display with `text-scale-adjust' Date: Fri, 20 Jun 2014 09:35:32 -0400 Message-ID: References: <37CF8BE3769E04shigeru.fukaya@gmail.com> <838uosrkql.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1403271394 12336 80.91.229.3 (20 Jun 2014 13:36:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 20 Jun 2014 13:36:34 +0000 (UTC) Cc: shigeru.fukaya@gmail.com, 17813@debbugs.gnu.org, miles@gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jun 20 15:36:27 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 1WxyzR-0007ak-FA for geb-bug-gnu-emacs@m.gmane.org; Fri, 20 Jun 2014 15:36:25 +0200 Original-Received: from localhost ([::1]:40936 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WxyzQ-0006Dx-KZ for geb-bug-gnu-emacs@m.gmane.org; Fri, 20 Jun 2014 09:36:24 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60177) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WxyzD-0005y5-Cs for bug-gnu-emacs@gnu.org; Fri, 20 Jun 2014 09:36:19 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wxyz4-0007wf-ST for bug-gnu-emacs@gnu.org; Fri, 20 Jun 2014 09:36:11 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:34502) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wxyz4-0007wa-ID for bug-gnu-emacs@gnu.org; Fri, 20 Jun 2014 09:36:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Wxyz4-00087e-0d for bug-gnu-emacs@gnu.org; Fri, 20 Jun 2014 09:36:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 20 Jun 2014 13:36: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.140327135131200 (code B ref 17813); Fri, 20 Jun 2014 13:36:01 +0000 Original-Received: (at 17813) by debbugs.gnu.org; 20 Jun 2014 13:35:51 +0000 Original-Received: from localhost ([127.0.0.1]:53884 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Wxyyo-00086y-9G for submit@debbugs.gnu.org; Fri, 20 Jun 2014 09:35:51 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:54601) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Wxyyg-00086f-8h for 17813@debbugs.gnu.org; Fri, 20 Jun 2014 09:35:42 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArYGAIDvNVNLd+D9/2dsb2JhbABZgwaDSr0vgw6BFxd0giUBAQEBAgFWIwULCy0HEhQYDSQuh1YI0hkXjnoHCoQuBKkZgWqDTCE X-IPAS-Result: ArYGAIDvNVNLd+D9/2dsb2JhbABZgwaDSr0vgw6BFxd0giUBAQEBAgFWIwULCy0HEhQYDSQuh1YI0hkXjnoHCoQuBKkZgWqDTCE X-IronPort-AV: E=Sophos;i="4.97,753,1389762000"; d="scan'208";a="68731732" Original-Received: from 75-119-224-253.dsl.teksavvy.com (HELO pastel.home) ([75.119.224.253]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 20 Jun 2014 09:35:32 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 5A5BE60D09; Fri, 20 Jun 2014 09:35:32 -0400 (EDT) In-Reply-To: <838uosrkql.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 20 Jun 2014 12:30:42 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) 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:90586 Archived-At: >> 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. >> Miles, Eli, others, do you know of a function that returns "the font >> size, including face-remapping-alist effects"? > I think you want > (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. Stefan