Don't duplicate font family names in the fallback list

Fixes: QTBUG-75333
Change-Id: Iaaf4b13d50c6b9b52e629b81d5e9cbc552a0202c
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Andy Shaw 2019-05-03 13:45:53 +02:00 committed by Aapo Keskimolo
parent 22c1e10e19
commit ac68ef1efc
1 changed files with 2 additions and 1 deletions

View File

@ -707,7 +707,8 @@ static QStringList familyList(const QFontDef &req)
if ((str.startsWith(QLatin1Char('"')) && str.endsWith(QLatin1Char('"')))
|| (str.startsWith(QLatin1Char('\'')) && str.endsWith(QLatin1Char('\''))))
str = str.mid(1, str.length() - 2);
family_list << str.toString();
if (!family_list.contains(str))
family_list << str.toString();
}
}
// append the substitute list for each family in family_list