bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#20022: 24.4.90; window-body-height, window-body-width wrong value af


From: martin rudalics
Subject: bug#20022: 24.4.90; window-body-height, window-body-width wrong value after text-scale-adjust
Date: Sat, 07 Mar 2015 10:41:23 +0100

> After text-scale-adjust [C-x C-] window-height and window-width return
> the old (original) value.

Because it did not change.

> The doc says:
>
>   This function returns the height, in lines, of the body of window
>   WINDOW.
>
> So at least the docs are imprecise or incomplete.

Here the doc also says:

  If WINDOW's pixel height is not an integral multiple of its frame's
  character height, the number of lines occupied by WINDOW is rounded
  internally.  This is done in a way such that, if WINDOW is a parent
  window, the sum of the total heights of all its children internally
  equals the total height of WINDOW.

  If the optional argument ROUND is `ceiling', return the smallest
  integer larger than WINDOW's pixel height divided by the character
  height of WINDOW's frame.  ROUND `floor' means to return the largest
  integer smaller than WINDOW's pixel height divided by the character
  height of WINDOW's frame.  Any other value of ROUND means to return
  the internal total height of WINDOW.

> Relatedly, there seems to be no way to determine the height/width of a
> character in pixels after rescaling. `frame-char-width` returns the
> original size.

Because IIUC the values might differ according to the window where the
character is displayed.  I don't know how to get the value you want.
ISTR that someone is currently working on this.

martin





reply via email to

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