5

I'm so close to getting two 80-char vertical buffers side by side on a 1366px wide monitor. I've got a cool frame font,

(set-frame-font (font-spec :family "Monkey" :size 20 :antialias nil))

I've removed my scrollbars, set my fringe to 1px width, and my line numbers to dynamic.

I'm one column away from editing heaven. The thing is, my eyes can't handle the tiny fonts anymore, so I can't go down to size 19. I tried setting 19.5, but it just made the font larger.

How can I set a fractional font size in Emacs?


Environment:

  • Ubuntu 14.04 amd64
  • Emacs 24.3.1, installed from package
2
  • 9
    Some people gawk at this, but I find line numbers pretty useless. When do you actually need them? Many debuggers can parse and jump straight to errors. If you need to go to a certain line, looking at the numbers is pretty slow, I'd rather just type M-g M-g 123 RET. Most people have the current line in the mode line anyway. That's just my opinion: I don't miss them. Maybe that might help you get another couple columns.
    – nanny
    Commented Dec 3, 2014 at 16:11
  • Wow, that's really efficient. At the moment it's nice when showing code on a projector, but I'll keep that shortcut in mind. Commented Dec 3, 2014 at 22:44

1 Answer 1

6

I am not sure if that's the problem you are having but this reminded my of a problem I've had for like ten years. Emacs did not accept the size asigned to its frames (e.g. X11 windows) by the windowing system (e.g. X11) and reduced the size based on the proportions of the font used for the default face. When using a tiling window manager that then results in extra pixels to the right or below the Emacs frame.

Not anymore. Install version 24.4 of Emacs and set frame-resize-pixelwise to t.

3
  • I'll play around with it and see. Thanks. Commented Dec 30, 2014 at 21:43
  • Where does the extra space go? Is there space left on the right and bottom if the size of the frame is not a multiple of the character width/height?
    – spelufo
    Commented Apr 19, 2015 at 15:08
  • The main window area - so you might get characters that are only partially visible on the right (left to the right fringe) and bottom (above the mode-line) "window edges".
    – tarsius
    Commented Apr 19, 2015 at 15:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.