Skip FcCharSetHasChar() call

...if writing system is already known to be supported

Change-Id: Id7ea11e92507a283b2fba2ad944dd0a9772e484d
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
bb10
Konstantin Ritt 2012-12-22 19:47:20 +02:00 committed by The Qt Project
parent cc378774b8
commit 1b9fdb9b31
1 changed files with 1 additions and 1 deletions

View File

@ -443,7 +443,7 @@ void QFontconfigDatabase::populateFontDatabase()
// some languages are not supported by FontConfig, we rather check the
// charset to detect these
for (int i = 1; i < SampleCharCount; ++i) {
if (!sampleCharForWritingSystem[i])
if (!sampleCharForWritingSystem[i] || writingSystems.supported(QFontDatabase::WritingSystem(i)))
continue;
if (FcCharSetHasChar(cs, sampleCharForWritingSystem[i]))
writingSystems.setSupported(QFontDatabase::WritingSystem(i));