Embedded TTF does not work in QT5 for Linux GUI application.
-
wrote on 27 Jun 2019, 10:19 last edited by
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 :)
-
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(...) );
-
@LostDeveloper
does the following return what you expect?qDebug() << QFontDatabase::applicationFontFamilies( QFontDatabase::addApplicationFont(...) );
wrote on 28 Jun 2019, 02:54 last edited by@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.```
-
@LostDeveloper
does the following return what you expect?qDebug() << QFontDatabase::applicationFontFamilies( QFontDatabase::addApplicationFont(...) );
wrote on 28 Jun 2019, 03:17 last edited by@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 "( )".
-
wrote on 28 Jun 2019, 05:53 last edited byThis post is deleted!
-
wrote on 1 Jul 2019, 02:56 last edited by
I already made it work.. thanks anyway.
-
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.
-
I already made it work.. thanks anyway.
wrote on 9 Jan 2023, 19:52 last edited by@LostDeveloper Hi! I have the same problem, please share the solution with us