mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-11 09:32:12 +01:00
[Windows] Load font.tff (if exists) and set it as default font
This is needed for N'ko translation as default Windows fonts doesn't contain glyphs for N'ko language. Closes #1223
This commit is contained in:
parent
7fab76b79b
commit
d534062cdd
|
@ -53,6 +53,7 @@
|
|||
|
||||
#include <QNetworkDiskCache>
|
||||
#include <QDesktopServices>
|
||||
#include <QFontDatabase>
|
||||
#include <QSqlDatabase>
|
||||
#include <QLibraryInfo>
|
||||
#include <QTranslator>
|
||||
|
@ -116,6 +117,16 @@ MainApplication::MainApplication(int &argc, char** argv)
|
|||
QIcon::setThemeName(QSL("oxygen-fallback"));
|
||||
}
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
// Set default app font (needed for N'ko)
|
||||
int fontId = QFontDatabase::addApplicationFont(QSL("font.ttf"));
|
||||
if (fontId != -1) {
|
||||
const QStringList families = QFontDatabase::applicationFontFamilies(fontId);
|
||||
if (!families.empty())
|
||||
setFont(QFont(families.first()));
|
||||
}
|
||||
#endif
|
||||
|
||||
QUrl startUrl;
|
||||
QString startProfile;
|
||||
QStringList messages;
|
||||
|
|
Loading…
Reference in New Issue
Block a user