From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Native line numbers, final testing Date: Mon, 10 Jul 2017 05:31:18 +0300 Message-ID: <8337a5ja4p.fsf@gnu.org> References: <83y3s9pm2a.fsf@gnu.org> <87vandz7lw.fsf@lylat> <83wp7tpcav.fsf@gnu.org> <87r2y1z45o.fsf@lylat> <83vandp7wz.fsf@gnu.org> <87mv8pyy7f.fsf@lylat> <83shigpoxq.fsf@gnu.org> <87mv8nkh31.fsf@lylat> <83bmp3pnmb.fsf@gnu.org> <87eftzju5g.fsf@lylat> <837ezqq3gd.fsf@gnu.org> <874luuyuqy.fsf@lylat> <83wp7po86m.fsf@gnu.org> <87fuecc7vg.fsf@lylat> <83y3s2n5pa.fsf@gnu.org> <878tk1rmjx.fsf@lylat> <83a84gn4z9.fsf@gnu.org> <837ezkmwfg.fsf@gnu.org> <874lumps82.fsf@lylat> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1499653906 28561 195.159.176.226 (10 Jul 2017 02:31:46 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 10 Jul 2017 02:31:46 +0000 (UTC) Cc: emacs-devel@gnu.org To: James Cloos Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jul 10 04:31:37 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dUOU2-0006ki-2O for ged-emacs-devel@m.gmane.org; Mon, 10 Jul 2017 04:31:34 +0200 Original-Received: from localhost ([::1]:38181 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dUOU5-0005Ul-P3 for ged-emacs-devel@m.gmane.org; Sun, 09 Jul 2017 22:31:37 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49662) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dUOTx-0005TU-8X for emacs-devel@gnu.org; Sun, 09 Jul 2017 22:31:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dUOTs-0006QG-Re for emacs-devel@gnu.org; Sun, 09 Jul 2017 22:31:29 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:32812) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dUOTs-0006QC-O1; Sun, 09 Jul 2017 22:31:24 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3998 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dUOTs-0006Ee-0N; Sun, 09 Jul 2017 22:31:24 -0400 In-reply-to: (message from James Cloos on Sun, 09 Jul 2017 16:16:23 -0400) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:216385 Archived-At: > From: James Cloos > Cc: Eli Zaretskii > > Having re-compiled master, I tried out the native line numbers, by > chance in a buffer in variable-pitch-mode. It looks like the display > uses SPACE (U+20) or SPACE's width to offset the digits. > > It would look better if it used FIGURE SPACE (U+2007) or FIGURE SPACE's > width instead. Then the line numbers would, err, line up. The doc string for the 'line-number' face explicitly tells to use fixed-pitch font for the face. Making the numbers line up is impossible with the current algorithm of producing the glyphs for the numbers on the fly, without knowing the width of the line-number display on any other lines shown in the window. > The code might need to check whether the current face provides a glyph > for FIGURE SPACE. And if not? > Alternatively, use the width of one of the digits (such as DIGIT EIGHT) > to determine how many pixels to skip. Variable-pitch fonts can have different digits take different width. So I don't think I understand how this could work. What am I missing? > Otherwise, it looks and works great. Thanks.