[Top][All Lists]

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

bug#15886: 24.3.50; Incorrect window-text-height with non-zero line-spac

From: Eli Zaretskii
Subject: bug#15886: 24.3.50; Incorrect window-text-height with non-zero line-spacing
Date: Thu, 14 Nov 2013 05:44:30 +0200

> From: Robert Dallas Gray <address@hidden>
> Date: Wed, 13 Nov 2013 21:27:35 +0000
> Cc: address@hidden
> > The argument passed to 'set-window-text-height' should be scaled by
> > the ratio of the values returned by 'frame-char-height' and
> > 'default-line-height'.  (By default, this ratio is 1, but in your case
> > it will be different.)  The result of scaling should then be rounded
> > up to the nearest integer.
> > 
> OK, but that doesn't really achieve the aim of setting the height of the 
> window *exactly* in terms of the height of an individual line of text ... in 
> the case I'm describing, where the number of lines displayed is changing 
> dynamically, the baseline is going to bounce around because the window isn't 
> being sized accurately.

In a GUI session, a window's height can never be set exactly to the
size of the text, because that size is not constant, it varies
depending on what characters, fonts, and faces (bold etc.) are used
for displaying the text.  Change the text displayed in the window, and
the exact size in pixel changes.

So the goal is to make the window high enough to show all the text you
need to see; any other goal is not attainable _in_principle_, and it
is IMO futile to try to pursue it.

Or maybe I don't understand what "bouncing" you describe.  Can you
give an example?

reply via email to

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