score:2

On linux with gtk you can also play with a .gtkrc file. See here and here as examples.

Of course this doesn't help anything on windows :)

score:5

With respect to my response above, I can now provide more detail as to how to create the font, along with suggestions for creating a nicer font (starting with a truetype font):

  • Pick a truetype font you wish to use (I used an arial font)
  • Downloaded and install fontforge
  • Start fontforge and open the font file; I used a root terminal so that I could be sure to save the file in protected font folder
  • Select all the characters (Edit/Select/Select All)
  • Element Font Info PS Names
  • Specify names - I called it ArialMTVerticallyTighter; make sure you change all of the names on this tab or it may use the new font instead of the old font where you don't want it to
    • Element transformations transform
    • origin glyph origin
    • scale uniformly 120 %
      (more will be too big, use less if you want more spacing between lines)
  • Element General 1792 256 2048 Scale -142 150
  • OS/2 Metrics
    • Turn off is offset all over tab and t
    • Turn on really use typo metrics
    • 1792 512 1792 -512 0 1792 -512 0
  • File Generate Fonts - true type - into font folder - use new font name
  • File save (in case you screwed up so you can go back) to new name
  • Open new font file (in nautilus) with font viewer (by double clicking)
  • Install it
  • Start Eclipse
  • Set it as font in eclipse
    (window>preference>general>appearance>java editor>text font to new font)

Remember that the font size you see in eclipse for a particular setting e.g. 9 actually corresponds to about an 11 point font with less space between the lines

score:6

Create your own bitmap font that uses all of the rows at the top of the font. It does work, and seems to save about up to 4 rows of pixels in a 17 point font. I did it as follows:

  • install otf2bdf
    • go to font folder, presumably in root terminal
    • Clone your favorite font (presumably a truetype font) using otf2bdf to the size you want it
    • install fontforge
    • edit the font so that it uses all of the rows above the line for the capital letters
      • typically there are about 3 lines of pixels that are left blank and that is why there is so much space between rows
      • should you wish you can also uses some of the rows below the line but I think these are typically used for lower case letters like y which drop below the line (not so important when programming)
    • install the font by:
      • saving it into one of the font folders such as /usr/local/share/fonts
      • updating the font chache In a root terminal with fc-cache -f -v
    • use the new font

score:8

you could put overly high characters in some comment somewhere, try "|ÄÁg$ÑĈђךןﭼژçÅẤДАБψ". As soon as Eclipse sees this in a file, it'll increase the line-separation for the whole file to properly display thos characters.

score:9

You could configure a formatter (Preferences | Java | Code Style) to inject extra empty lines. Otherwise, you might be able to find a font (Preferences | General | Appearance | Colors and Fonts) with a lot of built-in whitespace. On Windows, I like 'consolas'--it's not particularly whitespace-y but it is a nice mono-spaced, readable font.

score:19

After trying various alternative fonts, I've took original Consolas and increased line height in font editor, installed resulting ConsolasHigh font package into system and set it as default in Eclipse editor:

enter image description here

Check out: https://github.com/Salauyou/Consolas-High-Line

score:29

I've cloned and installed the font from

https://github.com/andreberg/Meslo-Font

and made it my IDE editor font for Eclipse. Line spacing is much better now!


Related Query

More Query from same tag