WPF 4.0 font rendering issue

I get a weird rendering problem with WPF 4 applications in the way they render a piece of text, stretching it and making it very narrow.

.net 3.5: .Net 3.5

.net 4.0: .Net 4.0

At first, I thought it might be a font problem, but I also see the same problem in the Blend 4 beta:

Blend

I am running XP SP3, Visual Studio 2010 Professional and is as relevant as possible. I don’t notice such problems with Silverlight 4 applications that I created on the same machine ... Has anyone else seen this or knew why this is happening?

+7
fonts wpf
source share
3 answers

“Do you know why this is happening?”

The text stack now supports display-optimized character layout , also see on this page

It should be customizable, but I can’t find the details right now.

+1
source share

I believe this was a problem with some installed fonts.

Check out SegoeUI!

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

to answer your question about why this happens: I think it was because I deleted some previous version of either blend or visual studio, which also deleted fonts.

I ran Snoop on Blend and noticed the path the font was referring to. It was the right way, but somehow the mixture still couldn’t find the font (I guessed that it took the alphabetically next font). So I installed it in the Windows Fonts folder, and everything was fine.

I had this problem a while ago, so carry me if I don’t remember, everything is fine.

+1
source share

Try disabling hardware acceleration: http://msdn.microsoft.com/en-us/library/aa970912.aspx

0
source share

All Articles