Bundle fonts into the app

- Create QApplication instance before font initialization, otherwise
  QFontDatabase crashes.
- Fix broken QRC font paths
This commit is contained in:
Konstantinos Sideris 2017-04-25 17:36:52 +03:00
parent b4f964b202
commit da39975047

View file

@ -23,22 +23,20 @@
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QCoreApplication::setApplicationName("nheko");
QCoreApplication::setApplicationVersion("Ωμέγa");
QCoreApplication::setOrganizationName("Nheko");
QFontDatabase::addApplicationFont(":/fonts/OpenSans-Light.ttf");
QFontDatabase::addApplicationFont(":/fonts/OpenSans-Regular.ttf");
QFontDatabase::addApplicationFont(":/fonts/OpenSans-Italic.ttf");
QFontDatabase::addApplicationFont(":/fonts/OpenSans-Bold.ttf");
QFontDatabase::addApplicationFont(":/fonts/OpenSans-BoldItalic.ttf");
QFontDatabase::addApplicationFont(":/fonts/OpenSans-Semibold.ttf");
QFontDatabase::addApplicationFont(":/fonts/OpenSans-SemiboldItalic.ttf");
QFontDatabase::addApplicationFont(":/fonts/OpenSans-ExtraBold.ttf");
QFontDatabase::addApplicationFont(":/fonts/OpenSans-ExtraBoldItalic.ttf");
QFontDatabase::addApplicationFont(":/fonts/emojione-android.ttf");
QFontDatabase::addApplicationFont(":/fonts/fonts/OpenSans/OpenSans-Regular.ttf");
QFontDatabase::addApplicationFont(":/fonts/fonts/OpenSans/OpenSans-Italic.ttf");
QFontDatabase::addApplicationFont(":/fonts/fonts/OpenSans/OpenSans-Bold.ttf");
QFontDatabase::addApplicationFont(":/fonts/fonts/OpenSans/OpenSans-BoldItalic.ttf");
QFontDatabase::addApplicationFont(":/fonts/fonts/OpenSans/OpenSans-Semibold.ttf");
QFontDatabase::addApplicationFont(":/fonts/fonts/OpenSans/OpenSans-SemiboldItalic.ttf");
QFontDatabase::addApplicationFont(":/fonts/fonts/EmojiOne/emojione-android.ttf");
QApplication app(argc, argv);
app.setWindowIcon(QIcon(":/logos/nheko.png"));
app.setStyleSheet(