06-16-2012 02:48 PM - edited 06-17-2012 01:26 PM
Hi,
On my BB10 Dev Alpha device the Qt fonts seem to be located in:
/base/usr/lib/qt4/lib/fonts
but my app is looking for them here:
/base/usr/lib/qt4/fonts
How do I make my app look for them elsewhere? How can I set an environment variable to do this please?
Thanks in advance,
Yalnte
Solved! Go to Solution.
06-17-2012 01:28 PM - edited 06-17-2012 01:29 PM
I've tried the following additional code, but it is still saying it can't find the fonts in /base/usr/lib/qt4/fonts. I don't seem to be able to move them either (don't have enough permissions apparently).![]()
QFontDatabase::removeAllApplicationFonts(); QString Fpath = "/base/usr/lib/qt4/lib/fonts/helvetica_80_75i.qpf"; QFontDatabase::addApplicationFont(Fpath);
06-18-2012 12:47 PM
Hello there,
to specify the font directory, add the following to your bar file
<env var="QT_QPA_FONTDIR" value="/usr/lib/qt4/lib/fonts"/>
This fixes the error from QFontDatabase on startup.
I noticed you are also attempting to use QtQui in your application, if you were not aware Cascades is a better option and has deeper integration with the system compared to QtQui, so take a look at it if you haven't done so already.
Cheers
Selom
06-18-2012 05:35 PM
Thanks very much - that seems to have fixed it.
I'd like to use Cascades at some point, but for now I just want to get my app ported across and working in some form!
03-02-2013 05:17 AM - edited 03-02-2013 05:27 AM
Hi,
I have to show the custom fonts only for some of the labels. I have keep my .ttf file in assets folder and used in Label as textStyle.fontFamily: "myfont.ttf". I have also declared
i tried this link also but all wain
in bar file but though i'm not getting the result. Tell me if i'm wrong anywhere and how to solve this issue. Thanks in advance.