WPF 4.0字体呈现问题 [英] WPF 4.0 Font Rendering Issue

查看:138
本文介绍了WPF 4.0字体呈现问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

WPF 4应用程序中出现了一个奇怪的呈现问题,它们呈现一些文本的方式,因为它将文本拉伸并使其非常窄。

<.net> 3.5:



.net 4.0:



我正在运行XP SP3,Visual Studio 2010 Professional,并且所有内容都是最新的。我没有注意到我在同一台机器上构建的Silverlight 4应用程序出现任何这样的问题...任何人都看到了这一点,或知道为什么会发生这种情况?

解决方案



检查SegoeUI!


$ b $他们位于%ProgramFiles%\微软Expression \ Common \字体



回答你的问题为什么发生这种情况:我认为这是因为我卸载了以前版本的混合或视觉工作室,这也删除了字体。

我启动了Blend上的Snoop,并注意到字体引用的路径。这是正确的道路,但不知何故混合仍然无法找到字体(我猜它然后采取字母顺序字体)。所以我把它安装到Windows的字体文件夹,一切都很好。

我前一阵子有这个问题,所以如果我不记得这一切的话。

I'm getting a weird rendering issue with WPF 4 applications in the way they render some of the text as it's stretching it and making it very narrow.

.net 3.5:

.net 4.0:

At first I thought it could be a problem with the font, but I'm also seeing the same problem in the Blend 4 beta:

I'm running XP SP3, Visual Studio 2010 Professional and everything's as up to date as it can be. I'm not noticing any such problems with Silverlight 4 apps I have built on the same machine... Anyone else seen this or know why it's happening?

解决方案

I believe this was a Problem with certain fonts not being installed.

Check for SegoeUI!

They are located in %ProgramFiles%\Microsoft Expression\Common\Fonts

to answer your question about why this is happening: I think it was because i uninstalled some previous version of either blend or visual studio which also removed the fonts.

I fired up Snoop on Blend and noticed the path the font was referencing. It was the right path but somehow blend still couldn't find the Font (I guessed it then took the alphabetically following font). So I installed it to Windows' Fonts Folder and all was fine.

I had this issue a while ago so bear with me if I don't recall it all right.

这篇关于WPF 4.0字体呈现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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