mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-14 11:02:19 +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 <QNetworkDiskCache>
|
||||||
#include <QDesktopServices>
|
#include <QDesktopServices>
|
||||||
|
#include <QFontDatabase>
|
||||||
#include <QSqlDatabase>
|
#include <QSqlDatabase>
|
||||||
#include <QLibraryInfo>
|
#include <QLibraryInfo>
|
||||||
#include <QTranslator>
|
#include <QTranslator>
|
||||||
|
@ -116,6 +117,16 @@ MainApplication::MainApplication(int &argc, char** argv)
|
||||||
QIcon::setThemeName(QSL("oxygen-fallback"));
|
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;
|
QUrl startUrl;
|
||||||
QString startProfile;
|
QString startProfile;
|
||||||
QStringList messages;
|
QStringList messages;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user