summaryrefslogtreecommitdiffstats
path: root/src/gui/text/unix/qfontconfigdatabase.cpp
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>2023-11-01 15:07:23 +0100
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>2023-12-04 11:17:36 +0100
commit7bc6f4ae8edc5758af567d8326cb798d423c3982 (patch)
tree00043a0555855d649780246b54906d560dbd06d9 /src/gui/text/unix/qfontconfigdatabase.cpp
parent5134b3ad54743e3a997ff27af112df79821e5ce1 (diff)
Support arbitrary variable axis values
This adds API to set arbitrary values for axes in variable fonts to QFont. It also implements support for the API in CoreText, FreeType (on all platforms) and DirectWrite. Note that in order for the mechanism to work with application fonts on DirectWrite, we need to keep the loader for the fonts around for the life time of the font (otherwise they cannot be reloaded with different parameters). The way this was handled before (just re-creating and throwing away the loader every time) was not ideal anyway, and this finally gives us a good reason to fix it. Fixes: QTBUG-119421 Fixes: QTBUG-117835 Fixes: QTBUG-117838 Fixes: QTBUG-117839 Change-Id: I3d1fe95fba1f9df52f34aa42e1ac5fa47dbe6d1a Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'src/gui/text/unix/qfontconfigdatabase.cpp')
-rw-r--r--src/gui/text/unix/qfontconfigdatabase.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gui/text/unix/qfontconfigdatabase.cpp b/src/gui/text/unix/qfontconfigdatabase.cpp
index 8043602542..a0b1abd14a 100644
--- a/src/gui/text/unix/qfontconfigdatabase.cpp
+++ b/src/gui/text/unix/qfontconfigdatabase.cpp
@@ -722,6 +722,7 @@ QFontEngine *QFontconfigDatabase::fontEngine(const QFontDef &f, void *usrPtr)
fid.filename = QFile::encodeName(fontfile->fileName);
fid.index = fontfile->indexValue;
fid.instanceIndex = fontfile->instanceIndex;
+ fid.variableAxes = f.variableAxisValues;
// FIXME: Unify with logic in QFontEngineFT::create()
QFontEngineFT *engine = new QFontEngineFT(f);