seagle0128/doom-modeline

Specify font size in modeline?

AmaiKinono opened this issue · 9 comments

I would like to use smaller font size/height in modeline. Is there anyway to do this?

Please refer to #187.

Another method is setting smaller font height for mode-line via set-face-attribute.

e.g.

(set-face-attribute 'mode-line nil :height 120)

Thanks.

That means the height of mode-line should be the max value of doom-modeline-height and the font height.

I don't think so... I did this:

(set-face-attribute 'mode-line nil :height 50)
(setq doom-modeline-height 1)

and the modeline looks like this:

2019-07-01-155219_836x65_scrot

It's larger than both the maximum height of the font, and doom-modeline-height.

Please provide more information below.

  • OS, Emacs version, doom-modeline version
  • doom-modeline-height, (doom-modeline--font-height)
  • error logs, messages, etc.

You'd better update to the latest version and restart Emacs.

  • OS: Manjaro 18.0.4 with kernel 4.19.49
  • Emacs version: 26.2
  • doom-modeline version: commit ee4619d3670830180ffd87b1598d74312b5b9808. I've just pulled it so it's the latest.
  • doom-modeline-height: 1
  • (doom-modeline--font-height): 44
  • logs / messages: no. It's just the display issue, and nothing is reported with emacs --debug-init.

Obviously, the font height of mode-line is 44. That's why the mode-line looks so big. The behaviors are as designed. Again, please refer to #187.

Thanks. Advising doom-modeline--font-height now works. But it looks weird to me to set the height according to (frame-char-height). would using (face-attribute 'mode-line :height) be better?

@AmaiKinono I've already been working on it. Will commit soon. And the advice will be simple. But it's not recommended to change the font size, since the right segments may not be aligned.

(setq doom-modeline-height 1)
(set-face-attribute 'mode-line nil :height 100)
(set-face-attribute 'mode-line-inactive nil :height 100)

This works. But seems the face attributes must be set or it goes wrong. I tried in emacs -q to require doom-modeline and call doom-modeline-mode, the modeline won't show up and emacs throws an error:

doom-modeline-refresh-bars: Wrong type argument: number-or-marker-p, unspecified

and It works after setting the face attributes.

Fix in 68362f2.