emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Native line numbers, final testing


From: Eli Zaretskii
Subject: Re: Native line numbers, final testing
Date: Mon, 10 Jul 2017 05:31:18 +0300

> From: James Cloos <address@hidden>
> Cc: Eli Zaretskii <address@hidden>
> 
> 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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]