Add fallback font hack for Steam Link

This commit is contained in:
Cameron Gutman 2019-03-22 20:53:02 -07:00
commit 555032c15c

View file

@ -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