emacs-devel
[Top][All Lists]
Advanced

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

Re: Variable-width font indentation (was: What improvements would be tru


From: Eli Zaretskii
Subject: Re: Variable-width font indentation (was: What improvements would be truly useful?)
Date: Mon, 05 Mar 2018 21:58:21 +0200

> Date: Mon, 5 Mar 2018 11:32:30 -0800
> From: address@hidden
> Cc: address@hidden,
>  address@hidden,
>  address@hidden,
>  address@hidden,
>  address@hidden
> 
> Well, say you want to align the following code:
> 
> 1: void foo(int a,
> 2:          int b)
> 3: {
> 4:  ...
> 
> How is any generic indentation system supposed to know that the "i" on
> line 2 is supposed to line up with the "i" on line 1?

How does it know that today, when we only support well the fixed-pitch
fonts?  Or are you talking about a different problem?

> You'd need to communicate all indentation intent to the generic
> system in the form of positions relative to some
> anchor. (Presumably, it could cache pixel offsets per-line.) While
> that's doable, it's a ton of work, and I don't think it's
> worthwhile.

Maybe I still misunderstand you, but the pixel position of a character
on display is trivial to obtain, and I see no reason why we'd need to
cache them.  Again, the current fixed-pitch column-wise indentation
machinery doesn't, AFAIK.



reply via email to

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