mirror of
https://github.com/Murmele/Gittyup.git
synced 2024-09-11 10:45:39 +03:00
Fix search for SFMono font on macOS Catalina
This commit is contained in:
parent
ebfaced770
commit
1e7809521f
@ -165,8 +165,12 @@ Application::Application(int &argc, char **argv, bool haltOnParseError)
|
||||
registerService();
|
||||
|
||||
// Load SF Mono font from Terminal.app.
|
||||
QDir dir("/Applications/Utilities/Terminal.app/Contents/Resources/Fonts");
|
||||
QFontDatabase::addApplicationFont(dir.filePath("SFMono-Regular.otf"));
|
||||
QDir dir("/System/Applications");
|
||||
if (!dir.exists())
|
||||
dir = "/Applications";
|
||||
dir.cd("Utilities/Terminal.app/Contents/Resources/Fonts");
|
||||
foreach (const QString &name, dir.entryList({"SFMono-*.otf"}, QDir::Files))
|
||||
QFontDatabase::addApplicationFont(dir.filePath(name));
|
||||
|
||||
// Don't quit on close.
|
||||
setQuitOnLastWindowClosed(false);
|
||||
|
Loading…
Reference in New Issue
Block a user