diff --git a/0001-modify-kwin_5.18-complier-error.patch b/0001-modify-kwin_5.18-complier-error.patch
deleted file mode 100644
index e55592c..0000000
--- a/0001-modify-kwin_5.18-complier-error.patch
+++ /dev/null
@@ -1,233 +0,0 @@
-From bc16340b2eee8b7f7c7a8fd4cf7ba0c288bfc6bc Mon Sep 17 00:00:00 2001
-From: pei-jiankang
-Date: Wed, 10 Nov 2021 22:09:24 +0800
-Subject: [PATCH] modify-kwin_5.18-complier-error
-
----
- examples/corelib/serialization/cbordump/main.cpp | 8 ++++----
- .../src_corelib_serialization_qcborstream.cpp | 2 +-
- src/corelib/serialization/qcborcommon.h | 4 ++--
- src/corelib/serialization/qcborstreamreader.h | 6 +++---
- src/corelib/serialization/qcborstreamwriter.h | 2 +-
- src/corelib/serialization/qcborvalue.cpp | 4 ++--
- src/corelib/serialization/qcborvalue.h | 4 ++--
- .../corelib/kernel/qmetatype/tst_qmetatype.h | 2 +-
- .../qcborstreamreader/tst_qcborstreamreader.cpp | 8 ++++----
- .../serialization/qcborvalue/tst_qcborvalue.cpp | 16 ++++++++--------
- 10 files changed, 28 insertions(+), 28 deletions(-)
-
-diff --git a/examples/corelib/serialization/cbordump/main.cpp b/examples/corelib/serialization/cbordump/main.cpp
-index 222bd436..b43650eb 100644
---- a/examples/corelib/serialization/cbordump/main.cpp
-+++ b/examples/corelib/serialization/cbordump/main.cpp
-@@ -385,10 +385,10 @@ void CborDumper::dumpOne(int nestingLevel)
-
- case QCborStreamReader::SimpleType:
- switch (reader.toSimpleType()) {
-- case QCborSimpleType::False:
-+ case QCborSimpleType::False_QCb:
- printf("false");
- break;
-- case QCborSimpleType::True:
-+ case QCborSimpleType::True_QCb:
- printf("true");
- break;
- case QCborSimpleType::Null:
-@@ -620,10 +620,10 @@ void CborDumper::dumpOneDetailed(int nestingLevel)
- QCborSimpleType st = reader.toSimpleType();
- reader.next();
- switch (st) {
-- case QCborSimpleType::False:
-+ case QCborSimpleType::False_QCb:
- print("Simple Type", "false");
- break;
-- case QCborSimpleType::True:
-+ case QCborSimpleType::True_QCb:
- print("Simple Type", "true");
- break;
- case QCborSimpleType::Null:
-diff --git a/src/corelib/doc/snippets/code/src_corelib_serialization_qcborstream.cpp b/src/corelib/doc/snippets/code/src_corelib_serialization_qcborstream.cpp
-index 6ddb5a93..993a0a03 100644
---- a/src/corelib/doc/snippets/code/src_corelib_serialization_qcborstream.cpp
-+++ b/src/corelib/doc/snippets/code/src_corelib_serialization_qcborstream.cpp
-@@ -192,7 +192,7 @@
- //! [15]
-
- //! [16]
-- writer.append(b ? QCborSimpleType::True : QCborSimpleType::False);
-+ writer.append(b ? QCborSimpleType::True_QCb : QCborSimpleType::False_QCb);
- //! [16]
-
- //! [17]
-diff --git a/src/corelib/serialization/qcborcommon.h b/src/corelib/serialization/qcborcommon.h
-index bec46399..1d80e076 100644
---- a/src/corelib/serialization/qcborcommon.h
-+++ b/src/corelib/serialization/qcborcommon.h
-@@ -58,8 +58,8 @@
- QT_BEGIN_NAMESPACE
-
- enum class QCborSimpleType : quint8 {
-- False = 20,
-- True = 21,
-+ False_QCb = 20,
-+ True_QCb = 21,
- Null = 22,
- Undefined = 23
- };
-diff --git a/src/corelib/serialization/qcborstreamreader.h b/src/corelib/serialization/qcborstreamreader.h
-index 6d5feccf..1fd22b79 100644
---- a/src/corelib/serialization/qcborstreamreader.h
-+++ b/src/corelib/serialization/qcborstreamreader.h
-@@ -140,8 +140,8 @@ public:
- bool isInvalid() const { return type() == Invalid; }
-
- bool isSimpleType(QCborSimpleType st) const { return isSimpleType() && toSimpleType() == st; }
-- bool isFalse() const { return isSimpleType(QCborSimpleType::False); }
-- bool isTrue() const { return isSimpleType(QCborSimpleType::True); }
-+ bool isFalse() const { return isSimpleType(QCborSimpleType::False_QCb); }
-+ bool isTrue() const { return isSimpleType(QCborSimpleType::True_QCb); }
- bool isBool() const { return isFalse() || isTrue(); }
- bool isNull() const { return isSimpleType(QCborSimpleType::Null); }
- bool isUndefined() const { return isSimpleType(QCborSimpleType::Undefined); }
-@@ -158,7 +158,7 @@ public:
- qsizetype currentStringChunkSize() const{ Q_ASSERT(isString() || isByteArray()); return _currentStringChunkSize(); }
- StringResult readStringChunk(char *ptr, qsizetype maxlen);
-
-- bool toBool() const { Q_ASSERT(isBool()); return value64 - int(QCborSimpleType::False); }
-+ bool toBool() const { Q_ASSERT(isBool()); return value64 - int(QCborSimpleType::False_QCb); }
- QCborTag toTag() const { Q_ASSERT(isTag()); return QCborTag(value64); }
- quint64 toUnsignedInteger() const { Q_ASSERT(isUnsignedInteger()); return value64; }
- QCborNegativeInteger toNegativeInteger() const { Q_ASSERT(isNegativeInteger()); return QCborNegativeInteger(value64 + 1); }
-diff --git a/src/corelib/serialization/qcborstreamwriter.h b/src/corelib/serialization/qcborstreamwriter.h
-index f8c94ceb..befea659 100644
---- a/src/corelib/serialization/qcborstreamwriter.h
-+++ b/src/corelib/serialization/qcborstreamwriter.h
-@@ -93,7 +93,7 @@ public:
- void appendTextString(const char *utf8, qsizetype len);
-
- // convenience
-- void append(bool b) { append(b ? QCborSimpleType::True : QCborSimpleType::False); }
-+ void append(bool b) { append(b ? QCborSimpleType::True_QCb : QCborSimpleType::False_QCb); }
- void appendNull() { append(QCborSimpleType::Null); }
- void appendUndefined() { append(QCborSimpleType::Undefined); }
-
-diff --git a/src/corelib/serialization/qcborvalue.cpp b/src/corelib/serialization/qcborvalue.cpp
-index 89a928d3..465b8d20 100644
---- a/src/corelib/serialization/qcborvalue.cpp
-+++ b/src/corelib/serialization/qcborvalue.cpp
-@@ -3060,9 +3060,9 @@ QDebug operator<<(QDebug dbg, const QCborValue &v)
- Q_CORE_EXPORT const char *qt_cbor_simpletype_id(QCborSimpleType st)
- {
- switch (st) {
-- case QCborSimpleType::False:
-+ case QCborSimpleType::False_QCb:
- return "False";
-- case QCborSimpleType::True:
-+ case QCborSimpleType::True_QCb:
- return "True";
- case QCborSimpleType::Null:
- return "Null";
-diff --git a/src/corelib/serialization/qcborvalue.h b/src/corelib/serialization/qcborvalue.h
-index aa51e5da..b96d500d 100644
---- a/src/corelib/serialization/qcborvalue.h
-+++ b/src/corelib/serialization/qcborvalue.h
-@@ -117,8 +117,8 @@ public:
-
- // range 0x100 - 0x1ff for Simple Types
- SimpleType = 0x100,
-- False = SimpleType + int(QCborSimpleType::False),
-- True = SimpleType + int(QCborSimpleType::True),
-+ False = SimpleType + int(QCborSimpleType::False_QCb),
-+ True = SimpleType + int(QCborSimpleType::True_QCb),
- Null = SimpleType + int(QCborSimpleType::Null),
- Undefined = SimpleType + int(QCborSimpleType::Undefined),
-
-diff --git a/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.h b/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.h
-index 22bcb69a..4d5bdc1a 100644
---- a/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.h
-+++ b/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.h
-@@ -275,7 +275,7 @@ template<> struct TestValueFactory {
- };
-
- template<> struct TestValueFactory {
-- static QCborSimpleType *create() { return new QCborSimpleType(QCborSimpleType::True); }
-+ static QCborSimpleType *create() { return new QCborSimpleType(QCborSimpleType::True_QCb); }
- };
- template<> struct TestValueFactory {
- static QCborValue *create() { return new QCborValue(123.); }
-diff --git a/tests/auto/corelib/serialization/qcborstreamreader/tst_qcborstreamreader.cpp b/tests/auto/corelib/serialization/qcborstreamreader/tst_qcborstreamreader.cpp
-index f969bb90..a4d75422 100644
---- a/tests/auto/corelib/serialization/qcborstreamreader/tst_qcborstreamreader.cpp
-+++ b/tests/auto/corelib/serialization/qcborstreamreader/tst_qcborstreamreader.cpp
-@@ -454,10 +454,10 @@ static QString parseOne(QCborStreamReader &reader)
- }
- case QCborStreamReader::SimpleType:
- switch (reader.toSimpleType()) {
-- case QCborSimpleType::False:
-+ case QCborSimpleType::False_QCb:
- result = QStringLiteral("false");
- break;
-- case QCborSimpleType::True:
-+ case QCborSimpleType::True_QCb:
- result = QStringLiteral("true");
- break;
- case QCborSimpleType::Null:
-@@ -577,10 +577,10 @@ bool parseNonRecursive(QString &result, bool &printingStringChunks, QCborStreamR
- continue; // skip the comma
- case QCborStreamReader::SimpleType:
- switch (reader.toSimpleType()) {
-- case QCborSimpleType::False:
-+ case QCborSimpleType::False_QCb:
- result += QStringLiteral("false");
- break;
-- case QCborSimpleType::True:
-+ case QCborSimpleType::True_QCb:
- result += QStringLiteral("true");
- break;
- case QCborSimpleType::Null:
-diff --git a/tests/auto/corelib/serialization/qcborvalue/tst_qcborvalue.cpp b/tests/auto/corelib/serialization/qcborvalue/tst_qcborvalue.cpp
-index 0a780d3e..cf3f9df3 100644
---- a/tests/auto/corelib/serialization/qcborvalue/tst_qcborvalue.cpp
-+++ b/tests/auto/corelib/serialization/qcborvalue/tst_qcborvalue.cpp
-@@ -240,12 +240,12 @@ void tst_QCborValue::basics_data()
- add(QCborValue::Null, QCborValue::Null, st(QCborSimpleType::Null));
- QTest::newRow("nullptr") << QCborValue::Null << QCborValue(nullptr)
- << st(QCborSimpleType::Null);
-- add(QCborValue::False, false, st(QCborSimpleType::False));
-+ add(QCborValue::False, false, st(QCborSimpleType::False_QCb));
- QTest::newRow("false") << QCborValue::False << QCborValue(QCborValue::False)
-- << st(QCborSimpleType::False);
-- add(QCborValue::True, true, st(QCborSimpleType::True));
-+ << st(QCborSimpleType::False_QCb);
-+ add(QCborValue::True, true, st(QCborSimpleType::True_QCb));
- QTest::newRow("true") << QCborValue::True << QCborValue(QCborValue::True)
-- << st(QCborSimpleType::True);
-+ << st(QCborSimpleType::True_QCb);
- QTest::newRow("simpletype") << QCborValue::Type(QCborValue::SimpleType + 255)
- << QCborValue(QCborSimpleType(255))
- << st(QCborSimpleType(255));
-@@ -297,8 +297,8 @@ static void basicTypeCheck(QCborValue::Type type, const QCborValue &v, const QVa
- QCOMPARE(v.isInvalid(), type == QCborValue::Invalid);
- QCOMPARE(v.isContainer(), type == QCborValue::Array || type == QCborValue::Map);
- QCOMPARE(v.isSimpleType(), isSimpleType);
-- QCOMPARE(v.isSimpleType(QCborSimpleType::False), st == QCborSimpleType::False);
-- QCOMPARE(v.isSimpleType(QCborSimpleType::True), st == QCborSimpleType::True);
-+ QCOMPARE(v.isSimpleType(QCborSimpleType::False_QCb), st == QCborSimpleType::False_QCb);
-+ QCOMPARE(v.isSimpleType(QCborSimpleType::True_QCb), st == QCborSimpleType::True_QCb);
- QCOMPARE(v.isSimpleType(QCborSimpleType::Null), st == QCborSimpleType::Null);
- QCOMPARE(v.isSimpleType(QCborSimpleType::Undefined), st == QCborSimpleType::Undefined);
- QCOMPARE(v.isSimpleType(QCborSimpleType(255)), st == QCborSimpleType(255));
-@@ -310,8 +310,8 @@ static void basicTypeCheck(QCborValue::Type type, const QCborValue &v, const QVa
- QCOMPARE(v.toInteger(), qint64(expectedValue.toDouble()));
- QCOMPARE(v.toDouble(), expectedValue.toDouble());
- }
-- QCOMPARE(v.toBool(true), st != QCborSimpleType::False);
-- QCOMPARE(v.toBool(), st == QCborSimpleType::True);
-+ QCOMPARE(v.toBool(true), st != QCborSimpleType::False_QCb);
-+ QCOMPARE(v.toBool(), st == QCborSimpleType::True_QCb);
- if (st == QCborSimpleType::Undefined)
- QCOMPARE(v.toSimpleType(QCborSimpleType::Null), QCborSimpleType::Undefined);
- else if (isSimpleType)
---
-2.27.0
-
diff --git a/CVE-2021-38593.patch b/CVE-2021-38593.patch
deleted file mode 100644
index 6f5d939..0000000
--- a/CVE-2021-38593.patch
+++ /dev/null
@@ -1,84 +0,0 @@
-Description: avoid processing-intensive painting of high number of tiny dashes
- When stroking a dashed path, an unnecessary amount of processing would
- be spent if there is a huge number of dashes visible, e.g. because of
- scaling. Since the dashes are too small to be individually visible
- anyway, just replace with a semi-transparent solid line for such
- cases.
-Origin: upstream, commits:
- https://code.qt.io/cgit/qt/qtbase.git/commit/?id=f4d791b330d02777
- https://code.qt.io/cgit/qt/qtbase.git/commit/?id=6b400e3147dcfd8c
- https://code.qt.io/cgit/qt/qtbase.git/commit/?id=84aba80944a2e1c3
- https://code.qt.io/cgit/qt/qtbase.git/commit/?id=cca8ed0547405b1c
-Last-Update: 2021-11-27
-
---- a/src/gui/painting/qpaintengineex.cpp
-+++ b/src/gui/painting/qpaintengineex.cpp
-@@ -385,10 +385,10 @@ QPainterState *QPaintEngineEx::createSta
-
- Q_GUI_EXPORT extern bool qt_scaleForTransform(const QTransform &transform, qreal *scale); // qtransform.cpp
-
--void QPaintEngineEx::stroke(const QVectorPath &path, const QPen &pen)
-+void QPaintEngineEx::stroke(const QVectorPath &path, const QPen &inPen)
- {
- #ifdef QT_DEBUG_DRAW
-- qDebug() << "QPaintEngineEx::stroke()" << pen;
-+ qDebug() << "QPaintEngineEx::stroke()" << inPen;
- #endif
-
- Q_D(QPaintEngineEx);
-@@ -403,6 +403,38 @@ void QPaintEngineEx::stroke(const QVecto
- d->stroker.setCubicToHook(qpaintengineex_cubicTo);
- }
-
-+ QRectF clipRect;
-+ QPen pen = inPen;
-+ if (pen.style() > Qt::SolidLine) {
-+ QRectF cpRect = path.controlPointRect();
-+ const QTransform &xf = state()->matrix;
-+ if (qt_pen_is_cosmetic(pen, state()->renderHints)) {
-+ clipRect = d->exDeviceRect;
-+ cpRect.translate(xf.dx(), xf.dy());
-+ } else {
-+ clipRect = xf.inverted().mapRect(QRectF(d->exDeviceRect));
-+ }
-+ // Check to avoid generating unwieldy amount of dashes that will not be visible anyway
-+ qreal pw = pen.widthF() ? pen.widthF() : 1;
-+ QRectF extentRect = cpRect.adjusted(-pw, -pw, pw, pw) & clipRect;
-+ qreal extent = qMax(extentRect.width(), extentRect.height());
-+ qreal patternLength = 0;
-+ const QVector pattern = pen.dashPattern();
-+ const int patternSize = qMin(pattern.size(), 32);
-+ for (int i = 0; i < patternSize; i++)
-+ patternLength += qMax(pattern.at(i), qreal(0));
-+ patternLength *= pw;
-+ if (qFuzzyIsNull(patternLength)) {
-+ pen.setStyle(Qt::NoPen);
-+ } else if (extent / patternLength > 10000) {
-+ // approximate stream of tiny dashes with semi-transparent solid line
-+ pen.setStyle(Qt::SolidLine);
-+ QColor color(pen.color());
-+ color.setAlpha(color.alpha() / 2);
-+ pen.setColor(color);
-+ }
-+ }
-+
- if (!qpen_fast_equals(pen, d->strokerPen)) {
- d->strokerPen = pen;
- d->stroker.setJoinStyle(pen.joinStyle());
-@@ -430,14 +462,8 @@ void QPaintEngineEx::stroke(const QVecto
- return;
- }
-
-- if (pen.style() > Qt::SolidLine) {
-- if (qt_pen_is_cosmetic(pen, state()->renderHints)){
-- d->activeStroker->setClipRect(d->exDeviceRect);
-- } else {
-- QRectF clipRect = state()->matrix.inverted().mapRect(QRectF(d->exDeviceRect));
-- d->activeStroker->setClipRect(clipRect);
-- }
-- }
-+ if (!clipRect.isNull())
-+ d->activeStroker->setClipRect(clipRect);
-
- if (d->activeStroker == &d->stroker)
- d->stroker.setForceOpen(path.hasExplicitOpen());
diff --git a/CVE-2022-25255.patch b/CVE-2022-25255.patch
deleted file mode 100644
index 764e939..0000000
--- a/CVE-2022-25255.patch
+++ /dev/null
@@ -1,92 +0,0 @@
-Description: QProcess: ensure we don't accidentally execute something from CWD
- Unless "." (or the empty string) is in $PATH, we're not supposed to find
- executables in the current directory. This is how the Unix shells behave
- and we match their behavior. It's also the behavior Qt had prior to 5.9
- (commit 28666d167aa8e602c0bea25ebc4d51b55005db13). On Windows, searching
- the current directory is the norm, so we keep that behavior.
- .
- This commit does not add an explicit check for an empty return from
- QStandardPaths::findExecutable(). Instead, we allow that empty string to
- go all the way to execve(2), which will fail with ENOENT. We could catch
- it early, before fork(2), but why add code for the error case?
- .
- See https://kde.org/info/security/advisory-20220131-1.txt
-Origin: upstream, https://download.qt.io/official_releases/qt/5.15/CVE-2022-25255-qprocess5-15.diff
-Last-Update: 2022-02-21
-
---- a/src/corelib/io/qprocess_unix.cpp
-+++ b/src/corelib/io/qprocess_unix.cpp
-@@ -1,7 +1,7 @@
- /****************************************************************************
- **
- ** Copyright (C) 2016 The Qt Company Ltd.
--** Copyright (C) 2016 Intel Corporation.
-+** Copyright (C) 2022 Intel Corporation.
- ** Contact: https://www.qt.io/licensing/
- **
- ** This file is part of the QtCore module of the Qt Toolkit.
-@@ -422,14 +422,15 @@ void QProcessPrivate::startProcess()
- // Add the program name to the argument list.
- argv[0] = nullptr;
- if (!program.contains(QLatin1Char('/'))) {
-+ // findExecutable() returns its argument if it's an absolute path,
-+ // otherwise it searches $PATH; returns empty if not found (we handle
-+ // that case much later)
- const QString &exeFilePath = QStandardPaths::findExecutable(program);
-- if (!exeFilePath.isEmpty()) {
-- const QByteArray &tmp = QFile::encodeName(exeFilePath);
-- argv[0] = ::strdup(tmp.constData());
-- }
-- }
-- if (!argv[0])
-+ const QByteArray &tmp = QFile::encodeName(exeFilePath);
-+ argv[0] = ::strdup(tmp.constData());
-+ } else {
- argv[0] = ::strdup(encodedProgramName.constData());
-+ }
-
- // Add every argument to the list
- for (int i = 0; i < arguments.count(); ++i)
-@@ -983,15 +984,16 @@ bool QProcessPrivate::startDetached(qint
- envp = _q_dupEnvironment(environment.d.constData()->vars, &envc);
- }
-
-- QByteArray tmp;
- if (!program.contains(QLatin1Char('/'))) {
-+ // findExecutable() returns its argument if it's an absolute path,
-+ // otherwise it searches $PATH; returns empty if not found (we handle
-+ // that case much later)
- const QString &exeFilePath = QStandardPaths::findExecutable(program);
-- if (!exeFilePath.isEmpty())
-- tmp = QFile::encodeName(exeFilePath);
-+ const QByteArray &tmp = QFile::encodeName(exeFilePath);
-+ argv[0] = ::strdup(tmp.constData());
-+ } else {
-+ argv[0] = ::strdup(QFile::encodeName(program));
- }
-- if (tmp.isEmpty())
-- tmp = QFile::encodeName(program);
-- argv[0] = tmp.data();
-
- if (envp)
- qt_safe_execve(argv[0], argv, envp);
---- a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp
-+++ b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp
-@@ -1449,7 +1449,7 @@ void tst_QApplication::desktopSettingsAw
- {
- #if QT_CONFIG(process)
- QProcess testProcess;
-- testProcess.start("desktopsettingsaware_helper");
-+ testProcess.start("./desktopsettingsaware_helper");
- QVERIFY2(testProcess.waitForStarted(),
- qPrintable(QString::fromLatin1("Cannot start 'desktopsettingsaware_helper': %1").arg(testProcess.errorString())));
- QVERIFY(testProcess.waitForFinished(10000));
-@@ -2365,7 +2365,7 @@ void tst_QApplication::qtbug_12673()
- #if QT_CONFIG(process)
- QProcess testProcess;
- QStringList arguments;
-- testProcess.start("modal_helper", arguments);
-+ testProcess.start("./modal_helper", arguments);
- QVERIFY2(testProcess.waitForStarted(),
- qPrintable(QString::fromLatin1("Cannot start 'modal_helper': %1").arg(testProcess.errorString())));
- QVERIFY(testProcess.waitForFinished(20000));
diff --git a/CVE-2023-24607.patch b/CVE-2023-24607.patch
deleted file mode 100644
index 6d2069f..0000000
--- a/CVE-2023-24607.patch
+++ /dev/null
@@ -1,336 +0,0 @@
- src/plugins/sqldrivers/odbc/qsql_odbc.cpp | 210 ++++++++++++----------
- 1 file changed, 120 insertions(+), 90 deletions(-)
-
-diff --git a/src/plugins/sqldrivers/odbc/qsql_odbc.cpp b/src/plugins/sqldrivers/odbc/qsql_odbc.cpp
-index 547eb204..8d7ce3e3 100644
---- a/src/plugins/sqldrivers/odbc/qsql_odbc.cpp
-+++ b/src/plugins/sqldrivers/odbc/qsql_odbc.cpp
-@@ -91,23 +91,39 @@ inline static QString fromSQLTCHAR(const QVarLengthArray& input, int s
- return result;
- }
-
-+template
-+void toSQLTCHARImpl(QVarLengthArray &result, const QString &input); // primary template undefined
-+
-+template
-+void do_append(QVarLengthArray &result, const Container &c)
-+{
-+ result.append(reinterpret_cast(c.data()), c.size());
-+}
-+
-+template <>
-+void toSQLTCHARImpl<1>(QVarLengthArray &result, const QString &input)
-+{
-+ const auto u8 = input.toUtf8();
-+ do_append(result, u8);
-+}
-+
-+template <>
-+void toSQLTCHARImpl<2>(QVarLengthArray &result, const QString &input)
-+{
-+ do_append(result, input);
-+}
-+
-+template <>
-+void toSQLTCHARImpl<4>(QVarLengthArray &result, const QString &input)
-+{
-+ const auto u32 = input.toUcs4();
-+ do_append(result, u32);
-+}
-+
- inline static QVarLengthArray toSQLTCHAR(const QString &input)
- {
- QVarLengthArray result;
-- result.resize(input.size());
-- switch(sizeof(SQLTCHAR)) {
-- case 1:
-- memcpy(result.data(), input.toUtf8().data(), input.size());
-- break;
-- case 2:
-- memcpy(result.data(), input.unicode(), input.size() * 2);
-- break;
-- case 4:
-- memcpy(result.data(), input.toUcs4().data(), input.size() * 4);
-- break;
-- default:
-- qCritical("sizeof(SQLTCHAR) is %d. Don't know how to handle this.", int(sizeof(SQLTCHAR)));
-- }
-+ toSQLTCHARImpl(result, input);
- result.append(0); // make sure it's null terminated, doesn't matter if it already is, it does if it isn't.
- return result;
- }
-@@ -768,6 +784,14 @@ QChar QODBCDriverPrivate::quoteChar()
- return quote;
- }
-
-+static SQLRETURN qt_string_SQLSetConnectAttr(SQLHDBC handle, SQLINTEGER attr, const QString &val)
-+{
-+ auto encoded = toSQLTCHAR(val);
-+ return SQLSetConnectAttr(handle, attr,
-+ encoded.data(),
-+ SQLINTEGER(encoded.size() * sizeof(SQLTCHAR))); // size in bytes
-+}
-+
-
- bool QODBCDriverPrivate::setConnectionOptions(const QString& connOpts)
- {
-@@ -803,10 +826,7 @@ bool QODBCDriverPrivate::setConnectionOptions(const QString& connOpts)
- v = val.toUInt();
- r = SQLSetConnectAttr(hDbc, SQL_ATTR_LOGIN_TIMEOUT, (SQLPOINTER) size_t(v), 0);
- } else if (opt.toUpper() == QLatin1String("SQL_ATTR_CURRENT_CATALOG")) {
-- val.utf16(); // 0 terminate
-- r = SQLSetConnectAttr(hDbc, SQL_ATTR_CURRENT_CATALOG,
-- toSQLTCHAR(val).data(),
-- val.length()*sizeof(SQLTCHAR));
-+ r = qt_string_SQLSetConnectAttr(hDbc, SQL_ATTR_CURRENT_CATALOG, val);
- } else if (opt.toUpper() == QLatin1String("SQL_ATTR_METADATA_ID")) {
- if (val.toUpper() == QLatin1String("SQL_TRUE")) {
- v = SQL_TRUE;
-@@ -821,10 +841,7 @@ bool QODBCDriverPrivate::setConnectionOptions(const QString& connOpts)
- v = val.toUInt();
- r = SQLSetConnectAttr(hDbc, SQL_ATTR_PACKET_SIZE, (SQLPOINTER) size_t(v), 0);
- } else if (opt.toUpper() == QLatin1String("SQL_ATTR_TRACEFILE")) {
-- val.utf16(); // 0 terminate
-- r = SQLSetConnectAttr(hDbc, SQL_ATTR_TRACEFILE,
-- toSQLTCHAR(val).data(),
-- val.length()*sizeof(SQLTCHAR));
-+ r = qt_string_SQLSetConnectAttr(hDbc, SQL_ATTR_TRACEFILE, val);
- } else if (opt.toUpper() == QLatin1String("SQL_ATTR_TRACE")) {
- if (val.toUpper() == QLatin1String("SQL_OPT_TRACE_OFF")) {
- v = SQL_OPT_TRACE_OFF;
-@@ -1027,9 +1044,13 @@ bool QODBCResult::reset (const QString& query)
- return false;
- }
-
-- r = SQLExecDirect(d->hStmt,
-- toSQLTCHAR(query).data(),
-- (SQLINTEGER) query.length());
-+ {
-+ auto encoded = toSQLTCHAR(query);
-+ r = SQLExecDirect(d->hStmt,
-+ encoded.data(),
-+ SQLINTEGER(encoded.size()));
-+ }
-+
- if (r != SQL_SUCCESS && r != SQL_SUCCESS_WITH_INFO && r!= SQL_NO_DATA) {
- setLastError(qMakeError(QCoreApplication::translate("QODBCResult",
- "Unable to execute statement"), QSqlError::StatementError, d));
-@@ -1375,9 +1396,12 @@ bool QODBCResult::prepare(const QString& query)
- return false;
- }
-
-- r = SQLPrepare(d->hStmt,
-- toSQLTCHAR(query).data(),
-- (SQLINTEGER) query.length());
-+ {
-+ auto encoded = toSQLTCHAR(query);
-+ r = SQLPrepare(d->hStmt,
-+ encoded.data(),
-+ SQLINTEGER(encoded.size()));
-+ }
-
- if (r != SQL_SUCCESS) {
- setLastError(qMakeError(QCoreApplication::translate("QODBCResult",
-@@ -1405,7 +1429,7 @@ bool QODBCResult::exec()
- SQLCloseCursor(d->hStmt);
-
- QVector& values = boundValues();
-- QVector tmpStorage(values.count(), QByteArray()); // holds temporary buffers
-+ QVector tmpStorage(values.count(), QByteArray()); // targets for SQLBindParameter()
- QVarLengthArray indicators(values.count());
- memset(indicators.data(), 0, indicators.size() * sizeof(SQLLEN));
-
-@@ -1582,35 +1606,36 @@ bool QODBCResult::exec()
- case QVariant::String:
- if (d->unicode) {
- QByteArray &ba = tmpStorage[i];
-- QString str = val.toString();
-+ {
-+ const auto encoded = toSQLTCHAR(val.toString());
-+ ba = QByteArray(reinterpret_cast(encoded.data()),
-+ encoded.size() * sizeof(SQLTCHAR));
-+ }
-+
- if (*ind != SQL_NULL_DATA)
-- *ind = str.length() * sizeof(SQLTCHAR);
-- int strSize = str.length() * sizeof(SQLTCHAR);
-+ *ind = ba.size();
-
- if (bindValueType(i) & QSql::Out) {
-- const QVarLengthArray a(toSQLTCHAR(str));
-- ba = QByteArray((const char *)a.constData(), a.size() * sizeof(SQLTCHAR));
- r = SQLBindParameter(d->hStmt,
- i + 1,
- qParamType[bindValueType(i) & QSql::InOut],
- SQL_C_TCHAR,
-- strSize > 254 ? SQL_WLONGVARCHAR : SQL_WVARCHAR,
-+ ba.size() > 254 ? SQL_WLONGVARCHAR : SQL_WVARCHAR,
- 0, // god knows... don't change this!
- 0,
-- ba.data(),
-+ const_cast(ba.constData()), // don't detach
- ba.size(),
- ind);
- break;
- }
-- ba = QByteArray ((const char *)toSQLTCHAR(str).constData(), str.size()*sizeof(SQLTCHAR));
- r = SQLBindParameter(d->hStmt,
- i + 1,
- qParamType[bindValueType(i) & QSql::InOut],
- SQL_C_TCHAR,
-- strSize > 254 ? SQL_WLONGVARCHAR : SQL_WVARCHAR,
-- strSize,
-+ ba.size() > 254 ? SQL_WLONGVARCHAR : SQL_WVARCHAR,
-+ ba.size(),
- 0,
-- const_cast(ba.constData()),
-+ const_cast(ba.constData()), // don't detach
- ba.size(),
- ind);
- break;
-@@ -1718,10 +1743,11 @@ bool QODBCResult::exec()
- case QVariant::String:
- if (d->unicode) {
- if (bindValueType(i) & QSql::Out) {
-- const QByteArray &first = tmpStorage.at(i);
-- QVarLengthArray array;
-- array.append((const SQLTCHAR *)first.constData(), first.size());
-- values[i] = fromSQLTCHAR(array, first.size()/sizeof(SQLTCHAR));
-+ const QByteArray &bytes = tmpStorage.at(i);
-+ const auto strSize = bytes.size() / int(sizeof(SQLTCHAR));
-+ QVarLengthArray string(strSize);
-+ memcpy(string.data(), bytes.data(), strSize * sizeof(SQLTCHAR));
-+ values[i] = fromSQLTCHAR(string);
- }
- break;
- }
-@@ -1968,14 +1993,16 @@ bool QODBCDriver::open(const QString & db,
- SQLSMALLINT cb;
- QVarLengthArray connOut(1024);
- memset(connOut.data(), 0, connOut.size() * sizeof(SQLTCHAR));
-- r = SQLDriverConnect(d->hDbc,
-- NULL,
-- toSQLTCHAR(connQStr).data(),
-- (SQLSMALLINT)connQStr.length(),
-- connOut.data(),
-- 1024,
-- &cb,
-- /*SQL_DRIVER_NOPROMPT*/0);
-+ {
-+ auto encoded = toSQLTCHAR(connQStr);
-+ r = SQLDriverConnect(d->hDbc,
-+ nullptr,
-+ encoded.data(), SQLSMALLINT(encoded.size()),
-+ connOut.data(),
-+ 1024,
-+ &cb,
-+ /*SQL_DRIVER_NOPROMPT*/0);
-+ }
-
- if (r != SQL_SUCCESS && r != SQL_SUCCESS_WITH_INFO) {
- setLastError(qMakeError(tr("Unable to connect"), QSqlError::ConnectionError, d));
-@@ -2354,17 +2381,15 @@ QStringList QODBCDriver::tables(QSql::TableType type) const
- if (tableType.isEmpty())
- return tl;
-
-- QString joinedTableTypeString = tableType.join(QLatin1Char(','));
-+ {
-+ auto joinedTableTypeString = toSQLTCHAR(tableType.join(u','));
-
-- r = SQLTables(hStmt,
-- NULL,
-- 0,
-- NULL,
-- 0,
-- NULL,
-- 0,
-- toSQLTCHAR(joinedTableTypeString).data(),
-- joinedTableTypeString.length() /* characters, not bytes */);
-+ r = SQLTables(hStmt,
-+ nullptr, 0,
-+ nullptr, 0,
-+ nullptr, 0,
-+ joinedTableTypeString.data(), joinedTableTypeString.size());
-+ }
-
- if (r != SQL_SUCCESS)
- qSqlWarning(QLatin1String("QODBCDriver::tables Unable to execute table list"), d);
-@@ -2438,28 +2463,30 @@ QSqlIndex QODBCDriver::primaryIndex(const QString& tablename) const
- SQL_ATTR_CURSOR_TYPE,
- (SQLPOINTER)SQL_CURSOR_FORWARD_ONLY,
- SQL_IS_UINTEGER);
-- r = SQLPrimaryKeys(hStmt,
-- catalog.length() == 0 ? NULL : toSQLTCHAR(catalog).data(),
-- catalog.length(),
-- schema.length() == 0 ? NULL : toSQLTCHAR(schema).data(),
-- schema.length(),
-- toSQLTCHAR(table).data(),
-- table.length() /* in characters, not in bytes */);
-+ {
-+ auto c = toSQLTCHAR(catalog);
-+ auto s = toSQLTCHAR(schema);
-+ auto t = toSQLTCHAR(table);
-+ r = SQLPrimaryKeys(hStmt,
-+ catalog.isEmpty() ? nullptr : c.data(), c.size(),
-+ schema.isEmpty() ? nullptr : s.data(), s.size(),
-+ t.data(), t.size());
-+ }
-
- // if the SQLPrimaryKeys() call does not succeed (e.g the driver
- // does not support it) - try an alternative method to get hold of
- // the primary index (e.g MS Access and FoxPro)
- if (r != SQL_SUCCESS) {
-- r = SQLSpecialColumns(hStmt,
-- SQL_BEST_ROWID,
-- catalog.length() == 0 ? NULL : toSQLTCHAR(catalog).data(),
-- catalog.length(),
-- schema.length() == 0 ? NULL : toSQLTCHAR(schema).data(),
-- schema.length(),
-- toSQLTCHAR(table).data(),
-- table.length(),
-- SQL_SCOPE_CURROW,
-- SQL_NULLABLE);
-+ auto c = toSQLTCHAR(catalog);
-+ auto s = toSQLTCHAR(schema);
-+ auto t = toSQLTCHAR(table);
-+ r = SQLSpecialColumns(hStmt,
-+ SQL_BEST_ROWID,
-+ catalog.isEmpty() ? nullptr : c.data(), c.size(),
-+ schema.isEmpty() ? nullptr : s.data(), s.size(),
-+ t.data(), t.size(),
-+ SQL_SCOPE_CURROW,
-+ SQL_NULLABLE);
-
- if (r != SQL_SUCCESS) {
- qSqlWarning(QLatin1String("QODBCDriver::primaryIndex: Unable to execute primary key list"), d);
-@@ -2540,15 +2567,18 @@ QSqlRecord QODBCDriver::record(const QString& tablename) const
- SQL_ATTR_CURSOR_TYPE,
- (SQLPOINTER)SQL_CURSOR_FORWARD_ONLY,
- SQL_IS_UINTEGER);
-- r = SQLColumns(hStmt,
-- catalog.length() == 0 ? NULL : toSQLTCHAR(catalog).data(),
-- catalog.length(),
-- schema.length() == 0 ? NULL : toSQLTCHAR(schema).data(),
-- schema.length(),
-- toSQLTCHAR(table).data(),
-- table.length(),
-- NULL,
-- 0);
-+ {
-+ auto c = toSQLTCHAR(catalog);
-+ auto s = toSQLTCHAR(schema);
-+ auto t = toSQLTCHAR(table);
-+ r = SQLColumns(hStmt,
-+ catalog.isEmpty() ? nullptr : c.data(), c.size(),
-+ schema.isEmpty() ? nullptr : s.data(), s.size(),
-+ t.data(), t.size(),
-+ nullptr,
-+ 0);
-+ }
-+
- if (r != SQL_SUCCESS)
- qSqlWarning(QLatin1String("QODBCDriver::record: Unable to execute column list"), d);
-
---
-2.39.1
-
diff --git a/CVE-2023-32762.patch b/CVE-2023-32762.patch
deleted file mode 100644
index 33686d9..0000000
--- a/CVE-2023-32762.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From 1b736a815be0222f4b24289cf17575fc15707305 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?M=C3=A5rten=20Nordheim?=
-Date: Fri, 5 May 2023 11:07:26 +0200
-Subject: [PATCH] Hsts: match header names case insensitively
-
-Header field names are always considered to be case-insensitive.
-
-Pick-to: 6.5 6.5.1 6.2 5.15
-Fixes: QTBUG-113392
-Change-Id: Ifb4def4bb7f2ac070416cdc76581a769f1e52b43
-Reviewed-by: Qt CI Bot
-Reviewed-by: Edward Welbourne
-Reviewed-by: Volker Hilsheimer
----
- src/network/access/qhsts.cpp | 4 ++--
- tests/auto/network/access/hsts/tst_qhsts.cpp | 6 ++++++
- 2 files changed, 8 insertions(+), 2 deletions(-)
-
-diff --git a/src/network/access/qhsts.cpp b/src/network/access/qhsts.cpp
-index 39905f354807..82deede17298 100644
---- a/src/network/access/qhsts.cpp
-+++ b/src/network/access/qhsts.cpp
-@@ -327,8 +327,8 @@ quoted-pair = "\" CHAR
- bool QHstsHeaderParser::parse(const QList> &headers)
- {
- for (const auto &h : headers) {
-- // We use '==' since header name was already 'trimmed' for us:
-- if (h.first == "Strict-Transport-Security") {
-+ // We compare directly because header name was already 'trimmed' for us:
-+ if (h.first.compare("Strict-Transport-Security", Qt::CaseInsensitive) == 0) {
- header = h.second;
- // RFC6797, 8.1:
- //
-diff --git a/tests/auto/network/access/hsts/tst_qhsts.cpp b/tests/auto/network/access/hsts/tst_qhsts.cpp
-index 252f5e8f5792..97a2d2889e57 100644
---- a/tests/auto/network/access/hsts/tst_qhsts.cpp
-+++ b/tests/auto/network/access/hsts/tst_qhsts.cpp
-@@ -216,6 +216,12 @@ void tst_QHsts::testSTSHeaderParser()
- QVERIFY(parser.expirationDate() > QDateTime::currentDateTimeUtc());
- QVERIFY(parser.includeSubDomains());
-
-+ list.pop_back();
-+ list << Header("strict-transport-security", "includeSubDomains;max-age=1000");
-+ QVERIFY(parser.parse(list));
-+ QVERIFY(parser.expirationDate() > QDateTime::currentDateTimeUtc());
-+ QVERIFY(parser.includeSubDomains());
-+
- list.pop_back();
- // Invalid (includeSubDomains twice):
- list << Header("Strict-Transport-Security", "max-age = 1000 ; includeSubDomains;includeSubDomains");
diff --git a/CVE-2023-32763.patch b/CVE-2023-32763.patch
deleted file mode 100644
index a3c9836..0000000
--- a/CVE-2023-32763.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-From 9e92024a183e93c63cb96a0a48cca07c20c7a243 Mon Sep 17 00:00:00 2001
-From: starlet-dx <15929766099@163.com>
-Date: Wed, 28 Jun 2023 11:47:13 +0800
-Subject: [PATCH 1/1] Fix CVE-2023-32763
-
-Origin: https://download.qt.io/official_releases/qt/5.15/CVE-2023-32763-qtbase-5.15.diff
-
----
- src/gui/painting/qfixed_p.h | 9 +++++++++
- src/gui/text/qtextlayout.cpp | 9 ++++++---
- 2 files changed, 15 insertions(+), 3 deletions(-)
-
-diff --git a/src/gui/painting/qfixed_p.h b/src/gui/painting/qfixed_p.h
-index 84659288..57d750a4 100644
---- a/src/gui/painting/qfixed_p.h
-+++ b/src/gui/painting/qfixed_p.h
-@@ -54,6 +54,7 @@
- #include
- #include "QtCore/qdebug.h"
- #include "QtCore/qpoint.h"
-+#include
- #include "QtCore/qsize.h"
-
- QT_BEGIN_NAMESPACE
-@@ -182,6 +183,14 @@ Q_DECL_CONSTEXPR inline bool operator<(int i, const QFixed &f) { return i * 64 <
- Q_DECL_CONSTEXPR inline bool operator>(const QFixed &f, int i) { return f.value() > i * 64; }
- Q_DECL_CONSTEXPR inline bool operator>(int i, const QFixed &f) { return i * 64 > f.value(); }
-
-+inline bool qAddOverflow(QFixed v1, QFixed v2, QFixed *r)
-+{
-+ int val;
-+ bool result = add_overflow(v1.value(), v2.value(), &val);
-+ r->setValue(val);
-+ return result;
-+}
-+
- #ifndef QT_NO_DEBUG_STREAM
- inline QDebug &operator<<(QDebug &dbg, const QFixed &f)
- { return dbg << f.toReal(); }
-diff --git a/src/gui/text/qtextlayout.cpp b/src/gui/text/qtextlayout.cpp
-index b2f12ef1..897a1bc9 100644
---- a/src/gui/text/qtextlayout.cpp
-+++ b/src/gui/text/qtextlayout.cpp
-@@ -2138,11 +2138,14 @@ found:
- eng->maxWidth = qMax(eng->maxWidth, line.textWidth);
- } else {
- eng->minWidth = qMax(eng->minWidth, lbh.minw);
-- eng->maxWidth += line.textWidth;
-+ if (qAddOverflow(eng->maxWidth, line.textWidth, &eng->maxWidth))
-+ eng->maxWidth = QFIXED_MAX;
- }
-
-- if (line.textWidth > 0 && item < eng->layoutData->items.size())
-- eng->maxWidth += lbh.spaceData.textWidth;
-+ if (line.textWidth > 0 && item < eng->layoutData->items.size()) {
-+ if (qAddOverflow(eng->maxWidth, lbh.spaceData.textWidth, &eng->maxWidth))
-+ eng->maxWidth = QFIXED_MAX;
-+ }
-
- line.textWidth += trailingSpace;
- if (lbh.spaceData.length) {
---
-2.30.0
-
diff --git a/Fix-lupdate-command-error-on-loongarch64.patch b/Fix-lupdate-command-error-on-loongarch64.patch
index 8ba3d3d..38b77c0 100644
--- a/Fix-lupdate-command-error-on-loongarch64.patch
+++ b/Fix-lupdate-command-error-on-loongarch64.patch
@@ -5,24 +5,9 @@ Subject: [PATCH] Fix lupdate command execution error on loongarch64
Signed-off-by: Jingyun Hua
---
- src/3rdparty/forkfd/forkfd_linux.c | 3 ++-
src/corelib/global/qprocessordetection.h | 5 +++--
- 2 files changed, 5 insertions(+), 3 deletions(-)
+ 1 files changed, 5 insertions(+), 2 deletions(-)
-diff --git a/src/3rdparty/forkfd/forkfd_linux.c b/src/3rdparty/forkfd/forkfd_linux.c
-index ffe0e9a5..b1f5408d 100644
---- a/src/3rdparty/forkfd/forkfd_linux.c
-+++ b/src/3rdparty/forkfd/forkfd_linux.c
-@@ -82,7 +82,8 @@ static int sys_clone(unsigned long cloneflags, int *ptid)
- return syscall(__NR_clone, cloneflags, child_stack, stack_size, ptid, newtls, ctid);
- #elif defined(__arc__) || defined(__arm__) || defined(__aarch64__) || defined(__mips__) || \
- defined(__nds32__) || defined(__hppa__) || defined(__powerpc__) || defined(__i386__) || \
-- defined(__x86_64__) || defined(__xtensa__) || defined(__alpha__) || defined(__riscv)
-+ defined(__x86_64__) || defined(__xtensa__) || defined(__alpha__) || defined(__riscv) || \
-+ defined(__loongarch__)
- /* ctid and newtls are inverted on CONFIG_CLONE_BACKWARDS architectures,
- * but since both values are 0, there's no harm. */
- return syscall(__NR_clone, cloneflags, child_stack, ptid, ctid, newtls);
diff --git a/src/corelib/global/qprocessordetection.h b/src/corelib/global/qprocessordetection.h
index ca9d4080..6f0bc7e7 100644
--- a/src/corelib/global/qprocessordetection.h
diff --git a/kde-5.15-rollup-20230613.patch b/kde-5.15-rollup-20230613.patch
new file mode 100644
index 0000000..7df7ae3
--- /dev/null
+++ b/kde-5.15-rollup-20230613.patch
@@ -0,0 +1,105025 @@
+diff --git a/doc/global/html-footer.qdocconf b/doc/global/html-footer.qdocconf
+index 673e500291..f799534c58 100644
+--- a/doc/global/html-footer.qdocconf
++++ b/doc/global/html-footer.qdocconf
+@@ -14,7 +14,7 @@ HTML.footer = \
+ " The documentation provided herein is licensed under the terms of the" \
+ " GNU Free Documentation" \
+ " License version 1.3 as published by the Free Software Foundation.
" \
+- " Qt and respective logos are trademarks of The Qt Company Ltd. " \
+- " in Finland and/or other countries worldwide. All other trademarks are property\n" \
+- " of their respective owners.
\n" \
++ " Qt and respective logos are " \
++ " trademarks of The Qt Company Ltd. in Finland and/or other countries\n" \
++ " worldwide. All other trademarks are property of their respective owners. \n" \
+ "\n" \
+diff --git a/doc/global/qt-module-defaults-online.qdocconf b/doc/global/qt-module-defaults-online.qdocconf
+index 635caf0b94..b35790e2d8 100644
+--- a/doc/global/qt-module-defaults-online.qdocconf
++++ b/doc/global/qt-module-defaults-online.qdocconf
+@@ -11,9 +11,9 @@ HTML.footer = \
+ " The documentation provided herein is licensed under the terms of the" \
+ " GNU Free Documentation" \
+ " License version 1.3 as published by the Free Software Foundation. " \
+- " Qt and respective logos are trademarks of The Qt Company Ltd. " \
+- " in Finland and/or other countries worldwide. All other trademarks are property\n" \
+- " of their respective owners. \n"
++ " Qt and respective logos are " \
++ " trademarks of The Qt Company Ltd. in Finland and/or other countries\n" \
++ " worldwide. All other trademarks are property of their respective owners. \n"
+
+ #include standard set of macros and C++ defines and ignores
+ include(macros.qdocconf)
+diff --git a/mkspecs/common/android/qplatformdefs.h b/mkspecs/common/android/qplatformdefs.h
+index f75bc4093b..2bd59410d4 100644
+--- a/mkspecs/common/android/qplatformdefs.h
++++ b/mkspecs/common/android/qplatformdefs.h
+@@ -144,11 +144,7 @@
+ #define QT_SIGNAL_ARGS int
+ #define QT_SIGNAL_IGNORE SIG_IGN
+
+-#if defined(__GLIBC__) && (__GLIBC__ >= 2)
+ #define QT_SOCKLEN_T socklen_t
+-#else
+-#define QT_SOCKLEN_T int
+-#endif
+
+ #if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
+ #define QT_SNPRINTF ::snprintf
+diff --git a/mkspecs/linux-clang/qplatformdefs.h b/mkspecs/linux-clang/qplatformdefs.h
+index a818d973f0..c1ab72fbc6 100644
+--- a/mkspecs/linux-clang/qplatformdefs.h
++++ b/mkspecs/linux-clang/qplatformdefs.h
+@@ -79,14 +79,6 @@
+ #define QT_USE_XOPEN_LFS_EXTENSIONS
+ #include "../common/posix/qplatformdefs.h"
+
+-#undef QT_SOCKLEN_T
+-
+-#if defined(__GLIBC__) && (__GLIBC__ >= 2)
+-#define QT_SOCKLEN_T socklen_t
+-#else
+-#define QT_SOCKLEN_T int
+-#endif
+-
+ #if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
+ #define QT_SNPRINTF ::snprintf
+ #define QT_VSNPRINTF ::vsnprintf
+diff --git a/mkspecs/linux-g++/qplatformdefs.h b/mkspecs/linux-g++/qplatformdefs.h
+index 13523f0702..4d2750d9ec 100644
+--- a/mkspecs/linux-g++/qplatformdefs.h
++++ b/mkspecs/linux-g++/qplatformdefs.h
+@@ -79,14 +79,6 @@
+ #define QT_USE_XOPEN_LFS_EXTENSIONS
+ #include "../common/posix/qplatformdefs.h"
+
+-#undef QT_SOCKLEN_T
+-
+-#if defined(__GLIBC__) && (__GLIBC__ < 2)
+-#define QT_SOCKLEN_T int
+-#else
+-#define QT_SOCKLEN_T socklen_t
+-#endif
+-
+ #if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
+ #define QT_SNPRINTF ::snprintf
+ #define QT_VSNPRINTF ::vsnprintf
+diff --git a/mkspecs/linux-llvm/qplatformdefs.h b/mkspecs/linux-llvm/qplatformdefs.h
+index dc750ab1ef..d3cc39b47f 100644
+--- a/mkspecs/linux-llvm/qplatformdefs.h
++++ b/mkspecs/linux-llvm/qplatformdefs.h
+@@ -80,14 +80,6 @@
+ #define QT_USE_XOPEN_LFS_EXTENSIONS
+ #include "../common/posix/qplatformdefs.h"
+
+-#undef QT_SOCKLEN_T
+-
+-#if defined(__GLIBC__) && (__GLIBC__ >= 2)
+-#define QT_SOCKLEN_T socklen_t
+-#else
+-#define QT_SOCKLEN_T int
+-#endif
+-
+ #if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
+ #define QT_SNPRINTF ::snprintf
+ #define QT_VSNPRINTF ::vsnprintf
+diff --git a/mkspecs/linux-lsb-g++/qplatformdefs.h b/mkspecs/linux-lsb-g++/qplatformdefs.h
+index 4c4e53da2a..83baffb3e3 100644
+--- a/mkspecs/linux-lsb-g++/qplatformdefs.h
++++ b/mkspecs/linux-lsb-g++/qplatformdefs.h
+@@ -85,16 +85,9 @@
+ #include "../common/posix/qplatformdefs.h"
+
+ #undef QT_OPEN_LARGEFILE
+-#undef QT_SOCKLEN_T
+
+ #define QT_OPEN_LARGEFILE 0
+
+-#if defined(__GLIBC__) && (__GLIBC__ >= 2)
+-#define QT_SOCKLEN_T socklen_t
+-#else
+-#define QT_SOCKLEN_T int
+-#endif
+-
+ #ifndef SIOCGIFBRDADDR
+ # define SIOCGIFBRDADDR 0x8919
+ #endif
+diff --git a/mkspecs/lynxos-g++/qplatformdefs.h b/mkspecs/lynxos-g++/qplatformdefs.h
+index 4339ea2b23..6007af0055 100644
+--- a/mkspecs/lynxos-g++/qplatformdefs.h
++++ b/mkspecs/lynxos-g++/qplatformdefs.h
+@@ -72,14 +72,6 @@
+
+ #include "../common/posix/qplatformdefs.h"
+
+-#undef QT_SOCKLEN_T
+-
+-#if defined(__GLIBC__) && (__GLIBC__ >= 2)
+-#define QT_SOCKLEN_T socklen_t
+-#else
+-#define QT_SOCKLEN_T int
+-#endif
+-
+ #if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
+ #define QT_SNPRINTF ::snprintf
+ #define QT_VSNPRINTF ::vsnprintf
+diff --git a/src/3rdparty/angle/src/libANGLE/HandleAllocator.cpp b/src/3rdparty/angle/src/libANGLE/HandleAllocator.cpp
+index c3c184258f..32af3f8f29 100644
+--- a/src/3rdparty/angle/src/libANGLE/HandleAllocator.cpp
++++ b/src/3rdparty/angle/src/libANGLE/HandleAllocator.cpp
+@@ -10,6 +10,7 @@
+ #include "libANGLE/HandleAllocator.h"
+
+ #include
++#include
+
+ #include "common/debug.h"
+
+diff --git a/src/3rdparty/forkfd/forkfd_linux.c b/src/3rdparty/forkfd/forkfd_linux.c
+index ffe0e9a5e2..b1f5408d11 100644
+--- a/src/3rdparty/forkfd/forkfd_linux.c
++++ b/src/3rdparty/forkfd/forkfd_linux.c
+@@ -82,7 +82,8 @@ static int sys_clone(unsigned long cloneflags, int *ptid)
+ return syscall(__NR_clone, cloneflags, child_stack, stack_size, ptid, newtls, ctid);
+ #elif defined(__arc__) || defined(__arm__) || defined(__aarch64__) || defined(__mips__) || \
+ defined(__nds32__) || defined(__hppa__) || defined(__powerpc__) || defined(__i386__) || \
+- defined(__x86_64__) || defined(__xtensa__) || defined(__alpha__) || defined(__riscv)
++ defined(__x86_64__) || defined(__xtensa__) || defined(__alpha__) || defined(__riscv) || \
++ defined(__loongarch__)
+ /* ctid and newtls are inverted on CONFIG_CLONE_BACKWARDS architectures,
+ * but since both values are 0, there's no harm. */
+ return syscall(__NR_clone, cloneflags, child_stack, ptid, ctid, newtls);
+diff --git a/src/3rdparty/freetype/LICENSE.txt b/src/3rdparty/freetype/LICENSE.txt
+index 1119880c09..824f5c6129 100644
+--- a/src/3rdparty/freetype/LICENSE.txt
++++ b/src/3rdparty/freetype/LICENSE.txt
+@@ -1,96 +1,101 @@
+-The FreeType 2 font engine is copyrighted work and cannot be used
+-legally without a software license. In order to make this project
+-usable to a vast majority of developers, we distribute it under two
++FREETYPE LICENSES
++-----------------
++
++The FreeType 2 font engine is copyrighted work and cannot be used
++legally without a software license. In order to make this project
++usable to a vast majority of developers, we distribute it under two
+ mutually exclusive open-source licenses.
+
+-This means that *you* must choose *one* of the two licenses described
+-below, then obey all its terms and conditions when using FreeType 2 in
++This means that *you* must choose *one* of the two licenses described
++below, then obey all its terms and conditions when using FreeType 2 in
+ any of your projects or products.
+
+- - The FreeType License, found in the file `FTL.TXT', which is similar
+- to the original BSD license *with* an advertising clause that forces
+- you to explicitly cite the FreeType project in your product's
+- documentation. All details are in the license file. This license
+- is suited to products which don't use the GNU General Public
+- License.
++ - The FreeType License, found in the file `docs/FTL.TXT`, which is
++ similar to the original BSD license *with* an advertising clause
++ that forces you to explicitly cite the FreeType project in your
++ product's documentation. All details are in the license file.
++ This license is suited to products which don't use the GNU General
++ Public License.
+
+- Note that this license is compatible to the GNU General Public
++ Note that this license is compatible to the GNU General Public
+ License version 3, but not version 2.
+
+- - The GNU General Public License version 2, found in `GPLv2.TXT' (any
+- later version can be used also), for programs which already use the
+- GPL. Note that the FTL is incompatible with GPLv2 due to its
+- advertisement clause.
++ - The GNU General Public License version 2, found in
++ `docs/GPLv2.TXT` (any later version can be used also), for
++ programs which already use the GPL. Note that the FTL is
++ incompatible with GPLv2 due to its advertisement clause.
+
+-The contributed BDF and PCF drivers come with a license similar to that
+-of the X Window System. It is compatible to the above two licenses (see
+-file src/bdf/README and src/pcf/README).
++The contributed BDF and PCF drivers come with a license similar to
++that of the X Window System. It is compatible to the above two
++licenses (see files `src/bdf/README` and `src/pcf/README`). The same
++holds for the source code files `src/base/fthash.c` and
++`include/freetype/internal/fthash.h`; they wer part of the BDF driver
++in earlier FreeType versions.
+
+-The gzip module uses the zlib license (see src/gzip/zlib.h) which too is
+-compatible to the above two licenses.
++The gzip module uses the zlib license (see `src/gzip/zlib.h`) which
++too is compatible to the above two licenses.
+
+-The MD5 checksum support (only used for debugging in development builds)
+-is in the public domain.
++The MD5 checksum support (only used for debugging in development
++builds) is in the public domain.
+
++-- FTL.TXT --
+
+---- FDL.TXT ---
++The FreeType Project LICENSE
++----------------------------
+
+- The FreeType Project LICENSE
+- ----------------------------
++ 2006-Jan-27
+
+- 2006-Jan-27
+-
+- Copyright 1996-2002, 2006 by
+- David Turner, Robert Wilhelm, and Werner Lemberg
++Copyright 1996-2002, 2006 by
++David Turner, Robert Wilhelm, and Werner Lemberg
+
+
+
+ Introduction
+ ============
+
+- The FreeType Project is distributed in several archive packages;
+- some of them may contain, in addition to the FreeType font engine,
+- various tools and contributions which rely on, or relate to, the
+- FreeType Project.
++The FreeType Project is distributed in several archive packages;
++some of them may contain, in addition to the FreeType font engine,
++various tools and contributions which rely on, or relate to, the
++FreeType Project.
+
+- This license applies to all files found in such packages, and
+- which do not fall under their own explicit license. The license
+- affects thus the FreeType font engine, the test programs,
+- documentation and makefiles, at the very least.
++This license applies to all files found in such packages, and
++which do not fall under their own explicit license. The license
++affects thus the FreeType font engine, the test programs,
++documentation and makefiles, at the very least.
+
+- This license was inspired by the BSD, Artistic, and IJG
+- (Independent JPEG Group) licenses, which all encourage inclusion
+- and use of free software in commercial and freeware products
+- alike. As a consequence, its main points are that:
++This license was inspired by the BSD, Artistic, and IJG
++(Independent JPEG Group) licenses, which all encourage inclusion
++and use of free software in commercial and freeware products
++alike. As a consequence, its main points are that:
+
+- o We don't promise that this software works. However, we will be
+- interested in any kind of bug reports. (`as is' distribution)
++o We don't promise that this software works. However, we will be
++interested in any kind of bug reports. (`as is' distribution)
+
+- o You can use this software for whatever you want, in parts or
+- full form, without having to pay us. (`royalty-free' usage)
++o You can use this software for whatever you want, in parts or
++full form, without having to pay us. (`royalty-free' usage)
+
+- o You may not pretend that you wrote this software. If you use
+- it, or only parts of it, in a program, you must acknowledge
+- somewhere in your documentation that you have used the
+- FreeType code. (`credits')
++o You may not pretend that you wrote this software. If you use
++it, or only parts of it, in a program, you must acknowledge
++somewhere in your documentation that you have used the
++FreeType code. (`credits')
+
+- We specifically permit and encourage the inclusion of this
+- software, with or without modifications, in commercial products.
+- We disclaim all warranties covering The FreeType Project and
+- assume no liability related to The FreeType Project.
++We specifically permit and encourage the inclusion of this
++software, with or without modifications, in commercial products.
++We disclaim all warranties covering The FreeType Project and
++assume no liability related to The FreeType Project.
+
+
+- Finally, many people asked us for a preferred form for a
+- credit/disclaimer to use in compliance with this license. We thus
+- encourage you to use the following text:
++Finally, many people asked us for a preferred form for a
++credit/disclaimer to use in compliance with this license. We thus
++encourage you to use the following text:
+
+- """
+- Portions of this software are copyright © The FreeType
+- Project (www.freetype.org). All rights reserved.
+- """
++"""
++Portions of this software are copyright © The FreeType
++Project (www.freetype.org). All rights reserved.
++"""
+
+- Please replace with the value from the FreeType version you
+- actually use.
++Please replace with the value from the FreeType version you
++actually use.
+
+
+ Legal Terms
+@@ -99,110 +104,111 @@ Legal Terms
+ 0. Definitions
+ --------------
+
+- Throughout this license, the terms `package', `FreeType Project',
+- and `FreeType archive' refer to the set of files originally
+- distributed by the authors (David Turner, Robert Wilhelm, and
+- Werner Lemberg) as the `FreeType Project', be they named as alpha,
+- beta or final release.
+-
+- `You' refers to the licensee, or person using the project, where
+- `using' is a generic term including compiling the project's source
+- code as well as linking it to form a `program' or `executable'.
+- This program is referred to as `a program using the FreeType
+- engine'.
+-
+- This license applies to all files distributed in the original
+- FreeType Project, including all source code, binaries and
+- documentation, unless otherwise stated in the file in its
+- original, unmodified form as distributed in the original archive.
+- If you are unsure whether or not a particular file is covered by
+- this license, you must contact us to verify this.
+-
+- The FreeType Project is copyright (C) 1996-2000 by David Turner,
+- Robert Wilhelm, and Werner Lemberg. All rights reserved except as
+- specified below.
++Throughout this license, the terms `package', `FreeType Project',
++and `FreeType archive' refer to the set of files originally
++distributed by the authors (David Turner, Robert Wilhelm, and
++Werner Lemberg) as the `FreeType Project', be they named as alpha,
++beta or final release.
++
++`You' refers to the licensee, or person using the project, where
++`using' is a generic term including compiling the project's source
++code as well as linking it to form a `program' or `executable'.
++This program is referred to as `a program using the FreeType
++engine'.
++
++This license applies to all files distributed in the original
++FreeType Project, including all source code, binaries and
++documentation, unless otherwise stated in the file in its
++original, unmodified form as distributed in the original archive.
++If you are unsure whether or not a particular file is covered by
++this license, you must contact us to verify this.
++
++The FreeType Project is copyright (C) 1996-2000 by David Turner,
++Robert Wilhelm, and Werner Lemberg. All rights reserved except as
++specified below.
+
+ 1. No Warranty
+ --------------
+
+- THE FREETYPE PROJECT IS PROVIDED `AS IS' WITHOUT WARRANTY OF ANY
+- KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+- PURPOSE. IN NO EVENT WILL ANY OF THE AUTHORS OR COPYRIGHT HOLDERS
+- BE LIABLE FOR ANY DAMAGES CAUSED BY THE USE OR THE INABILITY TO
+- USE, OF THE FREETYPE PROJECT.
++THE FREETYPE PROJECT IS PROVIDED `AS IS' WITHOUT WARRANTY OF ANY
++KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
++WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
++PURPOSE. IN NO EVENT WILL ANY OF THE AUTHORS OR COPYRIGHT HOLDERS
++BE LIABLE FOR ANY DAMAGES CAUSED BY THE USE OR THE INABILITY TO
++USE, OF THE FREETYPE PROJECT.
+
+ 2. Redistribution
+ -----------------
+
+- This license grants a worldwide, royalty-free, perpetual and
+- irrevocable right and license to use, execute, perform, compile,
+- display, copy, create derivative works of, distribute and
+- sublicense the FreeType Project (in both source and object code
+- forms) and derivative works thereof for any purpose; and to
+- authorize others to exercise some or all of the rights granted
+- herein, subject to the following conditions:
+-
+- o Redistribution of source code must retain this license file
+- (`FTL.TXT') unaltered; any additions, deletions or changes to
+- the original files must be clearly indicated in accompanying
+- documentation. The copyright notices of the unaltered,
+- original files must be preserved in all copies of source
+- files.
+-
+- o Redistribution in binary form must provide a disclaimer that
+- states that the software is based in part of the work of the
+- FreeType Team, in the distribution documentation. We also
+- encourage you to put an URL to the FreeType web page in your
+- documentation, though this isn't mandatory.
+-
+- These conditions apply to any software derived from or based on
+- the FreeType Project, not just the unmodified files. If you use
+- our work, you must acknowledge us. However, no fee need be paid
+- to us.
++This license grants a worldwide, royalty-free, perpetual and
++irrevocable right and license to use, execute, perform, compile,
++display, copy, create derivative works of, distribute and
++sublicense the FreeType Project (in both source and object code
++forms) and derivative works thereof for any purpose; and to
++authorize others to exercise some or all of the rights granted
++herein, subject to the following conditions:
++
++o Redistribution of source code must retain this license file
++(`FTL.TXT') unaltered; any additions, deletions or changes to
++the original files must be clearly indicated in accompanying
++documentation. The copyright notices of the unaltered,
++original files must be preserved in all copies of source
++files.
++
++o Redistribution in binary form must provide a disclaimer that
++states that the software is based in part of the work of the
++FreeType Team, in the distribution documentation. We also
++encourage you to put an URL to the FreeType web page in your
++documentation, though this isn't mandatory.
++
++These conditions apply to any software derived from or based on
++the FreeType Project, not just the unmodified files. If you use
++our work, you must acknowledge us. However, no fee need be paid
++to us.
+
+ 3. Advertising
+ --------------
+
+- Neither the FreeType authors and contributors nor you shall use
+- the name of the other for commercial, advertising, or promotional
+- purposes without specific prior written permission.
++Neither the FreeType authors and contributors nor you shall use
++the name of the other for commercial, advertising, or promotional
++purposes without specific prior written permission.
+
+- We suggest, but do not require, that you use one or more of the
+- following phrases to refer to this software in your documentation
+- or advertising materials: `FreeType Project', `FreeType Engine',
+- `FreeType library', or `FreeType Distribution'.
++We suggest, but do not require, that you use one or more of the
++following phrases to refer to this software in your documentation
++or advertising materials: `FreeType Project', `FreeType Engine',
++`FreeType library', or `FreeType Distribution'.
+
+- As you have not signed this license, you are not required to
+- accept it. However, as the FreeType Project is copyrighted
+- material, only this license, or another one contracted with the
+- authors, grants you the right to use, distribute, and modify it.
+- Therefore, by using, distributing, or modifying the FreeType
+- Project, you indicate that you understand and accept all the terms
+- of this license.
++As you have not signed this license, you are not required to
++accept it. However, as the FreeType Project is copyrighted
++material, only this license, or another one contracted with the
++authors, grants you the right to use, distribute, and modify it.
++Therefore, by using, distributing, or modifying the FreeType
++Project, you indicate that you understand and accept all the terms
++of this license.
+
+ 4. Contacts
+ -----------
+
+- There are two mailing lists related to FreeType:
++There are two mailing lists related to FreeType:
++
++o freetype@nongnu.org
+
+- o freetype@nongnu.org
++Discusses general use and applications of FreeType, as well as
++future and wanted additions to the library and distribution.
++If you are looking for support, start in this list if you
++haven't found anything to help you in the documentation.
+
+- Discusses general use and applications of FreeType, as well as
+- future and wanted additions to the library and distribution.
+- If you are looking for support, start in this list if you
+- haven't found anything to help you in the documentation.
++o freetype-devel@nongnu.org
+
+- o freetype-devel@nongnu.org
++Discusses bugs, as well as engine internals, design issues,
++specific licenses, porting, etc.
+
+- Discusses bugs, as well as engine internals, design issues,
+- specific licenses, porting, etc.
++Our home page can be found at
+
+- Our home page can be found at
++https://www.freetype.org
+
+- http://www.freetype.org
+
+---- end of FDL.TXT ---
++--- end of FTL.TXT ---
+
+ --- GPLv2.TXT ---
+
+diff --git a/src/3rdparty/freetype/PCF-LICENSE.txt b/src/3rdparty/freetype/PCF-LICENSE.txt
+index 3f3a3b3f0c..2668007a5c 100644
+--- a/src/3rdparty/freetype/PCF-LICENSE.txt
++++ b/src/3rdparty/freetype/PCF-LICENSE.txt
+@@ -18,3 +18,27 @@ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
++
++--
++
++Copyright 1990, 1994, 1998 The Open Group
++
++Permission to use, copy, modify, distribute, and sell this software and its
++documentation for any purpose is hereby granted without fee, provided that
++the above copyright notice appear in all copies and that both that
++copyright notice and this permission notice appear in supporting
++documentation.
++
++The above copyright notice and this permission notice shall be included in
++all copies or substantial portions of the Software.
++
++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
++OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
++AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
++CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
++
++Except as contained in this notice, the name of The Open Group shall not be
++used in advertising or otherwise to promote the sale, use or other dealings
++in this Software without prior written authorization from The Open Group.
+diff --git a/src/3rdparty/freetype/README b/src/3rdparty/freetype/README
+index e4c8cf1c57..7a8a2dcedc 100644
+--- a/src/3rdparty/freetype/README
++++ b/src/3rdparty/freetype/README
+@@ -1,92 +1,98 @@
+- FreeType 2.10.4
+- ===============
++FreeType 2.12.1
++===============
+
+- Homepage: https://www.freetype.org
++Homepage: https://www.freetype.org
+
+- FreeType is a freely available software library to render fonts.
++FreeType is a freely available software library to render fonts.
+
+- It is written in C, designed to be small, efficient, highly
+- customizable, and portable while capable of producing high-quality
+- output (glyph images) of most vector and bitmap font formats.
++It is written in C, designed to be small, efficient, highly
++customizable, and portable while capable of producing high-quality
++output (glyph images) of most vector and bitmap font formats.
+
+- Please read the docs/CHANGES file, it contains IMPORTANT
+- INFORMATION.
++Please read the `docs/CHANGES` file, it contains IMPORTANT
++INFORMATION.
+
+- Read the files `docs/INSTALL*' for installation instructions; see
+- the file `docs/LICENSE.TXT' for the available licenses.
++Read the files `docs/INSTALL*` for installation instructions; see the
++file `docs/LICENSE.TXT` for the available licenses.
+
+- The FreeType 2 API reference is located in `docs/reference/site';
+- use the file `index.html' as the top entry point. [Please note that
+- currently the search function for locally installed documentation
+- doesn't work due to cross-site scripting issues.]
++For using FreeType's git repository instead of a distribution bundle,
++please read file `README.git`.
+
+- Additional documentation is available as a separate package from our
+- sites. Go to
++The FreeType 2 API reference is located in directory `docs/reference`;
++use the file `index.html` as the top entry point. [Please note that
++currently the search function for locally installed documentation
++doesn't work due to cross-site scripting issues.]
+
+- https://download.savannah.gnu.org/releases/freetype/
++Additional documentation is available as a separate package from our
++sites. Go to
+
+- and download one of the following files.
++ https://download.savannah.gnu.org/releases/freetype/
+
+- freetype-doc-2.10.4.tar.xz
+- freetype-doc-2.10.4.tar.gz
+- ftdoc2104.zip
++and download one of the following files.
+
+- To view the documentation online, go to
++ freetype-doc-2.12.1.tar.xz
++ freetype-doc-2.12.1.tar.gz
++ ftdoc2121.zip
+
+- https://www.freetype.org/freetype2/docs/
++To view the documentation online, go to
+
++ https://www.freetype.org/freetype2/docs/
+
+- Mailing Lists
+- =============
+
+- The preferred way of communication with the FreeType team is using
+- e-mail lists.
++Mailing Lists
++-------------
+
+- general use and discussion: freetype@nongnu.org
+- engine internals, porting, etc.: freetype-devel@nongnu.org
+- announcements: freetype-announce@nongnu.org
+- git repository tracker: freetype-commit@nongnu.org
++The preferred way of communication with the FreeType team is using
++e-mail lists.
+
+- The lists are moderated; see
++ general use and discussion: freetype@nongnu.org
++ engine internals, porting, etc.: freetype-devel@nongnu.org
++ announcements: freetype-announce@nongnu.org
++ git repository tracker: freetype-commit@nongnu.org
+
+- https://www.freetype.org/contact.html
++The lists are moderated; see
+
+- how to subscribe.
++ https://www.freetype.org/contact.html
+
++how to subscribe.
+
+- Bugs
+- ====
+
+- Please submit bug reports at
++Bugs
++----
+
+- https://savannah.nongnu.org/bugs/?group=freetype
++Please submit bug reports at
+
+- Alternatively, you might report bugs by e-mail to
+- `freetype-devel@nongnu.org'. Don't forget to send a detailed
+- explanation of the problem -- there is nothing worse than receiving
+- a terse message that only says `it doesn't work'.
++ https://gitlab.freedesktop.org/freetype/freetype/-/issues
+
++Alternatively, you might report bugs by e-mail to
++`freetype-devel@nongnu.org`. Don't forget to send a detailed
++explanation of the problem -- there is nothing worse than receiving a
++terse message that only says 'it doesn't work'.
+
+- Patches
+- =======
+
+- Please submit patches to the `freetype-devel@nongnu.org' mailing
+- list -- and thank you in advance for your work on improving
+- FreeType!
++Patches
++-------
+
+- Details on the process can be found here:
++For larger changes please provide merge requests at
+
+- https://www.freetype.org/developer.html#patches
++ https://gitlab.freedesktop.org/freetype/freetype/-/merge_requests
+
++Alternatively, you can send patches to the `freetype-devel@nongnu.org`
++mailing list -- and thank you in advance for your work on improving
++FreeType!
+
+- Enjoy!
++Details on the process can be found here:
+
++ https://www.freetype.org/developer.html#patches
+
+- The FreeType Team
++
++Enjoy!
++
++ The FreeType Team
+
+ ----------------------------------------------------------------------
+
+-Copyright (C) 2006-2020 by
++Copyright (C) 2006-2022 by
+ David Turner, Robert Wilhelm, and Werner Lemberg.
+
+ This file is part of the FreeType project, and may only be used,
+diff --git a/src/3rdparty/freetype/builds/unix/ftconfig.h b/src/3rdparty/freetype/builds/unix/ftconfig.h
+index 51cb796391..57911e2f71 100644
+--- a/src/3rdparty/freetype/builds/unix/ftconfig.h
++++ b/src/3rdparty/freetype/builds/unix/ftconfig.h
+@@ -5,7 +5,7 @@
+ *
+ * UNIX-specific configuration file (specification only).
+ *
+- * Copyright (C) 1996-2020 by
++ * Copyright (C) 1996-2022 by
+ * David Turner, Robert Wilhelm, and Werner Lemberg.
+ *
+ * This file is part of the FreeType project, and may only be used,
+diff --git a/src/3rdparty/freetype/builds/unix/ftsystem.c b/src/3rdparty/freetype/builds/unix/ftsystem.c
+index 22bb4dab9b..e238c6083d 100644
+--- a/src/3rdparty/freetype/builds/unix/ftsystem.c
++++ b/src/3rdparty/freetype/builds/unix/ftsystem.c
+@@ -1,19 +1,19 @@
+-/***************************************************************************/
+-/* */
+-/* ftsystem.c */
+-/* */
+-/* Unix-specific FreeType low-level system interface (body). */
+-/* */
+-/* Copyright (C) 1996-2020 by */
+-/* David Turner, Robert Wilhelm, and Werner Lemberg. */
+-/* */
+-/* This file is part of the FreeType project, and may only be used, */
+-/* modified, and distributed under the terms of the FreeType project */
+-/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
+-/* this file you indicate that you have read the license and */
+-/* understand and accept it fully. */
+-/* */
+-/***************************************************************************/
++/****************************************************************************
++ *
++ * ftsystem.c
++ *
++ * Unix-specific FreeType low-level system interface (body).
++ *
++ * Copyright (C) 1996-2022 by
++ * David Turner, Robert Wilhelm, and Werner Lemberg.
++ *
++ * This file is part of the FreeType project, and may only be used,
++ * modified, and distributed under the terms of the FreeType project
++ * license, LICENSE.TXT. By continuing to use, modify, or distribute
++ * this file you indicate that you have read the license and
++ * understand and accept it fully.
++ *
++ */
+
+
+ #include
+@@ -70,30 +70,40 @@
+ #include
+ #include
+
+-
+- /*************************************************************************/
+- /* */
+- /* MEMORY MANAGEMENT INTERFACE */
+- /* */
+- /*************************************************************************/
+-
+-
+- /*************************************************************************/
+- /* */
+- /* */
+- /* ft_alloc */
+- /* */
+- /* */
+- /* The memory allocation function. */
+- /* */
+- /* */
+- /* memory :: A pointer to the memory object. */
+- /* */
+- /* size :: The requested size in bytes. */
+- /* */
+- /* */
+- /* The address of newly allocated block. */
+- /* */
++ /**************************************************************************
++ *
++ * MEMORY MANAGEMENT INTERFACE
++ *
++ */
++
++
++ /**************************************************************************
++ *
++ * It is not necessary to do any error checking for the
++ * allocation-related functions. This will be done by the higher level
++ * routines like ft_mem_alloc() or ft_mem_realloc().
++ *
++ */
++
++
++ /**************************************************************************
++ *
++ * @Function:
++ * ft_alloc
++ *
++ * @Description:
++ * The memory allocation function.
++ *
++ * @Input:
++ * memory ::
++ * A pointer to the memory object.
++ *
++ * size ::
++ * The requested size in bytes.
++ *
++ * @Return:
++ * The address of newly allocated block.
++ */
+ FT_CALLBACK_DEF( void* )
+ ft_alloc( FT_Memory memory,
+ long size )
+@@ -104,26 +114,30 @@
+ }
+
+
+- /*************************************************************************/
+- /* */
+- /* */
+- /* ft_realloc */
+- /* */
+- /* */
+- /* The memory reallocation function. */
+- /* */
+- /* */
+- /* memory :: A pointer to the memory object. */
+- /* */
+- /* cur_size :: The current size of the allocated memory block. */
+- /* */
+- /* new_size :: The newly requested size in bytes. */
+- /* */
+- /* block :: The current address of the block in memory. */
+- /* */
+- /* */
+- /* The address of the reallocated memory block. */
+- /* */
++ /**************************************************************************
++ *
++ * @Function:
++ * ft_realloc
++ *
++ * @Description:
++ * The memory reallocation function.
++ *
++ * @Input:
++ * memory ::
++ * A pointer to the memory object.
++ *
++ * cur_size ::
++ * The current size of the allocated memory block.
++ *
++ * new_size ::
++ * The newly requested size in bytes.
++ *
++ * block ::
++ * The current address of the block in memory.
++ *
++ * @Return:
++ * The address of the reallocated memory block.
++ */
+ FT_CALLBACK_DEF( void* )
+ ft_realloc( FT_Memory memory,
+ long cur_size,
+@@ -137,19 +151,21 @@
+ }
+
+
+- /*************************************************************************/
+- /* */
+- /* */
+- /* ft_free */
+- /* */
+- /* */
+- /* The memory release function. */
+- /* */
+- /* */
+- /* memory :: A pointer to the memory object. */
+- /* */
+- /* block :: The address of block in memory to be freed. */
+- /* */
++ /**************************************************************************
++ *
++ * @Function:
++ * ft_free
++ *
++ * @Description:
++ * The memory release function.
++ *
++ * @Input:
++ * memory ::
++ * A pointer to the memory object.
++ *
++ * block ::
++ * The address of block in memory to be freed.
++ */
+ FT_CALLBACK_DEF( void )
+ ft_free( FT_Memory memory,
+ void* block )
+@@ -160,19 +176,19 @@
+ }
+
+
+- /*************************************************************************/
+- /* */
+- /* RESOURCE MANAGEMENT INTERFACE */
+- /* */
+- /*************************************************************************/
++ /**************************************************************************
++ *
++ * RESOURCE MANAGEMENT INTERFACE
++ *
++ */
+
+
+- /*************************************************************************/
+- /* */
+- /* The macro FT_COMPONENT is used in trace mode. It is an implicit */
+- /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log */
+- /* messages during execution. */
+- /* */
++ /**************************************************************************
++ *
++ * The macro FT_COMPONENT is used in trace mode. It is an implicit
++ * parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log
++ * messages during execution.
++ */
+ #undef FT_COMPONENT
+ #define FT_COMPONENT io
+
+@@ -181,17 +197,17 @@
+ #define STREAM_FILE( stream ) ( (FILE*)stream->descriptor.pointer )
+
+
+- /*************************************************************************/
+- /* */
+- /* */
+- /* ft_close_stream_by_munmap */
+- /* */
+- /* */
+- /* The function to close a stream which is opened by mmap. */
+- /* */
+- /* */
+- /* stream :: A pointer to the stream object. */
+- /* */
++ /**************************************************************************
++ *
++ * @Function:
++ * ft_close_stream_by_munmap
++ *
++ * @Description:
++ * The function to close a stream which is opened by mmap.
++ *
++ * @Input:
++ * stream :: A pointer to the stream object.
++ */
+ FT_CALLBACK_DEF( void )
+ ft_close_stream_by_munmap( FT_Stream stream )
+ {
+@@ -199,29 +215,29 @@
+
+ stream->descriptor.pointer = NULL;
+ stream->size = 0;
+- stream->base = 0;
++ stream->base = NULL;
+ }
+
+
+- /*************************************************************************/
+- /* */
+- /* */
+- /* ft_close_stream_by_free */
+- /* */
+- /* */
+- /* The function to close a stream which is created by ft_alloc. */
+- /* */
+- /* */
+- /* stream :: A pointer to the stream object. */
+- /* */
++ /**************************************************************************
++ *
++ * @Function:
++ * ft_close_stream_by_free
++ *
++ * @Description:
++ * The function to close a stream which is created by ft_alloc.
++ *
++ * @Input:
++ * stream :: A pointer to the stream object.
++ */
+ FT_CALLBACK_DEF( void )
+ ft_close_stream_by_free( FT_Stream stream )
+ {
+- ft_free( NULL, stream->descriptor.pointer );
++ ft_free( stream->memory, stream->descriptor.pointer );
+
+ stream->descriptor.pointer = NULL;
+ stream->size = 0;
+- stream->base = 0;
++ stream->base = NULL;
+ }
+
+
+@@ -297,8 +313,7 @@
+ file,
+ 0 );
+
+- /* on some RTOS, mmap might return 0 */
+- if ( (long)stream->base != -1 && stream->base != NULL )
++ if ( stream->base != MAP_FAILED )
+ stream->close = ft_close_stream_by_munmap;
+ else
+ {
+@@ -308,7 +323,7 @@
+ FT_ERROR(( "FT_Stream_Open:" ));
+ FT_ERROR(( " could not `mmap' file `%s'\n", filepathname ));
+
+- stream->base = (unsigned char*)ft_alloc( NULL, stream->size );
++ stream->base = (unsigned char*)ft_alloc( stream->memory, stream->size );
+
+ if ( !stream->base )
+ {
+@@ -349,7 +364,7 @@
+ stream->descriptor.pointer = stream->base;
+ stream->pathname.pointer = (char*)filepathname;
+
+- stream->read = 0;
++ stream->read = NULL;
+
+ FT_TRACE1(( "FT_Stream_Open:" ));
+ FT_TRACE1(( " opened `%s' (%ld bytes) successfully\n",
+@@ -358,7 +373,7 @@
+ return FT_Err_Ok;
+
+ Fail_Read:
+- ft_free( NULL, stream->base );
++ ft_free( stream->memory, stream->base );
+
+ Fail_Map:
+ close( file );
+@@ -393,7 +408,7 @@
+ memory = (FT_Memory)malloc( sizeof ( *memory ) );
+ if ( memory )
+ {
+- memory->user = 0;
++ memory->user = NULL;
+ memory->alloc = ft_alloc;
+ memory->realloc = ft_realloc;
+ memory->free = ft_free;
+diff --git a/src/3rdparty/freetype/builds/windows/ftdebug.c b/src/3rdparty/freetype/builds/windows/ftdebug.c
+new file mode 100644
+index 0000000000..a65f544694
+--- /dev/null
++++ b/src/3rdparty/freetype/builds/windows/ftdebug.c
+@@ -0,0 +1,698 @@
++/****************************************************************************
++ *
++ * ftdebug.c
++ *
++ * Debugging and logging component for Win32 (body).
++ *
++ * Copyright (C) 1996-2022 by
++ * David Turner, Robert Wilhelm, and Werner Lemberg.
++ *
++ * This file is part of the FreeType project, and may only be used,
++ * modified, and distributed under the terms of the FreeType project
++ * license, LICENSE.TXT. By continuing to use, modify, or distribute
++ * this file you indicate that you have read the license and
++ * understand and accept it fully.
++ *
++ */
++
++
++ /**************************************************************************
++ *
++ * This component contains various macros and functions used to ease the
++ * debugging of the FreeType engine. Its main purpose is in assertion
++ * checking, tracing, and error detection.
++ *
++ * There are now three debugging modes:
++ *
++ * - trace mode
++ *
++ * Error and trace messages are sent to the log file (which can be the
++ * standard error output).
++ *
++ * - error mode
++ *
++ * Only error messages are generated.
++ *
++ * - release mode:
++ *
++ * No error message is sent or generated. The code is free from any
++ * debugging parts.
++ *
++ */
++
++
++#include
++#include
++#include
++#include
++
++
++#ifdef FT_DEBUG_LOGGING
++
++ /**************************************************************************
++ *
++ * Variables used to control logging.
++ *
++ * 1. `ft_default_trace_level` stores the value of trace levels, which are
++ * provided to FreeType using the `FT2_DEBUG` environment variable.
++ *
++ * 2. `ft_fileptr` stores the `FILE*` handle.
++ *
++ * 3. `ft_component` is a string that holds the name of `FT_COMPONENT`.
++ *
++ * 4. The flag `ft_component_flag` prints the name of `FT_COMPONENT` along
++ * with the actual log message if set to true.
++ *
++ * 5. The flag `ft_timestamp_flag` prints time along with the actual log
++ * message if set to ture.
++ *
++ * 6. `ft_have_newline_char` is used to differentiate between a log
++ * message with and without a trailing newline character.
++ *
++ * 7. `ft_custom_trace_level` stores the custom trace level value, which
++ * is provided by the user at run-time.
++ *
++ * We use `static` to avoid 'unused variable' warnings.
++ *
++ */
++ static const char* ft_default_trace_level = NULL;
++ static FILE* ft_fileptr = NULL;
++ static const char* ft_component = NULL;
++ static FT_Bool ft_component_flag = FALSE;
++ static FT_Bool ft_timestamp_flag = FALSE;
++ static FT_Bool ft_have_newline_char = TRUE;
++ static const char* ft_custom_trace_level = NULL;
++
++ /* declared in ftdebug.h */
++
++ dlg_handler ft_default_log_handler = NULL;
++ FT_Custom_Log_Handler custom_output_handler = NULL;
++
++#endif /* FT_DEBUG_LOGGING */
++
++
++#ifdef FT_DEBUG_LEVEL_ERROR
++
++#define WIN32_LEAN_AND_MEAN
++#include
++
++
++#ifdef _WIN32_WCE
++
++ FT_LOACAL_DEF( void )
++ OutputDebugStringA( LPCSTR lpOutputString )
++ {
++ int len;
++ LPWSTR lpOutputStringW;
++
++
++ /* allocate memory space for converted string */
++ len = MultiByteToWideChar( CP_ACP, MB_ERR_INVALID_CHARS,
++ lpOutputString, -1, NULL, 0 );
++
++ lpOutputStringW = (LPWSTR)_alloca( len * sizeof ( WCHAR ) );
++
++ if ( !len || !lpOutputStringW )
++ return;
++
++ /* now it is safe to do the translation */
++ MultiByteToWideChar( CP_ACP, MB_ERR_INVALID_CHARS,
++ lpOutputString, -1, lpOutputStringW, len );
++
++ OutputDebugStringW( lpOutputStringW );
++ }
++
++#endif /* _WIN32_WCE */
++
++
++ /* documentation is in ftdebug.h */
++
++ FT_BASE_DEF( void )
++ FT_Message( const char* fmt,
++ ... )
++ {
++ va_list ap;
++
++
++ va_start( ap, fmt );
++ vfprintf( stderr, fmt, ap );
++#if ( defined( _WIN32_WINNT ) && _WIN32_WINNT >= 0x0400 ) || \
++ ( defined( _WIN32_WCE ) && _WIN32_WCE >= 0x0600 )
++ if ( IsDebuggerPresent() )
++ {
++ static char buf[1024];
++
++
++ vsnprintf( buf, sizeof buf, fmt, ap );
++ OutputDebugStringA( buf );
++ }
++#endif
++ va_end( ap );
++ }
++
++
++ /* documentation is in ftdebug.h */
++
++ FT_BASE_DEF( void )
++ FT_Panic( const char* fmt,
++ ... )
++ {
++ va_list ap;
++
++
++ va_start( ap, fmt );
++ vfprintf( stderr, fmt, ap );
++#if ( defined( _WIN32_WINNT ) && _WIN32_WINNT >= 0x0400 ) || \
++ ( defined( _WIN32_WCE ) && _WIN32_WCE >= 0x0600 )
++ if ( IsDebuggerPresent() )
++ {
++ static char buf[1024];
++
++
++ vsnprintf( buf, sizeof buf, fmt, ap );
++ OutputDebugStringA( buf );
++ }
++#endif
++ va_end( ap );
++
++ exit( EXIT_FAILURE );
++ }
++
++
++ /* documentation is in ftdebug.h */
++
++ FT_BASE_DEF( int )
++ FT_Throw( FT_Error error,
++ int line,
++ const char* file )
++ {
++#if 0
++ /* activating the code in this block makes FreeType very chatty */
++ fprintf( stderr,
++ "%s:%d: error 0x%02x: %s\n",
++ file,
++ line,
++ error,
++ FT_Error_String( error ) );
++#else
++ FT_UNUSED( error );
++ FT_UNUSED( line );
++ FT_UNUSED( file );
++#endif
++
++ return 0;
++ }
++
++#endif /* FT_DEBUG_LEVEL_ERROR */
++
++
++#ifdef FT_DEBUG_LEVEL_TRACE
++
++ /* array of trace levels, initialized to 0; */
++ /* this gets adjusted at run-time */
++ static int ft_trace_levels_enabled[trace_count];
++
++ /* array of trace levels, always initialized to 0 */
++ static int ft_trace_levels_disabled[trace_count];
++
++ /* a pointer to either `ft_trace_levels_enabled' */
++ /* or `ft_trace_levels_disabled' */
++ int* ft_trace_levels;
++
++ /* define array of trace toggle names */
++#define FT_TRACE_DEF( x ) #x ,
++
++ static const char* ft_trace_toggles[trace_count + 1] =
++ {
++#include
++ NULL
++ };
++
++#undef FT_TRACE_DEF
++
++
++ /* documentation is in ftdebug.h */
++
++ FT_BASE_DEF( FT_Int )
++ FT_Trace_Get_Count( void )
++ {
++ return trace_count;
++ }
++
++
++ /* documentation is in ftdebug.h */
++
++ FT_BASE_DEF( const char * )
++ FT_Trace_Get_Name( FT_Int idx )
++ {
++ int max = FT_Trace_Get_Count();
++
++
++ if ( idx < max )
++ return ft_trace_toggles[idx];
++ else
++ return NULL;
++ }
++
++
++ /* documentation is in ftdebug.h */
++
++ FT_BASE_DEF( void )
++ FT_Trace_Disable( void )
++ {
++ ft_trace_levels = ft_trace_levels_disabled;
++ }
++
++
++ /* documentation is in ftdebug.h */
++
++ FT_BASE_DEF( void )
++ FT_Trace_Enable( void )
++ {
++ ft_trace_levels = ft_trace_levels_enabled;
++ }
++
++
++ /**************************************************************************
++ *
++ * Initialize the tracing sub-system. This is done by retrieving the
++ * value of the `FT2_DEBUG' environment variable. It must be a list of
++ * toggles, separated by spaces, `;', or `,'. Example:
++ *
++ * export FT2_DEBUG="any:3 memory:7 stream:5"
++ *
++ * This requests that all levels be set to 3, except the trace level for
++ * the memory and stream components which are set to 7 and 5,
++ * respectively.
++ *
++ * See the file `include/freetype/internal/fttrace.h' for details of
++ * the available toggle names.
++ *
++ * The level must be between 0 and 7; 0 means quiet (except for serious
++ * runtime errors), and 7 means _very_ verbose.
++ */
++ FT_BASE_DEF( void )
++ ft_debug_init( void )
++ {
++ const char* ft2_debug = NULL;
++
++
++#ifdef FT_DEBUG_LOGGING
++ if ( ft_custom_trace_level != NULL )
++ ft2_debug = ft_custom_trace_level;
++ else
++ ft2_debug = ft_default_trace_level;
++#else
++ ft2_debug = ft_getenv( "FT2_DEBUG" );
++#endif
++
++ if ( ft2_debug )
++ {
++ const char* p = ft2_debug;
++ const char* q;
++
++
++ for ( ; *p; p++ )
++ {
++ /* skip leading whitespace and separators */
++ if ( *p == ' ' || *p == '\t' || *p == ',' || *p == ';' || *p == '=' )
++ continue;
++
++#ifdef FT_DEBUG_LOGGING
++
++ /* check extra arguments for logging */
++ if ( *p == '-' )
++ {
++ const char* r = ++p;
++
++
++ if ( *r == 'v' )
++ {
++ const char* s = ++r;
++
++
++ ft_component_flag = TRUE;
++
++ if ( *s == 't' )
++ {
++ ft_timestamp_flag = TRUE;
++ p++;
++ }
++
++ p++;
++ }
++
++ else if ( *r == 't' )
++ {
++ const char* s = ++r;
++
++
++ ft_timestamp_flag = TRUE;
++
++ if ( *s == 'v' )
++ {
++ ft_component_flag = TRUE;
++ p++;
++ }
++
++ p++;
++ }
++ }
++
++#endif /* FT_DEBUG_LOGGING */
++
++ /* read toggle name, followed by ':' */
++ q = p;
++ while ( *p && *p != ':' )
++ p++;
++
++ if ( !*p )
++ break;
++
++ if ( *p == ':' && p > q )
++ {
++ FT_Int n, i, len = (FT_Int)( p - q );
++ FT_Int level = -1, found = -1;
++
++
++ for ( n = 0; n < trace_count; n++ )
++ {
++ const char* toggle = ft_trace_toggles[n];
++
++
++ for ( i = 0; i < len; i++ )
++ {
++ if ( toggle[i] != q[i] )
++ break;
++ }
++
++ if ( i == len && toggle[i] == 0 )
++ {
++ found = n;
++ break;
++ }
++ }
++
++ /* read level */
++ p++;
++ if ( *p )
++ {
++ level = *p - '0';
++ if ( level < 0 || level > 7 )
++ level = -1;
++ }
++
++ if ( found >= 0 && level >= 0 )
++ {
++ if ( found == trace_any )
++ {
++ /* special case for `any' */
++ for ( n = 0; n < trace_count; n++ )
++ ft_trace_levels_enabled[n] = level;
++ }
++ else
++ ft_trace_levels_enabled[found] = level;
++ }
++ }
++ }
++ }
++
++ ft_trace_levels = ft_trace_levels_enabled;
++ }
++
++
++#else /* !FT_DEBUG_LEVEL_TRACE */
++
++
++ FT_BASE_DEF( void )
++ ft_debug_init( void )
++ {
++ /* nothing */
++ }
++
++
++ FT_BASE_DEF( FT_Int )
++ FT_Trace_Get_Count( void )
++ {
++ return 0;
++ }
++
++
++ FT_BASE_DEF( const char * )
++ FT_Trace_Get_Name( FT_Int idx )
++ {
++ FT_UNUSED( idx );
++
++ return NULL;
++ }
++
++
++ FT_BASE_DEF( void )
++ FT_Trace_Disable( void )
++ {
++ /* nothing */
++ }
++
++
++ /* documentation is in ftdebug.h */
++
++ FT_BASE_DEF( void )
++ FT_Trace_Enable( void )
++ {
++ /* nothing */
++ }
++
++#endif /* !FT_DEBUG_LEVEL_TRACE */
++
++
++#ifdef FT_DEBUG_LOGGING
++
++ /**************************************************************************
++ *
++ * Initialize and de-initialize 'dlg' library.
++ *
++ */
++
++ FT_BASE_DEF( void )
++ ft_logging_init( void )
++ {
++ ft_default_log_handler = ft_log_handler;
++ ft_default_trace_level = ft_getenv( "FT2_DEBUG" );
++
++ if ( ft_getenv( "FT_LOGGING_FILE" ) )
++ ft_fileptr = ft_fopen( ft_getenv( "FT_LOGGING_FILE" ), "w" );
++ else
++ ft_fileptr = stderr;
++
++ ft_debug_init();
++
++ /* Set the default output handler for 'dlg'. */
++ dlg_set_handler( ft_default_log_handler, NULL );
++ }
++
++
++ FT_BASE_DEF( void )
++ ft_logging_deinit( void )
++ {
++ if ( ft_fileptr != stderr )
++ ft_fclose( ft_fileptr );
++ }
++
++
++ /**************************************************************************
++ *
++ * An output log handler for FreeType.
++ *
++ */
++ FT_BASE_DEF( void )
++ ft_log_handler( const struct dlg_origin* origin,
++ const char* string,
++ void* data )
++ {
++ char features_buf[128];
++ char* bufp = features_buf;
++
++ FT_UNUSED( data );
++
++
++ if ( ft_have_newline_char )
++ {
++ const char* features = NULL;
++ size_t features_length = 0;
++
++
++#define FEATURES_TIMESTAMP "[%h:%m] "
++#define FEATURES_COMPONENT "[%t] "
++#define FEATURES_TIMESTAMP_COMPONENT "[%h:%m %t] "
++
++ if ( ft_timestamp_flag && ft_component_flag )
++ {
++ features = FEATURES_TIMESTAMP_COMPONENT;
++ features_length = sizeof ( FEATURES_TIMESTAMP_COMPONENT );
++ }
++ else if ( ft_timestamp_flag )
++ {
++ features = FEATURES_TIMESTAMP;
++ features_length = sizeof ( FEATURES_TIMESTAMP );
++ }
++ else if ( ft_component_flag )
++ {
++ features = FEATURES_COMPONENT;
++ features_length = sizeof ( FEATURES_COMPONENT );
++ }
++
++ if ( ft_component_flag || ft_timestamp_flag )
++ {
++ ft_strncpy( features_buf, features, features_length );
++ bufp += features_length - 1;
++ }
++
++ if ( ft_component_flag )
++ {
++ size_t tag_length = ft_strlen( *origin->tags );
++ size_t i;
++
++
++ /* To vertically align tracing messages we compensate the */
++ /* different FT_COMPONENT string lengths by inserting an */
++ /* appropriate amount of space characters. */
++ for ( i = 0;
++ i < FT_MAX_TRACE_LEVEL_LENGTH - tag_length;
++ i++ )
++ *bufp++ = ' ';
++ }
++ }
++
++ /* Finally add the format string for the tracing message. */
++ *bufp++ = '%';
++ *bufp++ = 'c';
++ *bufp = '\0';
++
++ dlg_generic_outputf_stream( ft_fileptr,
++ (const char*)features_buf,
++ origin,
++ string,
++ dlg_default_output_styles,
++ true );
++
++ if ( ft_strrchr( string, '\n' ) )
++ ft_have_newline_char = TRUE;
++ else
++ ft_have_newline_char = FALSE;
++ }
++
++
++ /* documentation is in ftdebug.h */
++ FT_BASE_DEF( void )
++ ft_add_tag( const char* tag )
++ {
++ ft_component = tag;
++
++ dlg_add_tag( tag, NULL );
++ }
++
++
++ /* documentation is in ftdebug.h */
++ FT_BASE_DEF( void )
++ ft_remove_tag( const char* tag )
++ {
++ dlg_remove_tag( tag, NULL );
++ }
++
++
++ /* documentation is in ftlogging.h */
++
++ FT_EXPORT_DEF( void )
++ FT_Trace_Set_Level( const char* level )
++ {
++ ft_component_flag = FALSE;
++ ft_timestamp_flag = FALSE;
++ ft_custom_trace_level = level;
++
++ ft_debug_init();
++ }
++
++
++ /* documentation is in ftlogging.h */
++
++ FT_EXPORT_DEF( void )
++ FT_Trace_Set_Default_Level( void )
++ {
++ ft_component_flag = FALSE;
++ ft_timestamp_flag = FALSE;
++ ft_custom_trace_level = NULL;
++
++ ft_debug_init();
++ }
++
++
++ /**************************************************************************
++ *
++ * Functions to handle a custom log handler.
++ *
++ */
++
++ /* documentation is in ftlogging.h */
++
++ FT_EXPORT_DEF( void )
++ FT_Set_Log_Handler( FT_Custom_Log_Handler handler )
++ {
++ custom_output_handler = handler;
++ }
++
++
++ /* documentation is in ftlogging.h */
++
++ FT_EXPORT_DEF( void )
++ FT_Set_Default_Log_Handler( void )
++ {
++ custom_output_handler = NULL;
++ }
++
++
++ /* documentation is in ftdebug.h */
++ FT_BASE_DEF( void )
++ FT_Logging_Callback( const char* fmt,
++ ... )
++ {
++ va_list ap;
++
++
++ va_start( ap, fmt );
++ custom_output_handler( ft_component, fmt, ap );
++ va_end( ap );
++ }
++
++#else /* !FT_DEBUG_LOGGING */
++
++ FT_EXPORT_DEF( void )
++ FT_Trace_Set_Level( const char* level )
++ {
++ FT_UNUSED( level );
++ }
++
++
++ FT_EXPORT_DEF( void )
++ FT_Trace_Set_Default_Level( void )
++ {
++ /* nothing */
++ }
++
++
++ FT_EXPORT_DEF( void )
++ FT_Set_Log_Handler( FT_Custom_Log_Handler handler )
++ {
++ FT_UNUSED( handler );
++ }
++
++
++ FT_EXPORT_DEF( void )
++ FT_Set_Default_Log_Handler( void )
++ {
++ /* nothing */
++ }
++
++#endif /* !FT_DEBUG_LOGGING */
++
++
++/* END */
+diff --git a/src/3rdparty/freetype/docs/CHANGES b/src/3rdparty/freetype/docs/CHANGES
+index 3bd5291ae1..3ad7ec4333 100644
+--- a/src/3rdparty/freetype/docs/CHANGES
++++ b/src/3rdparty/freetype/docs/CHANGES
+@@ -1,4 +1,235 @@
+-CHANGES BETWEEN 2.10.3 and 2.10.4
++CHANGES BETWEEN 2.12.0 and 2.12.1
++
++ I. IMPORTANT BUG FIXES
++
++ - Loading CFF fonts sometimes made FreeType crash (bug introduced in
++ version 2.12.0)
++
++ - Loading a fully hinted TrueType glyph a second time (without
++ caching) sometimes yielded different rendering results if TrueType
++ hinting was active (bug introduced in version 2.12.0).
++
++ - The generation of the pkg-config file `freetype2.pc` was broken if
++ the build was done with cmake (bug introduced in version 2.12.0).
++
++
++ II. MISCELLANEOUS
++
++ - New option `--with-librsvg` for the `configure` script for better
++ FreeType demo support.
++
++ - The meson build no longer enforces both static and dynamic
++ versions of the library by default.
++
++ - The internal zlib library was updated to version 1.2.12. Note,
++ however, that FreeType is *not* affected by CVE-2018-25032 since
++ it only does decompression.
++
++
++======================================================================
++
++CHANGES BETWEEN 2.11.1 and 2.12.0
++
++ I. IMPORTANT CHANGES
++
++ - FreeType now handles OT-SVG fonts, to be controlled with
++ `FT_CONFIG_OPTION_SVG` configuration macro. By default, it can
++ only load the 'SVG ' table of an OpenType font. However, by using
++ the `svg-hooks` property of the new 'ot-svg' module it is possible
++ to register an external SVG rendering engine. The FreeType demo
++ programs have been set up to use 'librsvg' as the rendering
++ library.
++
++ This work was Moazin Khatti's GSoC 2019 project.
++
++
++ II. MISCELLANEOUS
++
++ - The handling of fonts with an 'sbix' table has been improved.
++
++ - Corrected bitmap offsets.
++
++ - A new tag `FT_PARAM_TAG_IGNORE_SBIX` for `FT_Open_Face` makes
++ FreeType ignore an 'sbix' table in a font, allowing applications
++ to access the font's outline glyphs.
++
++ - `FT_FACE_FLAG_SBIX` and `FT_FACE_FLAG_SBIX_OVERLAY` together
++ with their corresponding preprocessor macros `FT_HAS_SBIX` and
++ `FT_HAS_SBIX_OVERLAY` enable applications to treat 'sbix' tables
++ as described in the OpenType specification.
++
++ - The internal 'zlib' code has been updated to be in sync with the
++ current 'zlib' version (1.2.11).
++
++ - The previously internal load flag `FT_LOAD_SBITS_ONLY` is now
++ public.
++
++ - Some minor improvements of the building systems, in particular
++ handling of the 'zlib' library (internal vs. external).
++
++ - Support for non-desktop Universal Windows Platform.
++
++ - Various other minor bug and documentation fixes.
++
++ - The `ftdump` demo program shows more information for Type1 fonts
++ if option `-n` is given.
++
++ - `ftgrid` can now display embedded bitmap strikes.
++
++
++======================================================================
++
++CHANGES BETWEEN 2.11.0 and 2.11.1
++
++ I. IMPORTANT CHANGES
++
++ - Some fields in the `CID_FaceDictRec`, `CID_FaceInfoRec`, and
++ `FT_Data` structures have been changed from signed to unsigned
++ type, which better reflects the actual usage. It is also an
++ additional means to protect against malformed input.
++
++
++ II. MISCELLANEOUS
++
++ - Cmake support has been further improved. To do that various
++ backward-incompatible changes were necessary; please see file
++ `CMakeLists.txt` for more details.
++
++ - Since version 2.11.0, a C99 compiler is necessary to compile
++ FreeType.
++
++ - The experimental 'COLR' v1 API has been updated to the latest
++ OpenType standard 1.9.
++
++ - The `apinames` tool got a new option `-wV` to output an OpenVMS
++ Linker Option File.
++
++ - VMS support was updated.
++
++ - MS Visual Studio support was added to build the demo programs.
++
++
++======================================================================
++
++CHANGES BETWEEN 2.10.4 and 2.11.0
++
++ I. IMPORTANT CHANGES
++
++ - A new rendering module has been added to create 8-bit Signed
++ Distance Field (SDF) bitmaps for both outline and bitmap glyphs.
++ The new rendering mode is called `FT_RENDER_MODE_SDF`, the pixel
++ mode is `FT_PIXEL_MODE_GRAY8`, and the corresponding raster flag
++ is `FT_RASTER_FLAG_SDF`.
++
++ This work was Anuj Verma's GSoC 2020 project.
++
++ - A new, experimental API is now available for surfacing properties
++ of 'COLR' v1 color fonts (as the name says, this is an extension
++ to the 'COLR' table for outline color fonts using the SFNT
++ container format). 'COLR' v1 fonts are a recently proposed
++ addition to OFF and OpenType; specification work currently happens
++ in
++
++ https://github.com/googlefonts/colr-gradients-spec/
++
++ 'COLR' v1 is expected to be merged to OpenType; the ISO
++ standardisation process for adding 'COLR' v1 as an amendment to
++ OFF is underway.
++
++ Functions similar to the already existing 'COLR' API have been
++ added to access the corresponding data.
++
++ FT_Get_Color_Glyph_Paint
++ Retrieve the root paint for a given glyph ID.
++
++ FT_Get_Paint_Layers
++ Access the layers of a `PaintColrLayers` table.
++
++ FT_Get_Colorline_Stops
++ Retrieve the 'color stops' on a color line. As an input, a
++ color stop iterator gets used, which in turn is retrieved from
++ a paint.
++
++ FT_Get_Paint
++ Dereference an `FT_OpaquePaint` object and retrieve the
++ corresponding `FT_COLR_Paint` object, which contains details
++ on how to draw the respective 'COLR' v1 `Paint` table.
++
++
++ II. MISCELLANEOUS
++
++ - FreeType has moved its infrastructure to
++
++ https://gitlab.freedesktop.org/freetype
++
++ A side effect is that the git repositories are now called
++ `freetype.git` and `freetype-demos.git`, which by default expand
++ to the directories `freetype` and `freetype-demos`, respectively.
++ The documentation has been updated accordingly.
++
++ FreeType's Savannah repositories will stay; they are now mirrors
++ of the 'freedesktop.org' repositories.
++
++ - A new function `FT_Get_Transform` returns the values set by
++ `FT_Set_Transform`.
++
++ - A new configuration macro `FT_DEBUG_LOGGING` is available. It
++ provides extended debugging capabilities for FreeType, for example
++ showing a time stamp or displaying the component a tracing message
++ comes from. See file `docs/DEBUG` for more information.
++
++ This work was Priyesh Kumar's GSoC 2020 project.
++
++ - The legacy Type 1 and CFF engines are further demoted due to lack
++ of CFF2 charstring support. You now need to use `FT_Property_Set`
++ to enable them besides the `T1_CONFIG_OPTION_OLD_ENGINE` and
++ `CFF_CONFIG_OPTION_OLD_ENGINE` options, respectively.
++
++ - The experimental 'warp' mode (AF_CONFIG_OPTION_USE_WARPER) for the
++ auto-hinter has been removed.
++
++ - The smooth rasterizer performance has been improved by >10%. Note
++ that due to necessary code changes there might be very subtle
++ differences in rendering. They are not visible by the eye,
++ however.
++
++ - PCF bitmap fonts compressed with LZW (these are usually files with
++ the extension `.pcf.Z`) are now handled correctly.
++
++ - Improved Meson build files, including support to build the
++ FreeType demo programs.
++
++ - A new demo program `ftsdf` is available to display Signed Distance
++ Fields of glyphs.
++
++ - The `ftlint` demo program has been extended to do more testing of
++ its input. In particular, it can display horizontal and vertical
++ acutances for quality assessment, together with computing MD5
++ checksums of rendered glyphs.
++
++ [The acutance measures how sharply the pixel coverage changes at
++ glyph edges. For monochrome bitmaps, it is always 2.0 in either
++ X or Y direction. For anti-aliased bitmaps, it depends on the
++ hinting and the shape of a glyph and might approach or even reach
++ value 2.0 for glyphs like 'I', 'L', '+', '-', or '=', while it
++ might be lower for glyphs like 'O', 'S', or 'W'.]
++
++ - The `ttdebug` demo program didn't show changed point coordinates
++ (bug introduced in version 2.10.3).
++
++ - It is now possible to adjust the axis increment for variable fonts
++ in the `ftmulti` demo program.
++
++ - It is now possible to change the hinting engine in the `ftstring`
++ demo program.
++
++ - The graphical demo programs work better now in native color depth
++ on win32 and x11.
++
++
++======================================================================
++
++CHANGES BETWEEN 2.10.3 and 2.10.4 (2020-Oct-20)
+
+ I. IMPORTANT BUG FIXES
+
+@@ -13,7 +244,7 @@ CHANGES BETWEEN 2.10.3 and 2.10.4
+
+ ======================================================================
+
+-CHANGES BETWEEN 2.10.2 and 2.10.3
++CHANGES BETWEEN 2.10.2 and 2.10.3 (2020-Oct-10)
+
+ I. IMPORTANT CHANGES
+
+@@ -63,7 +294,7 @@ CHANGES BETWEEN 2.10.2 and 2.10.3
+
+ ======================================================================
+
+-CHANGES BETWEEN 2.10.1 and 2.10.2
++CHANGES BETWEEN 2.10.1 and 2.10.2 (2020-May-09)
+
+ I. IMPORTANT CHANGES
+
+@@ -100,7 +331,7 @@ CHANGES BETWEEN 2.10.1 and 2.10.2
+
+ ======================================================================
+
+-CHANGES BETWEEN 2.10.0 and 2.10.1
++CHANGES BETWEEN 2.10.0 and 2.10.1 (2019-Jul-01)
+
+ I. IMPORTANT BUG FIXES
+
+@@ -154,7 +385,7 @@ CHANGES BETWEEN 2.10.0 and 2.10.1
+
+ ======================================================================
+
+-CHANGES BETWEEN 2.9.1 and 2.10.0
++CHANGES BETWEEN 2.9.1 and 2.10.0 (2019-Mar-15)
+
+ I. IMPORTANT CHANGES
+
+@@ -280,7 +511,7 @@ CHANGES BETWEEN 2.9.1 and 2.10.0
+
+ ======================================================================
+
+-CHANGES BETWEEN 2.9 and 2.9.1
++CHANGES BETWEEN 2.9 and 2.9.1 (2019-May-01)
+
+ I. IMPORTANT BUG FIXES
+
+@@ -328,7 +559,7 @@ CHANGES BETWEEN 2.9 and 2.9.1
+
+ ======================================================================
+
+-CHANGES BETWEEN 2.8.1 and 2.9
++CHANGES BETWEEN 2.8.1 and 2.9 (2018-Jan-08)
+
+ I. IMPORTANT BUG FIXES
+
+@@ -418,7 +649,7 @@ CHANGES BETWEEN 2.8.1 and 2.9
+
+ ======================================================================
+
+-CHANGES BETWEEN 2.8 and 2.8.1
++CHANGES BETWEEN 2.8 and 2.8.1 (2017-Sep-16)
+
+ I. IMPORTANT BUG FIXES
+
+@@ -501,7 +732,7 @@ CHANGES BETWEEN 2.8 and 2.8.1
+
+ ======================================================================
+
+-CHANGES BETWEEN 2.7.1 and 2.8
++CHANGES BETWEEN 2.7.1 and 2.8 (2017-May-13)
+
+ I. IMPORTANT CHANGES
+
+@@ -622,7 +853,7 @@ CHANGES BETWEEN 2.7.1 and 2.8
+
+ ======================================================================
+
+-CHANGES BETWEEN 2.7 and 2.7.1
++CHANGES BETWEEN 2.7 and 2.7.1 (2016-Dec-30)
+
+ I. IMPORTANT CHANGES
+
+@@ -699,7 +930,7 @@ CHANGES BETWEEN 2.7 and 2.7.1
+
+ ======================================================================
+
+-CHANGES BETWEEN 2.6.5 and 2.7
++CHANGES BETWEEN 2.6.5 and 2.7 (2016-Sep-08)
+
+ I. IMPORTANT CHANGES
+
+@@ -763,7 +994,7 @@ CHANGES BETWEEN 2.6.5 and 2.7
+
+ ======================================================================
+
+-CHANGES BETWEEN 2.6.4 and 2.6.5
++CHANGES BETWEEN 2.6.4 and 2.6.5 (2016-Jul-12)
+
+ I. IMPORTANT BUG FIXES
+
+@@ -783,7 +1014,7 @@ CHANGES BETWEEN 2.6.4 and 2.6.5
+
+ ======================================================================
+
+-CHANGES BETWEEN 2.6.3 and 2.6.4
++CHANGES BETWEEN 2.6.3 and 2.6.4 (2016-Jul-05)
+
+ I. IMPORTANT CHANGES
+
+@@ -849,7 +1080,7 @@ CHANGES BETWEEN 2.6.3 and 2.6.4
+
+ ======================================================================
+
+-CHANGES BETWEEN 2.6.2 and 2.6.3
++CHANGES BETWEEN 2.6.2 and 2.6.3 (2016-Feb-08)
+
+ I. IMPORTANT CHANGES
+
+@@ -898,7 +1129,7 @@ CHANGES BETWEEN 2.6.2 and 2.6.3
+
+ ======================================================================
+
+-CHANGES BETWEEN 2.6.1 and 2.6.2
++CHANGES BETWEEN 2.6.1 and 2.6.2 (2015-Nov-28)
+
+ I. IMPORTANT CHANGES
+
+@@ -958,7 +1189,7 @@ CHANGES BETWEEN 2.6.1 and 2.6.2
+
+ ======================================================================
+
+-CHANGES BETWEEN 2.6 and 2.6.1
++CHANGES BETWEEN 2.6 and 2.6.1 (2015-Oct-04)
+
+ I. IMPORTANT BUG FIXES
+
+@@ -1039,7 +1270,7 @@ CHANGES BETWEEN 2.6 and 2.6.1
+
+ ======================================================================
+
+-CHANGES BETWEEN 2.5.5 and 2.6
++CHANGES BETWEEN 2.5.5 and 2.6 (2015-Jun-07)
+
+ I. IMPORTANT CHANGES
+
+@@ -1145,7 +1376,7 @@ CHANGES BETWEEN 2.5.5 and 2.6
+
+ ======================================================================
+
+-CHANGES BETWEEN 2.5.4 and 2.5.5
++CHANGES BETWEEN 2.5.4 and 2.5.5 (2014-Dec-30)
+
+ I. IMPORTANT BUG FIXES
+
+@@ -1155,7 +1386,7 @@ CHANGES BETWEEN 2.5.4 and 2.5.5
+
+ ======================================================================
+
+-CHANGES BETWEEN 2.5.3 and 2.5.4
++CHANGES BETWEEN 2.5.3 and 2.5.4 (2014-Dec-06)
+
+ I. IMPORTANT BUG FIXES
+
+@@ -1226,7 +1457,7 @@ CHANGES BETWEEN 2.5.3 and 2.5.4
+
+ ======================================================================
+
+-CHANGES BETWEEN 2.5.2 and 2.5.3
++CHANGES BETWEEN 2.5.2 and 2.5.3 (2014-Mar-06)
+
+ I. IMPORTANT BUG FIXES
+
+@@ -1294,7 +1525,7 @@ CHANGES BETWEEN 2.5.2 and 2.5.3
+
+ ======================================================================
+
+-CHANGES BETWEEN 2.5.1 and 2.5.2
++CHANGES BETWEEN 2.5.1 and 2.5.2 (2013-Dec-08)
+
+ I. IMPORTANT BUG FIXES
+
+@@ -1318,7 +1549,7 @@ CHANGES BETWEEN 2.5.1 and 2.5.2
+
+ ======================================================================
+
+-CHANGES BETWEEN 2.5 and 2.5.1
++CHANGES BETWEEN 2.5 and 2.5.1 (2013-Nov-25)
+
+ I. IMPORTANT BUG FIXES
+
+@@ -1422,7 +1653,7 @@ CHANGES BETWEEN 2.5 and 2.5.1
+
+ ======================================================================
+
+-CHANGES BETWEEN 2.4.12 and 2.5
++CHANGES BETWEEN 2.4.12 and 2.5 (2013-Jun-19)
+
+ I. IMPORTANT BUG FIXES
+
+@@ -1502,7 +1733,7 @@ CHANGES BETWEEN 2.4.12 and 2.5
+
+ ======================================================================
+
+-CHANGES BETWEEN 2.4.11 and 2.4.12
++CHANGES BETWEEN 2.4.11 and 2.4.12 (2013-May-08)
+
+ - We have another CFF parsing and hinting engine! Written by Dave
+ Arnold , this work has been contributed by
+@@ -1590,7 +1821,7 @@ index ebcf189..3f2ce6b 100644
+
+ ======================================================================
+
+-CHANGES BETWEEN 2.4.10 and 2.4.11
++CHANGES BETWEEN 2.4.10 and 2.4.11 (2012-Dec-20)
+
+ I. IMPORTANT BUG FIXES
+
+@@ -1650,7 +1881,7 @@ CHANGES BETWEEN 2.4.10 and 2.4.11
+
+ ======================================================================
+
+-CHANGES BETWEEN 2.4.9 and 2.4.10
++CHANGES BETWEEN 2.4.9 and 2.4.10 (2012-Jun-15)
+
+ I. IMPORTANT BUG FIXES
+
+@@ -1675,7 +1906,7 @@ CHANGES BETWEEN 2.4.9 and 2.4.10
+
+ ======================================================================
+
+-CHANGES BETWEEN 2.4.8 and 2.4.9
++CHANGES BETWEEN 2.4.8 and 2.4.9 (2012-Mar-08)
+
+ I. IMPORTANT BUG FIXES
+
+@@ -1703,7 +1934,7 @@ CHANGES BETWEEN 2.4.8 and 2.4.9
+
+ ======================================================================
+
+-CHANGES BETWEEN 2.4.7 and 2.4.8
++CHANGES BETWEEN 2.4.7 and 2.4.8 (2011-Nov-14)
+
+ I. IMPORTANT BUG FIXES
+
+@@ -1719,7 +1950,7 @@ CHANGES BETWEEN 2.4.7 and 2.4.8
+
+ ======================================================================
+
+-CHANGES BETWEEN 2.4.6 and 2.4.7
++CHANGES BETWEEN 2.4.6 and 2.4.7 (2011-Oct-18)
+
+ I. IMPORTANT BUG FIXES
+
+@@ -1736,7 +1967,7 @@ CHANGES BETWEEN 2.4.6 and 2.4.7
+
+ ======================================================================
+
+-CHANGES BETWEEN 2.4.5 and 2.4.6
++CHANGES BETWEEN 2.4.5 and 2.4.6 (2011-Jul-29)
+
+ I. IMPORTANT BUG FIXES
+
+@@ -1775,7 +2006,7 @@ CHANGES BETWEEN 2.4.5 and 2.4.6
+
+ ======================================================================
+
+-CHANGES BETWEEN 2.4.4 and 2.4.5
++CHANGES BETWEEN 2.4.4 and 2.4.5 (2011-Jun-25)
+
+ I. IMPORTANT BUG FIXES
+
+@@ -1822,7 +2053,7 @@ CHANGES BETWEEN 2.4.4 and 2.4.5
+
+ ======================================================================
+
+-CHANGES BETWEEN 2.4.3 and 2.4.4
++CHANGES BETWEEN 2.4.3 and 2.4.4 (2010-Nov-28)
+
+ I. IMPORTANT BUG FIXES
+
+@@ -1847,7 +2078,7 @@ CHANGES BETWEEN 2.4.3 and 2.4.4
+
+ ======================================================================
+
+-CHANGES BETWEEN 2.4.2 and 2.4.3
++CHANGES BETWEEN 2.4.2 and 2.4.3 (2010-Oct-03)
+
+ I. IMPORTANT BUG FIXES
+
+@@ -1866,7 +2097,7 @@ CHANGES BETWEEN 2.4.2 and 2.4.3
+
+ ======================================================================
+
+-CHANGES BETWEEN 2.4.1 and 2.4.2
++CHANGES BETWEEN 2.4.1 and 2.4.2 (2010-Aug-06)
+
+ I. IMPORTANT BUG FIXES
+
+@@ -1890,7 +2121,7 @@ CHANGES BETWEEN 2.4.1 and 2.4.2
+
+ ======================================================================
+
+-CHANGES BETWEEN 2.4.0 and 2.4.1
++CHANGES BETWEEN 2.4.0 and 2.4.1 (2010-Jul-18)
+
+ I. IMPORTANT CHANGES
+
+@@ -1900,7 +2131,7 @@ CHANGES BETWEEN 2.4.0 and 2.4.1
+
+ ======================================================================
+
+-CHANGES BETWEEN 2.3.12 and 2.4.0
++CHANGES BETWEEN 2.3.12 and 2.4.0 (2010-Jul-12)
+
+ I. IMPORTANT CHANGES
+
+@@ -5299,7 +5530,7 @@ Extensions support:
+
+ ------------------------------------------------------------------------
+
+-Copyright (C) 2000-2020 by
++Copyright (C) 2000-2022 by
+ David Turner, Robert Wilhelm, and Werner Lemberg.
+
+ This file is part of the FreeType project, and may only be used,
+diff --git a/src/3rdparty/freetype/docs/CUSTOMIZE b/src/3rdparty/freetype/docs/CUSTOMIZE
+index 0f92e70046..1a750825b2 100644
+--- a/src/3rdparty/freetype/docs/CUSTOMIZE
++++ b/src/3rdparty/freetype/docs/CUSTOMIZE
+@@ -139,7 +139,7 @@ IV. Overriding default configuration and module headers
+
+ ----------------------------------------------------------------------
+
+-Copyright (C) 2003-2020 by
++Copyright (C) 2003-2022 by
+ David Turner, Robert Wilhelm, and Werner Lemberg.
+
+ This file is part of the FreeType project, and may only be used,
+diff --git a/src/3rdparty/freetype/docs/DEBUG b/src/3rdparty/freetype/docs/DEBUG
+index a96b5e27b8..fd2de134d5 100644
+--- a/src/3rdparty/freetype/docs/DEBUG
++++ b/src/3rdparty/freetype/docs/DEBUG
+@@ -44,6 +44,21 @@ located in the file `ftoption.h'. The macros are:
+ When `FT2_DEBUG_MEMORY' isn't defined at runtime, the debugging
+ memory manager is ignored, and performance is unaffected.
+
++ FT_DEBUG_LOGGING
++
++ #define this macro for enhanced logging support; it automatically
++ sets `FT_DEBUG_LEVEL_TRACE' and `FT_DEBUG_LEVEL_ERROR'.
++
++ If defined, `FT_TRACE' and `FT_ERROR' can send tracing and
++ debugging messages to a file. The location of the log file has to
++ be set with the `FT_LOGGING_FILE' environment variable (more on
++ this later).
++
++ The main enhancements are the possibility of logging the time and
++ the name of the `FT_COMPONENT' macro together with the affected
++ `FT_TRACE' or `FT_ERROR' calls. See below how to activate this in
++ the `FT2_DEBUG' environment variable.
++
+
+ II. Debugging macros
+ --------------------
+@@ -150,6 +165,43 @@ behaviour of FreeType at runtime.
+ the memory and io components, which are set to the trace levels 5
+ and 4, respectively.
+
++ If `FT_DEBUG_LOGGING' is defined, two more options are available.
++
++ * -v: Print also the name of FreeType's component from which the
++ current log is produced, together with the tracing level.
++
++ * -t: Print also the time.
++
++ Here are some examples how the output might look like.
++
++ FT2_DEBUG="any:7 memory:5 -vt"
++
++ => [20:32:02:44969 ttload:2] table directory loaded
++
++ FT2_DEBUG="any:7 memory:5 -t"
++
++ => [20:32:02:44969] table directory loaded
++
++ FT2_DEBUG="any:7 memory:5 -v"
++
++ => [ttload:2] table directory loaded
++
++
++ FT_LOGGING_FILE
++
++ This variable is only used if FreeType is built with the
++ `FT_DEBUG_LOGGING' macro defined. It contains the path to the
++ file where the user wants to put his log file. If it is not set,
++ FreeType uses stderr.
++
++ Examples:
++
++ On UNIX-like systems with bash:
++ export FT_LOGGING_FILE="/tmp/freetype2.log"
++
++ On Windows:
++ set FT_LOGGING_FILE=C:\Users\AppData\Local\Temp\freetype2.log
++
+
+ FT2_DEBUG_MEMORY
+
+@@ -201,9 +253,51 @@ behaviour of FreeType at runtime.
+ If it is undefined, or if its value is not strictly positive,
+ freed blocks are released at runtime.
+
++
++IV. Additional Capabilities with `FT_DEBUG_LOGGING'
++---------------------------------------------------
++
++If `FT_DEBUG_LOGGING' is defined, four APIs are available to provide
++additional debugging support. Use
++
++ #include
++
++to access them.
++
++ FT_Trace_Set_Level( const char* level )
++
++ By default, FreeType uses the tracing levels set in the
++ `FT2_DEBUG' environment variable. Use this function to override
++ the value with `level'. Use value `NULL' to disable tracing.
++
++ FT_Trace_Set_Default_Level():
++
++ Reset the tracing levels to the default value, i.e., the value of
++ the `FT2_DEBUG' environment variable or no tracing if not set.
++
++ FT_Set_Log_Handler( ft_custom_log_handler handler ):
++
++ Use `handler' as a custom handler for formatting tracing and error
++ messages. The `ft_custom_log_handler' typedef has the following
++ prototype.
++
++ void
++ (*ft_custom_log_handler)( const char* ft_component,
++ const char* fmt,
++ va_list args );
++
++ `ft_component' is the current component like `ttload', `fmt' is the
++ first argument of `FT_TRACE' or `FT_ERROR', and `args' holds the
++ remaining arguments.
++
++ FT_Set_Default_Log_Handler():
++
++ Reset the log handler to the default version.
++
++
+ ------------------------------------------------------------------------
+
+-Copyright (C) 2002-2020 by
++Copyright (C) 2002-2022 by
+ David Turner, Robert Wilhelm, and Werner Lemberg.
+
+ This file is part of the FreeType project, and may only be used,
+diff --git a/src/3rdparty/freetype/docs/LICENSE.TXT b/src/3rdparty/freetype/docs/LICENSE.TXT
+deleted file mode 100644
+index af5a1c50f6..0000000000
+--- a/src/3rdparty/freetype/docs/LICENSE.TXT
++++ /dev/null
+@@ -1,39 +0,0 @@
+-
+-The FreeType 2 font engine is copyrighted work and cannot be used
+-legally without a software license. In order to make this project
+-usable to a vast majority of developers, we distribute it under two
+-mutually exclusive open-source licenses.
+-
+-This means that *you* must choose *one* of the two licenses described
+-below, then obey all its terms and conditions when using FreeType 2 in
+-any of your projects or products.
+-
+- - The FreeType License, found in the file `FTL.TXT', which is similar
+- to the original BSD license *with* an advertising clause that forces
+- you to explicitly cite the FreeType project in your product's
+- documentation. All details are in the license file. This license
+- is suited to products which don't use the GNU General Public
+- License.
+-
+- Note that this license is compatible to the GNU General Public
+- License version 3, but not version 2.
+-
+- - The GNU General Public License version 2, found in `GPLv2.TXT' (any
+- later version can be used also), for programs which already use the
+- GPL. Note that the FTL is incompatible with GPLv2 due to its
+- advertisement clause.
+-
+-The contributed BDF and PCF drivers come with a license similar to that
+-of the X Window System. It is compatible to the above two licenses (see
+-file src/bdf/README and src/pcf/README). The same holds for the files
+-`fthash.c' and `fthash.h'; their code was part of the BDF driver in
+-earlier FreeType versions.
+-
+-The gzip module uses the zlib license (see src/gzip/zlib.h) which too is
+-compatible to the above two licenses.
+-
+-The MD5 checksum support (only used for debugging in development builds)
+-is in the public domain.
+-
+-
+---- end of LICENSE.TXT ---
+diff --git a/src/3rdparty/freetype/docs/TODO b/src/3rdparty/freetype/docs/TODO
+index 8b27e269a3..623866eab9 100644
+--- a/src/3rdparty/freetype/docs/TODO
++++ b/src/3rdparty/freetype/docs/TODO
+@@ -27,7 +27,7 @@ Other bugs have been registered at the savannah bugzilla of FreeType.
+
+ ------------------------------------------------------------------------
+
+-Copyright (C) 2001-2020 by
++Copyright (C) 2001-2022 by
+ David Turner, Robert Wilhelm, and Werner Lemberg.
+
+ This file is part of the FreeType project, and may only be used,
+diff --git a/src/3rdparty/freetype/freetype.pro b/src/3rdparty/freetype/freetype.pro
+index 0b53c86591..e287222728 100644
+--- a/src/3rdparty/freetype/freetype.pro
++++ b/src/3rdparty/freetype/freetype.pro
+@@ -51,17 +51,24 @@ SOURCES += \
+ $$PWD/src/pshinter/pshinter.c \
+ $$PWD/src/psnames/psmodule.c \
+ $$PWD/src/raster/raster.c \
++ $$PWD/src/sdf/ftsdfrend.c \
++ $$PWD/src/sdf/ftbsdf.c \
++ $$PWD/src/sdf/ftsdf.c \
++ $$PWD/src/sdf/ftsdfcommon.c \
+ $$PWD/src/sfnt/sfnt.c \
+ $$PWD/src/smooth/smooth.c \
++ $$PWD/src/svg/ftsvg.c \
+ $$PWD/src/truetype/truetype.c \
+ $$PWD/src/type1/type1.c \
+ $$PWD/src/type42/type42.c \
+ $$PWD/src/winfonts/winfnt.c
+
+ win32 {
+- SOURCES += $$PWD/src/base/ftsystem.c
++ SOURCES += $$PWD/src/base/ftsystem.c \
++ $$PWD/builds/windows/ftdebug.c
+ } else {
+ SOURCES += $$PWD/builds/unix/ftsystem.c
++ $$PWD/src/base/ftdebug.c
+ INCLUDEPATH += $$PWD/builds/unix
+ }
+
+diff --git a/src/3rdparty/freetype/import_from_tarball.sh b/src/3rdparty/freetype/import_from_tarball.sh
+index df8717d68a..e7d1bb8c37 100644
+--- a/src/3rdparty/freetype/import_from_tarball.sh
++++ b/src/3rdparty/freetype/import_from_tarball.sh
+@@ -78,6 +78,7 @@ copy_file_or_dir() {
+ FILES="
+ README
+ builds/unix/ftsystem.c
++ builds/windows/ftdebug.c
+ docs/CHANGES
+ docs/CUSTOMIZE
+ docs/DEBUG
+@@ -85,7 +86,6 @@ FILES="
+ docs/TODO
+ docs/FTL.TXT
+ docs/GPLv2.TXT
+- docs/LICENSE.TXT
+ include/
+ src/
+ "
+diff --git a/src/3rdparty/freetype/include/freetype/config/ftconfig.h b/src/3rdparty/freetype/include/freetype/config/ftconfig.h
+index b464e0b789..c696e900a6 100644
+--- a/src/3rdparty/freetype/include/freetype/config/ftconfig.h
++++ b/src/3rdparty/freetype/include/freetype/config/ftconfig.h
+@@ -4,7 +4,7 @@
+ *
+ * ANSI-specific configuration file (specification only).
+ *
+- * Copyright (C) 1996-2020 by
++ * Copyright (C) 1996-2022 by
+ * David Turner, Robert Wilhelm, and Werner Lemberg.
+ *
+ * This file is part of the FreeType project, and may only be used,
+diff --git a/src/3rdparty/freetype/include/freetype/config/ftheader.h b/src/3rdparty/freetype/include/freetype/config/ftheader.h
+index 28b5cc60cf..a8c6833df7 100644
+--- a/src/3rdparty/freetype/include/freetype/config/ftheader.h
++++ b/src/3rdparty/freetype/include/freetype/config/ftheader.h
+@@ -4,7 +4,7 @@
+ *
+ * Build macros of the FreeType 2 library.
+ *
+- * Copyright (C) 1996-2020 by
++ * Copyright (C) 1996-2022 by
+ * David Turner, Robert Wilhelm, and Werner Lemberg.
+ *
+ * This file is part of the FreeType project, and may only be used,
+@@ -777,6 +777,18 @@
+ #define FT_COLOR_H
+
+
++ /**************************************************************************
++ *
++ * @macro:
++ * FT_OTSVG_H
++ *
++ * @description:
++ * A macro used in `#include` statements to name the file containing the
++ * FreeType~2 API which handles the OpenType 'SVG~' glyphs.
++ */
++#define FT_OTSVG_H
++
++
+ /* */
+
+ /* These header files don't need to be included by the user. */
+diff --git a/src/3rdparty/freetype/include/freetype/config/ftmodule.h b/src/3rdparty/freetype/include/freetype/config/ftmodule.h
+index b5c4b1ee58..b315baba8a 100644
+--- a/src/3rdparty/freetype/include/freetype/config/ftmodule.h
++++ b/src/3rdparty/freetype/include/freetype/config/ftmodule.h
+@@ -19,12 +19,15 @@ FT_USE_MODULE( FT_Driver_ClassRec, pfr_driver_class )
+ FT_USE_MODULE( FT_Driver_ClassRec, t42_driver_class )
+ FT_USE_MODULE( FT_Driver_ClassRec, winfnt_driver_class )
+ FT_USE_MODULE( FT_Driver_ClassRec, pcf_driver_class )
++FT_USE_MODULE( FT_Driver_ClassRec, bdf_driver_class )
+ FT_USE_MODULE( FT_Module_Class, psaux_module_class )
+ FT_USE_MODULE( FT_Module_Class, psnames_module_class )
+ FT_USE_MODULE( FT_Module_Class, pshinter_module_class )
+-FT_USE_MODULE( FT_Renderer_Class, ft_raster1_renderer_class )
+ FT_USE_MODULE( FT_Module_Class, sfnt_module_class )
+ FT_USE_MODULE( FT_Renderer_Class, ft_smooth_renderer_class )
+-FT_USE_MODULE( FT_Driver_ClassRec, bdf_driver_class )
++FT_USE_MODULE( FT_Renderer_Class, ft_raster1_renderer_class )
++FT_USE_MODULE( FT_Renderer_Class, ft_sdf_renderer_class )
++FT_USE_MODULE( FT_Renderer_Class, ft_bitmap_sdf_renderer_class )
++FT_USE_MODULE( FT_Renderer_Class, ft_svg_renderer_class )
+
+ /* EOF */
+diff --git a/src/3rdparty/freetype/include/freetype/config/ftoption.h b/src/3rdparty/freetype/include/freetype/config/ftoption.h
+index 097f19b8a5..c5bde243b1 100644
+--- a/src/3rdparty/freetype/include/freetype/config/ftoption.h
++++ b/src/3rdparty/freetype/include/freetype/config/ftoption.h
+@@ -4,7 +4,7 @@
+ *
+ * User-selectable configuration macros (specification only).
+ *
+- * Copyright (C) 1996-2020 by
++ * Copyright (C) 1996-2022 by
+ * David Turner, Robert Wilhelm, and Werner Lemberg.
+ *
+ * This file is part of the FreeType project, and may only be used,
+@@ -105,8 +105,7 @@ FT_BEGIN_HEADER
+ *
+ * ```
+ * FREETYPE_PROPERTIES=truetype:interpreter-version=35 \
+- * cff:no-stem-darkening=1 \
+- * autofitter:warping=1
++ * cff:no-stem-darkening=1
+ * ```
+ *
+ */
+@@ -220,6 +219,10 @@ FT_BEGIN_HEADER
+ * If you use a build system like cmake or the `configure` script,
+ * options set by those programs have precedence, overwriting the value
+ * here with the configured one.
++ *
++ * If you use the GNU make build system directly (that is, without the
++ * `configure` script) and you define this macro, you also have to pass
++ * `SYSTEM_ZLIB=yes` as an argument to make.
+ */
+ /* #define FT_CONFIG_OPTION_SYSTEM_ZLIB */
+
+@@ -431,6 +434,23 @@ FT_BEGIN_HEADER
+ /* #define FT_DEBUG_LEVEL_TRACE */
+
+
++ /**************************************************************************
++ *
++ * Logging
++ *
++ * Compiling FreeType in debug or trace mode makes FreeType write error
++ * and trace log messages to `stderr`. Enabling this macro
++ * automatically forces the `FT_DEBUG_LEVEL_ERROR` and
++ * `FT_DEBUG_LEVEL_TRACE` macros and allows FreeType to write error and
++ * trace log messages to a file instead of `stderr`. For writing logs
++ * to a file, FreeType uses an the external `dlg` library (the source
++ * code is in `src/dlg`).
++ *
++ * This option needs a C99 compiler.
++ */
++/* #define FT_DEBUG_LOGGING */
++
++
+ /**************************************************************************
+ *
+ * Autofitter debugging
+@@ -507,6 +527,20 @@ FT_BEGIN_HEADER
+ #undef FT_CONFIG_OPTION_USE_MODULE_ERRORS
+
+
++ /**************************************************************************
++ *
++ * OpenType SVG Glyph Support
++ *
++ * Setting this macro enables support for OpenType SVG glyphs. By
++ * default, FreeType can only fetch SVG documents. However, it can also
++ * render them if external rendering hook functions are plugged in at
++ * runtime.
++ *
++ * More details on the hooks can be found in file `otsvg.h`.
++ */
++#define FT_CONFIG_OPTION_SVG
++
++
+ /**************************************************************************
+ *
+ * Error Strings
+@@ -892,24 +926,6 @@ FT_BEGIN_HEADER
+ #endif
+
+
+- /**************************************************************************
+- *
+- * Compile 'autofit' module with warp hinting. The idea of the warping
+- * code is to slightly scale and shift a glyph within a single dimension so
+- * that as much of its segments are aligned (more or less) on the grid. To
+- * find out the optimal scaling and shifting value, various parameter
+- * combinations are tried and scored.
+- *
+- * You can switch warping on and off with the `warping` property of the
+- * auto-hinter (see file `ftdriver.h` for more information; by default it
+- * is switched off).
+- *
+- * This experimental option is not active if the rendering mode is
+- * `FT_RENDER_MODE_LIGHT`.
+- */
+-#define AF_CONFIG_OPTION_USE_WARPER
+-
+-
+ /**************************************************************************
+ *
+ * Use TrueType-like size metrics for 'light' auto-hinting.
+@@ -961,6 +977,21 @@ FT_BEGIN_HEADER
+ #endif
+
+
++ /*
++ * The TT_SUPPORT_COLRV1 macro is defined to indicate to clients that this
++ * version of FreeType has support for 'COLR' v1 API. This definition is
++ * useful to FreeType clients that want to build in support for 'COLR' v1
++ * depending on a tip-of-tree checkout before it is officially released in
++ * FreeType, and while the feature cannot yet be tested against using
++ * version macros. Don't change this macro. This may be removed once the
++ * feature is in a FreeType release version and version macros can be used
++ * to test for availability.
++ */
++#ifdef TT_CONFIG_OPTION_COLOR_LAYERS
++#define TT_SUPPORT_COLRV1
++#endif
++
++
+ /*
+ * Check CFF darkening parameters. The checks are the same as in function
+ * `cff_property_set` in file `cffdrivr.c`.
+@@ -989,8 +1020,8 @@ FT_BEGIN_HEADER
+ #error "Invalid CFF darkening parameters!"
+ #endif
+
+-FT_END_HEADER
+
++FT_END_HEADER
+
+ #endif /* FTOPTION_H_ */
+
+diff --git a/src/3rdparty/freetype/include/freetype/config/ftstdlib.h b/src/3rdparty/freetype/include/freetype/config/ftstdlib.h
+index d6091f8b3d..7958c2a5f7 100644
+--- a/src/3rdparty/freetype/include/freetype/config/ftstdlib.h
++++ b/src/3rdparty/freetype/include/freetype/config/ftstdlib.h
+@@ -5,7 +5,7 @@
+ * ANSI-specific library and header configuration file (specification
+ * only).
+ *
+- * Copyright (C) 2002-2020 by
++ * Copyright (C) 2002-2022 by
+ * David Turner, Robert Wilhelm, and Werner Lemberg.
+ *
+ * This file is part of the FreeType project, and may only be used,
+@@ -43,7 +43,8 @@
+ *
+ * `UINT_MAX` and `ULONG_MAX` are used to automatically compute the size of
+ * `int` and `long` in bytes at compile-time. So far, this works for all
+- * platforms the library has been tested on.
++ * platforms the library has been tested on. We also check `ULLONG_MAX`
++ * to see whether we can use 64-bit `long long` later on.
+ *
+ * Note that on the extremely rare platforms that do not provide integer
+ * types that are _exactly_ 16 and 32~bits wide (e.g., some old Crays where
+@@ -66,6 +67,15 @@
+ #define FT_LONG_MIN LONG_MIN
+ #define FT_LONG_MAX LONG_MAX
+ #define FT_ULONG_MAX ULONG_MAX
++#ifdef LLONG_MAX
++#define FT_LLONG_MAX LLONG_MAX
++#endif
++#ifdef LLONG_MIN
++#define FT_LLONG_MIN LLONG_MIN
++#endif
++#ifdef ULLONG_MAX
++#define FT_ULLONG_MAX ULLONG_MAX
++#endif
+
+
+ /**************************************************************************
+diff --git a/src/3rdparty/freetype/include/freetype/config/integer-types.h b/src/3rdparty/freetype/include/freetype/config/integer-types.h
+index a0ca0c95e2..d9d2638d1e 100644
+--- a/src/3rdparty/freetype/include/freetype/config/integer-types.h
++++ b/src/3rdparty/freetype/include/freetype/config/integer-types.h
+@@ -4,7 +4,7 @@
+ *
+ * FreeType integer types definitions.
+ *
+- * Copyright (C) 1996-2020 by
++ * Copyright (C) 1996-2022 by
+ * David Turner, Robert Wilhelm, and Werner Lemberg.
+ *
+ * This file is part of the FreeType project, and may only be used,
+@@ -60,6 +60,18 @@
+
+ #endif /* !defined(FT_SIZEOF_LONG) */
+
++#ifndef FT_SIZEOF_LONG_LONG
++
++ /* The size of a `long long` type if available */
++#if defined( FT_ULLONG_MAX ) && FT_ULLONG_MAX >= 0xFFFFFFFFFFFFFFFFULL
++#define FT_SIZEOF_LONG_LONG ( 64 / FT_CHAR_BIT )
++#else
++#define FT_SIZEOF_LONG_LONG 0
++#endif
++
++#endif /* !defined(FT_SIZEOF_LONG_LONG) */
++
++
+ /**************************************************************************
+ *
+ * @section:
+@@ -174,15 +186,17 @@
+ #endif
+
+
+- /* determine whether we have a 64-bit `int` type for platforms without */
+- /* Autoconf */
++ /* determine whether we have a 64-bit integer type */
+ #if FT_SIZEOF_LONG == ( 64 / FT_CHAR_BIT )
+
+- /* `FT_LONG64` must be defined if a 64-bit type is available */
+-#define FT_LONG64
+ #define FT_INT64 long
+ #define FT_UINT64 unsigned long
+
++#elif FT_SIZEOF_LONG_LONG >= ( 64 / FT_CHAR_BIT )
++
++#define FT_INT64 long long int
++#define FT_UINT64 unsigned long long int
++
+ /**************************************************************************
+ *
+ * A 64-bit data type may create compilation problems if you compile in
+@@ -192,16 +206,9 @@
+ */
+ #elif !defined( __STDC__ ) || defined( FT_CONFIG_OPTION_FORCE_INT64 )
+
+-#if defined( __STDC_VERSION__ ) && __STDC_VERSION__ >= 199901L
+-
+-#define FT_LONG64
+-#define FT_INT64 long long int
+-#define FT_UINT64 unsigned long long int
+-
+-#elif defined( _MSC_VER ) && _MSC_VER >= 900 /* Visual C++ (and Intel C++) */
++#if defined( _MSC_VER ) && _MSC_VER >= 900 /* Visual C++ (and Intel C++) */
+
+ /* this compiler provides the `__int64` type */
+-#define FT_LONG64
+ #define FT_INT64 __int64
+ #define FT_UINT64 unsigned __int64
+
+@@ -211,32 +218,30 @@
+ /* to test the compiler version. */
+
+ /* this compiler provides the `__int64` type */
+-#define FT_LONG64
+ #define FT_INT64 __int64
+ #define FT_UINT64 unsigned __int64
+
+-#elif defined( __WATCOMC__ ) /* Watcom C++ */
++#elif defined( __WATCOMC__ ) && __WATCOMC__ >= 1100 /* Watcom C++ */
+
+- /* Watcom doesn't provide 64-bit data types */
++#define FT_INT64 long long int
++#define FT_UINT64 unsigned long long int
+
+ #elif defined( __MWERKS__ ) /* Metrowerks CodeWarrior */
+
+-#define FT_LONG64
+ #define FT_INT64 long long int
+ #define FT_UINT64 unsigned long long int
+
+ #elif defined( __GNUC__ )
+
+ /* GCC provides the `long long` type */
+-#define FT_LONG64
+ #define FT_INT64 long long int
+ #define FT_UINT64 unsigned long long int
+
+-#endif /* __STDC_VERSION__ >= 199901L */
++#endif /* !__STDC__ */
+
+ #endif /* FT_SIZEOF_LONG == (64 / FT_CHAR_BIT) */
+
+-#ifdef FT_LONG64
++#ifdef FT_INT64
+ typedef FT_INT64 FT_Int64;
+ typedef FT_UINT64 FT_UInt64;
+ #endif
+diff --git a/src/3rdparty/freetype/include/freetype/config/mac-support.h b/src/3rdparty/freetype/include/freetype/config/mac-support.h
+index 94867088e9..e42c9fe410 100644
+--- a/src/3rdparty/freetype/include/freetype/config/mac-support.h
++++ b/src/3rdparty/freetype/include/freetype/config/mac-support.h
+@@ -4,7 +4,7 @@
+ *
+ * Mac/OS X support configuration header.
+ *
+- * Copyright (C) 1996-2020 by
++ * Copyright (C) 1996-2022 by
+ * David Turner, Robert Wilhelm, and Werner Lemberg.
+ *
+ * This file is part of the FreeType project, and may only be used,
+diff --git a/src/3rdparty/freetype/include/freetype/config/public-macros.h b/src/3rdparty/freetype/include/freetype/config/public-macros.h
+index 6aa673e807..0074134f1d 100644
+--- a/src/3rdparty/freetype/include/freetype/config/public-macros.h
++++ b/src/3rdparty/freetype/include/freetype/config/public-macros.h
+@@ -4,7 +4,7 @@
+ *
+ * Define a set of compiler macros used in public FreeType headers.
+ *
+- * Copyright (C) 2020 by
++ * Copyright (C) 2020-2022 by
+ * David Turner, Robert Wilhelm, and Werner Lemberg.
+ *
+ * This file is part of the FreeType project, and may only be used,
+@@ -103,6 +103,7 @@ FT_BEGIN_HEADER
+ */
+ #define FT_EXPORT( x ) FT_PUBLIC_FUNCTION_ATTRIBUTE extern x
+
++
+ /*
+ * `FT_UNUSED` indicates that a given parameter is not used -- this is
+ * only used to get rid of unpleasant compiler warnings.
+@@ -115,6 +116,23 @@ FT_BEGIN_HEADER
+ #endif
+
+
++ /*
++ * Support for casts in both C and C++.
++ */
++#ifdef __cplusplus
++#define FT_STATIC_CAST( type, var ) static_cast(var)
++#define FT_REINTERPRET_CAST( type, var ) reinterpret_cast(var)
++
++#define FT_STATIC_BYTE_CAST( type, var ) \
++ static_cast( static_cast( var ) )
++#else
++#define FT_STATIC_CAST( type, var ) (type)(var)
++#define FT_REINTERPRET_CAST( type, var ) (type)(var)
++
++#define FT_STATIC_BYTE_CAST( type, var ) (type)(unsigned char)(var)
++#endif
++
++
+ FT_END_HEADER
+
+ #endif /* FREETYPE_CONFIG_PUBLIC_MACROS_H_ */
+diff --git a/src/3rdparty/freetype/include/freetype/freetype.h b/src/3rdparty/freetype/include/freetype/freetype.h
+index be191f5aa0..aa1a4fe389 100644
+--- a/src/3rdparty/freetype/include/freetype/freetype.h
++++ b/src/3rdparty/freetype/include/freetype/freetype.h
+@@ -4,7 +4,7 @@
+ *
+ * FreeType high-level API and common types (specification only).
+ *
+- * Copyright (C) 1996-2020 by
++ * Copyright (C) 1996-2022 by
+ * David Turner, Robert Wilhelm, and Werner Lemberg.
+ *
+ * This file is part of the FreeType project, and may only be used,
+@@ -30,6 +30,34 @@ FT_BEGIN_HEADER
+
+
+
++ /**************************************************************************
++ *
++ * @section:
++ * preamble
++ *
++ * @title:
++ * Preamble
++ *
++ * @abstract:
++ * What FreeType is and isn't
++ *
++ * @description:
++ * FreeType is a library that provides access to glyphs in font files. It
++ * scales the glyph images and their metrics to a requested size, and it
++ * rasterizes the glyph images to produce pixel or subpixel alpha coverage
++ * bitmaps.
++ *
++ * Note that FreeType is _not_ a text layout engine. You have to use
++ * higher-level libraries like HarfBuzz, Pango, or ICU for that.
++ *
++ * Note also that FreeType does _not_ perform alpha blending or
++ * compositing the resulting bitmaps or pixmaps by itself. Use your
++ * favourite graphics library (for example, Cairo or Skia) to further
++ * process FreeType's output.
++ *
++ */
++
++
+ /**************************************************************************
+ *
+ * @section:
+@@ -125,6 +153,9 @@ FT_BEGIN_HEADER
+ * FT_FACE_FLAG_GLYPH_NAMES
+ * FT_FACE_FLAG_EXTERNAL_STREAM
+ * FT_FACE_FLAG_HINTER
++ * FT_FACE_FLAG_SVG
++ * FT_FACE_FLAG_SBIX
++ * FT_FACE_FLAG_SBIX_OVERLAY
+ *
+ * FT_HAS_HORIZONTAL
+ * FT_HAS_VERTICAL
+@@ -133,6 +164,9 @@ FT_BEGIN_HEADER
+ * FT_HAS_GLYPH_NAMES
+ * FT_HAS_COLOR
+ * FT_HAS_MULTIPLE_MASTERS
++ * FT_HAS_SVG
++ * FT_HAS_SBIX
++ * FT_HAS_SBIX_OVERLAY
+ *
+ * FT_IS_SFNT
+ * FT_IS_SCALABLE
+@@ -176,6 +210,7 @@ FT_BEGIN_HEADER
+ * FT_Size_RequestRec
+ * FT_Size_Request
+ * FT_Set_Transform
++ * FT_Get_Transform
+ * FT_Load_Glyph
+ * FT_Get_Char_Index
+ * FT_Get_First_Char
+@@ -196,6 +231,7 @@ FT_BEGIN_HEADER
+ * FT_LOAD_NO_SCALE
+ * FT_LOAD_NO_HINTING
+ * FT_LOAD_NO_BITMAP
++ * FT_LOAD_SBITS_ONLY
+ * FT_LOAD_NO_AUTOHINT
+ * FT_LOAD_COLOR
+ *
+@@ -493,13 +529,15 @@ FT_BEGIN_HEADER
+ * size.
+ *
+ * @note:
+- * An @FT_Face has one _active_ @FT_Size object that is used by functions
+- * like @FT_Load_Glyph to determine the scaling transformation that in
+- * turn is used to load and hint glyphs and metrics.
++ * An @FT_Face has one _active_ `FT_Size` object that is used by
++ * functions like @FT_Load_Glyph to determine the scaling transformation
++ * that in turn is used to load and hint glyphs and metrics.
+ *
+- * You can use @FT_Set_Char_Size, @FT_Set_Pixel_Sizes, @FT_Request_Size
++ * A newly created `FT_Size` object contains only meaningless zero values.
++ * You must use @FT_Set_Char_Size, @FT_Set_Pixel_Sizes, @FT_Request_Size
+ * or even @FT_Select_Size to change the content (i.e., the scaling
+- * values) of the active @FT_Size.
++ * values) of the active `FT_Size`. Otherwise, the scaling and hinting
++ * will not be performed.
+ *
+ * You can use @FT_New_Size to create additional size objects for a given
+ * @FT_Face, but they won't be used by other functions until you activate
+@@ -587,11 +625,12 @@ FT_BEGIN_HEADER
+ */
+
+ #ifndef FT_ENC_TAG
+-#define FT_ENC_TAG( value, a, b, c, d ) \
+- value = ( ( (FT_UInt32)(a) << 24 ) | \
+- ( (FT_UInt32)(b) << 16 ) | \
+- ( (FT_UInt32)(c) << 8 ) | \
+- (FT_UInt32)(d) )
++
++#define FT_ENC_TAG( value, a, b, c, d ) \
++ value = ( ( FT_STATIC_BYTE_CAST( FT_UInt32, a ) << 24 ) | \
++ ( FT_STATIC_BYTE_CAST( FT_UInt32, b ) << 16 ) | \
++ ( FT_STATIC_BYTE_CAST( FT_UInt32, c ) << 8 ) | \
++ FT_STATIC_BYTE_CAST( FT_UInt32, d ) )
+
+ #endif /* FT_ENC_TAG */
+
+@@ -701,11 +740,16 @@ FT_BEGIN_HEADER
+ * Same as FT_ENCODING_JOHAB. Deprecated.
+ *
+ * @note:
+- * By default, FreeType enables a Unicode charmap and tags it with
+- * `FT_ENCODING_UNICODE` when it is either provided or can be generated
+- * from PostScript glyph name dictionaries in the font file. All other
+- * encodings are considered legacy and tagged only if explicitly defined
+- * in the font file. Otherwise, `FT_ENCODING_NONE` is used.
++ * When loading a font, FreeType makes a Unicode charmap active if
++ * possible (either if the font provides such a charmap, or if FreeType
++ * can synthesize one from PostScript glyph name dictionaries; in either
++ * case, the charmap is tagged with `FT_ENCODING_UNICODE`). If such a
++ * charmap is synthesized, it is placed at the first position of the
++ * charmap array.
++ *
++ * All other encodings are considered legacy and tagged only if
++ * explicitly defined in the font file. Otherwise, `FT_ENCODING_NONE` is
++ * used.
+ *
+ * `FT_ENCODING_NONE` is set by the BDF and PCF drivers if the charmap is
+ * neither Unicode nor ISO-8859-1 (otherwise it is set to
+@@ -1193,6 +1237,19 @@ FT_BEGIN_HEADER
+ * altered with @FT_Set_MM_Design_Coordinates,
+ * @FT_Set_Var_Design_Coordinates, or @FT_Set_Var_Blend_Coordinates.
+ * This flag is unset by a call to @FT_Set_Named_Instance.
++ *
++ * FT_FACE_FLAG_SVG ::
++ * [Since 2.12] The face has an 'SVG~' OpenType table.
++ *
++ * FT_FACE_FLAG_SBIX ::
++ * [Since 2.12] The face has an 'sbix' OpenType table *and* outlines.
++ * For such fonts, @FT_FACE_FLAG_SCALABLE is not set by default to
++ * retain backward compatibility.
++ *
++ * FT_FACE_FLAG_SBIX_OVERLAY ::
++ * [Since 2.12] The face has an 'sbix' OpenType table where outlines
++ * should be drawn on top of bitmap strikes.
++ *
+ */
+ #define FT_FACE_FLAG_SCALABLE ( 1L << 0 )
+ #define FT_FACE_FLAG_FIXED_SIZES ( 1L << 1 )
+@@ -1210,6 +1267,9 @@ FT_BEGIN_HEADER
+ #define FT_FACE_FLAG_TRICKY ( 1L << 13 )
+ #define FT_FACE_FLAG_COLOR ( 1L << 14 )
+ #define FT_FACE_FLAG_VARIATION ( 1L << 15 )
++#define FT_FACE_FLAG_SVG ( 1L << 16 )
++#define FT_FACE_FLAG_SBIX ( 1L << 17 )
++#define FT_FACE_FLAG_SBIX_OVERLAY ( 1L << 18 )
+
+
+ /**************************************************************************
+@@ -1450,6 +1510,124 @@ FT_BEGIN_HEADER
+ ( !!( (face)->face_flags & FT_FACE_FLAG_COLOR ) )
+
+
++ /**************************************************************************
++ *
++ * @macro:
++ * FT_HAS_SVG
++ *
++ * @description:
++ * A macro that returns true whenever a face object contains an 'SVG~'
++ * OpenType table.
++ *
++ * @since:
++ * 2.12
++ */
++#define FT_HAS_SVG( face ) \
++ ( !!( (face)->face_flags & FT_FACE_FLAG_SVG ) )
++
++
++ /**************************************************************************
++ *
++ * @macro:
++ * FT_HAS_SBIX
++ *
++ * @description:
++ * A macro that returns true whenever a face object contains an 'sbix'
++ * OpenType table *and* outline glyphs.
++ *
++ * Currently, FreeType only supports bitmap glyphs in PNG format for this
++ * table (i.e., JPEG and TIFF formats are unsupported, as are
++ * Apple-specific formats not part of the OpenType specification).
++ *
++ * @note:
++ * For backward compatibility, a font with an 'sbix' table is treated as
++ * a bitmap-only face. Using @FT_Open_Face with
++ * @FT_PARAM_TAG_IGNORE_SBIX, an application can switch off 'sbix'
++ * handling so that the face is treated as an ordinary outline font with
++ * scalable outlines.
++ *
++ * Here is some pseudo code that roughly illustrates how to implement
++ * 'sbix' handling according to the OpenType specification.
++ *
++ * ```
++ * if ( FT_HAS_SBIX( face ) )
++ * {
++ * // open font as a scalable one without sbix handling
++ * FT_Face face2;
++ * FT_Parameter param = { FT_PARAM_TAG_IGNORE_SBIX, NULL };
++ * FT_Open_Args args = { FT_OPEN_PARAMS | ...,
++ * ...,
++ * 1, ¶m };
++ *
++ *
++ * FT_Open_Face( library, &args, 0, &face2 );
++ *
++ * available_size` as necessary into
++ * `preferred_sizes`[*]>
++ *
++ * for ( i = 0; i < face->num_fixed_sizes; i++ )
++ * {
++ * size = preferred_sizes[i].size;
++ *
++ * error = FT_Set_Pixel_Sizes( face, size, size );
++ *
++ *
++ * // check whether we have a glyph in a bitmap strike
++ * error = FT_Load_Glyph( face,
++ * glyph_index,
++ * FT_LOAD_SBITS_ONLY |
++ * FT_LOAD_BITMAP_METRICS_ONLY );
++ * if ( error == FT_Err_Invalid_Argument )
++ * continue;
++ * else if ( error )
++ *
++ * else
++ * break;
++ * }
++ *
++ * if ( i != face->num_fixed_sizes )
++ *
++ *
++ * if ( i == face->num_fixed_sizes ||
++ * FT_HAS_SBIX_OVERLAY( face ) )
++ *