You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
453 B
19 lines
453 B
--- src/kernel/qfontdatabase.cpp
|
|
+++ src/kernel/qfontdatabase.cpp
|
|
@@ -2476,11 +2476,14 @@ void QFontDatabase::parseFontName(const
|
|
int i = name.find('[');
|
|
int li = name.findRev(']');
|
|
|
|
- if (i < li) {
|
|
+ if (i > 0 && i + 1 < li) {
|
|
foundry = name.mid(i + 1, li - i - 1);
|
|
if (name[i - 1] == ' ')
|
|
i--;
|
|
family = name.left(i);
|
|
+ } else {
|
|
+ foundry = QString::null;
|
|
+ family = name;
|
|
}
|
|
} else {
|
|
foundry = QString::null;
|