Is it possible to change the spacing between lines in the Visual Studio 2012 code editing area? After having worked with IntelliJ IDEA for a while, I got accustomed to a slightly larger line spacing (1.2), and I want to achieve the same effect in VS12. For comparison, the top one is IDEA with 12 pixels spacing between lines, the bottom one is VS12 with 10 pixels spacing:
I find the IDEA version much easier to read, even if it's just 2px difference. Does anyone know?
There's a built-in setting for that, just open the Tools menu > Options > Text Editor > General and look for a setting called Line Spacing, change its value to one of your liking.
Line spacing should be at least a space-and-a-half within paragraphs. So around 150 percent or 1.5 times the font size. Spacing following paragraphs should be at least two times the font size.
For most text, the optimal line spacing is between 120% and 145% of the point size. Most word processors, as well as CSS, let you define line spacing as a multiple. Or you can do the math—multiply your point size by the percentage. (The text in this paragraph has line spacing of 110%.
I was able to set this by simply searching in the User Settings (CTRL+SHIFT+P) for spacing and there are two separate boxes that were set to 0 for terminal and editor. You can change the value and see it update live, which is really cool.
I've found a workaround which works pretty well, partly alread described in this comment.
You need to download and install TypeLight (free for personal use), and open the Consolas.ttf file inside. To adjust the line spacing, go to Font -> Metrics -> Advanced and change the "Line Gap" to your desire (I changed "Type Line Gap" as well, but I have no idea what this actually does). I experimented a bit with a values and found around 730 to be similar to the 12 pixels spacing in IDEA.
To distinguish the modified font from the regular Consolas, I suggest changing the name of the font under Font -> Names (to "Consolas Spaced" or something). Save the font, double-click the file and choose "Install" from the preview dialog. Then (re)start Visual Studio, choose your modified font and you're done.
Can't change directly in Visual studio.
--> BUT You CAN change line height of font, the font you're using.
Step 1: install Fontforge.
Step 2: Open Fontforge after install finished, go to:
Element->Font Info ->OS2 -> Unit.
Change 4 value: Down win, up win, top N, down horizontal by multiplied by the desired ratio. Sample: ratio 1.5 or 2 ..etc...
(it means: if default 800, you multiple with ratio 1.5 --> result is 1200, you change 800 -->1200)
--> click OK to save setting.
Step 3: Go to File -> Generate font --> Generate with ttf format.
Step 4: Install the font just created and change font in Visual Studio.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With