I will resolve the problems of Chinese Input.
I glad to know that CEGUI 0.5.0 can auto load TTF Font.
but I think I find some BUG in "CEGUIFreeTypeFont.cpp".
1. When I put "一"(the WCHAR), its UNCODE "0x4E00",the BUG is coming out.(the same as other Font with UNCODE like "0x??00").
2.When I put "?"(the WCHAR),its UNCODE "0xFF1F", another BUG is coming out.(the same as other Font with bigger UNCODE).
I see the codes, There are some problem in
Code: Select all
void FreeTypeFont::rasterize (utf32 start_codepoint, utf32 end_codepoint){
CodepointMap::const_iterator s = d_cp_map.upper_bound(start_codepoint);
int i = s->first;
if (s == d_cp_map.end ())
return;
CodepointMap::const_iterator orig_s = s;
CodepointMap::const_iterator e = d_cp_map.upper_bound(end_codepoint);
There are wrong range and no enough check.(in my opinion)
So I fixed the code to
Code: Select all
void FreeTypeFont::rasterize (utf32 start_codepoint, utf32 end_codepoint)
{
CodepointMap::const_iterator s = d_cp_map.lower_bound (start_codepoint);
int i = s->first;
if (s == d_cp_map.end ())
return;
CodepointMap::const_iterator orig_s = s;
CodepointMap::const_iterator e = d_cp_map.lower_bound (end_codepoint);
if(e == d_cp_map.end())
--e;