Stef Epardaud <stef(a)lunatech.com> writes:
> Use `window-height' to get consistent results in geometry
> calculations.
> Use `window-displayed-height' to get the actual number of lines
> currently displayed in a window.
>
> and it says that it is not taking the line-ascent at all, in
> window-height.
> and window-displayed-height does return the correct amount of lines,
> taking the line-ascent into account.
>
> is that a non-bug ?
The reason that window-displayed-height actually counts the number of
lines so it always right. However the reason they normally differ is
that on XEmacs where you can have several different kind of glyphs and
face, all lines can differ in height. window-displayed-height takes
that into account, and thus the result can change if you are viewing a
different part of the buffer.
However window-height simply assumes a "standard line height" (namely
the height of the default face in that locale). Using this call:
default_face_height_and_width (window, &defheight, &defwidth);
Thus it can and will be "wrong", but the result doesn't depend on where
you are in the buffer, i.e. it is more consistent. The problem is that
default_face_height_and_width doesn't take minimum-line-ascent/descent
into account but it probably should.
So either
1. The "standard line height" shouldn't depend on the buffer/window.
Then current default_face_height_and_width shouldn't take into
account the window locale either.
2. Like it is now the "standard line height" does depend on
buffer/window, but then it should take
minimum-line-ascent/descent into account.
Jan