I was trying to figure this out and I found the functions on how to set the pixels for a frame to start. I found this but appears to be for windows and couldn't get it working right: http://www.gnu.org/software/emacs/windows/old/faq4.html. May just have been my ignorance for writing lisp code. I wanted to use x-display-pixel-height and then half of x-display-pixel-width to set the frame sizes. Does anyone have code that does something similar or know how to correctly implement this. This is so on different systems it always sets it to have the size.
This should set the frame size to approximately the right size:
(set-frame-height (selected-frame) (/ (display-pixel-height) (frame-char-height))) (set-frame-width (selected-frame) (/ (/ (display-pixel-width) 2) (frame-char-width)))
Unfortunately, as the documentation for frame-height
states, the relationship between frame pixel height and line height is only approximate:
The result is roughly related to the frame pixel height via height in pixels = height in lines * `frame-char-height'. However, this is only approximate, and is complicated e.g. by the fact that individual window lines and menu bar lines can have differing font heights.