Monospaced font & maximization

Carlos Pita <[email protected]> Thu, 28 Oct 2004 11:58:44 -0300
Newsgroups gmane.emacs.xemacs.general
Message-ID <[email protected]>
Hi!

I want to use a monospaced font which, as most monospaced fonts, has no italic / bold variants. Also, I want
to start xemacs in a maximized frame.

Alternative 1:
---------------------

Configure fonts and geometry (for the maximized frame) in .Xresources. I really don't care about the variants,
I want straight medium fonts everywhere. But if I don't specify fonts for italic and bold variants I get 
those ugly warnings about deducing proper fonts at startup. Yeah, I know from the FAQ that I can get
rid of them just adding (setq display-warning-minimum-level 'error) to my init.el. But as I dislike 
warnings, even hidden ones, I prefer to configure resources for the varians, for example:

Emacs.default.attributeFont: -monotype-andale mono-medium-r-normal--0-120-0-0-m-0-iso8859-1
Emacs.bold.attributeFont: -adobe-courier-*-*-*-*-*-120-*-*-*-*-iso8859-1
Emacs.italic.attributeFont: -adobe-courier-*-*-*-*-*-120-*-*-*-*-iso8859-1
Emacs.bold-italic.attributeFont: -adobe-courier-*-*-*-*-*-120-*-*-*-*-iso8859-1

Alternative 2:
---------------------

Do everything in elisp inside init.el.

First, I set my monospaced font for the default face, for example (cut&pasted 
from custom.el to init.el):

  (custom-set-faces
    '(default ((t (:size "12pt" :family "Andale Mono" nil nil)))))

Then I maximize the frame. I have tried with the following 2 variants:

A)
  (let ((width 111) (height 36))
    (set-frame-position nil 0 0)
    (set-frame-size nil width height)
    (setq default-frame-plist ('top 0 'left 0 'width width height height)))

B)
  (let ((geometry '(top 0 left 0 height 36 width 111)))
    (setq initial-frame-plist geometry)
    (setq default-frame-plist geometry))

Neither works. It's strange, but I have to click over the frame to get it instantly resized. It's about the same effort as
clicking the window maximize button.

Alternative 3:
---------------------

Calculate the maximized geometry for the "uncustomized" font (I mean the default font for the 'default face),
then change to the customized font in init.el. The idea is: if the window was correctly maximized at startup,
well, just change the font and that's all. But when the font is changed the window is resized in a way
I can't predict .


Well, every enumerated option sounds to me like a kludge. Can you suggest a nice fourth one?

Thank you in advance.
Regards.
Carlos.