emacs-devel
[Top][All Lists]
Advanced

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

Re: Pixel-based display functions


From: Eli Zaretskii
Subject: Re: Pixel-based display functions
Date: Sun, 01 Feb 2015 19:31:43 +0200

> Date: Sun, 01 Feb 2015 17:30:27 +0100
> From: martin rudalics <address@hidden>
> CC: address@hidden, address@hidden, address@hidden
> 
>  > Maybe I misunderstand what Lars wants to do, but I think
>  > window-text-pixel-size is the wrong tool for the job: it returns the
>  > pixel size of text between 2 given positions, whereas Lars needs the
>  > opposite: where is the position that produces a given pixel size.
> 
> That's possible.  But `window-text-pixel-size' would give him a way to
> precalculate the sizes of chunks of his text and allow him to manually
> insert linebreaks for each column.

The problem, as I understand it, is to find the place where to insert
these breaks, when column text is wider than the column.  And
window-text-pixel-size cannot tell you that, it can only tell whether
the chunk of text fits or not.

>  > Also, there's the visual vs logical order issue I mentioned in my
>  > other mail.
> 
> If `window-text-pixel-size' is kaput in that sense I'll have to fix it
> anyway.

It's not kaput.  The problem happens only if its results are used for
inserting a newline in order to break the line in two.  In all other
use cases, it does exactly TRT.



reply via email to

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