summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2015-05-13 13:13:51 +0200
committerAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2015-05-14 00:28:06 +0000
commite905526090feb798e5746412027d2d757d2ff7b5 (patch)
tree2a4585900d0bc819abb2f1442ea9c202c48cf0d7
parent86601fc5758b223bc74687b19e3ec020b1d61d3a (diff)
Better match thin font styles
A style name 'Extra Thin' or 'Thin Italic' should be parsed as Thin font weight. Change-Id: I8acebed7330c23231b3742d887081d8b3d0aeb19 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
-rw-r--r--src/gui/text/qfontdatabase.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/text/qfontdatabase.cpp b/src/gui/text/qfontdatabase.cpp
index e77856c8d1..dae4d560a8 100644
--- a/src/gui/text/qfontdatabase.cpp
+++ b/src/gui/text/qfontdatabase.cpp
@@ -121,6 +121,8 @@ static int getFontWeight(const QString &weightString)
return QFont::DemiBold;
return QFont::Bold;
}
+ if (s.contains(QLatin1String("thin")))
+ return QFont::Thin;
if (s.contains(QLatin1String("light")))
return QFont::Light;
if (s.contains(QLatin1String("black")))