How to show Thailand characters in Qt
-
Hello Houmingc,
Are you missing Thai fonts in your target? Probably, you might think off adding Thai fonts, example - "Thai Fonts":http://www.into-asia.com/thai_language/thaifont/
And to confirm, when you switch to Thai language, what do you see? Do you see "Boxes" in the UI?
-
yes, i see "boxes" in the UI from the target, but for english character, i have no problem viewing.
I downloaded thai characters Book_SabuyDee.ttf into target folder(/usr/lib).
I still can't display thai character. (/usr/lib) is the directory i put english font. -
Hi Houmingc,
Can you check if you have "Thai" font in your embedded target?
One example would be: In my embedded target, I could not see the chinese characters. And I could see only "boxes". Then after adding the right font to the right place, I can see the chinese characters.
-
If I understand correctly,
You have downloaded the right font. But the application is using "Arial". Usually, as per my observation, if the correct font has not been set, then Qt would load the default font.
From the behaviour, it looks like, the font is not set.
Can you try setting the font by yourself
@
QFont newFont("Courier", 8, QFont::Bold, true);
QApplication::setFont(newFont);
@ -
Hi,
Are you sure you put the font in the proper place ? You can use QFontDabase to get more information and depending on your needs setup your Thaï font for your application.
-
Did you check that your font can be found like already suggested ?
-
Buy a Qt license or get in touch with The Qt Company, KDAB, ICS to make a contract.
-
As Sam mentioned, QFontDatabase can help you to get more information on the fonts. That will help you to be sure on the font that you are using.
"Font familes":http://qt-project.org/doc/qt-4.8/qfontdatabase.html#families