GDK W32: support font scaling

Respect system font scaling (Control Panel -> Display -> Font Size) and
convey that information to GDK (which then passes it to Pango).

https://bugzilla.gnome.org/show_bug.cgi?id=734038
This commit is contained in:
Руслан Ижбулатов 2014-07-31 14:01:56 +00:00
parent d6e9997619
commit f38498ed84

View File

@ -36,6 +36,20 @@ G_DEFINE_TYPE (GdkWin32Screen, gdk_win32_screen, GDK_TYPE_SCREEN)
static void
gdk_win32_screen_init (GdkWin32Screen *display)
{
GdkScreen *screen = GDK_SCREEN (display);
HDC screen_dc;
int logpixelsx = -1;
screen_dc = GetDC (NULL);
if (screen_dc)
{
logpixelsx = GetDeviceCaps(screen_dc, LOGPIXELSX);
ReleaseDC (NULL, screen_dc);
}
if (logpixelsx > 0)
_gdk_screen_set_resolution (screen, logpixelsx);
}
static GdkDisplay *