gtk4: Abnormally spaced text with gtk-hint-font-metrics disabled
Setup
- Fedora Linux 36
- The following built from Rawhide
- vte 0.69.92
- gtk4 4.7.1
- The following test environments
- vte-2.91-gtk4
- GNOME Console 43.beta built from Rawhide
- Testing at text scaling factors of 1.1875 and 1
- Cascadia Mono/Code (PL and non PL) font at size 11, and Monospace font
Description
When gtk-hint-font-metrics
is disabled in ~/.config/gtk-4.0/settings.ini
, text in the terminal can render much more spaced out horizontally than would be expected. The issue seems dependent on font and text scaling factor; when using a text scale factor of 1 or 1.1875 with any of the Cascadia fonts, it will render wider than expected, whereas with Monospace at a scaling factor 1, spacing is as expected, only being wider than expected at 1.1875.
I initially considered the potential that this was an issue in GTK, however the text rendering seemed to noticeably differ from that of GNOME Text Editor for instance, so this seemed to be the most appropriate place to start. I also considered that Fedora's patches for VTE could somehow be at fault, but when examining what they do this did not seem as though it would be the case.