"Ehud Karni" <[EMAIL PROTECTED]> writes: > On 06 May 2005 17:40:41 +0200, Mathias Dahl wrote: >> >> (defun window-height-pixels () >> (let ((line-pixel-height-ratio (/ (+ (frame-pixel-height) 0.0) >> (frame-height)))) >> (truncate (* (window-height) line-pixel-height-ratio)))) >> >> (defun window-width-pixels () >> (let ((column-pixel-width-ratio (/ (+ (frame-pixel-width) 0.0) >> (frame-width)))) >> (truncate (* (window-width) column-pixel-width-ratio)))) > > I think that `frame-char-height' and `frame-char-width' is what you > are looking for. > > I use the following to change the font without resizing the frames. This uses > only the `editable' part of the frame - without the border and menus areas. > > (defun set-font-keep-size (font) > "set font to use, keep window size" > (let ((fht (* (frame-parameter nil 'height) (frame-char-height))) > (fwd (* (frame-parameter nil 'width) (frame-char-width)))) > (set-default-font font) > (set-frame-value-all 'font font) > (set-frame-value-all 'height (/ fht (frame-char-height))) > (set-frame-value-all 'width (/ fwd (frame-char-width))))) > > `set-frame-value-all is my function to set a value on all frames.
That seems to be exactly what I wanted. Strange I missed it. I will try using that instead and see how it works. Thanks! /Mathias _______________________________________________ Help-gnu-emacs mailing list Help-gnu-emacs@gnu.org http://lists.gnu.org/mailman/listinfo/help-gnu-emacs