summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/svg/qsvgstyle.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/svg/qsvgstyle.cpp b/src/svg/qsvgstyle.cpp
index cf17944..e82d89c 100644
--- a/src/svg/qsvgstyle.cpp
+++ b/src/svg/qsvgstyle.cpp
@@ -263,7 +263,9 @@ void QSvgFontStyle::apply(QPainter *p, const QSvgNode *, QSvgExtraStates &states
} else {
states.fontWeight = m_weight;
}
- font.setWeight(QFont::Weight(states.fontWeight));
+ font.setWeight(QFont::Weight(qBound(static_cast<int>(QFont::Weight::Thin),
+ states.fontWeight,
+ static_cast<int>(QFont::Weight::Black))));
}
p->setFont(font);