如何在Visual Studio 2012中更改行距? [英] How do I change the line spacing in Visual Studio 2012?

查看:1206
本文介绍了如何在Visual Studio 2012中更改行距?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在Visual Studio 2012代码编辑区域中更改行间距?在使用IntelliJ IDEA一段时间后,我习惯了稍大的行距(1.2),并且我想在VS12中实现相同的效果. 为了进行比较,最上面的是IDEA,行间距为12像素,最下面的是VS12,间距为10像素:

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:

我发现IDEA版本更容易阅读,即使只有2px的差异也是如此.有人知道吗?

I find the IDEA version much easier to read, even if it's just 2px difference. Does anyone know?

推荐答案

我找到了一种很好的解决方法,部分内容已在 TypeLight (免费供个人使用),然后打开 Consolas .ttf 文件.要调整行距,请转到字体"->度量"->高级",然后根据您的需要更改行距"(我也更改了键入行距",但我不知道这实际上是做什么的).我用一个值进行了实验,发现730左右与IDEA中的12个像素间距相似.

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.

为了将修改后的字体与常规Consolas区分开来,我建议在Font-> Names下更改字体名称(改为"Consolas Spaced").保存字体,双击文件,然后从预览对话框中选择安装".然后(重新)启动Visual Studio,选择修改后的字体即可.

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.

这篇关于如何在Visual Studio 2012中更改行距?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆