Subject: bug#19482: Changing to big font cause display problem

From: martin rudalics <[email-masked]>
Date: Fri, 20 Feb 2015 19:21:50 +0100

> ----------------------------- (1) before issuing (set-frame-font "Menlo:size=30") ------------------------------------
> frame pixel: 874 x 669   cols/lines: 87 x 35   units: 10 x 19
> frame text pixel: 850 x 665   cols/lines: 85 x 35
> tool: 0  scroll: 0  fringe: 20  border: 2  right: 0  bottom: 0
[...]
> ----------------------------- (2) after issuing (set-frame-font "Menlo:size=30") ----------------------
> frame pixel: 1552 x 1194   cols/lines: 86 x 35   units: 18 x 34
> frame text pixel: 1530 x 1190   cols/lines: 85 x 35
> tool: 0  scroll: 0  fringe: 18  border: 2  right: 0  bottom: 0
[...]
> -------------------------- (3) after resizing the frame ----------------------
> frame pixel: 1392 x 840   cols/lines: 77 x 24   units: 18 x 34
> frame text pixel: 1370 x 836   cols/lines: 76 x 24
> tool: 0  scroll: 0  fringe: 18  border: 2  right: 0  bottom: 0
[...]
> My screen resolution is 1440x900.

IIUC this means that Emacs tries in `set-frame-font' to make your frame
larger than your display which sounds like a bad idea.

Try first to make the frame smaller before you call `set-frame-font'
such that the resizing step in that function stays within the limits of
the display and see whether the problem persists.

Next try instead of (3) to maximize the frame and then restore its
normal size, that is, the one after `set-frame-font', and see whether
the problem persists (here I would simply type M-F10 twice).

Finally, set the variable `frame-inhibit-implied-resize' to t, call
`set-frame-font' and see whether the problem persists.

martin