I had to reinstall my OS but I made a backup of my .emacs.d. Then, once the new OS was installed, I copied it back and installed all the fonts. This time however, the scaling is really small! With the same .emacs.d, OS, machine and the fonts my Emacs scaling was fine before. emacs -Q is also tiny. lsb_release -a returns,

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.2 LTS
Release:    20.04
Codename:   focal

Here is how I installed it,

usr@machine:~$ apt policy emacs27
  Installed: 27.1~1.git86d8d76aa3-kk2+20.04
  Candidate: 27.1~1.git86d8d76aa3-kk2+20.04
  Version table:
 *** 27.1~1.git86d8d76aa3-kk2+20.04 500
        500 http://ppa.launchpad.net/kelleyk/emacs/ubuntu focal/main amd64 Packages
        100 /var/lib/dpkg/status

Here is how it looks,

enter image description here

Other people have had this issue and suggested solutions include changes to the init files but I ran this same init file on the same distro and things were fine. So what changed must be outside of my init?


Instead of emacs27, I installed emacs, i.e.,

  Installed: 1:26.3+1-1ubuntu2
  Candidate: 1:26.3+1-1ubuntu2
  Version table:
 *** 1:26.3+1-1ubuntu2 500
        500 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 Packages
        500 http://us.archive.ubuntu.com/ubuntu focal/universe i386 Packages
        100 /var/lib/dpkg/status

This scales fine!

Edit 2:

I am using Iosevka. Note that the with the same font and init file, Emacs from Ubuntu's repositories renders fine.

  • I think you'll probably need to provide more info, including what fonts you are using and whether they are different from what you used before. Be aware too that bitmap fonts don't scale. Also, say specifically what you're doing, to "scale" things.
    – Drew
    Commented Mar 28, 2021 at 23:12
  • I just installed the usual emacs package from the ubuntu repositories and guess what that scales fine but the emacs27 from kelleyk's repository does not scale. I am doing nothing to scale things. It worked out of the box before, like it does with emacs. I am using the same font as I did before, i.e., Iosevka.
    – scribe
    Commented Mar 29, 2021 at 0:07
  • Note that Ubuntu's emacs is at 26.x something.
    – scribe
    Commented Mar 29, 2021 at 0:07
  • Please put all relevant info in the question itself. Comments can be deleted at any time. Thx.
    – Drew
    Commented Mar 29, 2021 at 1:11
  • The "scaling" terminology is very confusing, but the screenshot looks like a very small font for the default face? Have a look at M-x customize-face RET default RET
    – phils
    Commented Mar 29, 2021 at 5:01

1 Answer 1


Well, since I could not find any non-configuration file based solutions, I ended up adding this to my file.

(add-to-list 'default-frame-alist '(width  . 80))
(add-to-list 'default-frame-alist '(height . 24))
(add-to-list 'default-frame-alist ; High DPI Fix
  `(font . ,(let ((dims (nth 1 (frame-monitor-attributes)))
     (m (/ 1.0 388800.0)) (b (/ 23.0 3.0)))
     (format "Iosevka-%d" (+ (* m (nth 3 dims) (nth 4 dims)) b)))))

Replace Iosevka with whatever font you'd like to use. What we are doing here is linearly scaling the font-size y=mx+b where the slope and y-intercept were calculated using points (1920×1080, 13), (3840×2160, 29).

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.