1

I use the following in my .emacs to set my default font to Ubuntu Mono:

(set-face-attribute 'default nil :font "Ubuntu Mono")

However, the defauly font size is too tiny for me. In my menubar I see Options->Set Default Font..., but the changes I make there does not propogate to my next session.

Should I be setting something in .emacs to set default font size? (I like it to be 24)

Thanks!

  • 2
    possible duplicate stackoverflow.com/questions/294664/… – harish.venkat Feb 10 '12 at 17:32
  • 1
    I think it's just because you didn't "save" the setting (I remember there is another option in the menubar to save the setting.) – yuyichao Feb 10 '12 at 17:37
  • @harish.venkat Nice find. We can't actually close as a duplicate of a post on another site, but I used that answer to write one here – Michael Mrozek Feb 10 '12 at 19:18
3

An answer to a similar Stack Overflow question mentions that another argument to set-face-attribute is height, which takes an integer representing tenths of a point. So to make it 24pt, you would use:

(set-face-attribute 'default nil :font "Ubuntu Mono" :height 240)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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