当前位置: 动力学知识库 > 问答 > 编程问答 >

linux - Korean font display in imx6q based board

问题描述:

I am working on a multi language application in Qt. I need to support Chinese, Japanese, Korean along with english. For that I have used "makeqpf" tool to convert ukai.ttf (supports chinese and japanese) and UnDotum.ttf (supports korean) font qpf formant and copied them to my target board (imx6q based board) at /usr/local/Trolltech/lib/fonts. Once copied to target, after selecting chinese/japanese from drop down box, I can see my strings on the screen converted to the appropriate language. I am using translations to convert the strings and added the .ts & .qm files as resources to my project.

But when I select korean from language combo box, I don't see any text on the screen, complete blank strings.

But when I try to run the app with "-fn UnDotum" option as below,

./MyTestApp -qws -fn UnDotum

I was able to see korean translation strings also on the screen when selected from combo box. But when I ran the application like this, the english font is not displayed properly. I have some text with large font, some text with bold, but with "-fn UnDotum" option every text looks of same size and normal text (no bold).

I have verified if the UnDotum font is loaded or not with following.

QFontDatabase *fdb = new QFontDatabase ;

QStringList fam2 = fdb->families(QFontDatabase::Korean);

qDebug() << "QFontDatabase::Korean: available font families" ;

for(int i=0 ; i< fam2.count(); i++){

qDebug() << fam2[i] ;

}

and I can see UnDotum font is loaded and available.

I have tried the following code also to see what exactly is the font loaded

QFont font("UnDotum", 10, QFont::Bold);

QFontInfo fontInfo(font);

qDebug() << "Expected:" << font.family() << "Real:" << fontInfo.family();

and I can see the output as

Expected: "UnDotum" Real: "UnDotum"

But still all the strings on the screen are shown as blank spaces

I have tried to run the i18n example located at "/usr/local/Trolltech/examples/tools/i18n" on my target board.. but there also for korean language nothing is displayed. Simply blank space is shown for all the strings.

I have tried with many other korean fonts also (batang, Code2000, UnShinmum,NanumGothic, UnPilgi etc.,) but same result

Can someone guide me what I am missing?

I am working on qt-embedded linux environment

分享给朋友:
您可能感兴趣的文章:
随机阅读: