Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add 1 pixel of vert-spacing to an Emacs font?

I don't know if this can easily be done with Emacs (read below for my hack in case there's no easy way to do this) so...

How can I add one pixel of vertical-spacing between each line under Emacs?

I know that screen real estate is precious but I'm using a "custom" font (ProggyFont) and, under IntelliJ IDEA, I can modify the vertical spacing to something that I like.

Under Emacs, however, I find the text hard to read because the pixels from one line are too close from the pixel of another line, so I'd like to add one "one pixel" empty vertical line between every line. Can this be done simply?

If there's no "simple way", how do I take a "x by y" bitmap font and turn it into a "x by (y+1)" bitmap font? I don't mind using a font editor: been there, done that. But I don't know exactly everything that would be involved.

like image 371
Cedric Martin Avatar asked Dec 06 '25 05:12

Cedric Martin


1 Answers

Check out the line-spacing variable, e.g.

(setq line-spacing 0.2)

From the docs:

Additional space to put between lines when displaying a buffer. The space is measured in pixels, and put below lines on window systems. If value is a floating point number, it specifies the spacing relative to the default frame line height. A value of nil means add no extra space.

like image 70
sanityinc Avatar answered Dec 07 '25 20:12

sanityinc



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!