site  contact  subhomenews

Making fonts bigger in flatpaks

May 05, 2023 — BarryK

The problem is that menu fonts in GTK and Qt based flatpaks are too small, as well as other text in the app. The theme also is different from the system theme.

Each flatpak has its own internal theme, and there does not seem to be any way for them to use the system GTK or Qt theme. That I can live with, but the small fonts need to be fixed...

I have modified /usr/local/flatpak/flatpak script, where it generates the script to launch the flatpak app, now inserted these variables:

flatpak run --env=GDK_DPI_SCALE=1.2 --env=QT_SCALE_FACTOR=1.2  ... 

These variables work differently. QT_SCALE_FACTOR scales everything in the app by that factor, including icons.

GDK_DPI_SCALE only scales text in a GTK-based app. There is GDK_SCALE; however, unlike QT_SCALE_FACTOR, it does not support proportional scaling. So you can have "GDK_SCALE=2", then the entire app window is twice as big -- not what I want.   

Tags: easy