Set Roboto as the default font on Android
Roboto is the default font on Android. So far, Helvetica was used, which is usually unavailable on Android. Task-number: QTBUG-87405 Change-Id: I53332403a43f6a005ce73ece68b8dddc41b4b58c Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
This commit is contained in:
parent
723a4e2b89
commit
00f1bd00d0
@ -48,6 +48,11 @@ QString QAndroidPlatformFontDatabase::fontDir() const
|
|||||||
return QLatin1String("/system/fonts");
|
return QLatin1String("/system/fonts");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QFont QAndroidPlatformFontDatabase::defaultFont() const
|
||||||
|
{
|
||||||
|
return QFont(QLatin1String("Roboto"));
|
||||||
|
}
|
||||||
|
|
||||||
void QAndroidPlatformFontDatabase::populateFontDatabase()
|
void QAndroidPlatformFontDatabase::populateFontDatabase()
|
||||||
{
|
{
|
||||||
QString fontpath = fontDir();
|
QString fontpath = fontDir();
|
||||||
|
@ -49,6 +49,7 @@ class QAndroidPlatformFontDatabase: public QFreeTypeFontDatabase
|
|||||||
public:
|
public:
|
||||||
QString fontDir() const override;
|
QString fontDir() const override;
|
||||||
void populateFontDatabase() override;
|
void populateFontDatabase() override;
|
||||||
|
QFont defaultFont() const override;
|
||||||
QStringList fallbacksForFamily(const QString &family,
|
QStringList fallbacksForFamily(const QString &family,
|
||||||
QFont::Style style,
|
QFont::Style style,
|
||||||
QFont::StyleHint styleHint,
|
QFont::StyleHint styleHint,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user