From 555032c15c9b8d72aaedffcdd577459e972d26d1 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Fri, 22 Mar 2019 20:53:02 -0700 Subject: [PATCH] Add fallback font hack for Steam Link --- app/main.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/app/main.cpp b/app/main.cpp index 928a2e7d..a7304244 100644 --- a/app/main.cpp +++ b/app/main.cpp @@ -7,6 +7,7 @@ #include #include #include +#include // 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