keepassxc icon indicating copy to clipboard operation
keepassxc copied to clipboard

Fonts much smaller after update to 2.7.3

Open vphantom opened this issue 1 year ago • 6 comments

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

vphantom avatar Oct 24 '22 20:10 vphantom

Which fonts are you referring to? We didn't change the font size...

What qt version is 2.7.1 using?

droidmonkey avatar Oct 24 '22 21:10 droidmonkey

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.

keepassxc_2-7-1_fontsize keepassxc_2-7-3_fontsize

vphantom avatar Oct 24 '22 21:10 vphantom

I see a line spacing difference (space between lines of text), not a font size difference.

droidmonkey avatar Oct 24 '22 22:10 droidmonkey

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):

font-size-together

vphantom avatar Oct 25 '22 00:10 vphantom

Can confirm on macOS 12.5.1 (21G83) using KeePassXC - Version 2.7.3

vedagel avatar Oct 27 '22 10:10 vedagel

Same here, using appimage version:

2.7.3: kpxc-2 7 3

2.7.1 kpxc-2 7 1

resoli avatar Oct 27 '22 10:10 resoli

Same issue on Debian XFCE using AppImage : Everything is smaller.

The system font settings defined by xfce4-appearance-settings are ignored.

all

minayko avatar Oct 30 '22 00:10 minayko

Related on macOS: #6494 (improper font kerning after periods and commas) was fixed after this update.

felker avatar Oct 31 '22 23:10 felker

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.)

mtompkins avatar Nov 01 '22 23:11 mtompkins

Bug is still present on Linux Mint 20.3 Cinnamon on KeePassXC 2.7.4 (Appimage).

Jroghidno avatar Nov 02 '22 03:11 Jroghidno

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:

keepassxc

As you can see, they are absolutely identical except for the last digit of the version number.

phoerious avatar Nov 02 '22 08:11 phoerious

@phoerious: Are these screenshots from the AppImage releases?

vphantom avatar Nov 02 '22 10:11 vphantom

Yes.

phoerious avatar Nov 02 '22 10:11 phoerious

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.

veltza avatar Nov 03 '22 19:11 veltza

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.

mtompkins avatar Nov 03 '22 19:11 mtompkins

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.

But it's not working on AppImage: QT_QPA_PLATFORMTHEME=gtk2 ./KeePassXC-2.7.4-x86_64.AppImage

veltza avatar Nov 03 '22 19:11 veltza

I suspect the appimage developers have pushed a breaking change to their build scaffolding. This is most likely NOT a keepassxc specific problem.

droidmonkey avatar Nov 03 '22 20:11 droidmonkey

I take it this means that the AppImage building tools you're using were upgraded between 2.7.1 and 2.7.3?

vphantom avatar Nov 04 '22 10:11 vphantom