CoreText: Avoid populating font family aliases if family was populated
When trying to match a font request to fonts in the database we might end up with a mismatch due to the style not being available, but the font family itself was. If that's the case there's no point in trying to populate font aliases. Fixes: QTBUG-98369 Fixes: QTBUG-99216 Pick-to: 6.3 6.2 5.15 Change-Id: I8776e5b89588a13749c9c7e414c5bfac86feab58 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
This commit is contained in:
parent
b01ee1d44c
commit
64dd5a8183
@ -151,6 +151,12 @@ void QCoreTextFontDatabase::populateFontDatabase()
|
|||||||
bool QCoreTextFontDatabase::populateFamilyAliases(const QString &missingFamily)
|
bool QCoreTextFontDatabase::populateFamilyAliases(const QString &missingFamily)
|
||||||
{
|
{
|
||||||
#if defined(Q_OS_MACOS)
|
#if defined(Q_OS_MACOS)
|
||||||
|
if (isFamilyPopulated(missingFamily)) {
|
||||||
|
// We got here because one of the other properties of the font mismatched,
|
||||||
|
// for example the style, so there's no point in populating font aliases.
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (m_hasPopulatedAliases)
|
if (m_hasPopulatedAliases)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user