2

In Windows I've set my default font height to 120 with:

(set-face-attribute 'default nil :height 120)

This seems to not take effect in org-mode, however, when specially formatting is applied. For example, when I use // or ** to italicize or bold, the font size shrinks when the formatting is applied. What setting am I missing to have org-mode use the correct formatting with its specially formatted text. The rest of the text looks right. It's just the formatted stuff that is shrunk.

Example below. Note that after the "have," the text no longer aligns because the italicized have has shrunk:

enter image description here

2
  • 1
    Place your cursor on the offending text and type M-x customize-face or, if you just want to find out more about what is there at that particular position, type C-u C-x =
    – lawlist
    Oct 25, 2015 at 15:53
  • Some modes have their own face configuration, in some cases they use different font and font size. For me setting the default font explicitly in the (set-face-attribute) fixes this. Like so: (set-face-attribute 'default nil :font "Lucida Grande Mono" :height 120 :slant 'normal :weight 'normal) Also if you use a theme, it might change the default behavior so you need to put the (set-face-attribute) after you load your theme.
    – xmonk
    Oct 25, 2015 at 18:53

1 Answer 1

3
+50

You can set italic face too.

(set-face-attribute 'italic nil :height 120)

And you might need to set bold face too.

2
  • Is there a way to change them all with one command, or does it need to be three separate commands, one for default, one for italic, and one for bold?
    – Ryan
    Oct 26, 2015 at 19:43
  • You can set :height for three faces to 120 with mapc or something else, but italic face's :slant must be set separate. Check out the help of function set-face-attribute. Oct 27, 2015 at 1:41

Your Answer

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

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