Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
How to show Thailand characters in Qt
On PC, my application can blink between Thailand and English character.
On imx6 device, my application can only show English, not Thailand character.
How to resolve.
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.
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.
This is the most logical to-do list.
I have done it but still not working.
A text-label has different font type. it is currently set as A[Ubuntu,20]
downloaded font is blk-bangli-ko-sa-na, blk-suphanburi. Any new suggestion. thanks
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);
i try below and still not working. What does the below Statement do ???
QFont newFont("blk-bangli-ko-sa-na", 8, QFont::Bold, true);
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.
In mainwindow.ui, have set label Font(family) to blk-bangli-ko-sa-na.
I am confused, thai character still not showing.
Did you check that your font can be found like already suggested ?
How get professional help :>
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.