Skip to main content

Microsoft Silverlight

Answered Question The font of Chinese character display strange!RSS Feed

(0)

than1975
than1975

Member

Member

2 points

2 Posts

The font of Chinese character display strange!

Tongue TiedHi,

 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 Chen – MSFT
Allen Ch...

Star

Star

13862 points

1,803 Posts

Answered Question

Re: The font of Chinese character display strange!

Hi:

  What font are you using? Try to set "SimSun" (宋体) as the FontFamily to see if it works.

  <TextBlock FontFamily="SimSun"

Regards

Sincerely,
Allen Chen
Microsoft Online Community Support

Please remember to mark the replies as answers if they help and unmark them if they provide no help.

than1975
than1975

Member

Member

2 points

2 Posts

Re: The font of Chinese character display strange!

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>

  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities