I have problem when using chinese font!
Posted: Tue Dec 12, 2006 03:33
I searched on the forums and found some way to use chinese font.
but I can't find the CEGUIchineseDemo.zip file now, all the link I can find can't work.
When I try it myself, there is some problem.
I wrote my font file like this, and save it with ascii code.
<?xml version="1.0" ?>
<Font Name="BlueHighway-12" Filename="simfang.ttf" Type="FreeType" Size="12" NativeHorzRes="800" NativeVertRes="600" AutoScaled="true">
<GlyphSet Glyphs="你好世界退出演示"/>
</Font>
But it doesnt works, It throwed exception "ExpatParse::ParseXMLFile - XML Parsing error 'not well formed(invaild token)' at line 3"
Then I try to save the xml file with utf8 code.
It throwed exception "Font::xmlHandler::startElement - Unexcepted data was found while parsing the font file:'GlyphSet' is unknown."
Then I thought about setting GlyphSet in code instead of setting it in xml.
But I found that CEGUI::Font doesn't have defineGlyphSet() function any more.
If I don't set GlyphSet, it works, but I can't see any chinese in application.
Is there any Demo source code which can works with CEGUI5.0b? If there is, please send it to me. Or tell me a solution for the problem?
I am using CEGUI-SDK-0.5.0b-vc8.zip with vs2005.net.
but I can't find the CEGUIchineseDemo.zip file now, all the link I can find can't work.
When I try it myself, there is some problem.
I wrote my font file like this, and save it with ascii code.
<?xml version="1.0" ?>
<Font Name="BlueHighway-12" Filename="simfang.ttf" Type="FreeType" Size="12" NativeHorzRes="800" NativeVertRes="600" AutoScaled="true">
<GlyphSet Glyphs="你好世界退出演示"/>
</Font>
But it doesnt works, It throwed exception "ExpatParse::ParseXMLFile - XML Parsing error 'not well formed(invaild token)' at line 3"
Then I try to save the xml file with utf8 code.
It throwed exception "Font::xmlHandler::startElement - Unexcepted data was found while parsing the font file:'GlyphSet' is unknown."
Then I thought about setting GlyphSet in code instead of setting it in xml.
But I found that CEGUI::Font doesn't have defineGlyphSet() function any more.
If I don't set GlyphSet, it works, but I can't see any chinese in application.
Is there any Demo source code which can works with CEGUI5.0b? If there is, please send it to me. Or tell me a solution for the problem?
I am using CEGUI-SDK-0.5.0b-vc8.zip with vs2005.net.
