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:
parent
d1ec8cc989
commit
bfd47733c2
12
src/main.cpp
12
src/main.cpp
@ -134,6 +134,14 @@ int main(int argc, char* argv[])
|
|||||||
a.setOrganizationName("Tox");
|
a.setOrganizationName("Tox");
|
||||||
a.setApplicationVersion("\nGit commit: " + QString(GIT_VERSION));
|
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)
|
#if defined(Q_OS_OSX)
|
||||||
// TODO: Add setting to enable this feature.
|
// TODO: Add setting to enable this feature.
|
||||||
// osx::moveToAppFolder();
|
// osx::moveToAppFolder();
|
||||||
@ -207,10 +215,6 @@ int main(int argc, char* argv[])
|
|||||||
qDebug() << "built on: " << __TIME__ << __DATE__ << "(" << TIMESTAMP << ")";
|
qDebug() << "built on: " << __TIME__ << __DATE__ << "(" << TIMESTAMP << ")";
|
||||||
qDebug() << "commit: " << GIT_VERSION << "\n";
|
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
|
// Check whether we have an update waiting to be installed
|
||||||
#if AUTOUPDATE_ENABLED
|
#if AUTOUPDATE_ENABLED
|
||||||
|
Loading…
x
Reference in New Issue
Block a user