1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

fix(UI): actually load bundled Unicode font as soon as possible

Hopefully this fixes an issue with ugly fonts that started happening
some time ago for Windows & FreeBSD users.
This commit is contained in:
Zetok Zalbavar 2016-11-13 16:16:03 +00:00
parent d1ec8cc989
commit bfd47733c2
No known key found for this signature in database
GPG Key ID: C953D3880212068A

View File

@ -134,6 +134,14 @@ int main(int argc, char* argv[])
a.setOrganizationName("Tox");
a.setApplicationVersion("\nGit commit: " + QString(GIT_VERSION));
// Install Unicode 6.1 supporting font
// Keep this as close to the beginning of `main()` as possible, otherwise
// on systems that have poor support for Unicode qTox will look bad.
if (QFontDatabase::addApplicationFont("://font/DejaVuSans.ttf") == -1) {
qWarning() << "Couldn't load font";
}
#if defined(Q_OS_OSX)
// TODO: Add setting to enable this feature.
// osx::moveToAppFolder();
@ -207,10 +215,6 @@ int main(int argc, char* argv[])
qDebug() << "built on: " << __TIME__ << __DATE__ << "(" << TIMESTAMP << ")";
qDebug() << "commit: " << GIT_VERSION << "\n";
// Install Unicode 6.1 supporting font
if (QFontDatabase::addApplicationFont("://font/DejaVuSans.ttf") == -1) {
qWarning() << "Couldn't load font";
}
// Check whether we have an update waiting to be installed
#if AUTOUPDATE_ENABLED