Actually, I want to generate a XPM-format image and draw it on the mode line using display
attribute of a text string. However, the height of mode line turns to be different as the result of different fontset.
That means I need to know the height of the emacs mode line and use it to generate the corresponding size of the XPM-format image, so that the generated image can fill the mode line totally.
My question is just showing as the title, how can i know the actually (finally rendered) height of the mode line after applying a specific fontset?
I have searched the emacs documentation via apropos
, what I found now is:
I can use the font-info
function to get the font height in current frame. I guess maybe I can get what I want based on this, although I am unlucky until now.
And, I cannot find any function related a the mode line height.
Try
(- (elt (window-pixel-edges) 3)
(elt (window-inside-pixel-edges) 3))