<分区>
我正在尝试使用 IwGxFontDrawText 函数在我的 Marmalade 项目中显示西里尔文字符串。我添加了 TimesNewRoman ttf 文件和我的代码:
int main()
{
// Initialise Iw2D
Iw2DInit();
// Create the font that is used to display the score
CIwGxFont *Font = IwGxFontCreateTTFont("TNR_B.ttf", 14);
IwGxLightingOn();
IwGxFontSetFont(Font);
IwGxFontSetRect(CIwRect((int16)10, (int16)10, (int16)IwGxGetScreenWidth(), (int16)IwGxGetScreenHeight()));
int scores = 0;
while (!s3eDeviceCheckQuitRequest())
{
// Clear background to blue
Iw2DSurfaceClear(0xff8080);
IwGxFontDrawText("Привет: ");
// Convert the score number to text
char str[32];
snprintf(str, 32, " %d", scores);
IwGxFontDrawText(str);
scores++;
// Flip the surface buffer to screen
Iw2DSurfaceShow();
s3eDeviceYield(0); // Yield to OS
}
Iw2DTerminate();
return 0;
}
当我显示拉丁文字时 - 一切正常,但当我显示西里尔文字时 - 我收到错误
如何显示西里尔文字?