[Solved]Certain ttf files dont work with Qt, on ARM machine
-
wrote on 25 Sept 2013, 14:09 last edited by
Hi all,
I am a beginner in Qt. Trying to develop an application to support multiple languages in Qt(on ARM machine). I tried loading some ttf files, which gave some junk display, while some gave BOXes, some gave correct and required output. Why does this happen? I haven't changed my application. Only the ttf files, their resource file names and family font names are changed, wherever needed.
@QFile fontFile("katakana.ttf");@
@QFont font3("Katakana", 25, QFont::Bold, true);@
Any pointers are appreciated...
Thanks in advance.
-
Hi,
Are you sure you have the file installed at the right place when loading them ?
-
wrote on 26 Sept 2013, 04:26 last edited by
@SGaist..
Hi,
Thanks for your reply...
I've installed them in /usr/local/Qt/lib/fonts, from where it takes font files...
May I know if that a wrong place to keep the font files...
-
Seems all right, could you verify what QFontDatabase::families() return ?
-
wrote on 26 Sept 2013, 08:45 last edited by
Hi SGaist,
It returns all pre-installed fonts and those which I've installed for my application... But the application works with some of the fonts and not with some others... If the issue was with font file location, none of them should work,right???
-
Indeed, do you have FontConfig installed properly on your target ?
-
wrote on 3 Oct 2013, 04:38 last edited by
Can you please tell me how do I check it?? I've read about it while searching for a solution... But not clear about what to do with that.. Can you please explain its function?
-
First thing is to check that it's been compiled. Look at the summary after you called configure when cross-compiling Qt.
Then it depends on your target OS, which is it ?
-
wrote on 3 Oct 2013, 10:46 last edited by
OS used is Embedded Linux.
I'll verify if fontcofig has been compiled or not and let you know.
Can you please explain me what does it do? -
Embedded Linux is a bit vast, is it debian, openembedded, a custom built system etc... ?
The "fontconfig site":http://www.freedesktop.org/wiki/Software/fontconfig/ covers that well :)
-
wrote on 4 Oct 2013, 09:03 last edited by
Thank you so much SGaist.
Its a custom-built one...
-
You're welcome
Then you need to add fontconfig to your build and also check that your Qt builds the support for it
-
wrote on 9 Oct 2013, 09:28 last edited by
:) thats done..it works fine...
2/13