keepassxc
keepassxc copied to clipboard
Fonts much smaller after update to 2.7.3
Overview
Font sizes changed between versions 2.7.1 and 2.7.3.
Steps to Reproduce
To launch version 2.7.1, I did:
#!/bin/bash
export QT_FONT_DPI=120
export QT_AUTO_SCREEN_SCALE_FACTOR=0
exec ~/bin/KeePassXC-2.7.1-x86_64.AppImage
Since upgrading to 2.7.3, either some of these are ignored or some DPI-related setting was changed because everything is now much smaller. Changing QT_FONT_DPI
to about 160
seems to bring fonts back to the size they had in 2.7.1.
While changing this value works around the issue for me, I'm reporting this as a regression in case it is indicative of something which has changed but should not have.
Expected Behavior
I expect fonts to be the same size when doing a minor version update.
Actual Behavior
Font increased in size.
About / Debug Info:
KeePassXC - Version 2.7.3 Revision: d8483d3 Distribution: AppImage
Qt 5.15.2 Debugging mode is disabled.
Operating system: Debian GNU/Linux 10 (buster) CPU architecture: x86_64 Kernel: linux 4.16.0-0.bpo.2-amd64
Enabled extensions:
- Auto-Type
- Browser Integration
- SSH Agent
- KeeShare
- YubiKey
- Secret Service Integration
Cryptographic libraries:
- Botan 2.19.1
Operating System: Linux Desktop Env: XFCE Windowing System: X11
Which fonts are you referring to? We didn't change the font size...
What qt version is 2.7.1 using?
Everything which the user interfaces writes: menus, content, etc.
2.7.1 is using Qt 5.15.2 here, same that 2.7.3 is. Time for a comparative screenshot. It's not a big difference, but it was enough for me to notice and have to bump up the DPI to compensate since I'm already on a HiDPI laptop.
I see a line spacing difference (space between lines of text), not a font size difference.
I double checked and it's not just a spacing/kerning issue although it might be part of the problem. The variation seems to differ depending on which text area I sample. For example:
Sample | 2.7.1 | 2.7.3 |
---|---|---|
K from KeePassXC |
24×25 | 24×25 |
AppImage |
86×17 | 77×15 |
About tab label |
51×14 | 45×12 |
About tab area |
80×31 | 74×28 |
See how striking it is if I put both versions of a sample word together (patched with their respective versions, also from the screenshot):
Can confirm on macOS 12.5.1 (21G83) using KeePassXC - Version 2.7.3
Same here, using appimage version:
2.7.3:
2.7.1
Same issue on Debian XFCE using AppImage : Everything is smaller.
The system font settings defined by xfce4-appearance-settings are ignored.
Related on macOS: #6494 (improper font kerning after periods and commas) was fixed after this update.
Confirming bug still present Ubuntu 22.10, DEB from Keepassxc PPA, 2.7.4
(Interestingly, Chrome has a similar problem in parallel impacting address bar and tabs.)
Bug is still present on Linux Mint 20.3 Cinnamon on KeePassXC 2.7.4 (Appimage).
I tried to reproduce it, but wasn't able to. I made screenshots of the 2.7.1 and 2.7.4 About dialogs and calculated their pixel-wise difference. Here's the result:
As you can see, they are absolutely identical except for the last digit of the version number.
@phoerious: Are these screenshots from the AppImage releases?
Yes.
The problem is that the QT_QPA_PLATFORMTHEME environment variable is not working on 2.7.3 and 2.7.4, and for that reason, AppImage versions are using default fonts and not desktop fonts.
There is an apprun-hooks/linuxdeploy-plugin-qt-hook.sh
script in AppImage that sets the variable automatically to gtk2 on Gnome and XFCE desktops, but the new KeepassXC versions ignore that variable.
# generated by linuxdeploy-plugin-qt
# try to make Qt apps more "native looking" on Gtk-based desktops, if possible
# see https://github.com/AppImage/AppImageKit/issues/977#issue-462374883
case "${XDG_CURRENT_DESKTOP}" in
*GNOME*|*gnome*|*XFCE*)
export QT_QPA_PLATFORMTHEME=gtk2
;;
esac
So, if you can fix the QT_QPA_PLATFORMTHEME variable, it will solve the font problems.
In an effort to help, I examined my QT_QPA_PLATFORMTHEME value.
It is set as qt5ct
. If I launch keepassxc with an export of gtk2
to this variable indeed the proper size is provided.
Note: This is a standard .deb install for me.
In an effort to help, I examined my QT_QPA_PLATFORMTHEME value. It is set as
qt5ct
. If I launch keepassxc with an export ofgtk2
to this variable indeed the proper size is provided. Note: This is a standard .deb install for me.
But it's not working on AppImage:
QT_QPA_PLATFORMTHEME=gtk2 ./KeePassXC-2.7.4-x86_64.AppImage
I suspect the appimage developers have pushed a breaking change to their build scaffolding. This is most likely NOT a keepassxc specific problem.
I take it this means that the AppImage building tools you're using were upgraded between 2.7.1 and 2.7.3?
I tried flatpak run --env=QT_QPA_PLATFORMTHEME=gtk2 org.keepassxc.KeePassXC
but it didn't work. Any suggestions?
There is really nothing we did to cause this nor anything we will do to "fix" it. Closing as a result