1

As this question illustrates, it is possible to increase the font size in an emacs frame, not just a buffer.

Unfortunately, the solutions there also increase the size of the frame itself.

Consider the following use case. A few people are sitting side-by-side. Once in a while, two or more get together in front of one workstation to discuss something. It is then nice to increase the font size while keeping the size of the frame still, which makes it easy to resume individual work afterwards. How would you do this?

Community
  • 1
  • 1
Calaf
  • 10,113
  • 15
  • 57
  • 120
  • Changing the font size in one window, or all windows in a frame, should *not* necessarily change the size of the window or the size of the frame. If the size of your window or the size of your frame is changing, it should be very easy to find out why and remove that portion of the code. – lawlist Jul 16 '14 at 15:44
  • @lawlist: Calaf is talking about zooming a frame, not scaling a buffer's font. That means changing the default font for the frame, which does change the frame size (proportionately). This is actually a useful feature. – Drew Jul 16 '14 at 15:46
  • 1
    @Drew: Ah . . . Thank you for helping me understand the difference between the two. – lawlist Jul 16 '14 at 15:48
  • 1
    @lawlist [*This page*](http://www.emacswiki.org/emacs/SetFonts#ChangingFontSize) explains the difference a little more. – Drew Jul 16 '14 at 16:15

1 Answers1

1

Zooming the frame font does automatically change the frame size. This is a feature (allowing you to save screen space when you reduce the size, for example. But it is understandable that sometimes one would like to keep the size the same.

You can (1) get the current frame size (from frame-parameters) before zooming and then (2) resize the frame back to that size, after zooming. Do that in a function that you use as a command or perhaps in a hook.

You can also just change the frame size incrementally (see the same page or see frame-cmds.el), or tile frames to fit the screen etc.

Drew
  • 29,895
  • 7
  • 74
  • 104