After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 778837 - HiDPI: Font size too large in Cairo context
HiDPI: Font size too large in Cairo context
Status: RESOLVED OBSOLETE
Product: gtk+
Classification: Platform
Component: Backend: Win32
3.22.x
Other Windows
: Normal normal
: ---
Assigned To: gtk-win32 maintainers
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2017-02-17 14:15 UTC by Michail Crayson
Modified: 2018-05-02 18:07 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Michail Crayson 2017-02-17 14:15:58 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.
Comment 1 GNOME Infrastructure Team 2018-05-02 18:07:18 UTC
-- 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.