Skip to main content
Home Forums Silverlight Programming Report a Silverlight Bug The font of Chinese character display strange!
2 replies. Latest Post by than1975 on March 26, 2008.
(0)
than1975
Member
2 points
2 Posts
03-24-2008 10:20 PM |
Hi,
Using SL 2.0 beta1, the font of Chinese character display strange for TextBlock control!
Looks like 1 font is displayed to 2 fonts, some charaters are bold and others are not, but all of them are not bold and using a same font.
Allen Ch...
Star
13862 points
1,803 Posts
03-26-2008 2:56 AM |
Hi:
What font are you using? Try to set "SimSun" (宋体) as the FontFamily to see if it works.
<TextBlock FontFamily="SimSun"
Regards
03-26-2008 3:29 AM |
Thanks for your reply.
Just found the issue: if I input text directly from the design panel of Blend2.5, the xmal will become like following, and the font will be wrong, so it should be a bug of Blend2.5:
<TextBlock x:Name="tb1" TextWrapping="Wrap" FontFamily="SimSun" FontWeight="Normal" Margin="0,0,0,0" VerticalAlignment="Top" FontSize="24" Width="415" HorizontalAlignment="Left" Height="156" RenderTransformOrigin="0.5,0.5"> <Run Text="在一个textblock里显示汉字,怎么有些字粗有些细,而且字体里没有汉字字体可选" FontFamily="Portable User Interface" FontSize="14.666666984558106" FontStretch="Normal" FontStyle="Normal" FontWeight="Normal" Foreground="#FF000000"/> <LineBreak FontFamily="Portable User Interface" FontSize="14.666666984558106" FontStretch="Normal" FontStyle="Normal" FontWeight="Normal" Foreground="#FF000000"/> <Run Text="怎么有些字粗有些细" FontFamily="Portable User Interface" FontSize="14.666666984558106" FontStretch="Normal" FontStyle="Normal" FontWeight="Normal" Foreground="#FF000000"/> </TextBlock>