Visual Studio 2010 Beta 2 + ClearType

时间:2021-11-28 07:56:36

I was wondering: are you satisfied with the text-rendering in the Visual Studio 2010 editor (Beta 2)? On my primary monitor it looks very blurred, even when using font size 12!

我想知道:您对Visual Studio 2010编辑器(Beta 2)中的文本呈现感到满意吗?在我的主显示器上,它看起来非常模糊,即使使用12号字体!

When using font size 10 or 11 it's horrible. Can the WPF text rendering mode be set explicitly for VS code window?

当使用字体大小10或11时,它太可怕了。可以为VS代码窗口显式设置WPF文本呈现模式吗?

EDIT: I am using Windows 7 x64 and my primary monitor is a Benq G2412HD. What's kind of strange is that the font seems to be nicer on the secondary monitor, which is a 4 year old 19' TFT.

编辑:我使用的是Windows 7 x64,我的主显示器是Benq G2412HD。有点奇怪的是,字体在辅助显示器上看起来更好,这是一款4岁的19'TFT。

EDIT: I tried several Cleartype settings but none really looks as nice as when using Visual Studio 2008. The first image is from the primary monitor, the second from the secondary. Both are using Consolas 10pt (my preferred font).

编辑:我尝试了几个Cleartype设置,但没有一个看起来像使用Visual Studio 2008时那样好。第一个图像来自主监视器,第二个图像来自辅助监视器。两者都使用Consolas 10pt(我的首选字体)。

Primary screen http://img4.imageshack.us/img4/6789/vs2010.png Secondary screen http://img4.imageshack.us/img4/7986/vs20102.png

主屏幕http://img4.imageshack.us/img4/6789/vs2010.png辅助屏幕http://img4.imageshack.us/img4/7986/vs20102.png

10 个解决方案

#1


0  

Please have a look at the screenshots in the following update (to come in final release of VS2010), and see if the improvements solve your issues with VS font rendering:

请查看以下更新中的屏幕截图(进入VS2010的最终版本),看看这些改进是否解决了VS字体渲染的问题:

http://blogs.msdn.com/text/archive/2010/03/05/additional-wpf-text-clarity-improvements.aspx

http://blogs.msdn.com/visualstudio/archive/2010/03/11/wpf-text-clarity-improvements.aspx

#2


2  

I use Consolas size 10 and I have no issues.

我使用Consolas 10号,我没有问题。

  • Try following the instructions on Microsoft's website for tuning clear type. You can find it here.
  • 请尝试按照Microsoft网站上的说明调整清除类型。你可以在这里找到它。

  • If you use IE when accessing that website, you can make changes to clear type settings right from the browser.
  • 如果您在访问该网站时使用IE,则可以直接从浏览器进行更改以清除类型设置。

#3


2  

TextSharp is the answer right now. I really hope they continue to fix this issue because I've had terrible results on my primary and secondary monitors with the standard rendering. Using beta 2.

TextSharp现在就是答案。我真的希望他们继续解决这个问题,因为我的主要和辅助显示器上的标准渲染效果很糟糕。使用beta 2。

With 8 or 9pt Lucida Console the text is fine with text mode set to 'Aliased'.

使用8或9pt Lucida控制台,文本模式设置为“别名”时文本正常。

#4


1  

Here is how VS2008 and VS2010 beta2 editor text rendering looks for me, side by side. The font is Consolas 13pt.

以下是VS2008和VS2010 beta2编辑器文本渲染如何与我并排查找。字体是Consolas 13pt。

VS2008:

http://int19h.org/so/cleartype_vs9.png

VS2010:

http://int19h.org/so/cleartype_vs10.png

I don't see any observable differences.

我没有看到任何可观察到的差异。

[EDIT] Okay, I've reproduced it with the color scheme posted. It seems that the key part here is to use bright text on dark background. With dark-on-bright, the output seems to be the same.

[编辑]好的,我已经发布了配色方案。这里的关键部分似乎是在深色背景上使用明亮的文字。在暗亮的情况下,输出似乎是相同的。

Here's some guesswork. Apparently, Direct2D (which WPF uses for antialiased text output) always "gives precedence" to foreground (i.e. text) color over background color when doing subpixel antialiasing. On the other hand, traditional GDI ClearType seems to always give precedence to dark colors over bright ones. Thus, with bright letters and dark backgrounds, ClearType text becomes thinner, but Direct2D text remains of the same size, pixel-wise. Furthermore, as bright pixels are more intensive, the same amount of them "stands out" more with same foreground/background contrast, so bright-on-dark D2D text looks noticeably "bolder".

这是一些猜测。显然,Direct2D(WPF用于抗锯齿文本输出)在进行子像素抗锯齿时总是“优先”在背景颜色上的前景(即文本)颜色。另一方面,传统的GDI ClearType似乎总是优先于暗色而不是亮色。因此,对于明亮的字母和深色背景,ClearType文本变得更薄,但Direct2D文本仍然具有相同的大小,按像素。此外,由于明亮的像素更加密集,相同数量的它们在相同的前景/背景对比度下“更突出”,因此明亮的黑暗D2D文本看起来明显“更大胆”。

#5


1  

Well I experience the same oddity (not only in VS2010, but in all WPF applications). Sadly there seems no way of setting a "backwards style" text rendering in WPF in general.

好吧,我经历了同样的奇怪(不仅在VS2010中,而且在所有WPF应用程序中)。遗憾的是,似乎没有办法在WPF中设置“向后风格”的文本渲染。

I just found this addon "Text Sharp" for VS2010 on the VS gallery which lets you select different font aliasing options for the VS2010 text editor, but at least for me, this didn't help with the issue.

我刚刚在VS库中找到VS2010的这个插件“Text Sharp”,它允许你为VS2010文本编辑器选择不同的字体别名选项,但至少对我来说,这对这个问题没有帮助。

Here is the link, if you might want to try it: Text Sharp VS2010 extension

这是链接,如果你想尝试一下:Text Sharp VS2010扩展

#6


0  

Have you ensured that ClearType is enabled on your OS? I've seen similar issues with 2010 when ClearType was disabled on my machine. Re-enabling ClearType made the Text snappy looking again.

您确定在您的操作系统上启用了ClearType吗?在我的机器上禁用ClearType时,我在2010年看到了类似的问题。重新启用ClearType使Text snappy再次显示。

For some reason the ClearType setting on my OS kept getting undone when I TS'd around a bit. I had to reset it a couple of times but it seems to have calmed down recently (I believe I was using a Pre-RTM build of Win7 at the time).

出于某种原因,我的操作系统上的ClearType设置在我稍微进行了一些操作时仍然无法完成。我不得不重置几次,但最近似乎已经平静下来了(我相信我当时正在使用Pre-RTM版本的Win7)。

#7


0  

Try using Courier New font. Tools -> Options -> Environment -> Fonts and Colors

尝试使用Courier New字体。工具 - >选项 - >环境 - >字体和颜色

#8


0  

ollifant I agree with you, they are different.

ollifant我同意你的意见,他们是不同的。

Others may not see any differences from screen shots, but on the actual machine I can see differences. Loading the same project with the same settings side by side looks different. I think it is the difference in how WPF renders fonts or something.

其他人可能看不到屏幕截图的任何差异,但在实际的机器上我可以看到差异。并排加载相同设置的相同项目看起来不同。我认为WPF渲染字体或其他东西的方式不同。

The VS 2010 pane looks shifted slightly left, like kerning in the font is off by a little or something. Again - same font in both VS 2008 and 2010.

VS 2010窗格看起来略微向左移动,就像字体中的字距缩小了一点点。再次 - VS 2008和2010中的相同字体。

I have tried now on Windows 7 and Windows Vista. Maybe older XP machines render differently, can't say (and no I won't load XP to find out).

我现在在Windows 7和Windows Vista上尝试过。也许旧的XP机器呈现不同,不能说(并且我不会加载XP来查找)。

#9


0  

I have noticed a rendering problem with Visual Studio 2010b2 as well. I've tried adjusting the clear type settings to no avail.

我也注意到Visual Studio 2010b2的渲染问题。我试过调整清除类型设置无济于事。

I use consolas 9 pt on win7x64 with a average 19 inch TFT.

我在win7x64上使用consolas 9 pt,平均19英寸TFT。

This is what it looks like on my system. A side by side screen shot

这就是我的系统上的样子。一个并排的屏幕截图

#10


0  

OK here's what you do. Finally figured it out!

好的,这就是你做的。终于想通了!

You need to reset cleartype to the default values. Don't try to tune it based on what you think looks good - because what you think looks good won't in VS2010.

您需要将cleartype重置为默认值。不要试图根据你认为好看的东西来调整它 - 因为你认为看起来不错的东西在VS2010中不会。

I noticed on a brand new install of Windows 7 my VS2010 text suddenly became a lot nicer. After running cleartype to try to get nice text on a wall mounted Sony TV I found it had totally screwed up text for my normal external monitor.

我注意到在全新安装的Windows 7上我的VS2010文本突然变得更好了。在运行cleartype试图在壁挂式索尼电视上获得漂亮的文字后,我发现它完全搞砸了我的普通外接显示器的文本。

I haven't yet found a way to reset cleartype explicitly, but apparently the below explains what the defaults are :

我还没有找到一种明确重置cleartype的方法,但显然下面解释了默认值:

When you open ClearType Text Tuner, select "Turn on ClearType" check box and click on Next. Then, again click on the Next after setting Native Resolution. Then, select the options as given below:

打开ClearType Text Tuner时,选中“启用ClearType”复选框,然后单击“下一步”。然后,在设置Native Resolution后再次单击Next。然后,选择以下给出的选项:

1st Screen – 1st Option out of 2

第一个屏幕 - 2个中的第一个选项

2nd Screen – 2nd Option out of 6

第二屏 - 第二屏中的第二选项

3rd Screen – 1st Option out of 3

第3个屏幕 - 3个中的第1个选项

4th Screen – 2nd Option out of 6

第4屏 - 第6屏中的第2选项

Finally, click on Finish.

最后,单击Finish。

This is for VS2010 RC.

这适用于VS2010 RC。

#1


0  

Please have a look at the screenshots in the following update (to come in final release of VS2010), and see if the improvements solve your issues with VS font rendering:

请查看以下更新中的屏幕截图(进入VS2010的最终版本),看看这些改进是否解决了VS字体渲染的问题:

http://blogs.msdn.com/text/archive/2010/03/05/additional-wpf-text-clarity-improvements.aspx

http://blogs.msdn.com/visualstudio/archive/2010/03/11/wpf-text-clarity-improvements.aspx

#2


2  

I use Consolas size 10 and I have no issues.

我使用Consolas 10号,我没有问题。

  • Try following the instructions on Microsoft's website for tuning clear type. You can find it here.
  • 请尝试按照Microsoft网站上的说明调整清除类型。你可以在这里找到它。

  • If you use IE when accessing that website, you can make changes to clear type settings right from the browser.
  • 如果您在访问该网站时使用IE,则可以直接从浏览器进行更改以清除类型设置。

#3


2  

TextSharp is the answer right now. I really hope they continue to fix this issue because I've had terrible results on my primary and secondary monitors with the standard rendering. Using beta 2.

TextSharp现在就是答案。我真的希望他们继续解决这个问题,因为我的主要和辅助显示器上的标准渲染效果很糟糕。使用beta 2。

With 8 or 9pt Lucida Console the text is fine with text mode set to 'Aliased'.

使用8或9pt Lucida控制台,文本模式设置为“别名”时文本正常。

#4


1  

Here is how VS2008 and VS2010 beta2 editor text rendering looks for me, side by side. The font is Consolas 13pt.

以下是VS2008和VS2010 beta2编辑器文本渲染如何与我并排查找。字体是Consolas 13pt。

VS2008:

http://int19h.org/so/cleartype_vs9.png

VS2010:

http://int19h.org/so/cleartype_vs10.png

I don't see any observable differences.

我没有看到任何可观察到的差异。

[EDIT] Okay, I've reproduced it with the color scheme posted. It seems that the key part here is to use bright text on dark background. With dark-on-bright, the output seems to be the same.

[编辑]好的,我已经发布了配色方案。这里的关键部分似乎是在深色背景上使用明亮的文字。在暗亮的情况下,输出似乎是相同的。

Here's some guesswork. Apparently, Direct2D (which WPF uses for antialiased text output) always "gives precedence" to foreground (i.e. text) color over background color when doing subpixel antialiasing. On the other hand, traditional GDI ClearType seems to always give precedence to dark colors over bright ones. Thus, with bright letters and dark backgrounds, ClearType text becomes thinner, but Direct2D text remains of the same size, pixel-wise. Furthermore, as bright pixels are more intensive, the same amount of them "stands out" more with same foreground/background contrast, so bright-on-dark D2D text looks noticeably "bolder".

这是一些猜测。显然,Direct2D(WPF用于抗锯齿文本输出)在进行子像素抗锯齿时总是“优先”在背景颜色上的前景(即文本)颜色。另一方面,传统的GDI ClearType似乎总是优先于暗色而不是亮色。因此,对于明亮的字母和深色背景,ClearType文本变得更薄,但Direct2D文本仍然具有相同的大小,按像素。此外,由于明亮的像素更加密集,相同数量的它们在相同的前景/背景对比度下“更突出”,因此明亮的黑暗D2D文本看起来明显“更大胆”。

#5


1  

Well I experience the same oddity (not only in VS2010, but in all WPF applications). Sadly there seems no way of setting a "backwards style" text rendering in WPF in general.

好吧,我经历了同样的奇怪(不仅在VS2010中,而且在所有WPF应用程序中)。遗憾的是,似乎没有办法在WPF中设置“向后风格”的文本渲染。

I just found this addon "Text Sharp" for VS2010 on the VS gallery which lets you select different font aliasing options for the VS2010 text editor, but at least for me, this didn't help with the issue.

我刚刚在VS库中找到VS2010的这个插件“Text Sharp”,它允许你为VS2010文本编辑器选择不同的字体别名选项,但至少对我来说,这对这个问题没有帮助。

Here is the link, if you might want to try it: Text Sharp VS2010 extension

这是链接,如果你想尝试一下:Text Sharp VS2010扩展

#6


0  

Have you ensured that ClearType is enabled on your OS? I've seen similar issues with 2010 when ClearType was disabled on my machine. Re-enabling ClearType made the Text snappy looking again.

您确定在您的操作系统上启用了ClearType吗?在我的机器上禁用ClearType时,我在2010年看到了类似的问题。重新启用ClearType使Text snappy再次显示。

For some reason the ClearType setting on my OS kept getting undone when I TS'd around a bit. I had to reset it a couple of times but it seems to have calmed down recently (I believe I was using a Pre-RTM build of Win7 at the time).

出于某种原因,我的操作系统上的ClearType设置在我稍微进行了一些操作时仍然无法完成。我不得不重置几次,但最近似乎已经平静下来了(我相信我当时正在使用Pre-RTM版本的Win7)。

#7


0  

Try using Courier New font. Tools -> Options -> Environment -> Fonts and Colors

尝试使用Courier New字体。工具 - >选项 - >环境 - >字体和颜色

#8


0  

ollifant I agree with you, they are different.

ollifant我同意你的意见,他们是不同的。

Others may not see any differences from screen shots, but on the actual machine I can see differences. Loading the same project with the same settings side by side looks different. I think it is the difference in how WPF renders fonts or something.

其他人可能看不到屏幕截图的任何差异,但在实际的机器上我可以看到差异。并排加载相同设置的相同项目看起来不同。我认为WPF渲染字体或其他东西的方式不同。

The VS 2010 pane looks shifted slightly left, like kerning in the font is off by a little or something. Again - same font in both VS 2008 and 2010.

VS 2010窗格看起来略微向左移动,就像字体中的字距缩小了一点点。再次 - VS 2008和2010中的相同字体。

I have tried now on Windows 7 and Windows Vista. Maybe older XP machines render differently, can't say (and no I won't load XP to find out).

我现在在Windows 7和Windows Vista上尝试过。也许旧的XP机器呈现不同,不能说(并且我不会加载XP来查找)。

#9


0  

I have noticed a rendering problem with Visual Studio 2010b2 as well. I've tried adjusting the clear type settings to no avail.

我也注意到Visual Studio 2010b2的渲染问题。我试过调整清除类型设置无济于事。

I use consolas 9 pt on win7x64 with a average 19 inch TFT.

我在win7x64上使用consolas 9 pt,平均19英寸TFT。

This is what it looks like on my system. A side by side screen shot

这就是我的系统上的样子。一个并排的屏幕截图

#10


0  

OK here's what you do. Finally figured it out!

好的,这就是你做的。终于想通了!

You need to reset cleartype to the default values. Don't try to tune it based on what you think looks good - because what you think looks good won't in VS2010.

您需要将cleartype重置为默认值。不要试图根据你认为好看的东西来调整它 - 因为你认为看起来不错的东西在VS2010中不会。

I noticed on a brand new install of Windows 7 my VS2010 text suddenly became a lot nicer. After running cleartype to try to get nice text on a wall mounted Sony TV I found it had totally screwed up text for my normal external monitor.

我注意到在全新安装的Windows 7上我的VS2010文本突然变得更好了。在运行cleartype试图在壁挂式索尼电视上获得漂亮的文字后,我发现它完全搞砸了我的普通外接显示器的文本。

I haven't yet found a way to reset cleartype explicitly, but apparently the below explains what the defaults are :

我还没有找到一种明确重置cleartype的方法,但显然下面解释了默认值:

When you open ClearType Text Tuner, select "Turn on ClearType" check box and click on Next. Then, again click on the Next after setting Native Resolution. Then, select the options as given below:

打开ClearType Text Tuner时,选中“启用ClearType”复选框,然后单击“下一步”。然后,在设置Native Resolution后再次单击Next。然后,选择以下给出的选项:

1st Screen – 1st Option out of 2

第一个屏幕 - 2个中的第一个选项

2nd Screen – 2nd Option out of 6

第二屏 - 第二屏中的第二选项

3rd Screen – 1st Option out of 3

第3个屏幕 - 3个中的第1个选项

4th Screen – 2nd Option out of 6

第4屏 - 第6屏中的第2选项

Finally, click on Finish.

最后,单击Finish。

This is for VS2010 RC.

这适用于VS2010 RC。