在我的应用程序中,FTGL 可以很好地呈现真字体的 unicode 字符,但复合字符除外。复合字符是 unicode 辅音和元音的组合。
例如,在印度语言泰米尔语中,以下字符串输入
“கா கி கீ கு கூ கெ கே கை கொ கோ கௌ”
显示为
在openGL 查看器中。
某些字符的输出与输入不同。
有人可以帮忙吗?
我的代码片段,
std::ifstream fontFile("latha.ttf", std::ios::binary);//tamil unicode font
if (fontFile.fail())
return NULL;
fontFile.seekg(0, std::ios::end);
std::fstream::pos_type fontFileSize = fontFile.tellg();
fontFile.seekg(0);
unsigned char *fontBuffer = new unsigned char[fontFileSize];
fontFile.read((char *)fontBuffer, fontFileSize);
FTBitmapFont* m_pFTFont = new FTBitmapFont(fontBuffer, fontFileSize);
m_pFTFont->Render("கா கி கீ கு கூ கெ கே கை கொ கோ கௌ");