Add fallback font hack for Steam Link
This commit is contained in:
parent
bcff327565
commit
555032c15c
1 changed files with 13 additions and 0 deletions
13
app/main.cpp
13
app/main.cpp
|
|
@ -7,6 +7,7 @@
|
|||
#include <QtDebug>
|
||||
#include <QNetworkProxyFactory>
|
||||
#include <QPalette>
|
||||
#include <QFont>
|
||||
|
||||
// Don't let SDL hook our main function, since Qt is already
|
||||
// doing the same thing. This needs to be before any headers
|
||||
|
|
@ -318,6 +319,18 @@ int main(int argc, char *argv[])
|
|||
app.setPalette(QPalette(Qt::lightGray));
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SLVIDEO
|
||||
// Qt 5.9 from the Steam Link SDK is not able to load any fonts
|
||||
// since the Steam Link doesn't include any of the ones it looks
|
||||
// for. We know it has NotoSans so we will explicitly ask for that.
|
||||
if (app.font().family().isEmpty()) {
|
||||
qWarning() << "SL HACK: No default font - using NotoSans";
|
||||
|
||||
QFont fon("NotoSans");
|
||||
app.setFont(fon);
|
||||
}
|
||||
#endif
|
||||
|
||||
app.setWindowIcon(QIcon(":/res/moonlight.svg"));
|
||||
|
||||
// Register our C++ types for QML
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue