Embedded TTF does not work in QT5 for Linux GUI application.
-
Hi,
I got problem with using my own TTF for my application.
I installed libfontconfig-dev and all its dependencies.
The QFontDatabase::addApplicationFont(<path of font-family>) function returns success but when I use my font-family in setFont(QFont(font-family)) nothing happens. The font-family is not reflected.Your inputs are greatly appreciated :)
-
@LostDeveloper
does the following return what you expect?qDebug() << QFontDatabase::applicationFontFamilies( QFontDatabase::addApplicationFont(...) );
-
@raven-worx I will try that.
I did this yesterday too..
//QFontDatabase db; for(int i=0; i<db.families().size(); i++) { qDebug() << db.families().at(i); }``` // But my font-family is not listed.```
-
@raven-worx said in Embedded TTF does not work in QT5 for Linux GUI application.:
@LostDeveloper
does the following return what you expect?qDebug() << QFontDatabase::applicationFontFamilies( QFontDatabase::addApplicationFont(...) );
This returns "( )".
-
This post is deleted!
-
I already made it work.. thanks anyway.
-
@LostDeveloper Please mark this topic as solved if it is solved.
-
Hi,
How did you make it work ? It might be useful for other people getting the same issue as you.
-
@LostDeveloper Hi! I have the same problem, please share the solution with us