Android: Also populate database with otf fonts
On Android 5, the Chinese fallback fonts are .otf format, and these were ignored when we populated the font database. Note that this also requires an upgrade of FreeType, otherwise the Simplified Chinese font will not load. [ChangeLog][Android] Fixed rendering Chinese text on Android 5. Change-Id: I972d0fbc0b16458650a7b82ea82a0ddd5bdfa641 Task-number: QTBUG-44648 Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>bb10
parent
aa645caec1
commit
d0d107ffc8
|
|
@ -51,10 +51,10 @@ void QAndroidPlatformFontDatabase::populateFontDatabase()
|
|||
qPrintable(fontpath));
|
||||
}
|
||||
|
||||
QDir dir(fontpath, QLatin1String("*.ttf"));
|
||||
for (int i = 0; i < int(dir.count()); ++i) {
|
||||
const QByteArray file = QFile::encodeName(dir.absoluteFilePath(dir[i]));
|
||||
|
||||
QDir dir(fontpath);
|
||||
QList<QFileInfo> entries = dir.entryInfoList(QStringList() << QStringLiteral("*.ttf") << QStringLiteral("*.otf"), QDir::Files);
|
||||
for (int i = 0; i < int(entries.count()); ++i) {
|
||||
const QByteArray file = QFile::encodeName(entries.at(i).absoluteFilePath());
|
||||
QSupportedWritingSystems supportedWritingSystems;
|
||||
QStringList families = addTTFile(QByteArray(), file, &supportedWritingSystems);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue