Chinese, and other International Text in WPF/E

For our friends in the international community, text rendering is possible by means of the Glyph tag.

So, for example this XAML:

  <Canvas x:Name="GlyphDisplayCanvas" Canvas.Left="0" Canvas.Top="0" >

 

    <Glyphs x:Name="GlyphDisplay" Fill="Black" FontUri="./simhei.ttf"

 

          FontRenderingEmSize="48" UnicodeString="你好, 你好吗?" />

 

</Canvas>

Will render Chinese text in WPF/E.

Please note a couple of things:

1: You have to use the FontUri to specify the font, and you must use a font that supports the characters.

2: Make sure that you are licensed to redistribute said font.

I am working on a Whitepaper for MSDN to show how this can be used in conjunction with ASP.NET controls for IME-based text input in far eastern languages.

If you read Chinese, check out my colleague, Hong Chao Wang's blog for more details...

http://blog.joycode.com/joy/archive/2007/04/06/100553.aspx