Android: Support QFont::Courier style hint

Android doesn't have a serif monospaced font, so for the courier
style hint we at least need to fall back to something monospaced,
which is "Droid Sans Mono" on Android.

[ChangeLog][Android][Text] Fall back to Droid Sans Mono for
QFont::Courier style hint.

Task-number: QTBUG-37844
Change-Id: Ib42caf53a8fb7b9958e10a8f123cac928eee7069
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
bb10
Eskil Abrahamsen Blomfeldt 2014-05-12 08:24:06 +02:00 committed by The Qt Project
parent 1b2614477f
commit 08117eee00
1 changed files with 1 additions and 1 deletions

View File

@ -82,7 +82,7 @@ QStringList QAndroidPlatformFontDatabase::fallbacksForFamily(const QString &fami
Q_UNUSED(family);
Q_UNUSED(style);
if (styleHint == QFont::Monospace)
if (styleHint == QFont::Monospace || styleHint == QFont::Courier)
return QString(qgetenv("QT_ANDROID_FONTS_MONOSPACE")).split(";") + m_fallbacks[script];
return QString(qgetenv("QT_ANDROID_FONTS")).split(";") + m_fallbacks[script];