4

After upgrading from Debian 8 to Debian 9, the text editor Pluma (a Gedit fork) no longer use my custom DPI setting. I noticed the same thing with the editor Geany. Here are my Xft settings in ~/.Xresources:

Xft.antialias: true
Xft.autohint: false
Xft.dpi: 100
Xft.hinting: true
Xft.hintstyle: hintslight
Xft.lcdfilter: lcddefault
Xft.rgba: rgb

The other Xft settings above are picked up Pluma, however. On the other hand, the text editor Leafpad correctly uses the DPI setting. Any clues? I use the window manager Blackbox started from a console.

Pluma (with DejaVu Sans 10):

enter image description here

Leafpad (with DejaVu Sans 10):

enter image description here

August Karlstrom
  • 1,736
  • 2
  • 27
  • 39
  • Why is your question GTK specific? Looks like some [XY problem](http://xyproblem.info) to me... Do you have the same issue with Qt based applications? – Basile Starynkevitch Jul 03 '17 at 11:18
  • I don't use any Qt based applications, so making it work for GTK applications is at least a starting point. Here is the X problem: https://unix.stackexchange.com/questions/165250/why-is-a-ten-point-font-smaller-in-debian-compared-to-ubuntu – August Karlstrom Jul 03 '17 at 13:39

1 Answers1

0

GTK3 use theming, so you need to configure the style sheets used by it (not ~/.Xresources). Read also about GTK application resources.

The gnome-tweak-tool application and package provides a GUI interface to changing themes, etc.

You might consider setting the scale property of fonts. It is not exactly the DPI, but is related (see also this).

(perhaps the GTK theming machinery knows about DPI, but I can't tell how)

BTW, if using Xorg X11 server, you could consider configuring the DPI resolution of your screen (see e.g. this); read also about xrandr. this works on the server side so should has an effect on every X11 client (even non-GTK based). If using Wayland, you might find something relevant too.

Basile Starynkevitch
  • 10,411
  • 1
  • 32
  • 52