After upgrading KDE from 5.x to 6.3, XnView MP is using wrong font and font size for UI. My understanding is that this comes from XnView being based on Qt 5 and using it's own distribution of Qt 5 vs KDE using Qt 6. If I run XnView with:
Code: Select all
QT_DEBUG_PLUGINS=1 xnview
Code: Select all
QFactoryLoader::QFactoryLoader() checking directory path "/opt/XnView/lib/platformthemes" ...
QFactoryLoader::QFactoryLoader() looking at "/opt/XnView/lib/platformthemes/libqgtk2.so"
Found metadata in lib /opt/XnView/lib/platformthemes/libqgtk2.so, metadata=
{
"IID": "org.qt-project.Qt.QPA.QPlatformThemeFactoryInterface.5.1",
"MetaData": {
"Keys": [
"gtk2"
]
},
"archreq": 0,
"className": "QGtk2ThemePlugin",
"debug": false,
"version": 331520
}
Got keys from plugin meta data ("gtk2")
QFactoryLoader::QFactoryLoader() looking at "/opt/XnView/lib/platformthemes/libqgtk3.so"
Found metadata in lib /opt/XnView/lib/platformthemes/libqgtk3.so, metadata=
{
"IID": "org.qt-project.Qt.QPA.QPlatformThemeFactoryInterface.5.1",
"MetaData": {
"Keys": [
"gtk3"
]
},
"archreq": 0,
"className": "QGtk3ThemePlugin",
"debug": false,
"version": 331520
}
Got keys from plugin meta data ("gtk3")
QFactoryLoader::QFactoryLoader() looking at "/opt/XnView/lib/platformthemes/libqt5ct.so"
Found metadata in lib /opt/XnView/lib/platformthemes/libqt5ct.so, metadata=
{
"IID": "org.qt-project.Qt.QPA.QPlatformThemeFactoryInterface.5.1",
"MetaData": {
"Keys": [
"qt5ct"
]
},
"archreq": 0,
"className": "Qt5CTPlatformThemePlugin",
"debug": false,
"version": 331520
}
Got keys from plugin meta data ("qt5ct")
QFactoryLoader::QFactoryLoader() looking at "/opt/XnView/lib/platformthemes/libqxdgdesktopportal.so"
Found metadata in lib /opt/XnView/lib/platformthemes/libqxdgdesktopportal.so, metadata=
{
"IID": "org.qt-project.Qt.QPA.QPlatformThemeFactoryInterface.5.1",
"MetaData": {
"Keys": [
"xdgdesktopportal",
"flatpak",
"snap"
]
},
"archreq": 0,
"className": "QXdgDesktopPortalThemePlugin",
"debug": false,
"version": 331520
}
Got keys from plugin meta data ("xdgdesktopportal", "flatpak", "snap")
QFactoryLoader::QFactoryLoader() checking directory path "/opt/XnView/platformthemes" ...
QFont::fromString: Invalid description 'Noto Sans,8,-1,5,400,0,0,0,0,0,0,0,0,0,0,1'
QFont::fromString: Invalid description 'Hack,9,-1,5,400,0,0,0,0,0,0,0,0,0,0,1'
QFont::fromString: Invalid description 'Noto Sans,8,-1,5,400,0,0,0,0,0,0,0,0,0,0,1'
QFont::fromString: Invalid description 'Noto Sans,8,-1,5,400,0,0,0,0,0,0,0,0,0,0,1'
https://discuss.kde.org/t/how-to-set-qt ... vianovella
https://forum.endeavouros.com/t/plasma- ... apps/52280
The solution for Qt 5 apps under KDE Plasma 6 in general is to install "plasma-integration5" package (or similar), i.e. /usr/lib/x86_64-linux-gnu/qt5/plugins/platformthemes/KDEPlasmaPlatformTheme5.so library. Unfortunately it does not affect XnView, presumably because it uses it's own distribution of Qt 5 libraries.
Out of curiosity, I tried linking this library from "/opt/XnView/lib/platformthemes":
Code: Select all
/opt/XnView/lib/platformthemes/KDEPlasmaPlatformTheme5.so -> /usr/lib/x86_64-linux-gnu/qt5/plugins/platformthemes/KDEPlasmaPlatformTheme5.so
Code: Select all
QFactoryLoader::QFactoryLoader() checking directory path "/opt/XnView/platformthemes" ...
Cannot load library /usr/lib/x86_64-linux-gnu/qt5/plugins/platformthemes/KDEPlasmaPlatformTheme5.so: (/lib/x86_64-linux-gnu/libKF5GuiAddons.so.5: undefined symbol: _ZN23QWaylandClientExtensionD2Ev, version Qt_5)
QLibraryPrivate::loadPlugin failed on "/usr/lib/x86_64-linux-gnu/qt5/plugins/platformthemes/KDEPlasmaPlatformTheme5.so" : "Cannot load library /usr/lib/x86_64-linux-gnu/qt5/plugins/platformthemes/KDEPlasmaPlatformTheme5.so: (/lib/x86_64-linux-gnu/libKF5GuiAddons.so.5: undefined symbol: _ZN23QWaylandClientExtensionD2Ev, version Qt_5)"
QFont::fromString: Invalid description 'Noto Sans,8,-1,5,400,0,0,0,0,0,0,0,0,0,0,1'
QFont::fromString: Invalid description 'Hack,9,-1,5,400,0,0,0,0,0,0,0,0,0,0,1'
QFont::fromString: Invalid description 'Noto Sans,8,-1,5,400,0,0,0,0,0,0,0,0,0,0,1'
QFont::fromString: Invalid description 'Noto Sans,8,-1,5,400,0,0,0,0,0,0,0,0,0,0,1'