Hindi and Gujarati font support for Qt5 on i.MX6 (Yocto Linux 4.1.15)
As part of my current project, we need to support multiple languages on our Qt5 application.
To get started with localization, I have made a simple program which support English, Hindi and Gujarati.
I have referred the Qt reference and made the application using Qt Linguist.
The application works fine on the Desktop (from Qt Creator with Qt5.7) and all language is supported fine.
But, when I ported the same to the i.MX6 custom platform, then only English will display (Hindi and Gujarati will get blank and nothing will display on this language). The i.MX6 platform is based on Yocto Linux 4.1.15.
I got to know that, the Hindi and Gujarati support may not be available in the i.MX6 by default and adding that might solve this issue. But, I don't know how to add it in Qt.
Whether just copy and paste a correct *.ttf font file under "usr/lib/fonts" will solve this issue? Or any recommended way in Qt to do this?
Looking forward to your reply.
Thank you in advance,
Ajith P V
Hi @jsulm ,
Thank you for your support.
I have tried the following method and is working fine on the target (i.MX6 Dualite):
Found what *.ttf files are using by default for the required languages in the Host PC.
Copy those *.ttf files into the target under '/usr/lib/fonts'
Since the Qt can understand the default True Type Fonts, it is working fine on the target platform.
I got this hint from the link provided by @jsulm :)
@Ajith_P_V Glad it helped! :-)
gu_IN Gujarati India
hi_IN Hindi India
@Cleiton-Bueno Thank you very much for providing me more information on the Yocto language selection.