summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTarja Sundqvist <tarja.sundqvist@qt.io>2024-05-08 08:15:01 +0300
committerTarja Sundqvist <tarja.sundqvist@qt.io>2024-05-08 08:15:01 +0300
commit5b9caa97d1a8d61c5301cc12cd8dd5aebdc62272 (patch)
treeeffed2a65e18715d31726c41188b84f22509d048
parentd44607f07fa66f0f5294c227eba99aac7c8dbebd (diff)
parentf430b9518fb85464866948bd15b90af6237b8d81 (diff)
Merge remote-tracking branch 'origin/tqtc/lts-5.15.14' into tqtc/lts-5.15-opensourcev5.15.14-lts-lgpl5.15
-rw-r--r--.qmake.conf2
-rw-r--r--src/svg/qsvgfont_p.h5
-rw-r--r--src/svg/qsvghandler.cpp2
3 files changed, 4 insertions, 5 deletions
diff --git a/.qmake.conf b/.qmake.conf
index 0134c4c..edc6ef7 100644
--- a/.qmake.conf
+++ b/.qmake.conf
@@ -3,4 +3,4 @@ load(qt_build_config)
CONFIG += warning_clean
DEFINES += QT_NO_FOREACH
-MODULE_VERSION = 5.15.13
+MODULE_VERSION = 5.15.14
diff --git a/src/svg/qsvgfont_p.h b/src/svg/qsvgfont_p.h
index fd0a3fa..fcffbe8 100644
--- a/src/svg/qsvgfont_p.h
+++ b/src/svg/qsvgfont_p.h
@@ -74,6 +74,7 @@ public:
class Q_SVG_PRIVATE_EXPORT QSvgFont : public QSvgRefCounted
{
public:
+ static constexpr qreal DEFAULT_UNITS_PER_EM = 1000;
QSvgFont(qreal horizAdvX);
void setFamilyName(const QString &name);
@@ -86,9 +87,7 @@ public:
void draw(QPainter *p, const QPointF &point, const QString &str, qreal pixelSize, Qt::Alignment alignment) const;
public:
QString m_familyName;
- qreal m_unitsPerEm;
- qreal m_ascent;
- qreal m_descent;
+ qreal m_unitsPerEm = DEFAULT_UNITS_PER_EM;
qreal m_horizAdvX;
QHash<QChar, QSvgGlyph> m_glyphs;
};
diff --git a/src/svg/qsvghandler.cpp b/src/svg/qsvghandler.cpp
index c229c3b..dd9b716 100644
--- a/src/svg/qsvghandler.cpp
+++ b/src/svg/qsvghandler.cpp
@@ -2668,7 +2668,7 @@ static bool parseFontFaceNode(QSvgStyleProperty *parent,
qreal unitsPerEm = toDouble(unitsPerEmStr);
if (!unitsPerEm)
- unitsPerEm = 1000;
+ unitsPerEm = QSvgFont::DEFAULT_UNITS_PER_EM;
if (!name.isEmpty())
font->setFamilyName(name);