Silverlight renders few Chinese characters as Bold in a text box. This textbox has no font family set on it. Please refer to the following screenshot
In the above screenshot, first character is bolder than the other. One of the MSDN posts says that this is because of the font family problem and setting SimSun
font family should fix the problem. Here is the screenshot after the applying the font family.
It looks like setting SimSun
is actually fixing the issue. But I am not sure if this is the correct fix as my application allows to enter data in any language and not just Chinese. So I don't want to set font family to Chinese font.
I am wondering, since the data is Unicode (UTF16) encoded, the rendering engine should take care of choosing the correct font and render it properly right?
I am looking for proper ways to fix this problem. Any suggestions would be helpful.
Using Silverlight 3 with .NET3.5开发者_运维问答.
The problem is with the font's description of itself. Your default font, depending on your computer, is likely Arial, which may not render some Chinese characters very nicely. SimSun is a font that is designed to render Chinese characters, so just like Latin-based fonts tend to render English nicely, SimSun renders Han characters nicer.
Wikipedia has a list of Unicode fonts that are meant for internationalized text fields such as yours. Maybe give a few of them a try until you find one that meets your needs.
http://en.wikipedia.org/wiki/Unicode_typeface#List_of_Unicode_fonts
精彩评论