|
Anti aliasing small text tends to make the letters look blurry and indistinct. I cannot find a way to disable the anti-aliasing of text in WPF and as a result label or button text looks really bad. Ideally I'd like to disable anti aliasing globally for font sizes below a certain size. How can I accomplish this?
-Ryan
rfuller987@hotmail.com | | Ryan F | Hi Ryan,
Anti-aliasing cannot be turned off in WPF, but I am quite concerned that small text sizes appear blurry for you. In general our ClearType sub-pixel antialiasing has been show to improve readability at small font sizes. What font and font size are you using? Is your monitor resolution set to it's native resolution?
Thanks,
Chris | | Chris Han MSFT | Hi Chris, Thanks for the reply.
If antialiasing really can't be turned off in WPF thats a huge problem. While it may be a matter of taste, anti-aliased text simply doesn't look as good as non-anti-aliased text. It looks blurry.
I put up this image quickly so we had an example of what i'm talking about:
http://www.wishbin.com/temp/aliasinginwpf.jpg
The text on the left is WPF text and the text on the right is text from IE. You can see the gray that is used in the WPF text to soften the edges. It looks blurry to me. The edges of the letters blend together. Theres gotta be a way to turn that off because its seriously straining on the eyes.
-Ryan
rfuller987@hotmail.com | | Ryan F | Just to add a comment, when I look at your image on my computer, it looks much better with the antialiasing turned on. I think it's a general issue with ClearType -- it looks different to different people on different hardware. Since it sounds like you can't disable antialiasing within WPF itself, perhaps you can turn off ClearType completely or use the ClearType Tuning applet to make it look better on your machine?
SBussinger | | sbussinger | Well I actually do have cleartype turned off. In Display Properties>Appearance>Effects smoothing screen fonts is set to Standard, not to Cleartype. When I turn cleartype on my whole system starts anti-aliasing text everywhere and everything looks blurry, not just WPF. So it looks like WPF ignores the system setting and does anti-aliasing anyway all the time.
I realize some people like the way anti-aliased text looks, one persons blurry is another person's 'smooth'. But WPF should not ignore the system setting and insiste on anti-aliasing all text.
-Ryan
rfuller987@hotmail.com
| | Ryan F | I personnally love ClearType. But not the one that WPF uses...
On my PC, it seems that WPF does its own ClearType rendering because text rendered by WPF is *not* the same as text rendered by Windows XP with ClearType.
Here's a screen shot showing what I mean: http://pages.videotron.com/pbourque/ClearTypeXPvsWPF.png
To my eyes, Windows XP's ClearType text is smooth. WPF's text is blurry.
And as Ryan mentionned, turning ClearType off in Windows XP's settings does not turn it off in WPF applications.
Pascal
| | Pascal Bourque | I agree, the top text in the screenshot looks good. The bottom is done in 'WPF blurry' style. Theres gotta be a fix to this.
-Ryan | | Ryan F | I would just like to say that I totally, whole-heartedly agree with Ryan in that WPF (running on XP SP2) looks bad. And I mean bad (to me anyways). I just finished installing the WinFX SDK and this is the first thing I noticed.
I understand that some people don't have eyes that are bothered by the introduction of color into their black fonts, or that some prefer clear text at small font sizes, but the majority of us use LCDs today. And those LCDs run at resolutions ranging between 800x600 and 1600x1200. The point is, current hardware technology is nowhere near being supportive enough for these lower font sizes being cleartyped. That is the bottom line in my opinion. I know Microsoft wants us to move into the next generation of scalable vector graphics, just as I do. But the truth of the matter is this SDK is forcing the matter. Lower font sizes do not look good to many people on today's hardware when cleartyped.
So, I am reeling from this. Its clear that the WPF antialiasing/hinting is not as good as Windows XP cleartype, so I would at least like a firm commitment that it is being worked on. The quality is, in my opinion, noticeably worse. Also, without any way to not anti-alias text??? What is that about? I can't set/fix the size in terms of hardware units even if I wanted to? That seems a little insulting to be honest. At this point, I am forced to abandon WPF for standard applications until a suitable answer to this is presented. I will have to proceed with my current .NET control libraries with a sound layer of abstraction for now, so that if this is ever fixed, I can make a smooth transition.
fyi - I have been a loyal MS developer for many years now, supported all of its tools, communities, etc. I run XP SP2, 3 monitors - 2 19" Sony HS-93 LCD's and a 30" Dell LCD on my primary computer.
Best of luck Microsoft with getting us to adopt cleartype. I for one, am not on board yet. Please if at all possible, devote resources to supporting fixed size, non-antialiased UI elements for WPF until there is sufficient hardware to fully support 100% cleartype.
Best regards,
Sean H.
| | sean2078 | I think you guys are honestly splitting hairs here. The difference is hardly perceptable. What resolution are you guys working at?
I also think hardware will be there or coming into use when they finally release .NET 3.0. We are talking early 2007 at the earliest. Thats a long time in computer hardware.
Joshua Thomas | | odujosh | Can anyone see the difference between these two images? The first was created with WPF from .NET 3.0 June CTP, second with .NET 2.0.
http://theimagehosting.info/out.php/i10378_SP3220060718124419.bmp
http://theimagehosting.info/out.php/i10379_SP3220060718124420.bmp
I totally back WPF for creating multi-media and brochure applications, but as for real-world apps that require readability - no way.
Also, sincerely- no offense, but LCD technology is LCD technology. There are physics limitations involved that make it difficult to make the cells/pixels smaller then they are. I'm not saying it's not possible, but we're not going to have significantly smaller cells in the next 2-3 years.
What's so difficult in allowing us to fix render our fonts and forms in terms of hardware units? I think WPF should support it if we wish it. - Just my opinion.
I'm currently working at 1600 x 1024. Should I be working at a higher resolution? | | sean2078 | I do agree with you. Anti-aliasing that cannot be turned off is one of the most heavy problems in WPF. I have a system with a 19 inch CRT and a 1024x768 LCD moninor where anti-aliased small fonts are a nightmare. Maybe there's better hardware in the future, but at the moment people have their equipment and I cannot tell them to buy the newest hardware just to be able to work with my WPF application. Sorry, but there's time to think about it at Microsoft. Saying 'Cleartype is better and if you don't like it ... it's your problem....' is not the right way.
Wolfgang B. | | WolfgangB | How small text are we talking. I can read 8 pt text just fine with no blurring. I have a pair of 17s in potrait layout 1024 by 768. The reason why I think this is rediculious is I don't see it as a problem. I see it as nitpicking and not worth the WPF team's time. I rather see them work towards more interopability with different browsers. Extending WPF-E is astromonically more important than the inperceptable blur you guys are talking about. If it was a week fix for one dev on the team great lets do it. Anymore time than that I feel its a waste of effort.
Software dev is about picking the right battles. Turning Clear Type off/on is not the right battle.
Joshua Thomas | | odujosh | This is not about nitpicking. It is a serious readability problem.
I experimented a bit more with this, and it does not show on all the monitors I've tried. For example, ClearType text is very blurry on my Dell E173FP but super crisp on a Toshiba Portege tablet.
So those of you who think we are nitpicking and wasting the WPF team's time probably have a non problematic monitor. But the fact that you don't see the problem does not mean that it isn't there.
Once again, the important thing to emphasize is that this is not about ClearType in general, but only WPF's implementation of ClearType. Windows XP's ClearType is fine on all the monitors I've tried.
Pascal
| | Pascal Bourque | I did a bit more research on this and it seems the entire foundation of ClearType for smaller fonts relies on "hinting". However, its obvious that NO hinting is being applied to the fonts that are rendered (see images above).
More information can be seen here in this video interview - http://channel9.msdn.com/ShowPost.aspx?PostID=147814
For those of us who use good LCDs, I think this is really important. Either provide better hinting for fonts at smaller point sizes or let us render our controls without builtin "scalability" (meaning, allow us to fix our control/font sizes and render fonts normally).
the ClearType team "clearly" seems to understand that you NEED hinting for this to look decent on LCDs.
| | sean2078 | Since it appears that you cannot turn off anti aliasing globally and if you want to use ClearType, you might try the ClearType tuner from: http://www.microsoft.com/typography/ClearTypePowerToy.mspx
After tuning my system, my fonts look better - though still not as crisp as I'd like.
Just a thought...
| | CharlesJ | The ClearType Tuner tunes the Windows XP ClearType rendering. Text rendered by WPF is not affected by that tuning.
| | Pascal Bourque | I have researched this issue for quite some time now. Anti-aliasing in WPF applications is horrible and very blurry to my eyes. I prefer the crisp text of aliased fonts in Windows XP. Unfortunately, there is no way to completely turn off anti-aliasing. Due to MS's responses to this problem I got the impression that they are not interested in resolving this issue for those people who don't like anti-aliasing (or the version used by WPF).
I am reluctantly switching to other platforms that allow me to alter font rendering the way I want to. Also, the consistency in Windows Vista is just appalling. When you turn off anti-aliasing some applications still use it. Even worse, some applications mix aliased and anti-aliased text. I wish MS would sort out this problem but they don't seem to be interested at all. | | Romendo | After trying Windows-XP ClearType anti-aliasing with ClearType tuner (see notes from Chris Han) it seemed that I can live with this issue. Tturning on ClearType just tells WPF to use colored dots for ant-aliasing instead of gray scales. Color(ClearType on) is better but It's simple on /off and there's no way to control the amount of anti-aliasing. After turning ClearType on, I had problems reading the "Courier New" font in Visual Studio. So I had the choice to either switch ClearType on to have a good WPF display and OFF to read the source code the VS editor. Next I've download the Consolas font for VS (this font is only readable WITH ClearType) but I've learned that I don't like fuzzy fonts for editing source code. Finally, I switched ClearType off again, returned to Courier New and ... the blurry WPF fonts - a very frustrating story. I hope, Microsoft will find a solution...
Wolfgang B. | | WolfgangB | Thanks for the input WolfgangB and others. However, I highly doubt Microsoft has a solution for this. I am sure they looked at this when designing WPF and dismissed it because "Who would ever not use a Microsoft technology (ClearType)?".
It's unfortunate that the majority of all users don't use Cleartype. Myself included. (There is a reason for this.) I can't lower my standards to adhere to a fundamentally flawed SDK (Avalon). Everyone will have to make their own decision, but as for me, I'm sticking with WinForms and creating my own Presentation Framework.
I've tried the solution that Chris Han recommended, but I have to say, I still don't like the way my user interfaces look. This isn't a problem with the fonts, it's a problem with not being able to disable ClearType.
Has anyone seen the example GUIs based on Avalon (especially end-user GUIs)? They all look bad if you have to use any sort of medium or small sized text. Brochure, 3D, and large font apps look great. But normal applications look bad, in my opinion. Just look at some of these samples - some of which are Microsoft's. Note the large font sizes depite already not looking sharp. If you don't mind them so much, that's fine, but many of us do.
http://dotnetjunkies.com/WebLog/images/dotnetjunkies_com/metablog/328/r_Sparkline.jpg http://photos.sys-con.com/story/res/44863/fig2.jpg http://windowssdk.msdn.microsoft.com/en-us/library/ms752299.Local_-1102369635_qs_complex_layout(en-US,VS.80).bmp http://mitglied.lycos.de/macreeg/vista/xaml/bild1.jpg
So, what is my solution? I recommend having an option to not use ClearType. I recommend redering fonts exactly as we do now - using the same conceptual functionality as Win32 API, but ported to native .NET of course. It's not that hard. And if you really want to get fancy, then Microsoft can detect when a font reaches a certain size, then enable ClearType for that font. The main point is - UI's look bad when using font point sizes of 14 or less in WPF.
Frankly I don't like ClearType. That's probably because I have good vision. I'm sure if I were 80 years old, I wouldn't be posting here, a concerned, Microsoft-invested engineer.
Thank you,
-Sean
| | sean2078 | Sean, Wolfgang, and others,
I'm sorry you're finding WPF rendered ClearType text to be more difficult to read in these situations. We very much appreciate the feedback and want to improve your reading experience. Unfortunately at this point in the release cycle, we cannot change the core text rendering code for this version. We are however looking into how we can improve text rendering for future versions and are reading your feedback.
1) I am very interested if you can provide specific font family names that look especially bad for you. This will help us diagnosis any issues with our text rendering. From Sean's screenshots, it looks like Microsoft San Serif on WinXP and Segoe UI are two that look poorly to Sean at small sizes.
2) As Wolfgang mentioned, the Windows XP ClearType tuner PowerToy does affect WPF ClearType rendering. Though our rendering engines are different, WPF respects the global OS settings that the PowerToy changes. However, WPF cannot render aliased text, we can only render with greyscale anti-aliasing. This is due in large part to our architecture for having resolution independent layout.
Here are some compiled tips for improving your reading experience: -Make sure your monitor is set to its native resolution.
-Use the ClearType tuner PowerToy: http://www.microsoft.com/typography/ClearTypePowerToy.mspx . This adjusts the system's ClearType settings which will affect WPF text rendering even though the WPF text rendering engine is different.
-There are a few new WPF ClearType settings that may help improve your experience. At the moment these can only be tuned via registry keys, we do have future plans to update the ClearType tuner to include these additional settings in a GUI:
Under: HKEY_CURRENT_USER\SOFTWARE\Microsof\Avalon.Graphics\<displayName>\ (<displayName> is typically 'DISPLAY1', you can adjust things independently if you have multiple monitors)
ClearTypeLevel (DWORD with valid base 10 values between 0 and 100) This adjusts the amount of color used in ClearType antialiasing, default value is 100.
TextContrastLevel (DWORD with valid base 10 values between 0 and 6) This allows you to enhance the amount of contrast you see in text, the default value is 1.
These keys and more details will be published in an upcoming SDK documentation release.
Hope this helps, Chris Han
| | Chris Han MSFT |
|