VRVenkateshwaran Ramdoss Syncfusion Team June 27, 2016 11:13 AM UTC
We have checked the reported issue by creating a sample. But we were unable to reproduce the reported issue. In our samples, we have used "TextOptions.TextFormattingMode" as "Display" and "TextOptions.TextRenderingMode" as ClearType. Please download the samples from the below link.
We suspect that you did not use the "TextOptions.TextFormattingMode" as "Display" in your sample. By default, its value is Ideal. When it is in Ideal, the changes are not applied. Please check by setting the property "TextOptions.TextFormattingMode" as "Display".
Regards, Venkateshwaran V.R.
HZHongbin ZouJune 27, 2016 12:54 PM UTC
Thanks for your response. I checked your samples and found that I was modifying the demo solutions shipped with Syncfusion, which is very different from your way of building the xaml from scratch. Sorry I didn't mention that before.
However I believe the problem still exists. Let's look at the Syncfusion demos:
Demo A install directory: %userprofile%\AppData\Local\Syncfusion\EssentialStudio\18.104.22.168\WPF\SfGrid.WPF\Samples\GettingStarted\CS
Demo B install directory: %userprofile%\AppData\Local\Syncfusion\EssentialStudio\22.214.171.124\WPF\Tools.WPF\Samples\Ribbon\Office2013\CS
For demo A (ChromelessWindow), I could enable ClearType easily using your method, but for demo B (RibbonWindow) I just couldn't figure out a way to enable ClearType. I also tried to add syncfusion:LayoutControl.SetMetroMode="True" (which appeared in demo A) to demo B but to no avail.
So this time my question is simple: how to enable ClearType for demo B?
VRVenkateshwaran Ramdoss Syncfusion Team June 28, 2016 10:59 AM UTC
We have checked in our Ribbon Office2013 demo sample. But we were unable to reproduce the reported issue. When we set the "TextOptions.TextFormattingMode" as "Display" and "TextOptions.TextRenderingMode" as "ClearType" in the RibbonWindow, it is working fine. We can see the difference of all the Modes of TextRendering. Could you please provide more details like how you have set the "TextFormattingMode" and "TextRenderingMode" in your application. It will help to proceed further.
Regards, Venkateshwaran V.R.
HZHongbin ZouJune 28, 2016 07:56 PM UTC
Ah, that's weird. I am from mainland China, using VS2013 with the latest Win10 build 1511 (10586.420) and my default system language is Chinese (Simplified). Could my system language be the reason? I tried to switch my system language to en-us, but the problem still exists, so I'm not sure.
I also have to tell you when it comes to Chinese font rendering, There is another problem (for my machine). According to the uploaded images and VS projects:
1. This time, ClearType doesn't work for ChromelessWindow.
2. The rendering details of Chinese texts are different (actually it looks inelegant) from the system default. I have seen those bad renderings before and I think this is because of some incompatibility between Chinese (Simplified) andChinese (Traditional), but still I'm not sure.
The only difference between the two uploaded projects is switching from Window to ChromelessWindow.
I know what I mentioned above might be difficult for you to verify, anyway, apart from those little imperfections, your products are really wonderful, thanks!
I believe it's best to find someone from mainland China to verify problem 2. Chinese fonts are actually different among mainland China/Hong Kong/Taiwan.
VRVenkateshwaran Ramdoss Syncfusion Team June 29, 2016 12:35 PM UTC
In your first update you have mentioned that there is a issue in RibbonWindow and not in ChromelessWindow. But in your last update you have mentioned that issue reproduced in ChromelessWindow. Can you please confirm in which issue get reproduced? Also please update whether the issue reproduce only after adding Chinese words in the application.
Also please update whether this issue reproduced only in one machine or in all other machines. These details will help us to narrow the issue.
Regards, Venkateshwaran V.R.
HZHongbin ZouJuly 2, 2016 08:00 AM UTC
Sorry for the late reply, I was too busy to make a thorough test in weekdays.
I also have this confusion for ChromelessWindow. In some cases ClearType works, others don't. I'll show you what I found.
This time I uploaded 3 solutions together with their screenshots:
1. DefaultFontRendering: This is created solely with WPF built-in controls. Of course it works correctly. If I set "TextOptions.TextRenderingMode" as "ClearType", I can see ClearType, and If I set "TextOptions.TextRenderingMode" as "GrayScale", I can see GrayScale.
2. SfFontRendering: The only difference between DefaultFontRendering and SfFontRendering is switching from Window to ChromelessWindow. This time, I can only see GrayScale no matter what value I set to "TextOptions.TextRenderingMode".
3. SfWithMetro: The only difference between SfFontRendering and SfWithMetro is adding syncfusion:LayoutControl.SetMetroMode="True" toSfWithMetro (and a reference to Syncfusion.SampleLayout.dll). This is the same method used in your demos. This time, ClearType and GrayScale options works again, although the window is a ChromelessWindow.
Note that when used ChromelessWindow, the rendering details of Chinese texts are different from system default.
And back to my first post, when the window is a RibbonWindow, even setting syncfusion:LayoutControl.SetMetroMode="True" cannot make ClearType work.
The issue occurs no matter what characters I add to the app. For the SfFontRendering project, even if I remove all the controls, I can still see the "MainWindow" title rendered using GrayScale.
Also, the issue occurs in all the Win7/Win10 computers I can find (Win7 also have this issue. See SfFontRendering/win7.png), The system language of them are all Chinese (Simplified).
Although his thread is not about text rendering, you can see that in the first image posted, texts are rendered with ClearType while in the 2nd image, all texts are GrayScale. And it looks that he is also from China because he is using a Chinese font. There is something wrong for rendering Chinese and probably other languages.
HZHongbin ZouJuly 2, 2016 08:44 AM UTC
"Note that when used ChromelessWindow, the rendering details of Chinese texts are different from system default."
To be clear, by "the rendering details of Chinese texts" I mean stroke details. Those strokes are not the way they are in Simplified Chinese (maybe Traditional Chinese I guess).
Also note that this stroke issue doesn't occur all the time. when using font "Microsoft YaHei", which is the default font used in Win7/8/10, stroke details are incorrect. For font "KaiTi", stroke details are correct.
HZHongbin ZouJuly 2, 2016 09:11 AM UTC
In this post by Nick Tang (see link below), you can see that the main window is rendered ClearType while the context menu is rendered GrayScale. Inconsistent, right? I don't really think he is doing this on purpose.
MSMariappan S Syncfusion Team July 7, 2016 12:59 PM UTC
We were able to reproduce the issue and have logged defect report regarding this. A support incident to track the status of this defect has been created under your account. Please log on to our support website to check for further updates