if (!pattern)
return family;
- QByteArray cs = family.toUtf8();
- FcPatternAddString(pattern, FC_FAMILY, (const FcChar8 *) cs.constData());
+ if (!family.isEmpty()) {
+ QByteArray cs = family.toUtf8();
+ FcPatternAddString(pattern, FC_FAMILY, (const FcChar8 *) cs.constData());
+ }
FcConfigSubstitute(0, pattern, FcMatchPattern);
FcDefaultSubstitute(pattern);
return resolved;
}
+
+QFont QFontconfigDatabase::defaultFont() const
+{
+ return QFont(resolveFontFamilyAlias(QString()));
+}
QStringList fallbacksForFamily(const QString family, const QFont::Style &style, const QFont::StyleHint &styleHint, const QUnicodeTables::Script &script) const;
QStringList addApplicationFont(const QByteArray &fontData, const QString &fileName);
QString resolveFontFamilyAlias(const QString &family) const;
+ QFont defaultFont() const;
};
#endif // QFONTCONFIGDATABASE_H
QApplication::processEvents();
QTest::qWait(50);
QCOMPARE(bar->value(), bar->maximum());
- QEXPECT_FAIL("LeftToRight", "QTBUG-21833", Abort);
QCOMPARE(bar->maximum(), rowCount/4 - nbVisibleItem);
}