[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Implement functions for measuring fonts and max chars per li
From: |
Perry E. Metzger |
Subject: |
Re: [PATCH] Implement functions for measuring fonts and max chars per line |
Date: |
Sun, 18 Jan 2015 21:56:43 -0500 |
On Sun, 18 Jan 2015 16:38:01 -0800 (PST) Drew Adams
<address@hidden> wrote:
> > What I want is to know (by calculation) what the maximum height,
> > in lines, happens to be so I can shove that in for 'height in
> > default-frame-alist. (There are other uses for such information of
> > course, see above.)
>
> The max height in pixels is `x-display-pixel-height'.
>
> Divide that by the value returned by `frame-char-height' for your
> frame, or by whatever character height you intend to use, if
> you know it, to find the number of lines possible for the display.
>
> But that does not count the space needed for these things:
>
> 1. menu-bar - you can approximate this by
> `(frame-parameter nil 'menu-bar-lines)'.
>
> 2. tool-bar - similar: `tool-bar-lines'.
>
> 3. height of the window-mgr title bar and bottom border.
>
> 4. any other window-mgr stuff that is outside Emacs's
> visibility & control.
>
> So proceeding this way you need to do a little estimating,
> especially wrt window-mgr stuff.
I've played these games before, and it is a reasonable stop-gap for
what I'm trying to do, at least much of the time.
What would be nice would be the addition of a function that told one
the true maximum number of lines possible for a frame on the given
display, *or* if there was a non-integer value you could specify for
the "height" component of the frame-alist that simply meant "as much
as possible". (Both might actually be nice things to have.)
--
Perry E. Metzger address@hidden
- Re: [PATCH] Implement functions for measuring fonts and max chars per line, (continued)
- Re: [PATCH] Implement functions for measuring fonts and max chars per line, Perry E. Metzger, 2015/01/17
- Re: [PATCH] Implement functions for measuring fonts and max chars per line, David Kastrup, 2015/01/17
- Re: [PATCH] Implement functions for measuring fonts and max chars per line, Perry E. Metzger, 2015/01/17
- Re: [PATCH] Implement functions for measuring fonts and max chars per line, Perry E. Metzger, 2015/01/17
- Re: [PATCH] Implement functions for measuring fonts and max chars per line, Michael Heerdegen, 2015/01/17
- Re: [PATCH] Implement functions for measuring fonts and max chars per line, Eli Zaretskii, 2015/01/17
- Re: [PATCH] Implement functions for measuring fonts and max chars per line, Perry E. Metzger, 2015/01/17
- Re: [PATCH] Implement functions for measuring fonts and max chars per line, Eli Zaretskii, 2015/01/18
- Re: [PATCH] Implement functions for measuring fonts and max chars per line, Perry E. Metzger, 2015/01/18
- RE: [PATCH] Implement functions for measuring fonts and max chars per line, Drew Adams, 2015/01/18
- Re: [PATCH] Implement functions for measuring fonts and max chars per line,
Perry E. Metzger <=
- Re: [PATCH] Implement functions for measuring fonts and max chars per line, Eli Zaretskii, 2015/01/18
- Re: [PATCH] Implement functions for measuring fonts and max chars per line, Perry E. Metzger, 2015/01/19
- Re: [PATCH] Implement functions for measuring fonts and max chars per line, Eli Zaretskii, 2015/01/19
- Re: [PATCH] Implement functions for measuring fonts and max chars per line, Perry E. Metzger, 2015/01/19
- Re: [PATCH] Implement functions for measuring fonts and max chars per line, Michael Heerdegen, 2015/01/18
- Re: [PATCH] Implement functions for measuring fonts and max chars per line, Eli Zaretskii, 2015/01/18