forked from qt-creator/qt-creator
Use "Source Code Pro" as default editor font on non-macOS
Change-Id: Ie0e8e9de8d2f3761ba033d139c74edab13534e3d Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
@@ -35,6 +35,7 @@
|
||||
#include <QDebug>
|
||||
#include <QFile>
|
||||
#include <QFont>
|
||||
#include <QFontDatabase>
|
||||
#include <QSettings>
|
||||
#include <QTextCharFormat>
|
||||
|
||||
@@ -410,6 +411,12 @@ static QString defaultFontFamily()
|
||||
{
|
||||
if (Utils::HostOsInfo::isMacHost())
|
||||
return QLatin1String("Monaco");
|
||||
|
||||
const QString sourceCodePro("Source Code Pro");
|
||||
const QFontDatabase dataBase;
|
||||
if (dataBase.hasFamily(sourceCodePro))
|
||||
return sourceCodePro;
|
||||
|
||||
if (Utils::HostOsInfo::isAnyUnixHost())
|
||||
return QLatin1String("Monospace");
|
||||
return QLatin1String("Courier");
|
||||
|
||||
Reference in New Issue
Block a user