Skip to content

Application stylesheet font specification results in very small UI text elements #305

@rcsanchez97

Description

@rcsanchez97

I have upgraded my system (Debian 12 bookworm to Debian 13 trixie), which resulted in Mnemosyne being upgraded from version 2.9 to 2.11. The font in the UI elements appears to be excessively small. That is, the font for the menu entries, button labels, and various text elements in the UI, but not the font used to render the cards, is smaller than expected.

Here is what the UI currently looks like for me:

Image

This is what qt6ct looks like on the same machine. Note how the text elements next to the radio buttons and drop downs, as well as on the buttons, appear substantially larger. The font which I have selected as the default is 'DejaVu Sans 12'.

Image

I poked around for a while and wasn't able to manage to figure out a way to adjust the configuration of Mnemosyne itself. I tried through the UI, through config.py, and I even went looking for was to specify generic Qt configuration directives. But nothing. In the end, I found that a static application stylesheet is set with a fixed font-size attribute. I ended up attempting to "fix" it like this:

--- mnemosyne.orig	2025-03-16 03:29:46.000000000 -0400
+++ mnemosyne	2025-09-02 09:34:09.799498762 -0400
@@ -166,7 +166,7 @@
 color = QtGui.QPalette().window().color().name()
 stylesheet = """
 * {
-font-size: 12px;
+font-size: 18px;
 }
 
     QMenuBar {

The result was precisely what I expected the UI to look like originally:

Image

This is what it looked like for me prior to the upgrade. And to my eye is looks like 'DejaVu Sans 12' font which is shown in other applications (I've checked other Qt6, Qt5, and GTK applications).

My approach of just manually changing the font size in the application stylesheet is very clearly a hack. However, I am not familiar with Qt, so I have no idea how to properly fix this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions