GNOME Bugzilla – Bug 778837
HiDPI: Font size too large in Cairo context
Last modified: 2018-05-02 18:07:18 UTC
When using a PangoLayout with Cairo in widget, the font map resolution follows the DPI settings in the Windows OS. When in HiDPI mode (either by setting the DPI to at least 192, or by setting GDK_SCALE) this resolution should probably be adjusted by the scaling factor. In any case, the text is currently 2x too large with scaling factor 2, and 3x too large with scaling factor 3. A workaround which seems to work with GTK 3.22.7 (from MSYS2) is to set the device scale with cairo_surface_set_device_scale(cs, 1, 1) when rendering text, and then resetting the scale after.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gtk/issues/761.