Replace "OpenType missing" warnings with qCInfo()

Back when this code was written, the font matching algorithm
would also match the script of the font, but for multi-font
engines, this no longer happens after this change:
  c003a18ee332abf2387172eb0856a176a32a6c8f.

Since that change, we will always prefer the requested font, even
if it does not claim to support the writing system in question.
The normal fallback mechanism in the platform plugin will be used
instead of having a secondary, cross-platform fallback mechanism
like before.

With this change, it is quite possible to get a main font engine
which does not support the given script, since this will
essentially always just be the font the user asked for. Therefore,
warning that it does not is really redundant and just adds noise
to the console output. This turns the warnings into qCInfo()
instead, so it is still possible to get the information if we
need to, but by default it will not be visible.

Pick-to: 6.5
Fixes: QTBUG-129092
Change-Id: I0584ce3d1e37790368cf616c99df077fc07b80a6
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit cd6608e887066db2d9150bf6ea9111e8bd5b8fec)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Eskil Abrahamsen Blomfeldt 2024-10-24 08:51:12 +02:00 committed by Qt Cherry-pick Bot
parent 9107817eac
commit 8d83abfaf7

View File

@ -733,7 +733,7 @@ QFontEngine *QFontDatabasePrivate::loadSingleEngine(int script,
if (engine) {
// Also check for OpenType tables when using complex scripts
if (Q_UNLIKELY(!engine->supportsScript(QChar::Script(script)))) {
qCWarning(lcFontDb, "OpenType support missing for \"%ls\", script %d",
qCInfo(lcFontDb, "OpenType support missing for \"%ls\", script %d",
qUtf16Printable(def.families.constFirst()), script);
return nullptr;
}
@ -758,7 +758,7 @@ QFontEngine *QFontDatabasePrivate::loadSingleEngine(int script,
if (engine) {
// Also check for OpenType tables when using complex scripts
if (!engine->supportsScript(QChar::Script(script))) {
qCWarning(lcFontDb, "OpenType support missing for \"%ls\", script %d",
qCInfo(lcFontDb, "OpenType support missing for \"%ls\", script %d",
qUtf16Printable(def.families.constFirst()), script);
if (engine->ref.loadRelaxed() == 0)
delete engine;