diff options
| author | Morten Sørvig <morten.sorvig@qt.io> | 2024-02-06 13:48:48 +0100 |
|---|---|---|
| committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2024-02-08 13:38:00 +0000 |
| commit | ab02d2053f16d1c9c0b005cade638e3c97f75879 (patch) | |
| tree | 6a4f960e4220d73aa9583c776e8d242f8fbc2d1f /tests/auto/sql/kernel/qsqldatabase/tst_qsqldatabase.cpp | |
| parent | 54a32bdacf17144302dea9ac313fdf0c367d7625 (diff) | |
qfreetype: Fix caching of memory fonts
Make QFreetypeFace::getFace() not return the same font
face for all memory fonts.
QtFreetypeData has a cache which maps QFontEngine::FaceId
to QFreetypeFace instances. Each FaceId should then
have a unique hash value, which is accomplished by
by hashing the font file name and a stored uuid.
However, we were not setting the uuid in all cases,
which means that in-memory fonts (which do not have
a file name) would hash identically.
Fix this by setting the uuid to a value based on the
address of the FontFile, which should be unique.
Change-Id: I45de37b512fb666c26490551c831c0db824b5f35
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
(cherry picked from commit b33b85cc46998133cddb18683402b6f0aaac754e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'tests/auto/sql/kernel/qsqldatabase/tst_qsqldatabase.cpp')
0 files changed, 0 insertions, 0 deletions
