GIMP themes can use root element em (rem) to adapt layout and font-size.
Operating System: All
Description of the feature
Environment/Versions
GIMP themes can use root element (rem) to adapt layout and font-size. All spacing defined in Themes, that are more that a couple of pixels should use rem spacing, unless there is reason against. This is an Accessibility issue, and also makes sense when you consider the wide range of resolutions GIMP is used on.
The user will have typically set the 'rem' when they adjusted the platform font size. GIMP inherits this and can use it to good effect. I tested the themes I did at low resolution and 4K, and they seem to adjust nicely.
This is from the start of the 'font.css' file I use.
/* Extra small 0.75rem */
/* Small size 0.95rem */
/* Normal size 1.0rem */
/* Large size 1.05rem */
/* Extra Large size 1.1rem */
/* Scaling for font size is usually found in the OS Accessibilty settings.
Scale your fonts system wide using those settings before changing these.
GIMP inherits those settings. The standard DPI settings are:
100% (96 DPI)
125% (120 DPI)
150% (144 DPI)
Finally, uncomment and tweak the number below to fit your setup and eyes */
/* *{-gtk-dpi: 210;} */