Add styleName to debug output

This makes it easier to debug the font matching behavior.

Task-number: QTBUG-101436
Pick-to: 6.3
Change-Id: Id682384e7d9d669b9e736e00ef22cadfd0b4bfec
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
bb10
Niklas Wenzel 2022-03-04 16:51:12 +01:00
parent 68a4c5da9a
commit cb65e4182f
2 changed files with 5 additions and 3 deletions

View File

@ -1074,13 +1074,15 @@ static int match(int script,
qCDebug(lcFontMatch, "QFontDatabase::match\n"
" request:\n"
" family: %s [%s], script: %d\n"
" styleName: %s\n"
" weight: %d, style: %d\n"
" stretch: %d\n"
" pixelSize: %g\n"
" pitch: %c",
family_name.isEmpty() ? "-- first in script --" : family_name.toLatin1().constData(),
foundry_name.isEmpty() ? "-- any --" : foundry_name.toLatin1().constData(),
script, request.weight, request.style, request.stretch, request.pixelSize, pitch);
foundry_name.isEmpty() ? "-- any --" : foundry_name.toLatin1().constData(), script,
request.styleName.isEmpty() ? "-- any --" : request.styleName.toLatin1().constData(),
request.weight, request.style, request.stretch, request.pixelSize, pitch);
desc->family = nullptr;
desc->foundry = nullptr;

View File

@ -540,7 +540,7 @@ static bool addFontToDatabase(QString familyName,
str << " TRUETYPE";
str << " scalable=" << scalable << " Size=" << size
<< " Style=" << style << " Weight=" << weight
<< " stretch=" << stretch;
<< " stretch=" << stretch << " styleName=" << styleName;
qCDebug(lcQpaFonts) << message;
}
#endif